<!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 http-equiv="content-type" content="text/html; charset=UTF-8">
            <title>{{$lang.admin_title}}</title>
            <script type="text/javascript" src="{{$js_path}}global.js"></script>
            <script type="text/javascript" src="{{$admin_js_path}}admin.js"></script>
            <script type="text/javascript" src="{{$js_path}}transport.js"></script>
            <link href="{{$style_path}}main.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript">
                var fnChangeComment = function(cType, cValue, sViewId) {
                    cValue = encodeURIComponent(cValue);
                    Ajax.call('includes/transport.php?&act=edit_nav&' + cType + '='+cValue + '&view_id='+sViewId, '', fnCheckCommentResponse, 'GET', 'JSON');
                }
                var fnCheckCommentResponse = function(result) {
                    if (result.error) {
                        alert(result.error);
                    } else {
                        if (result.status == 1) {
                            $(result.notice_id).innerHTML = '<img border="0" src="{{$base_root_url}}/admin/images/icon_success.gif">';
                        } else {
                            $(result.notice_id).innerHTML = '<img border="0" src="{{$base_root_url}}/admin/images/icon_failure.gif">';
                        }
                    }
                }
            </script>
    </head>
    <body>
        <div class="layout">
            <!-- 当前所在位置和相关链接 -->
            <div class="location_nav">
                <!-- 当前所在位置 -->
                <div class="location_link">
                    <ol id='breadcrumb'>
                        {{foreach from=$location_link item=link name=link}}
                        <li>{{$link}}{{if !$smarty.foreach.link.last}}&nbsp;&gt;&nbsp;{{/if}}</li>
                        {{/foreach}}
                    </ol>
                </div>
                <!-- 相关链接 -->
                <div class="location_other">
                    {{foreach from=$location_other item=other_link}}
                    {{$other_link}}&nbsp;
                    {{/foreach}}
                </div>
            </div>

            <!-- 操作列表标题行 -->
            <div class="div_li_data">
                <table width="100%" bgcolor="#E4EAF1" cellpadding="1" cellspacing="1" border="0" id="article_box">
                    <form action="{{$current_page_url}}" method="post">
                        <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                            <td colspan="2" style="padding-left:15px;">{{$lang.sub_nav_add}}</td>
                        </tr>
                        <!-- 表单 -->
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">{{$lang.label_nav_name}}:&nbsp;</td>
                            <td style="padding-left:10px;"><input type="text" name="text_nav_name" class="input_style" size="35"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">{{$lang.label_nav_url}}:&nbsp;</td>
                            <td style="padding-left:10px;"><input type="text" name="text_nav_url" class="input_style" size="35"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">{{$lang.label_display_order}}:&nbsp;</td>
                            <td style="padding-left:10px;"><input type="text" name="text_display_order" class="input_style" size="1" value="0"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">{{$lang.label_is_unlock}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <span class='yesno_yes '>
                                    <input type='radio' name='text_unlock_type' value='1'   id="sub_can_post_yes" checked />
                                    <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_yes}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio'  id="sub_can_post_no"  name='text_unlock_type' value='0'/>
                                    <label for='sub_can_post_no'>{{$lang.allow_no}}</label>
                                </span>
                            </td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">{{$lang.label_target_type}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <span class='yesno_yes '>
                                    <input type='radio' name='text_target_type' value='1'   id="sub_can_post_yes" checked />
                                    <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_blank}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio'  id="sub_can_post_no"  name='text_target_type' value='0'/>
                                    <label for='sub_can_post_no'>{{$lang.allow_goto}}</label>
                                </span>
                            </td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;">
                            </td>
                            <td style="padding-left:10px;">
                                <input type="submit" class="button" name="sub_nav" value="{{$lang.submit}}" />
                                <input type="reset" class="button" value="{{$lang.reset}}" />
                            </td>
                        </tr>
                    </form>
                </table>
                <table width="100%" bgcolor="#E4EAF1" cellpadding="1" cellspacing="1" border="0" id="article_box">
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        <td colspan="6" style="padding-left:15px;">{{$lang.sub_nav_list}}</td>
                    </tr>
                    <!-- 表头 -->
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        <th width="%5">{{$lang.label_display_order}}</th>
                        <th width="%20">{{$lang.label_nav_name}}</th>
                        <th width="%20">{{$lang.label_nav_url}}</th>
                        <th width="%25">{{$lang.label_is_unlock}}</th>
                        <th width="%20">{{$lang.label_target_type}}</th>
                        <th width="%10">{{$lang.label_operate}}</th>
                    </tr>
                    <!-- 查询结果数据列表 -->
                    {{foreach from=$nav_list item=list}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        <td style="padding-left:10px;">
                            <input class="input_style" type="text" value="{{$list.display_order}}" size="2" onchange="fnChangeComment('order', this.value, '{{$list.nav_id}}')">
                            <span id="order{{$list.nav_id}}"></span>
                        </td>
                        <td style="padding-left:10px;">
                            <input class="input_style" type="text" value="{{$list.nav_name}}" size="25" onchange="fnChangeComment('name', this.value, '{{$list.nav_id}}')">
                            <span id="name{{$list.nav_id}}"></span>
                        </td>
                        <td style="padding-left:10px;">
                            <input class="input_style" type="text" value="{{$list.nav_url}}" size="45" onchange="fnChangeComment('url', this.value, '{{$list.nav_id}}')">
                            <span id="url{{$list.nav_id}}"></span>
                        </td>
                        <td style="padding-left:10px;">
                            {{if $list.is_unlock eq '1'}}
                                <span class='yesno_yes '>
                                    <input type='radio' name='text_unlock_type{{$list.nav_id}}' value='1'   id="sub_can_post_yes" checked onclick="fnChangeComment('unlock', this.value, '{{$list.nav_id}}')"/>
                                    <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_yes}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio'  id="sub_can_post_no"  name='text_unlock_type{{$list.nav_id}}' value='0' onclick="fnChangeComment('unlock', this.value, '{{$list.nav_id}}')"/>
                                    <label for='sub_can_post_no'>{{$lang.allow_no}}</label>
                                </span>
                            {{else}}
                                <span class='yesno_yes '>
                                    <input type='radio' name='text_unlock_type{{$list.nav_id}}' value='1'   id="sub_can_post_yes" onclick="fnChangeComment('unlock', this.value, '{{$list.nav_id}}')"/>
                                    <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_yes}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio'  id="sub_can_post_no"  name='text_unlock_type{{$list.nav_id}}' value='0' checked onclick="fnChangeComment('unlock', this.value, '{{$list.nav_id}}')"/>
                                    <label for='sub_can_post_no'>{{$lang.allow_no}}</label>
                                </span>
                            {{/if}}
                            <span id="unlock{{$list.nav_id}}"></span>
                        </td>
                        <td style="padding-left:10px;">
                            {{if $list.target_type eq '1'}}
                            <span class='yesno_yes '>
                                <input type='radio' name='text_target_type{{$list.nav_id}}' value='1'   id="sub_can_post_yes" checked onclick="fnChangeComment('target', this.value, '{{$list.nav_id}}')"/>
                                <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_blank}}</label>
                            </span><span class='yesno_no '>
                                <input type='radio'  id="sub_can_post_no"  name='text_target_type{{$list.nav_id}}' value='0' onclick="fnChangeComment('target', this.value, '{{$list.nav_id}}')"/>
                                <label for='sub_can_post_no'>{{$lang.allow_goto}}</label>
                            </span>
                            {{else}}
                            <span class='yesno_yes '>
                                <input type='radio' name='text_target_type{{$list.nav_id}}' value='1'   id="sub_can_post_yes" onclick="fnChangeComment('target', this.value, '{{$list.nav_id}}')"/>
                                <label for='sub_can_post_yes' class="label_radio">{{$lang.allow_blank}}</label>
                            </span><span class='yesno_no '>
                                <input type='radio'  id="sub_can_post_no"  name='text_target_type{{$list.nav_id}}' value='0' checked onclick="fnChangeComment('target', this.value, '{{$list.nav_id}}')"/>
                                <label for='sub_can_post_no'>{{$lang.allow_goto}}</label>
                            </span>
                            {{/if}}
                            <span id="target{{$list.nav_id}}"></span>
                        </td>
                        <td style="padding-left:10px;" class="list"><a href="{{$current_page_url}}&mod=del&navid={{$list.nav_id}}" onclick="javascript: return fnRunterDel('{{$lang.notice_allow_delete}}')">{{$lang.delete}}</a></td>
                    </tr>
                    {{/foreach}}
                </table>
                <div>&nbsp;</div>
            </div>
        </div>
    </body>
</html>