<? if (!defined('ROOT')) exit('Can\'t Access !'); ?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title><?=$this->title?></title>
<meta name="keywords" content="<?=$this->keywords?>" />
<meta name="description" content="<?=$this->description?>" />
<link rel="stylesheet" href="<?=$this->tempdir?>images/header.css" type="text/css" />
<link rel="stylesheet" href="<?=$this->tempdir?>images/member.css" type="text/css" />
<script type="text/javascript" src="<?=$this->tempdir?>images/member.js" ></script>
<script type="text/javascript" src="<?=$this->appdir?>jquery.js" ></script>
<script type="text/javascript" src="<?=$this->appdir?>public.js" ></script>
<script type="text/javascript" src="<?=$this->appdir?>kindeditor/kindeditor.js" ></script>
</head>
<body>
<? include template('member_header','wjgw/member'); ?>
<div id="container" class="win1000">
  <div class="wraper-border"></div>
  <div id="wraper" class="clearfix"> 
<? include template('member_left','wjgw/member'); ?>
    <div id="right-con-user" class="right">
      <div id="details" class="clearfix">
<ul id="details-ul" class="clearfix">
          <li <? if($this->type=='basic') { ?>class="hover"<? } ?>><a href="<?=Purl('member_profile')?>">基本资料</a></li>       
          <? if($this->member['groupid']==4) { ?>
          <li <? if($this->type=='company') { ?>class="hover"<? } ?>><a href="<?=$this->companyurl?>">商户资料</a></li>
          <? } ?>          
        </ul>
      </div>
      <div> 
       <? if($this->type=='basic') { ?>
       <form id="subform" name="subform" method="post" enctype="multipart/form-data" action="">
        <table class="grinfo">
          <tbody>
            <tr>
              <th>您的用户名：</th>
              <td><strong><?=$this->member['username']?></strong></td>
            </tr>
            <tr>
              <th><span class="red">*</span> 真实姓名：</th>
              <td>
                 <strong><?=$this->member['truename']?></strong>
                 <? if($this->member[idcard]=='') { ?>
                   <a href="<?=Purl("?mod=member&act=auth&type=realname"); ?>">马上进行实名认证</a>
                 <? } else { ?>
                   <strong>(<?=$this->member['idcard']?>)</strong> <img align="absmiddle" src="<?=$this->tempdir?>images/icoshenfen.gif">
                 <? } ?>
              </td>
            </tr>
            <tr>
              <th><span class="red">*</span> 手机号码：</th>
              <td>
                 <strong><?=$this->member['userphone']?></strong>
                 <? if($this->member[mcheck]==1) { ?>
                   <img align="absmiddle" src="<?=$this->tempdir?>images/icotel.gif"> <a href="#" onclick="javascrip:alert('暂不支持修改');">修改</a>    
                 <? } else { ?>
                   <a href="<?=Purl("?mod=member&act=auth&type=mobile"); ?>">马上进行手机认证</a>
                 <? } ?>
               </td>
            </tr>
            
            <tr>
              <th><span class="red">*</span> 电子邮件：</th>
              <td>
                 <strong><?=$this->member['email']?></strong>
                 <? if($this->member[echeck]==1) { ?>
                   <img align="absmiddle" src="<?=$this->tempdir?>images/icomail2.gif"> <a href="#" onclick="javascrip:alert('暂不支持修改');">修改</a>    
                 <? } else { ?>
                   <a href="<?=Purl("?mod=member&act=auth"); ?>">马上进行邮箱认证</a>
                 <? } ?>
               </td>
            </tr>
            
            
            <tr>
              <th><span class="red">*</span> 所在区域：</th>
              <td>
<script type="text/javascript" src="<?=$this->appdir?>area.js"></script>
<select id="s_province" name="s_province" disabled="disabled"></select>&nbsp;&nbsp;
<select id="s_city" name="s_city" disabled="disabled"></select>&nbsp;&nbsp;
<select id="s_county" name="s_county" disabled="disabled"></select>
<script type="text/javascript">
var s=["s_province","s_city","s_county"];
var opt0 = ["<?=$this->member['s_province']?>","<?=$this->member['s_city']?>","<?=$this->member['s_county']?>"];//初始值
_init_area();    
</script><span id="s_countytip">&nbsp;&nbsp;如要修改区域，请联系管理员</span></td>
            </tr>
            <tr>
              <th valign="top">联系地址：</th>
              <td><input type="text"  class="inw inp" id="address" name="address" value="<?=$this->member['address']?>"></td>
            </tr>
            <tr>
              <th>&nbsp;</th>
              <td colspan="2"><label class="butt" id="butt">
                  <?=config::form('submit','完成修改','submit','','class=\'btns\'');?>
                </label></td>
            </tr>
          </tbody>
        </table>
      </form>
        <? } ?>
        
        
        
        <? if($this->type=='company') { ?>
        <form id="subform" name="subform" method="post" enctype="multipart/form-data" action="">
          <div class="uppwd">
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;商家名称</dt>
              <dd>
                <?=config::form('name',$this->company['name'],'input','','class=\'inw inp\'');?></dd>
            </dl>  
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;商家地址</dt>
              <dd>
                <?=config::form('address',$this->company['address'],'input','','class=\'inw inp\'');?>
                <span id="useragetip"> </span></dd>
            </dl>  
                      
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;联系人</dt>
              <dd>
                <?=config::form('person',$this->company['person'],'input','','class=\'inw inp\'');?>   
                <span id="userphonetip"></span></dd>
            </dl>
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;联系电话</dt>
              <dd>
                <?=config::form('telphone',$this->company['telphone'],'input','','class=\'inw inp\'');?>   
                <span id="useragetip"> </span></dd>
            </dl>
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;所属分类</dt>
              <dd>
                <?=config::form('typeid',$this->company['typeid'],'select',$this->typelist);?>
                <span id="useragetip"> </span></dd>
            </dl>
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;所属地区</dt>
              <dd>
<select id="s_province" name="s_province"></select>&nbsp;&nbsp;
    <select id="s_city" name="s_city" ></select>&nbsp;&nbsp;
    <select id="s_county" name="s_county"></select>
    <script type="text/javascript" src="<?=$this->appdir?>area.js"></script>
    <script type="text/javascript">
<? if($this->company['s_county']) { ?>
var opt0 = ["<?=$this->company['s_province']?>","<?=$this->company['s_city']?>","<?=$this->company['s_county']?>"];//初始值
<? } else { ?>
var opt0 = ["省份","地级市","市、县级市"];//初始值
<? } ?>
_init_area();
    
    </script>
                <span id="useragetip"> </span></dd>
            </dl>
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;详细介绍</dt>
              <dd>
               <?=config::form('content',$this->company['content'],'editor','0','<1@1>');?>
                <span id="useragetip"> </span></dd>
            </dl>
            
            
            <dl class="clearfix">
              <dt><span class="red">*</span>&nbsp;缩略图片</dt>
              <dd><font color="#FF3300">把第 <?=config::form('pics',$this->company['pics'],'input','','class=\'inw inp\' style=\'width:40px;\'');?> 张作为缩略图</font>
                <span id="useragetip"> </span></dd>
            </dl>
            
             
            <dl class="clearfix">
              <dt>&nbsp;</dt>
              <dd>
                <label class="butt" id="butt"> <?=config::form('submit','完成修改','submit','','class=\'btns\'');?> </label>
              </dd>
            </dl>
          </div>
        </form>
        <? } ?> 
        
     </div>
    </div>
  </div>
  <div class="wraper-border"></div>
</div>
<? include template('member_footer','wjgw/member'); ?>
<script language="javascript">
$("document").ready(function(){$("#<?=$this->action?>").addClass('open');});
</script>
</body></html>