{if $include_js}
	{foreach name=include_js_loop item=v from=$include_js}
		<script language="javascript" src={$v}></script>
	{/foreach}
{/if}
<html>
<head>
    <META HTTP-EQUIV="Expires" CONTENT="-1">
    <title>{$application_name|htmlspecialchars} {$application_version|htmlspecialchars} - {$page_title}</title>
    <link rel="StyleSheet" href="styles/{$STYLE}.css" type="text/css">
	<link rel="stylesheet" type"text/css" href="styles/print.css" media="print">
    <META http-equiv="Content-Type" content="text/html; charset={$STRING.lang_charset}">
</head>
<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" {if $onUnload}onUnload="{$onUnload}"{/if}>
	<table width="100%" border="0" cellspacing="0" cellpadding="0" class="nav">
  <tr>
	<!-- <td class="nav" valign="middle"><img name="title" src="{$template_path}/images/title.gif" width="500" height="50" border="0" alt="" hspace="0" vspace="0"></td> -->
	<!-- TODO : I should make the header more configurable -->
	<td class="nav" valign="middle">
		<img name="title" src="{$template_path}/{$PRIMARY_LOGO}" alt="DiaTool" hspace="0" vspace="0">	
	</td>
	<td align="right" valign="middle" class="nav">
		<form action="bug.php">
		<input type="hidden" name="op" value="show">
			{$STRING.WRAP.FindBug}
		<input name="file_id" type="text" id="file_id" size="4" value="">
		&nbsp;
		</form>
	</td>
  </tr>
  <tr>
	  <td class="navtitlebar" height="4" colspan="2"><img src="{$template_path}/images/spacer.gif" height="1" width="1"></td>
  </tr>
  <tr>
	  <td class="navtitlebar" colspan="2">
		  <table border="0" cellspacing="0" cellpadding="4">
			<tr>
			  <td><a href="index.php" class="navlink">{$STRING.WRAP.Home}</a></td>
			  <td>|</td>
			  <td><a href="bug.php?op=add" class="navlink">{$STRING.WRAP.AddNewBug}</a></td>
			  <td>|</td>
			  <td><a href="query.php?op=query" class="navlink">{$STRING.WRAP.QueryBugs}</a></td>
			  <!--
			  <td>|</td>			  
				<td><a href="report.php" class="navlink">{$STRING.WRAP.ViewReports}</a></td>
				-->
				{if not NEW_ACCOUNTS_DISABLED and not $smarty.session.uid}
			  <td>|</td>
			  <td><a href="newaccount.php" class="navlink">{$STRING.WRAP.CreateNewAccount}</a></td>
				{/if}
				{if not NEW_ACCOUNTS_DISABLED and $smarty.session.uid}
			  <td>|</td>
			  <td><a href="newdomain.php" class="navlink">{$STRING.WRAP.CreateNewDomain}</a></td>
				{/if}
			  <td>|</td>
			  <td><a href={$doc_url} class="navlink">{$STRING.WRAP.Documentation}</a></td>
				{if isset($perm) and $perm->have_perm('AdminProject')}
			  <td>|</td>
			  <td><a href="admin/project.php" class="navlink">{$STRING.WRAP.AdminTools}</a></td>
				{/if}
			</tr>
		</table>
	</td>
  </tr>
  <tr>
	  <td class="navtitlebar" height="4" colspan="2"><img src="{$template_path}/images/spacer.gif" height="1" width="1"></td>
  </tr>
  <tr>
	  <td class="navborder" height="1" colspan="2"><img src="{$template_path}/images/spacer.gif" height="1" width="1"></td>
  </tr>
  {if $smarty.server.SCRIPT_NAME|basename neq 'newaccount.php'}
	<tr>
	    <td colspan="2" height="20" class="bottomnav">
		{if not $smarty.session.uid}
		<form method="post" action="{$smarty.server.SCRIPT_NAME}{if $smarty.request.QUERY_STRING}?{$smarty.request.QUERY_STRING}{/if}">
		&nbsp;
		    {if EMAIL_IS_LOGIN}
			{assign var="loginlabel" value=$STRING.WRAP.Email}
		    {else}
			{assign var="loginlabel" value=$STRING.WRAP.Login}
		    {/if}
				{$loginerror}
				{$loginlabel}: <input type="text" name="username" class="bottomnavinput" value="{$smarty.cookies.phpbt_user}">
				{$STRING.USER_PREF.Password}: <input type="password" name="password" class="bottomnavinput" value="{$smarty.cookies.phpbt_user_pw}">
				<input type="hidden" name="dologin" value="1">
				<input type="submit" value="{$STRING.WRAP.DoLogin}" class="bottomnavinput">
				<input type="submit" name="sendpass" value="{$STRING.WRAP.EmailPassword}" class="bottomnavinput" title="Forgot your password?  Have it sent to you">
		    {if RECALL_LOGIN}
				<input type="checkbox" name="savecookie" value="1" {if !empty($smarty.cookies.phpbt_user)}checked{/if} class="bottomnavinput" title="Remember {$loginlabel} for next time"> {$STRING.WRAP.RememberMe}
		    {/if}
		</form>
		{else}
				{$STRING.WRAP.BugsAssigned} : 
				{if $owner_open}
					<a href="{$owner_open}" title="Open">				 
					{$owner_open_nb}
					</a>
				{else}
					0
				{/if}
				| 
				{$STRING.WRAP.BugsReported} : 
				{if $reporter_open}
					<a href="{$reporter_open}" title="Open">
						{$reporter_open_nb}
					</a>
				{else}
					0
				{/if}
				/ 
				{if $reporter_closed}
					<a href="{$reporter_closed}" title="Closed">
						{$reporter_closed_nb}
					</a>
				{else}
					0
				{/if}
				| <a href="user.php">
					{$STRING.WRAP.PersonalPage}
				</a>
				| <a href="logout.php">
					{$STRING.WRAP.Logout} {$smarty.session.uname}
				</a>
		{/if}
	    </td>
	</tr>
<!--  <tr>
	  <td class="navborder" height="1" colspan="2"><img src="{$template_path}/images/spacer.gif" height="1" width="1"></td>
  </tr> -->
  {/if}
  <tr>
	  <td class="navbotspacer" height="20" colspan="2"><img src="{$template_path}/images/spacer.gif" height="1" width="1"></td>
  </tr>
</table>
{include file=$content_template}
</body>
</html>
