Esempio n. 1
0
 function execute($caveID, $caves)
 {
     // get model
     $model = new CaveBookmarks_Model($caveID, $caves);
     // init error
     $error = CAVEBOOKMARKS_NOERROR;
     // delete bookmark
     $bookmarkID = Request::getVar('bookmarkID', 0);
     $error = $model->deleteCaveBookmark($bookmarkID);
     // return Show Controller
     $controller = new CaveBookmarks_Controller_Show($error);
     return $controller->execute($caveID, $caves);
 }
Esempio n. 2
0
 function execute($caveID, $caves)
 {
     global $params, $config;
     // get model
     $model = new CaveBookmarks_Model($caveID, $caves);
     // init error
     $error = CAVEBOOKMARKS_NOERROR;
     // delete bookmark
     $bookmarkID = intval($params->POST->bookmarkID);
     $error = $model->deleteCaveBookmark($bookmarkID);
     // return Show Controller
     $controller = new CaveBookmarks_Controller_Show($error);
     return $controller->execute($caveID, $caves);
 }
Esempio n. 3
0
File: Add.php Progetto: norter/Game
 function execute($caveID, $caves)
 {
     // get model
     $model = new CaveBookmarks_Model($caveID, $caves);
     // init error
     $error = CAVEBOOKMARKS_NOERROR;
     // add CaveBookmark
     if (Request::getVar('name', '')) {
         $error = $model->addCaveBookmarkByName(Request::getVar('name', ''));
     } else {
         $error = $model->addCaveBookmarkByCoord(Request::getVar('xCoord', 0), Request::getVar('yCoord', 0));
     }
     // return Show Controller
     $controller = new CaveBookmarks_Controller_Show($error);
     return $controller->execute($caveID, $caves);
 }
Esempio n. 4
0
 function execute($caveID, $caves)
 {
     global $params, $config;
     // get model
     $model = new CaveBookmarks_Model($caveID, $caves);
     // init error
     $error = CAVEBOOKMARKS_NOERROR;
     // add CaveBookmark
     if (isset($params->POST->name)) {
         $error = $model->addCaveBookmarkByName($params->POST->name);
     } else {
         $error = $model->addCaveBookmarkByCoord($params->POST->xCoord, $params->POST->yCoord);
     }
     // return Show Controller
     $controller = new CaveBookmarks_Controller_Show($error);
     return $controller->execute($caveID, $caves);
 }