Esempio n. 1
0
                     if (strpos($floor, '*') === false) {
                         if (intval($floor) == 0) {
                             unset($floors[$key]);
                         } elseif ($floor > $_G['gp_stopfloor']) {
                             unset($floors[$key]);
                         }
                     }
                 }
             }
             $_G['gp_rewardfloor'] = implode(',', $floors);
         }
         DB::query("UPDATE " . DB::table('forum_threadrush') . " SET stopfloor='{$_G['gp_stopfloor']}', starttimefrom='{$_G['gp_rushreplyfrom']}', starttimeto='{$_G['gp_rushreplyto']}', rewardfloor='{$_G['gp_rewardfloor']}' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     }
     DB::query("UPDATE " . DB::table('forum_thread') . " SET typeid='{$typeid}', sortid='{$sortid}', subject='{$subject}', readperm='{$readperm}', price='{$price}' {$closedadd} {$authoradd} {$polladd} {$replycreditadd}" . ($_G['forum_auditstatuson'] && $audit == 1 ? ",displayorder='0', moderated='1'" : ",displayorder='{$displayorder}'") . ", status='{$thread['status']}' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     $thread['closed'] > 1 && DB::query("UPDATE " . DB::table('forum_thread') . " SET subject='{$subject}' WHERE tid='{$thread['closed']}'", 'UNBUFFERED');
     $tagstr = modthreadtag($_G['gp_tags'], $_G['tid']);
 } else {
     if ($subject == '' && $message == '' && $thread['special'] != 2) {
         showmessage('post_sm_isnull');
     }
 }
 $htmlon = $_G['group']['allowhtml'] && !empty($_G['gp_htmlon']) ? 1 : 0;
 if ($_G['setting']['editedby'] && TIMESTAMP - $orig['dateline'] > 60 && $_G['adminid'] != 1) {
     $editor = $isanonymous && $isorigauthor ? lang('forum/misc', 'anonymous') : $_G['username'];
     $edittime = dgmdate(TIMESTAMP);
     $message = lang('forum/misc', $htmlon ? 'post_edithtml' : (!$_G['forum']['allowbbcode'] || $_G['gp_bbcodeoff'] ? 'post_editnobbcode' : 'post_edit'), array('editor' => $editor, 'edittime' => $edittime)) . $message;
 }
 $bbcodeoff = checkbbcodes($message, !empty($_G['gp_bbcodeoff']));
 $smileyoff = checksmilies($message, !empty($_G['gp_smileyoff']));
 $tagoff = $isfirstpost ? !empty($tagoff) : 0;
 $attachupdate = !empty($_G['gp_delattachop']) || ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) && ($_G['gp_attachnew'] || $special == 2 && $_G['gp_tradeaid'] || $special == 4 && $_G['gp_activityaid'] || $isfirstpost && $sortid);
Esempio n. 2
0
                     if (strpos($floor, '*') === false) {
                         if (intval($floor) == 0) {
                             unset($floors[$key]);
                         } elseif ($floor > $_G['gp_stopfloor']) {
                             unset($floors[$key]);
                         }
                     }
                 }
             }
             $_G['gp_rewardfloor'] = implode(',', $floors);
         }
         DB::query("UPDATE " . DB::table('forum_threadrush') . " SET stopfloor='{$_G['gp_stopfloor']}', starttimefrom='{$_G['gp_rushreplyfrom']}', starttimeto='{$_G['gp_rushreplyto']}', rewardfloor='{$_G['gp_rewardfloor']}' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     }
     DB::query("UPDATE " . DB::table('forum_thread') . " SET typeid='{$typeid}', sortid='{$sortid}', subject='{$subject}', readperm='{$readperm}', price='{$price}' {$closedadd} {$authoradd} {$polladd} {$replycreditadd}" . ($_G['forum_auditstatuson'] && $audit == 1 ? ",displayorder='0', moderated='1'" : ",displayorder='{$displayorder}'") . ", status='{$thread['status']}' WHERE tid='{$_G['tid']}'", 'UNBUFFERED');
     $_G['tid'] > 1 && DB::query("UPDATE " . DB::table('forum_thread') . " SET subject='{$subject}' WHERE closed='{$_G['tid']}'", 'UNBUFFERED');
     $tagstr = modthreadtag($_G['gp_tags'], $_G[tid]);
 } else {
     if ($subject == '' && $message == '' && $thread['special'] != 2) {
         showmessage('post_sm_isnull');
     }
 }
 $htmlon = $_G['group']['allowhtml'] && !empty($_G['gp_htmlon']) ? 1 : 0;
 if ($_G['setting']['editedby'] && TIMESTAMP - $orig['dateline'] > 1 && $_G['adminid'] != 1) {
     $editor = $isanonymous && $isorigauthor ? lang('forum/misc', 'anonymous') : $_G['username'];
     $edittime = dgmdate(TIMESTAMP);
     $message = lang('forum/misc', $htmlon ? 'post_edithtml' : (!$_G['forum']['allowbbcode'] || $_G['gp_bbcodeoff'] ? 'post_editnobbcode' : 'post_edit'), array('editor' => $editor, 'edittime' => $edittime)) . $message;
 }
 $bbcodeoff = checkbbcodes($message, !empty($_G['gp_bbcodeoff']));
 $smileyoff = checksmilies($message, !empty($_G['gp_smileyoff']));
 $tagoff = $isfirstpost ? !empty($tagoff) : 0;
 $attachupdate = !empty($_G['gp_delattachop']) || ($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) && ($_G['gp_attachnew'] || $special == 2 && $_G['gp_tradeaid'] || $special == 4 && $_G['gp_activityaid'] || $isfirstpost && $sortid);