当前位置: 首页>>代码示例>>PHP>>正文


PHP bit_redirect函数代码示例

本文整理汇总了PHP中bit_redirect函数的典型用法代码示例。如果您正苦于以下问题:PHP bit_redirect函数的具体用法?PHP bit_redirect怎么用?PHP bit_redirect使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了bit_redirect函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

<?php

// $Header$
// Copyright( c )2002-2003, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
// All Rights Reserved. See below for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
// Initialization
require_once '../kernel/setup_inc.php';
// Is package installed and enabled
$gBitSystem->verifyPackage('articles');
require_once ARTICLES_PKG_PATH . 'BitArticle.php';
// Now check permissions to access this page
$gBitSystem->verifyPermission('p_articles_read');
if (!empty($_REQUEST['article_id'])) {
    $param = array('article_id' => (int) $_REQUEST['article_id']);
    bit_redirect(BitArticle::getDisplayUrlFromHash($param));
}
// Display the template
$gDefaultCenter = 'bitpackage:articles/center_display_articles.tpl';
$gBitSmarty->assignByRef('gDefaultCenter', $gDefaultCenter);
// Display the template
$gBitSystem->display('bitpackage:kernel/dynamic.tpl', tra('Articles'), array('display_mode' => 'display'));
开发者ID:bitweaver,项目名称:articles,代码行数:22,代码来源:index.php

示例2: array

<?php

$feedback = array();
if (!empty($_REQUEST['skip'])) {
    bit_redirect(PACKAGER_PKG_URL . 'install.php?step=' . ++$step);
}
if (!empty($_REQUEST['db_download'])) {
    if (!$gInstall->fetchRemoteXmlFiles()) {
        $feedback['error'] = $gInstall->mErrors;
    } else {
        $feedback['success'] = 'All required database table data was downloaded and stored in:<br />' . dirname($gInstall->getXmlFilepath($gInstall->mTables[0]));
    }
    $tables = $gInstall->mTables;
    $tables[] = 'kernel_config';
    foreach ($tables as $table) {
        $xmlFiles[$table] = is_file($gInstall->getXmlFilepath($table));
    }
    $gBitSmarty->assign('xmlFiles', $xmlFiles);
}
if (!empty($_REQUEST['db_update'])) {
    if (!empty($_REQUEST['debug'])) {
        $gBitSystem->debug();
    }
    if (!$gInstall->packagerXmlToDb()) {
        $feedback['error'] = $gInstall->mErrors;
    }
    $app = "_done";
    $gBitSmarty->assign('next_step', $step + 1);
} else {
    $gBitSmarty->assign('next_step', $step);
}
开发者ID:bitweaver,项目名称:packager,代码行数:31,代码来源:install_db_update.php

示例3: bit_redirect

 */
require_once '../kernel/setup_inc.php';
$gBitSystem->verifyPackage('fisheye');
require_once FISHEYE_PKG_PATH . 'FisheyeGallery.php';
require_once FISHEYE_PKG_PATH . 'FisheyeImage.php';
global $gBitSystem, $fisheyeErrors, $fisheyeWarnings, $fisheyeSuccess;
//$gDebug = TRUE;
include_once FISHEYE_PKG_PATH . 'gallery_lookup_inc.php';
if ($gContent && $gContent->isValid()) {
    $gBitSystem->setCanonicalLink($gContent->getDisplayUrl());
}
global $gHideModules;
$gHideModules = $gBitSystem->isFeatureActive('fisheye_gallery_hide_modules');
if (!$gContent->isValid()) {
    // No gallery was indicated so we will redirect to the browse galleries page
    bit_redirect(FISHEYE_PKG_URL . "list_galleries.php", '404');
    die;
}
if ($gContent->isCommentable()) {
    $commentsParentId = $gContent->mContentId;
    $comments_vars = array('fisheyegallery');
    $comments_prefix_var = 'fisheyegallery:';
    $comments_object_var = 'fisheyegallery';
    $comments_return_url = $_SERVER['SCRIPT_NAME'] . "?gallery_id=" . $gContent->mGalleryId;
    include_once LIBERTY_PKG_PATH . 'comments_inc.php';
}
if (!empty($_REQUEST['download'])) {
    // Checked against global users group assignment so that feature can be restricted on a group level.
    // If content was checked, user would always have permission to do this.
    $gContent->verifyUserPermission('p_fisheye_download_gallery_arc');
    $gContent->download();
开发者ID:bitweaver,项目名称:fisheye,代码行数:31,代码来源:view.php

示例4: array

<?php

require_once "../kernel/setup_inc.php";
require_once PACKAGER_PKG_PATH . "Packager.php";
require_once PACKAGER_PKG_PATH . "PackagerVersions.php";
require_once PACKAGER_PKG_PATH . "lookup_package.php";
require_once PACKAGER_PKG_PATH . "form_options_inc.php";
$gBitSystem->verifyPackage('packager');
$gBitSystem->verifyPermission('p_packager_edit_package');
$listHash = array('user_id' => $gBitUser->mUserId);
$packageList = $gPackager->getList($listHash);
$gBitSmarty->assign('packageList', $packageList);
$feedback = array();
if (!empty($_REQUEST['process_package']) && !empty($_FILES['package_upload']['tmp_name'])) {
    $storeHash = $_REQUEST;
    $storeHash['upload'] = $_FILES['package_upload'];
    if ($gVersions->store($storeHash)) {
        $gPackager->mPackage = $_REQUEST['package'];
        bit_redirect($gPackager->getDisplayUrl());
    } else {
        $feedback['error'] = $gVersions->mErrors;
    }
} elseif (!empty($_REQUEST['process_package'])) {
    // form was submitted but no file uploaded
    $feedback['error'] = tra('You did not provide us with a package.');
}
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:packager/upload.tpl', tra('Upload Package'), array('display_mode' => 'display'));
开发者ID:bitweaver,项目名称:packager,代码行数:28,代码来源:upload.php

示例5: array

<?php

require_once "../kernel/setup_inc.php";
require_once PACKAGER_PKG_PATH . "Packager.php";
require_once PACKAGER_PKG_PATH . "PackagerVersions.php";
require_once PACKAGER_PKG_PATH . "lookup_package.php";
require_once PACKAGER_PKG_PATH . "form_options_inc.php";
$gBitSystem->verifyPackage('packager');
//$gBitSystem->verifyPermission( 'p_packager_edit_package' );
$feedback = array();
// check that we're ready to roll
if (empty($_REQUEST['package'])) {
    bit_redirect(PACKAGER_PKG_URL);
} elseif (empty($gPackager->mInfo)) {
    $feedback['error'] = tra('The package you are looking for does not seem to exist');
}
$listHash = $_REQUEST;
$listHash['package'] = $gPackager->mPackage;
$versionList = $gVersions->getList($listHash);
$gBitSmarty->assign('versionList', $versionList);
$gBitSmarty->assign('feedback', $feedback);
$gBitSystem->display('bitpackage:packager/view_package.tpl', tra('View Package Details'), array('display_mode' => 'display'));
开发者ID:bitweaver,项目名称:packager,代码行数:22,代码来源:view_package.php

示例6: array

        $formHash['remove'] = TRUE;
        $formHash['nl_id'] = $gContent->mNewsletterId;
        $gBitSystem->confirmDialog($formHash, array('warning' => tra('Are you sure you want to delete this newsletter?') . ' ' . $gContent->getTitle()));
    } else {
        if ($gContent->expunge()) {
            header("Location: " . NEWSLETTERS_PKG_URL . 'newsletters.php');
            die;
        }
    }
} elseif (isset($_REQUEST["save"])) {
    $sid = $gContent->store($_REQUEST);
    $gContent->storePreference('registration_optin', !empty($_REQUEST['registration_optin']) ? $_REQUEST['registration_optin'] : NULL);
    header("Location: " . $_SERVER['SCRIPT_NAME']);
    die;
} elseif (!empty($_REQUEST['cancel'])) {
    bit_redirect(NEWSLETTERS_PKG_URL);
}
$gContent->invokeServices('content_edit_function');
$newsletters = $gContent->getList($listHash);
$gBitSmarty->assignByRef('newsletters', $newsletters);
$gBitSmarty->assignByRef('listInfo', $listHash);
// Fill array with possible number of questions per page
/*
$freqs = array();

for ($i = 0; $i < 90; $i++) {
	$aux["i"] = $i;

	$aux["t"] = $i * 24 * 60 * 60;
	$freqs[] = $aux;
}
开发者ID:bitweaver,项目名称:newsletters,代码行数:31,代码来源:newsletters.php

示例7: array

}
// eof: find gv for a particular order and set page
if ($_GET['action'] == 'confirmrelease' && BitBase::verifyId($_GET['gid'])) {
    $gv = $gBitDb->getRow("select release_flag from " . TABLE_COUPON_GV_QUEUE . " where unique_id=?", array($_GET['gid']));
    if ($gv['release_flag'] == 'N' && ($gv = $gBitDb->getRow("select customer_id, amount, order_id from " . TABLE_COUPON_GV_QUEUE . " where unique_id=?", array($_GET['gid'])))) {
        $fromUser = new BitUser($gv['customer_id']);
        $fromUser->load();
        if ($couponCode = CommerceVoucher::customerSendCoupon($fromUser, array('email' => $fromUser->getField('email'), 'to_name' => $fromUser->getDisplayName()), $gv['amount'])) {
            $gBitSmarty->assign('gvAmount', $currencies->format($gv['amount']));
            //send the message
            $textMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_purchase_email_text.tpl');
            $htmlMessage = $gBitSmarty->fetch('bitpackage:bitcommerce/gv_purchase_email_html.tpl');
            zen_mail($fromUser->getDisplayName(), $fromUser->getField('email'), TEXT_REDEEM_GV_SUBJECT . TEXT_REDEEM_GV_SUBJECT_ORDER . $gv['order_id'], $textMessage, STORE_NAME, EMAIL_FROM, $htmlMessage, 'gv_queue');
            $gBitDb->Execute("update " . TABLE_COUPON_GV_QUEUE . "\n\t\t\t\t\t\t  set `release_flag`= 'Y'\n\t\t\t\t\t\t  where `unique_id`='" . $_GET['gid'] . "'");
        }
        bit_redirect(BITCOMMERCE_PKG_URL . 'admin/gv_queue.php');
    }
}
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php 
echo HTML_PARAMS;
?>
>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php 
echo CHARSET;
?>
">
<title><?php 
echo TITLE;
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:gv_queue.php

示例8: BitBlogPost

    $gContent->addHit();
}
$now = $gBitSystem->getUTCTime();
$blogPost = new BitBlogPost();
$listHash = array();
$listHash['blog_id'] = $gContent->getField('blog_id');
$listHash['parse_data'] = TRUE;
$listHash['max_records'] = $gContent->getField('max_posts');
$listHash['load_num_comments'] = TRUE;
$blogPosts = $blogPost->getList($listHash);
if (count($blogPosts)) {
    // If there're more records then assign next_offset
    $gBitSmarty->assignByRef('blogPosts', $blogPosts);
    $gBitSmarty->assign('listInfo', $listHash);
} elseif ($gContent->hasPostPermission()) {
    bit_redirect(BLOGS_PKG_URL . 'post.php?blog_id=' . $gContent->getField('blog_id'));
}
if ($gBitSystem->isFeatureActive('users_watches')) {
    if ($gBitUser->isValid() && isset($_REQUEST['watch_event'])) {
        if ($_REQUEST['watch_action'] == 'add') {
            $blogPost = new BitBlogPost($_REQUEST['watch_object']);
            if ($blogPost->load()) {
                $gBitUser->storeWatch($_REQUEST['watch_event'], $_REQUEST['watch_object'], tra('blog'), $blogPost->getTitle(), $blogPost->getDisplayUrl());
            }
        } else {
            $gBitUser->expungeWatch($_REQUEST['watch_event'], $_REQUEST['watch_object']);
        }
    }
    $gBitSmarty->assign('user_watching_blog', 'n');
    if ($watch = $gBitUser->getEventWatches('blog_post', $listHash['blog_id'])) {
        $gBitSmarty->assign('user_watching_blog', 'y');
开发者ID:bitweaver,项目名称:blogs,代码行数:31,代码来源:display_bitblog_inc.php

示例9: bit_redirect

 * All Rights Reserved. See below for details and a complete list of authors.
 * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details.
 * @package boards
 * @subpackage functions
 */
