コード例 #1
0
                 $poll_closes = time() + DAY_IN_SECONDS * 7;
             } else {
                 if ($close_poll == POLL_CLOSE_THIRTY_DAYS) {
                     $poll_closes = time() + DAY_IN_SECONDS * 30;
                 } else {
                     if ($close_poll == POLL_CLOSE_NEVER) {
                         $poll_closes = false;
                     }
                 }
             }
         }
     }
     $tid = post_create_thread($fid, $uid, $thread_title, 'Y', 'N');
     $pid = post_create($fid, $tid, 0, $uid, 0, '');
     poll_create($tid, $poll_questions_array, $poll_closes, $change_vote, $poll_type, $show_results, $poll_vote_type, $option_type, $allow_guests);
     post_save_attachment_id($tid, $pid, $aid);
     if (strlen($message_text) > 0) {
         if ($allow_sig == true && strlen(trim($sig_text)) > 0) {
             $message_text .= "<div class=\"sig\">{$sig_text}</div>";
         }
         post_create($fid, $tid, 1, $uid, $uid, $message_text);
     }
     if ($high_interest == "Y") {
         thread_set_high_interest($tid);
     }
 }
 if (isset($tid) && $tid > 0) {
     $uri = "discussion.php?webtag={$webtag}&msg={$tid}.1";
 } else {
     $uri = "discussion.php?webtag={$webtag}";
 }
コード例 #2
0
ファイル: post.php プロジェクト: richstokoe/BeehiveForum
             $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) {
             $uri = "discussion.php?webtag={$webtag}&msg={$t_tid}.{$t_rpid}";
         } else {
             $uri = "discussion.php?webtag={$webtag}";