index.html
<{$admin_yz}>
<html xmlns="
http://www.w3.org/1999/xhtml">
管理员登录
function kbq(){
document.getElementById("kbq").src="__URL__/verify/id/"+Math.random();
}
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-image: url(../Public/admin/index_images/login_01.gif);
overflow:hidden;
}
.STYLE3 {font-size: 12px; color: #FFFFFF; }
.STYLE4 {
color: #FFFFFF;
font-family: "方正大黑简体";
font-size: 50px;
}
-->
用户名
#032e49; color:#
88b5d1; border:solid 1px #88b5d1;"/>
密 码
#032e49; color:#
88b5d1; border:solid 1px #88b5d1;" />
验证码
#032e49; color:#
88b5d1; border:solid 1px #88b5d1;" />
AdminAction.class.php
query("select * from __TABLE__ where 1");
$login_yz=md5($row_admin[0][username].$row_admin[0][password]);
if($login_yz!=$username){
return "alert(*您没有权限访问本页面!*);location.href=*__APP__/Admin*;";
exit();
}
}
public function index() { /*****************************登陆***********************/
if($_POST[username]){
//判断验证码
if(session(*verify*) != md5($_POST[*verify*])){
$this->error(*验证码错误!*);
}
else{
//判断账号密码
$username=$_POST[username];
$md5user=md5($_POST[password]);
$user=M(*admin*);
$denglu=$user->query("select * from __TABLE__ where username=*{$username}* and password=*{$md5user}*");
if($denglu){
$login_yz=md5($denglu[0][username].$denglu[0][password]);
setcookie("username",$login_yz,time()+36000,"/");
$this->assign(*jumpUrl*,__APP__.*/Admin/index_main*);
$this->success("登陆成功");
}
else
{
$this->error("登陆失败");
}
}
}
else{
$this->display();
}
}
public function top(){ //***********admin top.html****************/
$this->assign("admin_yz",$this->login_yz_admin());
$this->display();
}