• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP bit_redirect函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: array

<?php

$themeSettings = array('site_use_jscalendar' => array('label' => 'Enable JSCalendar', 'note' => 'If checked, a calendar popup allows for easily selecting a date using an appealing interface.'), 'themes_collapsible_modules' => array('label' => 'Collapsible modules', 'note' => 'This allows users to collapse modules by clicking on their titles. Can be useful if you use many modules.'), 'site_disable_fat' => array('label' => "Disable fading", 'note' => "If checked, success, warning or error messages display no fading effect anymore."), 'site_disable_jstabs' => array('label' => "Disable Javascript tabs", 'note' => "If checked, admin pages flow vertically, instead of displaying in a 'tabbed pages' interface."), 'site_fancy_zoom' => array('label' => "Enable Fancy Zoom for images", 'note' => "If checked, a Javascript zooms images when clicking on them. This will modify the behaviour when viewing most images. If you are running a commercial site, please read the license notice in /util/javascript/fancyzoom/js-global/FancyZoom.js."), 'site_mods_req_admn_grp' => array('label' => 'Modules require membership', 'note' => 'If enabled, modules with group/role restrictions require the administrator to be member of the group/role. If disabled, all modules are always visible to administrators.'), 'themes_joined_js_css' => array('label' => 'Joined CSS and JS', 'note' => 'If enabled, javascript and CSS files will be concatenated into single files to reduce server requests. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_packed_js_css' => array('label' => 'Packed CSS and JS', 'note' => 'If enabled, javascript and CSS files will be reduced to their smallest possible size. This is useful for webdesigners and developers. Please enable this feature on live sites.'), 'themes_disable_pkg_css' => array('label' => 'Disable All Package CSS', 'note' => 'If checked, all css that is automatically included by packages will be disabled. If you want to include some of the package css it is recommended you copy that css to your theme css file.'));
$gBitSmarty->assign('themeSettings', $themeSettings);
if (!empty($_REQUEST['change_prefs'])) {
    $pref_simple_values = array("site_biticon_display_style", "site_icon_size", "themes_jquery_hosting", "default_icon_style");
    foreach ($pref_simple_values as $svitem) {
        simple_set_value($svitem, THEMES_PKG_NAME);
    }
    foreach (array_keys($themeSettings) as $toggle) {
        simple_set_toggle($toggle, THEMES_PKG_NAME);
    }
    // due to the packing / joining options, we will remove the cache and reload the page
    $gBitThemes->mThemeCache->expungeCache();
    bit_redirect(KERNEL_PKG_URL . "admin/index.php?page=themes");
}
// set the options biticon takes
$biticon_display_options = array('icon' => tra('Icon'), 'text' => tra('Text'), 'icon_text' => tra('Icon and Text'));
$gBitSmarty->assign("biticon_display_options", $biticon_display_options);
// get the icon styles
$subDirs = array('style_info');
$iconStyles = $gBitThemes->getStylesList(CONFIG_PKG_PATH . "styles/icons/", NULL, $subDirs);
foreach ($iconStyles as $key => $style) {
    $iconStyles[$key] = str_replace("_", " ", $style['style']);
}
$gBitSmarty->assign_by_ref("iconStyles", $iconStyles);
$biticon_sizes = array('small' => tra('Small'), 'large' => tra('Large'));
$gBitSmarty->assign("biticon_sizes", $biticon_sizes);
// These numbers are intentionally off by 1 due to the way IE fixes name their js
$jqueryOptions = array('jquery' => tra('Google Hosted'), 'jquerylocal' => tra('Local'));
$gBitSmarty->assign('jqueryOptions', $jqueryOptions);
开发者ID:kailIII,项目名称:themes,代码行数:31,代码来源:admin_themes_inc.php


示例17: switch

    switch ($_REQUEST['action']) {
        case 'switch_status':
            $status = $gBitDb->getOne("SELECT coupon_restrict FROM " . TABLE_COUPON_RESTRICT . " WHERE restrict_id = ?", array($_GET['info']));
            $new_status = $status == 'N' ? 'Y' : 'N';
            $gBitDb->query("UPDATE " . TABLE_COUPON_RESTRICT . " SET coupon_restrict = ? WHERE restrict_id = ?", array($new_status, $_GET['info']));
            bit_redirect($_SERVER['SCRIPT_NAME'] . '?cid=' . $gCoupon->mCouponId);
            break;
        case 'Add':
            $gCoupon->storeRestriction($_REQUEST);
            bit_redirect($_SERVER['SCRIPT_NAME'] . '?cid=' . $gCoupon->mCouponId);
            break;
        case 'remove':
            if (!empty($_GET['info'])) {
                $gBitDb->query("delete from " . TABLE_COUPON_RESTRICT . " where restrict_id = ?", array($_GET['info']));
            }
            bit_redirect($_SERVER['SCRIPT_NAME'] . '?cid=' . $gCoupon->mCouponId);
            break;
    }
}
if (isset($_POST['cPath_prod'])) {
    $current_category_id = $_POST['cPath_prod'];
} else {
    $_POST['cPath_prod'] = NULL;
}
$productsList = $gBitDb->getAssoc("select p.`products_id`, pd.`products_name` from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.`products_id` = pd.`products_id` and pd.`language_id` = ? and p.`products_id` = p2c.`products_id` and p2c.`categories_id` = ? order by pd.`products_name`", array($_SESSION['languages_id'], $_POST['cPath_prod']));
$gBitSmarty->assign_by_ref('productsList', $productsList);
$gBitSmarty->assign_by_ref('gCoupon', $gCoupon);
require_once BITCOMMERCE_PKG_PATH . 'classes/CommerceProductManager.php';
$productManager = new CommerceProductManager();
$gBitSmarty->assign('optionsList', $productManager->getOptionsList());
$categoryTree = zen_get_category_tree();
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:coupon_restrict.php


