本文整理汇总了PHP中httpredir函数的典型用法代码示例。如果您正苦于以下问题:PHP httpredir函数的具体用法?PHP httpredir怎么用?PHP httpredir使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了httpredir函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: __construct
protected final function __construct()
{
if (isset($GLOBALS['session'])) {
//If the language is trying to be changed try to change it
if ((isset($_POST['set_language']) && ($switch = $_POST['set_language']) || isset($_GET['set_language']) && ($switch = $_GET['set_language'])) && $this->_valid($switch)) {
$GLOBALS['session']->set('language', $switch, 'client');
httpredir(currentPage(array('set_language')));
} else {
//See if the language is set in the session
if (!CC_IN_ADMIN && $GLOBALS['session']->has('language', 'client')) {
$this->_language = $GLOBALS['session']->get('language', 'client');
} elseif (CC_IN_ADMIN) {
$admin_lang = $GLOBALS['session']->get('user_language', 'admin');
$this->_language = !empty($admin_lang) ? $admin_lang : $GLOBALS['config']->get('config', 'default_language');
} else {
//Try the default config language
$cl = $GLOBALS['config']->get('config', 'default_language');
$this->_language = !empty($cl) && file_exists(CC_ROOT_DIR . '/language/' . $cl . '.xml') && $this->_valid($cl) ? $cl : 'en-GB';
if (file_exists(CC_ROOT_DIR . '/language/' . $this->_language . '.xml')) {
//Set the language to the session
$GLOBALS['session']->set('language', $this->_language, 'client');
} else {
trigger_error('No valid language found!', E_USER_ERROR);
}
}
}
} else {
$this->_language = 'en-GB';
}
$GLOBALS['smarty']->assign("CURRENT_LANGUAGE", $this->_language);
$this->loadLang();
}
开发者ID:briansandall,项目名称:v6,代码行数:32,代码来源:language.class.php
示例2: process
public function process()
{
$order = Order::getInstance();
$cart_order_id = $_POST['orderRef'];
$order_summary = $order->getSummary($cart_order_id);
if (isset($_POST['signature'])) {
$check = $_POST;
unset($check['signature']);
ksort($check);
$build_query = http_build_query($check, '', '&');
$build_query = preg_replace('/%0D%0A|%0A%0D|%0A|%0D/i', '%0A', $build_query);
$sig_check = $_POST['signature'] == hash("SHA512", $build_query . $this->_module['merchant_passphrase']);
} else {
$sig_check = true;
}
if ($_POST['responseCode'] == '0' && $sig_check) {
$order->orderStatus(Order::ORDER_PROCESS, $cart_order_id);
$order->paymentStatus(Order::PAYMENT_SUCCESS, $cart_order_id);
}
$transData['notes'] = $sig_check == true ? 'response signature check verified' : 'response signature check failed';
$transData['gateway'] = 'CharityClear';
$transData['order_id'] = $_POST['orderRef'];
$transData['trans_id'] = $_POST['xref'];
$transData['amount'] = $_POST['amountReceived'] > 0 ? $_POST['amountReceived'] / 100 : '';
$transData['status'] = $_POST['responseMessage'];
$transData['customer_id'] = $order_summary['customer_id'];
$transData['extra'] = '';
$order->logTransaction($transData);
$url = explode('/modules/gateway/CharityClear', $GLOBALS['storeURL']);
httpredir($url[0] . '/index.php?_a=complete');
// ccNow doesn't send back any data at all right now so we have to leave it pending
//httpredir(currentPage(array('_g', 'type', 'cmd', 'module'), array('_a' => 'complete')));
return false;
}
开发者ID:digitaldevelopers,项目名称:Cubecart-Hosted-Module,代码行数:34,代码来源:gateway.class.php
示例3: __construct
protected final function __construct()
{
$cache = Cache::getInstance();
// Should we be showing prices?
if (Config::getInstance()->get('config', 'catalogue_hide_prices') && !User::getInstance()->is() && !CC_IN_ADMIN && !$GLOBALS['session']->has('admin_id', 'admin_data')) {
Session::getInstance()->set('hide_prices', true);
} else {
Session::getInstance()->delete('hide_prices');
}
// Switch Currency
if (isset($_POST['set_currency']) && !empty($_POST['set_currency']) && ($switch = $_POST['set_currency']) || isset($_GET['set_currency']) && !empty($_GET['set_currency']) && ($switch = $_GET['set_currency'])) {
if (preg_match('#^[A-Z]{3}$#i', $switch) && ($currency = $GLOBALS['db']->select('CubeCart_currency', array('updated'), array('code' => (string) $switch, 'active' => 1)))) {
$GLOBALS['session']->set('currency', $switch, 'client');
}
httpredir(currentPage(array('set_currency')));
}
// Autoload tax tables
$this->loadCurrencyVars();
}
开发者ID:Dirty-Butter,项目名称:v6,代码行数:19,代码来源:tax.class.php
示例4: __construct
public function __construct()
{
if ($GLOBALS['config']->get('config', 'ssl') && !ADMIN_CP && !CC_SSL && !in_array($_GET['_g'], $this->_ignored_pages)) {
$current_url = currentPage();
$current_url = preg_replace('#^http://#', 'https://', $current_url);
$ssl_url = $GLOBALS['config']->get('config', 'ssl_url');
if (preg_match('#^' . $ssl_url . '#', $current_url)) {
// Make sure the domain for SSL is expected
httpredir($current_url, '', false, 301);
} else {
// If not we try to make it based on what we have
$url_parts = parse_url($current_url);
$url_parts['path'] = str_replace($GLOBALS['config']->get('config', 'ssl_path'), '/', $url_parts['path']);
$ssl_url .= !empty($url_parts['path']) ? $url_parts['path'] : '';
$ssl_url .= !empty($url_parts['query']) ? '?' . $url_parts['query'] : '';
$anchor = !empty($url_parts['fragment']) ? '#' . $url_parts['fragment'] : '';
httpredir($ssl_url, $anchor, false, 301);
}
}
}
开发者ID:Geotex,项目名称:v6,代码行数:20,代码来源:ssl.class.php
示例5: process
public function process()
{
$coinbase_order = $this->coinbase->call("orders/" . $_GET["order"]["uuid"])->data;
$order = Order::getInstance();
if ($coinbase_order->status == "mispaid") {
$order->orderStatus(Order::ORDER_PENDING, $this->order_number);
$order->paymentStatus(Order::PAYMENT_PENDING, $this->order_number);
$transData['notes'] = "Bitcoin payment mispaid";
$order->logTransaction($transData);
$GLOBALS['gui']->setError("Your Bitcoin payment was the incorrect amount. Please contact support to resolve your order.");
} elseif ($coinbase_order->status == "expired") {
$order->orderStatus(Order::ORDER_PENDING, $this->order_number);
$order->paymentStatus(Order::PAYMENT_PENDING, $this->order_number);
$transData['notes'] = "Bitcoin payment expired";
$order->logTransaction($transData);
$GLOBALS['gui']->setError("Your Bitcoin payment has expired before you could make your payment. Please contact support to resolve your order.");
} else {
$order->orderStatus(Order::ORDER_PROCESS, $this->order_number);
$order->paymentStatus(Order::PAYMENT_SUCCESS, $this->order_number);
$transData['notes'] = "Bitcoin payment successful";
$order->logTransaction($transData);
}
httpredir(currentPage(array('_g', 'type', 'cmd', 'module'), array('_a' => 'complete')));
}
开发者ID:digitaldevelopers,项目名称:cubecart-coinbase,代码行数:24,代码来源:gateway.class.php
示例6: die
<?php
/**
* CubeCart v6
* ========================================
* CubeCart is a registered trade mark of CubeCart Limited
* Copyright CubeCart Limited 2015. All rights reserved.
* UK Private Limited Company No. 5323904
* ========================================
* Web: http://www.cubecart.com
* Email: [email protected]
* License: GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
*/
if (!defined('CC_INI_SET')) {
die('Access Denied');
}
Admin::getInstance()->permissions('settings', CC_PERM_FULL, true);
global $lang, $glob;
$hash = randomString();
$file = CC_ROOT_DIR . '/files/hash.' . $hash . '.php';
$fp = fopen($file, 'w');
fwrite($fp, '<?php echo "' . $hash . '"; unlink("' . $file . '"); ?>');
fclose($fp);
httpredir('https://www.cubecart.com/store/auth/?hash=' . $hash . '&url=' . urlencode(CC_STORE_URL));
开发者ID:Dirty-Butter,项目名称:v6,代码行数:24,代码来源:marketplace.index.inc.php
示例7: redirectToProductPage
/**
* Redirect to product page
*/
public function redirectToProductPage($productID)
{
if (isset($_GET['_g']) && $_GET['_g'] == 'ajaxadd') {
$GLOBALS['debug']->supress();
die('Redir:' . $GLOBALS['seo']->buildURL('prod', $productID));
} else {
httpredir("index.php?_a=product&product_id={$productID}");
}
}
开发者ID:Geotex,项目名称:v6,代码行数:12,代码来源:cart.class.php
示例8: foreach
$existing_languages = $db->select('CubeCart_email_content', 'DISTINCT `language`');
$missing_languages = $languages;
## Loop existing languages and remove to leave missing languages array with the ones we need to import
if ($existing_languages) {
foreach ($existing_languages as $key => $value) {
unset($missing_languages[$value['language']]);
}
}
## Import missing language email templates if they exist... pukka
if (is_array($missing_languages)) {
foreach ($missing_languages as $code => $lang) {
$language->importEmail('email_' . $code . '.xml');
}
}
// Set version number
if (!$GLOBALS['db']->select('CubeCart_history', false, array('version' => CC_VERSION))) {
$GLOBALS['db']->insert('CubeCart_history', array('version' => CC_VERSION, 'time' => time()));
}
## Progressive updates completed
## Redirect to the 'complete' page
$_SESSION['setup']['complete'] = true;
if ($_SESSION['setup']['autoupgrade']) {
httpredir('../admin.php?_g=maintenance&node=index#upgrade');
}
httpredir('index.php', 'upgraded');
}
$GLOBALS['smarty']->assign('LANG_UPGRADE_IN_PROGRESS', sprintf($strings['setup']['upgrade_in_progress'], $current, $version));
$GLOBALS['smarty']->append('MODE_UPGRADE_PROGRESS', true);
}
$GLOBALS['smarty']->assign('MODE_UPGRADE', true);
}
开发者ID:kblok,项目名称:v6,代码行数:31,代码来源:setup.upgrade.php
示例9: die
* ========================================
* CubeCart is a registered trade mark of CubeCart Limited
* Copyright CubeCart Limited 2015. All rights reserved.
* UK Private Limited Company No. 5323904
* ========================================
* Web: http://www.cubecart.com
* Email: [email protected]
* License: GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
*/
if (!defined('CC_INI_SET')) {
die('Access Denied');
}
Admin::getInstance()->permissions('statistics', CC_PERM_READ, true);
global $lang;
if (isset($_POST['select'])) {
httpredir(currentPage(null, $_POST['select']));
}
$select['year'] = isset($_GET['year']) && is_numeric($_GET['year']) ? (int) $_GET['year'] : date('Y');
$select['month'] = isset($_GET['month']) && in_array($_GET['month'], range(1, 12)) ? str_pad((int) $_GET['month'], 2, '0', STR_PAD_LEFT) : date('m');
$select['day'] = isset($_GET['day']) && in_array($_GET['day'], range(1, 31)) ? str_pad((int) $_GET['day'], 2, '0', STR_PAD_LEFT) : date('d');
$select['status'] = isset($_GET['status']) && in_array($_GET['status'], range(1, 6)) ? (int) $_GET['status'] : 3;
// Sales
$GLOBALS['main']->addTabControl($lang['statistics']['title_sales'], 'stats_sales');
$earliest_order = $GLOBALS['db']->select('CubeCart_order_summary', array('MIN' => 'order_date'), array('status' => $select['status']), array('order_date' => 'ASC'));
// $earliest_order will always return true but MIN_order_date may not have a value
$yearly = $monthly = $daily = $hourly = array();
if (!empty($earliest_order[0]['MIN_order_date'])) {
$earliest = array('year' => date('Y', $earliest_order[0]['MIN_order_date']), 'month' => date('m', $earliest_order[0]['MIN_order_date']), 'day' => date('d', $earliest_order[0]['MIN_order_date']));
$orders_all = $GLOBALS['db']->select('CubeCart_order_summary', array('total', 'cart_order_id', 'order_date'), array('status' => (int) $select['status']));
if ($orders_all) {
foreach ($orders_all as $key => $data) {
开发者ID:Geotex,项目名称:v6,代码行数:31,代码来源:statistics.index.inc.php
示例10: array
$filter['field'] = $_GET['field'];
$filter['sort'] = $_GET['sort'];
} else {
$filter['field'] = 'time';
$filter['sort'] = 'DESC';
}
if (!empty($_GET['keywords'])) {
$where = array('review' => '~' . $_GET['keywords']);
}
$reviews = $GLOBALS['db']->select('CubeCart_reviews', false, $where, array($filter['field'] => $filter['sort']), $per_page, $page);
if (isset($_GET['product_id']) && is_numeric($_GET['product_id'])) {
$product = $GLOBALS['db']->select('CubeCart_inventory', array('name'), array('product_id' => (int) $_GET['product_id']));
}
if (!$reviews && isset($product) && $product) {
$GLOBALS['main']->setACPWarning($lang['reviews']['error_reviews_none']);
httpredir(currentPage(array('product_id')), 'search');
}
if ($reviews) {
$GLOBALS['smarty']->assign('PAGINATION', $GLOBALS['db']->pagination(false, $per_page, $page, 9));
foreach ($reviews as $review) {
if (($product = $GLOBALS['db']->select('CubeCart_inventory', array('name'), array('product_id' => $review['product_id']))) !== false) {
$review['product'] = $product[0];
$review['date'] = formatTime($review['time']);
$review['delete'] = currentPage(null, array('delete' => (int) $review['id']));
$review['edit'] = currentPage(null, array('edit' => (int) $review['id']));
$smarty_data['reviews'][] = $review;
} else {
$GLOBALS['db']->delete('CubeCart_reviews', array('product_id' => $review['product_id']));
}
}
if (isset($smarty_data['reviews'])) {
开发者ID:Dirty-Butter,项目名称:v6,代码行数:31,代码来源:products.reviews.inc.php
示例11: die
* Copyright CubeCart Limited 2015. All rights reserved.
* UK Private Limited Company No. 5323904
* ========================================
* Web: http://www.cubecart.com
* Email: [email protected]
* License: GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
*/
if (!defined('CC_INI_SET')) {
die('Access Denied');
}
// Load admin user details
if (!isset($_GET['_g']) || !in_array(strtolower($_GET['_g']), array('login', 'logout', 'password', 'recovery'))) {
$GLOBALS['main']->setTemplate();
}
if (isset($_GET['_g']) && in_array($_GET['_g'], array('login', 'password', 'recovery'))) {
httpredir('?');
}
if (isset($_GET['_g']) && !empty($_GET['_g']) && $_GET['_g'] != 'plugins') {
$GLOBALS['gui']->addBreadcrumb(ucwords($_GET['_g']));
}
if (!empty($_GET['_g'])) {
$module_type = isset($_GET['type']) && preg_match("/[a-z]/i", $_GET['type']) ? $_GET['type'] : '';
$node = !empty($_GET['node']) ? strtolower($_GET['node']) : 'index';
if (!isset($_GET['delete']) && strtolower($_GET['_g']) == 'plugins' && !empty($module_type)) {
$module_type = preg_match("/[a-z]/i", $_GET['type']) ? $_GET['type'] : '';
$GLOBALS['gui']->addBreadcrumb($lang['navigation']['nav_plugins'], '?_g=plugins');
// Display Modules
$GLOBALS['main']->wikiNamespace('Modules');
if (!empty($_GET['module'])) {
// Load Module
$GLOBALS['main']->wikiPage($_GET['module']);
开发者ID:kblok,项目名称:v6,代码行数:31,代码来源:controller.admin.session.true.inc.php
示例12: die
* CubeCart is a registered trade mark of CubeCart Limited
* Copyright CubeCart Limited 2015. All rights reserved.
* UK Private Limited Company No. 5323904
* ========================================
* Web: http://www.cubecart.com
* Email: [email protected]
* License: GPL-3.0 https://www.gnu.org/licenses/quick-guide-gplv3.html
*/
if (!defined('CC_INI_SET')) {
die('Access Denied');
}
Admin::getInstance()->permissions('orders', CC_PERM_READ, true);
$GLOBALS['main']->addTabControl($GLOBALS['language']->orders['title_transaction_logs'], 'logs');
$GLOBALS['gui']->addBreadcrumb($GLOBALS['language']->orders['title_transaction_logs']);
if (isset($_POST['search'])) {
httpredir(currentPage(null, array('search' => $_POST['search'])));
}
$per_page = 20;
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if (isset($_GET['order_id'])) {
$GLOBALS['smarty']->assign('TRANSACTION_LOGS_TITLE', sprintf($GLOBALS['lang']['orders']['title_transaction_logs_for_order'], $_GET['order_id']));
if (($transactions = $GLOBALS['db']->select('CubeCart_transactions', false, array('order_id' => $_GET['order_id']), array('time' => 'DESC'))) !== false) {
$GLOBALS['gui']->addBreadcrumb($transactions[0]['order_id'], currentPage());
foreach ($transactions as $transaction) {
$transaction['time'] = formatTime($transaction['time']);
$transaction['amount'] = Tax::getInstance()->priceFormat($transaction['amount']);
$transaction['trans_id'] = empty($transaction['trans_id']) ? $GLOBALS['lang']['common']['null'] : $transaction['trans_id'];
$smarty_data['transactions'][] = $transaction;
}
$GLOBALS['smarty']->assign('ORDER_TRANSACTIONS', $smarty_data['transactions']);
}
开发者ID:briansandall,项目名称:v6,代码行数:31,代码来源:orders.transactions.inc.php
示例13: currentPage
}
$GLOBALS['smarty']->assign('DISPLAY_SEND', true);
} else {
if (isset($_GET['action']) && in_array(strtolower($_GET['action']), array('add', 'edit'))) {
Admin::getInstance()->permissions('customers', CC_PERM_EDIT, true);
$GLOBALS['main']->addTabControl($lang['common']['general'], 'general');
$GLOBALS['main']->addTabControl($lang['email']['title_content_html'], 'email_html');
$GLOBALS['main']->addTabControl($lang['email']['title_content_text'], 'email_text');
$GLOBALS['main']->addTabControl($lang['email']['title_send_test'], 'send_test');
if (isset($_GET['newsletter_id']) && is_numeric($_GET['newsletter_id'])) {
if (($content = $GLOBALS['db']->select('CubeCart_newsletter', false, array('newsletter_id' => (int) $_GET['newsletter_id']))) !== false) {
// Render editor window
$GLOBALS['gui']->addBreadcrumb($content[0]['subject'], currentPage());
$GLOBALS['smarty']->assign('NEWSLETTER', $content[0]);
} else {
httpredir(currentPage(array('newsletter_id')));
}
}
// Get template list
if (($templates = $GLOBALS['db']->select('CubeCart_email_template', array('template_default', 'template_id', 'title'))) !== false) {
foreach ($templates as $template) {
if (isset($content)) {
$template['selected'] = $template['template_id'] == $content[0]['template_id'] ? ' selected="selected"' : '';
} else {
$template['selected'] = '';
}
$existing_templates[] = $template;
}
$GLOBALS['smarty']->assign('EXISTING_TEMPLATES', $existing_templates);
}
$GLOBALS['smarty']->assign('DISPLAY_FORM', true);
开发者ID:kblok,项目名称:v6,代码行数:31,代码来源:customers.email.inc.php
示例14: __construct
protected final function __construct()
{
// Turn error reporting off as it is displayed in debugger mode only!
ini_set('display_errors', false);
// Show ALL errors & notices
error_reporting(E_ALL ^ E_NOTICE);
ini_set('ignore_repeated_errors', true);
ini_set('ignore_repeated_source', true);
// Enable HTML Error messages
ini_set('html_errors', true);
ini_set('docref_root', 'http://docs.php.net/manual/en/');
ini_set('docref_ext', '.php');
// Define the Error & Exception handlers
set_error_handler(array(&$this, 'errorLogger'), ini_get('error_reporting'));
set_exception_handler(array(&$this, 'exceptionHandler'));
// Enable debugger
if (isset($GLOBALS['config']) && is_object($GLOBALS['config'])) {
$this->_enabled = (bool) $GLOBALS['config']->get('config', 'debug');
$ip_string = $GLOBALS['config']->get('config', 'debug_ip_addresses');
if (!empty($ip_string)) {
if (strstr($ip_string, ',')) {
$ip_addresses = explode(',', $ip_string);
if (!in_array(get_ip_address(), $ip_addresses)) {
$this->_enabled = false;
}
} else {
if ($ip_string !== get_ip_address()) {
$this->_enabled = false;
}
}
}
}
//If its time to clear the cache
if (isset($_GET['debug-cache-clear'])) {
$GLOBALS['cache']->clear();
$GLOBALS['cache']->tidy();
httpredir(currentPage(array('debug-cache-clear')));
}
//Check for xdebug
if (extension_loaded('xdebug') && function_exists('xdebug_is_enabled')) {
$this->_xdebug = xdebug_is_enabled();
}
$this->_debug_timer = $this->_getTime();
// Check register_globals
if (ini_get('register_globals')) {
trigger_error('register_globals are enabled. It is highly recommended that you disable this in your PHP configuration, as it is a large security hole, and may wreak havoc.', E_USER_WARNING);
}
Sanitize::cleanGlobals();
}
开发者ID:Geotex,项目名称:v6,代码行数:49,代码来源:debug.class.php
示例15: _load
/**
* Load customer data
*/
private function _load()
{
foreach ($GLOBALS['hooks']->load('class.user.load') as $hook) {
include $hook;
}
if ($GLOBALS['session']->session_data['customer_id'] == '0') {
return;
}
if ($GLOBALS['session']->session_data['customer_id'] && ($result = $GLOBALS['db']->select('CubeCart_customer', false, array('customer_id' => (int) $GLOBALS['session']->session_data['customer_id']), null, 1))) {
$this->_user_data = $result[0];
foreach ($GLOBALS['hooks']->load('class.user.load.user') as $hook) {
include $hook;
}
$this->_logged_in = true;
if (!$GLOBALS['session']->has('user_language', 'client')) {
$GLOBALS['session']->set('user_language', isset($result[0]['language']) && preg_match(Language::LANG_REGEX, $result[0]['language']) ? $result[0]['language'] : $GLOBALS['config']->get('config', 'default_language'), 'client');
}
if ((empty($this->_user_data['email']) || !filter_var($this->_user_data['email'], FILTER_VALIDATE_EMAIL) || empty($this->_user_data['first_name']) || empty($this->_user_data['last_name'])) && !in_array(strtolower($_GET['_a']), array('profile', 'logout'))) {
// Force account details page
$GLOBALS['session']->set('temp_profile_required', true);
httpredir(currentPage(null, array('_a' => 'profile')));
}
}
}
开发者ID:Dirty-Butter,项目名称:v6,代码行数:27,代码来源:user.class.php
示例16: array
$GLOBALS['hooks']->install($module_name);
} else {
$GLOBALS['hooks']->uninstall($module_name);
}
}
// Delete to prevent potential duplicate nightmare
$GLOBALS['db']->delete('CubeCart_modules', array('folder' => $module_name, 'module' => $module_type));
$GLOBALS['db']->insert('CubeCart_modules', array('status' => (int) $status, 'folder' => $module_name, 'module' => $module_type));
// Update config
$GLOBALS['config']->set($module_name, 'status', $status);
}
$after = md5(serialize($GLOBALS['db']->select('CubeCart_modules')));
if ($before !== $after) {
$GLOBALS['gui']->setNotify($lang['module']['notify_module_status']);
}
httpredir('?_g=plugins');
}
$module_paths = glob("modules/*/*/config.xml");
$i = 0;
$modules = false;
foreach ($module_paths as $module_path) {
$xml = new SimpleXMLElement(file_get_contents($module_path));
$basename = (string) basename(str_replace('config.xml', '', $module_path));
$key = trim((string) $xml->info->name . $i);
$module_config = $GLOBALS['db']->select('CubeCart_modules', '*', array('folder' => $basename, 'module' => (string) $xml->info->type));
$modules[$key] = array('uid' => (string) $xml->info->uid, 'type' => (string) $xml->info->type, 'mobile_optimized' => (string) $xml->info->mobile_optimized, 'name' => str_replace('_', ' ', (string) $xml->info->name), 'description' => (string) $xml->info->description, 'version' => (string) $xml->info->version, 'minVersion' => (string) $xml->info->minVersion, 'maxVersion' => (string) $xml->info->maxVersion, 'creator' => (string) $xml->info->creator, 'homepage' => (string) $xml->info->homepage, 'block' => (string) $xml->info->block, 'basename' => $basename, 'config' => $module_config[0], 'edit_url' => '?_g=plugins&type=' . (string) $xml->info->type . '&module=' . $basename, 'delete_url' => '?_g=plugins&type=' . (string) $xml->info->type . '&module=' . $basename . '&delete=1');
$i++;
}
if (is_array($modules)) {
ksort($modules);
}
开发者ID:Dirty-Butter,项目名称:v6,代码行数:31,代码来源:plugins.index.inc.php
示例17: httpredir
if ($i == 1) {
$GLOBALS['gui']->setNotify($lang['newsletter']['subscriber_removed']);
} else {
$GLOBALS['gui']->setNotify(sprintf($lang['newsletter']['subscribers_removed'], $i));
}
} else {
if ($i == 1) {
$GLOBALS['gui']->setError($lang['newsletter']['subscriber_not_removed']);
} else {
$GLOBALS['gui']->setError($lang['newsletter']['subscribers_not_removed']);
}
}
$redirect = true;
}
if ($redirect) {
httpredir('?_g=customers&node=subscribers#general');
}
$per_page = 20;
$page = isset($_GET['page']) ? $_GET['page'] : 1;
if ($GLOBALS['session']->has('email_filter') && ($email_filter = $GLOBALS['session']->get('email_filter'))) {
$GLOBALS['smarty']->assign('EMAIL_FILTER', $email_filter);
if (filter_var($email_filter, FILTER_VALIDATE_EMAIL)) {
$where = array('email' => $email_filter);
} else {
$where = "`email` LIKE '%{$email_filter}%'";
}
} else {
$where = false;
}
$subscriber_count = $GLOBALS['db']->select('CubeCart_newsletter_subscriber', false, $where);
$count = count($subscriber_count);
开发者ID:briansandall,项目名称:v6,代码行数:31,代码来源:customers.subscribers.inc.php
示例18: currentPage
}
}
$category['children'] = currentPage(null, array('parent' => $category['cat_id']));
$category['translate'] = currentPage(null, array('action' => 'translate', 'cat_id' => $category['cat_id']));
$category['edit'] = currentPage(null, array('action' => 'edit', 'cat_id' => $category['cat_id']));
$category['delete'] = currentPage(null, array('delete' => $category['cat_id']));
$children = false;
$children = $GLOBALS['db']->count('CubeCart_category', 'cat_id', array('cat_parent_id' => $category['cat_id']));
$category['no_children'] = $children;
$category['alt_text'] = sprintf((int) $children == 1 ? $lang['settings']['category_has_subcat'] : $lang['settings']['category_has_subcats'], (int) $children);
$category['visible'] = $category['hide'] ? 0 : 1;
$category_list[] = $category;
++$i;
}
}
// If no categories exist but parent is set redirect back to next level up
if (!isset($category_list) && isset($_GET['parent']) && $_GET['parent'] > 0) {
$parent_cat = $GLOBALS['db']->select('CubeCart_category', array('cat_parent_id'), array('cat_id' => $_GET['parent']));
if ($parent_cat && $parent_cat[0]['cat_parent_id'] > 0) {
httpredir('?_g=categories&parent=' . $parent_cat[0]['cat_parent_id']);
} else {
httpredir('?_g=categories');
}
}
foreach ($GLOBALS['hooks']->load('admin.category.pre_smarty') as $hook) {
include $hook;
}
$GLOBALS['smarty']->assign('LIST_CATEGORIES', true);
$GLOBALS['smarty']->assign('CATEGORIES', $category_list);
}
$page_content = $GLOBALS['smarty']->fetch('templates/categories.index.php');
开发者ID:Dirty-Butter,项目名称:v6,代码行数:31,代码来源:categories.index.inc.php
示例19: switch
}
$GLOBALS['smarty']->assign('PASSWORD', true);
break;
default:
switch (true) {
case isset($_GET['redir']) && !empty($_GET['redir']):
$redir = $_GET['redir'];
break;
case isset($_POST['redir']) && !empty($_POST['redir']):
$redir = $_POST['redir'];
break;
default:
$redir = currentPage();
}
if (isset($_GET['redir']) && !empty($_GET['redir']) && preg_match('/^(http(s?)\\:\\/\\/|ftp\\:\\/\\/|\\/\\/)/i', $redir)) {
httpredir(currentPage(array('redir')));
}
if ($GLOBALS['config']->get('config', 'ssl')) {
$current_page = currentPage();
if (CC_SSL) {
$ssl = array('url' => preg_replace('#^https#', 'http', $current_page), 'icon' => $GLOBALS['config']->get('config', 'adminFolder') . '/skins/' . $GLOBALS['config']->get('config', 'admin_skin') . '/images/ssl_true.png', 'state' => true);
} else {
$ssl = array('url' => preg_replace('#^http#', 'https', $current_page), 'icon' => $GLOBALS['config']->get('config', 'adminFolder') . '/skins/' . $GLOBALS['config']->get('config', 'admin_skin') . '/images/ssl_false.png', 'state' => true);
}
$GLOBALS['smarty']->assign('SSL', $ssl);
}
if (isset($redir) && !empty($redir)) {
$GLOBALS['smarty']->assign('REDIRECT_TO', $redir);
}
}
$GLOBALS['gui']->displayCommon();
开发者ID:digitaldevelopers,项目名称:v6,代码行数:31,代码来源:controller.admin.session.false.inc.php
示例20: httpredir
$_SESSION['setup']['permissions'] = true;
} else {
if (isset($_POST['progress'])) {
$redir = false;
}
}
}
}
}
if (!isset($errors) && $redir) {
httpredir('index.php');
}
} else {
if (isset($_POST['cancel']) || isset($_GET['cancel'])) {
$_SESSION['setup'] = null;
httpredir('index.php', 'cancelled');
}
}
if (!isset($_SESSION['setup']) || is_null($_SESSION['setup'])) {
$restart = false;
$step = 1;
// Compatibility Test
$checks = array('PHP' => array('title' => 'PHP 5.2.3+', 'status' => version_compare(PHP_VERSION, '5.2.3', '>='), 'pass' => PHP_VERSION, 'fail' => PHP_VERSION), 'MySQL' => array('title' => 'MySQL 4.1+', 'status' => extension_loaded('mysqli') || extension_loaded('mysql'), 'pass' => function_exists('mysqli_get_client_info') ? mysqli_get_client_info() : mysql_get_client_info(), 'fail' => function_exists('mysqli_get_client_info') ? mysqli_get_client_info() : mysql_get_client_info()), 'GD' => array('title' => 'GD Image Library', 'status' => detectGD(), 'pass' => $strings['common']['installed'], 'fail' => $strings['common']['not_installed']), 'XML' => array('title' => 'Simple XML Parser', 'status' => extension_loaded('simplexml'), 'pass' => $strings['common']['installed'], 'fail' => $strings['common']['not_installed']), 'cURL' => array('title' => 'cURL', 'status' => extension_loaded('curl'), 'pass' => $strings['common']['installed'], 'fail' => $strings['common']['not_installed']));
$GLOBALS['smarty']->assign('CHECKS', $checks);
$GLOBALS['smarty']->assign('MODE_COMPAT', true);
} else {
if (!isset($_SESSION['setup']['method'])) {
$step = 2;
// Select Install/Upgrade
$GLOBALS['smarty']->assign('LANG_INSTALL_CUBECART_TITLE', sprintf($strings['setup']['install_cubecart_title'], CC_VERSION));
// Check if upgrading is possible
开发者ID:digitaldevelopers,项目名称:v6,代码行数:31,代码来源:index.php
注:本文中的httpredir函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论