login.php

来自「php做的wap论坛 有详细说明在readme中」· PHP 代码 · 共 47 行

PHP
47
字号
<?php
require_once("variable.php");
echo $WmlDeclare;
?>
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-cache" forua="true"/>
</head>
<card id="Login" title="<?php echo $siteName;?>">
<p>
<?php
if($_GET[action]=="post"){
	if(empty($_GET[password]) or empty($_GET[username])){
		echo "(1)Error!<br/>";
	}else{
		$UUsername = iconv("UTF-8", "GB18030", $_GET[username]);
		$row = mysql_fetch_array(mysql_query("select * from ".$dbTablePx."members where username='$UUsername' limit 1"));
		if($row[password]==md5($_GET[password])){
			$md5id = md5($row[uid].$row[username].$row[password]);
			mysql_query("update ".$dbTablePx."members set md5id='$md5id' where uid='$row[uid]'");
			mysql_query("update ".$dbTablePx."memberdata set lastvisit=thisvisit,thisvisit=unix_timestamp() where uid='$row[uid]'");
			echo "登录成功<br/><a href='index.php?session=$md5id'>点击继续...</a><br/>";
		}else{
			echo "(2)Error!<br/>";
		}
	}
}else{
?>
用户名:<input name="username" type="text" format="*M" value="" emptyok="true" maxlength="30"/><br/>
密 码:<input name="password" type="password" format="*M" value="" emptyok="true" maxlength="30"/><br/>
<anchor>[登录]
        <go href="login.php?action=post" method="get">
          <postfield name="username" value="$(username)"/>
          <postfield name="password" value="$(password)"/>
        </go>
</anchor>
<?php
}
?>
<br/>
<small>(C)copyright by <?php echo $siteSign;?></small>
</p>
</card>
</wml>
<?php
LangFlush(ob_get_contents());
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?