<?
switch($action){
 case "login":
$cookietime=time()+3600;
SetCookie(PHP_AUTH_USER,$username,$cookietime);
SetCookie(PHP_AUTH_PW,$password,$cookietime);
header("location:admin.php");
break;
case "unlogin":
$cookietime=time()-3600;
SetCookie(PHP_AUTH_USER,$username,$cookietime);
SetCookie(PHP_AUTH_PW,$password,$cookietime);
header("location:../index.php");
break;} 
?>
<HEAD>

<TITLE></TITLE><LINK 
href="image/andy.css" type=text/css rel=stylesheet>
</HEAD>
<BODY><form method="post" action="login.php?action=login">
<TABLE width="928" height="441">
  <TBODY>
    <TR>
      <TD width="167"></TD>
      <TD align="center" width="664">管理员管理</TD>
      <TD width="75"></TD>
    </TR>
    <TR>
      <TD width="167"></TD>
      <TD align="center" width="664">用户名：<INPUT style="background-color:#FFFFFF; color:#9999FF; border: 1 double #B4B4B4" onmouseover="this.style.backgroundColor = '#E5F0FF'" onmouseout="this.style.backgroundColor = ''" type="text" size="11" name="username"> <BR>
      <BR>
      密 &nbsp;码：<INPUT style="background-color:#FFFFFF; color:#9999FF; border: 1 double #B4B4B4" onmouseover="this.style.backgroundColor = '#E5F0FF'" onmouseout="this.style.backgroundColor = ''" type="password" size="10" name="password">
<BR>
      <BR>
      <input style="color: #000000; background-color: #f3f3f3; border-style: solid; border-width: 1" onMouseOver ="this.style.backgroundColor='#FFC864'" onMouseOut ="this.style.backgroundColor='#f3f3f3'" type="submit" value="登 录"></TD>
      <TD width="75"></TD>
    </TR>
    <TR>
      <TD width="167"></TD>
      <TD width="664"></TD>
      <TD width="75"></TD>
    </TR>
  </TBODY>
</TABLE>
</form>
<?include "foot.php";?></BODY>
</HTML>

