<?php
#------------------------------------------------------#
#               本程序为zChain.net提供                 #
#                zChain论坛(ZBB)v2.00                  #
#------------------------------------------------------#
# INPUT[$FORM{}] : $action,$url,$f_user,$f_pass,$f_savepass;

require "bin/config.php";
require "bin/common.php";

require_once('core/class_forum_base.php');
CForumBase::setFileBase("$filepath");
require_once('core/base_memo_file.php');
require_once('core/class_user.php');

### User Validation ###
include('bin/validate.php');
if($action=="login"){
 if($f_user==""){errorview("请输入您的用户名称");}
 if($sv_user==''){errorview("对不起，此用户名/密码错误!");}

 if($url != ""){print "<script>document.location='$url';</script>";}
 else{print "<script>window.location='viewblist.php';</script>";}

 exit;
}

### Display Login Form ###
page_header('登录论坛',"$imgurl/bg.gif");
print "<CENTER>";
$posText=getRootText()." >> 登录论坛";
menu_bar($posText,$hpurl);

$isChecked=($ck_user)?'checked':'';
print <<<EOT
<br><br><br><br><br>
<form name=form method=post action=logon.php>
<input type=hidden name=action value=login>
<input type=hidden name=url value="$url">
<table cellSpacing=1 width=300 border=0 class="forumLine" cellpadding=5>
<tr>
 <td align="center" class="rowCaption" colspan="2">用户登录</td>
</tr>
<tr>
 <td colSpan="2" align="center" class="row1">
  用户名称: 　<input size="15" name="f_user" value="$ck_user" class="plain"><br>
  用户密码: 　<input type="password" size="15" value="$ck_pass" name="f_pass" class="plain"><br>
  <input type="checkbox" name="f_savepass" value="1" $isChecked>记住密码</td>
</tr>
<tr>
 <td colSpan="2" align="center" class="row2">
  <input type="submit" value=" 登录 " name="Submit"> 　 
  <input type="reset" value=" 取消 " name="Reset"></td>
</tr>
</table>
<table width=300 border=0 cellpadding=5>
<tr>
 <td align="center"><a href=zuser_reg.php>免费注册</a></td>
 <td align="center"><a href=zuser_pass.php>忘记密码</a></td>
</tr>
</table>
</form><br><a href=javascript:history.go(-1)>BACK</a>
</CENTER>
<script language="JavaScript">document.form.f_user.focus();</script>
EOT;

page_footer();
exit;

?>