⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 c_ext.php

📁 转载中国源码下载站 1) 基于PHP语言开发,MYSQL数据库驱动的多用户留言本 2) 采用PHP官方提供的编译模板引擎smarty 3) 代码、页面分离
💻 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 + -