ihao
新手上路

一般会员
UID 29989
精华
0
积分 44
帖子 44
金钱 44 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2004-7-11
状态 离线
|
[推荐阅读] 讨论个事:地主留下的村服咋办?
程序太长了,不知道从哪里帖啊,我就把那个登录的页面拿出来吧
就是这个页,前一个页提交过来的时候,总是无法正常打开,会出现该页无法显示,就像没有这个页一样,不知道为什么,如果你刷新就好像单纯的打开这个页一样,没有提示那个重试和取消
<?
ob_start();
$error = "<br><li>用户名和密码不匹配!</li>";
//用户登录
if (@$_POST['action'] == "chklogin"){
if ($_POST['username']=="" || $_POST['password']==""){
$error = "<br><li>用户名或密码没有填写!</li>";
}
else{
//用户登录
$file = file("data/user.php");
for ($i=1; $i<count($file); $i++){
$data = explode("|",$file[$i]);
if ($data[0]==$_POST['username'] && $data[1] == md5($_POST['password']) ){
//信息合法
$fp = fopen("data/log.php","a");
$newdata = $data[0]."|".date("Y-m-d H:i:s")."||||\n";
fputs($fp,$newdata);
fclose($fp);
$cookietime = $_POST['cookietime']*24*3600;
setcookie("lycomclass",$data[0],$cookietime);
setcookie("lycomadmin",$data[12],$cookietime);
header("Location: index.php");
exit;
}//end if
}//end for
}//end else
}//end if
echo '
<html>
<title>错误提示页面</title>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body leftmargin="0" topmargin="0" bgcolor="#f5f5f5">
<map name="footer">
<AREA shape="RECT" alt="返回上一页" coords="40,25,80,45" href="javascript:history.go(-1)">
<AREA shape="RECT" alt="关闭窗口" coords="90,25,155,45" href="javascript:window.close()">
</map>
<table cellpadding="0" cellspacing="0" align="center" width="480">
<tr>
<td height="80"></td>
</tr>
<tr>
<td><img src="images/error_top.gif" border="0"></td>
</tr>
<tr>
<td>
<table cellpadding="0" cellspacing="0" background="images/error_bg.gif" width="480">
<tr>
<td width="10%"></td>
<td width="60%"> '.$error.' </td>
<td width="30%"> </td>
</tr>
</table>
</td>
</tr>
<tr>
<td><img src="images/error_footer.gif" border="0" usemap="#footer"></td>
</tr>
</table>
</body>
</html>
';
?>
|
|