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

📄 post.php

📁 一个可以实时查看股票行情的小程序,真是一个好程序哦,直得大家
💻 PHP
字号:
<?php
define('JMD',2);
require_once('./global.php');
require_once(R_P.'require/forum.php');
include_once(R_P.'data/bbscache/level.php');
/**
* 版块缓冲文件
*/
include_once(R_P.'data/bbscache/forum_cache.php');
$foruminfo=$db->get_one("SELECT * FROM pw_forums WHERE fid='$fid' AND type<>'category'");
if(!is_numeric($fid) || !$foruminfo){
	require_once(R_P.'require/url_error.php');
}
wind_forumcheck($foruminfo);
$f_score=$foruminfo['f_score'];//bbspostguide()用到
if($db_recycle && $fid==$db_recycle){
	showmsg('post_recycle');
}
if($tid && !is_numeric($tid)){
	Showmsg('illegal_tid');
}
/*
* 获取管理权限
*/
if($windid==$manager || $groupid==3 || $groupid==4|| ($foruminfo['forumadmin'] && strpos($foruminfo['forumadmin'],','.$windid.',')!==false)){
	$admincheck=1;
} else{
	$admincheck=0;
}
!$windid && $admincheck=0;

$secondurl="thread.php?fid=$fid";
$top_post=0;
!$action && $action="new";
/**
* 调查版块只允许发起投票
*/
if($foruminfo['f_type']=='vote' && $action=='new' && !$admincheck){
	Showmsg('post_vote_only');
}

list($db_openpost,$db_poststart,$db_postend)=explode("\t",$db_openpost);
if($db_openpost==1 && !$admincheck && $db_poststart<$db_postend && ($t['hours']<$db_poststart || $t['hours']>$db_postend)){
	Showmsg('post_openpost');
}
list($db_moneyname,$db_moneyunit,$db_rvrcname,$db_rvrcunit,$db_creditname,$db_creditunit)=explode("\t",$db_credits);

/**
* 禁止受限制用户发言
*/
if($groupid=='6'){
	$bandb=$db->get_one("SELECT * FROM pw_banuser WHERE uid='$winduid'");
	if(!$bandb){
		$db->update("UPDATE pw_members SET groupid='-1' WHERE uid='$winduid'");
	} elseif($bandb['type']==1 && $timestamp-$bandb['startdate']>$bandb['days']*86400){
		$db->update("DELETE FROM pw_banuser WHERE uid='$winduid'");
		$db->update("UPDATE pw_members SET groupid='-1' WHERE uid='$winduid'");
	} else{
		if($bandb['type']==1){
			$s_date=get_date($bandb['startdate']);
			$e_date=$bandb['startdate']+$bandb['days']*86400;
			$e_date=get_date($e_date);
			Showmsg('ban_info1');
		}else{
			Showmsg('ban_info2');
		}
	}
}

/**
* 需要验证用户只有通过管理员验证后才能发帖
*/
if($groupid=='7'){
	Showmsg('post_check');
}
/*
* 新注册会员发帖时间限制
*/
if($db_postallowtime && $timestamp-$winddb['regdate']<$db_postallowtime*3600){
	Showmsg('post_newrg_limit');
}
$groupid != 'guest' && $userlastptime = $winddb['lastpost'];
/**
* 灌水预防
*/

if (!$SYSTEM['postpers'] && $gp_postpertime && $timestamp-$userlastptime<=$gp_postpertime){
	Showmsg('post_limit');
}
if (!$_POST['step']){
	$atc_content=$atc_title='';
	include_once(R_P.'data/bbscache/postcache.php');
	if(!is_numeric($num_a) || !$num_a){
		$num_a=1;
	}
	!is_numeric($db_attachnum) && $db_attachnum=1;
	$db_uploadmaxsize=ceil($db_uploadmaxsize/1024);
	$htmlpost=($foruminfo['allowhide'] && $gp_allowhidden ? '':"disabled");
	$htmlhide=($foruminfo['allowencode'] && $gp_allowencode ? '':"disabled");
	$htmlsell=($foruminfo['allowsell'] && $gp_allowsell ? '':"disabled");
	if($groupid=='guest'){
		$userrvrc=0;
	}
	$db_replysendmail!=1 && $hideemail="disabled";
	/**
	* phpwind code
	*/
	if($db_signwindcode){
		$windcode="<br><a href=\"faq.php?faqjob=1#5\"> Wind Code Open</a>";
		$db_windpost['pic'] ? $windcode.="<br> [img] - Open":$windcode.="<br> [img] - Close";
		$db_windpost['flash'] ? $windcode.="<br> [flash] - Open":$windcode.="<br> [flash] - Close";
	} else{
		$windcode="<br><a href=\"faq.php?faqjob=1#5\">Wind Code</a>Close"; 
	}
	/**
	* 标题表情
	*/
	$icondb=array(
			'1'=>'1.gif',	'2'=>'2.gif',
			'3'=>'3.gif',	'4'=>'4.gif',
			'5'=>'5.gif',	'6'=>'6.gif',
			'7'=>'7.gif',	'8'=>'8.gif',
			'9'=>'9.gif',	'10'=>'10.gif',
			'11'=>'11.gif',	'12'=>'12.gif',
			'13'=>'13.gif',	'14'=>'14.gif',
		);
} elseif($_POST['step']){
	if(!$windid)$windid='guest';
	require_once(R_P.'require/bbscode.php');
	require_once(R_P.'require/postfunc.php');
	@include_once(R_P."data/bbscache/wordsfb.php");
	if($wordsfb){
		foreach($wordsfb as $key=>$value){
			strpos($atc_title,(string)$key)!==false && Showmsg('post_wordsfb');
			strpos($atc_content,(string)$key)!==false && Showmsg('post_wordsfb');
		}
	}
	list($lastip,$ipfrom)=explode("\t",str_replace('<','&lt;',$ipfrom));
	if($lastip!=$onlineip){
		$ipfrom=cvipfrom($onlineip);
		$ipfrom = str_replace("\n","",$ipfrom);
		Cookie('ipfrom',$onlineip."\t".$ipfrom);
	}
	$atc_usesign=!$_POST['atc_usesign'] ? 0 : 1;
	if(($gp_htmlcode || ($gp_wysiwyg && $editor)) && $_POST['atc_html']){
		$atc_usesign+=2;
	}
	/**
	* 得到父版块id
	*/
	$fatherid=$foruminfo['type']=='sub' ? $foruminfo['fup']:'';
}

if ($action=="new"||$action=="vote"){
	require_once(R_P.'require/postnew.php');
} elseif($action=="reply" || $action=="quote"){
	require_once(R_P.'require/postreply.php');
} elseif($action=="modify"){
	require_once(R_P.'require/postmodify.php');
} else{
	Showmsg('undefined_action');
}
?>

⌨️ 快捷键说明

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