public function __construct()
 {
     $this->_page_title = OSCOM::getDef('heading_title');
     if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module])) {
         $this->_page_contents = 'entries.php';
         $this->_page_title .= ': ' . osC_ProductTypes_Admin::get($_GET[$this->_module], 'title');
     }
 }
Beispiel #2
0
 public static function getAllAssignments()
 {
     global $_module;
     if (!isset($_GET['search'])) {
         $_GET['search'] = '';
     }
     if (!empty($_GET['search'])) {
         $result = osC_ProductTypes_Admin::findAssignments($_GET['search'], $_GET[$_module]);
     } else {
         $result = osC_ProductTypes_Admin::getAllAssignments($_GET[$_module]);
     }
     $result['rpcStatus'] = RPC_STATUS_SUCCESS;
     echo json_encode($result);
 }
 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]));
     }
 }
Beispiel #4
0
 public function __construct()
 {
     global $osC_MessageStack;
     parent::__construct();
     if (isset($_GET['tID']) && is_numeric($_GET['tID'])) {
         $this->_page_contents = 'edit.php';
     } else {
         $this->_page_contents = 'new.php';
     }
     if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
         $data = array('title' => $_POST['title']);
         if (osC_ProductTypes_Admin::save(isset($_GET['tID']) && is_numeric($_GET['tID']) ? $_GET['tID'] : null, $data)) {
             $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));
     }
 }
 public function __construct()
 {
     global $osC_MessageStack;
     parent::__construct();
     if (isset($_GET['aID']) && !empty($_GET['aID'])) {
         $this->_page_contents = 'entries_edit.php';
     } else {
         $this->_page_contents = 'entries_new.php';
         if (sizeof(osC_ProductTypes_Admin::getActions($_GET[$this->_module])) < 1) {
             $osC_MessageStack->add($this->_module, OSCOM::getDef('ms_warning_no_available_actions'), 'warning');
             $this->_page_contents = 'entries.php';
         }
     }
     if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
         $data = array('modules' => explode(',', $_POST['modules']));
         if (osC_ProductTypes_Admin::saveAssignments($_GET[$this->_module], isset($_GET['aID']) ? $_GET['aID'] : $_POST['action'], $data)) {
             $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]));
     }
 }
<?php

/*
  osCommerce Online Merchant $osCommerce-SIG$
  Copyright (c) 2009 osCommerce (http://www.oscommerce.com)

  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.
*/
$actions_array = array();
foreach (osC_ProductTypes_Admin::getActions($_GET[$osC_Template->getModule()]) as $action) {
    $actions_array[] = array('id' => $action['id'], 'text' => $action['title']);
}
$modules_array = array();
foreach (osC_ProductTypes_Admin::getModules() as $module) {
    $modules_array[$module['id']] = $module['title'];
}
?>

<style type="text/css">
#modulesInstalled, #modulesAvailable {
  list-style-type: none;
  margin-left: 15px;
  padding: 10px 5px;
  width: 60%;
}

#modulesInstalled {
  border: 1px dashed #4F8A10;
  background-color: #DFF2BF;
Beispiel #7
0
<?php

/*
  osCommerce Online Merchant $osCommerce-SIG$
  Copyright (c) 2009 osCommerce (http://www.oscommerce.com)

  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_ProductTypes_Admin::get($_GET['tID']));
?>

<h1><?php 
echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle());
?>
</h1>

<?php 
if ($osC_MessageStack->exists($osC_Template->getModule())) {
    echo $osC_MessageStack->get($osC_Template->getModule());
}
?>

<div class="infoBox">
  <h3><?php 
echo osc_icon('edit.png') . ' ' . $osC_ObjectInfo->getProtected('title');
?>
</h3>

  <form name="tEdit" action="<?php 
<?php

/*
  osCommerce Online Merchant $osCommerce-SIG$
  Copyright (c) 2009 osCommerce (http://www.oscommerce.com)

  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_ProductTypes_Admin::getAssignments($_GET[$osC_Template->getModule()], $_GET['aID']));
?>

<h1><?php 
echo osc_link_object(osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()), $osC_Template->getPageTitle());
?>
</h1>

<?php 
if ($osC_MessageStack->exists($osC_Template->getModule())) {
    echo $osC_MessageStack->get($osC_Template->getModule());
}
?>

<div class="infoBox">
  <h3><?php 
echo osc_icon('trash.png') . ' ' . $osC_ObjectInfo->getProtected('action_title');
?>
</h3>

  <form name="tDelete" action="<?php