查找 guestbook.php 73行左右 //显示所有留言 01 else 02 { 03 setcookie(GUEST_BOOK_POS,GetCurUrl(), time ()+3600,/); 04 05 if ($g_isadmin) $sql = select * from `dede_guestbook` order by id desc; 06 else $sql = select * from `dede_gu […]
查找 guestbook.php 73行左右
//显示所有留言
03
setcookie(‘GUEST_BOOK_POS’,GetCurUrl(),
time
()+3600,’/');
05
if
($g_isadmin) $sql = ‘
select
* from `dede_guestbook` order by
id
desc’;
06
else
$sql = ‘
select
* from `dede_guestbook` where ischeck=1 order by
id
desc’;
08
$dlist = new DataListCP();
09
$dlist->pageSize = 10;
10
$dlist->SetParameter(‘gotopagerank’,$gotopagerank);
11
$dlist->SetTemplate(DEDETEMPLATE.’/plus/guestbook.htm’);
12
$dlist->SetSource($sql);
改成
//显示所有留言
03
setcookie(‘GUEST_BOOK_POS’,GetCurUrl(),
time
()+3600,’/');
05
if
($g_isadmin) $sql = ‘
select
* from `dede_guestbook` order by
id
desc’;
06
else
$sql = ‘
select
* from `dede_guestbook` where ischeck=1 order by
id
desc’;
07
$dsql->Execute(‘cs’,$sql);
08
$totalgb=$dsql->GetTotalRow(‘cs’);//留言数量
09
$dlist = new DataListCP();
10
$dlist->pageSize = 10;
11
$dlist->SetParameter(‘gotopagerank’,$gotopagerank);
12
$dlist->SetTemplate(DEDETEMPLATE.’/plus/guestbook.htm’);
13
$dlist->SetSource($sql);
————————————————————————–然后在模板文件用
<?php echo $GLOBALS[totalgb];?>
来显示