コード例 #1
0
ファイル: post.php プロジェクト: richstokoe/BeehiveForum
     }
     if ($t_tid > 0) {
         if ($allow_sig == true && strlen(trim($t_sig)) > 0) {
             $t_content .= "<div class=\"sig\">{$t_sig}</div>";
         }
         $new_pid = post_create($t_fid, $t_tid, $t_rpid, $uid, $t_to_uid, $t_content);
         if ($new_pid > -1) {
             $user_rel = user_get_relationship($t_to_uid, $uid);
             if ($high_interest == "Y") {
                 thread_set_high_interest($t_tid);
             }
             if (!session::check_perm(USER_PERM_WORMED, 0) && !($user_rel & USER_IGNORED_COMPLETELY)) {
                 $exclude_user_array = array($t_to_uid, $uid);
                 $thread_modified = isset($thread_data['MODIFIED']) && is_numeric($thread_data['MODIFIED']) ? $thread_data['MODIFIED'] : 0;
                 email_sendnotification($t_to_uid, $uid, $t_tid, $new_pid);
                 email_send_folder_subscription($uid, $t_fid, $t_tid, $new_pid, $thread_modified, $exclude_user_array);
                 email_send_thread_subscription($uid, $t_tid, $new_pid, $thread_modified, $exclude_user_array);
             }
             post_save_attachment_id($t_tid, $new_pid, $aid);
         }
     }
 } else {
     $new_pid = 0;
     $t_tid = isset($_POST['t_tid']) && is_numeric($_POST['t_tid']) ? $_POST['t_tid'] : 0;
     $t_rpid = isset($_POST['t_rpid']) && is_numeric($_POST['t_rpid']) ? $_POST['t_rpid'] : 0;
 }
 if ($new_pid > -1) {
     if ($new_thread && $t_tid > 0) {
         $uri = "discussion.php?webtag={$webtag}&msg={$t_tid}.1";
     } else {
         if ($t_tid > 0 && $t_rpid > 0) {
コード例 #2
0
ファイル: lpost.php プロジェクト: DeannaG65/BeehiveForum
     } else {
         if (isset($thread_data['CLOSED']) && $thread_data['CLOSED'] > 0 && !session::check_perm(USER_PERM_FOLDER_MODERATE, $fid)) {
             light_html_draw_error(gettext("This thread is closed, you cannot post in it!"));
         }
     }
     if (isset($tid) && is_numeric($tid)) {
         if ($allow_sig == true && strlen(trim($sig)) > 0) {
             $content .= "<div class=\"sig\">{$sig}</div>";
         }
         if (($new_pid = post_create($fid, $tid, $reply_to_pid, $_SESSION['UID'], $to_logon_array, $content)) !== false) {
             if ($high_interest == "Y") {
                 thread_set_high_interest($tid);
             }
             email_send_notification($tid, $new_pid);
             email_send_thread_subscription($tid, $new_pid);
             email_send_folder_subscription($fid, $tid);
             if (perm_check_folder_permissions($fid, USER_PERM_POST_APPROVAL, $_SESSION['UID']) && !perm_is_moderator($_SESSION['UID'], $fid)) {
                 admin_send_post_approval_notification($fid);
             }
             if (sizeof($attachments) > 0 && ($attachments_array = attachments_get($_SESSION['UID'], $attachments)) !== false) {
                 foreach ($attachments_array as $attachment) {
                     post_add_attachment($tid, $new_pid, $attachment['aid']);
                 }
             }
         }
     }
 }
 if ($new_thread && isset($tid) && is_numeric($tid)) {
     $uri = "lmessages.php?webtag={$webtag}&msg={$tid}.1";
 } else {
     if (isset($return_msg)) {