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; } } }
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)); } } }
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])); } } }
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; } } }
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)); }
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'])); }
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()); }
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'])); }
public static function execute(ApplicationAbstract $application) { if (Languages::updateDefinitions($_GET['id'], $_GET['group'], $_POST['def'])) { 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'] . '&group=' . $_GET['group'])); }
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()); }
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()); }
public static function execute(ApplicationAbstract $application) { $data = array('key' => $_POST['key'], 'value' => $_POST['value']); if (Languages::insertDefinition($_POST['defgroup'], $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'] . (isset($_GET['group']) ? '&group=' . $_GET['group'] : ''))); }
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()); }
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()); }
public static function execute(ApplicationAbstract $application) { $data = array('name' => $_POST['countries_name'], 'iso_code_2' => $_POST['countries_iso_code_2'], 'iso_code_3' => $_POST['countries_iso_code_3'], 'address_format' => $_POST['address_format']); if (Countries::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()); }
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()); }
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'])); }
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()); }
public static function execute(ApplicationAbstract $application) { $data = osc_sanitize_string(basename($_GET['code'])); if (PaymentModules::uninstall($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()); }
function __construct() { global $osC_Language, $osC_MessageStack; $this->_page_title = $osC_Language->get('heading_title'); if (!isset($_GET['action'])) { $_GET['action'] = ''; } if (!isset($_GET['page']) || isset($_GET['page']) && !is_numeric($_GET['page'])) { $_GET['page'] = 1; } if (!isset($_GET['fm'])) { $_GET['fm'] = ''; } if (!isset($_GET['fu']) || !is_numeric($_GET['fu'])) { $_GET['fu'] = ''; } if (!empty($_GET['action'])) { switch ($_GET['action']) { case 'info': $this->_page_contents = 'info.php'; break; case 'delete': $this->_page_contents = 'delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_AdministratorsLog_Admin::delete($_GET['lID'])) { $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 . '&page=' . $_GET['page'] . '&fm=' . $_GET['fm'] . '&fu=' . $_GET['fu'])); } break; case 'batchDelete': if (isset($_POST['batch']) && is_array($_POST['batch']) && !empty($_POST['batch'])) { $this->_page_contents = 'batch_delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { $error = false; foreach ($_POST['batch'] as $id) { if (!osC_AdministratorsLog_Admin::delete($id)) { $error = true; break; } } if ($error === false) { $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 . '&page=' . $_GET['page'] . '&fm=' . $_GET['fm'] . '&fu=' . $_GET['fu'])); } } break; } } }
public static function execute(ApplicationAbstract $application) { if (isset($_POST['service']) && ($_POST['service'] == 'oanda' || $_POST['service'] == 'xe')) { $results = Currencies::updateRates($_POST['service']); foreach ($results[0] as $result) { Registry::get('MessageStack')->add(null, sprintf(OSCOM::getDef('ms_error_invalid_currency'), $result['title'], $result['code']), 'error'); } foreach ($results[1] as $result) { Registry::get('MessageStack')->add(null, sprintf(OSCOM::getDef('ms_success_currency_updated'), $result['title'], $result['code']), 'success'); } } osc_redirect_admin(OSCOM::getLink()); }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'definitions_delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_Languages_Admin::deleteDefinitions($_GET[$this->_module], $_GET['group'], array($_GET['dID']))) { $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]) . (isset($_GET['group']) ? '&group=' . $_GET['group'] : '')); } }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_CreditCards_Admin::delete($_GET['ccID'])) { $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)); } }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'copy.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_Products_Admin::copy($_GET[$this->_module], $_POST['new_category_id'], $_POST['copy_as'])) { $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 . '&cID=' . $_GET['cID'])); } }
public static function hasAccess($application) { if (!isset($_SESSION[OSCOM::getSite()]['id'])) { $redirect = false; if ($application != 'Login') { $_SESSION[OSCOM::getSite()]['redirect_origin'] = $application; $redirect = true; } if ($redirect === true) { osc_redirect_admin(OSCOM::getLink(null, 'Login')); } } return Access::hasAccess(OSCOM::getSite(), $application); }
public function __construct() { global $osC_MessageStack; parent::__construct(); $this->_page_contents = 'entries_delete.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_ProductTypes_Admin::deleteAssignments($_GET[$this->_module], $_GET['aID'])) { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_success_action_performed'), 'success'); } else { $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_error_action_not_performed'), 'error'); } osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT, $this->_module . '=' . $_GET[$this->_module])); } }
public static function execute(ApplicationAbstract $application) { if (!empty($_GET['shortcut'])) { $application = osc_sanitize_string($_GET['shortcut']); if (OSCOM::siteApplicationExists($application)) { if (Dashboard::deleteShortcut($_SESSION[OSCOM::getSite()]['id'], $application)) { $_SESSION[OSCOM::getSite()]['access'] = Access::getUserLevels($_SESSION[OSCOM::getSite()]['id']); Registry::get('MessageStack')->add('header', OSCOM::getDef('ms_success_shortcut_removed'), 'success'); osc_redirect_admin(OSCOM::getLink(null, $application)); } } } osc_redirect_admin(OSCOM::getLink()); }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'definitions_new.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { $data = array('key' => $_POST['key'], 'value' => $_POST['value']); if (osC_Languages_Admin::insertDefinition(!empty($_POST['group_new']) ? $_POST['group_new'] : $_POST['group'], $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]) . (isset($_GET['group']) ? '&group=' . $_GET['group'] : '')); } }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'edit.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { $data = array('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']); if (osC_Languages_Admin::update($_GET['lID'], $data, isset($_POST['default']) && $_POST['default'] == 'on')) { $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)); } }
public static function execute(ApplicationAbstract $application) { $error = false; foreach ($_POST['batch'] as $id) { if (!ZoneGroups::deleteEntry($id)) { $error = true; break; } } if ($error === false) { 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'])); }