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


PHP osc_redirect_admin函数代码示例

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


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

示例1: __construct

 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     if (isset($_GET['aID']) && is_numeric($_GET['aID'])) {
         $this->_page_contents = 'edit.php';
     } else {
         $this->_page_contents = 'new.php';
     }
     if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
         $data = array('username' => $_POST['user_name'], 'password' => $_POST['user_password']);
         switch (osC_Administrators_Admin::save(isset($_GET['aID']) && is_numeric($_GET['aID']) ? $_GET['aID'] : null, $data, isset($_POST['modules']) ? $_POST['modules'] : null)) {
             case 1:
                 if (isset($_GET['aID']) && is_numeric($_GET['aID']) && $_GET['aID'] == $_SESSION['admin']['id']) {
                     $_SESSION['admin']['access'] = osC_Access::getUserLevels($_GET['aID']);
                 }
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
                 osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module));
                 break;
             case -1:
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
                 osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module));
                 break;
             case -2:
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_username_already_exists'), 'error');
                 break;
         }
     }
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:29,代码来源:save.php

示例2: __construct

 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     if (isset($_POST['batch']) && is_array($_POST['batch']) && !empty($_POST['batch'])) {
         $this->_page_contents = 'batch_edit.php';
         if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
             $error = false;
             foreach ($_POST['batch'] as $id) {
                 if (!osC_Administrators_Admin::setAccessLevels($id, $_POST['modules'], $_POST['mode'])) {
                     $error = true;
                     break;
                 }
             }
             if ($error === false) {
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
                 if (in_array($_SESSION['admin']['id'], $_POST['batch'])) {
                     $_SESSION['admin']['access'] = osC_Access::getUserLevels($_SESSION['admin']['id']);
                 }
             } else {
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
             }
             osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module));
         }
     }
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:26,代码来源:batch_save.php

示例3: __construct

 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     if (isset($_GET['cID']) && is_numeric($_GET['cID'])) {
         $this->_page_contents = 'edit.php';
     } else {
         $this->_page_contents = 'new.php';
     }
     if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
         $data = array('name' => $_POST['categories_name'], 'image' => isset($_FILES['categories_image']) ? $_FILES['categories_image'] : null, 'sort_order' => $_POST['sort_order']);
         if (!isset($_GET['cID'])) {
             $data['parent_id'] = $_POST['parent_id'];
         }
         $error = false;
         foreach ($data['name'] as $key => $value) {
             if (empty($value)) {
                 $osC_MessageStack->add($this->_module, sprintf($osC_Language->get('ms_warning_category_name_empty'), $osC_Language->getData($key, 'name')), 'warning');
                 $error = true;
             }
         }
         if ($error === false) {
             if (osC_Categories_Admin::save(isset($_GET['cID']) && is_numeric($_GET['cID']) ? $_GET['cID'] : null, $data)) {
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
             } else {
                 $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
             }
             osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $_GET[$this->_module]));
         }
     }
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:31,代码来源:save.php

示例4: __construct

 function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     if (!isset($_GET['set'])) {
         $_GET['set'] = '';
     }
     if (!isset($_GET['action'])) {
         $_GET['action'] = '';
     }
     switch ($_GET['set']) {
         case 'content':
             $this->_page_title = $osC_Language->get('heading_title_content');
             break;
         case 'boxes':
         default:
             $_GET['set'] = 'boxes';
             $this->_page_title = $osC_Language->get('heading_title_boxes');
             break;
     }
     include '../includes/classes/modules.php';
     $osC_Language->load('modules-' . $_GET['set']);
     if (!empty($_GET['action'])) {
         switch ($_GET['action']) {
             case 'info':
                 $this->_page_contents = 'info.php';
                 break;
             case 'save':
                 $this->_page_contents = 'edit.php';
                 if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
                     $data = array('configuration' => $_POST['configuration']);
                     if ($this->_save($data)) {
                         $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
                     } else {
                         $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
                     }
                     osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&set=' . $_GET['set']));
                 }
                 break;
             case 'install':
                 if ($this->_install($_GET['module'], $_GET['set'])) {
                     $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
                 } else {
                     $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
                 }
                 osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&set=' . $_GET['set']));
                 break;
             case 'uninstall':
                 $this->_page_contents = 'uninstall.php';
                 if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
                     if ($this->_uninstall($_GET['module'], $_GET['set'])) {
                         $osC_MessageStack->add($this->_module, $osC_Language->get('ms_success_action_performed'), 'success');
                     } else {
                         $osC_MessageStack->add($this->_module, $osC_Language->get('ms_error_action_not_performed'), 'error');
                     }
                     osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '&set=' . $_GET['set']));
                 }
                 break;
         }
     }
 }
