Exemplo n.º 1
0
// $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');
}
require_once './common.php';
require_once PHORUM_PATH . '/include/api/sign.php';
// CSRF protection: we do not accept posting to this script,
// when the browser does not include a Phorum signed token
// in the request.
phorum_api_request_check_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_api_output("message");
    }
    return;
}
// No forum id was set. Take the user back to the index.
if (!isset($PHORUM["forum_id"])) {
    phorum_api_redirect(PHORUM_INDEX_URL);
}
// Somehow we got to a folder in posting.php. Take the
// user back to the folder.
Exemplo n.º 2
0
Arquivo: pm.php Projeto: netovs/Core
// $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');
require_once './common.php';
require_once PHORUM_PATH . '/include/api/format/messages.php';
require_once PHORUM_PATH . '/include/api/ban.php';
require_once PHORUM_PATH . '/include/api/mail/pm_notify.php';
phorum_api_request_require_login(TRUE);
// CSRF protection: we do not accept posting to this script,
// when the browser does not include a Phorum signed token
// in the request.
phorum_api_request_check_token();
// set all our common URL's
phorum_build_common_urls();
// If private messages are disabled, just show a simple error message.
if (!$PHORUM["enable_pm"]) {
    $PHORUM["DATA"]["BLOCK_CONTENT"] = $PHORUM["DATA"]["LANG"]["PMDisabled"];
    phorum_api_output("stdblock");
    return;
}
// ------------------------------------------------------------------------
// Parameter handling
// ------------------------------------------------------------------------
// Retrieve a parameter from either the args-list or $_POST.
// Do typecasting if requested.
function phorum_getparam($name, $type = NULL)
{
Exemplo n.º 3
0
/**
 * @deprecated Replaced by {@link phorum_api_request_check_token()}.
 */
function phorum_check_posting_token($page = NULL)
{
    return phorum_api_request_check_token($page);
}