<?php include mayi_tpl("owenjq");?>
<script type="text/javascript" src="../include/datepicker/datepicker.js"></script>
<link rel="stylesheet" href="../include/datepicker/ui.css">
<script language='javascript'>
$(function(){
	$("#datepicker1").datepicker();
});
function checkSubmit()
{
	 if(document.form1.userid.value==""){
	     alert("用户名不能为空！");
	     document.form1.userid.focus();
	     return false;
     }
     return true;
}
</script>
<?php if($part == 'add'){?>
<div id="<?=MPS_SOFTNAME?>" style=" padding-bottom:0">
    <div class="mpstopic-category">
        <div class="panel-tab">
            <ul class="tab-list">
                
                <li><a href="?part=add" <?php if(!$if_corp){?>class="current"<?php }?>>增加个人用户</a></li>
                <li><a href="?part=add&if_corp=1" <?php if($if_corp == 1){?>class="current"<?php }?>>增加企业用户</a></li>
                
            </ul>
        </div>
    </div>
</div>
</div>
</div>
<div class="clearfix"></div>
<div class="mainmain">
<?php }?>
<div style="display:none;">
<iframe width=0 height=0 src='' id="iframe_city" name="iframe_city"></iframe> 
<iframe width=0 height=0 src='' id="iframe_area" name="iframe_area"></iframe> 
<iframe width=0 height=0 src='' id="iframe_street" name="iframe_street"></iframe> 
<form method="post" target="iframe_city" id="form_city"></form>
<form method="post" target="iframe_area" id="form_area"></form>
<form method="post" target="iframe_street" id="form_street"></form>
</div>
<form name="form1" action="member.php?do=member&part=<?=$action?>" enctype="multipart/form-data" method="post" onSubmit="return checkSubmit();">
<?php if ($part == 'edit'){ ?>
<input type="hidden" name="id" value="<?=$id?>" />
<input type="hidden" name="if_corp" value="<?=$edit['if_corp']?>" />
<input type="hidden" name="old_logo" value="<?=$edit['logo']?>" />
<input type="hidden" name="old_prelogo" value="<?=$edit['prelogo']?>" />
<?php } ?>
<div id="<?=MPS_SOFTNAME?>">
<table width="100%"  border="0" cellspacing="0" cellpadding="0" class="vbm">
	<tr class="firstr">
		<td colspan="2">帐号信息</td>
	</tr>
            <tr>
                <td align="right" valign="top">选择上传的图片：</td>
                <td>
                <script type="text/javascript">var MagicUploadName = 'mymps_member_logo';var oldimg = '<?=$edit['prelogo']?>';</script>
                <div id="ShowMagicUpload"></div>
				<div class="clear"></div>
                <div class="magic-notice">
                  支持上传的类型：jpg,gif,png，建议尺寸：<?=$mymps_mymps[cfg_memberlogo_limit][width]?> * <?=$mymps_mymps[cfg_memberlogo_limit][height]?>
				</div>
                <script type="text/javascript" src="../template/global/magic-upload.js"></script>
                </td>
              </tr>
    <?php if($edit){?>
    <tr bgcolor="#ffffff">
      <td height="30">用户ID：</td>
      <td><font color="red"><?=$edit[id]?></font> 注册时间：<u><?php echo GetTime($edit['jointime'],'Y-m-d H:i:s')?></u>，上次登录：<u><?php echo GetTime($edit['logintime'],'Y-m-d H:i:s')?></td>
     </tr>
     <?php }?>
     <tr bgcolor="#ffffff">
      <td height="30">用户帐号<font color="red">(*)</font>：</td>
      <td><input name="userid" type="text" class="text" value="<?=$edit[userid]?>"/> <?php if($edit){?>【非必要，请勿修改<font color="red"><b>特别是整合其他系统（如：ucenter）之后</b></font>】<?php }?></td>
     </tr>
      <tr bgcolor="#ffffff">
        <td width="16%" height="30">用户姓名：</td>
        <td width="84%">
        <input name="cname" type="text" class="text" value="<?=$edit[cname]?>"/>
        </td>
      </tr>
<tr bgcolor="#ffffff">
      <td height="30">个人身份证认证：</td>
      <td>
      <select name="per_certify">
      	<option value="1" <?php if($edit['per_certify'] == 1) echo 'selected style="background-color:#6EB00C;color:white"';?>>通过验证</option>
        <option value="0" <?php if(empty($edit['per_certify'])) echo 'selected style="background-color:#6EB00C;color:white"';?>>未通过验证</option>
      </select></td>
    </tr>
