<!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>
            <link href="{{$style_path}}main.css" rel="stylesheet" type="text/css" />
    </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="title_bgcolor">
                <span>{{$lang.title_database_status}}</span>
            </div>
            <!-- 添加目录表单 -->
            <div style="height:40px;">
                <p style="margin-top:10px;">
                    <input type="button" class="button" value="{{$lang.label_database_status}}" onclick="fnDatabaseStatus('db', this.value)"/>
                    {{$lang.label_table_status}}
                    <select name="text_select_table" onchange="fnDatabaseStatus('tb', this.value)">
                        <option value="0">{{$lang.select_please_table}}</option>
                        {{foreach from=$tabs item=tab}}
                        <option value="{{$tab}}" {{if $tab eq $tabname}}selected{{/if}}>{{$tab}}</option>
                        {{/foreach}}
                    </select>
                </p>
                <script type="text/javascript">
                    var fnDatabaseStatus = function(sType, sVal) {
                        var sUrl = 'data.php?act=database_status&type='+sType+'&val='+sVal;
                        document.location.href = sUrl;
                    }
                </script>
            </div>

            <!-- 操作列表标题行 -->
            <div class="div_li_data">
                <table width="100%" bgcolor="#E4EAF1" cellpadding="1" cellspacing="1" border="0" id="article_box">
                    {{if $tabname}}
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        <td colspan="9" style="padding-left:15px;">{{$lang.title_database_desc}}</td>
                    </tr>
                    {{/if}}
                    <!-- 表头 -->
                    {{if $table_header}}
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        {{foreach from=$table_header item=tb}}
                        <th>{{$tb}}</th>
                        {{/foreach}}
                    </tr>
                    {{/if}}
                    <!-- 查询结果数据列表 -->
                    {{foreach from=$query_result item=list}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{foreach from=$list item=last}}
                        <td style="padding-left:10px;">{{$last}}</td>
                        {{/foreach}}
                    </tr>
                    {{/foreach}}
                </table>
                <table width="100%" bgcolor="#E4EAF1" cellpadding="1" cellspacing="1" border="0" id="article_box">
                    {{if $tabname}}
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        <td colspan="12" style="padding-left:15px;">{{$lang.title_database_index}}</td>
                    </tr>
                    {{/if}}
                <!-- 索引表头 -->
                    {{if $table_header}}
                    <tr style="background:#6D829C;font-size:14px;color:#FFF; font-weight:bold;height:25px;">
                        {{foreach from=$index_header item=tb}}
                        <th>{{$tb}}</th>
                        {{/foreach}}
                    </tr>
                    {{/if}}
                    <!-- 查询结果数据列表 -->
                    {{foreach from=$index_result item=list}}
                    <tr style="background:#FFF;font-size:14px;color:#6D829C;height:25px;">
                        {{foreach from=$list item=last}}
                        <td style="padding-left:10px;">{{$last}}</td>
                        {{/foreach}}
                    </tr>
                    {{/foreach}}
            </table>
                <div>&nbsp;</div>
            </div>
            <div class="sabrosus" id="local_page" style="text-align:right;">
                {{$page}}
            </div>
        </div>
    </body>
    <script type="text/javascript">
        var sSpan = $('local_page').childNodes;
        var iNum  = sSpan.length;
        for (i = 0; i < iNum; i++) {
            if (sSpan[i].tagName == 'SPAN') {
                sSpan[i].className += 'current';
            }
        }
        iHeight = parseInt(document.body.scrollHeight);
        if (iHeight < 700) {
            iHeight = 700;
        }
        window.parent.document.getElementById('main').style.height =  iHeight  + 2 + "px";
    </script>
</html>