<!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_ad}}</td>
                        </tr>
                        <!-- 表单 -->
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_ad_name}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_ad_name" class="input_style" size="35" value="{{$ad.name}}"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_ad_desc}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_ad_desc" class="input_style" size="45" value="{{$ad.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_ad_url}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_ad_url" class="input_style" size="45" value="http://" value="{{$ad.url}}"></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:100px;" align="left">{{$lang.label_ad_img}}</td>
                            <td style="padding-left:10px;"><input type="text" name="text_ad_img" class="input_style" size="45" value="{{$ad.img}}">&nbsp;&nbsp;<span style="color:red">468*60</span></td>
                        </tr>
                        <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                            <td style="padding-left:10px; width:150px;"></td>
                            <td style="padding-left:10px;">
                                <input class="button" name="text_submit_ad" type="submit" value="{{$lang.submit}}" />
                                <input class="button" type="reset" 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 style="padding-left:15px;">{{$lang.ad_preview}}</td>
                    </tr>
                    <!-- 查询结果数据列表 -->

                                <tr style="background:#E3F6E5;font-size:14px;height:25px;">
                                    <td>
                                        {{if $ad}}
                                        <a href="{{$ad.url}}" target="_blank"><img src="{{$ad.img}}" border="0" alt="{{$ad.desc}}"/></a>
                                        {{/if}}
                                    </th>
                                </tr>
                </table>
                <div>&nbsp;</div>
            </div>
        </div>
    </body>
</html>