<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>老旧信息-v1.0</title> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link href="http://europe.chtcdn.com/bootstrap/css/bootstrap.min.css" rel="stylesheet"/>
<script type="text/javascript" src="http://europe.chtcdn.com/js/jquery.js"></script>
<script type="text/javascript" src="http://europe.chtcdn.com/bootstrap/js/bootstrap.min.js"></script>
<style type="text/css">
.show-grid {padding: 15px; background: #efefef; border-radius: 5px;}
.mr10 {margin-right: 10px;}
.nav {margin-bottom: 5px;}
.pic {display: none;}
.msg {color: #07c;}
.mt12 {margin-top: 12px;}
.msg_wait {color: #999;}
.none {display: none;}
.form-search {display: inline-block;margin:0 0 0 5px !important;}
.input-medium.search-query {width: 250px;}
#search,#insert,#update {margin-top: 2px;float: right;}
@media (min-width: 1200px) {
.container.wd {
    padding: 0 15px;
    width: 1170px;
}
}
</style>
<script type="text/javascript">
$(function() {
    //下拉选站点
    $('a.sss').on('click', function() {
        var site = $(this).html();
        location.href = '/info.php/login/change_site/'+site+'/?url=/tools/old#';
    });
});
</script>
</head>
<body>
    <div class="container wd">
        <div class="row show-grid">
            <ul class="nav nav-pills">
                <li class="active dropdown mr10">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#">
                        站点:<?php echo($this->config->item('site_code'));?>
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li>
                            <a class="sss">cht</a>
                        </li>
                        <li>
                            <a class="sss">jp</a>
                        </li>
                        <li>
                            <a class="sss">gm</a>
                        </li>
                        <li>
                            <a class="sss">vc</a>
                        </li>
                        <li>
                            <a class="sss">vac</a>
                        </li>
                        <li>
                            <a class="sss">ru</a>
                        </li>
                        <li>
                            <a class="sss">it</a>
                        </li>
                        <li>
                            <a class="sss">ct</a>
                        </li>
                    </ul>
                </li>
                <span class="label label-info">信息：<?php echo(count($info));?>个 (只显示前800个)</span>
                <form class="form-search" id="path_search" action="#" method="post">
                    <select name="yeardiff">
                        <option value="1" <?php if($yeardiff==1) echo('selected'); ?>>1年前</option>
                        <option value="2" <?php if($yeardiff==2) echo('selected'); ?>>2年前</option>
                        <option value="3" <?php if($yeardiff==3) echo('selected'); ?>>3年前</option>
                        <option value="4" <?php if($yeardiff==4) echo('selected'); ?>>4年前</option>
                        <option value="5" <?php if($yeardiff==5) echo('selected'); ?>>5年前</option>
                        <option value="6" <?php if($yeardiff==6) echo('selected'); ?>>6年前</option>
                        <option value="6" <?php if($yeardiff==6) echo('selected'); ?>>7年前</option>
                        <option value="6" <?php if($yeardiff==6) echo('selected'); ?>>8年前</option>
                    </select>
                    <span class="checkbox">
                        <label>
                            <input type="checkbox" name="nopub" value="1" <?php if($nopub==1) echo('checked'); ?>> 显示未发布的信息
                        </label>
                    </span>
                    &nbsp;
                    <span class="checkbox">
                        <label>
                            <input type="checkbox" name="emptyinfo" value="1" <?php if($emptyinfo==1) echo('checked'); ?>> 显示内容为空的信息
                        </label>
                    </span>
                    &nbsp;
                    <span class="checkbox">
                        <label>
                            <input type="checkbox" name="csv" value="1" <?php if($csv==1) echo('checked'); ?>> 下载表格
                        </label>
                    </span>
                    &nbsp;&nbsp;
                    <button type="submit" class="btn">筛选 or 下载</button>
                </form>
            </ul>
        </div>
        <div class="row">
            <table class="table table-hover">
                <thead>
                    <tr>
                      <th>#</th>
                      <th>文件名</th>
                      <th width="10%">更新日期</th>
                      <th width="6%">发布</th>
                      <th width="6%"></th>
                    </tr>
                </thead>
                <tbody class="data_group">
                    <?php foreach($info as $key=>$it) { 
                        if ($key == 800) break;
                    ?>
                    <tr class="data">
                        <td><?php echo($key+1);?></td>
                        <td title="<?php echo($it->ic_url);?>"><?php echo($it->ic_url);?></td>
                        <td title="<?php echo($it->ic_datetime);?>"><?php echo(date('Y-m-d', strtotime($it->ic_datetime)));?></td>
                        <td title="<?php echo($it->ic_datetime);?>">
                            <?php 
                            if ($it->ic_status == 1)
                                echo('<span style="color:seagreen">是</span>'); 
                            else
                                echo('<span style="color:#a12023">否</span>'); 
                            ?>
                        </td>
                        <td>
                            <a href="javascript:document.getElementById('keywords').value='<?php echo(urlencode($it->ic_url));?>';document.forms.goSearch.submit();" target="_blank">编辑</a>
                        </td>
                    </tr>
                    <?php } ?>
                </tbody>
            </table>
        </div>
    </div>
    <form action="/info.php/welcome/search" method="post" id="goSearch" target="_blank">
        <input type="hidden" name="keywords" id="keywords" value="">
    </form>
</body>
</html>