<!-- $Id: user_info.htm 15059 2008-10-25 06:01:50Z testyang $ -->
{include file="pageheader.htm"}
<div class="main-div">
<form method="post" action="users.php" name="theForm" onsubmit="return validate()">
<table width="100%" >
  <tr>
    <td class="label">{$lang.username}:</td>
    <td>{if $form_action eq "update"}{$user.user_name}<input type="hidden" name="username" value="{$user.user_name}" />{else}<input type="text" name="username" maxlength="60" value="{$user.user_name}" />{$lang.require_field}{/if}</td>
  </tr>
  {if $form_action eq "update"}
  <tr>
    <td class="label">{$lang.user_money}:</td>
    <td>{$user.formated_user_money} <a href="account_log.php?act=list&user_id={$user.user_id}&account_type=user_money">[ {$lang.view_detail_account} ]</a> </td>
  </tr>
  <tr>
    <td class="label">{$lang.frozen_money}:</td>
    <td>{$user.formated_frozen_money} <a href="account_log.php?act=list&user_id={$user.user_id}&account_type=frozen_money">[ {$lang.view_detail_account} ]</a> </td>
  </tr>
  <tr>
    <td class="label"><a href="javascript:showNotice('noticeRankPoints');" title="{$lang.form_notice}"><img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}"></a> {$lang.rank_points}:</td>
    <td>{$user.rank_points} <a href="account_log.php?act=list&user_id={$user.user_id}&account_type=rank_points">[ {$lang.view_detail_account} ]</a> <br /><span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticeRankPoints">{$lang.notice_rank_points}</span></td>
  </tr>
  <tr>
    <td class="label"><a href="javascript:showNotice('noticePayPoints');" title="{$lang.form_notice}"><img src="images/notice.gif" width="16" height="16" border="0" alt="{$lang.form_notice}" /></a> {$lang.pay_points}:</td>
    <td>{$user.pay_points} <a href="account_log.php?act=list&user_id={$user.user_id}&account_type=pay_points">[ {$lang.view_detail_account} ]</a> <br />
        <span class="notice-span" {if $help_open}style="display:block" {else} style="display:none" {/if} id="noticePayPoints">{$lang.notice_pay_points}</span></td>
  </tr>
  {/if}
  <tr>
    <td class="label">{$lang.email}:</td>
    <td><input type="text" name="email" maxlength="60" size="40" value="{$user.email}" />{$lang.require_field}</td>
  </tr>
  {if $form_action eq "insert"}
  <tr>
    <td class="label">{$lang.password}:</td>
    <td><input type="password" name="password" maxlength="20" size="20" />{$lang.require_field}</td>
  </tr>
  <tr>
    <td class="label">{$lang.confirm_password}:</td>
    <td><input type="password" name="confirm_password" maxlength="20" size="20" />{$lang.require_field}</td>
  </tr>
  {/if}
  <tr>
    <td class="label">{$lang.user_rank}:</td>
    <td><select name="user_rank">
      <option value="0">{$lang.not_special_rank}</option>
      {html_options options=$special_ranks selected=$user.user_rank}
    </select></td>
  </tr>
  <tr>
    <td class="label">{$lang.gender}:</td>
    <td>{html_radios name="sex" options=$lang.sex checked=$user.sex }</td>
  </tr>
  <tr>
    <td class="label">{$lang.birthday}:</td>
    <td>{html_select_date field_order="YMD" prefix="birthday" time=$user.birthday start_year="-60" end_year="+1" display_days=true month_format="%m"}</td>
  </tr>
  <tr>
    <td class="label">{$lang.credit_line}:</td>
    <td><input name="credit_line" type="text" id="credit_line" value="{$user.credit_line}" size="10" /></td>
  </tr>
  {if $user.parent_id}
  <tr>
    <td class="label">{$lang.parent_user}:</td>
    <td><a href="users.php?act=edit&id={$user.parent_id}">{$user.parent_username}</a>&nbsp;&nbsp;&nbsp;&nbsp;<a href="users.php?act=remove_parent&id={$user.user_id}">{$lang.parent_remove}</a></td>
  </tr>
  {/if}
  <tr>
    <td class="label">{$lang.msn}:</td>
    <td><input type="text" name="other[msn]" maxlength="60" size="40" value="{$user.msn}" /></td>
  </tr>
    </tr>
  <tr>
    <td class="label">{$lang.qq}:</td>
    <td><input type="text" name="other[qq]" maxlength="60" size="40" value="{$user.qq}" /></td>
  </tr>
    </tr>
  <tr>
    <td class="label">{$lang.office_phone}:</td>
    <td><input type="text" name="other[office_phone]" maxlength="60" size="40" value="{$user.office_phone}" /></td>
  </tr>
    </tr>
  <tr>
    <td class="label">{$lang.home_phone}:</td>
    <td><input type="text" name="other[home_phone]" maxlength="60" size="40" value="{$user.home_phone}" /></td>
  </tr>
    </tr>
  <tr>
    <td class="label">{$lang.mobile_phone}:</td>
    <td><input type="text" name="other[mobile_phone]" maxlength="60" size="40" value="{$user.mobile_phone}" /></td>
  </tr>
  <tr>
    <td colspan="2" align="center">
      <input type="submit" value="{$lang.button_submit}" class="button" />
      <input type="reset" value="{$lang.button_reset}" class="button" />
      <input type="hidden" name="act" value="{$form_action}" />
      <input type="hidden" name="id" value="{$user.user_id}" />    </td>
  </tr>
</table>

</form>
</div>
{insert_scripts files="../js/utils.js,validator.js"}
{literal}
<script language="JavaScript">
<!--

if (document.forms['theForm'].elements['act'] == "insert")
{
  document.forms['theForm'].elements['username'].focus();
}
else
{
  document.forms['theForm'].elements['email'].focus();
}

onload = function()
{
    // 开始检查订单
    startCheckOrder();
}

/**
 * 检查表单输入的数据
 */
function validate()
{
    validator = new Validator("theForm");
    validator.isEmail("email", invalid_email, true);

    if (document.forms['theForm'].elements['act'].value == "insert")
    {
        validator.required("username",  no_username);
        validator.required("password", no_password);
        validator.required("confirm_password", no_confirm_password);
        validator.eqaul("password", "confirm_password", password_not_same);
    }

    return validator.passed();
}
//-->
</script>
{/literal}
{include file="pagefooter.htm"}
