<!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>
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){
  var un=theForm.username.value;
  if(!un.match(/^([^\x00-\x7f]|\w|\.){3,45}$/)){
    alert('提交被拒绝！用户名请用汉字、数字、英文及字符 _ 或 . 组成！长度范围为3-45字符。注：中文占3个字符，其它等占1个。即：纯中文可输入15字，英文或数字或英语符号可输入45字');
	theForm.username.focus();
    return false;
  }
  var pn=theForm.password.value;
  if(pn.length>30 || pn.length<3){
    alert('密码长度是3-30字符！');
	theForm.password.focus();
    return false;
  }
  if(theForm.password_again.value==''){
    alert('密码重输不能留空！');
	theForm.password_again.focus();
    return false;
  }
  if(pn!=theForm.password_again.value){
    alert('两次密码输得不一样！');
	theForm.password_again.focus();
    return false;
  }
  if(theForm.password_question.value.replace(/^[\s\r\n]+|[\s\r\n]+$/,'')==''){
    alert('密码问题不能留空！');
    return false;
  }
  if(theForm.password_answer.value.replace(/^[\s\r\n]+|[\s\r\n]+$/,'')==''){
    alert('密码答案不能留空！');
	theForm.password_answer.focus();
    return false;
  }
  if(theForm.email.value.replace(/^[\s\r\n]+|[\s\r\n]+$/,'')==''){
    alert('email不能留空！');
	theForm.email.focus();
    return false;
  }
  if(!theForm.email.value.match(/^[\w\.\-]+@[\w\-]+\.[\w\.]+$/)){
    alert('email填：xxx@xxx.xxx(.xx) 格式');
	theForm.email.focus();
    return false;
  }
  if(theForm.imcode.value.replace(/^[\s\r\n]+|[\s\r\n]+$/,'')==''){
    alert('验证码不能留空！');
	theForm.imcode.focus();
    return false;
  }
  if(theForm.imcode.value.replace(/^[\s\r\n]+|[\s\r\n]+$/,'')!=getCookie('regimcode')){
    alert('验证码不符！');
	theForm.imcode.focus();
    return false;
  }
  if(theForm.m!=null && theForm.m.value==1 && $('sendFrame')!=null){
    theForm.target='sendFrame';
  }else{
    theForm.target='_self';
  }

  addSubmitSafe();
  return true;
}

//过滤禁止字符
function chkWord(obj){
  if(obj.value.match(/[\s\"\'\\]+/)){
    alert('所填内容不能含 空格 及 \' " \\ ');
    obj.value=obj.value.replace(/[\s\"\'\\]+/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>
<?php
if ($web['siteclose'] > 1) {
  @include ('inc/require/siteclose_why.txt');
}
?>
<div id="logo"><a href="./"><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>用户名——请用汉字、数字、英文及字符 _ 或 . 组成！长度范围为3-45字符。<span class="grayword">注：中文占3个字符，其它等占1个。即：纯中文可输入15字，英文或数字或英语符号可输入45字。</span></li>
      <li>密码——长度请控制在3-30个字符之内。不能有空格和 \ ，应尽量设置繁杂点以保证安全。</li>
      <li>密码问题——便于您密码找回时使用。</li>
      <li>邮箱——请真实有效地填写，这将非常重要。</li>
      <li>不能留空。每项必填。</li>
    </ul></td>
    <td valign="top" class="rightmenu"><form action="member.php?post=reg" method="post" name="regform" id="regform" onsubmit="return postChk(this)">
      <table width="100%" border="0" cellpadding="0" cellspacing="5">
        <tr>
          <td width="150" style="text-align:right" class="grayword">当前设置：</td>
          <td align="left">
            <?php
$date_eval = $disabled = '';
  if (is_numeric($web['reg_to_send']) && $web['reg_to_send'] > 0) {
    $date_eval = '<div style="font-size:12px; color:gray;">同时设定：新注册成员'.$web['reg_to_send'].'秒（'.round($web['reg_to_send'] / 3600, 2).'小时）之后才能发表';
  }

if ($web['stop_reg'] == 1) {
  $disabled = ' disabled';
  echo '<span style="color:#FF6600; font-weight:bold;">× 关闭新用户注册</span>';
} elseif ($web['stop_reg'] == 2) {
  echo '<span style="color:#FFD891; font-weight:bold;">⊙ 注册需审核</span>';
  echo $date_eval;
} else {
  echo '<span style="color:#66CC99; font-weight:bold;">√ 开放注册</span>';
  echo $date_eval;
}


?>          </td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">用户名：</td>
          <td align="left"><input class="large" name="username" type="text" onpropertychange="chkWord(this)" oninput="chkWord(this)" style="width:200px" maxlength="40"<?php echo $disabled; ?> /></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="40"<?php echo $disabled; ?> /></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">重输密码：</td>
          <td align="left"><input class="large" name="password_again" type="password" onpropertychange="chkWord(this)" oninput="chkWord(this)" style="width:200px" maxlength="40"<?php echo $disabled; ?> /></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">密码找回问题：</td>
          <td align="left">
                  <select name="password_question" <?php echo $disabled; ?>>
                    <option value="">请选择</option>
                    <option value="1">您的宠物的名字</option>
                    <option value="2">您就读的第一所学校的名字</option>
                    <option value="3">您最喜欢的休闲运动是什么</option>
                    <option value="4">您最喜欢的运动员是谁</option>
                    <option value="5">您的体重是多少公斤</option>
                    <option value="6">您其中一位老师的名字</option>
                    <option value="7">您的身高是多少CM</option>
                  </select>
            </td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">答案：</td>
          <td align="left"><input class="large" name="password_answer" type="text" onpropertychange="chkWord(this)" oninput="chkWord(this)" style="width:200px"<?php echo $disabled; ?> /></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">邮箱：</td>
          <td align="left"><input class="large" name="email" type="text" style="width:200px" onpropertychange="chkWord(this)" oninput="chkWord(this)" maxlength="200"<?php echo $disabled; ?> /></td>
        </tr>
        <tr>
          <td width="150" style="text-align:right">注：</td>
          <td align="left">若使用无效的邮箱注册，你的用户名及所发布的信息将被全部删除</td>
        </tr>
        <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" 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>
      </table>
<iframe id="sendFrame" name="sendFrame" frameborder="0" style="width:100%;height:30px;display:none;"></iframe>
      <table width="100%" border="0" cellpadding="0" cellspacing="5">
        <tr>
          <td width="150" style="text-align:right"><input name="location" type="hidden" value="<?php echo htmlspecialchars($_SERVER['HTTP_REFERER']); ?>" /></td>
          <td align="left"><button class="large" id="submit" name="submit" type="submit"<?php echo $disabled; ?>><b>注册</b></button>
            <button class="large" type="reset"<?php echo $disabled; ?>><b>重置</b></button></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 type="hidden" name="act" value="reg" /><input type="hidden" name="m" id="m" value="1" />
    </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();
?>