Location: PHPKode > projects > Admbook > admin/login.php
<?php
	session_start();
	include("../settings-data.php");
	include("../lib.php");
	if (!isset($register))
		$register = false;
	$warning = "";
	if (!isset($currentLogin))
		$currentLogin = "";
	if (!isset($currentPassword))
		$currentPassword = "";
	$loginUser = login($currentLogin, $currentPassword);
	if(!$loginUser)
	{
		if ($register)
			$warning = "Access is denied";
	}
	else
	{
		Header("Location: index.php?page=".$page);
		exit;
	}
?>
<html>
<head>
<title>admbook :: version <?=$constant['version']?></title>
<?php
	if ($constant['charset'] != "")
	{
?>
<meta http-equiv="Content-Type" content="text/html; charset=<?=$constant['charset']?>"/>
<?php
	}
?>
<link href="../style.css" type="text/css" rel="stylesheet"/>
<style type="text/css">
<!--
#error {
	color : <?=$constant['error-color']?>
}

.text {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['text-color']?>
}

.link {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['link-color']?>
}

.messagetext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['message-text-color']?>
}

.messagelink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['message-link-color']?>
}

.admintext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['admin-message-text-color']?>
}

.adminlink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['admin-message-link-color']?>
}

.headertext {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['header-text-color']?>
}

.headerlink {
	font : 8pt "Verdana","Arial Cyr", "Arial","Tahoma","Helvetica", sans-serif;
	color : <?=$constant['header-link-color']?>
}
-->
</style>
</head>
<body bgcolor="<?=$constant['background-color']?>" text="<?=$constant['text-color']?>" link="<?=$constant['link-color']?>" vlink="<?=$constant['link-color']?>" alink="<?=$constant['link-color']?>" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0">
<table width="760" border="0" cellpadding="0" cellspacing="2" height="100%" align="center">
<form action="login.php" method="post">
<input type="hidden" name="page" value="<?=$page?>"/>
<input type="hidden" name="register" value="true"/>
<tr>
	<td valign="top" class="text" height="1">
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="<?=$constant['border-color']?>">
				<table width="100%" border="0" cellpadding="2" cellspacing="1">
				<tr>
					<td bgcolor="<?=$constant['header-background-color']?>" class="headertext" id="book-title">Admbook versi0n <?=$constant['version']?></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td bgcolor="<?=$constant['border-color']?>">
				<table width="100%" border="0" cellpadding="2" cellspacing="1">
				<tr>
					<td bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><b>Administrator login</b></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td align="right">
				<div><a href="readme-ru.html" class="link"><b>read this help (ru)</b></a></div>
				<div><a href="readme-en.html" class="link"><b>read this help (en)</b></a></div>
				<div><a href="http://faq.saterenko.ru/" class="link"><b>read this faq (ru)</b></a></div>
			</td>
		</tr>
		</table>
	</td>
</tr>
<tr>
	<td align="center" class="text">
		<table border="0" cellpadding="2" cellspacing="0">
		<tr>
			<td colspan="5" class="text">
				<b>Please, log-in :</b> <span id="error"><?=$warning?></span>
			</td>
		</tr>
		<tr>
			<td align="center"><img src="../img/name.gif" width="11" height="14" border="0" alt="Login"/></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td class="text">Login: </td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>			
			<td><input type="text" name="currentLogin" value="<?=$currentLogin?>" maxlength="255" size="15" class="field"/></td>
		</tr>
		<tr>
		<tr>
			<td align="center"><img src="../img/password.gif" width="18" height="18" border="0" alt="Password"/></td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>
			<td class="text">Password: </td>
			<td><img src="../img/sp.gif" width="5" height="1"/></td>			
			<td><input type="password" name="currentPassword" value="" maxlength="255" size="15" class="field"/></td>
		</tr>
		<tr>
			<td colspan="5" align="right">
				<input type="submit" value="login" class="button"/><br/>
				<input type="button" value="back" class="halfbutton" onClick="javascript:window.location.href='../index.php'"/><input type="button" value="md5" class="halfbutton" onClick="javascript:location.href='generate.php'"/>
			</td>
		</tr>
		<tr>
			<td colspan="5" align="right">
				<div class="text">demo login: <b>admin</b></div>
				<div class="text">demo password: <b>pass</b></div>
			</td>
		</tr>
		</table>
		
	</td>
</tr>
<tr>
	<td valign="bottom" align="right" height="1" class="text">
		<br/>
		<table width="100%" border="0" cellpadding="0" cellspacing="0">
		<tr>
			<td width="50%" bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><span class="text">&copy;&nbsp;</span>trent&nbsp;<a href="http://www.low.ru/dev/guestbook/" class="text" target="_top">Download this guestbook</a>&nbsp;</td>
			<td width="50%" bgcolor="<?=$constant['header-background-color']?>" class="headertext" align="center"><span class="text">&nbsp;&nbsp;&nbsp;</span><a href="http://www.mylov.ru" onclick="location.href='http://partner.mylov.ru/link.phtml?pid=10359084&lid=553';return false;" class="link" target="_top">Çíàêîìñòâà è îáùåíèå</a>&nbsp;</td>
		</tr>
		</table>
	</td>
</tr>
</table>
</form>
<div id="count" style="position:absolute; left:0px; top:0px; visibility: hidden">
<layer visibility=hidden>
<!--hide@address.com COUNTER--><script language="JavaScript"><!--
d=document;a='';a+=';r='+escape(d.referrer)
js=10//--></script><script language="JavaScript1.1"><!--
a+=';j='+navigator.javaEnabled()
js=11//--></script><script language="JavaScript1.2"><!--
s=screen;a+=';s='+s.width+'*'+s.height
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth)
js=12//--></script><script language="JavaScript1.3"><!--
js=13//--></script><script language="JavaScript"><!--
d.write('<img src="http://top.list.ru/counter'+
'?id=308946;js='+js+a+';rand='+Math.random()+
'" height=1 width=1>')
if(js>11)d.write('<'+'!-- ')//--></script><noscript><img
src="http://top.list.ru/counter?js=na;id=308946"
height=1 width=1 alt=""></noscript><script language="JavaScript"><!--
if(js>11)d.write('--'+'>')//--></script><!--/COUNTER-->
</layer>
</div>
</body>
</html>
Return current item: Admbook