Location: PHPKode > scripts > Linker IMG > linker-img/manage/authen_check.php
<?php

//=====================================
// LINKER Category Engine
//=====================================
// Filename : authen_check.php
// Path  : Manage directory
// last update : 2002/03/13
// Desc : Admin login
//=====================================

//=====================================
// File include part
//=====================================


if (!$switch) {

include ("../function/base_info.php"); 
include ("../$Slang/m_common.php"); 

print <<<EOF

<head>
<title>LINKER Admin login</title>
<LINK rel='stylesheet' type='text/css' href='./linker.css'>
<meta http-equiv='Content-Type' content='text/html; charset=$Scharset'>
</head>

<body bgcolor='#F6F6F6' onLoad="document.myform.adminid.focus()">
<br><br>
<form  action="authen_check.php" method=post name=myform>
<input type="hidden" name="switch" value="auth">

<center><img src="../image/title.gif" border=0></center><br><br>

<table cellpadding=0 cellspacing=1 width=400 border=0 align=center>
<tr>
<td height=30 align=center colspan=2><font size='2'><b>LINKER $l_admin_login</b></font>
</tr>

<tr><td colspan=2 height=2 bgcolor=#999999><img src="../image/x1.gif"></td></tr>

<tr>
<td width=150 height=30><font size=2>$l_admin_id :</font></td>
<td width=250  height=30 align=center><input type=text name=adminid></td>
</tr>

<tr><td colspan=2 height=1 bgcolor=#999999><img src="../image/x1.gif"></td></tr>

<tr>
<td height=30><font size=2>$l_admin_pw :</font></td>
<td align=center><input type=password name=adminpw></td>
</tr>

<tr><td colspan=2 height=2 bgcolor=#999999><img src="../image/x1.gif"></td></tr>

<tr >
<td height=50 align=center colspan=2><font size=2><input type=submit value=" $l_admin_login " class=cinput></font></td>
</tr>
</table>
<form>

</body></html>

EOF;

}

//=====================================
// ID and Password check
//=====================================

else {
sleep(1);

include ("../function/pass_info.php"); 
$adminid = md5($HTTP_POST_VARS[adminid]);
$adminpw = md5($HTTP_POST_VARS[adminpw]);

if ($adminid == $Sadmin_id && $adminpw == $Sadmin_pass) {

setcookie("admin_login","1",0,"/");
setcookie("linker_key1",$adminid,0,"/");
setcookie("linker_key2",$adminpw,0,"/");
echo "<meta http-equiv='refresh' content='0; url=index.html'>"; 
exit;
}

else {
echo "<meta http-equiv='refresh' content='0; url=authen_check.php'>"; 
exit;
}


}


?>
Return current item: Linker IMG