$antiSpam = 1;
     }
 }
 if ($user_id == 1 or $antiSpam == 0) {
     $forum_id = $forum;
     $topic_id = $topic;
     $poster_id = $user_id;
     $poster_name = $user_usr;
     $post_text = $postText;
     $post_time = 'now()';
     $post_status = 0;
     $inss = insertArray(array('forum_id', 'topic_id', 'poster_id', 'poster_name', 'post_text', 'post_time', 'poster_ip', 'post_status'), $Tp);
     if ($inss == 0) {
         $topic_last_post_id = $insres;
         if (updateArray(array('topic_last_post_id'), $Tt, 'topic_id', $topic) > 0) {
             db_forumReplies($forum, $Tp, $Tf);
             db_topicPosts($topic, $Tt, $Tp);
             //fire an event
             require_once 'geograph/event.class.php';
             new Event(EVENT_NEWREPLY, $topic_last_post_id);
         }
         if ($emailusers == 1 or isset($emailadmposts) and $emailadmposts == 1) {
             $topicTitle = db_simpleSelect(0, $Tt, 'topic_title', 'topic_id', '=', $topic);
             $topicTitle = $topicTitle[0];
             $postTextSmall = strip_tags(substr(str_replace(array('<br>', '&#039;', '&quot;', '&amp;', '&#036;'), array("\r\n", "'", '"', '&', '$'), $postText), 0, 200)) . '...';
             $msg = ParseTpl(makeUp('email_reply_notify'));
             $sub = explode('SUBJECT>>', $msg);
             $sub = explode('<<', $sub[1]);
             $msg = trim($sub[1]);
             $sub = $sub[0];
         }
Beispiel #2
0
             db_topicPosts($topic_id, $Tt, $Tp);
             $RES1 = $result;
             $CNT1 = $countRes;
             if ($lp = db_simpleSelect(0, $Tp, 'post_id', 'topic_id', '=', $topic_id, 'post_id DESC', 1)) {
                 $topic_last_post_id = $lp[0];
                 $fs = updateArray(array('topic_last_post_id'), $Tt, 'topic_id', $topic_id);
                 $aff += $fs;
             }
             $result = $RES1;
             $countRes = $CNT1;
         } while ($rrr = db_simpleSelect(1));
     }
     /* Update forums posts, topics amount */
     if ($res = db_simpleSelect(0, $Tf, 'forum_id')) {
         do {
             db_forumReplies($res[0], $Tp, $Tf);
             db_forumTopics($res[0], $Tt, $Tf);
         } while ($res = db_simpleSelect(1));
     }
     if ($aff > 0) {
         $warning .= "<br>" . $l_userMsgsDeleted;
     } else {
         $warning .= "<br>" . $l_userMsgsNotDeleted;
     }
 } else {
     /*Make user posts as anonymous*/
     $aff = 0;
     $poster_id = 0;
     $topic_poster = 0;
     $aff += updateArray(array('poster_id'), $Tp, 'poster_id', $userID);
     $aff += updateArray(array('topic_poster'), $Tt, 'topic_poster', $userID);