<?
/*
	[Sueam CMS] (C)2009-2010 ZMRNet Studio
	login.php by 2009-10-10 zmrnet
*/
require_once($adm_dir.'/include/conn.php');

$sys = $_VDB['sys'];
$sys_title = $sys['name'].' Version '.$sys['vers'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><? echo $sys_title; ?></title>
<link href="images/admin.css" rel="stylesheet" type="text/css" />
<script language="javascript" for="document" event="onkeydown"> 
<!-- 
if(event.keyCode==13){ 
	LoginOK();
}
-->
</script>
<script language="javascript">
<!--
function LoginOK(){
	with(frm_login){
		var re;
		re=/ /g;
		user=(userName.value).replace(re,'');
		if(user==''){
			alert('请填入用户名！');
			userName.focus();
			return false;
		}else if(userPass.value==''){
			alert('请填入密码！');
			userPass.focus();
			return false;
<? if($cfg_code){ ?>
		}else if(chkCode.value==''){
			alert('请填入验证码！');
			chkCode.focus();
			return false;
<? } ?>
		}else{
			submit();
		}
	}
}
--> 
</script>
</head>
<body>
<form name="frm_login" id="frm_login" method="post" action="?check">
	<p style="font-size:14px;color:blue;"><? echo $sys_title; ?></p>
	<p>
		用户名：
		<input type="text" name="userName" class="input_txt">
	</p>
	<p>
		密&nbsp;&nbsp;&nbsp;&nbsp;码：
		<input type="password" name="userPass" onfocus="this.value=''" class="input_txt" />
	</p>
<? if(check_code){ ?>
	<p>
		验证码：
		<input type="text" name="chkCode" onfocus="this.value=''" class="input_txt2" />
		<img src="include/code.php" />
	</p>
<? } ?>
	<p>
		<input type="reset" value="重 置" class="input_btn" />
		<input type="reset" value="登 录"  onclick="LoginOK()" class="input_btn" />
	</p>
</form>
</body>
</html>