summaryrefslogtreecommitdiff
path: root/templates/header.tpl
blob: d280975c1c210348609d1494db96d8b26aa1c7b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?xml version='1.0' ?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
	
<html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en'>

<head>{$myHeaders}</head>

{if $config->_thisScript == "index.php"}
<body onload='getElement("searchForm").searchString.focus();'>
{else}
<body>
{/if}

<div id='header'>
	<div id='headerLeft'>
		<a href='{$config->_rootUri}/' style='color: #000000;'>Nutrition Information Database</a>
	</div>

{if isset($isLoggedIn)}
	<div id='headerMiddle'></div>
	<div id='headerRight'>
		Hi {$smarty.session.user.username}.<br />
		[<a href='logout.php'>Logout</a>]

	</div>
{else}
	<form action='login.php' method='post' id='loginForm' onsubmit='return validateLoginFields();'>
		<div id='headerMiddle'>
			Login <input type='text' name='username' id='username' size='15' maxlength='25' /><br />
			Password <input type='password' name='password' id='password' size='15' maxlength='25' />
		</div>
		<div id='headerRight'>
			<input type='submit' name='doLogin' value='Login' style='margin-bottom: 1ex;' /><br />
			<a href='register.php'>Register</a>.
		</div>
	</form>
{/if}

	<div id='headerLinkBar'>
		<div id='headerLinks'>
			<a href='{$config->_rootUri}/' title='Home/Search Page'>Search</a> &nbsp; | &nbsp;
			<a href='{$config->_rootUri}/about.php' title='About nutridb.com'>About</a> &nbsp; | &nbsp;
			<a href='{$config->_rootUri}/guide.php' title='A brief guide'>Guide</a> &nbsp; | &nbsp;
			<a href='{$config->_rootUri}/resources.php' title='Other useful information'>Resources</a> &nbsp; | &nbsp;
			<a href='faq.php' title='FAQ'>FAQ</a>
		</div>
		<div id='systemMsgs'>{$systemMsg}</div>
	</div>
</div>