📄 login.php
字号:
<?php
include'include/begin.php';
include language();
$pagename_m = $_pagename[41];
$tpl_html = 'login';
include'include/main.php';
if ($_GET['type'] == 'post') {
$sqltime = $time-3600;
mysql_query("delete from {$db_prefix}login where time<'$sqltime' ", $myconn);
preg_match("/^[a-zA-Z0-9\.]+$/is", $_POST['password'])?null : echoerror(34);
$passwordmd5 = md5($_POST['password']);
$password = substr($passwordmd5, 0, 13) . substr($passwordmd5, -3);
if (jyname($_POST['username'])) {
echoerror(33);
}
$cookiestime = $_POST['cookiestime']?$_POST['cookiestime'] * 60 + time(): 0;
$result = mysql_query("select * from {$db_prefix}members where username='$_POST[username]'", $myconn);
if ($login = mysql_fetch_array($result)) {
if (SERVER_GHO && $login['webid']!=$webid) {
echoerror(141);
}
$result = mysql_query("select * from {$db_prefix}login where uid='$login[id]'", $myconn);
if ($login2 = mysql_fetch_array($result)) {
if ($login2['count'] > 4) {
echoerror(140);
}
}
if ($login['password'] != $password) {
if ($login2['uid']) {
mysql_query("update {$db_prefix}login set count=count+'1',time='$time' where uid='$login[id]'" , $myconn);
} else {
mysql_query("insert into {$db_prefix}login(uid,time) values('$login[id]','$time')", $myconn);
}
echoerror(141);
} else {
setcookie($usercookiesid, $login['id'], $cookiestime);
setcookie($usercookiespw, $login['password'], $cookiestime);
}
echoioy(4);
} else {
echoerror(30);
}
}
include_once'./cache/template/m_' . $style_id . '_' . $tpl_html . '.php';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -