<!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>

            <!-- 操作列表标题行 -->
            <form action="{{$current_page_url}}" method="post" enctype="multipart/form-data">
            <div class="div_li_data">
                {{foreach from=$form_items key=key item=item}}
                <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="2" style="padding-left:15px;">{{$lang.$key}}</td>
                    </tr>
                    {{foreach from=$item key=name item=row}}
                    {{if $row.type eq 'timezone'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                        {{assign var="value" value=data_$name}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <select name="{{$name}}" class="input_style" style="width:auto;height:22px;">
                                    {{foreach from=$timezone_all item=list}}
                                    <option value="{{$list}}" {{if $data_items.$value eq $list}}selected{{/if}}>{{$list}}</option>
                                    {{/foreach}}
                                </select>
                            </td>
                    </tr>
                    {{elseif $row.type eq 'select'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                        {{assign var="value" value=data_$name}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <select name="{{$name}}" class="input_style" style="width:auto;height:22px;">
                                    {{foreach from=$row.option item=li}}
                                    <option value="{{$li}}" {{if $data_items.$value eq $li}}selected{{/if}}>{{$lang.$li}}</option>
                                    {{/foreach}}
                                </select>
                            </td>
                    </tr>
                    {{elseif $row.type eq 'input'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                        {{assign var="value" value=data_$name}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;"><input type="text" name="{{$name}}" class="input_style" value="{{$data_items.$value}}" size="{{$row.size}}"></td>
                    </tr>
                    {{elseif $row.type eq 'textarea'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                        {{assign var="value" value=data_$name}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <textarea class="textarea_style" name="{{$name}}" rows="{{$row.rows}}" cols="{{$row.cols}}" style="width:300px;height:35px;">{{$data_items.$value}}</textarea>
                            </td>
                    </tr>
                    {{elseif $row.type eq 'radio'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                        {{assign var="value" value=data_$name}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <span class='yesno_yes '>
                                        <input type='radio' name='{{$name}}' value='1'   id="sub_can_post_yes" {{if $data_items.$value eq 1}}checked{{/if}}/>
                                        <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='{{$name}}' value='0' {{if $data_items.$value eq 0}}checked{{/if}}/>
                                        <label for='sub_can_post_no'>{{$lang.allow_no}}</label>
                                    </span>
                            </td>
                    </tr>
                    {{elseif $row.type eq 'file'}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{assign var="label" value=$row.flag}}
                            <td style="padding-left:10px; width:200px;">{{$lang.$label}}:&nbsp;</td>
                            <td style="padding-left:10px;">
                                <input type="file"class="input_style" name="{{$name}}" size="{{$row.size}}"/>{{$is_up_file}}
                            </td>
                    </tr>
                    {{/if}}
                    {{/foreach}}
                </table>
                {{/foreach}}
                <div align="center">
                    <input class="button" name="text_submit_conf" type="submit" value="{{$lang.submit}}">
                    <input class="button" type="reset" value="{{$lang.reset}}">
                </div>
               </form>

            </div>
        </div>
    </body>
</html>