コード例 #1
0
ファイル: pm.php プロジェクト: mgs2/kw-forum
// tool won't recognize them automatically. Therefore they are
// mentioned here.
// $PHORUM["DATA"]["LANG"]["PMFolderCreateSuccess"]
// $PHORUM["DATA"]["LANG"]["PMFolderRenameSuccess"]
// $PHORUM["DATA"]["LANG"]["PMFolderDeleteSuccess"]
// $PHORUM["DATA"]["LANG"]["PMSent"]
// PMTODO If reading from a mail notify, lookup the folder_id,
//        so the close button will work. Now the folder_id is empty.
// PMTODO implement pm_reply_flag functionality
define('phorum_page', 'pm');
include_once "./common.php";
phorum_require_login();
// CSRF protection: we do not accept posting to this script,
// when the browser does not include a Phorum signed token
// in the request.
phorum_check_posting_token();
// set all our common URL's
phorum_build_common_urls();
include_once "./include/email_functions.php";
include_once "./include/format_functions.php";
// a user has to be logged in to use the private messages system
if (!$PHORUM["DATA"]["LOGGEDIN"]) {
    phorum_redirect_by_url(phorum_get_url(PHORUM_LIST_URL));
    exit;
}
// if the user is not fully logged in, send him to the login page
if (!$PHORUM["DATA"]["FULLY_LOGGEDIN"]) {
    // Construct the URL to redirect to after logging in.
    $args = array(PHORUM_PM_URL);
    foreach ($PHORUM["args"] as $k => $v) {
        if (in_array("{$k}={$v}", $PHORUM["DATA"]["GET_VARS"])) {
コード例 #2
0
ファイル: posting.php プロジェクト: sleepy909/cpassman
// $PHORUM["postingargs"][0] the forum id
// $PHORUM["postingargs"][1] the mode to use (post,reply,quote,edit,moderation)
// $PHORUM["postingargs"][2] the message id to work with (omit for "post")
//
// ----------------------------------------------------------------------
// Basic setup and checks
// ----------------------------------------------------------------------
if (!defined('phorum_page')) {
    define('phorum_page', 'post');
}
include_once "./common.php";
include_once "include/format_functions.php";
// CSRF protection: we do not accept posting to this script,
// when the browser does not include a Phorum signed token
// in the request.
$posting_token = phorum_check_posting_token('post');
// Check if the Phorum is in read-only mode.
if (isset($PHORUM["status"]) && $PHORUM["status"] == PHORUM_MASTER_STATUS_READ_ONLY && empty($PHORUM['user']['admin'])) {
    if (!(isset($PHORUM["postingargs"]["as_include"]) && $PHORUM["postingargs"]["as_include"])) {
        phorum_build_common_urls();
        // Only show header and footer when not included in another page.
        phorum_output("message");
    }
    return;
}
// No forum id was set. Take the user back to the index.
if (!isset($PHORUM["forum_id"])) {
    $dest_url = phorum_get_url(PHORUM_INDEX_URL);
    phorum_redirect_by_url($dest_url);
    exit;
}