<!doctype html> <html> <head> <meta charset="utf-8"> <?php $path = dirname(__FILE__); include $path . '/functions.php'; functions::start(); ?> </head> <body> <?php $admresult = functions::mysql_query("SELECT admin FROM " . TABLE_PREFIX . "_setting", "admin", false); if (!functions::is_logined($admresult) == true) { echo '<center>此页面为管理界面,非管理人员请离开!</center>'; } else { functions::admin(); } ?> </body> </html>
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <?php $path = dirname(__FILE__); include $path . '/functions.php'; functions::start(); ?> </head> <body> <?php if (!empty($_GET["name"])) { $name = htmlspecialchars($_GET["name"]); if (functions::is_logined($name) == true) { functions::print_form("member.php?name=" . $name, "change_pwd", '<center>更改密码<input type="text" name="pwd" /></center>'); if (!empty($_POST["pwd"])) { $pwd = htmlspecialchars($_POST["pwd"]); functions::mysql_query('UPDATE ' . TABLE_PREFIX . '_members SET pwd="' . $pwd . '" WHERE uname="' . $name . '"', "", true); } } else { header("Location:login.php"); } } else { header("Location:login.php"); } ?> </body> </html>
functions::chk_code(); if (!empty($_POST["uname"]) && !empty($_POST["pwd"])) { $name = htmlspecialchars($_POST["uname"]); $pwd = htmlspecialchars($_POST["pwd"]); $admin = functions::mysql_query("SELECT admin FROM " . TABLE_PREFIX . "_setting", "admin", false); if ($name === $admin) { $admin_pwd = functions::mysql_query("SELECT safe_code FROM " . TABLE_PREFIX . "_setting", "safe_code", false); if ($admin_pwd === $pwd) { functions::register_session($name); header('Location: admin.php'); exit; } else { die("<center>账户或密码错误</center>"); } } $is_exit = functions::mysql_query('SELECT count(*) FROM ' . TABLE_PREFIX . '_members WHERE uname="' . $name . '"', "count(*)", false); if ($is_exit == 0) { die("<center>账户或密码错误</center>"); } else { $rpwd = functions::mysql_query('SELECT pwd FROM ' . TABLE_PREFIX . '_members WHERE uname="' . $name . '"', "pwd", false); } if ($pwd === $rpwd) { functions::register_session($name); header('Location: member.php?name=' . $name); } else { die("<center>账户或密码错误</center>"); } } ?> </body> </html>
<img src="validatecode.php" title="看不清,点击换一张" onclick="this.src = 'validatecode.php?' + Math.random();"></center> <center><input type="submit" value="提交"></input></center> <form> <?php /* * 检测重名尚未完成 */ functions::chk_code(); if (!empty($_POST["name"])) { $icount = functions::mysql_query("SELECT MAX(id) FROM " . TABLE_PREFIX . "_applicant", "MAX(id)", false); $nowid = $icount + 1; $name = htmlspecialchars($_POST["name"]); functions::mysql_query("INSERT INTO " . TABLE_PREFIX . '_applicant(`id`,`name`,`ips`,`pass`) VALUES(' . $nowid . ',"' . $name . '","' . $vistorip . '","false")', "", true); $answers = array(); for ($id = 1; $id <= $qcount; $id++) { $answer = htmlspecialchars($_POST["q" . $id]); $question = functions::mysql_query("SELECT question FROM " . TABLE_PREFIX . "_questions WHERE id=" . $id, "question", false); $data = '<center>问题:' . $question . ' 回答:' . $answer . '</center></br>'; $answers[$id] = $data; } $word = implode("", $answers); $file = '<?php echo "' . $word . '"; ?>'; $f_open = fopen($path . "/applicant/" . $nowid . ".php", "w"); fwrite($f_open, $file); fclose($f_open); echo '<script>alert("成功提交申请");</script>'; die('<center>提交成功,请等待审核</center>'); } ?> </body> </html>