Пример #1
0
 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]));
     }
 }
Пример #2
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));
     }
 }
Пример #3
0
 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]));
     }
 }