📄 login.php
字号:
<?php
include"../cache/config.inc.php";
include"begin.php";
if ($_GET["type"] == "post") {
$username = $_POST["username"];
if (jyname($_POST['username'])) {
header("Location: main.php");
exit;
}
$passwordmd5 = md5($_POST['password']);
$password = substr($passwordmd5, 0, 13) . substr($passwordmd5, -3);
$result = mysql_query("select * from {$db_prefix}groupuser where username='$username' && groupid in('1','2') && password='$password'", $myconn);
if (mysql_fetch_array($result)) {
setcookie('adminname', $username, 1800 + time());
setcookie('adminpw', $password, 1800 + time());
header("Location: main.php");
exit;
}
}
require_once './template/header.htm';
require_once './template/login.htm';
require_once './template/footer.htm';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -