printable.inc.php
来自「速度很快的PHP论坛源程序」· PHP 代码 · 共 57 行
PHP
57 行
<?php
/*
[DISCUZ!] include/printable.inc.php - show printable version in thread viewing page
This is NOT a freeware, use is subject to license terms
Version: 4.0.0
Web: http://www.comsenz.com
Copyright: 2001-2005 Comsenz Technology Ltd.
Last Modified: 2004/1/25 08:42
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
$postlist = array();
$attachment = 0;
$query = $db->query("SELECT * FROM {$tablepre}posts WHERE tid='$tid' AND invisible='0' ORDER BY dateline");
while($post = $db->fetch_array($query)) {
$post['dateline'] = gmdate("$dateformat $timeformat", $post['dateline'] + ($timeoffset * 3600));
$post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'], $forum['allowsmilies'], $forum['allowbbcode'], $forum['allowimgcode'], $forum['allowhtml']);
if($post['attachment']) {
$attachment = 1;
}
$postlist[$post['pid']] = $post;
}
if($attachment) {
require_once DISCUZ_ROOT.'./include/attachment.func.php';
$query = $db->query("SELECT * FROM {$tablepre}attachments WHERE tid='$tid'");
while($attach = $db->fetch_array($query)) {
$extension = strtolower(fileext($attach['filename']));
$attach['attachicon'] = attachtype($extension."\t".$attach['filetype']);
if($attachimgpost && in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp'))) {
$attach['attachimg'] = 1;
} else {
$attach['attachimg'] = 0;
$attach['attachsize'] = sizecount($attach['filesize']);
}
$postlist[$attach['pid']]['attachments'][] = $attach;
}
}
include template('viewthread_printable');
?>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?