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

📄 template.php

📁 很好的一套PHP树形论坛程序
💻 PHP
字号:
<?php
!function_exists('readover') && exit('Forbidden');
require_once(R_P.'require/bbscode.php');
include_once(D_P."data/bbscache/forumcache.php");
list($db_moneyname,$db_moneyunit,$db_rvrcname,$db_rvrcunit,$db_creditname,$db_creditunit)=explode("\t",$db_credits);
if($tid){
	$readtpl='readtpl';
	include_once(D_P."data/style/$skin.php");
	if(!file_exists(R_P."template/$tplpath/$readtpl.htm")){
		include_once(D_P."data/style/$db_defaultstyle.php");
		if(!file_exists(R_P."template/$tplpath/$readtpl.htm")){
			$tplpath='wind';
		}
	}
	include_once(D_P.'data/bbscache/md_config.php');
	if($md_ifopen){
		include_once(D_P.'data/bbscache/medaldb.php');
	}
	ob_end_clean();
	$i_table = $yeyestyle == 'no' ? "bgcolor=$tablecolor" : 'class=i_table';
	$S_sql=',tm.*,p.voteopts,p.pollid,m.uid,m.username,m.oicq, m.groupid,m.memberid,m.icon AS micon ,m.hack,m.honor,m.signature,m.showsign,m.payemail,m.regdate,m.signchange,m.medals,md.onlinetime,md.postnum,md.digests,md.rvrc,md.money,md.credit,md.currency,md.starttime,md.thisvisit';
	$J_sql='LEFT JOIN pw_tmsgs tm ON t.tid=tm.tid LEFT JOIN pw_members m ON m.uid=t.authorid LEFT JOIN pw_memberdata md ON md.uid=t.authorid LEFT JOIN pw_polls p ON p.pollid=t.pollid';
	$usehtm=1;
	$read = $db->get_one("SELECT t.* $S_sql FROM pw_threads t $J_sql WHERE t.tid='$tid'");
	if(!$read){
		$usehtm=0;
	}
	if($foruminfo['allowvisit']){
		$usehtm=0;
	}elseif($foruminfo['password']){
		$usehtm=0;
	}elseif($foruminfo['allowsell'] && strpos($read['content'],"[sell") !== false && strpos($read['content'],"[/sell]") !== false){
		$usehtm=0;
	} elseif($foruminfo['allowhide'] && strpos($read['content'],"[post]") !== false && strpos($read['content'],"[/post]") !== false){
		$usehtm=0;
	} elseif($foruminfo['allowencode'] && strpos($read['content'],"[hide") !== false && strpos($read['content'],"[/hide]") !== false){
		$usehtm=0;
	} elseif(!$ifcheck){
		$usehtm=0;
	}
	$date=date('ym',$read['postdate']);
	if(!$usehtm && file_exists(R_P."$htmdir/$fid/$date/$tid.html")){
		P_unlink(R_P."$htmdir/$fid/$date/$tid.html");
	}
	$page=floor($article/$db_readperpage)+1;
	$count= $read['replies']+1;

	if($usehtm && ($page==1 || $read['replies']<=$db_readperpage || $read['replies']%$db_readperpage==0 || !file_exists(R_P."$htmdir/$fid/$date/$tid.html"))){

		if(D_P != R_P && $db_http != 'N'){
			$path=$db_bbsurl;
		}else{
			$path='../../..';
		}
		$db_http=='N' && $imgpath=$path.'/'.$imgpath;

		$f_url="$path/read.php?tid=$tid&";

		$pollid=$read['pollid'];
		if($read['voteopts']){
			$tpc_date=get_date($read['postdate']);
			htmvote($read['voteopts']);
		}
		$read['pid'] = 'tpc';
		$readdb      = array();
		$readdb[]    = htmread($read,0);
		$authorids   = $read['authorid'];
		$subject     = $read['subject'];
		$tpctitle    = '- '.$subject;
		$favortitle=str_replace("&#39","鈥

⌨️ 快捷键说明

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