📄 admin.php
字号:
<?php
include 'config.php';
$tmp = $_GET['action'];
if($tmp == "signout"){
$cookie_name = "voteauth";
$cookie_value = "";
$cookie_expire = "0";
$cookie_domain = $domain;
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);
header ("Location: http://" . $domain . $directory . "admin.php");
}
if($_POST['name'] == ""){
$loggedin = "false";
}else {
$sql = "SELECT * FROM $admintable WHERE name = '$_POST[name]' AND pass = '$_POST[pass]'";
$result = mysql_query($sql)
or die ("Couldn't execute query.");
$num = mysql_num_rows($result);
if($num >= 1){
$cookie_name = "voteauth";
$cookie_value = "fook!";
$cookie_expire = "0";
$cookie_domain = $domain;
setcookie($cookie_name, $cookie_value, $cookie_expire, "/", $cookie_domain, 0);
header ("Location: http://" . $domain . $directory . "admin.php");
}
}
if($_COOKIE['voteauth'] == "fook!"){
$loggedin = "true";
}
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<title>N-13 Voting System</title>
<script language="JavaScript">
function openNewWindow() {
popupWin =
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="4" topmargin="0" marginwidth="0" marginheight="0">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="593" height="74">
<tr>
<td width="100%" background="images/index_02.jpg"> </td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="593">
<tr>
<td width="145" background="images/index_04.jpg" valign="top">
<font face="Tahoma" size="2">
<?php
if($loggedin == "true"){
echo "<font face=\"Tahoma\" size=\"2\">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -