{include file="public/joinin_header" /}

<div class="banner">
  <div class="user-box">
      {if condition="$Think.session.is_login eq '1'"}
    <div class="user-joinin">
      <h3>亲爱的：{$Think.session.member_name}</h3>
      <dl>
        <dt>{$Think.lang.welcome_to_site}{$Think.config.site_name}</dt>
        <dd> 若您还没有填写入驻申请资料<br/>
          请点击“<a href="{:url('/Home/Sellerjoinin/step0')}" target="_blank">我要入驻</a>”进行入驻资料填写</dd>
        <dd>若您的店铺还未开通<br/>
          请通过“<a href="{:url('/Home/Sellerjoinin/index')}" target="_blank">查看入驻进度</a>”了解店铺开通的最新状况 </dd>
      </dl>
      <div class="bottom"><a href="{:url('/Home/Sellerjoinin/step0')}" target="_blank">我要入驻</a><a href="{:url('/Home/Sellerjoinin/index')}" target="_blank">查看入驻进度</a></div>
    </div>
    {else/}
    <div class="user-login">
      <h3>商务登录<em>（使用已注册的会员账号）</em></h3>
      <form id="login_form" action="{:url('/Home/Login/login')}" method="post">
        <input type="hidden" name="form_submit" value="ok" />
        <dl>
          <dt>{$Think.lang.login_index_username}：</dt>
          <dd>
            <input type="text" class="text" autocomplete="off"  name="member_name" id="user_name">
            <label></label>
          </dd>
        </dl>
        <dl>
          <dt>{$Think.lang.login_index_password}：</dt>
          <dd>
            <input type="password" class="text" name="member_password" autocomplete="off"  id="password">
            <label></label>
          </dd>
        </dl>
        <?php if(config('captcha_status_login') == '1') { ?>
        <dl>
          <dt>{$Think.lang.login_index_checkcode}：</dt>
          <dd>
            <input type="text" name="captcha" class="text w50 fl" id="captcha" maxlength="4" size="10" />
            <a href="JavaScript:void(0);" onclick="javascript:document.getElementById('codeimage').src='{:url('seccode/makecode')}';" class="change" >
            <img src="{:url('seccode/makecode')}" class="fl ml5" name="codeimage" id="codeimage" border="0"/></a>
            <label></label>
          </dd>
        </dl>
        <?php } ?>
        <dl>
          <dt></dt>
          <dd>
            <input type="hidden" value="Showjoinin/index" name="ref_url">
            <input name="提交" type="submit" class="button" value="登&nbsp;&nbsp;录">
            <a href="{:url('/Home/Login/forget_password')}" target="_blank">{$Think.lang.login_index_forget_password}</a></dd>
        </dl>
      </form>
      <div class="register">还没有成为我们的合作伙伴？ <a href="{:url('/Home/Login/register')}" target="_blank">快速注册</a></div>
    </div>
     {/if}
  </div>
  <ul id="fullScreenSlides" class="full-screen-slides">
    <?php $pic_n = 0;?>
    <?php if(!empty($pic_list) && is_array($pic_list)){ ?>
    <?php foreach($pic_list as $key => $val){ ?>
    <?php if(!empty($val)){ $pic_n++; ?>
    <li style="background-color: #F1A595; background-image: url(<?php echo UPLOAD_SITE_URL.'/'.ATTACH_COMMON.'/'.$val;?>)" ></li>
    <?php } ?>
    <?php } ?>
    <?php } ?>
  </ul>
</div>
<div class="indextip">
  <div class="container"> <span class="title"><i></i>
    <h3>贴心提示</h3>
    </span> <span class="content"><?php echo $show_txt;?></span></div>
</div>
<div class="main mt30">
  <h2 class="index-title">入驻流程</h2>
  <div class="joinin-index-step"><span class="step"><i class="a"></i>签署入驻协议</span><span class="arrow"></span><span class="step"><i class="b"></i>商家信息提交</span><span class="arrow"></span><span class="step"><i class="c"></i>平台审核资质</span><span class="arrow"></span><span class="step"><i class="d"></i>商家缴纳费用</span><span class="arrow"></span><span class="step"><i class="e"></i>店铺开通</span></div>
  <h2 class="index-title">入驻指南</h2>
  <div class="joinin-info">
    <ul class="tabs-nav">
      <?php if(!empty($output['help_list']) && is_array($output['help_list'])){ $i = 0;?>
      <?php foreach($output['help_list'] as $key => $val){ $i++;?>
      <li class="<?php echo $i==1 ? 'tabs-selected':'';?>">
        <h3><?php echo $val['help_title'];?></h3>
      </li>
      <?php } ?>
      <?php } ?>
    </ul>
      <?php if(!empty($output['help_list']) && is_array($output['help_list'])){ $i = 0;?>
      <?php foreach($output['help_list'] as $key => $val){ $i++;?>
    <div class="tabs-panel <?php echo $i==1 ? '':'tabs-hide';?>"><?php echo $val['help_info'];?></div>
      <?php } ?>
      <?php } ?>
  </div>
</div>
<script>
$(document).ready(function(){
	$("#login_form ").validate({
        errorPlacement: function(error, element){
            var error_td = element.parent('dd');
            error_td.find('label').hide();
            error_td.append(error);
        },
		rules: {
			user_name: "required",
			password: "required"
			<?php if(config('captcha_status_login') == '1') { ?>
            ,captcha : {
            required : true,
                minlength: 4,
                remote   : {
                url : '{:url('seccode/check')}',
                    type: 'get',
                    data:{
                    captcha : function(){
                        return $('#captcha').val();
                    }
                },
                complete: function (data) {
                    if (data.responseText == 'false') {
                        document.getElementById('codeimage').src = '{:url('Seccode/makecode')}';
                    }
                }
            }
        }
			<?php } ?>
		},
		messages: {
			user_name: "{$Think.lang.login_index_input_username}",
			password: "{$Think.lang.login_index_input_password}"
			<?php if(config('captcha_status_login') == '1') { ?>
            ,captcha : {
                required : '{$Think.lang.login_index_input_checkcode}',
                    remote: '{$Think.lang.login_index_input_checkcode}'
            }
			<?php } ?>
		}
	});
});
</script>
<?php if( $pic_n > 1) { ?>

<?php }else { ?>
<script>
$(document).ready(function(){
    $(".tabs-nav > li > h3").bind('mouseover', (function(e) {
    	if (e.target == this) {
    		var tabs = $(this).parent().parent().children("li");
    		var panels = $(this).parent().parent().parent().children(".tabs-panel");
    		var index = $.inArray(this, $(this).parent().parent().find("h3"));
    		if (panels.eq(index)[0]) {
    			tabs.removeClass("tabs-selected").eq(index).addClass("tabs-selected");
    			panels.addClass("tabs-hide").eq(index).removeClass("tabs-hide");
    		}
    	}
    }));
});
</script>
<?php } ?>
{include file="public/mall_footer" /}