<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php

/* 登陆页 */
/* 162100源码 - 162100.com - download.162100.com */


@ require ('inc/set/set.php');
@ require ('inc/set/set_sql.php');
@ require ('inc/function/confirm_power.php');
//身份验证
define('POWER', confirm_power());

echo $title = '登陆', $web['code_author'];
?></title>
<link id="my_style" rel="stylesheet" type="text/css" href="inc/css/<?php echo $web['sitemode']; ?>/style.css">
<style type="text/css">
<!--
html { background:none; background-color:#FFFFFF; }
body { width:340px; margin:0; padding:0; }
body, td { font-size:12px; }
.username { background-image:url(inc/images/login_bj.gif); background-position:5px 50%; background-repeat:no-repeat; }
-->
</style>
<script language="javascript" type="text/javascript" src="inc/js/main.js"></script>
<script language="javascript" type="text/javascript">
<!--
function postChk(theForm){
  if(theForm.username.value.replace(/^(\s+|　+)|(\s+|　+)$/,'')==''){
    alert('用户名不能留空！');
	theForm.username.focus();
    return false;
  }
  if(theForm.password.value.replace(/^(\s+|　+)|(\s+|　+)$/,'')==''){
    alert('密码不能留空！');
	theForm.password.focus();
    return false;
  }
  if($('imcode')!=null){
    if($('imcode').value!=getCookie('regimcode')){
      alert('请准确填写验证码！');
	  $('imcode').focus();
      return false;
    }
  }
  return true;
}

//过滤禁止字符
function chkWord(obj){
  var ifr=$("addCFrame");
  if(ifr!=null){
    ifr.style.display="block";
  }
  //if(obj.value.match(/[\s\"\'\\]+/)){
  if(obj.value.match(/[\s\r\n]+/)){
    //alert('所填内容不能含 空格 及 \' " \\ ');
    alert('所填内容不能含 空格');
    //obj.value=obj.value.replace(/[\s\"\'\\]+/g,'');
    obj.value=obj.value.replace(/[\s\r\n]+/g,'');
    obj.focus();
  }
}

function forLogin(o){
  if($('save_cookie').value==31536000){
    $('save_cookie').value=0;
	o.style.textDecoration='line-through';
  }else{
    $('save_cookie').value=31536000;
	o.style.textDecoration='none';
  }
}

window.onload=function(){
  var par=parent.document.getElementById("addCFrame");
  if(par!=null){
    try{
      par.style.height=document.body.offsetHeight+'px';
    }catch(err){
    }
  }
}

-->
</script>
</head>
<body>
<table width="100%" border="0" cellpadding="10" cellspacing="0">
  <tr>
    <td align="center"><form name="loginform" id="loginform" action="member.php?post=login" method="post" onsubmit="return postChk(this)">
      <table width="100%" border="0" cellspacing="2" cellpadding="0">
        <tr>
          <td width="200" align="left">帐号：
            <input name="username" id="username" type="text" onpropertychange="chkWord(this)" oninput="chkWord(this);" onblur="if(this.value.replace(/^\s+|\s+$/g,'')==''){this.className='username';}" onfocus="this.className='';" style="width:150px;" class="username" maxlength="255" /></td>
          <td rowspan="2" align="left"><button id="submit" class="large" name="submit" type="submit"><b>登陆</b></button></td>
          <td align="right"><input name="save_cookie" id="save_cookie" type="hidden" value="31536000" />
              <a href="javascript:void(0);" onclick="forLogin(this);return false;" class="grayword">记住登陆</a></td>
        </tr>
        <tr>
          <td width="200" align="left">密码：
            <input name="password" type="password" onpropertychange="chkWord(this)" oninput="chkWord(this)" style="width:150px;" maxlength="30" />
          </td>
          <td align="right"><a href="forpassword.php" class="grayword" target="_blank">忘记密码</a></td>
        </tr>
      </table>
      <?php if (!empty($session[0])) : ?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td>需要验证码验证：
            <input name="imcode" id="imcode" type="text" style="width:90px" maxlength="6" /></td>
          <td><iframe src="inc/js/imcode.html" id="imFrame" name="imFrame" width="95" height="18" frameborder="0" marginwidth="0" marginheight="0" scrolling="No" allowtransparency="true"></iframe></td>
        </tr>
      </table>
      <?php endif; ?>
      <input name="m" type="hidden" value="1" />
      <input name="act" type="hidden" value="login" />
      <input name="location" type="hidden" value="./" />
    </form></td>
  </tr>
</table>
<?php

//成员身份
if (POWER >= 1) {
  $userface = user_class(POWER, $session[3]);
//过客身份
} else {
}


if (!isset($sql['db_err'])) {
  db_conn();
}
if ($sql['db_err'] == '') {
  require ('inc/function/add_online.php'); //在线
}
@mysql_close();
?>