Ejemplo n.º 1
0
 function start($hidden = true)
 {
     $data = '';
     if ($hidden === true) {
         require_once $this->rootdir . '/server/appliance/class/appliance.start.class.php';
         $controller = new appliance_start($this->openqrm, $this->response);
         $controller->actions_name = $this->actions_name;
         $controller->tpldir = $this->tpldir;
         $controller->message_param = $this->message_param;
         $controller->identifier_name = $this->identifier_name;
         $controller->lang = $this->lang['start'];
         $controller->rootdir = $this->rootdir;
         $controller->prefix_tab = $this->prefix_tab;
         $data = $controller->action();
     }
     $content['label'] = 'Start';
     $content['hidden'] = true;
     $content['value'] = $data;
     $content['target'] = $this->response->html->thisfile;
     $content['request'] = $this->response->get_array($this->actions_name, 'start');
     $content['onclick'] = false;
     if ($this->action === 'start') {
         $content['active'] = true;
     }
     return $content;
 }
Ejemplo n.º 2
0
 function start()
 {
     if ($this->response->html->request()->get($this->controller->identifier_name) !== '') {
         $_REQUEST[$this->response->id]['submit'] = 'submit';
         echo 'Starting appliance(s)' . "\n";
         $this->response->redirect = false;
         ob_start();
         require_once $this->controller->rootdir . '/server/appliance/class/appliance.start.class.php';
         $controller = new appliance_start($this->openqrm, $this->response);
         $controller->actions_name = $this->controller->actions_name;
         $controller->tpldir = $this->controller->tpldir;
         $controller->message_param = $this->controller->message_param;
         $controller->identifier_name = $this->controller->identifier_name;
         $controller->lang = $this->controller->lang['start'];
         $controller->rootdir = $this->controller->rootdir;
         $controller->prefix_tab = $this->controller->prefix_tab;
         $data = $controller->action();
         ob_end_clean();
         if (isset($_REQUEST[$this->controller->message_param])) {
             $msg = str_replace('<br>', "\n", $_REQUEST[$this->controller->message_param]);
             echo $msg . "\n";
         } else {
             $msg = str_replace('<br>', "\n", $data->msg);
             echo $msg . "\n";
         }
     } else {
         echo 'Missing param ' . $this->controller->identifier_name . "[]\n";
     }
 }