?? c_ext.php
字號:
<?php
/**
* CuteBook 多用戶留言本
* 程式版權 (c) 2001 by midiguy www.jaxp.net
* 作者Email: midiguy@263.net 歡迎批評指正
* 請不要修改版權信息,謝謝
*/
class c_ext extends c_base {
function latest_post($count)
{
global $db_table, $c_util;
$err = false;
$err_msg = '';
$t = &$this->c_smarty_tpl;
$t->caching = false;
$SQL = "SELECT *,t1.id AS topicId FROM " . $db_table['topic'] . " AS t1," . $db_table['user'] . " AS t2 WHERE t1.userid=t2.id ORDER BY t1.id DESC LIMIT 0,$count";
$latest_posts = array();
$result = $this->c_db->query($SQL);
while ($row = $this->c_db->fetch_array($result)) {
$latest_posts[] = array('id' => $row['topicId'],
'name' => $this->c_function->text_filter_html($row['name']),
'sex' => $row['sex'],
'address' => $this->c_function->text_filter_html($row['address']),
'email' => $this->c_function->text_filter_html($row['email']),
'homepage' => $this->c_function->text_filter_html($row['homepage']),
'emotion' => $row['emotion'],
'body' => $this->c_function->text_filter_html($row['post_body']),
'time' => $row['post_time'],
'color' => $row['post_color'],
'userid' => $row['userid'],
'username' => $row['username'],
'sitename' => $row['sitename']
);
}
$t->assign(array('latest_posts' => $latest_posts));
$t->display('ext/latest_post.tpl', '', 'ext');
}
}
?>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -