本文整理汇总了PHP中header_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP header_redirect函数的具体用法?PHP header_redirect怎么用?PHP header_redirect使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了header_redirect函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: add
function add()
{
$input = array('username' => clear_all($_POST['username']), 'content' => clear_all($_POST['content']), 'pro_id' => intval($_GET['id']));
$this->db->insert_record($this->table, $input);
$this->db->alert(COMMENT_SUCCESS);
header_redirect(change_url(full_url()));
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:7,代码来源:class_comment_pro.php
示例2: commentwall_init
/**
* Comment wall initialisation.
*/
function commentwall_init()
{
global $CFG, $db, $function, $metatags, $template;
// Add meta tags
$metatags .= "<script type=\"text/javascript\" src=\"{$CFG->wwwroot}mod/commentwall/commentwall.js\"><!-- commentwall js --></script>";
// Define some templates
templates_add_context('commentwallobject', 'mod/commentwall/template');
templates_add_context('commentwallfooter', 'mod/commentwall/footer');
templates_add_context('css', 'mod/commentwall/css');
// Set up the database
$tables = $db->Metatables();
if (!in_array($CFG->prefix . "commentwall", $tables)) {
if (file_exists($CFG->dirroot . "mod/commentwall/{$CFG->dbtype}.sql")) {
modify_database($CFG->dirroot . "mod/commentwall/{$CFG->dbtype}.sql");
//reload system
header_redirect($CFG->wwwroot);
} else {
error("Error: Your database ({$CFG->dbtype}) is not yet fully supported by the Elgg commentwall. See the mod/commentwall directory.");
}
print_continue($CFG->wwwroot);
exit;
}
// Add configuration options
$function['userdetails:edit:details'][] = $CFG->dirroot . "mod/commentwall/lib/commentwall_settings.php";
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:28,代码来源:lib.php
示例3: elggadmin_pagesetup
function elggadmin_pagesetup()
{
// first login?
global $CFG;
if (user_flag_get('admin', $_SESSION['userid']) && !isset($CFG->elggadmin_installed)) {
$CFG->elggadmin_installed = true;
set_config('elggadmin_installed', true);
header_redirect(get_url(null, 'elggadmin::config'), __gettext('Welcome to the Elgg configuration manager!'));
}
if (context() == 'admin') {
if (!plugin_is_loaded('pages')) {
elgg_messages_add(__gettext('Error: <code>elggadmin</code> plugin needs <code>pages</code> plugin to run'));
} else {
pages_submenu_add('elggadmin', __gettext('Site administration'), get_url(null, 'elggadmin::'), 10);
}
} elseif (context() == 'elggadmin') {
if (!plugin_is_loaded('pages')) {
elgg_messages_add(__gettext('Error: <code>elggadmin</code> plugin needs <code>pages</code> plugin to run'));
header_redirect(get_url(null, 'admin::'));
}
// submenu options
pages_submenu_add('elggadmin', __gettext('Configuration manager'), get_url(null, 'elggadmin::'));
pages_submenu_add('elggadmin:theme', __gettext('Default theme editor'), get_url(null, 'elggadmin::theme'));
pages_submenu_add('elggadmin:frontpage', __gettext('Frontpage template editor'), get_url(null, 'elggadmin::frontpage'));
pages_submenu_add('elggadmin:logs', __gettext('Error log'), get_url(null, 'elggadmin::logs'));
sidebar_add(50, 'sidebar-' . elggadmin_currentpage(), elggadmin_sidebar());
// clear sidebar
$clear_sidebar[] = 'sidebar-profile';
$clear_sidebar[] = 'sidebar-' . elggadmin_currentpage();
sidebar_remove($clear_sidebar, true);
if (elggadmin_is_404()) {
header('HTTP/1.0 404 Not Found');
}
}
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:35,代码来源:lib.php
示例4: add
function add()
{
global $sitelink;
$input = array('name' => clear_all($_POST['name']), 'email' => clear_all($_POST['email']), 'subject' => clear_all($_POST['subject']), 'content' => clear_all($_POST['content']), 'date' => date('Y-m-d h:m:s'));
$this->db->insert_record($this->table, $input);
header_redirect($sitelink . $this->module . '/success');
}
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:7,代码来源:class_contact.php
示例5: generic_comments_init
function generic_comments_init()
{
global $CFG, $db, $function, $metatags, $template;
$metatags .= "<script type=\"text/javascript\" src=\"{$CFG->wwwroot}mod/generic_comments/generic_comments.js\"><!-- generic_comments js --></script>";
// create the generic_comments and generic watchlist table
$tables = $db->Metatables();
if (!in_array($CFG->prefix . "comments", $tables) || !in_array($CFG->prefix . "watchlist", $tables)) {
if (file_exists($CFG->dirroot . "mod/generic_comments/{$CFG->dbtype}.sql")) {
modify_database($CFG->dirroot . "mod/generic_comments/{$CFG->dbtype}.sql");
//reload system
header_redirect($CFG->wwwroot);
} else {
error("Error: Your database ({$CFG->dbtype}) is not yet fully supported by the Elgg generic comments. See the mod/generic_comments directory.");
}
print_continue("index.php");
exit;
}
$function['comments:init'][] = $CFG->dirroot . "mod/generic_comments/comments_actions.php";
$function['permissions:check'][] = $CFG->dirroot . "mod/generic_comments/permissions_check.php";
// Add annotation support
display_set_display_annotation_function("file::file", "generic_comments_displayobjectannotations");
display_set_display_annotation_function("mediastream::media", "generic_comments_displayobjectannotations");
// Register file river hook (if there)
if (function_exists('river_save_event')) {
river_register_friendlyname_hook('file::file', 'generic_comments_get_friendly_name');
}
templates_add_context('embeddedcomments', 'mod/generic_comments/comments');
templates_add_context('embeddedcomment', 'mod/generic_comments/comment');
templates_add_context('css', 'mod/generic_comments/css', true, false);
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:30,代码来源:lib.php
示例6: install_check
function install_check()
{
if (!file_exists(BH_INCLUDE_PATH . "config.inc.php")) {
header_redirect('./install/index.php');
}
install_check_php_version();
install_check_php_extensions();
install_check_mysql_version();
if (@file_exists('./install/index.php') && !defined("BEEHIVE_DEVELOPER_MODE")) {
install_draw_top();
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"500\">\n";
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"2\" class=\"subhead\">Installation Incomplete</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">Your Beehive Forum would appear to be already installed, but you have not removed the installation files. You must delete the 'install' directory before your Beehive Forum can be used.</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <form accept-charset=\"utf-8\" method=\"get\" action=\"index.php\">\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"500\">\n";
echo " <tr>\n";
echo " <td align=\"left\" width=\"500\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Retry\" class=\"button\" /></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
install_draw_bottom();
exit;
}
}
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:53,代码来源:install.inc.php
示例7: widget_init
function widget_init()
{
global $CFG, $function, $db, $METATABLES;
$function['init'][] = $CFG->dirroot . "mod/widget/init.php";
// Initialise the 'allcontent' widget array - i.e., widgets where Javascript is allowed
if (!isset($CFG->widgets->allcontent)) {
$CFG->widgets->allcontent = array();
}
// register the widgets that this module provides
$CFG->widgets->list[] = array('name' => gettext("Text box"), 'description' => gettext("Displays the text of your choice."), 'type' => "widget::text");
if (!in_array($CFG->prefix . "widget_data", $METATABLES) || !in_array($CFG->prefix . "widgets", $METATABLES)) {
if (file_exists($CFG->dirroot . "mod/widget/{$CFG->dbtype}.sql")) {
modify_database($CFG->dirroot . "mod/widget/{$CFG->dbtype}.sql");
//reload system
header_redirect($CFG->wwwroot);
} else {
error("Error: Your database ({$CFG->dbtype}) is not yet fully supported by the Elgg widgets. See the mod/widget directory.");
}
print_continue("index.php");
exit;
}
// Delete users
listen_for_event("user", "delete", "widget_user_delete");
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:24,代码来源:lib.php
示例8: header_redirect
// Redirect so that a reload doesn't write to the DB twice:
header_redirect($redirect_to);
/* EXITED */
break;
case 'remove_report':
// Remove one report on user:
// Check that this action request is not a CSRF hacked request:
$Session->assert_received_crumb('users');
$reporter_ID = param('reporter_ID', 'integer', true);
// Remove the report from DB:
$DB->query('DELETE FROM T_users__reports
WHERE urep_target_user_ID = ' . $DB->quote($edited_User->ID) . '
AND urep_reporter_ID = ' . $DB->quote($reporter_ID));
$Messages->add(T_('The report has been removed!'), 'success');
// Redirect so that a reload doesn't write to the DB twice:
header_redirect($admin_url . '?ctrl=user&user_tab=activity&user_ID=' . $edited_User->ID);
/* EXITED */
break;
}
}
// Used for autocomplete user fields in filter "Specific criteria" or to highlight user level cell on change
require_js('#jqueryUI#');
require_css('#jqueryUI_css#');
// We might delegate to this action from above:
/*if( $action == 'edit' )
{
$Plugins->trigger_event( 'PluginUserSettingsEditAction', $tmp_params = array( 'User' => & $edited_User ) );
$Session->delete( 'core.changepwd.request_id' ); // delete the request_id for password change request (from /htsrv/login.php)
}*/
$AdminUI->breadcrumbpath_init(false);
// fp> I'm playing with the idea of keeping the current blog in the path here...
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:users.ctrl.php
示例9: param
// Delete user field:
// Check that this action request is not a CSRF hacked request:
$Session->assert_received_crumb('userfieldgroup');
// Check permission:
$current_User->check_perm('users', 'edit', true);
// Make sure we got an ufgp_ID:
param('ufgp_ID', 'integer', true);
if (param('confirm', 'integer', 0)) {
// confirmed, Delete from DB:
$msg = sprintf(T_('User field group «%s» deleted.'), $edited_UserfieldGroup->dget('name'));
$edited_UserfieldGroup->dbdelete(true);
unset($edited_UserfieldGroup);
forget_param('ufgp_ID');
$Messages->add($msg, 'success');
// Redirect so that a reload doesn't write to the DB twice:
header_redirect('?ctrl=userfields', 303);
// Will EXIT
// We have EXITed already at this point!!
} else {
// not confirmed, Check for restrictions:
if (!$edited_UserfieldGroup->check_delete(sprintf(T_('Cannot delete user field group «%s»'), $edited_UserfieldGroup->dget('name')))) {
// There are restrictions:
$action = 'view';
}
}
break;
}
$AdminUI->breadcrumbpath_init(false);
// fp> I'm playing with the idea of keeping the current blog in the path here...
$AdminUI->breadcrumbpath_add(T_('Users'), '?ctrl=users');
$AdminUI->breadcrumbpath_add(T_('Settings'), '?ctrl=usersettings');
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:userfieldsgroups.ctrl.php
示例10: trim
} else {
$user_prefs['PM_NOTIFY_EMAIL'] = "N";
}
if (isset($_POST['anon_logon']) && is_numeric($_POST['anon_logon'])) {
$user_prefs['ANON_LOGON'] = $_POST['anon_logon'];
} else {
$user_prefs['ANON_LOGON'] = 0;
}
if (isset($_POST['dob_display'])) {
$user_prefs['DOB_DISPLAY'] = trim($_POST['dob_display']);
} else {
$user_prefs['DOB_DISPLAY'] = 0;
}
// Update USER_PREFS
if (user_update_prefs($_SESSION['UID'], $user_prefs, $user_prefs_global)) {
header_redirect("edit_email.php?webtag={$webtag}&updated=true");
exit;
} else {
$error_msg_array[] = gettext("Some or all of your user account details could not be updated. Please try again later.");
$valid = false;
}
}
// Check to see if we should show the set for all forums checkboxes
$show_set_all = forums_get_available_count() > 1 ? true : false;
html_draw_top(array('title' => gettext('My Controls - Email & Privacy'), 'class' => 'window_title', 'js' => array('js/prefs.js')));
echo "<h1>", htmlentities_array(gettext("Email & Privacy")), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
html_display_error_array($error_msg_array, '700', 'left');
} else {
if (isset($_GET['updated'])) {
html_display_success_msg(gettext("Preferences were successfully updated."), '700', 'left');
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:edit_email.php
示例11: skin_404_header
/**
* Sends the desired HTTP response header in case of a "404".
*/
function skin_404_header()
{
global $Blog;
// We have a 404 unresolved content error
// How do we want do deal with it?
switch ($resp_code = $Blog->get_setting('404_response')) {
case '404':
header_http_response('404 Not Found');
break;
case '410':
header_http_response('410 Gone');
break;
case '301':
case '302':
case '303':
// Redirect to home page:
header_redirect($Blog->get('url'), intval($resp_code));
// THIS WILL EXIT!
break;
default:
// Will result in a 200 OK
}
}
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:26,代码来源:_skin.funcs.php
示例12: die
*
* @todo iTunes podcast tags: http://www.apple.com/itunes/store/podcaststechspecs.html
* Note: itunes support: .m4a, .mp3, .mov, .mp4, .m4v, and .pdf.
*
* @package evoskins
* @subpackage rss
*
* @version $Id: index.main.php 3157 2013-03-06 04:34:44Z fplanque $
*/
if (!defined('EVO_MAIN_INIT')) {
die('Please, do not access this page directly.');
}
// EXTERNAL FEED PROVIDER?
$rss2_redirect = $Blog->get_setting('rss2_redirect');
if (!empty($rss2_redirect) && empty($Chapter) && $redir == 'yes') {
header_redirect($rss2_redirect, 301);
exit(0);
}
// Note: even if we request the same post as $Item earlier, the following will do more restrictions (dates, etc.)
// Init the MainList object:
init_MainList($Blog->get_setting('posts_per_feed'));
// What level of detail do we want?
$feed_content = $Blog->get_setting('feed_content');
if ($feed_content == 'none') {
// We don't want to provide this feed!
// This will normaly have been detected earlier but just for security:
debug_die('Feeds are disabled.');
}
$image_size = $Blog->get_setting('image_size');
headers_content_mightcache('application/xml');
// In most situations, you do NOT want to cache dynamic content!
开发者ID:ldanielz,项目名称:uesp.blog,代码行数:31,代码来源:index.main.php
示例13: html_guest_error
html_guest_error();
}
$error_msg_array = array();
if (isset($_POST['save'])) {
$valid = true;
if (isset($_POST['set_interest']) && is_array($_POST['set_interest'])) {
foreach ($_POST['set_interest'] as $folder) {
if ($valid && is_numeric($folder) && ($folder_title = folder_get_title($folder))) {
if (!user_set_folder_interest($folder, 0)) {
$error_msg_array[] = sprintf(gettext("Could not update interest on folder '%s'"), $folder_title);
$valid = false;
}
}
}
if ($valid) {
header_redirect("folder_subscriptions.php?webtag={$webtag}&updated=true");
exit;
}
}
}
if (isset($_GET['page']) && is_numeric($_GET['page'])) {
$page = $_GET['page'];
} else {
if (isset($_POST['page']) && is_numeric($_POST['page'])) {
$page = $_POST['page'];
} else {
$page = 1;
}
}
if (isset($_GET['view']) && is_numeric($_GET['view'])) {
$view = $_GET['view'];
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:folder_subscriptions.php
示例14: header_redirect
$tg2 = $ca[$i];
$arr[$i] = $arr[$j];
$ca[$i] = $ca[$j];
$arr[$j] = $tg1;
$ca[$j] = $tg2;
}
}
}
$image = $list_cards['image'];
$type_name = $list_cards['name'];
$featured = $list_cards['featured'];
$_SESSION['f'] = $list_cards['featured'];
$header_text = $list_cards['header_text'];
$footer_text = $list_cards['footer_text'];
} else {
header_redirect($sitelink);
}
if (count($ca) > 0) {
$top_list_names = "";
$head_name = $list_cards['head_name'] ? $list_cards['head_name'] : $type_name;
if ($list_cards['top_type_name'] && $list_cards['top_list']) {
$top_list_names = array_combine(explode(",", $list_cards['top_list']), explode("@||@|@", $list_cards['top_type_name']));
}
?>
<div class=card_pg_contain>
<div class="content-khongbiet">
<?php
$extraie1 = $extraie2 = $extraie3 = "";
if ($matchcase) {
开发者ID:sydneyDAD,项目名称:cardguys.com,代码行数:31,代码来源:list.php
示例15: gettext
if (isset($_POST['prune_log'])) {
$valid = true;
if (isset($_POST['remove_type']) && is_numeric($_POST['remove_type'])) {
$remove_type = $_POST['remove_type'];
} else {
$error_msg_array[] = gettext("You must specify an action type to remove");
$valid = false;
}
if (isset($_POST['remove_days']) && is_numeric($_POST['remove_days'])) {
$remove_days = $_POST['remove_days'];
} else {
$remove_days = 0;
}
if ($valid) {
if (admin_prune_log($remove_type, $remove_days)) {
header_redirect("admin_viewlog.php?webtag={$webtag}&sort_dir={$sort_dir}&sort_by={$sort_by}&group_by={$group_by}&pruned=true");
exit;
} else {
$error_msg_array[] = gettext("Failed To Prune Admin Log");
$valid = false;
}
}
}
html_draw_top(array('title' => gettext('Admin - Admin Access Log'), 'class' => 'window_title', 'main_css' => 'admin.css'));
$admin_log_array = admin_get_log_entries($page, $group_by, $sort_by, $sort_dir);
echo "<h1>", gettext("Admin"), html_style_image('separator'), gettext("Admin Access Log"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
html_display_error_array($error_msg_array, '86%', 'center');
} else {
if (isset($_GET['pruned'])) {
html_display_success_msg(gettext("Successfully Pruned Admin Log"), '86%', 'center');
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:admin_viewlog.php
示例16: form_submit
echo " <tr>\n";
echo " <td align=\"center\">", form_submit("confirm_unread_cutoff", gettext("Yes")), " ", form_submit("cancel_unread_cutoff", gettext("No")), "</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo "</form>\n";
echo "</div>\n";
html_display_warning_msg(gettext("Clicking 'No' will only cancel the unread cut-off changes. Other changes you've made will still be saved."), '600', 'center');
html_draw_bottom();
exit;
}
}
if (forum_save_global_settings($new_forum_settings)) {
if (isset($_POST['confirm_unread_cutoff'])) {
forum_update_unread_data($unread_cutoff_stamp);
}
header_redirect("admin_default_forum_settings.php?webtag={$webtag}&updated=true", gettext("Forum settings successfully updated"));
} else {
$valid = false;
$error_msg_array[] = gettext("Failed to update forum settings. Please try again later.");
}
}
$forum_global_settings = array_merge($forum_global_settings, $new_forum_settings);
}
// Start Output Here
html_draw_top(sprintf('title=%s', gettext("Admin - Global Forum Settings")), 'class=window_title', "admin.js", "emoticons.js");
echo "<h1>", gettext("Admin"), "<img src=\"", html_style_image('separator.png'), "\" alt=\"\" border=\"0\" />", gettext("Global Forum Settings"), "</h1>\n";
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
html_display_error_array($error_msg_array, '600', 'center');
} else {
if (isset($_GET['updated'])) {
html_display_success_msg(gettext("Preferences were successfully updated."), '600', 'center');
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_default_forum_settings.php
示例17: check_install
function check_install()
{
// Check the config file exists.
if (!file_exists(BH_INCLUDE_PATH . "config.inc.php")) {
header_redirect('./install/index.php');
}
// Check the PHP version
install_check_php_version();
// Check the PHP extensions
install_check_php_extensions();
// Check the MySQL version
install_check_mysql_version();
// Check if the installer files still exist. Ignore them
// if the BEEHIVE_DEVELOPER_MODE constant has been defined.
if (@file_exists('./install/index.php') && !defined("BEEHIVE_DEVELOPER_MODE")) {
echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\" dir=\"ltr\">\n";
echo "<head>\n";
echo "<title>Beehive Forum ", BEEHIVE_VERSION, " - Installation</title>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
echo html_include_css(html_get_forum_file_path('styles/default/style.css')), "\n";
echo "</head>\n";
echo "<body>\n";
echo "<h1>Beehive Forum Installation Error</h1>\n";
echo "<br />\n";
echo "<div align=\"center\">\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"400\">\n";
echo " <tr>\n";
echo " <td align=\"left\">\n";
echo " <table class=\"box\">\n";
echo " <tr>\n";
echo " <td align=\"left\" class=\"posthead\">\n";
echo " <table class=\"posthead\" width=\"500\">\n";
echo " <tr>\n";
echo " <td align=\"left\" colspan=\"2\" class=\"subhead\">Installation Incomplete</td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\">\n";
echo " <table class=\"posthead\" width=\"95%\">\n";
echo " <tr>\n";
echo " <td align=\"left\">Your Beehive Forum would appear to be already installed, but you have not removed the installation files. You must delete the 'install' directory before your Beehive Forum can be used.</td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"left\"> </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " <form accept-charset=\"utf-8\" method=\"get\" action=\"index.php\">\n";
echo " <table cellpadding=\"0\" cellspacing=\"0\" width=\"500\">\n";
echo " <tr>\n";
echo " <td align=\"left\" width=\"500\"> </td>\n";
echo " </tr>\n";
echo " <tr>\n";
echo " <td align=\"center\"><input type=\"submit\" name=\"submit\" value=\"Retry\" class=\"button\" /></td>\n";
echo " </tr>\n";
echo " </table>\n";
echo " </form>\n";
echo "</div>\n";
echo "</body>\n";
echo "</html>\n";
exit;
}
}
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:72,代码来源:install.inc.php
示例18: header_redirect
case 'cleanup':
// Delete all orphan Tag entries:
// Check that this action request is not a CSRF hacked request:
$Session->assert_received_crumb('tag');
// Check that current user has permission to edit tags:
$current_User->check_perm('options', 'edit', true);
$DB->query('DELETE T_items__itemtag FROM T_items__itemtag
LEFT JOIN T_items__item ON itag_itm_ID = post_ID
WHERE post_ID IS NULL');
$Messages->add(sprintf(T_('Removed %d associations with non-existing posts.'), $DB->rows_affected), 'success');
$DB->query('DELETE T_items__tag FROM T_items__tag
LEFT JOIN T_items__itemtag ON tag_ID = itag_tag_ID
WHERE itag_itm_ID IS NULL');
$Messages->add(sprintf(T_('Removed %d obsolete tag entries.'), $DB->rows_affected), 'success');
// Redirect so that a reload doesn't write to the DB twice:
header_redirect($admin_url . '?ctrl=itemtags', 303);
// Will EXIT
// We have EXITed already at this point!!
break;
}
$AdminUI->breadcrumbpath_init(false);
$AdminUI->breadcrumbpath_add(T_('Site'), $admin_url . '?ctrl=dashboard');
$AdminUI->breadcrumbpath_add(T_('Tags'), $admin_url . '?ctrl=itemtags');
if ($action == 'new' || $action == 'edit') {
$AdminUI->set_page_manual_link('item-tag-form');
} else {
$AdminUI->set_page_manual_link('item-tags-list');
}
// Display <html><head>...</head> section! (Note: should be done early if actions do not redirect)
$AdminUI->disp_html_head();
// Display title, menu, messages, etc. (Note: messages MUST be displayed AFTER the actions)
开发者ID:Ariflaw,项目名称:b2evolution,代码行数:31,代码来源:item_tags.ctrl.php
示例19: foreach
}
}
if ($valid && isset($_POST['preview'])) {
$message_data['CONTENT'] = $t_content;
$message_data['SUBJECT'] = $t_subject;
$message_data['FOLDER'] = PM_FOLDER_OUTBOX;
$message_data['ATTACHMENTS'] = $attachments;
} else {
if ($valid && isset($_POST['apply'])) {
if (sizeof($attachments) > 0 && ($attachments_array = attachments_get($_SESSION['UID'], $attachments)) !== false) {
foreach ($attachments_array as $attachment) {
pm_add_attachment($mid, $attachment['aid']);
}
}
if (pm_edit_message($mid, $t_subject, $t_content)) {
header_redirect("lpm.php?webtag={$webtag}&mid={$mid}");
exit;
} else {
$error_msg_array[] = gettext("Error creating PM! Please try again in a few minutes");
$valid = false;
}
} else {
if (isset($_POST['emots_toggle'])) {
if (isset($_POST['t_subject']) && strlen(trim($_POST['t_subject'])) > 0) {
$t_subject = trim($_POST['t_subject']);
}
if (isset($_POST['t_content']) && strlen(trim($_POST['t_content'])) > 0) {
$t_content = nl2br(fix_html(emoticons_strip($_POST['t_content'])));
}
if (isset($_POST['t_to_uid']) && is_numeric($_POST['t_to_uid'])) {
$t_to_uid = $_POST['t_to_uid'];
开发者ID:DeannaG65,项目名称:BeehiveForum,代码行数:31,代码来源:lpm_edit.php
示例20: array
$approved_user_success_array = array();
foreach ($approve_users as $user_uid) {
if ($valid && ($user_logon = user_get_logon($user_uid))) {
if (admin_approve_user($user_uid)) {
email_send_user_approved_notification($user_uid);
} else {
$error_msg_array[] = sprintf(gettext("Failed to approve user %s"), $user_logon);
$valid = false;
}
}
}
if ($valid) {
$redirect_uri = "admin_users.php?webtag={$webtag}&page={$page}";
$redirect_uri .= "&sort_by={$sort_by}&sort_dir={$sort_dir}&filter={$filter}";
$redirect_uri .= "&user_search=%s&approved=true";
header_redirect(sprintf($redirect_uri, htmlentities_array($user_search)));
exit;
}
}
}
}
}
}
}
if (isset($user_search) && strlen($user_search) > 0) {
$admin_user_array = admin_user_search($user_search, $sort_by, $sort_dir, $filter, $page);
} else {
$admin_user_array = admin_user_get_all($sort_by, $sort_dir, $filter, $page);
}
if (isset($error_msg_array) && sizeof($error_msg_array) > 0) {
html_display_error_array($error_msg_array, '86%', 'center');
开发者ID:richstokoe,项目名称:BeehiveForum,代码行数:31,代码来源:admin_users.php
注:本文中的header_redirect函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论