function thoul_redirect($url) { global $db, $cache; if (!empty($cache)) { // // Unload the Cache. // $cache->unload(); } if (!empty($db)) { $db->sql_close(); } $url = append_sid($url, true); $server = server_specs(); $url = preg_replace('#^\\/?(.*?)\\/?$#', '/\\1', trim($url)); // Redirect via an HTML form for PITA webservers if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) { header('Refresh: 0; URL=' . $server['protocol'] . $server['name'] . $server['port'] . $server['script'] . $url); echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server['protocol'] . $server['name'] . $server['port'] . $server['script'] . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server['protocol'] . $server['name'] . $server['port'] . $server['script'] . $url . '">HERE</a> to be redirected</div></body></html>'; exit; } // Behave as per HTTP/1.1 spec for others header('Location: ' . $server['protocol'] . $server['name'] . $server['port'] . $server['script'] . $url); exit; }
$smiles_array[$row['emoticon']] = $row; } if (count($smiles_array)) { $board_config['smilies_path'] = $phpbb_root_path . $board_config['smilies_path']; $template->assign_block_vars('switch_smilies_dropdown', array()); $template->assign_vars(array('L_SELECT_SMILE' => $lang['Select_emoticon'], 'S_SMILEY_BASEDIR' => $board_config['smilies_path'])); foreach ($smiles_array as $val) { $template->assign_block_vars('switch_smilies_dropdown.smilies_row', array('S_SMILE_NAME' => $val['emoticon'], 'S_SMILE_CODE' => $val['code'], 'S_SMILE_URL' => $val['smile_url'])); } } } else { $smilies_status = $lang['Smilies_are_OFF']; } // Signature toggle selection - only show if // the user has a signature // if ($user_sig != '') { $template->assign_block_vars('switch_signature_checkbox', array()); } if (!$site_id) { $s_hidden_fields = '<input type="hidden" name="simple" value="1" /><input type="hidden" name="sid" value="' . $userdata['session_id'] . '" /><input type="hidden" name="mode" value="' . $mode . '" />'; $template->assign_block_vars('switch_find', array()); $template->assign_block_vars('switch_bbcode_controls', array()); $template->assign_block_vars('switch_font_controls', array()); $template->assign_block_vars('switch_save', array()); $template->assign_block_vars('switch_smilies_status', array()); } else { $server = server_specs(); $s_hidden_fields = '<input type="hidden" name="simple" value="1" /><input type="hidden" name="site_url" value="' . htmlspecialchars($server['protocol'] . $server['name'] . $server['port'] . $server['script'] . '/') . '" /><input type="hidden" name="mode" value="' . $mode . '" /><input type="hidden" name="from_username" value="' . htmlspecialchars($userdata['username']) . '" /><input type="hidden" name="success_close" value="' . $im_userdata['success_close'] . '" /><input type="hidden" name="from_userid" value="' . $userdata['user_id'] . '" />'; } $template->assign_vars(array('SUBJECT' => preg_replace($html_entities_match, $html_entities_replace, $instant_subject), 'USERNAME' => preg_replace($html_entities_match, $html_entities_replace, $to_username), 'MESSAGE' => $instant_message, 'HTML_STATUS' => $html_status, 'SMILIES_STATUS' => $smilies_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="' . append_sid($phpbb_root_path . "faq.{$phpEx}?mode=bbcode") . '" target="_phpbbcode">', '</a>'), 'FORUM_NAME' => $lang['Private_message'], 'L_SUBJECT' => $lang['Subject'], 'L_MESSAGE' => $lang['Message'], 'L_OPTIONS' => $lang['Options'], 'L_SUBMIT' => $lang['Submit'], 'L_RESET' => $lang['Reset'], 'L_CLOSE_WINDOW' => $lang['Close_window'], 'L_CANCEL' => $lang['Cancel'], 'L_POST_A' => $post_a, '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'], 'L_SAVE_SENT' => $lang['Save_message'], 'L_EMPTY_MESSAGE' => $lang['Empty_message'], 'L_FIND_USERNAME' => $lang['Find_username'], 'U_IM_PATH' => PRILL_PATH, 'L_COLOR' => $lang['Color'], 'L_COLOR_DEFAULT' => $lang['color_default'], 'L_COLOR_DARK_RED' => $lang['color_dark_red'], 'L_COLOR_RED' => $lang['color_red'], 'L_COLOR_ORANGE' => $lang['color_orange'], 'L_COLOR_BROWN' => $lang['color_brown'], 'L_COLOR_YELLOW' => $lang['color_yellow'], 'L_COLOR_GREEN' => $lang['color_green'], 'L_COLOR_OLIVE' => $lang['color_olive'], 'L_COLOR_CYAN' => $lang['color_cyan'], 'L_COLOR_BLUE' => $lang['color_blue'], 'L_COLOR_DARK_BLUE' => $lang['color_dark_blue'], 'L_COLOR_INDIGO' => $lang['color_indigo'], 'L_COLOR_VIOLET' => $lang['color_violet'], 'L_COLOR_WHITE' => $lang['color_white'], 'L_COLOR_BLACK' => $lang['color_black'], 'L_SIZE' => $lang['Size'], 'L_FONT_TINY' => $lang['font_tiny'], 'L_FONT_SMALL' => $lang['font_small'], 'L_FONT_NORMAL' => $lang['font_normal'], 'L_FONT_LARGE' => $lang['font_large'], 'L_FONT_HUGE' => $lang['font_huge'], 'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'], 'L_STYLES_TIP' => $lang['Styles_tip'], '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_HIDDEN_FORM_FIELDS' => $s_hidden_fields, 'U_SEARCH_USER' => append_sid($phpbb_root_path . "search.{$phpEx}?mode=searchuser"), 'S_POST_ACTION' => append_sid($s_form_action)));