/**
 * required setup
 */
require_once '../kernel/setup_inc.php';
// Is package installed and enabled
$gBitSystem->verifyPackage('boards');
// if we're getting a migrate id then lets move on right away
if (@BitBase::verifyId($_REQUEST['migrate_board_id'])) {
    require_once BOARDS_PKG_PATH . 'BitBoard.php';
    if ($_REQUEST['b'] = BitBoard::lookupByMigrateBoard($_REQUEST['migrate_board_id'])) {
        bit_redirect(BOARDS_PKG_URL . 'index.php?b=' . $_REQUEST['b']);
    }
}
// Load up the board
require_once BOARDS_PKG_PATH . 'lookup_inc.php';
if (!$gContent->isValid()) {
    $gBitSystem->fatalError("The board you requested could not be found. <a href='" . BOARDS_PKG_URL . "'>View all boards</a>", NULL, NULL, HttpStatusCodes::HTTP_GONE);
}
// approve or reject ananymous comments
if (!empty($_REQUEST['action'])) {
    // Check edit perms on the group
    $gContent->verifyUpdatePermission();
    // Check the ticket
    $gBitUser->verifyTicket();
    // Load up the comment as a board post
    require_once BOARDS_PKG_PATH . 'BitBoardPost.php';
开发者ID:bitweaver,项目名称:boards,代码行数:31,代码来源:view_board_inc.php

示例10: bit_redirect

 */
$gBitSystem->verifyPackage('diasalsa');
require_once DIASALSA_PKG_PATH . 'lookup_action_inc.php';
// check permissions to access this page
if (!$gContent->isValid()) {
    $gBitSystem->setHttpStatus(404);
    $gBitSystem->fatalError("The action you requested could not be found.");
}
$gContent->verifyAdminPermission();
// nuke it if request confirmed
if (isset($_REQUEST["confirm"])) {
    $gBitUser->verifyTicket();
    // If we're expunging we need to get an admin cookie from Salsa
    $gContent->loginAdmin();
    if ($gContent->expunge()) {
        bit_redirect(DIASALSA_PKG_URL);
    } else {
        $feedback['error'] = $gContent->mErrors;
        $gBitSmarty->assign('feedback', $feedback);
        $gBitSystem->setBrowserTitle('There were errors trying to remove ' . $gContent->getTitle());
        vd($gContent->mErrors);
        $gBitSystem->fatalError($gContent->mErrors);
    }
    // clean up
    $gContent->closeConnection();
} else {
    // confirm request
    $gBitSystem->setBrowserTitle('Confirm removal of ' . $gContent->getTitle());
    $msgHash = array('label' => tra('Remove Action'), 'confirm_item' => $gContent->getTitle(), 'warning' => tra('This will remove the action.'), 'error' => tra('This cannot be undone!'));
    $formHash['action_id'] = $gContent->mActionId;
    $gBitSystem->confirmDialog($formHash, $msgHash);
开发者ID:bitweaver,项目名称:diasalsa,代码行数:31,代码来源:remove_action.php

示例11: array

         $formHash['remove'] = TRUE;
         $formHash['structure_id'] = $_REQUEST['structure_id'];
         $msgHash = array('label' => tra('Remove content from Structure'), 'confirm_item' => $gContent->getTitle() . tra('and any subitems'), 'warning' => tra('This will remove the content from the structure but will <strong>not</strong> modify or remove the content itself.'));
         $gBitSystem->confirmDialog($formHash, $msgHash);
     }
 } elseif (isset($_REQUEST["move_node"])) {
     if ($_REQUEST["move_node"] == '1') {
         $gStructure->moveNodeWest();
     } elseif ($_REQUEST["move_node"] == '2') {
         $gStructure->moveNodeNorth();
     } elseif ($_REQUEST["move_node"] == '3') {
         $gStructure->moveNodeSouth();
     } elseif ($_REQUEST["move_node"] == '4') {
         $gStructure->moveNodeEast();
     }
     bit_redirect($_SERVER['SCRIPT_NAME'] . '?structure_id=' . $gStructure->mInfo["structure_id"]);
 } elseif (!empty($_REQUEST['submit_structure'])) {
     if ($gStructure->storeStructure($_REQUEST)) {
         $feedback['success'] = tra("Your changes were successfully saved.");
     } else {
         $feedback['error'] = $gStructure->mErrors;
     }
 } elseif (isset($_REQUEST["create"]) || isset($_REQUEST["action"]) && $_REQUEST["action"] == 'add') {
     $structureHash['root_structure_id'] = $rootStructure->mStructureId;
     $structureHash['parent_id'] = $_REQUEST['structure_id'];
     $after = null;
     if (isset($_REQUEST['after_ref_id'])) {
         $structureHash['after_ref_id'] = $_REQUEST['after_ref_id'];
     }
     if (!empty($_REQUEST['name'])) {
         $gStructure->s_create_page($_REQUEST["structure_id"], $after, $_REQUEST["name"], '');
开发者ID:kailIII,项目名称:liberty,代码行数:31,代码来源:edit_structure_inc.php

示例12: bit_redirect

$gBitSystem->verifyPackage('group');
require_once GROUP_PKG_PATH . 'lookup_group_inc.php';
// must be owner or admin to edit an existing group
if ($gContent->isValid()) {
    $gContent->verifyUpdatePermission();
    // if it has a custom theme lets theme it
    $gContent->setGroupStyle();
} else {
    $gContent->verifyCreatePermission();
}
// user canceled out get us out of here
if (!empty($_REQUEST['cancel'])) {
    if ($gContent->isValid()) {
        bit_redirect($gContent->getDisplayUrl());
    } else {
        bit_redirect(GROUP_PKG_URL);
    }
}
// get content types groups can associate with their group
$exclude = array('bitboard', 'bitgroup', 'bitcomment');
$formGroupContent = array();
foreach ($gLibertySystem->mContentTypes as $cType) {
    if (!in_array($cType['content_type_guid'], $exclude) && $gBitSystem->getConfig('group_content_' . $cType['content_type_guid'])) {
        $formGroupContent['guids'][$cType['content_type_guid']] = $gLibertySystem->getContentTypeName($cType['content_type_guid']);
    }
}
// If we are in preview mode then preview it!
if (isset($_REQUEST["preview"])) {
    $gContent->load();
    $gContent->preparePreview($_REQUEST);
    $gBitSmarty->assign('preview', 'y');
开发者ID:bitweaver,项目名称:groups,代码行数:31,代码来源:edit.php

示例13: RolePermUser

// ASSIGN USER TO ROLES
// Initialization
require_once '../../kernel/setup_inc.php';
$gBitSystem->verifyPermission('p_users_admin');
if (!$gBitUser->userExists(array('user_id' => $_REQUEST["assign_user"]))) {
    $gBitSystem->fatalError(tra("User doesnt exist"));
}
$assignUser = new RolePermUser($_REQUEST["assign_user"]);
$assignUser->load(TRUE);
if ($assignUser->isAdmin() && !$gBitUser->isAdmin()) {
    $gBitSystem->fatalError(tra('You cannot modify a system administrator.'));
}
if (isset($_REQUEST["action"])) {
    $gBitUser->verifyTicket();
    if ($_REQUEST["action"] == 'assign') {
        $assignUser->addUserToRole($assignUser->mUserId, $_REQUEST["role_id"]);
    } elseif ($_REQUEST["action"] == 'removerole') {
        $assignUser->removeUserFromRole($_REQUEST["assign_user"], $_REQUEST["role_id"]);
    }
    bit_redirect('assign_role_user.php?assign_user=' . $assignUser->mUserId);
} elseif (isset($_REQUEST['set_default'])) {
    $gBitUser->verifyTicket();
    $assignUser->storeUserDefaultRole($assignUser->mUserId, $_REQUEST['default_role']);
    $assignUser->load();
}
$gBitSmarty->assignByRef('assignUser', $assignUser);
$listHash = array('sort_mode' => 'role_name_asc');
$gBitSmarty->assign('roles', $gBitUser->getAllRoles($listHash));
$gBitSystem->setBrowserTitle('Edit User: ' . $assignUser->mUsername);
// Display the template
$gBitSystem->display('bitpackage:users/admin_assign_role_user.tpl', NULL, array('display_mode' => 'admin'));
开发者ID:bitweaver,项目名称:users,代码行数:31,代码来源:assign_role_user.php

示例14: tra

                    $reload = TRUE;
                } else {
                    $feedback['error'] = tra('There was a problem clearing out the cache.');
                }
            }
        }
    }
    // nexus needs to rewrite the cache right away to avoid errors
    if ($gBitSystem->isPackageActive('nexus') && ($_GET['prune'] == 'all' || $_GET['prune'] == 'nexus')) {
        require_once NEXUS_PKG_PATH . 'Nexus.php';
        $nexus = new Nexus();
        $nexus->rewriteMenuCache();
    }
    // depending on what we've just nuked, we need to reload the page
    if (!empty($reload)) {
        bit_redirect(KERNEL_PKG_URL . "admin/admin_system.php?pruned=1");
    }
}
if (!empty($_GET['compiletemplates'])) {
    cache_templates(BIT_ROOT_PATH, $gBitLanguage->getLanguage(), $_GET['compiletemplates']);
}
foreach ($diskUsage as $key => $item) {
    $diskUsage[$key]['du'] = du($item['path']);
}
$gBitSmarty->assign('diskUsage', $diskUsage);
$languages = array();
$languages = $gBitLanguage->listLanguages();
ksort($languages);
$templates = array();
$langdir = TEMP_PKG_PATH . "templates_c/" . $gBitSystem->getConfig('style') . "/";
foreach (array_keys($languages) as $clang) {
开发者ID:bitweaver,项目名称:kernel,代码行数:31,代码来源:admin_system.php

示例15: bit_redirect

/**
 * @package fisheye
 * @subpackage functions
 */
/**
 * required setup
 */
require_once '../kernel/setup_inc.php';
require_once FISHEYE_PKG_PATH . 'FisheyeGallery.php';
require_once FISHEYE_PKG_PATH . 'FisheyeImage.php';
global $gBitSystem;
include_once FISHEYE_PKG_PATH . 'image_lookup_inc.php';
if ($gContent->isValid()) {
    $gContent->verifyUpdatePermission();
} else {
    bit_redirect(FISHEYE_PKG_URL . '?user_id=' . $gBitUser->mUserId);
}
//Utility function, maybe should be moved for use elsewhere. Seems like it has a multitude of possible hook points
function convertSmartQuotes($string)
{
    //UTF-8
    $search = array("‘", "’", "“", "”", "–", "—", "…");
    $replace = array("'", "'", '"', '"', '-', '--', '...');
    $string = str_replace($search, $replace, $string);
    //Windows
    $search = array(chr(145), chr(146), chr(147), chr(148), chr(150), chr(151), chr(133));
    $replace = array("'", "'", '"', '"', '-', '--', '...');
    $string = str_replace($search, $replace, $string);
    return $string;
}
if (!empty($_REQUEST['edit'])) {
开发者ID:bitweaver,项目名称:fisheye,代码行数:31,代码来源:edit_image.php


注:本文中的bit_redirect函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。