⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 phpop3clean.login.php

📁 一个基于页面实现的pop客户端程序
💻 PHP
字号:
<?phprequire_once('phPOP3clean.functions.php');function IsAdminUser() {	return ((@$_COOKIE['phPOP3cleanUSER'] === 'admin') && (@$_COOKIE['phPOP3cleanPASS'] === md5(PHPOP3CLEAN_ADMINPASS)));}function IsAuthenticatedUser() {	if (IsAdminUser()) {		return true;	}	if (isset($_COOKIE['phPOP3cleanUSER']) && isset($_COOKIE['phPOP3cleanPASS'])) {		$SQLquery  = 'SELECT `password` FROM `'.PHPOP3CLEAN_TABLE_PREFIX.'accounts`';		$SQLquery .= ' WHERE (`account` = "'.mysql_escape_string($_COOKIE['phPOP3cleanUSER']).'")';		$result = mysql_query_safe($SQLquery);		if ($row = mysql_fetch_array($result)) {			if ($_COOKIE['phPOP3cleanPASS'] === md5($row['password'])) {				return true;			}		}	}	return false;}if (isset($_POST['admin_login_user']) && isset($_POST['admin_login_pass'])) {	setcookie('phPOP3cleanUSER',     $_POST['admin_login_user']);	setcookie('phPOP3cleanPASS', md5($_POST['admin_login_pass']));	header('Location: '.$_SERVER['PHP_SELF']);	exit;}$loginOK = false;if (isset($_COOKIE['phPOP3cleanUSER']) && isset($_COOKIE['phPOP3cleanPASS'])) {	$loginOK = (IsAdminUser() || IsAuthenticatedUser());} elseif (!defined('PHPOP3CLEAN_NONFORCEDLOGIN')) {	echo '<html><head><style type="text/css">body,td,th { font-family: sans-serif; font-size: 9pt; }</style></head><body>';	echo '<form name="loginform" action="'.$_SERVER['PHP_SELF'].'" method="post">';	echo '<table border="0">';	echo '<tr><th align="right">User:</th><td><input type="text"     size="20" name="admin_login_user"></td></tr>';	echo '<tr><th align="right">Pass:</th><td><input type="password" size="20" name="admin_login_pass"></td></tr>';	echo '<tr><th colspan="2"><input type="submit" value="Login"></th></tr>';	echo '</table>';	echo '</form>';	echo '<script>document.loginform.admin_login_user.focus();</script>';	echo '</body></html>';	exit;}if (isset($_REQUEST['logout']) || ($loginOK !== true)) {	if (isset($_COOKIE['phPOP3cleanUSER']) || isset($_COOKIE['phPOP3cleanPASS'])) {		setcookie('phPOP3cleanUSER', '');		setcookie('phPOP3cleanPASS', '');		header('Location: '.$_SERVER['PHP_SELF']);		exit;	}}unset($loginOK);?>

⌨️ 快捷键说明

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