Пример #1
0
 function __construct()
 {
     global $osC_Language;
     $this->_page_title = $osC_Language->get('heading_title');
     if (!empty($_GET[$this->_module]) && is_numeric($_GET[$this->_module]) && osC_Languages_Admin::exists($_GET[$this->_module])) {
         $this->_page_title .= ': ' . osC_Languages_Admin::get($_GET[$this->_module], 'name');
         $this->_page_contents = 'groups.php';
         if (isset($_GET['group']) && !empty($_GET['group']) && osC_Languages_Admin::isDefinitionGroup($_GET[$this->_module], $_GET['group'])) {
             $this->_page_title .= ': ' . $_GET['group'];
             $this->_page_contents = 'definitions.php';
         }
     }
 }
Пример #2
0
 public function __construct()
 {
     global $osC_Language, $osC_MessageStack;
     parent::__construct();
     if (osC_Languages_Admin::isDefinitionGroup($_GET[$this->_module], $_GET['group'])) {
         $this->_page_contents = 'groups_delete.php';
         if (isset($_POST['subaction']) && $_POST['subaction'] == 'confirm') {
             if (osC_Languages_Admin::deleteDefinitionGroup($_GET['group'])) {
                 $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]));
         }
     }
 }