{include file="public/header" /}
<div id="append_parent"></div>
<div id="ajaxwaitid"></div>



<div class="page">
    <div class="fixed-bar">
        <div class="item-title">
            <div class="subject">
                <h3>邮箱短信</h3>
                <h5></h5>
            </div>
            {include file="public/admin_items" /}
        </div>
    </div>
    
    <div class="explanation" id="explanation">
        <div class="title" id="checkZoom">
            <h4 title="提示相关设置操作时应注意的要点">操作提示</h4>
            <span id="explanationZoom" title="收起提示" class="arrow"></span>
        </div>
        <ul>
            <li>平台可给商家提供站内信、短消息、邮件三种通知方式。平台可以选择开启一种或多种通知方式供商家选择。</li>
            <li>开启强制接收后，商家不能取消该方式通知的接收。</li>
            <li>短消息、邮件需要商家设置正确号码后才能正常接收。</li>
        </ul>
    </div>
    
    <div class="ncap-form-default homepage-focus"  nctype="sellerTplContent">
        <h4>模板名称：<?php echo $mmtpl_info['mmt_name'];?></h4>
        <ul class="tab-menu">
            <li class="current">站内信模板</li>
            <li>手机短信模板</li>
            <li>邮件模板</li>
        </ul>
        
        <form class="tab-content" method="post" name="message_form" >
            <input type="hidden" name="code" value="<?php echo $mmtpl_info['mmt_code'];?>" />
            <input type="hidden" name="type" value="message" />
            <dl>
                <dt>站内信开关</dt>
                <dd>
                    <div class="onoff">
                        <label for="message_switch1" class="cb-enable {if condition="$mmtpl_info.mmt_message_switch eq 1"}selected{/if}">是</label>
                        <label for="message_switch0" class="cb-disable {if condition="$mmtpl_info.mmt_message_switch eq 0"}selected{/if}">否</label>
                        <input id="message_switch1" name="message_switch" value="1" type="radio" {if condition="$mmtpl_info.mmt_message_switch eq 1"} checked="checked"{/if}>
                        <input id="message_switch0" name="message_switch" value="0" type="radio" {if condition="$mmtpl_info.mmt_message_switch eq 0"} checked="checked"{/if}>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>消息内容</dt>
                <dd>
                    <textarea name="message_content" rows="6" class="tarea"><?php echo $mmtpl_info['mmt_message_content'];?></textarea>
                </dd>
            </dl>
            <dl>
                <dt></dt>
                <dd>
                    <input class="btn" type="submit" value="提交"/>
                </dd>
            </dl>
        </form>
        
        <form class="tab-content" method="post" name="short_form"  style="display:none;">
            <input type="hidden" name="code" value="<?php echo $mmtpl_info['mmt_code'];?>" />
            <input type="hidden" name="type" value="short" />
            <dl>
                <dt>站内信开关</dt>
                <dd>
                    <div class="onoff">
                        <label for="short_switch1" class="cb-enable {if condition="$mmtpl_info.mmt_short_switch eq 1"}selected{/if}">是</label>
                        <label for="short_switch0" class="cb-disable {if condition="$mmtpl_info.mmt_short_switch eq 0"}selected{/if}">否</label>
                        <input id="short_switch1" name="short_switch" value="1" type="radio" {if condition="$mmtpl_info.mmt_short_switch eq 1"} checked="checked"{/if}>
                        <input id="short_switch0" name="short_switch" value="0" type="radio" {if condition="$mmtpl_info.mmt_short_switch eq 0"} checked="checked"{/if}>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>消息内容</dt>
                <dd>
                    <textarea name="short_content" rows="6" class="tarea"><?php echo $mmtpl_info['mmt_short_content'];?></textarea>
                </dd>
            </dl>
            <dl>
                <dt></dt>
                <dd>
                    <input class="btn" type="submit" value="提交"/>
                </dd>
            </dl>
        </form>
        
        <form class="tab-content" method="post" name="mail_form"  style="display:none;">
            <input type="hidden" name="code" value="<?php echo $mmtpl_info['mmt_code'];?>" />
            <input type="hidden" name="type" value="mail" />
            <dl>
                <dt>邮件开关</dt>
                <dd>
                    <div class="onoff">
                        <label for="mail_switch1" class="cb-enable {if condition="$mmtpl_info.mmt_mail_switch eq 1"}selected{/if}">是</label>
                        <label for="mail_switch0" class="cb-disable {if condition="$mmtpl_info.mmt_mail_switch eq 0"}selected{/if}">否</label>
                        <input id="mail_switch1" name="mail_switch" value="1" type="radio" {if condition="$mmtpl_info.mmt_mail_switch eq 1"} checked="checked"{/if}>
                        <input id="mail_switch0" name="mail_switch" value="0" type="radio" {if condition="$mmtpl_info.mmt_mail_switch eq 0"} checked="checked"{/if}>
                    </div>
                </dd>
            </dl>
            <dl>
                <dt>邮件标题</dt>
                <dd>
                    <textarea name="mail_subject" rows="6" class="tarea"><?php echo $mmtpl_info['mmt_mail_subject'];?></textarea>
                </dd>
            </dl>
            <dl>
                <dt>邮件内容</dt>
                <dd>
                    <textarea name="mail_content" rows="6" class="tarea"><?php echo $mmtpl_info['mmt_mail_content'];?></textarea>
                </dd>
            </dl>
            <dl>
                <dt></dt>
                <dd>
                    <input class="btn" type="submit" value="提交"/>
                </dd>
            </dl>
        </form>
    </div>
</div>
<script>
$(function(){
    $('div[nctype="sellerTplContent"] > ul').find('li').click(function(){
        $(this).addClass('current').siblings().removeClass('current');
        var _index = $(this).index();
        var _form = $('div[nctype="sellerTplContent"]').find('form');
        _form.hide();
        _form.eq(_index).show();
    });
});
</script>