<!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 fnChangeOrder = function(id, val) {
                    Ajax.call('includes/transport.php?&act=edit_link&id='+id + '&val='+val, '', fnCheckResponse, 'GET', 'TEXT');
                }
                var fnCheckResponse = function(result) {
                        alert(result);
                }
            </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.title_link_add}}</td>
                        </tr>
                        <!-- 表单 -->
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_link_name}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_link_name" class="input_style" size="35">{{$lang.link_name_desc}}</td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_link_text}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_link_text" class="input_style" size="35">{{$lang.link_text_desc}}</td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_link_address}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_link_address" class="input_style" size="35" value="http://"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_link_order}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_link_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;" align="left">{{$lang.label_disply_type}}</td>
                            <td style="padding-left:10px;">
                                <span class='yesno_yes '>
                                    <input type='radio' name='text_link_type' value='1'  checked />
                                    <label for='sub_can_post_yes' class="label_radio">{{$lang.radio_text}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio'   name='text_link_type' value='0'/>
                                    <label for='sub_can_post_no'>{{$lang.radio_image}}</label>
                                </span>
                            </td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_link_type}}</td>
                            <td style="padding-left:10px;">
                                <span class='yesno_yes '>
                                    <input type='radio'  name='text_display_type' value='0' checked/>
                                    <label for='sub_can_post_yes'>{{$lang.radio_open}}</label>
                                </span><span class='yesno_no '>
                                    <input type='radio' name='text_display_type' value='1'/>
                                    <label for='sub_can_post_no' class="label_radio">{{$lang.radio_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_link" 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.title_link_list}}</td>
                    </tr>
                    <!-- 表头 -->
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        <th width="%50">{{$lang.title_text}}</th>
                        <th width="%50">{{$lang.title_image}}</th>
                    </tr>
                    <!-- 查询结果数据列表 -->
                    <tr valign="top">
                        <td valign="top">
                            <table width="100%" bgcolor="#B4E3B9" cellpadding="1" cellspacing="1" border="0" id="article_box">
                                <tr style="background:#E3F6E5;font-size:14px;height:25px;">
                                    <th width="10%">{{$lang.title_order}}</th>
                                    <th width="60%">{{$lang.title_link}}</th>
                                    <th width="30%">{{$lang.title_operate}}</th>
                                </tr>
                                {{foreach from=$links item=link}}
                                    {{if $link.link_type eq 1}}
                                        <tr style="background:#FFF;font-size:14px;height:25px;">
                                        <td width="10%" style="padding-left:15px;">
                                            <input type="text" value="{{$link.link_order}}" size="1" onchange="fnChangeOrder('{{$link.link_id}}', this.value);"/>
                                        </td>
                                        <td width="60%"  style="padding-left:15px;" class="list"><a href="{{$link.link_address}}" target="_blank" title="{{$link.link_name}}">{{$link.link_text}}</a></td>
                                        <td width="30%"  style="padding-left:15px;" class="list"><a href="?module=8_other_manage&delid={{$link.link_id}}" onclick="javascript: return fnRunterDel('{{$lang.notice_allow_delete}}')">{{$lang.delete}}</a></td>
                                        </tr>
                                    {{/if}}
                                {{/foreach}}
                            </table>
                        </td>
                        <td valign="top">
                            <table width="100%" bgcolor="#E3B4B4" cellpadding="1" cellspacing="1"  border="0" id="article_box">
                                <tr style="background:#F6E3E3;font-size:14px;height:25px;">
                                    <th width="10%">{{$lang.title_order}}</th>
                                    <th width="60%">{{$lang.title_link}}</th>
                                    <th width="30%">{{$lang.title_operate}}</th>
                                </tr>
                                {{foreach from=$links item=link}}
                                    {{if $link.link_type eq 0}}
                                        <tr style="background:#FFF;font-size:14px;height:25px;">
                                        <td width="10%" style="padding-left:15px;">
                                            <input type="text" value="{{$link.link_order}}" size="1" onchange="fnChangeOrder('{{$link.link_id}}', this.value);"/>
                                            </td>
                                        <td width="60%"  style="padding-left:15px;" class="list">
                                            <a href="{{$link.link_address}}" target="_blank" title="{{$link.link_name}}">
                                                <img src="{{$link.link_text}}" width="88" height="31"/>
                                            </a>
                                        </td>
                                        <td width="30%"  style="padding-left:15px;" class="list"><a href="?module=8_other_manage&delid={{$link.link_id}}" onclick="javascript: return fnRunterDel('{{$lang.notice_allow_delete}}')">{{$lang.delete}}</a></td>
                                        </tr>
                                    {{/if}}
                                {{/foreach}}
                            </table>
                        </td>
                    </tr>
                </table>
                <div>&nbsp;</div>
            </div>
        </div>
    </body>
</html>