function saveConfigurations() { global $toC_Json, $osC_Language; $response['success'] = osC_Configuration_Admin::save($_REQUEST['cID'], $_REQUEST['configuration_value']); if ($response['success']) { $response['feedback'] = $osC_Language->get('ms_success_action_performed'); } else { $response['feedback'] = $osC_Language->get('ms_error_action_not_performed'); } echo $toC_Json->encode($response); }
public function __construct() { global $osC_Language, $osC_MessageStack; parent::__construct(); $this->_page_contents = 'edit.php'; if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') { if (osC_Configuration_Admin::save($_POST['configuration'])) { $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 . '&gID=' . $_GET['gID'])); } }
public static function getAll() { if (!isset($_GET['gID'])) { $_GET['gID'] = '1'; } if (!isset($_GET['search'])) { $_GET['search'] = ''; } if (!empty($_GET['search'])) { $result = osC_Configuration_Admin::find($_GET['search']); } else { $result = osC_Configuration_Admin::getAll($_GET['gID']); } $result['rpcStatus'] = RPC_STATUS_SUCCESS; echo json_encode($result); }
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['configuration'] as $key => $param) { if (!osC_Configuration_Admin::save(array($key => $param))) { $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 . '&gID=' . $_GET['gID'])); } } }
<?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } ?> <div style="padding-bottom: 10px;"> <span><form id="liveSearchForm"><input type="text" id="liveSearchField" name="search" class="searchField fieldTitleAsDefault" title="Search.." /><input type="button" value="Reset" class="operationButton" onclick="osC_DataTable.reset();" /></form></span> </div> <div id="infoPane" class="ui-corner-all" style="float: left; width: 150px;"> <ul> <?php foreach (osc_toObjectInfo(osC_Configuration_Admin::getAllGroups())->get('entries') as $group) { echo '<li id="cfgGroup' . (int) $group['configuration_group_id'] . '" style="list-style: circle;">' . osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&gID=' . (int) $group['configuration_group_id']), osc_output_string_protected($group['configuration_group_title'])) . '</li>'; } ?> </ul> </div> <script type="text/javascript"><!-- $('#cfgGroup<?php echo (int) $_GET['gID']; ?> ').css('listStyle', 'disc').find('a').css({'fontWeight': 'bold', 'textDecoration': 'none'}); //--></script>
<?php /* $Id: $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2009 osCommerce This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License v2 (1991) as published by the Free Software Foundation. */ $osC_ObjectInfo = new osC_ObjectInfo(osC_Configuration_Admin::get($_GET['cID'])); ?> <h1><?php echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&gID=' . (int) $_GET['gID']), $osC_Template->getPageTitle()); ?> </h1> <?php if ($osC_MessageStack->exists($osC_Template->getModule())) { echo $osC_MessageStack->get($osC_Template->getModule()); } if (!osc_empty($osC_ObjectInfo->get('set_function'))) { $value_field = osc_call_user_func($osC_ObjectInfo->get('set_function'), $osC_ObjectInfo->get('configuration_value'), $osC_ObjectInfo->get('configuration_key')); } else { $value_field = osc_draw_input_field('configuration[' . $osC_ObjectInfo->get('configuration_key') . ']', $osC_ObjectInfo->get('configuration_value')); }