die('Hacking attempt');
}
//--------------------------
//
//  get parameters
//
//--------------------------
_hidden_init();
// vars
$folder_id = _read_var('folder', 1, INBOX);
$search_folder = _read_var('search_folder', 1);
$username = htmlspecialchars(unprepare_message(stripslashes(urldecode(_read_var('username')))));
$words = htmlspecialchars(unprepare_message(stripslashes(urldecode(_read_var('words')))));
// buttons
$submit = _button_var('submit_search');
$cancel = _button_var('cancel');
//-----------------------------
//
//	performed some checks
//
//-----------------------------
$error = false;
$error_msg = '';
// folder
if (!isset($folders['data'][$folder_id])) {
    $folder_id = INBOX;
}
$folder_main = $folder_id;
if (!empty($folders['main'][$folder_id])) {
    $folder_main = $folders['main'][$folder_id];
}
//  get parameters
//
//--------------------------
_hidden_init();
// vars
$folder_id = _read_var('folder', 1, INBOX);
$to_folder = _read_var('to_folder', 1);
$msg_days = _read_var('msgdays', 1);
$mark_ids = _read_var('mark_ids', 21, array());
// buttons
$delete = _button_var('delete');
$move = _button_var('move');
$savemails = _button_var('savemails');
$confirm = _button_var('confirm');
$cancel = _button_var('cancel');
$refresh = _button_var('refresh');
// compatibility
if (empty($folder_id)) {
    $folder_id = INBOX;
}
// folder
if (!isset($folders['data'][$folder_id])) {
    message_die(GENERAL_MESSAGE, _lang('No_such_folder'));
}
$folder_main = $folder_id;
if (!empty($folders['main'][$folder_id])) {
    $folder_main = $folders['main'][$folder_id];
}
// destination sub-folder
if (empty($to_folder)) {
    $to_folder = $folder_main;
// vars
$folder_id = _read_var('folder', 1, INBOX);
$rules_id = _read_var('rules_id', 1, 0, 'rule');
// buttons
$confirm = _button_var('confirm');
$cancel = _button_var('cancel');
$refresh = _button_var('refresh');
$add_folder = _button_var('add_folder');
$submit_folder = _button_var('submit_folder');
$delete_folder = _button_var('delete_folder');
$cancel_folder = _button_var('cancel_folder');
$return_folder = _button_var('return_folder');
$add_rules = _button_var('add_rules');
$submit_rules = _button_var('submit_rules');
$delete_rules = _button_var('delete_rules');
$cancel_rules = _button_var('cancel_rules');
// folder
if (!isset($folders['data'][$folder_id])) {
    message_die(GENERAL_MESSAGE, _lang('No_such_folder'));
}
$folder_main = $folder_id;
if (!empty($folders['main'][$folder_id])) {
    $folder_main = $folders['main'][$folder_id];
}
// adjust the pmmode
if ($add_folder) {
    $pmmode = 'fcreate';
}
if ($delete_folder) {
    _hide('return_folder', true);
    $pmmode = 'fdelete';
Esempio n. 4
0
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
//--------------------------
//
//  get parameters
//
//--------------------------
_hidden_init();
// vars
$view_user_id = _read_var(POST_USERS_URL, 1, $userdata['user_id']);
$pmmode = _read_var('pmmode');
$pm_start = _read_var('start', 1);
$msg_days = _read_var('msgdays', 1);
$privmsg_recip_id = _read_var(POST_POST_URL, 1);
if (_button_var('return_main')) {
    $pmmode = '';
    $pm_start = 0;
}
// user
if ($view_user_id != ANONYMOUS) {
    $sql = "SELECT * FROM " . USERS_TABLE . " WHERE user_id = {$view_user_id}";
    if (!($result = $db->sql_query($sql))) {
        message_die(GENERAL_ERROR, 'Can\'t read user data', '', __LINE__, __FILE__, $sql);
    }
}
if ($view_user_id == ANONYMOUS || !($view_userdata = $db->sql_fetchrow($result))) {
    message_die(GENERAL_MESSAGE, 'No_such_user');
}
// verify the user is authorized
check_user($view_userdata, $main_pgm);
        }
    }
}
// continue with the message
$post_icon = _read_var('post_icon', 1, $post_icon);
$subject = _read_var('subject', 12, $subject);
$message = _read_var('message', 12, $message);
// check if Post icon mod installed and if icon exists
if (!$mod_post_icon) {
    $post_icon = 0;
}
if ($submit || $refresh) {
    $bbcode_on = !_button_var('disable_bbcode') && $board_config['allow_bbcode'];
    $html_on = !_button_var('disable_html') && $board_config['allow_html'];
    $smilies_on = !_button_var('disable_smilies') && $board_config['allow_smilies'];
    $attach_sig = _button_var('attach_sig') && $board_config['allow_sig'];
}
//-----------------------------
//
//  preview
//
//-----------------------------
if ($preview) {
    $bbcode_uid = $bbcode_on ? $bbcode_parse->make_bbcode_uid() : '';
    $preview_message = stripslashes(prepare_message(addslashes(unprepare_message($message)), $html_on, $bbcode_on, $smilies_on, $bbcode_uid));
    $preview_subject = $subject;
    if (!$html_on || !$view_userdata['user_allowhtml']) {
        $preview_message = preg_replace('#(<)([\\/]?.*?)(>)#is', '&lt;\\2&gt;', $preview_message);
        if (!empty($user_sig)) {
            $user_sig = preg_replace('#(<)([\\/]?.*?)(>)#is', '&lt;\\2&gt;', $user_sig);
        }