Best Phoronix-test-suite code snippet using gui
index.php
Source:index.php
1<?php2header('Content-Type: text/html; charset=utf-8');3# CLI-Parameterübergabe4if(isset($argv)){5 array_shift($argv);6 $_REQUEST = array();7 foreach ($argv AS $arg) {8 list($key, $val) = explode('=', $arg);9 $_REQUEST[$key] = $val;10 }11}12# Error Handling for Fatal-Errors13register_shutdown_function(function () {14 global $errors;15 $err = error_get_last();16 if (error_reporting() & $err['type']) { // This error code is included in error_reporting 17 ob_end_clean();18 if (! is_null($err)) {19 $errors[] = '<b>' . $err['message'] . '</b><br> in Datei ' . $err['file'] . '<br>in Zeile '. $err['line'];20 }21 http_response_code(500);22 include_once('layouts/snippets/general_error_page.php');23 }24});25# Error-Handling26function CustomErrorHandler($errno, $errstr, $errfile, $errline){27 global $errors;28 if (!(error_reporting() & $errno)) { // This error code is not included in error_reporting29 return;30 }31 $errors[] = '<b>' . $errstr . '</b><br> in Datei ' . $errfile . '<br>in Zeile '. $errline;32 http_response_code(500);33 include_once('layouts/snippets/general_error_page.php');34 /* Don't execute PHP internal error handler */35 return true;36}37set_error_handler("CustomErrorHandler");38if (!file_exists('credentials.php') OR !file_exists('config.php')) {39 echo '<h1>kvwmap-Server</h1>Die Anwendung kvwmap ist noch nicht fertig eingerichtet.<br>Dazu kann das Script <a href="install.php">install.php</a> verwendet werden.';40 exit;41}42include('credentials.php');43include('config.php');44# Session45if(!isset($_SESSION)){46 $maxlifetime = 0;47 $path = (!USE_EXISTING_SESSION AND array_key_exists('CONTEXT_PREFIX', $_SERVER)) ? $_SERVER['CONTEXT_PREFIX'] : '/';48 $samesite = 'strict';49 session_set_cookie_params($maxlifetime, $path.'; samesite='.$samesite);50 session_start();51}52# Laden der Plugins config.phps53for ($i = 0; $i < count($kvwmap_plugins); $i++) {54 if (file_exists(PLUGINS.$kvwmap_plugins[$i] . '/config/config.php')) {55 include(PLUGINS . $kvwmap_plugins[$i] . '/config/config.php');56 }57}58if (!defined('EPSGCODE_ALKIS')) {59 define('EPSGCODE_ALKIS', -1); // EPSGCODE_ALKIS ist nur bei Verwendung des Plugin alkis definiert60}61include(CLASSPATH . 'log.php');62if (DEBUG_LEVEL > 0) {63 $debug = new Debugger(DEBUGFILE); # öffnen der Debug-log-datei64}65# Ãffnen der Log-Dateien. Derzeit werden in den Log-Dateien nur die SQL-Statements gespeichert, die über execSQL in den Klassen mysql und postgres ausgeführt werden.66if (LOG_LEVEL > 0) {67 $log_mysql = new LogFile(LOGFILE_MYSQL,'text','Log-Datei MySQL', '#------v: ' . date("Y:m:d H:i:s", time()));68 $log_postgres = new LogFile(LOGFILE_POSTGRES, 'text', 'Log-Datei Postgres', '------v: ' . date("Y:m:d H:i:s", time()));69}70$log_loginfail = new LogFile(LOGFILE_LOGIN, 'text', 'Log-Datei Login Failure', '');71###################################################################72# kvwmap - Kartenserver für die Verwaltung raumbezogener Daten. #73# Lizenz #74# #75# Copyright (C) 2016 Peter Korduan #76# #77# This program is free software; you can redistribute it and/or #78# modify it under the terms of the GNU General Public License as #79# published by the Free Software Foundation; either version 2 of #80# the License, or (at your option) any later version. #81# #82# This program is distributed in the hope that it will be useful, #83# but WITHOUT ANY WARRANTY; without even the implied warranty of #84# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #85# GNU General Public License for more details.86# #87# You should have received a copy of the GNU General Public #88# License along with this program; if not, write to the Free #89# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, #90# MA 02111-1307, USA. #91# #92# Eine deutsche Ãbersetzung zur Lizenz finden Sie unter: #93# http://www.gnu.de/gpl-ger.html #94# #95# Kontakt: #96# peter.korduan@gdi-service.de #97# stefan.rahn@gdi-service.de #98###################################################################99// function microtime_float1(){100 // list($usec, $sec) = explode(" ", microtime());101 // return ((float)$usec + (float)$sec);102// }103// $starttime = $executiontimes['time'][] = microtime_float1();104// $executiontimes['action'][] = 'Start';105error_reporting(E_ALL & ~(E_STRICT|E_NOTICE));106ob_start (); // Ausgabepufferung starten107$formvars = $_REQUEST;108$go = (array_key_exists('go', $formvars) ? $formvars['go'] : '');109if (array_key_exists('go_plus', $formvars) and $formvars['go_plus'] != '') {110 $go = $go.'_'.$formvars['go_plus'];111}112###########################################################################################################113define('CASE_COMPRESS', false);114# #115# ALLE: - die Stelle muss die IP checken #116# - die Stelle muss das Passwortalter checken #117# #118# navMap_ajax: - LAGEBEZEICHNUNGSART muss auf 'Flurbezeichnung' gesetzt sein #119# - man muss über den Rechteckzoom unter 1:100 zoomen (kein Mausrad!) #120# - ein räumlich gefilterter Layer muss an sein #121# - man muss einen anderen EPSG-Code als den der Ref-Karte (2398) eingestellt haben #122# - man muss in einer Fachschale zoomen (wegen reduce_mapwidth) #123# - man muss einen Layer in der Legende ein oder ausschalten #124# - InchesPerUnit() reinkopieren #125# - layer_error_handling() reinkopieren #126# - zoomToMaxLayerExtent() reinkopieren #127# - getlayerdatabase() reinkopieren #128# - read_layer_attributes() reinkopieren #129# - check_oid() reinkopieren #130# - getFilter() reinkopieren #131# - setFullExtent() reinkopieren #132# - setPrevMapExtent() #133# - setNextMapExtent() #134# - getConsume() #135# - updateNextConsumeTime() #136# tooltip_query: - ein Datensatz mit Bild muss agefragt werden #137# - getRollenLayer() reinkopieren #138# getLayerOptions: - ein Rollenlayer muss verwendet werden #139# - getRollenLayer(), writeCustomType(), getDatatypeId(), getEnumElements() #140# und writeDatatypeAttributes() reinkopieren #141# - get_layer_params_form, get_layer_params_layer und get_layer_params reinkopieren #142# get_group_legend: - compare_legendorder() reinkopieren #143# - ein Layer muss in der Gruppe an sein #144# get_select_list: - read_datatype_attributes() reinkopieren #145# #146# #147###########################################################################################################148$non_spatial_cases = array('getLayerOptions', 'get_select_list'); // für non-spatial cases wird in start.php keine Verbindung zur PostgreSQL aufgebaut usw.149$spatial_cases = array('navMap_ajax', 'tooltip_query', 'get_group_legend');150$fast_loading_cases = array_merge($spatial_cases, $non_spatial_cases);151$fast_loading_case = array();152define('FAST_CASE', in_array($go, $fast_loading_cases));153if (CASE_COMPRESS) {154 include(CLASSPATH . 'case_compressor.php');155}156function include_($filename){157 if(CASE_COMPRESS AND FAST_CASE){ // ein fast-case und er soll komprimiert werden158 $filename = case_compressor::inject($filename);159 include $filename;160 unlink($filename);161 }162 elseif(FAST_CASE){} // nix inkludieren, denn die fast-case-Datei enthält ja schon alles163 else include_once $filename; // normaler include164}165# laden der Klassenbibliotheken166if (!CASE_COMPRESS AND FAST_CASE) {167 include (CLASSPATH.'fast_cases/'.$go.'.php');168}169else {170 include_(WWWROOT . APPLVERSION . 'funktionen/allg_funktionen.php');171 if (!isset($userDb)) {172 include_(CLASSPATH . 'mysql.php');173 }174 include_(CLASSPATH . 'kvwmap.php');175 include_(CLASSPATH . 'Menue.php');176 include_(CLASSPATH . 'postgresql.php');177 include_(CLASSPATH . 'users.php');178 include_(CLASSPATH . 'Nutzer.php');179 include_(CLASSPATH . 'rolle.php');180 include_(CLASSPATH . 'stelle.php');181 include_(CLASSPATH . 'bauleitplanung.php');182}183include(WWWROOT . APPLVERSION . 'start.php');184$GUI->go = $go;185# Laden der Plugins index.phps186if (!FAST_CASE) {187 for ($i = 0; $i < count($kvwmap_plugins); $i++) {188 include(PLUGINS . $kvwmap_plugins[$i] . '/control/index.php');189 }190}191# Ãbergeben des Anwendungsfalles192$debug->write("<br><b>Anwendungsfall go: " . $go . "</b>", 4);193function go_switch($go, $exit = false) {194 global $GUI;195 global $newPassword;196 global $passwort;197 global $username;198 if ($go == 'get_last_query') {199 $GUI->last_query = $GUI->user->rolle->get_last_query();200 $GUI->last_query_requested = true; # get_last_query wurde direkt aufgerufen201 $GUI->formvars['go'] = $go = $GUI->last_query['go'];202 }203 if (!FAST_CASE) {204 $old_go = $GUI->go;205 $GUI->go_switch_plugins($go);206 # go nur neu setzen, wenn es in einem Plugin auch geändert worden ist207 if ($old_go != $GUI->go) {208 $go = $GUI->go;209 }210 }211 if (FAST_CASE OR $GUI->goNotExecutedInPlugins) {212 switch($go) {213 case 'navMap_ajax' : {214 $GUI->formvars['nurAufgeklappteLayer'] = true;215 if($GUI->formvars['width_reduction'] != '')$GUI->reduce_mapwidth($GUI->formvars['width_reduction'], $GUI->formvars['height_reduction']);216 if($GUI->formvars['legendtouched']){217 $GUI->neuLaden();218 }219 else{220 $GUI->loadMap('DataBase');221 $GUI->navMap($GUI->formvars['CMD']);222 }223 $GUI->saveMap('');224 if (!in_array($GUI->formvars['CMD'], ['next', 'previous'])) {225 $currenttime=date('Y-m-d H:i:s',time());226 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);227 }228 $GUI->drawMap();229 $GUI->mime_type='map_ajax';230 $GUI->output();231 } break;232 233 case 'saveDrawmode' : {234 $GUI->sanitize(['always_draw' => 'boolean']);235 $GUI->saveDrawmode();236 } break;237 238 case 'layer_check_oids' : {239 $GUI->sanitize([240 'layer_id' => 'int',241 'new_oid_*' => 'text',242 'new_query_*' => 'text',243 'new_data_*' => 'text',244 'order' => 'text'245 ]);246 $GUI->layer_check_oids();247 } break;248 case 'login' : {249 $GUI->login();250 } break;251 case 'login_failed' : {252 $GUI->login_failed();253 } break;254 case 'login_browser_size' : {255 $GUI->login_browser_size();256 } break;257 case 'login_new_password' : {258 $GUI->login_new_password();259 } break;260 case 'login_registration' : {261 $GUI->login_registration();262 } break;263 case 'login_agreement' : {264 $GUI->login_agreement();265 } break;266 case 'loadDrawingOrderForm' : {267 $GUI->loadDrawingOrderForm();268 } break;269 case 'show_snippet' : {270 $GUI->checkCaseAllowed($go);271 $GUI->show_snippet();272 } break;273 case 'openCustomSubform' : {274 $GUI->sanitize(['attribute' => 'text']);275 $GUI->openCustomSubform();276 } break;277 case 'getLayerOptions' : {278 $GUI->sanitize(['layer_id' => 'int']);279 $GUI->getLayerOptions();280 } break;281 case 'getGroupOptions' : {282 $GUI->getGroupOptions();283 } break;284 case 'saveGeomFromLayer' : {285 $GUI->sanitize([286 'selected_layer_id' => 'int',287 'geom_from_layer' => 'text'288 ]);289 $GUI->saveGeomFromLayer();290 } break;291 case 'saveLayerOptions' : {292 $GUI->sanitize([293 'layer_options_transparency' => 'int',294 'layer_options_open' => 'int',295 'layer_options_rollenfilter' => 'text',296 'layer_options_name' => 'text'297 ]);298 $GUI->saveLayerOptions();299 } break;300 case 'resetLayerOptions' : {301 $GUI->sanitize([302 'layer_options_open' => 'int'303 ]);304 $GUI->resetLayerOptions();305 } break;306 case 'saveLegendOptions' : {307 $GUI->sanitize([308 'legendtype' => 'int'309 ]);310 $GUI->saveLegendOptions();311 } break;312 case 'resetLegendOptions' : {313 $GUI->resetLegendOptions();314 } break;315 case 'toggle_gle_view' : {316 $GUI->sanitize([317 'chosen_layer_id' => 'int'318 ]);319 $GUI->switch_gle_view();320 } break;321 case 'setHistTimestamp' : {322 $GUI->setHistTimestamp();323 } break;324 case 'setLanguage' : {325 $GUI->setLanguage();326 } break;327 case 'getNBH' : {328 $GUI->getNBH();329 }break;330 case 'getLayerParamsForm' : {331 $GUI->get_layer_params_form($GUI->formvars['stelle_id']);332 } break;333 case 'setLayerParams' : {334 $GUI->setLayerParams();335 echo "onLayerParamsUpdated('success')";336 } break;337 case 'changemenue' : {338 $GUI->changemenue($GUI->formvars['id'], $GUI->formvars['status']);339 $GUI->loadMap('DataBase');340 $GUI->drawMap();341 $GUI->output();342 } break;343 case 'changemenue_with_ajax' : {344 $GUI->changemenue_with_ajax($GUI->formvars['id'], $GUI->formvars['status']);345 } break;346 case 'getMenueWithAjax' : {347 $GUI->getMenueWithAjax();348 } break;349 case 'hideMenueWithAjax' : {350 $GUI->hideMenueWithAjax();351 } break;352 # Legende für eine Gruppe erzeugen353 case 'get_group_legend' : {354 $GUI->get_group_legend();355 } break;356 case 'close_group_legend' : {357 $GUI->close_group_legend();358 } break;359 # Legende erzeugen360 case 'get_legend' : {361 $GUI->loadMap('DataBase');362 # Parameter $scale in Data ersetzen363 for($i = 0; $i < @count($GUI->layers_replace_scale); $i++){364 $GUI->layers_replace_scale[$i]->set('data', str_replace('$scale', $GUI->map_scaledenom, $GUI->layers_replace_scale[$i]->data));365 }366 $GUI->map->draw(); # sonst werden manche Klassenbilder nicht generiert367 echo $GUI->create_dynamic_legend();368 } break;369 case 'autocomplete_request' :{370 $GUI->autocomplete_request();371 }break;372 case 'get_quicksearch_attributes' : {373 $GUI->sanitize(['layer_id' => 'int']);374 $GUI->get_quicksearch_attributes();375 } break;376 case 'Multi_Geometrien_splitten' : {377 $GUI->split_multi_geometries();378 }break;379 case 'reset_layers' : {380 $GUI->reset_layers(value_of($GUI->formvars, 'layer_id'));381 $GUI->loadMap('DataBase');382 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;383 $GUI->drawMap();384 $GUI->saveMap('');385 $GUI->output();386 } break;387 case 'show_all_layers' : {388 $GUI->user->rolle->update_layer_status(NULL, '1');389 $GUI->loadMap('DataBase');390 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;391 $GUI->drawMap();392 $GUI->saveMap('');393 $GUI->output();394 } break;395 case 'reset_querys' : {396 $GUI->reset_querys();397 $GUI->loadMap('DataBase');398 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;399 $GUI->drawMap();400 $GUI->saveMap('');401 $GUI->output();402 } break;403 case 'zoom2coord' : {404 $GUI->sanitize([405 'INPUT_COORD' => 'text',406 'query' => 'text'407 ]);408 $GUI->loadMap('DataBase');409 $GUI->zoom2coord();410 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;411 $GUI->drawMap();412 $GUI->saveMap('');413 $GUI->output();414 } break;415 case 'zoom2wkt' : {416 $GUI->loadMap('DataBase');417 $GUI->zoom2wkt();418 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;419 $GUI->drawMap();420 $GUI->saveMap('');421 $GUI->output();422 } break;423 case 'getSVG_all_vertices' : {424 $GUI->getSVG_all_vertices();425 } break;426 case 'getSVG_vertices' : {427 $GUI->getSVG_vertices();428 } break;429 case 'ResizeMap2Window' : {430 $GUI->resizeMap2Window();431 if($GUI->formvars['reloadmap']){432 $GUI->loadMap('DataBase');433 $GUI->scaleMap($GUI->formvars['nScale']);434 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;435 $GUI->drawMap();436 $GUI->saveMap('');437 $GUI->output();438 }439 } break;440 # auslesen der Layer vom mobilen Client441 case 'import_layer' : {442 $GUI->checkCaseAllowed($go);443 $GUI->import_layer();444 } break;445 # auslesen der Layer vom mobilen Client446 case 'import_layer_importieren' : {447 $GUI->import_layer_importieren();448 } break;449 # auslesen der Layer von der Primärdatenbank450 case 'export_layer' : {451 $GUI->checkCaseAllowed($go);452 $GUI->export_layer();453 } break;454 # auslesen der Layer von der Primärdatenbank455 case 'export_layer_einlesen' : {456 $GUI->export_layer_exportieren();457 } break;458 # liefert die options für ein Selectfeld für abhängige Attribute459 case 'get_select_list' : {460 $GUI->get_select_list();461 } break;462 # liefert einen automatisch generierten Vorschlag der sich aus einem in options stehenden SQL ergibt463 case 'auto_generate' : {464 $GUI->auto_generate();465 } break;466 # Kartenbild anzeigen467 case 'showMapImage' : {468 $GUI->showMapImage();469 } break;470 case 'showRefMapImage' : {471 $GUI->checkCaseAllowed('Stellen_Anzeigen');472 $GUI->getRefMapImage($GUI->formvars['ID']);473 } break;474 # Klassen abfragen475 case 'getclasses' : {476 $GUI->get_classes();477 } break;478 # Styles und Labels abfragen479 case 'getstyles_labels' : {480 $GUI->get_styles_labels();481 } break;482 # Style abfragen483 case 'get_style' : {484 $GUI->get_style();485 } break;486 # Style speichern487 case 'save_style' : {488 $GUI->save_style();489 } break;490 # Style löschen491 case 'delete_style' : {492 $GUI->delete_style();493 } break;494 # neuen Style hinzufügen495 case 'add_style' : {496 $GUI->add_style();497 $GUI->get_styles();498 } break;499 # Style in der Drawingorder nach oben verschieben500 case 'moveup_style' : {501 $GUI->moveup_style();502 } break;503 # Style in der Drawingorder nach unten verschieben504 case 'movedown_style' : {505 $GUI->movedown_style();506 } break;507 # Label abfragen508 case 'get_label' : {509 $GUI->get_label();510 } break;511 # Label speichern512 case 'save_label' : {513 $GUI->save_label();514 } break;515 # Label Löschen516 case 'delete_label' : {517 $GUI->delete_label();518 } break;519 # neues Label hinzufügen520 case 'add_label' : {521 $GUI->add_label();522 } break;523 # Untermenues abfragen524 case 'getsubmenues' : {525 $GUI->get_sub_menues();526 } break;527 # Layer zu einer Gruppe abfragen528 case 'getlayerfromgroup' : {529 $GUI->getlayerfromgroup();530 } break;531 case 'exportWMC' :{532 $GUI->exportWMC();533 } break;534 case 'Externer_Druck' : {535 $GUI->checkCaseAllowed($go);536 $GUI->formvars['loadmapsource'] = 'Post';537 $GUI->druckausschnittswahl($GUI->formvars['loadmapsource']);538 } break;539 case 'Externer_Druck_Drucken' : {540 $GUI->createMapPDF($GUI->formvars['aktiverRahmen'], false);541 $GUI->mime_type='pdf';542 $GUI->output();543 } break;544 case 'zoomto_selected_datasets' : {545 $GUI->sanitize(['chosen_layer_id' => 'int']);546 $GUI->zoomto_selected_datasets();547 }break;548 case 'zoomto_dataset' : {549 if($GUI->formvars['mime_type'] != '')$GUI->mime_type = $GUI->formvars['mime_type'];550 $GUI->zoomto_dataset();551 }break;552 # PointEditor553 case 'PointEditor' : {554 $GUI->PointEditor();555 }break;556 # PointEditor557 case 'PointEditor_Senden' : {558 $GUI->PointEditor_Senden();559 }break;560 # PolygonEditor561 case 'PolygonEditor' : {562 $GUI->PolygonEditor();563 }break;564 # PolygonEditor565 case 'PolygonEditor_Senden' : {566 $GUI->PolygonEditor_Senden();567 }break;568 # LineEditor569 case 'LineEditor' : {570 $GUI->LineEditor();571 }break;572 # LineEditor573 case 'LineEditor_Senden' : {574 $GUI->LineEditor_Senden();575 }break;576 # Sachdaten speichern577 case 'Sachdaten_speichern' : {578 $GUI->check_csrf_token();579 $GUI->sachdaten_speichern();580 }break;581 # Sachdaten anzeigen582 case 'Sachdaten' : {583 if($GUI->formvars['CMD'] != '')$GUI->user->rolle->setSelectedButton($GUI->formvars['CMD']);584 if($GUI->formvars['legendtouched'])$GUI->saveLegendRoleParameters();585 $GUI->queryMap();586 }break;587 # Export der geloggten Zugriffe in eine Georg-Datei588 case 'georg_export' : {589 $GUI->export_georg($GUI->formvars);590 }break;591 # Bauleitplanungsänderung592 case 'bauleitplanung' : {593 $GUI->bauleitplanung();594 }break;595 # Bauleitplanungsänderung596 case 'bauleitplanung_Senden' : {597 $GUI->bauleitplanungSenden();598 }break;599 # Bauleitplanungsänderung600 case 'bauleitplanung_Loeschen' : {601 $GUI->bauleitplanungLoeschen();602 $GUI->loadMap('DataBase');603 $currenttime=date('Y-m-d H:i:s',time());604 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);605 $GUI->drawMap();606 $GUI->output();607 }break;608 # spatial processing include609 case 'spatial_processing' : {610 $GUI->spatial_processing();611 }break;612 # Abfrage einer Zeile in der MySQL Datenbank613 # Beliebige Tabelle, Einschränkung über c1,c2,c3 und v1,v2,v3 (Werte beliebig)614 case 'getRow' : {615 # Derzeit nur für die Tabelle Rolle616 if ($GUI->formvars['from'] == 'rolle') {617 $GUI->getRow();618 }619 } break;620 # layer aus mapfile laden621 case 'layerfrommapfile_Layer hinzufügen' : {622 $GUI->layerfromMapfile_addlayer($GUI->formvars);623 $GUI->output();624 }break;625 # layer aus mapfile laden626 case 'layerfrommapfile' : {627 $GUI->checkCaseAllowed($go);628 $GUI->layerfromMapfile();629 $GUI->output();630 }break;631 # layer aus mapfile laden632 case 'layerfrommapfile_Datei laden' : {633 $GUI->layerfromMapfile_load($GUI->formvars);634 $GUI->output();635 }break;636 # https_proxy637 case 'https_Proxy' : {638 $GUI->https_proxy();639 }break;640 # OWS641 case 'OWS' : {642 $GUI->createOWSResponse();643 }break;644 # OWS-Proxy erstellt bild nur neu, wenn noch nicht vorher schon mal gefordert645 case 'OWS-Proxy' : {646 $GUI->owsProxy();647 }break;648 # OWS_Ausnahmebehandlung649 case 'OWS_Exception' : {650 $GUI->createOWSException();651 }break;652 case 'Atom' : {653 $GUI->createAtomResponse();654 } break;655 # 2006-03-24 CG656 case 'StatistikAuswahl' : {657 $GUI->checkCaseAllowed($go);658 $GUI->StatistikAuswahl();659 }break;660 case 'StatistikAuswahl_Stelle' : {661 $GUI->checkCaseAllowed($go);662 $GUI->StatistikAuswahl();663 }break;664 # 2006-04-03 CG665 case 'StatistikAuswahl_anzeigen' : {666 $GUI->StatistikAuswahlErgebnis();667 }break;668 case 'StatistikAuswahl_Stelle_anzeigen' : {669 $GUI->StatistikAuswahlErgebnis();670 }break;671 case 'Kartenkommentar_Formular' : {672 $GUI->mapCommentForm();673 }break;674 case 'Kartenkommentar_Speichern' : {675 $GUI->check_csrf_token();676 $GUI->sanitize(['consumetime' => 'text', 'comment' => 'text', 'public' => 'int']);677 $GUI->mapCommentStore();678 }break;679 case 'Kartenkommentar_Waehlen' : {680 $GUI->mapCommentSelectForm();681 }break;682 case 'Kartenkommentar_Zoom' : {683 $GUI->sanitize(['storetime' => 'text', 'user_id' => 'int']);684 $GUI->zoomToStoredMapExtent($GUI->formvars['storetime'], $GUI->formvars['user_id']);685 }break;686 case 'Kartenkommentar_loeschen' : {687 $GUI->sanitize(['storetime' => 'text']);688 $GUI->DeleteStoredMapExtent();689 }break;690 case 'Layerauswahl_Formular' : {691 $GUI->layerCommentForm();692 }break;693 case 'Layerauswahl_Speichern' : {694 $GUI->sanitize(['comment' => 'text']);695 $GUI->layerCommentStore();696 }break;697 case 'Layerauswahl_Waehlen' : {698 $GUI->layerCommentSelectForm();699 }break;700 case 'Layerauswahl_Laden' : {701 $GUI->sanitize(['id' => 'int']);702 $GUI->layerCommentLoad();703 }break;704 case 'Layerauswahl_loeschen' : {705 $GUI->sanitize(['id' => 'int']);706 $GUI->DeleteStoredLayers();707 }break;708 case 'changeLegendDisplay' : {709 $GUI->changeLegendDisplay();710 } break;711 case 'saveOverlayPosition' : {712 $GUI->saveOverlayPosition();713 } break;714 case 'Administratorfunktionen' : {715 $GUI->checkCaseAllowed($go);716 $GUI->adminFunctions();717 $GUI->output();718 } break;719 case 'Haltestellen_Suche' : {720 $GUI->haltestellenSuche();721 $GUI->output();722 } break;723 case 'Druckrahmen' : {724 $GUI->checkCaseAllowed($go);725 $GUI->druckrahmen_init();726 $GUI->druckrahmen_load();727 $GUI->output();728 } break;729 case 'Druckrahmen_Freitexthinzufuegen' : {730 $_files = $_FILES;731 $GUI->checkCaseAllowed('Druckrahmen');732 $GUI->druckrahmen_init();733 $GUI->Document->update_frame($GUI->formvars, $_files);734 $GUI->Document->addfreetext($GUI->formvars);735 $GUI->druckrahmen_load();736 $GUI->output();737 } break;738 case 'Druckrahmen_Freitextloeschen' : {739 $_files = $_FILES;740 $GUI->checkCaseAllowed('Druckrahmen');741 $GUI->druckrahmen_init();742 $GUI->Document->update_frame($GUI->formvars, $_files);743 $GUI->Document->removefreetext($GUI->formvars);744 $GUI->druckrahmen_load();745 $GUI->output();746 } break;747 case 'Druckrahmen_übernehmen >>' : {748 $GUI->checkCaseAllowed('Druckrahmen');749 $GUI->druckrahmen_init();750 $GUI->Document->add_frame2stelle($GUI->formvars['aktiverRahmen'], $GUI->formvars['stelle']);751 $GUI->druckrahmen_load();752 $GUI->output();753 } break;754 case 'Druckrahmen_als neues Layout speichern' : {755 $_files = $_FILES;756 $GUI->checkCaseAllowed('Druckrahmen');757 $GUI->druckrahmen_init();758 $GUI->formvars['aktiverRahmen'] = $GUI->Document->save_frame($GUI->formvars, $_files, $GUI->Stelle->id);759 $GUI->druckrahmen_load();760 $GUI->output();761 } break;762 case 'Druckrahmen_Ãnderungen Speichern' : {763 $_files = $_FILES;764 $GUI->checkCaseAllowed('Druckrahmen');765 $GUI->druckrahmen_init();766 $GUI->Document->update_frame($GUI->formvars, $_files);767 $GUI->druckrahmen_load();768 $GUI->output();769 } break;770 case 'Druckrahmen_Löschen' : {771 $GUI->checkCaseAllowed('Druckrahmen');772 $GUI->druckrahmen_init();773 $GUI->Document->delete_frame($GUI->formvars['selected_frame_id']);774 $GUI->druckrahmen_load();775 $GUI->output();776 } break;777 case 'Druckausschnitt_laden' : {778 $GUI->formvars['loadmapsource'] = 'DataBase';779 $GUI->druckausschnittswahl($GUI->formvars['loadmapsource']);780 } break;781 case 'Druckausschnitt_loeschen' : {782 $GUI->check_csrf_token();783 $GUI-sanitize(['druckausschnitt' => 'int']);784 $GUI->druckausschnitt_löschen($GUI->formvars['loadmapsource']);785 } break;786 case 'Druckausschnitt_speichern' : {787 $GUI->check_csrf_token();788 $GUI->sanitize([789 'name' => 'text',790 'center_x' => 'float', 'center_y' => 'float',791 'printscale' => 'int',792 'angle' => 'int',793 'aktiverRahmen' => 'int'794 ]);795 $GUI->druckausschnitt_speichern($GUI->formvars['loadmapsource']);796 } break;797 case 'Druckausschnittswahl' : {798 $GUI->formvars['loadmapsource'] = 'DataBase';799 $GUI->druckausschnittswahl($GUI->formvars['loadmapsource']);800 } break;801 case 'Druckausschnittswahl_Vorschau' : {802 $GUI->druckvorschau();803 $GUI->output();804 } break;805 case 'Druckausschnittswahl_Drucken' : {806 $GUI->createMapPDF($GUI->formvars['aktiverRahmen'], false);807 $GUI->mime_type='pdf';808 $GUI->output();809 } break;810 case 'Schnelle_Druckausgabe' : {811 if ($GUI->formvars['druckrahmen_id'] == '') {812 $GUI->formvars['druckrahmen_id'] = DEFAULT_DRUCKRAHMEN_ID;813 }814 $GUI->createMapPDF($GUI->formvars['druckrahmen_id'], false, true);815 $GUI->mime_type='pdf';816 $GUI->output();817 } break;818 case 'Notizenformular' : {819 $GUI->notizErfassung();820 } break;821 case 'Notizenformular_Senden' : {822 $GUI->checkCaseAllowed('Notizenformular');823 $GUI->notizSpeichern();824 } break;825 case 'Notiz_Loeschen' : {826 $GUI->checkCaseAllowed('Notizenformular');827 $GUI->notizLoeschen($GUI->formvars['oid']);828 $GUI->loadMap('DataBase');829 $currenttime=date('Y-m-d H:i:s',time());830 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);831 $GUI->drawMap();832 $GUI->output();833 } break;834 case 'Notizenformular_KatVerwaltung' : {835 $GUI->checkCaseAllowed($go);836 $GUI->notizKatVerwaltung();837 } break;838 case 'NotizKategorie_hinzufuegen' : {839 $GUI->checkCaseAllowed('Notizenformular_KatVerwaltung');840 $GUI->notizKategoriehinzufügen();841 } break;842 case 'NotizKategorie_aendern' : {843 $GUI->checkCaseAllowed('Notizenformular_KatVerwaltung');844 $GUI->notizKategorieAendern();845 } break;846 case 'NotizKategorie_loeschen' : {847 $GUI->checkCaseAllowed('Notizenformular_KatVerwaltung');848 $GUI->notizKategorieLoeschen();849 } break;850 case 'Metadaten_Uebersicht' : {851 $GUI->metadaten_uebersicht();852 } break;853 case 'Metadaten_generieren' : {854 $GUI->metadaten_generieren($GUI->formvars['layer_id']);855 } break;856 case 'Metadaten_Auswaehlen' : {857 $GUI->metadatenSuchForm();858 } break;859 case 'Metadatenblattanzeige' : {860 $GUI->metadatenblattanzeige();861 } break;862 case 'Metadateneingabe_Senden' : {863 $GUI->metadatensatzspeichern();864 } break;865 case 'ExportMapToPDF' : {866 $GUI->exportMapToPDF();867 } break;868 case 'TIF_Export' : {869 $GUI->TIFExport();870 } break;871 case 'TIF_Export_TIF-Datei erzeugen' : {872 $GUI->TIFExport_erzeugen();873 } break;874 case 'ows_export_loeschen' : {875 $GUI->checkCaseAllowed('WMS_Export');876 $GUI->ows_export_loeschen();877 } break;878 case 'WMS_Export_Senden' : {879 $GUI->checkCaseAllowed('WMS_Export');880 $GUI->wmsExportSenden();881 } break;882 case 'WMS_Export' : {883 $GUI->checkCaseAllowed('WMS_Export');884 $GUI->wmsExport();885 } break;886 case 'WMS_Import_eintragen' : {887 $GUI->checkCaseAllowed('WMS_Import');888 $GUI->sanitize([889 'wms_url' => 'text',890 'layers' => 'text',891 'query' => 'text'892 ]);893 $GUI->wmsImportieren();894 } break;895 case 'WMS_Import' : {896 $GUI->checkCaseAllowed('WMS_Import');897 $GUI->wmsImportFormular();898 } break;899 case 'Punktliste_Anzeigen' : {900 $GUI->create_point_rollenlayer();901 } break;902 case 'Punktliste_Anzeigen_Datei laden' : {903 $GUI->create_point_rollenlayer_load();904 } break;905 case 'Punktliste_Anzeigen_Anzeigen' : {906 $GUI->create_point_rollenlayer_import();907 } break;908 case 'SHP_Import' : {909 $GUI->checkCaseAllowed('SHP_Import');910 $GUI->shp_import();911 } break;912 case 'GeoJSON_Import' : {913 $GUI->checkCaseAllowed('GeoJSON_Import');914 $GUI->geojson_import();915 } break;916 case 'GeoJSON_Import_Importieren' : {917 $GUI->checkCaseAllowed('GeoJSON_Import');918 $GUI->geojson_import_importieren();919 } break;920 case 'SHP_Import_speichern' : {921 $GUI->checkCaseAllowed('SHP_Import');922 $GUI->shp_import_speichern();923 } break;924 case 'Daten_Import' : {925 $GUI->daten_import();926 } break;927 case 'Daten_Import_Upload' : {928 $GUI->daten_import_upload();929 } break;930 case 'Daten_Import_Process' : {931 $GUI->daten_import_process($GUI->formvars['upload_id'], $GUI->formvars['filenumber'], $GUI->formvars['filename'], $GUI->formvars['epsg'], $GUI->formvars['after_import_action']);932 } break;933 case 'Daten_Export' : {934 $GUI->checkCaseAllowed('Daten_Export');935 $GUI->daten_export();936 } break;937 case 'Daten_Export_Exportieren' : {938 # ToDo hier auch sql_* sanitizen. Das ist aber ein Problem, weil der Wert aus einem vollständigem SQL besteht und nicht einfach aus Argumenten939 $GUI->sanitize([940 'selected_layer_id' => 'int',941 'layer_name' => 'text',942 'epsg' => 'int',943 'newpathwkt' => 'text',944 'precision' => 'int'945 ]);946 if (!$GUI->user->is_gast()) {947 $GUI->checkCaseAllowed('Daten_Export');948 };949 $GUI->daten_export_exportieren();950 } break;951 952 case 'Daten_Export_Einstellungen_speichern' : {953 $GUI->checkCaseAllowed('Daten_Export');954 $GUI->daten_export();955 } break;956 957 case 'Daten_Export_Einstellungen_löschen' : {958 $GUI->checkCaseAllowed('Daten_Export');959 $GUI->daten_export();960 } break;961 case 'get_last_search' : {962 $GUI->formvars['selected_layer_id'] = $GUI->user->rolle->get_last_search_layer_id();963 $GUI->formvars['searches'] = '<last_search>';964 $GUI->sanitize(['selected_layer_id' => 'int', 'selected_group_id' => 'int']);965 $GUI->GenerischeSuche();966 } break;967 case 'Layer-Suche_Suchmaske_generieren' : {968 $GUI->sanitize(['selected_layer_id' => 'int']);969 $GUI->GenerischeSuche_Suchmaske();970 } break;971 case 'Layer-Suche_Suchen' : {972 $GUI->sanitize([973 'selected_layer_id' => 'int',974 'selected_group_id' => 'int',975 'anzahl' => 'int'976 ]);977 $GUI->GenerischeSuche_Suchen();978 } break;979 case 'SchnellSuche_Suchen' : {980 $GUI->sanitize(['selected_layer_id' => 'int', 'selected_group_id' => 'int']);981 $GUI->formvars['selected_layer_id'] = $GUI->formvars['quicksearch_layer_id'];982 $GUI->formvars['keinzurueck'] = true;983 $GUI->formvars['quicksearch'] = true;984 $GUI->GenerischeSuche_Suchen();985 } break;986 case 'Layer-Suche' : {987 $GUI->sanitize(['selected_layer_id' => 'int', 'selected_group_id' => 'int']);988 $GUI->GenerischeSuche();989 } break;990 case 'Suchabfragen_auflisten' : {991 $GUI->Suchabfragen_auflisten();992 } break;993 case 'Layer-Suche_Suchabfrage_speichern' : {994 $GUI->check_csrf_token();995 $GUI->sanitize(['selected_layer_id' => 'int', 'selected_group_id' => 'int']);996 $GUI->GenerischeSuche();997 } break;998 case 'Layer-Suche_Suchabfrage_löschen' : {999 $GUI->check_csrf_token();1000 $GUI->sanitize(['selected_layer_id' => 'int', 'selected_group_id' => 'int']);1001 $GUI->GenerischeSuche();1002 } break;1003 case 'Datensaetze_Merken' : {1004 $GUI->Datensaetze_Merken();1005 } break;1006 case 'Datensaetze_nicht_mehr_merken' : {1007 $GUI->Datensaetze_nicht_mehr_merken();1008 } break;1009 case 'Zwischenablage' : {1010 $GUI->Zwischenablage();1011 } break;1012 case 'gemerkte_Datensaetze_anzeigen' : {1013 $GUI->sanitize(['layer_id' => 'int']);1014 $GUI->gemerkte_Datensaetze_anzeigen($GUI->formvars['layer_id']);1015 } break;1016 case 'Datensatz_dublizieren' : {1017 $GUI->dublicate_dataset();1018 } break;1019 case 'Layer_Datensatz_Loeschen' : {1020 $GUI->layer_Datensatz_Loeschen($GUI->formvars['chosen_layer_id'], $GUI->formvars['oid'], $GUI->formvars['reload_object']);1021 } break;1022 case 'Layer_Datensaetze_Loeschen' : {1023 $GUI->layer_Datensaetze_loeschen(($GUI->formvars['output'] == 'false' ? false : true));1024 } break;1025 case 'belated_file_upload' : {1026 $GUI->checkCaseAllowed('belated_file_upload');1027 $GUI->belated_file_upload();1028 } break;1029 1030 case 'belated_file_upload_speichern' : {1031 $GUI->checkCaseAllowed('belated_file_upload');1032 $GUI->belated_file_upload_speichern();1033 } break; 1034 case 'Dokument_Loeschen' : {1035 $GUI->check_csrf_token();1036 $GUI->sachdaten_speichern();1037 } break;1038 case 'neuer_Layer_Datensatz' : {1039 $GUI->neuer_Layer_Datensatz();1040 } break;1041 case 'neuer_Layer_Datensatz_speichern' : {1042 $GUI->check_csrf_token();1043 $GUI->neuer_Layer_Datensatz_speichern();1044 } break;1045 case 'generisches_sachdaten_diagramm' : {1046 $GUI->generisches_sachdaten_diagramm($GUI->formvars['width']);1047 } break;1048 case 'generischer_sachdaten_druck' : {1049 $GUI->generischer_sachdaten_druck();1050 } break;1051 case 'generischer_sachdaten_druck_Drucken' : {1052 $GUI->generischer_sachdaten_druck_drucken();1053 } break;1054 case 'sachdaten_druck_editor' : {1055 $GUI->checkCaseAllowed('sachdaten_druck_editor');1056 $GUI->sachdaten_druck_editor();1057 } break;1058 case 'sachdaten_druck_editor_Layout automatisch erzeugen' : {1059 $GUI->checkCaseAllowed('sachdaten_druck_editor');1060 $GUI->sachdaten_druck_editor_autogenerate();1061 } break;1062 case 'sachdaten_druck_editor_als neues Layout speichern' : {1063 $GUI->checkCaseAllowed('sachdaten_druck_editor');1064 $GUI->sachdaten_druck_editor_speichern();1065 } break;1066 case 'sachdaten_druck_editor_Ãnderungen Speichern' : {1067 $GUI->checkCaseAllowed('sachdaten_druck_editor');1068 $GUI->sachdaten_druck_editor_aendern();1069 $GUI->sachdaten_druck_editor();1070 } break;1071 case 'sachdaten_druck_editor_Löschen' : {1072 $GUI->checkCaseAllowed('sachdaten_druck_editor');1073 $GUI->sachdaten_druck_editor_loeschen();1074 } break;1075 case 'sachdaten_druck_editor_übernehmen >>' : {1076 $GUI->checkCaseAllowed('sachdaten_druck_editor');1077 $GUI->sachdaten_druck_editor_add2stelle();1078 } break;1079 case 'sachdaten_druck_editor_Freitexthinzufuegen' : {1080 $GUI->checkCaseAllowed('sachdaten_druck_editor');1081 $GUI->sachdaten_druck_editor_Freitexthinzufuegen();1082 } break;1083 case 'sachdaten_druck_editor_Freitextloeschen' : {1084 $GUI->checkCaseAllowed('sachdaten_druck_editor');1085 $GUI->sachdaten_druck_editor_Freitextloeschen();1086 } break;1087 case 'sachdaten_druck_editor_Liniehinzufuegen' : {1088 $GUI->checkCaseAllowed('sachdaten_druck_editor');1089 $GUI->sachdaten_druck_editor_Liniehinzufuegen();1090 } break;1091 case 'sachdaten_druck_editor_linie_aendern' : {1092 $GUI->checkCaseAllowed('sachdaten_druck_editor');1093 $GUI->sachdaten_druck_editor_linie_aendern(1094 $GUI->formvars['line_id'],1095 $GUI->formvars['line_attribute_name'],1096 $GUI->formvars['line_attribute_value']1097 );1098 } break;1099 case 'sachdaten_druck_editor_Linieloeschen' : {1100 $GUI->checkCaseAllowed('sachdaten_druck_editor');1101 $GUI->sachdaten_druck_editor_Linieloeschen();1102 } break;1103 case 'sachdaten_druck_editor_Rechteckhinzufuegen' :1104 $GUI->checkCaseAllowed('sachdaten_druck_editor'); {1105 $GUI->sachdaten_druck_editor_Rechteckhinzufuegen();1106 } break;1107 case 'sachdaten_druck_editor_Rechteckloeschen' : {1108 $GUI->checkCaseAllowed('sachdaten_druck_editor');1109 $GUI->sachdaten_druck_editor_Rechteckloeschen();1110 } break;1111 case 'Layer_Export' : {1112 $GUI->checkCaseAllowed($go);1113 $GUI->layer_export();1114 } break;1115 case 'Layer_Export_Exportieren' : {1116 $GUI->checkCaseAllowed('Layer_Export');1117 # sanitize1118 $GUI->sanitize([1119 'layer' => 'int'1120 ]);1121 # $layer_ids1122 $GUI->layer_export_exportieren();1123 } break;1124 case 'Layer_Generator' : {1125 $GUI->checkCaseAllowed($go);1126 $GUI->layer_generator();1127 } break;1128 case 'Layer_Generator_Erzeugen' : {1129 $GUI->checkCaseAllowed('Layer_Generator');1130 $GUI->layer_generator_erzeugen();1131 $GUI->layer_generator();1132 } break;1133 case 'Style_Label_Editor' : {1134 $GUI->checkCaseAllowed($go);1135 $GUI->StyleLabelEditor();1136 } break;1137 case 'Layereditor' : {1138 $GUI->checkCaseAllowed('Layereditor');1139 $GUI->Layereditor();1140 } break;1141 case 'Layereditor_Als neuen Layer eintragen' : {1142 $GUI->checkCaseAllowed('Layereditor');1143 $GUI->LayerAnlegen();1144 $GUI->Layereditor();1145 } break;1146 case 'Layereditor_Speichern' : {1147 $GUI->checkCaseAllowed('Layereditor');1148 include_once(CLASSPATH . 'Layer.php');1149 $GUI->LayerAendern($GUI->formvars);1150 $GUI->Layereditor();1151 } break;1152 case 'Klasseneditor' : {1153 $GUI->checkCaseAllowed('Layereditor');1154 $GUI->Klasseneditor();1155 } break;1156 case 'Klasseneditor_Speichern' : {1157 $GUI->checkCaseAllowed('Layereditor');1158 $GUI->Klasseneditor_speichern();1159 } break;1160 case 'Klasseneditor_Klasse_Löschen' : {1161 $GUI->checkCaseAllowed('Layereditor');1162 $GUI->Klasseneditor_KlasseLoeschen();1163 } break;1164 case 'Klasseneditor_Klasse_Hinzufügen' : {1165 $GUI->checkCaseAllowed('Layereditor');1166 $GUI->Klasseneditor_KlasseHinzufuegen();1167 } break;1168 case 'Klasseneditor_Autoklassen_Hinzufügen' : {1169 $GUI->checkCaseAllowed('Layereditor');1170 $GUI->Klasseneditor_AutoklassenHinzufuegen();1171 } break;1172 case 'Attributeditor' : {1173 $GUI->checkCaseAllowed('Attributeditor');1174 $GUI->Attributeditor();1175 } break;1176 case 'Attributeditor_speichern' : {1177 $GUI->checkCaseAllowed('Attributeditor');1178 if (!empty($GUI->formvars['selected_layer_id']) AND empty($GUI->formvars['selected_datatype_id'])) {1179 include_once(CLASSPATH . 'Layer.php');1180 $GUI->save_layers_attributes($GUI->formvars);1181 }1182 if (empty($GUI->formvars['selected_layer_id']) AND !empty($GUI->formvars['selected_datatype_id'])) {1183 $GUI->Datentypattribute_speichern();1184 }1185 $GUI->Attributeditor();1186 } break;1187 case 'Attributeditor_Attributeinstellungen für ausgewählten Layer übernehmen' : {1188 $GUI->checkCaseAllowed('Attributeditor');1189 $GUI->Attributeditor_takeover_attributes();1190 } break;1191 case 'Datentypen_Anzeigen' : {1192 $GUI->checkCaseAllowed($go);1193 $GUI->DatentypenAnzeigen();1194 } break;1195 case 'Layer_Anzeigen' : {1196 $GUI->checkCaseAllowed($go);1197 $GUI->LayerAnzeigen();1198 } break;1199 case 'Layergruppen_Anzeigen' : {1200 $GUI->checkCaseAllowed($go);1201 $GUI->Layergruppen_Anzeigen();1202 } break;1203 case 'Layergruppe_Editor' : {1204 $GUI->checkCaseAllowed('Layergruppen_Anzeigen');1205 $GUI->Layergruppe_Editor();1206 } break;1207 case 'Layergruppe_Speichern' : {1208 $GUI->checkCaseAllowed('Layergruppen_Anzeigen');1209 $GUI->Layergruppe_Speichern();1210 } break;1211 case 'Layergruppe_Ãndern' : {1212 $GUI->checkCaseAllowed('Layergruppen_Anzeigen');1213 $GUI->Layergruppe_Aendern();1214 } break;1215 case 'Layergruppe_Löschen' : {1216 $GUI->checkCaseAllowed('Layergruppen_Anzeigen');1217 $GUI->Layergruppe_Loeschen();1218 }1219 case 'Layer_Uebersicht' : {1220 $GUI->LayerUebersicht();1221 } break;1222 case 'Layer_Löschen' : {1223 $GUI->checkCaseAllowed('Layer_Anzeigen');1224 $GUI->LayerLoeschen();1225 $GUI->LayerAnzeigen();1226 } break;1227 case 'delete_shared_layer' : {1228 $GUI->checkCaseAllowed('Layer_Anzeigen');1229 $GUI->LayerLoeschen(true); # Delete maintable too if possible1230 $GUI->add_message('notice', 'Geteilten Layer erfolgreich gelöscht!');1231 $GUI->loadMap('DataBase');1232 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;1233 $GUI->saveMap('');1234 $GUI->drawMap();1235 $GUI->output();1236 } break;1237 case 'Layer2Stelle_Reihenfolge' : {1238 $GUI->checkCaseAllowed('Stellen_Anzeigen');1239 $GUI->Layer2Stelle_Reihenfolge();1240 } break;1241 case 'Layer2Stelle_Reihenfolge_Speichern' : {1242 $GUI->checkCaseAllowed('Stellen_Anzeigen');1243 $GUI->Layer2Stelle_ReihenfolgeSpeichern();1244 } break;1245 case 'Layer2Stelle_Editor' : {1246 $GUI->checkCaseAllowed('Layereditor');1247 $GUI->Layer2Stelle_Editor();1248 } break;1249 case 'Layer2Stelle_Editor_Speichern' : {1250 $GUI->checkCaseAllowed('Layereditor');1251 $GUI->Layer2Stelle_EditorSpeichern();1252 } break;1253 case 'Layerattribut-Rechteverwaltung' : {1254 $GUI->checkCaseAllowed('Layerattribut-Rechteverwaltung');1255 $GUI->layer_attributes_privileges();1256 } break;1257 case 'Layerattribut-Rechteverwaltung_speichern' : {1258 $GUI->checkCaseAllowed('Layerattribut-Rechteverwaltung');1259 include_once(CLASSPATH . 'Layer.php');1260 $GUI->save_layers_attribute_privileges($GUI->formvars);1261 $GUI->layer_attributes_privileges();1262 } break;1263 case 'Layerattribut-Rechteverwaltung_Attributrechte für ausgewählten Layer übernehmen' : {1264 $GUI->checkCaseAllowed('Attributeditor');1265 $GUI->Attributeditor_takeover_layer_privileges();1266 $GUI->Attributeditor_takeover_layer_attributes_privileges();1267 $GUI->Attributeditor_takeover_default_layer_privileges();1268 $GUI->Attributeditor_takeover_default_layer_attributes_privileges();1269 $GUI->formvars['selected_layer_id'] = $GUI->formvars['to_layer_id'];1270 $GUI->layer_attributes_privileges();1271 } break;1272 case 'write_layer_attributes2rolle' : {1273 $GUI->write_layer_attributes2rolle();1274 } break;1275 case 'Layer_Parameter' : {1276 $GUI->checkCaseAllowed('Layer_Parameter');1277 $GUI->layer_parameter();1278 } break;1279 case 'Layer_Parameter_speichern' : {1280 $GUI->checkCaseAllowed('Layer_Parameter');1281 $GUI->layer_parameter_speichern();1282 } break;1283 case 'Stelleneditor' : {1284 $GUI->checkCaseAllowed('Stellen_Anzeigen');1285 $GUI->stelle_bearbeiten_allowed($GUI->formvars['selected_stelle_id'], $GUI->user->id);1286 $GUI->Stelleneditor();1287 } break;1288 case 'Dienstmetadaten' : {1289 $GUI->checkCaseAllowed('Dienstmetadaten');1290 $GUI->formvars['selected_stelle_id'] = $GUI->Stelle->id;1291 $GUI->Stelleneditor();1292 } break;1293 case 'Dienstmetadaten_Ãndern' : {1294 $GUI->checkCaseAllowed('Dienstmetadaten');1295 $GUI->formvars['selected_stelle_id'] = $GUI->Stelle->id;1296 $GUI->dienstmetadaten_aendern();1297 } break;1298 case 'Stelle_Löschen' : {1299 $GUI->checkCaseAllowed('Stellen_Anzeigen');1300 $GUI->stelle_bearbeiten_allowed($GUI->formvars['selected_stelle_id'], $GUI->user->id);1301 $GUI->StelleLoeschen();1302 } break;1303 case 'Stelleneditor_Als neue Stelle eintragen' : {1304 $GUI->checkCaseAllowed('Stellen_Anzeigen');1305 $GUI->StelleAnlegen();1306 } break;1307 case 'Stelleneditor_Ãndern' : {1308 $GUI->checkCaseAllowed('Stellen_Anzeigen');1309 $GUI->StelleAendern();1310 } break;1311 case 'Stellen_Anzeigen' : {1312 $GUI->checkCaseAllowed('Stellen_Anzeigen');1313 $GUI->StellenAnzeigen();1314 } break;1315 1316 case 'Stellenhierarchie' : {1317 $GUI->checkCaseAllowed('Stellen_Anzeigen');1318 $GUI->Stellenhierarchie();1319 } break; 1320 case 'Menues_Anzeigen' : {1321 $GUI->checkCaseAllowed('Menues_Anzeigen');1322 $GUI->MenuesAnzeigen();1323 } break;1324 case 'Menueeditor' : {1325 $GUI->checkCaseAllowed('Menues_Anzeigen');1326 $GUI->Menueeditor();1327 } break;1328 case 'Menue_Speichern' : {1329 $GUI->checkCaseAllowed('Menues_Anzeigen');1330 $GUI->MenueSpeichern();1331 } break;1332 case 'Menue_Ãndern' : {1333 $GUI->checkCaseAllowed('Menues_Anzeigen');1334 $GUI->MenueAendern();1335 } break;1336 case 'Menue_Als neuen Menüpunkt Eintragen' : {1337 $GUI->checkCaseAllowed('Menues_Anzeigen');1338 $GUI->MenueSpeichern();1339 } break;1340 case 'Menue_Löschen' : {1341 $GUI->checkCaseAllowed('Menues_Anzeigen');1342 $GUI->MenueLoeschen();1343 } break;1344 case 'Filterverwaltung' : {1345 $GUI->checkCaseAllowed('Filterverwaltung');1346 $GUI->Filterverwaltung();1347 $currenttime=date('Y-m-d H:i:s',time());1348 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1349 $GUI->drawMap();1350 $GUI->output();1351 }break;1352 case 'Filterverwaltung_speichern' : {1353 $GUI->checkCaseAllowed('Filterverwaltung');1354 $GUI->Filter_speichern($GUI->formvars);1355 $currenttime=date('Y-m-d H:i:s',time());1356 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1357 $GUI->drawMap();1358 $GUI->output();1359 }break;1360 case 'BenutzerStellen_Anzeigen' : {1361 $GUI->checkCaseAllowed('Benutzerdaten_Anzeigen');1362 $GUI->BenutzerNachStellenAnzeigen();1363 } break;1364 case 'BenutzerderStelleAnzeigen' : {1365 $GUI->BenutzerderStelleAnzeigen();1366 } break;1367 case 'Benutzerdaten_Anzeigen' : {1368 $GUI->checkCaseAllowed('Benutzerdaten_Anzeigen');1369 $GUI->BenutzerdatenAnzeigen();1370 } break;1371 case 'Benutzerdaten_Formular' : {1372 $GUI->checkCaseAllowed('Benutzerdaten_Formular');1373 $GUI->user_bearbeiten_allowed($GUI->formvars['selected_user_id'], $GUI->user->id);1374 $GUI->BenutzerdatenFormular();1375 } break;1376 case 'Benutzer_Löschen' : {1377 $GUI->checkCaseAllowed('Benutzerdaten_Anzeigen');1378 $GUI->user_bearbeiten_allowed($GUI->formvars['selected_user_id'], $GUI->user->id);1379 $GUI->BenutzerLöschen();1380 } break;1381 case 'Benutzerdaten_Als neuen Nutzer eintragen' : {1382 $GUI->checkCaseAllowed('Benutzerdaten_Formular');1383 $GUI->BenutzerdatenAnlegen();1384 } break;1385 case 'Benutzerdaten_Ãndern' : {1386 $GUI->checkCaseAllowed('Benutzerdaten_Formular');1387 $GUI->BenutzerdatenAendern();1388 } break;1389 case 'Benutzerdaten_Layer_Deaktivieren' : {1390 $GUI->checkCaseAllowed('Benutzerdaten_Formular');1391 $GUI->BenutzerdatenLayerDeaktivieren();1392 } break;1393 case 'als_nutzer_anmelden' : {1394 $GUI->checkCaseAllowed('Benutzerdaten_Formular');1395 $GUI->als_nutzer_anmelden_allowed($GUI->formvars['selected_user_id'], $GUI->user->id);1396 $_SESSION['login_name'] = $GUI->formvars['loginname'];1397 header('location: index.php');1398 } break;1399 case 'connections_anzeigen' : {1400 $GUI->checkCaseAllowed('Layer_Anzeigen');1401 $GUI->connections_anzeigen();1402 } break;1403 case 'connection_create' : {1404 $GUI->checkCaseAllowed('Layer_Anzeigen');1405 $GUI->connection_create();1406 } break;1407 case 'connection_update' : {1408 $GUI->checkCaseAllowed('Layer_Anzeigen');1409 $GUI->connection_update();1410 } break;1411 case 'connection_delete' : {1412 $GUI->checkCaseAllowed('Layer_Anzeigen');1413 $GUI->connection_delete();1414 } break;1415 case 'cronjobs_anzeigen' : {1416 $GUI->checkCaseAllowed('cronjobs_anzeigen');1417 $GUI->cronjobs_anzeigen();1418 } break;1419 case 'cronjob_editieren' : {1420 $GUI->checkCaseAllowed('cronjobs_anzeigen');1421 $GUI->cronjob_editieren();1422 } break;1423 case 'cronjob_speichern_Anlegen' : {1424 $GUI->checkCaseAllowed('cronjobs_anzeigen');1425 $GUI->cronjobs_anlegen();1426 } break;1427 case 'cronjob_speichern_Speichern' : {1428 $GUI->checkCaseAllowed('cronjobs_anzeigen');1429 $GUI->cronjob_update();1430 } break;1431 case 'cronjob_löschen' : {1432 $GUI->checkCaseAllowed('cronjobs_anzeigen');1433 $GUI->cronjob_delete();1434 } break;1435 case 'crontab_schreiben' : {1436 $GUI->checkCaseAllowed('cronjobs_anzeigen');1437 $GUI->crontab_schreiben();1438 } break;1439 case 'Funktionen_Anzeigen' : {1440 $GUI->checkCaseAllowed('Funktionen_Anzeigen');1441 $GUI->FunktionenAnzeigen();1442 } break;1443 case 'Funktionen_Formular' : {1444 $GUI->checkCaseAllowed('Funktionen_Formular');1445 $GUI->FunktionenFormular();1446 } break;1447 case 'Funktion_Löschen' : {1448 $GUI->checkCaseAllowed('Funktionen_Anzeigen');1449 $GUI->FunktionLoeschen();1450 } break;1451 case 'Funktionen_Als neue Funktion eintragen' : {1452 $GUI->checkCaseAllowed('Funktionen_Formular');1453 $GUI->FunktionAnlegen();1454 } break;1455 case 'Funktionen_Ãndern' : {1456 $GUI->checkCaseAllowed('Funktionen_Formular');1457 $GUI->FunktionAendern();1458 } break;1459 case "Ãndern" : {1460 $GUI->loadMap('DataBase');1461 $GUI->scaleMap($GUI->formvars['nScale']);1462 $currenttime=date('Y-m-d H:i:s',time());1463 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1464 $GUI->drawMap();1465 $GUI->saveMap('');1466 $GUI->output();1467 } break;1468 case "tooltip_query" : {1469 $GUI->show_query_tooltip = true;1470 $GUI->queryMap();1471 } break;1472 case "neu Laden" : {1473 $GUI->neuLaden();1474 $GUI->saveMap('');1475 $currenttime=date('Y-m-d H:i:s',time());1476 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1477 $GUI->drawMap();1478 $GUI->output();1479 } break;1480 case "zoomToMaxLayerExtent" : {1481 $GUI->loadMap('DataBase');1482 $GUI->zoomToMaxLayerExtent($GUI->formvars['layer_id']);1483 $currenttime=date('Y-m-d H:i:s',time());1484 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1485 $GUI->drawMap();1486 $GUI->saveMap('');1487 $GUI->output();1488 } break;1489 case "setMapExtent" : {1490 $GUI->setMapExtent();1491 } break;1492 case "history_move" : {1493 $GUI->neuLaden();1494 $GUI->saveMap('');1495 $GUI->drawMap();1496 $GUI->output();1497 } break;1498 case "Full_Extent" : {1499 $GUI->loadMap('DataBase');1500 $GUI->navMap('Full_Extent');1501 $currenttime=date('Y-m-d H:i:s',time());1502 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);1503 $GUI->drawMap();1504 $GUI->saveMap('');1505 $GUI->output();1506 } break;1507 # Auswählen einer neuen Stelle1508 case 'Stelle_waehlen' : case 'Stelle_waehlen_Passwort_aendern' : {1509 $GUI->checkCaseAllowed('Stelle_waehlen');1510 $GUI->rollenwahl($GUI->Stelle->id);1511 $GUI->output();1512 } break;1513 case 'Einladungen_Anzeigen' : {1514 $GUI->checkCaseAllowed('Einladungen_Anzeigen');1515 $GUI->invitations_list();1516 } break;1517 case 'Einladung_Editor' : {1518 $GUI->checkCaseAllowed('Einladungen_Anzeigen');1519 $GUI->invitation_formular();1520 } break;1521 case 'Einladung_Speichern' : {1522 $GUI->checkCaseAllowed('Einladungen_Anzeigen');1523 $GUI->invitation_save();1524 } break;1525 case 'Einladung_Ãndern' : {1526 $GUI->checkCaseAllowed('Einladungen_Anzeigen');1527 $GUI->invitation_update();1528 } break;1529 case 'Einladung_Löschen' : {1530 $GUI->checkCaseAllowed('Einladungen_Anzeigen');1531 $GUI->invitation_delete();1532 } break;1533 case 'geo_name_query' : {1534 $GUI->geo_name_query();1535 } break;1536 case 'delete_rollenlayer' : {1537 $GUI->sanitize([1538 'selected_rollenlayer_id' => 'int',1539 'delete_rollenlayer_type' => 'text'1540 ]);1541 $GUI->deleteRollenlayer();1542 } break;1543 case 'share_rollenlayer': {1544 $GUI->checkCaseAllowed('share_rollenlayer');1545 $GUI->sanitize(['selected_rollenlayer_id' => 'int']);1546 $GUI->share_rollenlayer();1547 $GUI->loadMap('DataBase');1548 $currenttime = date('Y-m-d H:i:s',time());1549 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap', $GUI->user->rolle->last_time_id);1550 $GUI->saveMap('');1551 $GUI->drawMap();1552 $GUI->output();1553 } break;1554 default : {1555 # Karteninformationen lesen1556 $GUI->loadMap('DataBase');1557 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;1558 $GUI->saveMap('');1559 $GUI->drawMap();1560# $GUI->add_message('info', 'Die Anwendung wird gerade überarbeitet. Es ist nicht sicher gestellt, dass sie richtig funktioniert und es können Fehlermeldungen auftreten!');1561 $GUI->output();1562 }1563 }1564 }1565 if ($exit) {1566 include('end.php');1567 exit;1568 }1569};1570go_switch($go);1571include('end.php');1572if (CASE_COMPRESS AND FAST_CASE) case_compressor::write_fast_case_file($go);1573// $executiontimes['time'][] = microtime_float1();1574// $executiontimes['action'][] = 'Ende';1575// for($i = 0; $i < count($executiontimes['time']); $i++){1576 // if($i > 0)$dauer1 = $executiontimes['time'][$i] - $executiontimes['time'][$i-1];1577 // else $dauer1 = 0;1578 // $dauer2 = $executiontimes['time'][$i] - $starttime;1579 // echo chr(10).chr(13).'<br>'.$executiontimes['action'][$i].': '.$dauer1.'s seit Start '.$dauer2.'s';1580// }1581?>...
kvwmap.php
Source:kvwmap.php
1<?2 $GUI->jagdbezirk_show_data = function() use ($GUI){3 $GUI->mapDB = new db_mapObj($GUI->Stelle->id,$GUI->user->id);4 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);5 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);6 $jagdkataster->clientepsg = $GUI->user->rolle->epsg_code;7 8 $privileges = $GUI->Stelle->get_attributes_privileges($layer[0]['Layer_ID']);9 $layer[0]['attributes'] = $GUI->mapDB->read_layer_attributes($layer[0]['Layer_ID'], $GUI->pgdatabase, $privileges['attributenames']);10 if($privileges == NULL){ # kein Eintrag -> alle Attribute lesbar11 for($j = 0; $j < count($layer[0]['attributes']['name']); $j++){12 $layer[0]['attributes']['privileg'][$j] = '0';13 $layer[0]['attributes']['privileg'][$layer[0]['attributes']['name'][$j]] = '0';14 }15 }16 else{17 for($j = 0; $j < count($layer[0]['attributes']['name']); $j++){18 $layer[0]['attributes']['privileg'][$j] = $privileges[$layer[0]['attributes']['name'][$j]];19 $layer[0]['attributes']['privileg'][$layer[0]['attributes']['name'][$j]] = $privileges[$layer[0]['attributes']['name'][$j]];20 }21 }22 $GUI->qlayerset = $layer;23 $jagdbezirk = $jagdkataster->getjagdbezirk($GUI->formvars['oid']);24 $GUI->qlayerset[0]['shape'][0] = $jagdbezirk;25 $i = 0;26 $GUI->main = PLUGINS.'jagdkataster/view/jagdbezirke.php';27 $GUI->output();28 };29 $GUI->zoomtojagdbezirk = function() use ($GUI){30 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);31 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);32 $jagdkataster->clientepsg = $GUI->user->rolle->epsg_code;33 $rect = $jagdkataster->zoomTojagdbezirk($GUI->formvars['oid'], 10);34 $GUI->loadMap('DataBase');35 $GUI->map->setextent($rect->minx,$rect->miny,$rect->maxx,$rect->maxy);36 if(MAPSERVERVERSION >= 600 ) {37 $GUI->map_scaledenom = $GUI->map->scaledenom;38 }39 else {40 $GUI->map_scaledenom = $GUI->map->scale;41 }42 $currenttime=date('Y-m-d H:i:s',time());43 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);44 $GUI->drawMap();45 $GUI->saveMap('');46 $GUI->output();47 };48 $GUI->jagdbezirke_suchen = function() use ($GUI){49 $GUI->sanitize([50 'search_nummer' => 'text',51 'jagd_search_name' => 'text',52 'search_art' => 'text',53 'search_status' => 'text',54 'search_verzicht' => 'text',55 'order' => 'text']);56 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);57 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);58 $GUI->jagdbezirke = $GUI->jagdkataster->suchen($GUI->formvars);59 };60 $GUI->jagdbezirke_auswaehlen_suchen_csv = function() use ($GUI){61 $GUI->jagdbezirke_suchen();62 $anz = count($GUI->jagdbezirke);63 for($i = 0; $i < $anz; $i++) { 64 if($GUI->jagdbezirke[$i]['art']=='ejb' OR $GUI->jagdbezirke[$i]['art']=='gjb'){65 $csv.= "'".$GUI->jagdbezirke[$i]['id']."';";66 }67 else{68 $csv.= "'".$GUI->jagdbezirke[$i]['jb_zuordnung']."';"; 69 }70 $csv.= $GUI->jagdbezirke[$i]['name'].';';71 $csv.= "'".$GUI->jagdbezirke[$i]['flaeche']."';";72 $csv.= $GUI->jagdbezirke[$i]['art'].';';73 $csv.= chr(10); 74 }75 $csv = 'lfd. Nummer;Name;Fläche;Typ'.chr(10).$csv;76 ob_end_clean();77 header("Content-type: application/vnd.ms-excel");78 header("Content-disposition: inline; filename=Flurstuecke.csv");79 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');80 header('Pragma: public');81 print utf8_decode($csv);82 };83 84 $GUI->jagdbezirke_auswaehlen_suchen = function() use ($GUI){85 $GUI->jagdbezirke_suchen();86 $GUI->jagdbezirke_auswaehlen();87 };88 $GUI->jagdbezirke_auswaehlen = function() use ($GUI){89 $GUI->main = PLUGINS.'jagdkataster/view/jagdkatastersuchform.php';90 $GUI->titel='Jagdbezirke suchen';91 $GUI->output();92 };93 $GUI->jagdkatastereditor = function() use ($GUI){94 $GUI->sanitize(['geom_from_layer' => 'int', 'oid' => 'int']);95 $GUI->main = PLUGINS.'jagdkataster/view/jagdkatastereditor.php';96 $GUI->titel='Jagdbezirk anlegen';97 $saved_scale = $GUI->reduce_mapwidth(100);98 $GUI->loadMap('DataBase');99 if($saved_scale != NULL)$GUI->scaleMap($saved_scale); # nur beim ersten Aufruf den Extent so anpassen, dass der alte MaÃstab wieder da ist100 $GUI->queryable_vector_layers = $GUI->Stelle->getqueryableVectorLayers(NULL, $GUI->user->id, NULL, NULL, NULL, true, true);101 if(!$GUI->formvars['geom_from_layer']){102 $layerset = $GUI->user->rolle->getLayer(LAYERNAME_FLURSTUECKE);103 $GUI->formvars['geom_from_layer'] = $layerset[0]['Layer_ID'];104 }105 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);106 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);107 $jagdkataster->layerepsg = $layer[0]['epsg_code'];108 $jagdkataster->clientepsg = $GUI->user->rolle->epsg_code;109 if ($GUI->formvars['oid']!='') { # Jagdbezirk bearbeiten110 $GUI->titel='Jagdbezirk bearbeiten';111 $rect = $jagdkataster->zoomTojagdbezirk($GUI->formvars['oid'], 10);112 $GUI->map->setextent($rect->minx,$rect->miny,$rect->maxx,$rect->maxy);113 if(MAPSERVERVERSION >= 600 ) {114 $GUI->map_scaledenom = $GUI->map->scaledenom;115 }116 else {117 $GUI->map_scaledenom = $GUI->map->scale;118 }119 $GUI->jagdbezirk = $jagdkataster->getjagdbezirk($GUI->formvars['oid']);120 $GUI->formvars['newpathwkt'] = $GUI->jagdbezirk['wktgeom'];121 $GUI->formvars['pathwkt'] = $GUI->formvars['newpathwkt'];122 $GUI->formvars['newpath'] = transformCoordsSVG($GUI->jagdbezirk['svggeom']);123 $GUI->formvars['firstpoly'] = 'true';124 }125 if ($GUI->formvars['CMD']!='') {126 $GUI->navMap($GUI->formvars['CMD']);127 }128 $currenttime=date('Y-m-d H:i:s',time());129 $GUI->user->rolle->setConsumeActivity($currenttime,'getMap',$GUI->user->rolle->last_time_id);130 $GUI->drawMap();131 $GUI->saveMap('');132 $GUI->output();133 };134 135 $GUI->jagdkatastereditor_senden = function() use ($GUI){136 $GUI->sanitize([137 'newpathwkt' => 'text', 138 'nummer' => 'text', 139 'name' => 'text', 140 'art' => 'text', 141 'area' => 'float', 142 'jb_zuordnung' => 'text', 143 'status' => 'text', 144 'verzicht' => 'text', 145 'oid' => 'int']);146 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);147 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);148 $jagdkataster->layerepsg = $layer[0]['epsg_code'];149 $jagdkataster->clientepsg = $GUI->user->rolle->epsg_code;150 # eingeabewerte pruefen:151 $ret = $jagdkataster->pruefeEingabedaten($GUI->formvars['newpathwkt'], $GUI->formvars['nummer']);152 if ($ret[0]) { # fehlerhafte eingabedaten153 $GUI->Meldung=$ret[1];154 $GUI->jagdkatastereditor();155 return;156 }157 else{158 $umring = $GUI->formvars['newpathwkt'];159 $ret = $jagdkataster->eintragenNeueFlaeche($umring, $GUI->formvars['nummer'], $GUI->formvars['name'], $GUI->formvars['art'], $GUI->formvars['area'], $GUI->formvars['jb_zuordnung'], $GUI->formvars['status'], $GUI->formvars['verzicht'], $GUI->formvars['oid']);160 if ($ret[0]) { # fehler beim eintrag161 $GUI->Meldung=$ret[1];162 }163 else { # eintrag erfolgreich164 $GUI->formvars['newpath']="";165 $GUI->formvars['newpathwkt']="";166 $GUI->formvars['pathwkt']="";167 $GUI->formvars['firstpoly']="";168 $GUI->formvars['secondpoly']="";169 $GUI->add_message('notice', 'Eintrag erfolgreich!');170 }171 $GUI->jagdkatastereditor();172 }173 };174 $GUI->jagdkatastereditor_loeschen = function() use ($GUI){175 $GUI->sanitize(['checkbox_names_'.$GUI->formvars['chosen_layer_id'] => 'text', 'oid' => 'int']);176 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);177 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);178 $jagdkataster->deletejagdbezirk($GUI->formvars);179 if($GUI->formvars['oid'] == ''){180 $GUI->jagdbezirke_auswaehlen_suchen(); # zurück zum Suchergebnis181 }182 else{183 $GUI->loadMap('DataBase');184 $GUI->user->rolle->newtime = $GUI->user->rolle->last_time_id;185 $GUI->drawMap();186 $GUI->saveMap('');187 $GUI->output();188 }189 };190 $GUI->jagdkatastereditor_kopieren = function() use ($GUI){191 $GUI->sanitize(['oid' => 'int']);192 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);193 $jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);194 $GUI->formvars['oid'] = $jagdkataster->copyjagdbezirk($GUI->formvars['oid']);195 $GUI->jagdkatastereditor();196 };197 $GUI->jagdkatastereditor_listflurst_csv = function() use ($GUI){198 $GUI->sanitize(['checkbox_names_'.$GUI->formvars['chosen_layer_id'] => 'text', 'oid' => 'int']);199 include(PLUGINS.'alkis/model/kataster.php'); 200 if($GUI->formvars['FlurstKennz'] != ''){201 $selected_flurstuecke = explode(';', $GUI->formvars['FlurstKennz']);202 }203 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);204 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);205 $GUI->flurstuecke = $GUI->jagdkataster->getIntersectedFlurst($GUI->formvars);206 for($i = 0; $i < count($GUI->flurstuecke); $i++){207 if($GUI->formvars['FlurstKennz'] == '' OR in_array($GUI->flurstuecke[$i]['flurstkennz'], $selected_flurstuecke)){208 $csv .= $GUI->flurstuecke[$i]['gemkgname'].';';209 $csv .= $GUI->flurstuecke[$i]['flur'].';';210 $csv .= " ".$GUI->flurstuecke[$i]['zaehler'].";";211 $csv .= " ".$GUI->flurstuecke[$i]['nenner'].";";212 for($j=0; $j < @count($GUI->flurstuecke[$i]['eigentuemer']); $j++){213 $csv .= str_replace(';', ',', $GUI->flurstuecke[$i]['eigentuemer'][$j]).' ('.$GUI->flurstuecke[$i]['eigentuemer_nr'][$j].') ';214 }215 $csv .= ';';216 $csv .= $GUI->flurstuecke[$i]['albflaeche'].';';217 $csv .= str_replace('.', ',', round($GUI->flurstuecke[$i]['schnittflaeche'], 2)).';';218 $csv .= str_replace('.', ',', $GUI->flurstuecke[$i]['anteil']).';';219 $csv .= chr(10); 220 }221 }222 $csv = 'Gemarkung;Flur;Zähler;Nenner;Eigentümer (Nr.);amtl. Flst-Fläche;Anteil m²;Anteil %'.chr(10).$csv;223 ob_end_clean();224 header("Content-type: application/vnd.ms-excel");225 header("Content-disposition: inline; filename=Flurstuecke.csv");226 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');227 header('Pragma: public');228 print utf8_decode($csv);229 };230 231 $GUI->jagdkatastereditor_listflurst = function() use ($GUI){232 $GUI->sanitize(['checkbox_names_'.$GUI->formvars['chosen_layer_id'] => 'text', 'oid' => 'int']);233 include(PLUGINS.'alkis/model/kataster.php'); 234 $GUI->main = PLUGINS.'jagdkataster/view/jagdkataster_flurstlist.php';235 if($GUI->formvars['oid'])$GUI->titel='Im Jagdbezirk '.$GUI->formvars['name'].' enthaltene Flurstücke';236 else $GUI->titel='Enthaltene Flurstücke in Jagdbezirken';237 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);238 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);239 $GUI->flurstuecke = $GUI->jagdkataster->getIntersectedFlurst($GUI->formvars);240 $GUI->output();241 };242 243 $GUI->jagdkatastereditor_listeigentuemer_csv = function() use ($GUI){244 $GUI->sanitize(['checkbox_names' => 'text', 'oid' => 'int']);245 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);246 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);247 $GUI->eigentuemer = $GUI->jagdkataster->getEigentuemerListe($GUI->formvars);248 for($i = 0; $i < count($GUI->eigentuemer)-1; $i++){ 249 $csv .= str_replace(';', ' ', $GUI->eigentuemer[$i]['eigentuemer']).';';250 $csv .= str_replace('.', ',', $GUI->eigentuemer[$i]['anteil_alk']).';';251 $csv .= str_replace('.', ',', round($GUI->eigentuemer[$i]['albflaeche']*100/$GUI->eigentuemer['albsumme'], 1)).';';252 $csv .= str_replace('.', ',', $GUI->eigentuemer[$i]['albflaeche']).';';253 $csv .= chr(10); 254 }255 $csv = 'Eigentümer;geometrischer Anteil;Anteil nach amtl. Fläche[%];Anteil nach amtl. Fläche[m²]'.chr(10).$csv;256 ob_end_clean();257 header("Content-type: application/vnd.ms-excel");258 header("Content-disposition: inline; filename=eigentuemer.csv");259 header('Cache-Control: must-revalidate, post-check=0, pre-check=0');260 header('Pragma: public');261 print utf8_decode($csv);262 };263 264 $GUI->jagdkatastereditor_listeigentuemer = function() use ($GUI){265 $GUI->sanitize(['checkbox_names' => 'text', 'oid' => 'int']);266 $GUI->main = PLUGINS.'jagdkataster/view/jagdkataster_eigentuemerlist.php';267 $GUI->titel='Eigentümer im Jagdbezirk '.$GUI->formvars['name'];268 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);269 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);270 $GUI->eigentuemer = $GUI->jagdkataster->getEigentuemerListe($GUI->formvars);271 $GUI->output();272 };273 274 $GUI->jagdkatastereditor_listpaechter = function() use ($GUI){275 $GUI->sanitize(['oid' => 'int']);276 $GUI->main = PLUGINS.'jagdkataster/view/jagdkataster_paechterlist.php';277 $GUI->titel='Pächter im Jagdbezirk '.$GUI->formvars['name'].'';278 $layer = $GUI->user->rolle->getLayer(LAYER_ID_JAGDBEZIRKE);279 $GUI->jagdkataster = new jagdkataster($GUI->pgdatabase, $layer);280 $GUI->paechter = $GUI->jagdkataster->get_paechter($GUI->formvars['oid']);281 $GUI->output();282 };283?>...
class.arGUI.php
Source:class.arGUI.php
...81 break;82 }83 }84 /**85 * @param arIndexTableGUI $table_gui86 */87 function index(arIndexTableGUI $table_gui = NULL) {88 if (!$table_gui) {89 $index_table_gui_class = $this->record_type . "IndexTableGUI";90 /**91 * @var arIndexTableGUI $table_gui92 */93 $table_gui = new $index_table_gui_class($this, "index", new ActiveRecordList($this->ar));94 }95 $this->tpl->setContent($table_gui->getHTML());96 }97 function applyFilter() {98 $index_table_gui_class = $this->record_type . "IndexTableGUI";99 /**100 * @var arIndexTableGUI $table_gui101 */102 $table_gui = new $index_table_gui_class($this, "index", new ActiveRecordList($this->ar));103 $table_gui->applyFilter();104 $this->index();105 }106 function resetFilter() {107 $index_table_gui_class = $this->record_type . "IndexTableGUI";108 /**109 * @var arIndexTableGUI $table_gui110 */111 $table_gui = new $index_table_gui_class($this, "index", new ActiveRecordList($this->ar));112 $table_gui->resetFilter();113 $this->index();114 }115 /**116 * @param string $action_name117 */118 function multiAction($action_name = "") {119 $ids = array();120 if ($_POST['id']) {121 foreach ($_POST['id'] as $id) {122 $ids[] = arIndexTableGUI::domid_decode($id);123 }124 }125 if (empty($ids)) {126 ilUtil::sendFailure($this->txt("no_checkbox", false), true);127 $this->ctrl->redirect($this, "index");128 }129 switch ($action_name) {130 case "delete":131 $this->deleteMultiple($ids);132 break;133 default:134 $this->customMultiAction($action_name, $ids);135 break;136 }137 }138 /**139 * @param string $action_name140 * @param null $ids141 */142 function customMultiAction($action_name = "", $ids = NULL) {143 }144 /**145 * Configure screen146 */147 function edit($id) {148 $edit_gui_class = $this->record_type . "EditGUI";149 /**150 * @var arEditGUI $edit_gui151 */152 $edit_gui = new $edit_gui_class($this, $this->ar->find($id));153 $this->tpl->setContent($edit_gui->getHTML());154 }155 function add() {156 $edit_gui_class = $this->record_type . "EditGUI";157 /**158 * @var arEditGUI $edit_gui159 */160 $edit_gui = new $edit_gui_class($this, $this->ar);161 $this->tpl->setContent($edit_gui->getHTML());162 }163 public function create() {164 $edit_gui_class = $this->record_type . "EditGUI";165 /**166 * @var arEditGUI $edit_gui167 */168 $edit_gui = new $edit_gui_class($this, $this->ar);169 $this->save($edit_gui);170 }171 /**172 * @param $id173 */174 public function update($id) {175 $edit_gui_class = $this->record_type . "EditGUI";176 /**177 * @var arEditGUI $edit_gui178 */179 $edit_gui = new $edit_gui_class($this, $this->ar->find($id));180 $this->save($edit_gui);181 }182 /**183 * @param arEditGUI $edit_gui184 */185 public function save(arEditGUI $edit_gui) {186 if ($edit_gui->saveObject()) {187 ilUtil::sendSuccess($this->getRecordCreatedMessage());188 $this->ctrl->redirect($this, "index");189 } else {190 $this->tpl->setContent($edit_gui->getHTML());191 }192 }193 /**194 * @return string195 */196 public function getRecordCreatedMessage() {197 return $this->txt(('record_created'), true);198 }199 /**200 * @param $id201 */202 function view($id) {203 $display_gui_class = $this->record_type . "DisplayGUI";204 /**205 * @var arDisplayGUI $display_gui206 */207 $display_gui = new $display_gui_class($this, $this->ar->find($id));208 $this->tpl->setContent($display_gui->getHtml());209 }210 /**211 * @param $id212 */213 function delete($id) {214 $this->deleteMultiple(array( $id ));215 }216 /**217 * @param $ids []218 */219 function deleteMultiple($ids = NULL) {220 $delete_gui_class = $this->record_type . "DeleteGUI";221 /**222 * @var arDeleteGUI $delete_gui223 */224 $delete_gui = new $delete_gui_class($this, "delete", new ActiveRecordList($this->ar), "delete", $ids);225 if (count($ids) == 1) {226 ilUtil::sendQuestion($this->getDeleteRecordConfirmationMessage());227 } else {228 ilUtil::sendQuestion($this->getDeleteRecordsConfirmationMessage());229 }230 $this->tpl->setContent($delete_gui->getHTML());231 }232 /**233 * @return string234 */235 public function getDeleteRecordsConfirmationMessage() {236 return $this->txt(('delete_records_confirmation'), true);237 }238 /**239 * @return string240 */241 public function getDeleteRecordConfirmationMessage() {242 return $this->txt(('delete_record_confirmation'), true);243 }244 function deleteItems() {...
gui
Using AI Code Generation
1include_once('pts-core/objects/pts_test_profile.php');2include_once('pts-core/objects/pts_test_result.php');3include_once('pts-core/objects/pts_test_run_request.php');4include_once('pts-core/objects/pts_test_run_manager.php');5include_once('pts-core/objects/pts_test_run_result.php');6include_once('pts-core/objects/pts_test_run_request.php');7include_once('pts-core/objects/pts_test_run_request.php');8include_once('pts-core/objects/pts_test_result_buffer.php');9include_once('pts-core/objects/pts_test_suite.php');10include_once('pts-core/objects/pts_test.php');11include_once('pts-core/objects/pts_test_result.php');12include_once('pts-core/objects/pts_test_result_buffer.php');
gui
Using AI Code Generation
1require_once('gui.php');2require_once('test-profile.php');3require_once('pts-core.php');4require_once('pts-result-file-parser.php');5require_once('pts-test-profile.php');6require_once('pts-test-run-result.php');7require_once('pts-test-suite.php');8require_once('pts-test-suite-objects.php');9require_once('pts-test-suite-parse.php');10require_once('pts-test-suite-result.php');11require_once('pts-user-config.php');12require_once('pts-utils.php');13require_once('pts-validation.php');14require_once('pts-various.php');15require_once('pts-websocket.php');16require_once('pts-websocket-server.php');17require_once('pts-websocket-server-client.php');18require_once('pts-websocket-server-client-connections.php');19require_once('pts-websocket-server-client-connection.php');20require_once('pts-core.php');21require_once('pts-test-profile.php');
gui
Using AI Code Generation
1require_once('pts-core/pts-core.php');2$gui = new pts_gui();3require_once('pts-core/objects/test_profile.php');4$test_profile = new pts_test_profile('test_profile.xml');5require_once('pts-core/objects/test_result.php');6$test_result = new pts_test_result('test_result.xml');7require_once('pts-core/objects/test_run_request.php');8$test_run_request = new pts_test_run_request('test_run_request.xml');9require_once('pts-core/objects/test_run_manager.php');10$test_run_manager = new pts_test_run_manager('test_run_manager.xml');11require_once('pts-core/objects/test_result_buffer.php');
gui
Using AI Code Generation
1$gui = new pts_gui();2$gui->render_header('Test Profile');3$gui->render_footer();4$gui = new pts_gui();5$gui->render_header('Test Profile');6$gui->render_footer();7$gui = new pts_gui();8$gui->render_header('Test Profile');9$gui->render_footer();10$gui = new pts_gui();11$gui->render_header('Test Profile');12$gui->render_footer();13$gui = new pts_gui();14$gui->render_header('Test Profile');15$gui->render_footer();16$gui = new pts_gui();17$gui->render_header('Test Profile');18$gui->render_footer();19$gui = new pts_gui();20$gui->render_header('Test Profile');21$gui->render_footer();22$gui = new pts_gui();23$gui->render_header('Test Profile');24$gui->render_footer();25$gui = new pts_gui();26$gui->render_header('Test Profile');27$gui->render_footer();28$gui = new pts_gui();29$gui->render_header('Test Profile');30$gui->render_footer();31$gui = new pts_gui();32$gui->render_header('Test Profile');33$gui->render_footer();34$gui = new pts_gui();35$gui->render_header('Test Profile');36$gui->render_footer();
gui
Using AI Code Generation
1include_once('pts-core/pts-core.php');2$gui = new pts_gui();3$gui->page_header('Phoronix Test Suite');4$gui->page_footer();5include_once('pts-core/pts-core.php');6$gui = new pts_gui();7$gui->page_header('Phoronix Test Suite');8$gui->page_footer();9include_once('pts-core/pts-core.php');10$gui = new pts_gui();11$gui->page_header('Phoronix Test Suite');12$gui->page_footer();13include_once('pts-core/pts-core.php');14$gui = new pts_gui();15$gui->page_header('Phoronix Test Suite');16$gui->page_footer();17include_once('pts-core/pts-core.php');18$gui = new pts_gui();19$gui->page_header('Phoronix Test Suite');20$gui->page_footer();21include_once('pts-core/pts-core.php');22$gui = new pts_gui();23$gui->page_header('Phoronix Test Suite');24$gui->page_footer();25include_once('pts-core/pts-core.php');26$gui = new pts_gui();27$gui->page_header('Phoronix Test Suite');28$gui->page_footer();29include_once('pts-core/pts-core.php');30$gui = new pts_gui();31$gui->page_header('Phoronix Test Suite');32$gui->page_footer();33include_once('pts-core/pts-core.php');34$gui = new pts_gui();35$gui->page_header('Phoronix Test Suite');36$gui->page_footer();37include_once('pts
gui
Using AI Code Generation
1require_once('gui.php');2$gui = new gui();3$gui->start();4$gui->end();5{6public function start()7{8echo "start gui";9}10public function end()11{12echo "end gui";13}14}
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Trigger Selenium automation tests on a cloud-based Grid of 3000+ real browsers and operating systems.
Test now for FreeGet 100 minutes of automation test minutes FREE!!