} else { // set the page title and include the page header $page_title = _lang('Rules_management'); if (!defined('IN_PCP')) { include $phpbb_root_path . 'includes/page_header.' . $phpEx; } // template name $template->set_filenames(array('body' => 'privmsga_rules_edit_body.tpl')); // send header privmsg_header($view_user_id, $folder_id); // Header $template->assign_vars(array('L_TITLE' => _lang('Rules_management'), 'L_NAME' => _lang('Rules_name'), 'L_NAME_EXPLAIN' => _lang('Rules_name_explain'), 'L_RFOLDER' => _lang('Folder'), 'L_RFOLDER_EXPLAIN' => _lang('Rules_folder_explain'), 'L_GROUP' => _lang('Group'), 'L_GROUP_EXPLAIN' => _lang('Rules_group_explain'), 'L_USERNAME' => _lang('Username'), 'L_USERNAME_EXPLAIN' => _lang('Rules_user_explain'), 'L_WORD' => _lang('Rules_word'), 'L_WORD_EXPLAIN' => _lang('Rules_word_explain'), 'L_RULE_TYPE' => _lang('Rules_type'), 'L_RULE_TYPE_EXPLAIN' => _lang('Rules_type_explain'), 'L_RULE_TYPE_GROUP' => _lang('Rules_type_group'), 'L_RULE_TYPE_USER' => _lang('Rules_type_user'), 'L_RULE_TYPE_SYSUSER' => _lang('Rules_type_sysuser'), 'L_SYSUSER_EXPLAIN' => _lang('Rules_sysuser_explain'), 'L_RULE_TYPE_WORD' => _lang('Rules_type_word'), 'L_SUBMIT' => _lang('Submit'), 'L_EDIT' => _lang('Edit'), 'L_DELETE' => _lang('Delete'), 'L_CANCEL' => _lang('Cancel'), 'L_FIND_USERNAME' => _lang('Find_username'), 'U_SEARCH_USER' => append_sid("./search.{$phpEx}?mode=searchuser"))); // folders list $s_folders = get_folders_list(0, $rules_folder_id); // groups list $s_groups = get_groups_list($view_userdata, $rules_group_id); $s_groups = '<option value="">' . _lang('Select_group') . '</option><option value="">' . str_repeat('-', strlen(_lang('Select_group')) + 5) . '</option>' . $s_groups; // data $template->assign_vars(array('RULES_NAME' => $rules_name, 'S_FOLDERS' => $s_folders, 'RULES_TYPE_GROUP' => $rules_type == 1 ? 'checked="checked"' : '', 'RULES_TYPE_USER' => $rules_type == 2 ? 'checked="checked"' : '', 'RULES_TYPE_SYSUSER' => $rules_type == 3 ? 'checked="checked"' : '', 'RULES_TYPE_WORD' => $rules_type == 4 ? 'checked="checked"' : '', 'GROUP_DISPLAY' => $rules_type == 1 ? '' : 'none', 'USER_DISPLAY' => $rules_type == 2 ? '' : 'none', 'SYSUSER_DISPLAY' => $rules_type == 3 ? '' : 'none', 'WORD_DISPLAY' => $rules_type == 4 ? '' : 'none', 'S_GROUPS' => $s_groups, 'RULES_USERNAME' => $rules_username, 'RULES_WORD' => $rules_word)); // system _hide('pmmode', $pmmode); _hide('folder', $folder_id); _hide(POST_USERS_URL, $view_user_id); _hide('sid', $userdata['session_id']); $template->assign_vars(array('S_ACTION' => append_sid($main_pgm), 'S_HIDDEN_FIELDS' => _hidden_get())); // send to browser privmsg_footer(); $template->pparse('body'); if (!defined('IN_PCP')) { include $phpbb_root_path . 'includes/page_tail.' . $phpEx; }
$showhost = verifyparam("hostname", "/^on\$/", "") == "on"; $forcesecure = verifyparam("secure", "/^on\$/", "") == "on"; $modsecurity = verifyparam("modsecurity", "/^on\$/", "") == "on"; $lang = verifyparam("lang", "/^[\\w-]{2,5}\$/", ""); if (!$lang || !in_array($lang, $image_locales)) { $lang = in_array($current_locale, $image_locales) ? $current_locale : $image_locales[0]; } $file = "../locales/{$lang}/button/{$image}_on.gif"; $size = get_gifimage_size($file); $imagehref = get_app_location($showhost, $forcesecure) . "/b.php?i={$image}&lang={$lang}"; if ($groupid) { $imagehref .= "&group={$groupid}"; } $message = get_image($imagehref, $size[0], $size[1]); $page = array(); $page['buttonCode'] = generate_button("", $lang, $style, $groupid, $message, $showhost, $forcesecure, $modsecurity); $page['availableImages'] = array_keys($imageLocales); $page['availableLocales'] = $image_locales; $page['availableStyles'] = $stylelist; $page['groups'] = get_groups_list(); $page['formgroup'] = $groupid; $page['formstyle'] = $style; $page['formimage'] = $image; $page['formlang'] = $lang; $page['formhostname'] = $showhost; $page['formsecure'] = $forcesecure; $page['formmodsecurity'] = $modsecurity; prepare_menu($operator); setup_getcode_tabs(0); start_html_output(); require '../view/getcode_image.php';
} else { $bbcode_status = _lang('BBCode_is_OFF'); } // Smilies toggle selection if ($board_config['allow_smilies']) { $smilies_status = _lang('Smilies_are_ON'); $template->assign_block_vars('switch_smilies_checkbox', array()); } else { $smilies_status = _lang('Smilies_are_OFF'); } // Signature toggle selection if ($board_config['allow_sig']) { $template->assign_block_vars('switch_signature_checkbox', array()); } // header $template->assign_vars(array('SUBJECT' => $subject, 'TO_USERS' => $to_users, 'MESSAGE' => $message, 'HTML_STATUS' => $html_status, 'SMILIES_STATUS' => $smilies_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid("faq.{$phpEx}?mode=bbcode") . '" target="_phpbbcode">', '</a>'), 'FORUM_NAME' => _lang('Private_Message'), 'L_USERNAMES' => _lang('Recipients'), 'L_ADD_GROUP' => _lang('Select_group'), 'S_GROUPS_LIST' => get_groups_list($view_userdata), 'BOX_NAME' => $l_box_name, 'L_SUBJECT' => _lang('Subject'), 'L_MESSAGE_BODY' => _lang('Message_body'), 'L_OPTIONS' => _lang('Options'), 'L_SPELLCHECK' => _lang('Spellcheck'), 'L_PREVIEW' => _lang('Preview'), 'L_SUBMIT' => _lang('Submit'), 'L_CANCEL' => _lang('Cancel'), 'L_POST_A' => $post_a, 'L_FIND_USERNAME' => _lang('Find_username'), 'L_FIND' => _lang('Find'), 'L_DISABLE_HTML' => _lang('Disable_HTML_pm'), 'L_DISABLE_BBCODE' => _lang('Disable_BBCode_pm'), 'L_DISABLE_SMILIES' => _lang('Disable_Smilies_pm'), 'L_ATTACH_SIGNATURE' => _lang('Attach_signature'), 'S_HTML_CHECKED' => !$html_on ? ' checked="checked"' : '', 'S_BBCODE_CHECKED' => !$bbcode_on ? ' checked="checked"' : '', 'S_SMILIES_CHECKED' => !$smilies_on ? ' checked="checked"' : '', 'S_SIGNATURE_CHECKED' => $attach_sig ? ' checked="checked"' : '', 'S_NAMES_SELECT' => $user_names_select, 'U_SEARCH_USER' => append_sid("./search.{$phpEx}?mode=searchuser&multi=1"), 'U_VIEW_FORUM' => '', 'U_REVIEW_TOPIC' => $review ? append_sid("{$main_pgm}&pmmode=review&" . POST_POST_URL . "={$privmsg_recip_id}&" . POST_USERS_URL . "={$view_user_id}") : '')); // add bbcodes bbcodes_posting(); // post icon mod installed if ($mod_post_icon) { // get the number of icon per row from config $icon_per_row = isset($board_config['icon_per_row']) ? intval($board_config['icon_per_row']) : 10; if ($icon_per_row <= 1) { $icon_per_row = 10; } // get the list of icon available to the user $icones_sort = array(); for ($i = 0; $i < count($icones); $i++) { switch ($icones[$i]['auth']) { case AUTH_ADMIN: if ($userdata['user_level'] == ADMIN) {