示例18: bit_redirect

<?php

/**
 * $Id$
 * @package address
 * @subpackage 
 */
// required setup
require_once '../kernel/setup_inc.php';
$gBitSystem->verifyPackage('address');
include_once ADDRESS_PKG_PATH . 'lookup_inc.php';
if (!$gContent->isValid()) {
    $gBitSystem->fatalError("No address indicated");
}
$gContent->verifyExpungePermission();
if (isset($_REQUEST["confirm"])) {
    if ($gContent->expunge()) {
        bit_redirect(ADDRESS_PKG_URL);
    } else {
        vd($gContent->mErrors);
    }
}
$gBitSystem->setBrowserTitle(tra('Confirm delete of: ') . $gContent->getTitle());
$formHash['remove'] = TRUE;
$formHash['address_id'] = $_REQUEST['address_id'];
$msgHash = array('label' => tra('Delete Address'), 'confirm_item' => $gContent->getTitle(), 'warning' => tra('This address will be completely deleted.<br />This cannot be undone!'));
$gBitSystem->confirmDialog($formHash, $msgHash);
开发者ID:bitweaver,项目名称:address,代码行数:27,代码来源:remove.php


示例19: TreasuryItem

$listHash['max_records'] = -1;
$listHash['content_permission'] = 'p_treasury_upload_item';
$galleryList = $gContent->getList($listHash);
$gBitSmarty->assign('galleryList', $galleryList);
// if we have no gallery we can upload our stuff into and we can't create a new one, we can't upload a file
if (empty($galleryList) && !$gBitUser->hasPermission('p_treasury_create_gallery')) {
    $gBitSystem->fatalPermission('p_treasury_upload_item');
}
if (!empty($_REQUEST['content_id'])) {
    $galleryContentIds[] = $_REQUEST['content_id'];
    $gBitSmarty->assign('galleryContentIds', $galleryContentIds);
}
if (!empty($_REQUEST['treasury_store'])) {
    $treasuryItem = new TreasuryItem();
    if ($treasuryItem->batchStore($_REQUEST)) {
        bit_redirect($_REQUEST['redirect']);
    } else {
        vd($treasuryItem->mErrors);
    }
}
if ($gBitSystem->isPackageActive('gigaupload')) {
    gigaupload_smarty_setup(TREASURY_PKG_URL . 'upload.php');
} elseif ($gBitSystem->isFeatureActive('treasury_extended_upload_slots')) {
    $gBitThemes->loadAjax('mochikit');
} else {
    $gBitThemes->loadJavascript(UTIL_PKG_PATH . 'javascript/libs/multifile.js', TRUE);
}
$gContent->invokeServices('content_edit_function');
$gBitSmarty->assign('feedback', !empty($feedback) ? $feedback : NULL);
// get the ajax file browser working
if ($gBitSystem->isFeatureActive('treasury_file_import_path') && $gBitUser->hasPermission('p_treasury_import_item')) {
开发者ID:bitweaver,项目名称:treasury,代码行数:31,代码来源:upload.php


示例20: bit_redirect

        bit_redirect(BITCOMMERCE_PKG_URL . 'admin/products_options.php');
    }
} elseif (!empty($_REQUEST['save_attribute'])) {
    $productManager->storeOptionsValue($_REQUEST, $_FILES);
    bit_redirect(BITCOMMERCE_PKG_URL . 'admin/products_options.php');
} elseif (!empty($_REQUEST['save_attribute_map'])) {
    $gBitProduct->expungeAllAttributes();
    if (!empty($_REQUEST['products_options'])) {
        foreach ($_REQUEST['products_options'] as $optionId) {
            $gBitProduct->storeAttributeMap($optionId);
        }
    }
    bit_redirect(BITCOMMERCE_PKG_URL . 'admin/products_options.php?products_id=' . $gBitProduct->getField('products_id'));
} elseif (!empty($_REQUEST['save_option'])) {
    if ($productManager->storeOption($_REQUEST, $_FILES)) {
        bit_redirect(BITCOMMERCE_PKG_URL . 'admin/products_options.php');
    } else {
        bit_error_log('option store failed');
        bit_error_log($_REQUEST);
    }
}
$listHash = array();
$groups = $gBitUser->getAllGroups($listHash);
$groupList[] = '';
foreach ($groups as $group) {
    $groupList[$group['group_id']] = $group['group_name'];
}
$gBitSmarty->assign_by_ref('groupList', $groupList);
if (!empty($editTpl)) {
    $gBitSmarty->assign_by_ref('editTpl', $editTpl);
}
开发者ID:bitweaver,项目名称:commerce,代码行数:31,代码来源:products_options.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP bitcoinvaluetoa函数代码示例发布时间:2022-05-24
下一篇:
PHP birch_ns函数代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap