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

📄 viewdebate.php

📁 php论坛源码论坛软件系统亦称电子公告板(BBS)系统
💻 PHP
字号:
<?php
!function_exists('readover') && exit('Forbidden');
require_once(R_P.'require/bbscode.php');
InitGP(array('did','type','page'));
$did=(int)$did;
if (empty($action)){
	$rt=$db->get_one("SELECT * FROM pw_debatethreads WHERE did='$did'");
	!$rt && Showmsg('debate_none');
	@extract($rt);
	$admincheck && $isvisible=1;
	!$isvisible && Showmsg('debate_examine');
	include_once(D_P.'data/bbscache/debate_class.php');
	!$debateclassdb[$sortid] && Showmsg('debate_classerror');
	$sortname=$debateclassdb[$sortid];
	$content = str_replace("\n","<br />",$content);
	$content = convert($content,$db_windpost);
	$devote	 = (int)$devote;
	$votenum = (int)$votenum;
	$obvote	 = (int)$obvote;
	$revote  = (int)$revote;
	$vote	 = (int)$vote;
	$devoteid=floor($devote/$votenum);
	$summvote=$obvote+$revote;
	$obimgwidth=floor(300*$obvote/($summvote+1));
	$reimgwidth=floor(300*$revote/($summvote+1));
	$limittime = floor(($endtime-$timestamp));
	$dateline  = get_date($dateline,'Y m-d H:i');
	$endtimes  = get_date($endtime,'Y m-d H:i');
	$type_disabled=$reply_type='';
	$rt=$db->get_one("SELECT debatetype FROM pw_debatereplys WHERE did='$did' AND authorid='$winduid'");
	if($rt){
		${'type_'.$rt['debatetype']}='selected';
		$type_disabled='disabled';
		$reply_type=$rt['debatetype'];
	}
	$db->update("UPDATE pw_debatethreads SET views = views+1 WHERE did='$did'");
	require_once(PrintHack('viewdebate'));footer();
} elseif ($action=='reply'){
	!$winduid && Showmsg("not_login");
	InitGP(array('step'));
	if(empty($step)){
		require_once(PrintHack('viewdebate'));footer();
	}elseif($step==1){
		InitGP(array('job','did','action','type','atc_title','atc_content','atc_usesign','atc_convert'));
		$type		 = (int)$type;
		$atc_title	 = Char_cv($atc_title);
		$atc_content = Char_cv($atc_content);
		!$winduid && Showmsg("not_login");
		!$type && Showmsg("debate_choice");
		if (empty($atc_title) || empty($atc_content)){
			Showmsg("debate_noreply");
		}
		$atc_content = Char_cv($atc_content);
		if(!$type){
			Showmsg('debate_type_empty');
		}
		if(!$atc_title || !$atc_content){
			Showmsg('debate_noreply');
		}
		@extract($db->get_one("SELECT did,endtime FROM pw_debatethreads WHERE did='$did'"));
		($endtime < $timestamp) && Showmsg("debate_over");
		$db->update("INSERT INTO pw_debatereplys(did,authorid,author,debatetype,child,vote,title,content ,dateline,ip,isvisible,isdigest) VALUES ('$did','$winduid','$windid','$type',0,0,'$atc_title','$atc_content','$timestamp','$onlineip',1,0)");
		
		require_once(R_P."require/credit.php");
		UserCredit($winduid,$debate_replytype,'set',$debate_replymoney);

		$db->update("UPDATE pw_debateinfo SET replys=replys+1 WHERE uid='$winduid'");
		refreshto("hack.php?H_name=debate&job=viewdebate&did=$did","debate_reply_success");
	}
}
?>

⌨️ 快捷键说明

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