Пример #1
0
 function execute($caveID, $caves)
 {
     // create View
     $view = new Suggestions_Index_View($_SESSION['player']->language, $_SESSION['player']->template);
     // create Model
     $model = new Suggestions_Model();
     if ($this->error) {
         $view->setError($this->error);
     }
     return array($view->getTitle(), $view->getContent($model->getCount()));
 }
Пример #2
0
 function execute($caveID, $caves)
 {
     // create View
     $view = new Suggestions_Index_View($_SESSION['player']->language, $_SESSION['player']->template);
     // create Model
     $model = new Suggestions_Model();
     foreach ($_POST as $key => $val) {
         if (strpos($key, "suggestion") !== FALSE) {
             $model->addSuggestion($val);
         }
     }
     if ($this->error) {
         $view->setError($this->error);
     }
     return array($view->getTitle(), $view->getContent($model->getCount()));
 }