<tr bgcolor="#ffffff">
      <td height="30">手机短信认证：</td>
      <td>
      <select name="sj_certify">
      	<option value="1" <?php if($edit['sj_certify'] == 1) echo 'selected style="background-color:#6EB00C;color:white"';?>>通过验证</option>
        <option value="0" <?php if(empty($edit['sj_certify'])) echo 'selected style="background-color:#6EB00C;color:white"';?>>未通过验证</option>
      </select></td>
    </tr>
 <tr bgcolor="#ffffff">
      <td height="30">拥有金币：<font color="red">(*)</font></td>
      <td><input name="money_own" type="text" class="txt" value="<?=$edit[money_own]?>"/> <img src="../member/images/mymps_icon_incomes.gif" align="absmiddle"></td>
    </tr>
    <tr bgcolor="#ffffff">
      <td height="30">积分：<font color="red">(*)</font></td>
      <td><input name="score" type="text" class="txt" value="<?=$edit[score]?>"/></td>
    </tr>
    <tr bgcolor="#ffffff">
      <td height="30">信用值：<font color="red">(*)</font></td>
      <td><input name="credit" type="text" class="txt" value="<?=$edit[credit]?>"/> 
	  <?php if($edit[credits]){?>
	  <img src="../images/credit/<?=$edit[credits]?>.gif" align="absmiddle">
	  <?php } ?>
	  </td>
    </tr>
    <tr bgcolor="#ffffff">
            <td height="30">所在用户组：<font color="red">(*)</font></td>
            <td>
				<?php echo get_member_level($edit[levelid]);?>
                【<a href="member.php?do=group">设置用户组权限</a>】
		    </td>
        </tr>
            <tr bgcolor="#ffffff">
        <td height="30">会员组到期时间：</td>
        <td>
            <input id="datepicker1" name="levelup_time" type="text" class="text" value="<?=GetTime($edit[levelup_time],'Y-m-d')?>"/>
        </td>
    </tr>
    <tr bgcolor="#ffffff">
      <td height="30">登录密码：<font color="red">(*)</font></td>
      <td><input name="userpwd" type="text" class="text" /> <?php if($part == 'edit'){?>【若不修改请留空】<?php }?></td>
    </tr>
	<tr class="firstr">
      <td height="30" colspan="2">联系方式</td>
    </tr>
    <tr bgcolor="#ffffff">
        <td height="30">电子邮箱：<font color="red">(*)</font></td>
        <td>
            <input name="email" type="text" class="text" value="<?=$edit[email]?>"/>
        </td>
    </tr>
    <tr bgcolor="#ffffff">
        <td height="30">手机号码：<font color="red">(*)</font></td>
        <td>
            <input name="mobile" type="text" class="text" value="<?=$edit[mobile]?>"/> <?php echo $edit[sj_certify]==1?"<font color=green>已认证，请勿修改</font>":"<font color=red>未认证</font>";?>
        </td>
    </tr>
    <?php if(!$admin_cityid){?>
  <tr bgcolor="#ffffff">
    <td>所属地区：<font color="red">(*)</font></td>
    <td>
		<?php echo select_where_option($mymps_global['SiteUrl'].'/include/selectwhere.php?',$edit['cityid'],$edit['areaid'],$edit['streetid']); ?>
	</td>
  </tr>
  <?php }else{ ?>
  <input name="cityid" value="<?php echo $admin_cityid?>" type="hidden" />
  <?php }?>
  <tr class="firstr">
		<td colspan="2">审核状态</td>
	</tr>
    <tr bgcolor="#ffffff">
      <td height="30">用户状态：</td>
      <td>
      <input id="status0" name="status" type="radio" class="magic-radio" value=0 <?php if(!$edit['status']){?>checked<?php }?>><label for="status0">待审核</label>
      <input id="status1" name="status" type="radio" class="magic-radio" value=1 <?php if($edit['status']==1){?>checked<?php }?>><label for="status1">正常</label>
      <input id="status2" name="status" type="radio" class="magic-radio" value=2 <?php if($edit['status']==2){?>checked<?php }?>><label for="status2">黑名单</label>
      </td>
    </tr>
</table>
</div>
<center>
<input type="button" onClick="window.open('..<?=$admindir?>/?mayicms=power&userid=<?=$edit['userid']?>&password=<?php echo $edit['userpwd']; ?>')" value="进入他的后台" class="gray large">&nbsp;&nbsp;
<input type="submit" class="mymps large" value="提 交"> &nbsp;&nbsp;
<input type="button" onClick="location.href='member.php?page=<?=$page?>'"  class="gray large" value="返 回"></center>
</form>
<?php include mayi_tpl('owenbt');?>