<?php
	!defined('DIRCMS_MANAGE') && exit('Access Denied!');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>后台管理登录 - Powered by DirCMS</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<style type="text/css" rel="stylesheet" >
	body {background:#F8F8F8;margin-top:150px;font-family:'Verdana','宋体';}
	form,input,table,tr,td{margin:0px; padding:0px; font-size:12px}
	a {color:#175796;text-decoration:none;}
	a:hover {color:red;text-decoration:none;}
	label {font-size:12px;}
	table {background:#fff;border:3px solid #f0f0f0;width:450px; margin:0px auto}
	td,th {font-size:14px;color:#000;}
	th {background:#1A5A8D;height:50px;color:#fff;}
	td {padding:0;height:30px;}
	.input {width:150px;border:1px solid;border-color:#666 #ccc #ccc #666;font-size:14px;padding:3px;margin-top:5px;}
	.yzm {width:80px;border:1px solid;border-color:#666 #ccc #ccc #666;font-size:14px;padding:3px;margin-top:5px;}
	.button {padding:5px 10px; font-size:14px; cursor:pointer}
	.copyright {border-top:1px solid #ccc;color:#666;background:#fbfbfb;font-size:11px;text-align:center;padding:10px 0;}
</style>
<script src="images/js/jquery.min.js"></script>
<script language="javascript" type="text/javascript">
	function killerror()
	{
		return true;	
	}
	window.onerror=killerror;
	$(document).ready(function(){
		$('#username').focus();
		$('#adminlogin').submit(function(){
			if($.trim($('#username').val())=='')
			{
				$('#username').css("border-color","#ff9900");
				$('#username').focus();
				return false;
			}
			else
			{
				$('#username').css("border-color","");
			}

			if($.trim($('#password').val())=='')
			{
				$('#password').css("border-color","#ff9900");
				$('#password').focus();
				return false;
			}
			else
			{
				$('#password').css("border-color","");
			}
			
			if($.trim($('#checkcode').val()).length!=4)
			{
				$('#checkcode').css("border-color","#ff9900");
				$('#checkcode').focus();
				return false;
			}
			else
			{
				$('#checkcode').css("border-color","");
			}
			return true;
		})
	});
</script>
</head>
<body>
<form action="" method="post" name="adminlogin" id="adminlogin" onSubmit="return checklogin();">
<input type="hidden" name="do_submit" value="1" />
	<table cellspacing="0" align="center">
		<tr><th colspan="3">管理员登录</th></tr>
		<tr>
			<td align="right" width="116">管理账号：</td>
			<td colspan="2"> <input name="username" type="text" class="input" id="username" ></td>
		</tr>
			<td align="right">管理密码：</td>
			<td colspan="2"><input name="password" type="password" class="input" id="password" ></td>
		</tr>
					</tr>
			<td align="right">验 证 码：</td>
			<td width="92"><input name="checkcode" type="text" class="yzm" id="checkcode" ></td><td width="230" valign="bottom"><img src="api/imcode/checkcode.php" onclick="this.src='api/imcode/checkcode.php?id='+Math.random()*5;" height="25" width="65"  style="cursor:pointer;" alt="验证码,看不清楚?请点击刷新验证码" align="baseline" /></td>
		</tr>
		<tr>
			<td></td>
			<td style="padding:8px 0px" colspan="2">
			<input type="submit" value="登 录" class="button" />
			<input type="button" value="取 消" class="button" onclick="window.location.href='<?php echo $DIRCMS['site_url'];?>'" />
			</td>
		</tr>
		<tr><td colspan="3" class="copyright">Powered by <strong><a href="http://www.dircms.cn/" target="_blank">DirCMS <?php echo DIRCMS_VERSION;?></a></strong> &copy; 2009-<?php echo date('Y');?></td></tr>
	</table>
</form>
</body>
</html>