function osC_Summary_customers() { global $osC_Language; $osC_Language->loadIniFile('modules/summary/customers.php'); $this->_title = $osC_Language->get('summary_customers_title'); $this->_title_link = osc_href_link_admin(FILENAME_DEFAULT, 'customers'); if (osC_Access::hasAccess('customers')) { $this->_setData(); } }
function __construct() { global $osC_Language; $osC_Language->loadIniFile('modules/summary/error_log.php'); $this->_title = $osC_Language->get('summary_error_log_title'); $this->_title_link = osc_href_link_admin(FILENAME_DEFAULT, 'error_log'); if (osC_Access::hasAccess('error_log')) { $this->_setData(); } }
function osC_Summary_administrators_log() { global $osC_Language; $osC_Language->loadIniFile('modules/summary/administrators_log.php'); $this->_title = $osC_Language->get('summary_administrators_log_title'); $this->_title_link = osc_href_link_admin(FILENAME_DEFAULT, 'administrators_log'); if (osC_Access::hasAccess('administrators_log')) { $this->_setData(); } }
define('RPC_STATUS_CLASS_NONEXISTENT', -60); define('RPC_STATUS_NO_ACTION', -70); define('RPC_STATUS_ACTION_NONEXISTENT', -71); if (!isset($_SESSION['admin'])) { echo json_encode(array('rpcStatus' => RPC_STATUS_NO_SESSION)); exit; } $module = null; $class = null; if (empty($_GET)) { echo json_encode(array('rpcStatus' => RPC_STATUS_NO_MODULE)); exit; } else { $first_array = array_slice($_GET, 0, 1); $_module = osc_sanitize_string(basename(key($first_array))); if (!osC_Access::hasAccess($_module)) { echo json_encode(array('rpcStatus' => RPC_STATUS_NO_ACCESS)); exit; } $class = isset($_GET['class']) && !empty($_GET['class']) ? osc_sanitize_string(basename($_GET['class'])) : 'rpc'; $action = isset($_GET['action']) && !empty($_GET['action']) ? osc_sanitize_string(basename($_GET['action'])) : ''; if (empty($action)) { echo json_encode(array('rpcStatus' => RPC_STATUS_NO_ACTION)); exit; } if (file_exists('includes/applications/' . $_module . '/classes/' . $class . '.php')) { include 'includes/applications/' . $_module . '/classes/' . $class . '.php'; if (method_exists('osC_' . ucfirst($_module) . '_Admin_' . $class, $action)) { call_user_func(array('osC_' . ucfirst($_module) . '_Admin_' . $class, $action)); exit; } else {
$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. */ require 'includes/application_top.php'; require 'includes/classes/template.php'; $_SESSION['module'] = 'index'; if (!empty($_GET)) { $first_array = array_slice($_GET, 0, 1); $_module = osc_sanitize_string(basename(key($first_array))); if (file_exists('includes/applications/' . $_module . '/' . $_module . '.php')) { $_SESSION['module'] = $_module; } } if (!osC_Access::hasAccess($_SESSION['module'])) { $osC_MessageStack->add('header', 'No access.', 'error'); osc_redirect_admin(osc_href_link_admin(FILENAME_DEFAULT)); } $osC_Language->loadIniFile($_SESSION['module'] . '.php'); require 'includes/applications/' . $_SESSION['module'] . '/' . $_SESSION['module'] . '.php'; $osC_Template = osC_Template_Admin::setup($_SESSION['module']); $osC_Template->set('default'); require 'templates/default.php'; require 'includes/application_bottom.php';