<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<?php header("Content-Type: text/html; charset=gb2312");?>
<title>登录页面
</title>
<link rel="stylesheet" type="text/css"
href="/js/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/js/themes/icon.css">
<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/js/jquery.easyui.min.js"></script>
<script type="text/javascript">
$(function(){
$('#win').window({
collapsible:false,
minimizable:false,
maximizable:false,
closable:false
});
$(document).bind('contextmenu',function(e){
$('#mm').menu('show', {
left: e.pageX,
top: e.pageY
});
return false;
});
$.extend($.fn.validatebox.defaults.rules, {
minLength: {
validator: function(value, param){
return value.length >= param[0];
},
message: '请输入最少{0}个字符'
},
maxLength: {
validator: function(value, param){
return value.length >= param[0];
},
message: '请输入最多{0}个字符'
}
});
$('#username').focus();
});
function submitFF(){
$('#ff').form('submit', {
url: '/index.php?user_login',
onSubmit: function(){
return $(this).form('validate');
},
success:function(data){
if(data=='TRUE'){
//$.messager.alert('info','
<?php echo $this->session->userdata('name');?>','info');
window.location.href='';
}else if(data=='FALSE'){
$.messager.alert('错误!','用户名或者密码错误','error');
}else if(data=='ERROR'){
$.messager.alert('错误!','验证码输入错误','error');
}else{
$.messager.alert('错误!','未知错误!['+data+']','error');
}
}
});
}
</script>
</head>
<body class="easyui-layout">
<div region="center" style="overflow: hidden;">
<div id="win" class="easyui-window" title="登录" style="width: 270px; height: 200px;">
<form id="ff" action='/index.php?user_login' method="post">
<table width='80%' border='0' height='100%' style='margin-top: 20px; margin-left: 10px'>
<tr>
<td><label for="username">用户名
</label></td>
<td><input class="easyui-validatebox" type="text" name="username"
id='username' required="true" validType='minLength[3]' value='zouyj'></input></td>
</tr>
<tr>
<td><label for="password">密码:
</label></td>
<td><input class="easyui-validatebox" type="password" name="password"
id='password' validType='minLength[6]' required="true" value='password'></input></td>
</tr>
<tr>
<td><label for="password">验证码
</label></td>
<td><input type="text" name="extraCode"
id='extraCode' size='4' maxLength='4'></input>
<img src='/index.php?util_extraCode/<?php echo rand(0, hexdec('FFFFFF'));?>' />
</td>
</tr>
<tr>
<td colspan='2' style='text-align: right; height: 50px'><a href="#" onclick="submitFF();"
class="easyui-linkbutton" icon="icon-ok">登录
</a></td>
</tr>
</table>
</form>
</div>
</div>
<div id="mm" class="easyui-menu" style="width: 120px;">
<div onclick="javascript:window.location.href=''" iconCls='icon-reload'>刷新
</div>
<div onclick="$.messager.alert('信息','天正教育帮助','info');" iconCls='icon-help'>帮助
</div>
<div onclick='window.close()'>退出
</div>
</div>
</body>
</html>