Ejemplo n.º 1
0
//
//--------------------------------------------------------------------------------------------------
if (!defined('IN_PHPBB') || !defined('IN_PRIVMSG')) {
    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;
Ejemplo n.º 2
0
//
//--------------------------------------------------------------------------------------------------
if (!defined('IN_PHPBB') || !defined('IN_PRIVMSG')) {
    die('Hacking attempt');
}
//--------------------------
//
//  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'));
}
Ejemplo n.º 3
0
                if (!empty($rules_word)) {
                    $rules_type = 4;
                } else {
                    $rules_type = 3;
                }
            }
        }
    }
    // get data from form
    $rules_folder_id = _read_var('rules_folder_id', 1, $rules_folder_id);
    $rules_name = unprepare_message(trim(str_replace("\\'", "''", htmlspecialchars(_read_var('rules_name', 0, $rules_name)))));
    $rules_type = _read_var('rules_type', 1, $rules_type);
    $rules_group_id = _read_var('rules_group_id', 1, $rules_group_id);
    $rules_username = unprepare_message(trim(str_replace("\\'", "''", htmlspecialchars(_read_var('username', 0, $rules_username)))));
    $rules_sysuser = _read_var('rules_sysuser', 1, $rules_sysuser);
    $rules_word = unprepare_message(trim(str_replace("\\'", "''", htmlspecialchars(_read_var('rules_word', 0, $rules_word)))));
}
if ($pmmode == 'rdelete') {
    if ($cancel) {
        $pmmode = 'redit';
        $cancel = false;
    } else {
        if ($confirm) {
            if ($error) {
                $l_link = 'Click_return_folders';
                $u_link = append_sid("{$main_pgm}&pmmode=rlist&folder={$folder_id}");
                _message_return($error_msg, $l_link, $u_link);
            }
            if (!$error) {
                $sql = "DELETE FROM " . PRIVMSGA_RULES_TABLE . "\n                        WHERE rules_id = {$rules_id}\n                            AND rules_user_id = {$view_user_id}";
                if (!($result = $db->sql_query($sql))) {
Ejemplo n.º 4
0
// censor word
$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
Ejemplo n.º 5
0
} else {
    if ($submit) {
        // some checks
        if (empty($privmsg_to_user_ids)) {
            _error('No_to_user');
        }
        if (empty($subject)) {
            _error('Empty_subject');
        }
        if (empty($message)) {
            _error('Empty_message');
        }
        // send the message
        if (!$error) {
            $w_id = $pmmode == 'edit' ? $privmsg_id : 0;
            $error_msg = send_pm($w_id, $view_userdata, $privmsg_to_user_ids, trim(strip_tags(_read_var('subject'))), trim(_read_var('message')), intval($post_icon), $html_on, $bbcode_on, $smilies_on, $attach_sig);
            if (!empty($error_msg)) {
                $error = true;
            }
        }
        // send end message
        if (!$error) {
            $u_link = append_sid("{$main_pgm}&folder=" . INBOX);
            $l_link = _lang('Click_return_inbox');
            _message_return('Message_sent', $l_link, $u_link);
        }
    }
}
// display the page
$page_title = _lang('Read_pm');
if (!defined('IN_PCP')) {