westdc-zf1/application/admin/views/scripts/news/index.phtml

101 lines
3.5 KiB
PHTML
Raw Normal View History

2011-09-23 07:34:40 +00:00
<?php
$this->headTitle($this->config->title->site);
$this->headTitle('后台管理');
$this->headTitle()->setSeparator(' - ');
$this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->headLink()->appendStylesheet('/css/admin.css');
$this->breadcrumb('<a href="/admin">后台首页</a>');
$this->breadcrumb('<a href="/admin/news">新闻中心</a>');
2011-09-23 07:34:40 +00:00
?>
<style>
.listingDetails{position:absolute;width:650px; z-index:999;}
.pad{position:absolute;background:#FFF;border:2px solid #444;border-radius:5px;padding:5px;display:none;}
</style>
<div id="leftPanel">
<?= $this->partial('news/left.phtml'); ?>
</div>
<div id="rightPanel">
<?php if ($this->msg or $this->messages) :?>
<div id="message">
<?php if ($this->msg) : ?>
<p><?php echo $this->msg; ?></p>
<?php endif; if ($this->messages): foreach($this->messages as $msg): ?>
<p><?php echo $msg; ?></p>
<?php endforeach;endif; ?>
</div>
<?php endif; ?>
2011-09-23 07:34:40 +00:00
<h3>最新发布的新闻</h3>
<hr/>
<table id="report" class="stylized full" style="">
<thead>
<tr>
<th width="50%">新闻标题</th>
<th width="25%">所属栏目</th>
<th width="25%">新闻管理</th>
</tr>
</thead>
<tbody>
<?php
if(count($this->news))
{
foreach ($this->news as $v)
{
echo '
<tr>
<td>
<div id="paddiv'.$v['id'].'">
<a id="titlebtn'.$v['id'].'" class="title"><b>'.$v['title'].'</b></a>
<div class="listingDetails">
<div class="pad">
<b>详细信息</b> <a href="javascript:;" class="closepad" style="float:right">关闭</a>
<p>作者:'.$v['author'].'</p>
<p>关键词:'.$v['keyword'].'</p>
<p>描述:'.$v['description'].'</p>
<p>添加时间:'.date("Y-m-d H:i",strtotime($v['ts_created'])).'</p>
<p>发布时间:'.date("Y-m-d H:i",strtotime($v['ts_published'])).'</p>
<p>来源:'.$v['source'].'</p>
<p>点击:'.$v['click'].'</p>
</div>
</div></div>
</td>
<td>'.$v['catlog'].'</td>
<td>
<a href="/admin/news/newsedit/id/'.$v['id'].'"><b>编辑</b></a>
<a href="/admin/news/delete/id/'.$v['id'].'" onclick="return confirm(\'是否确定删除该文章\')">删除</a></td>
</tr>
';
}
}
else
{
echo '
<tr><td>暂无数据</td><td></td></tr>
';
}
?>
</tbody>
</table>
2011-09-23 07:34:40 +00:00
<h3>统计</h3>
<hr/>
<ul>
<li><?php echo $this->totle['c'];?> 条档案</li>
<li>栏目 <?php echo $this->typec['c'];?></li>
</ul>
</div>
<script type="text/javascript">
2011-09-23 07:34:40 +00:00
$(document).ready(function(){
$('.title').bind('click', function() {
$('.pad').css('display','none');
$(this).next('.listingDetails').children('.pad').show();
});
$('.closepad').bind('click', function() {
$('.pad').css('display','none');
});
2011-09-23 07:34:40 +00:00
});
function showpad(id){
$('#titlebtn'+id).click();
}
2011-09-23 07:34:40 +00:00
</script>