<?php 
defined('IN_HS') or exit('Access Denied');
include admintpl('header');
?>
<body>
<script LANGUAGE="javascript">
<!--
function CheckForm() {
    if (document.myform.username.value=="")
	{
	  alert("请输入用户名！")
	  document.myform.username.focus()
	  return false
	 }
    if (document.myform.password.value!="" && document.myform.pwdconfirm.value!=document.myform.password.value)
	{
	  alert("两次输入的密码不一致！")
      document.myform.password.value = ""
      document.myform.pwdconfirm.value = ""
	  document.myform.password.focus()
	  document.myform.password.select()
	  return false
	 }
    if (document.myform.email.value=="")
	{
	  alert("请输入在线时间！")
	  document.myform.email.focus()
	  return false
	 }
}
//-->
</script>
<table cellpadding="2" cellspacing="1" border="0" align="center" class="tableBorder">
   <tr>
	   <td class="tablerow">
	   <input type="button" class="btn" value="会员管理" onClick="javascript:location.href='?mod=<?=$mod?>&file=<?=$file?>&action=manage'">
	   </td>
   </tr>
</table>
<br>
<form name="myform" method="post" action="?mod=<?=$mod?>&file=<?=$file?>&action=edit&userid=<?=$userid?>" onSubmit='return CheckForm();'>
<table width='100%' border='0' cellpadding='0' cellspacing='0'>
<tr align='center' height='24'>
<td id='TabTitle0' class='title2' onclick='ShowTabs(0)'>基本资料</td>
<td id='TabTitle1' class='title1' onclick='ShowTabs(1)'>详细资料</td>
<td>　</td>
</tr>
</table>
<table cellpadding="2" cellspacing="1" class="tableborder">
  <tbody id='Tabs0' style='display:'>
    <th colspan=2>基本资料</th>
	  <tr>
    <td class="tablerow" width="20%" >主会员组：</td>
    <td class="tablerow">
<select name="groupid">
<?php 
foreach($groups as $id=>$group)
{
	$selected = $group['groupid'] == $groupid ? 'selected' : '';
	echo "<option value=\"{$group['groupid']}\" $selected>{$group['groupname']}</option>";
}
?>
</select> &nbsp;&nbsp;&nbsp;&nbsp;</td>
 </tr>
      <tr>
        <td width="20%" class="tablerow">用户名：          </td>
        <td width="80%" class="tablerow"><input name="username" type="text" id="username" size="15" value="<?=$username?>" disabled> 
        5到20个字符，不得包含非法字符！          </td>
      </tr>
      <tr>
        <td class="tablerow">密码(至少5位)：</td>
        <td class="tablerow"><input name="password" type="password" id="password" size="15"> 
        5到20个字符</td>
      </tr>
  <tr>
        <td class="tablerow">确认密码：</td>
        <td class="tablerow"><input name="pwdconfirm" type="password" id="pwdconfirm" size="15"></td>
      </tr>
      <tr>
        <tr>
        <td class="tablerow">资金变更：</td>
        <td class="tablerow"><input name="money" type="text" id="money" size="15" value="<?=$money?>"></td>
      </tr>
      <tr>
        <td class="tablerow">密码提示问题：</td>
        <td class="tablerow"><input name="question" type="text" id="question" size="20" value="<?=$question?>"></td>
      </tr>
      <tr>
        <td class="tablerow">问题答案：</td>
        <td class="tablerow"><input name="answer" type="text" id="answer" size="20" value="<?=$answer?>"></td>
      </tr>
      <tr>
        <td class="tablerow">Email地址：</td>
        <td class="tablerow"><input name="email" type="text" id="email" size="20" maxlength="50" value="<?=$email?>"></td>
      </tr>
</tbody>

<tbody id='Tabs1' style='display:none'>
  <th colspan=2>详细资料</th>
      <tr>
        <td class="tablerow">真实姓名：</td>
        <td class="tablerow"><input name="truename" type="text" id="truename" size="22" maxlength="50" value="<?=$truename?>"></td>
      </tr>
      <tr>
        <td class="tablerow">性别：</td>
        <td class="tablerow">
		<input name="gender" type="radio" style="border:0px" value="1" <?php if($gender==1){ ?> checked <?php } ?>> 男
        <input name="gender" type="radio" style="border:0px" value="0" <?php if($gender==0){ ?> checked <?php } ?>> 女</td>
      </tr>
      <tr>
        <td class="tablerow">证件类别：</td>
        <td class="tablerow">
		<select name="idtype">
			<option value="身份证" <?php if($idtype=="身份证"){ ?> selected <?php } ?>>身份证</option>
			<option value="学生证" <?php if($idtype=="学生证"){ ?> selected <?php } ?>>学生证</option>
			<option value="军人证" <?php if($idtype=="军人证"){ ?> selected <?php } ?>>军人证</option>
			<option value="护照" <?php if($idtype=="护照"){ ?> selected <?php } ?>>护照</option>
		</select>		</td>
      </tr>
      <tr>
        <td class="tablerow">证件号码：</td>
        <td class="tablerow"><input type=text name="idcard" size=22 maxlength=18 value="<?=$idcard?>"></td>
      </tr>
     <tr>
    <td class="tablerow">电话：</td>
    <td class="tablerow"><input name="telephone" type="text" id="telephone" size="22" value="<?=$telephone?>"></td>
    </tr>
	  <tr>
        <td class="tablerow">QQ号码：</td>
        <td class="tablerow"><input name="qq" type="text" id="qq" size="22" maxlength="20" value="<?=$qq?>"></td>
      </tr>
 </tbody>



</table>

<table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td align="center">
	<input type="submit" class="btn" name="dosubmit" value=" 修改 ">
      <input type="reset" class="btn" name="reset" value=" 清除 "></td>
  </tr>
</table>
</form>
</body>
</html>
