<!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">
<!--
.username { background-image:url(inc/images/login_bj.gif); background-position:5px 50%; background-repeat:no-repeat; }
li{ margin:0; padding:0; margin-left:24px; padding:0; list-style:outside; }
-->
</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;
    }
  }
  addSubmitSafe();
  return true;
}

//过滤禁止字符
function chkWord(obj){
  //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 toQzoneLogin(v){
  var iW = 900;  var iH = 380;
  var oW = parent.document.documentElement.clientWidth;
  var oH = parent.document.documentElement.clientHeight;
  var oT = window.screen.availHeight - oH;

  var iT = oT+(oH-(iH+58))/2; //获得窗口的垂直位置;
  var iL = (oW-10-iW)/2; //获得窗口的水平位置;

  window.open("login_key/"+v+"/","TencentLogin","width="+iW+",height="+iH+",top="+iT+",left="+iL+",menubar=0,scrollbars=1, resizable=1,status=1,titlebar=0,toolbar=0,location=1");
} 

-->
</script>
</head>
<body>
<div id="session" class="session">
</div>
<div id="logo"><a href="<?php echo $web['path']; ?>"><img src="<?php echo $web['sitelogo']; ?>" /></a></div>
<div id="banner"> <a href="./">首页</a> <a class="column_is">登陆</a> <a href="help.php">帮助</a> </div>
<div class="column">
  <h5><a href="./">首页</a> &gt; 登陆</h5>
</div>
<table width="100%" height="400" border="0" cellspacing="0" cellpadding="0" id="menu">
  <tr>
    <td valign="top" id="leftmenu" class="leftmenu"> 欢迎回来！登陆后您可以有更多发表权限，例如：
      <ul>
          <li>可以上传图片。</li>
        <li>可以发布链接。</li>
        <li>通过发表可以积攒积分，以获得更多其他权限，如置顶、得到广告宣传位等等。</li>
        <li>有关会员权限详细说明，可参见<a href="member.php?get=power">member.php?get=power</a></li>
      </ul></td>
    <td valign="top" class="rightmenu"><form name="loginform" id="loginform" action="member.php?post=login" method="post" onsubmit="return postChk(this)">
      <table width="100%" border="0" cellspacing="5" cellpadding="0">
        <tr>
          <td width="150" style="text-align:right">帐号：</td>
          <td 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='large username';}" onfocus="this.className='large';" style="width:200px;" class="large username" maxlength="255" />
            <span class="redword_err" id="username_err"></span></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">密码：</td>
          <td align="left"><input class="large" name="password" type="password" onpropertychange="chkWord(this)" oninput="chkWord(this)" style="width:200px" maxlength="30" /></td>
        </tr>
        <?php if (!empty($session[0])) : ?>
        <tr>
          <td width="150" style="text-align:right">验证码：</td>
          <td align="left"><table border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="width:130px"><input class="large" name="imcode" id="imcode" type="text" style="width:120px" 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>
            </td>
        </tr>
        <?php endif; ?>
        <tr>
          <td width="150" style="text-align:right">&nbsp;</td>
          <td align="left"><table border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="20"><input name="save_cookie" id="save_cookie" type="checkbox" class="checkbox" value="31536000" checked="checked" /></td>
              <td><label for="save_cookie" class="grayword">下次自动登陆</label> <a href="forpassword.php" class="grayword" target="_blank">忘记密码</a></td>
            </tr>
          </table></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">&nbsp;</td>
          <td align="left"><button class="large" id="submit" name="submit" type="submit"><b>　登　陆　</b></button>
                <button class="large" id="reset" name="reset" type="reset"><b>重置</b></button>
            <a href="reg.php" class="grayword">转到注册</a></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">&nbsp;</td>
          <td align="left"><?php
if (is_array($web['login_key']) && count($web['login_key']) > 0) {
  foreach ($web['login_key'] as $lv) {
    echo '<a href="javascript:void(0);" onclick="toQzoneLogin(\''.$lv.'\');return false;" title="用'.@file_get_contents('login_key/'.$lv.'/title.txt').'帐号登录"><img src="inc/images/login_'.$lv.'.png" /></a> ';
    unset($lv);
  }
}
?></td>
        </tr>
      </table>
      <input name="act" type="hidden" value="login" />
      <input name="location" type="hidden" value="<?php echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" />
    </form></td>
  </tr>
</table>
<div id="foot">
  <?php @include ('inc/css/'.$web['sitemode'].'/foot.txt'); ?>
</div>
</body>
</html>
<?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();
?>