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

📄 printable.inc.php

📁 Discuz! 论坛软件系统 big5
💻 PHP
字号:
<?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: 2005-3-7 17:16
*/

if(!defined('IN_DISCUZ')) {
	exit('Access Denied');
}

$postlist = array();
$attachment = 0;

$thisbg = '#FFFFFF'; //use for discuzcode().

$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']);
	$post['message'] = discuzcode($post['message'], $post['smileyoff'], $post['bbcodeoff'], $post['htmlon'], $forum['allowsmilies'], $forum['allowbbcode'], $forum['allowimgcode'], $forum['allowhtml'], ($forum['jammer'] && $post['authorid'] != $discuz_uid ? 1 : 0));

	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['dateline'] = gmdate("$dateformat $timeformat", $attach['dateline'] + $timeoffset * 3600);
		$attach['attachicon'] = attachtype($extension."\t".$attach['filetype']);
		$attach['attachsize'] = sizecount($attach['filesize']);
		$attach['attachimg'] = $attachimgpost && in_array($extension, array('jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp')) ? 1 : 0;

		$postlist[$attach['pid']]['attachments'][] = $attach;

	}

}

include template('viewthread_printable');

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -