<?php
# Subroutine: adm_logon.php called by Admin.php
# Xinfeng Chen, 2002.11.18

require_once('bin/config.php');
require_once('admin/adm.inc');

#--- Validate dministrator ---
include('admin/adm_validate.php');
// Now got the flag of $adm_validated

#--- Start Processing ---
$msg=($adm_validated) ?
 '您已经通过身份验证，<BR><BR>请点击左侧菜单项进入相应功能。' :
 '您尚未通过身份验证，请输入用户与口令登录。';

page_header();

print <<<EOT
<h1>登录管理中心</h1>
<p>进行身份验证，进入管理中心</p>
<center>
<table border=1 width=100% cellpadding=6>
<tr><td width=100% align=center>
<b><font color=FF6633>$msg</font></b>
</td></tr></table>
EOT;

if(!$adm_validated){
 print <<<EOT
<form name=form method=POST action=admin.php>
<input type=hidden name=cmd value=welcome>
<table border="0" width=60% class="forumline">
<tr><th colspan=2 class="thHead">管理员登录</th></tr>
<tr><td width="40%" align=center class="row1">管理员名字：</td>
<td width="60%" class="row2"><input name=f_admname></td></tr>
<tr><td width="40%" align=center class="row1">管理员密码：</td>
<td width="60%" class="row3"><input name=f_admpass type=password></td></tr>
<tr><td colspan=2 align=center class="catBottom">
<input type="submit" value="登　录">
</td></tr>
</table></form></center>
<script language="JavaScript">document.form.f_admname.focus();</script>
EOT;
}

page_footer();

?>