Ejemplo n.º 1
0
 public function execute()
 {
     if (false !== ($error = $this->sanitize())) {
         return $error;
     }
     $nav = $this->module->templateNav();
     $back = '';
     # Enable
     if (false !== Common::getPost('enable')) {
         $back .= $this->onEnable('enabled');
     } elseif (false !== Common::getPost('disable')) {
         $back .= $this->onEnable('disabled');
     } elseif (false !== Common::getPost('defaults')) {
         $back .= $this->onDefaults();
     } elseif (false !== Common::getPost('update')) {
         $back .= $this->onUpdate();
     } elseif (false !== Common::getPost('admin_sect')) {
         if ($this->mod->hasAdminSection()) {
             GWF_Website::redirect($this->mod->getAdminSectionURL());
             return '';
         } else {
             $back .= $this->module->error('err_no_admin_sect');
         }
     }
     # Form
     return $nav . $back . $this->templateModule();
 }