楼上的
用这个试试吧
我不敢保证一定行啊
你的插件还真不少啊....
- <?php
- /*
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: [DISCUZ!] Crossday Discuz! Board ::
- :: (c) 2001-2005 Comsenz Technology Ltd (www.discuz.com) ::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- :: Author: Crossday (tech@discuz.com) Cnteacher (cnteacher@discuz.com) ::
- :: Version: 2.5F 2004/10/01 05:15 ::
- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
- */
- //fix: BY pk0909
- /*
- 1 多出来的空格
- 2 bbcode 解析问题
- 3 img code 对特殊符号的js未转义
- */
- if(!defined('IN_DISCUZ')) {
- exit('Access Denied');
- }
- $searcharray=$replacearray= array();
- $codecount = 0 ;
- function censor($message) {
- global $_DCACHE;
- require_once(DISCUZ_ROOT.'/forumdata/cache/cache_censor.php');
- return empty($_DCACHE['censor']) ? $message : @preg_replace($_DCACHE['censor']['find'], $_DCACHE['censor']['replace'], $message);
- }
- function credithide($creditsrequire, $message) {
- if($GLOBALS['credit'] < $creditsrequire && !$GLOBALS['ismoderator']) {
- return "<b>**** Hidden to Credits Lower Than $creditsrequire ****</b>";
- } else {
- return '<b>Below Message for Credits Higher Than '.$creditsrequire.'</b><br>'.
- '==============================<br><br>'.
- str_replace('\"', '"', $message).'<br><br>'.
- '==============================';
- }
- }
- function codedisp($code) {
- global $thisbg, $codecount, $post_codecount, $codehtml;
- $post_codecount++;
- $code = htmlspecialchars(str_replace('\"', '"', preg_replace("/^[\n\r]*(.+?)[\n\r]*$/is", "\\1", $code)));
- $codehtml[$post_codecount] = "<blockquote class="code"><b class="smalltxt">CODE:</b> <a href="###" class="smalltxt" onclick="copycode(findobj('code$codecount'));">[点击复制到剪贴板]</a><hr size=1 color="".BORDERCOLOR.""><div style="padding:5px; font-family:Courier New;" id="code$codecount">$code</div></blockquote>";
- $codecount++;
- return "[\tDISCUZ_CODE_$post_codecount\t]";
- }
- function parseurl(&$message) {
- return preg_match("/\[code\].+?\[\/code\]/is", $message) ? $message :
- substr(preg_replace( array(
- "/(?<=[^\]a-z0-9-="'\\/])((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/|www\.)([a-z0-9\/\-_+=.~!%@?#%&;:$\\()|]+)/i",
- "/(?<=[^\]a-z0-9\/\-_.~?=:.])([_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4}))/i"
- ), array(
- "[url]\\1\\3[/url]",
- "[email]\\0[/email]"
- ), ' '.$message), 1);
- }
- function postify($message, $smileyoff, $bbcodeoff, $allowsmilies = 1, $allowhtml = 0, $allowbbcode = 1, $allowimgcode = 1,$imgsizelimited=0) {
- global $credit, $tid, $discuz_uid, $discuz_user, $codehtml, $post_codecount, $thisbg, $highlight, $table_posts, $db, $searcharray, $replacearray, $sellmessage,$ismoderator,$post_sellcount,$phpcodehtml,$post_phpcodecount;
- $post_sellcount=0;
- $post_codecount = -1;
- $post_phpcodecount = -1;
- $message = preg_replace("/\[sell=(\d+)\]\s*(.+?)\s*\[\/sell\]/ies", "postsell(\\1,'\\2')", $message);
- if(!$bbcodeoff && $allowbbcode) {
- $message = preg_replace("/\s*\[code\](.+?)\[\/code\]\s*/ies", "codedisp('\\1')", $message);
- $message = preg_replace("/\s*\[php\](.+?)\[\/php\]\s*/ies", "phpcodedisp('\\1')", $message);
- }
- if(!$allowhtml) {
- $message = dhtmlspecialchars($message);
- }
- if(!$smileyoff && $allowsmilies) {
- if(is_array($GLOBALS['_DCACHE']['smilies'])) {
- foreach($GLOBALS['_DCACHE']['smilies'] as $smiliey) {
- $message = str_replace($smiliey['code'], "<img src="".SMDIR."/$smiliey[url]" align="absmiddle" border="0">",$message);
- }
- }
- }
- if(!$bbcodeoff && $allowbbcode) {
- if(empty($searcharray['bbcode_regexp']) || empty($replacearray['bbcode_regexp']) || empty($searcharray['bbcode_str']) || empty($replacearray['bbcode_str'])) {
- $searcharray['bbcode_regexp'] = array(
- "/\s*\[quote\][\n\r]*(.+?)[\n\r]*\[\/quote\]\s*/is",
- "/(\[box=(#[0-9A-F]{6}|[a-z]+)\])[\n\r]*(.+?)[\n\r]*(\[\/box\])/is",
- "/\[url\]\s*(www.|https?:\/\/|ftp:\/\/|gopher:\/\/|news:\/\/|telnet:\/\/|rtsp:\/\/|mms:\/\/){1}([^\["']+?)\s*\[\/url\]/ie",
- "/\[url=www.([^\["']+?)\](.+?)\[\/url\]/is",
- "/\[url=(https?|ftp|gopher|news|telnet|rtsp|mms){1}:\/\/([^\["']+?)\](.+?)\[\/url\]/is",
- "/\[email\]\s*([A-Za-z0-9\-_.]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\s*\[\/email\]/i",
- "/\[email=([A-Za-z0-9\-_.]+)@([A-Za-z0-9\-_]+[.][A-Za-z0-9\-_.]+)\](.+?)\[\/email\]/is",
- "/\[color=([#0-9a-zA-Z]{3,10})\]/i",
- "/\[size=([\-0-9]{1,2})\]/i",
- "/\[font=([^\[]+?)\]/i",
- "/\[align=(left|right|center)\]/i",
- "/\[center\]/i"
- );
- $replacearray['bbcode_regexp'] = array(
- "<br><br><center><table border="0" width="90%" cellspacing="0" cellpadding="0"><tr><td> Quote:</td></tr><tr><td><table border="0" width="100%" cellspacing="1" cellpadding="10" bgcolor="".BORDERCOLOR.""><tr><td width="100%" bgcolor="".ALTBG2."" style="word-break:break-all">\\1</td></tr></table></td></tr></table></center><br>",
- "<blockquote style="background-color: \\2 ;"><span class="bold">$title</span>\\3</blockquote>",
- "cuturl('\\1\\2')",
- "<a href="http://www.\\1" target="_blank">\\2</a>",
- "<a href="\\1://\\2" target="_blank">\\3</a>",
- "<a href="mailto:\\1@\\2">\\1@\\2</a>",
- "<a href="mailto:\\1@\\2">\\3</a>",
- "<font color="\\1">",
- "<font size="\\1">",
- "<font face="\\1">",
- "<p align="\\1">",
- "<p align="center">"
- );
- if($GLOBALS['_DCACHE']['bbcodes']) {
- $searcharray['bbcode_regexp'] = array_merge($searcharray['bbcode_regexp'], $searcharray['bbcode_regexp'], $GLOBALS['_DCACHE']['bbcodes']['searcharray']);
- $replacearray['bbcode_regexp'] = array_merge($replacearray['bbcode_regexp'], $replacearray['bbcode_regexp'], $GLOBALS['_DCACHE']['bbcodes']['replacearray']);
- unset($GLOBALS['_DCACHE']['bbcodes']);
- }
- $searcharray['bbcode_str'] = array(
- '[/color]', '[/size]', '[/font]', '[/align]', '[b]', '[/b]',
- '[i]', '[/i]', '[u]', '[/u]', '[list]', '[list=1]', '[list=a]',
- '[list=A]', '[*]', '[/list]','[/center]'
- );
- $replacearray['bbcode_str'] = array(
- '</font>', '</font>', '</font>', '</p>', '<b>', '</b>', '<i>',
- '</i>', '<u>', '</u>', '<ul>', '<ol type=1>', '<ol type=a>',
- '<ol type=A>', '<li>', '</ul></ol>','</p>'
- );
- }
- @$message = str_replace($searcharray['bbcode_str'], $replacearray['bbcode_str'],
- preg_replace($searcharray['bbcode_regexp'], $replacearray['bbcode_regexp'], $message));
- if(preg_match("/\[hide=?\d*\].+?\[\/hide\]/is", $message)) {
- if(stristr($message, '[hide]')) {
- $query = $db->query("SELECT pid FROM $table_posts WHERE tid='$tid' AND authorid='$discuz_uid' LIMIT 1");
- if($ismoderator || $db->result($query, 0)) {
- $message = preg_replace("/\[hide\]\s*(.+?)\s*\[\/hide\]/is", "<span class="bold">Below Message for Repliers</span><br>==============================<br><br>\\1<br><br>==============================", $message);
- } else {
- $message = preg_replace("/\[hide\](.+?)\[\/hide\]/is", "<b>**** Hidden to Non-Reply Visitors *****</b>", $message);
- }
- }
- $message = preg_replace("/\[hide=(\d+)\]\s*(.+?)\s*\[\/hide\]/ies", "credithide(\\1,'\\2')", $message);
- }
- }
- if(!$bbcodeoff && $allowimgcode) {
- if(empty($searcharray['imgcode']) || empty($replacearray['imgcode'])) {
- $searcharray['imgcode'] = array(
- "/\[swf\]\s*([^\[]+?)\s*\[\/swf\]/ies",
- "/\[img\]\s*([^\[]+?)\s*\[\/img\]/ies",
- "/\[wmv\]\s*(.+?)\s*\[\/wmv\]/ies",
- "/\[rm\]\s*(.+?)\s*\[\/rm\]/ies",
- "/\[wmv=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/wmv\]/ies",
- "/\[rm=(\d+?)[x|\,](\d+?)[x|\,](\d+?)\]\s*(.+?)\s*\[\/rm\]/ies",
- "/\[img=(\d{1,3})[x|\,](\d{1,3})\]\s*([^\[]+?)\s*\[\/img\]/ies"
- );
- $replacearray['imgcode'] = array(
- "bbcodeurl('\\1', ' <img src="images/attachicons/flash.gif" align="absmiddle"> <a href="%s" target="_blank">Flash: %s</a> ')",
- "bbcodeurl('\\1', '<img src="%s" border="0" onload="if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=\'Click here to open new window\';}" onmouseover="if(this.resized) this.style.cursor=\'hand\';" onerror="src=\'./images/common/nopic.gif\'" onclick="if(this.resized) {window.open(this.src);}">')",
- "bbcodeurl('\\1', '<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="480" height="360" ><PARAM NAME="AutoStart" VALUE="0" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="%s" width="480" height="360"></embed></object>')",
- "bbcodeurl('\\1', '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" width="480" height="360" viewastext><param name="Autostart" value="0"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=480 VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="0"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="BACKGROUNDCOLOR" value="#000000"><param name="SRC" value="\\1"></object>')",
- "bbcodeurl('\\3', '<object width="\\1" height="\\2" align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer"><param name="Autostart" VALUE="\\3"><param name="ShowStatusBar" VALUE="\\3"><param name="Filename" value="\\4"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="\\4"></embed></object>')",
- "bbcodeurl('\\3', '<object width="\\1" height="\\2" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" viewastext><param name="Autostart" value="\\3"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width="\\1" VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="\\3"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="SRC" value="\\4"></object>')",
- "bbcodeurl('\\3', '<img width="\\1" height="\\2" src="%s" border="0" onerror="src=\'./images/common/nopic.gif\'" >')"
- );
- $replacearray['imgcodelimited'] = array(
- "bbcodeurl('\\1', ' <img src="images/attachicons/flash.gif" align="absmiddle"> <a href="%s" target="_blank">Flash: %s</a> ')",
- "bbcodeurl('\\1', '<img src="%s" border="0" onLoad="javascript:if(this.height>200) this.height=200" > ')",
- "bbcodeurl('\\1', '<object align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer" width="480" height="360" ><PARAM NAME="AutoStart" VALUE="0" ><param name="ShowStatusBar" value="-1"><param name="Filename" value="%s"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="%s" width="480" height="360"></embed></object>')",
- "bbcodeurl('\\1', '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" width="480" height="360" viewastext><param name="Autostart" value="0"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width=480 VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="0"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="BACKGROUNDCOLOR" value="#000000"><param name="SRC" value="\\1"></object>')",
- "bbcodeurl('\\3', '<object width="\\1" height="\\2" align="middle" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" class="OBJECT" id="MediaPlayer"><param name="Autostart" VALUE="\\3"><param name="ShowStatusBar" VALUE="\\3"><param name="Filename" value="\\4"><embed type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" flename="mp" src="\\4"></embed></object>')",
- "bbcodeurl('\\3', '<object width="\\1" height="\\2" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" id="Player" viewastext><param name="Autostart" value="\\3"><param name="CONTROLS" value="ImageWindow"><param name="CONSOLE" value="_master"><param name="LOOP" value="-1"><param name="CENTER" value="0"></object><br><object classid=clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA height=64 id=Player width="\\1" VIEWASTEXT><param name="_ExtentX" value="18256"><param name="_ExtentY" value="794"><param name="Autostart" value="\\3"><param name="LOOP" value="0"><param name="CENTER" value="0"><param name="SRC" value="\\4"></object>')",
- "bbcodeurl('\\3', '<img width="\\1" height="\\2" src="%s" border="0" onerror="src=\'./images/common/nopic.gif\'" >')"
-
- );
-
- }
- if(!$imgsizelimited)
- $message = preg_replace($searcharray['imgcode'], $replacearray['imgcode'], $message);
- else $message = preg_replace($searcharray['imgcode'], $replacearray['imgcodelimited'], $message);
- }
- for($si = 0; $si <= $post_sellcount; $si++) {
- $message = str_replace("|\tDISCUZ_SELL_$si\t|", $sellmessage[$si], $message);
- }
- unset ($sellmessage);
- for($i = 0; $i <= $post_codecount; $i++) {
- $message = str_replace("[\tDISCUZ_CODE_$i\t]", $codehtml[$i], $message);
- }
- if($highlight) {
- foreach(explode('+', $highlight) as $ret) {
- if($ret) {
- $message = preg_replace("/(?<=[\s"\]>()]|[\x7f-\xff]|^)(".preg_quote($ret, '/').")(([.,:;-?!()\s"<\[]|[\x7f-\xff]|$))/siU", "<u><b><font color="#FF0000">\\1</font></b></u>\\2", $message);
- }
- }
- }
- for($i = 0; $i <= $post_phpcodecount; $i++) {
- $message = str_replace("|\tDISCUZ_PHPCODE_$i\t|", $phpcodehtml[$i], $message);
- }
- $message = nl2br(str_replace(
- array("\t", ' ', ' '),
- array(' ', ' ', ' ')
- , $message)
- );
- return $message;
- }
- function cuturl($url) {
- $length = 65;
- $urllink = "<a href="".(substr(strtolower($url), 0, 4) == 'www.' ? "http://$url" : $url).'" target="_blank">';
- if(strlen($url) > $length) {
- $url = substr($url, 0, intval($length * 0.5)).' ... '.substr($url, - intval($length * 0.3));
- }
- $urllink .= $url.'</a>';
- return $urllink;
- }
- function bbcodeurl($url, $tags) {
- if(!preg_match("/<.+?>/s",$url)) {
- if(!in_array(strtolower(substr($url, 0, 6)), array('http:/', 'https:', 'ftp://', 'rtsp:/', 'mms://'))) {
- $url = 'http://'.$url;
- }
- return str_replace('submit', '', sprintf($tags, $url, $url));
- } else {
- return ' '.$url;
- }
- }
- function phpcodedisp($code) {
- global $thisbg, $codecount, $post_phpcodecount, $phpcodehtml,$post;
- $post_phpcodecount++;
- $phpcode = phphighlite(str_replace("\\"", """, $code));
- $phpcodeid ="pcode_$post[pid]_$post_phpcodecount";
- $phpcodehtml[$post_phpcodecount] = "<blockquote class="code"><b class="smalltxt">PHP:</b> <a href="###" class="smalltxt" onclick="copycode(findobj('$phpcodeid'));">[点击复制到剪贴板]</a><hr size=1 color="".BORDERCOLOR.""><div style="padding:5px; font-family:Courier New;" id="$phpcodeid">$phpcode</div></blockquote>";
- $phpcodecount++;
- return "|\tDISCUZ_PHPCODE_$post_phpcodecount\t|";
- }
- function phphighlite($code) {
- if(!strpos($code,"<?\n") && !strpos($code,'<?') && substr($code,0,2)!='<?'){
- $code='<'.'?'.trim($code).' ?'.'>';
- $addedtags=1;
- }
- ob_start();
- $oldlevel=error_reporting(0);
- highlight_string($code);
- error_reporting($oldlevel);
- $buffer = ob_get_contents();
- ob_end_clean();
- if ($addedtags) {
- $openingpos = strpos($buffer,'<?');
- $closingpos = strrpos($buffer, '?');
- $buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
- }
- $buffer = str_replace(""", """, $buffer);
- $buffer = str_replace("<br />", '', $buffer);
- return $buffer;
- }
- function clear_bbcode($code){
- $rep = array('[', ']', ':', '(', ')');
- for ($x = 0; $x < count($rep); $x++) {
- $code = str_replace($rep[$x], '&#'.ord($rep[$x]).';', $code);
- }
- return $code;
- }
- //贴子买卖funciton ========开始
- function postsell($price, $message) {
- global $thisbg, $post_sellcount,$db,$post, $sellmessage,$tid,$table_posts,$hacktable_postpay,$discuz_user,$issupermod,$ismoderator,$isadmin,$usermoney,$page;
- //$message=stripslashes($message);
- $message = str_replace("\\"", """, preg_replace("/^[\n\r]*(.+?)[\n\r]*$/is", "\\1",
- $message));
- $post_sellcount++;
- $price=abs(intval($price));
- $post['needmoney']=$post['needmoney']+$price;
- $query = $db->query("SELECT COUNT(*) FROM $hacktable_postpay WHERE pid='$post[pid]' AND sellcount='$post_sellcount' ");
- $payusercount=$db->result($query, 0);
- if ($discuz_user){
- if ($usermoney >= $price){
- $paymessage="你的现金是:$usermoney ,可以<a href="postpay.php?action=pay&tid=$tid&pid=$post[pid]&sellcount=$post_sellcount&money=$price&page=$page">[立即付费]</a>。";
- }else{
- $paymessage="你的现金是:$usermoney ,无法付费。去[<a href='plugins.php?p=bank'>银行</a>]取款或者卖些积分吧。";
- }
- }else{
- $paymessage= "非本站会员无权购买,请[<a href='logging.php?action=login'>登陆</a>],或者[<a href='register.php'>注册</a>]";
- }
-
- $sm1="<br><center><table style='background: threedface; color: windowtext; margin: 2px; BORDER-STYLE: none' width='90%'><tr><td><FIELDSET style='width: 100%; text-align: center'><LEGEND> 收费单</font></LEGEND><table border='0' width='98%' cellspacing='0' cellpadding='6' ><tr><td class='smalltxt'>编号:<input type='text'name='p101' value='$tid-$post[pid]-$post[postcount]'></td><td>价格:<input type=text name=p102 value='$price' size=5>金额</td><td align='right'>已付费人数:<input type=text name=p103 value='$payusercount' size=5> <a href='postpay.php?action=showpayuser&tid=$tid&pid=$post[pid]&sellcount=1'><font color=red>名单</font></a></td></tr><tr><td colspan='3'><hr><font color ='#000000'>请付费察看本帖隐藏内容,$paymessage</td></tr></table></FIELDSET></tr></table></center>";
-
- $sm2="<br><center><table style='background: threedface; color: windowtext; margin: 2px; BORDER-STYLE: none' width='90%'><tr><td><FIELDSET style='width: 100%; text-align: center'><LEGEND> 付款证明</font></LEGEND><table border='0' width='98%' cellspacing='0' cellpadding='6'><tr><td class='smalltxt'>编号:<input type='text' name='p101' value='$tid-$post[pid]-$post[postcount]'></td><td> 价格:<input type=text name=p102 value='$price' size=5> 金额</td><td align='right'>已付费人数:<input type=text name=p103 value='$payusercount' size=5> <a href= 'postpay.php?action=showpayuser&tid=$tid&pid=$post[pid]&sellcount=1'><font color=red>名单</font></a></td></tr><tr><td colspan='3'><hr><font color='#000000'>感谢您的付费!你可以观看以下付费内容了。如发现非法敛财,可以投诉给版主</td></tr></table></FIELDSET></tr></table></center>";
- if ($discuz_user){
- $query = $db->query("SELECT COUNT(*) FROM $table_posts WHERE pid='$post[pid]' AND author='$discuz_user'");
- $isauthor = $db->result($query, 0);
- if($issupermod || $ismoderator || $isadmin || $isauthor ){
- $post['paymoney']=$post['needmoney'];
- $post['payed']=2;
- $sellmessage[$post_sellcount]=$sm2;
- } else {
- $query = $db->query("SELECT COUNT(*) FROM $hacktable_postpay WHERE pid='$post[pid]' AND sellcount='$post_sellcount' and money='$price' and username='$discuz_user'");
- if($db->result($query, 0)) {
- $post['paymoney']=$post['paymoney']+$price;
- $post['payed']=2;
- $sellmessage[$post_sellcount]=$sm2;
- }else{
- $post['payed']=1;
- $message='';
- $sellmessage[$post_sellcount]=$sm1;
- }
- }
- }else{
- $post['payed']=1;
- $message='';
- $sellmessage[$post_sellcount]=$sm1;
- }
- return "|\tDISCUZ_SELL_$post_sellcount\t| ".$message;
- }
- //贴子买卖funciton ========结束
- ?>
复制代码 |