www.gusucode.com > weenCompany闻名企业网站系统 4.0.0 繁体中英文 UTF8源码程序 > modules/m7_chatterbox/viewhistory.php
<?php // +---------------------------------------------+ // | Copyright 2003-2005 weenCompany | // | http://www.weentech.com | // | This file may not be redistributed. | // +---------------------------------------------+ define('IN_WEENCOMPANY', true); $rootpath = "../../"; // ########################### LOAD WEENCOMPANY CORE ############################ include($rootpath . 'includes/core.php'); // ######################### GET CHATTERBOX SETTINGS ########################### $getsettings = $DB->query("SELECT title, value FROM " . TABLE_PREFIX . "modulesettings WHERE moduleid = 7"); while($setting = $DB->fetch_array($getsettings)) { $settings[$setting['title']] = $setting['value']; } $gettimezoneoffset = $DB->query_first("SELECT value FROM " . TABLE_PREFIX . "mainsettings WHERE varname = 'timezoneoffset'"); $mainsettings['timezoneoffset'] = $gettimezoneoffset['value']; // ######################### CHECK FOR INCORRECT DATA ########################## if(!ereg("^[0-9]+$", $categoryid)) { exit(); } if(!$settings['顯示全部內容']) { exit(); } // ############################## DISPLAY HISTORY ############################## $limit = iif($settings['最大天數'] > 0, 'LIMIT ' . $settings['最大天數'], ''); $m7_language = GetLanguage(7); echo '<html> <head> <title>'.$m7_language['view_history'].'</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> </head> <body bgcolor="#B4BFD3"> <table width="90%" height="100%" border="0" cellspacing="0" cellpadding="0" align="center"> <tr> <td bgcolor="#FFFFFF" style="border: 1px solid #000000; padding: 10px;" valign="top">'; $getposts = $DB->query("SELECT username, comment, datecreated FROM " . TABLE_PREFIX . "m7_chatterbox " . iif($settings['目標菜單'], "WHERE categoryid = '$categoryid'") . " ORDER BY commentid DESC " . $limit); while($post = $DB->fetch_array($getposts)) { $username = $post['username']; $comment = $post['comment']; if($settings['換行字符數']) { $username = cws_wordwrap($username, $settings['換行字符數'], "<br />", 1); $comment = cws_wordwrap($comment, $settings['換行字符數'], "<br />", 1); } if($settings['允許表情符號']) { $comment = AddSmilies($comment); } echo '<b>' . $username . '</b><br />'; if($settings['顯示發表時間']) { echo DisplayDate($post['datecreated'], $settings['日期時間格式']) . '<br />'; } echo $comment . '<br /><hr size=1>'; } echo ' </td> </tr> </table> </body> </html>'; unset($m7_language); ?>