开发者ID:digitaldevelopers,项目名称:oscommerce,代码行数:60,代码来源:templates_modules.php

示例5: __construct

 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     unset($_SESSION['admin']);
     $osC_MessageStack->add('header', $osC_Language->get('ms_success_logged_out'), 'success');
     osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT));
 }
开发者ID:heshuai64,项目名称:gamestore,代码行数:8,代码来源:logoff.php

示例6: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (Countries::deleteZone($_GET['zID'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:9,代码来源:Process.php

示例7: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (Languages::import($_POST['language_import'], $_POST['import_type'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:hakankarar,项目名称:oscommerce,代码行数:9,代码来源:Process.php

示例8: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (Configuration::saveEntry($_POST['configuration'])) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
 }
开发者ID:hakankarar,项目名称:oscommerce,代码行数:9,代码来源:Process.php

示例9: execute

 public static function execute(ApplicationAbstract $application)
 {
     if (ErrorLog::delete()) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:9,代码来源:Process.php

示例10: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('id' => isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, 'title' => $_POST['title'], 'code' => $_POST['code'], 'symbol_left' => $_POST['symbol_left'], 'symbol_right' => $_POST['symbol_right'], 'decimal_places' => $_POST['decimal_places'], 'value' => $_POST['value'], 'set_default' => isset($_POST['default']) && $_POST['default'] == 'on' || isset($_POST['is_default']) && $_POST['is_default'] == 'true' && $_POST['code'] != DEFAULT_CURRENCY);
     if (Currencies::save($data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例11: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('name' => $_POST['credit_card_name'], 'pattern' => $_POST['pattern'], 'status' => isset($_POST['credit_card_status']) && $_POST['credit_card_status'] == '1' ? 1 : 0, 'sort_order' => $_POST['sort_order']);
     if (CreditCards::save(isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, $data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例12: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('title' => $_POST['tax_class_title'], 'description' => $_POST['tax_class_description']);
     if (TaxClasses::save(isset($_GET['id']) && is_numeric($_GET['id']) ? $_GET['id'] : null, $data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例13: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('configuration' => $_POST['configuration']);
     if (PaymentModules::save($data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例14: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('group_id' => $_GET['id'], 'country_id' => $_POST['zone_country_id'], 'zone_id' => $_POST['zone_id']);
     if (ZoneGroups::saveEntry(isset($_GET['zID']) && is_numeric($_GET['zID']) ? $_GET['zID'] : null, $data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink(null, null, 'id=' . $_GET['id']));
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php

示例15: execute

 public static function execute(ApplicationAbstract $application)
 {
     $data = array('id' => $_GET['id'], 'name' => $_POST['name'], 'code' => $_POST['code'], 'locale' => $_POST['locale'], 'charset' => $_POST['charset'], 'date_format_short' => $_POST['date_format_short'], 'date_format_long' => $_POST['date_format_long'], 'time_format' => $_POST['time_format'], 'text_direction' => $_POST['text_direction'], 'currencies_id' => $_POST['currencies_id'], 'numeric_separator_decimal' => $_POST['numeric_separator_decimal'], 'numeric_separator_thousands' => $_POST['numeric_separator_thousands'], 'parent_id' => $_POST['parent_id'], 'sort_order' => $_POST['sort_order'], 'set_default' => isset($_POST['default']) && $_POST['default'] == 'on');
     if (Languages::update($data)) {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_success_action_performed'), 'success');
     } else {
         Registry::get('MessageStack')->add(null, OSCOM::getDef('ms_error_action_not_performed'), 'error');
     }
     osc_redirect_admin(OSCOM::getLink());
 }
开发者ID:kdexter,项目名称:oscommerce,代码行数:10,代码来源:Process.php


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