Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

update

  • Loading branch information...
commit dff2a918a5c7f3cd4360bb1638b7680e922eb387 1 parent 06a841a
@williamjxj authored
View
4 f1Class.php
@@ -139,7 +139,7 @@ public function get_news_label($footer) {
function get_category_contents($cate_id) {
$sql = "select cid, title, url, pubdate, author, source, clicks, tags, likes, fandui, guanzhu, pinglun,
- category, cate_id, item, iid
+ category, cate_id, item, iid, created
from contents where language='" . $this -> lang . "' and cate_id=$cate_id order by cid desc limit 0,".ROWS_PER_PAGE;
$res = $this -> mdb2 -> queryAll($sql, '', MDB2_FETCHMODE_ASSOC);
if (PEAR::isError($res))
@@ -182,7 +182,7 @@ function get_items($cate_id = 0) {
function get_item_contents($iid) {
$sql = "select cid, title, url, pubdate, author, source, clicks, tags, likes, fandui, guanzhu, pinglun,
- category, cate_id, item, iid
+ category, cate_id, item, iid, created
from contents where language='" . $this -> lang . "' and iid=$iid order by iid desc limit 0, ".ROWS_PER_PAGE;
$res = $this -> mdb2 -> queryAll($sql, '', MDB2_FETCHMODE_ASSOC);
View
4 s.php
@@ -443,13 +443,9 @@
if (isset($_GET['page']) || isset($_GET['js_dwmy']) || isset($_GET['js_attr']) || isset($_GET['js_core']) || isset($_GET['js_cate_item']) ) {
// 以下是:去掉search.tpl.html ajax 部分,程序仍然能工作.
- $pagination = $obj -> draw();
- $obj -> assign("pagination", $pagination);
$obj -> display($tdir6 . 'nav.tpl.html');
}
else {
- $pagination = $obj -> draw();
- $obj -> assign("pagination", $pagination);
$obj -> display($tdir6 . 'ss.tpl.html');
if (!empty($_GET['q'])) $obj->write_named_pipes(trim($_GET['q']), __LINE__);
}
View
47 templates/1/category_contents.tpl.html 100644 → 100755
@@ -2,11 +2,19 @@
{$count=1}
<div class="row">
<div class="span12">
- <ul class="breadcrumb">
- <li><a href="{$config.home}">首页</a><span class="divider">/</span></li>
- <li><a href="?cate_id={$h.cate_id}">{$h.category}</a> <span class="divider">/</span></li>
- <li class="active">内容:</li>
- </ul>
+ <ul class="breadcrumb">
+ <li><i class="icon-home"></i>&nbsp;<a href="{$config.home}">首页</a><span class="divider">/</span></li>
+ <li><a href="?cate_id={$h.cate_id}">{$h.category}</a> <span class="divider">/</span></li>
+ <li class="active">内容:</li>
+ </ul>
+ <div class="listing-heading"> <strong>{$data.self_i18n|default:{$config.header.title}|capitalize}</strong> &nbsp;
+ {if !empty($pagination)}
+ Page {$data.current_page}, Total {$data.total_pages} pages / {$data.total_rows} records
+ {/if} </div>
+ {if !empty($pagination)}
+ <div class="pager1"> {$pagination} </div>
+ {/if}
+ <div style="clear:both;"></div>
<table class="table table-bordered table-hover table-striped table-condensed">
<tr>
<th>序号</th>
@@ -14,22 +22,43 @@
<th>时间</th>
<th>归类</th>
<th>阅览次数</th>
- <th>关注度</th>
+ <th>赞成</th>
+ <th>反对</th>
<th>总评论</th>
+ <th>归档时间</th>
<th>选项</th>
</tr>
{foreach $list as $l}
<tr>
<td><span class="badge badge-warning">{$count++}</span></td>
- <td><a href="{$config.f3.s}?cid={$l.cid}">{$l.title}</a></td>
+ <td><a href="{$config.f7.s}?cid={$l.cid}">{$l.title}</a></td>
<td>{$l.pubdate|default:'N/A'|date_format:"%Y-%m-%d %H:%M"}</td>
<td><a href="{$config.f1.s}?iid={$l.iid}">{$l.item}</a></td>
<td>{$l.clicks}</td>
+ <td>{$l.likes}</td>
<td>{$l.guanzhu}</td>
<td>{$l.pinglun}</td>
- <td><a href="javascript:;">我要评论</a></td>
+ <td>{$l.created|date_format:"%Y-%m-%d %H:%M"}}</td>
+ <td><a class="talk" href="{$config.f7.s}?cid={$l.cid}#Tab3"><i class="icon-comment"></i>我要评论</a>&nbsp;&nbsp; <i class="icon-list"></i><a class="talk fancybox.ajax" href="{$config.ag}?js_talk=1&cid={$l.cid}">预览</a> </td>
</tr>
{/foreach}
</table>
- </div>
+ {if !empty($pagination)}
+ <div class="pager1 pager-bottom"> {$pagination} </div>
+ {/if} </div>
</div>
+<script type="text/javascript">
+$(function() {
+ $('a.talk').fancybox({
+ maxWidth : 800,
+ maxHeight : 600,
+ fitToView : false,
+ width : '70%',
+ height : '70%',
+ autoSize : false,
+ closeClick : false,
+ openEffect : 'none',
+ closeEffect : 'none'
+ });
+});
+</script>
View
2  templates/1/index.tpl.html
@@ -4,6 +4,8 @@
{include file="{$config.t}base_layout.tpl.html"}
<link rel="stylesheet" type="text/css" href="{$config.f1.c}" media="screen" />
<script type="text/javascript" src="js/UrlEncode.js"></script>
+<link rel="stylesheet" type="text/css" href="include/fancybox/source/jquery.fancybox.css?v=2.1.3" media="screen" />
+<script type="text/javascript" src="include/fancybox/source/jquery.fancybox.pack.js?v=2.1.3"></script>
</head>
<body id="{$config.browser}">
<div class="container">
View
31 templates/1/item_contents.tpl.html 100644 → 100755
@@ -2,12 +2,12 @@
{$count=1}
<div class="row">
<div class="span12">
- <ul class="breadcrumb">
- <li><a href="{$config.home}">首页</a><span class="divider">/</span></li>
- <li><a href="?cate_id={$h.cate_id}">{$h.category}</a> <span class="divider">/</span></li>
- <li><a href="?cate_id={$h.iid}">{$h.item}</a> <span class="divider">/</span></li>
- <li class="active">内容:</li>
- </ul>
+ <ul class="breadcrumb">
+ <li><i class="icon-home"></i><a href="{$config.home}">首页</a><span class="divider">/</span></li>
+ <li><a href="?cate_id={$h.cate_id}">{$h.category}</a> <span class="divider">/</span></li>
+ <li><a href="?cate_id={$h.iid}">{$h.item}</a> <span class="divider">/</span></li>
+ <li class="active">内容:</li>
+ </ul>
<table class="table table-bordered table-hover table-striped table-condensed">
<tr>
<th>序号</th>
@@ -21,14 +21,29 @@
{foreach $list as $l}
<tr>
<td><span class="badge badge-warning">{$count++}</span></td>
- <td><a href="{$config.f3.s}?cid={$l.cid}">{$l.title}</a></td>
+ <td><a href="{$config.f7.s}?cid={$l.cid}">{$l.title}</a></td>
<td>{$l.pubdate|default:'N/A'|date_format:"%Y-%m-%d %H:%M"}</td>
<td>{$l.clicks}</td>
<td>{$l.guanzhu}</td>
<td>{$l.pinglun}</td>
- <td><a href="javascript:;">我要评论</a></td>
+ <td><a class="talk" href="{$config.f7.s}?cid={$l.cid}#Tab3"><i class="icon-comment"></i>我要评论</a>&nbsp;&nbsp; <i class="icon-list"></i><a class="talk fancybox.ajax" href="{$config.ag}?js_talk=1&cid={$l.cid}">预览</a> </td>
</tr>
{/foreach}
</table>
</div>
</div>
+<script type="text/javascript">
+$(function() {
+ $('a.talk').fancybox({
+ maxWidth : 800,
+ maxHeight : 600,
+ fitToView : false,
+ width : '70%',
+ height : '70%',
+ autoSize : false,
+ closeClick : false,
+ openEffect : 'none',
+ closeEffect : 'none'
+ });
+});
+</script>
Please sign in to comment.
Something went wrong with that request. Please try again.