示例#1
0
文件: index.php 项目: tedwp/porpoise
 if ($_SERVER["REQUEST_METHOD"] == "POST") {
     GUI::handlePOST();
 }
 /* handle action */
 switch ($_action) {
     case "main":
         GUI::printMessage("%s", GUI::createMainScreen());
         break;
     case "layer":
         $layerProperties = DML::getLayerProperties($_REQUEST["layerName"]);
         if (empty($layerProperties->layer)) {
             $layerProperties = new LayarResponse();
             $layerProperties->layer = $_REQUEST["layerName"];
             DML::saveLayerProperties($_REQUEST["layerName"], $layerProperties);
         }
         GUI::printMessage("%s", GUI::createLayerScreen($_REQUEST["layerName"]));
         break;
     case "poi":
         $poi = DML::getPOI($_REQUEST["layerName"], $_REQUEST["poiID"]);
         if (empty($poi)) {
             throw new Exception(sprintf("POI not found: %s:%s", $_REQUEST["layerName"], $_REQUEST["poiID"]));
         }
         GUI::printMessage("%s", GUI::createPOIScreen($_REQUEST["layerName"], $poi));
         break;
     case "newPOI":
         GUI::printMessage("%s", GUI::createNewPOIScreen($_REQUEST["layerName"]));
         break;
     case "migrate":
         GUI::printMessage("%s", GUI::createMigrationScreen());
         break;
     default: