{template "header.html"}
<link href="{THEME_PATH}assets/global/plugins/bootstrap-daterangepicker/daterangepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-timepicker/css/bootstrap-timepicker.min.css" rel="stylesheet" type="text/css" />
<link href="{THEME_PATH}assets/global/plugins/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css" />
<script src="{THEME_PATH}assets/global/plugins/bootstrap-datepicker/js/bootstrap-datepicker.finecms.js" type="text/javascript"></script>
<style type="text/css">

    .source {
        background:#333;
        color:#c7c7c7;
        padding:0.5em 1em;
        border-radius:0px;
        margin:0;
    }
    .source span.line {
        line-height:1.4;
    }
    .source span.line .number {
        color:#666;
    }
    .source .line .highlight {
        display:block;
        background:#555;
        color:#fff;
    }
    .source span.highlight .number {
        color:#fff;
    }
    .source .tabs {
        list-style:none;
        list-style-position:inside;
        margin:0;
        padding:0;
        margin-bottom:-1px;
    }
    .source .tabs li {
        display:inline;
    }
    .source .tabs a:link,.source .tabs a:visited {
        padding:0rem 1rem;
        line-height:2.7;
        text-decoration:none;
        color:#a7a7a7;
        background:#f1f1f1;
        border:1px solid #e7e7e7;
        border-bottom:0;
        border-top-left-radius:5px;
        border-top-right-radius:5px;
        display:inline-block;
    }
    .source .tabs a:hover {
        background:#e7e7e7;
        border-color:#e1e1e1;
    }
    .source .tabs a.active {
        background:#fff;
    }
    .source .tab-content {
        background:#fff;
        border:1px solid #efefef;
    }
    .source .content {
        padding:1rem;
    }
    .source .alert {
        margin-top:2rem;
        display:block;
        text-align:center;
        line-height:3.0;
        background:#d9edf7;
        border:1px solid #bcdff1;
        border-radius:5px;
        color:#31708f;
    }
    .source .trace a {
        color:inherit;
    }
    .source .trace table {
        width:auto;
    }
    .source .trace tr td:first-child {
        min-width:5em;
        font-weight:bold;
    }
    .source .trace td {
        background:#e7e7e7;
        padding:0 1rem;
    }
    .source .trace td pre {
        margin:0;
    }
    .source .args {
        display:none;
    }


</style>
<script type="text/javascript">
    if (App.isAngularJsApp() === false) {
        jQuery(document).ready(function() {
            if (jQuery().datepicker) {
                $('.date-picker').datepicker({
                    rtl: App.isRTL(),
                    orientation: "left",
                    autoclose: true
                });
            }
        });
    }
</script>
<div class="row table-search-tool">
    <form action="{SELF}" method="get">
        {dr_form_search_hidden()}
        <div class="{if $is_mobile}col-md-12{else}col-md-3{/if}">
            <label>
                <div class="input-group fc-input-time date date-picker" data-date-format="yyyy-mm-dd">
                    <input type="text" class="form-control" name="time" value="{$time}">
                        <span class="input-group-btn">
                            <button class="btn default" type="button">
                                <i class="fa fa-calendar"></i>
                            </button>
                        </span>
                </div>
            </label>
        </div>

        <div class="{if $is_mobile}col-md-12{else}col-md-3{/if}">
            <label><button type="submit" class="btn green btn-sm onloading" name="submit" > <i class="fa fa-search"></i> {dr_lang('搜索')}</button></label>
            {if $list}<label><a href="javascript:;" onclick="dr_show_file_code('{dr_lang('查看文件')}', '{dr_url('error_php/show', ['time'=>$time])}')" class="btn blue btn-sm onloading" > <i class="fa fa-code"></i> {dr_lang('查看文件')}</a></label>{/if}
        </div>
    </form>
</div>
<form class="form-horizontal" role="form" id="myform">
    {dr_form_hidden()}
    <table class="table table-striped table-bordered table-hover table-checkable dataTable">
        <thead>
        <tr class="heading">
            <th width="170">{dr_lang('时间')}</th>
            <th width="200">{dr_lang('文件')}</th>
            <th>{dr_lang('错误')}</th>
        </tr>
        </thead>
        <tbody>
        {loop $list $id $t}
        <tr class="odd gradeX" id="dr_row_{$id}">
            <td>{$t.time}</td>
            <td><a onclick="dr_show_info_{$id}()">{substr(basename($t.file), 0, 15)}: {$t.line}</a></td>
            <td><a onclick="dr_show_info_{$id}()">{dr_strcut($t.error, 80)}</a>
            <script>function dr_show_info_{$id}() {
                {if $t.json}
                var json = {$t.json};
                layer.open({
                    type: 1,
                    shade: 0,
                    title: lang['show'],
                    area: ['70%', '70%'],
                    content: '<div style="padding:20px" class="source">{$t.url}<br>'+'{$t.info}<br>'+json.html+'</div>'
                });
                {else}
                dr_show_info('{$t.info}')
                {/if}
            }</script>
            </td>
        </tr>
        {/loop}
        </tbody>
    </table>
    <div class="row">
        <div class="col-md-12 col-sm-12 text-right">
            {$mypages}
        </div>
    </div>

</form>

{template "footer.html"}