[Mapbender-commits] r2225 - in branches: . 2.4.5_rc1/conf
2.4.5_rc1/documents 2.4.5_rc1/http 2.4.5_rc1/http/classes
2.4.5_rc1/http/extensions 2.4.5_rc1/http/frames
2.4.5_rc1/http/include 2.4.5_rc1/http/javascripts
2.4.5_rc1/http/php 2.4.5_rc1/http/print 2.4.5_rc1/resources/db/mysql
2.4.5_rc1/resources/db/postgresql 2.4.5_rc1/resources/db/update
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Mar 13 06:01:15 EDT 2008
Author: christoph
Date: 2008-03-13 06:01:11 -0400 (Thu, 13 Mar 2008)
New Revision: 2225
Added:
branches/2.4.5_rc1/
branches/2.4.5_rc1/conf/mapbender.conf-dist
branches/2.4.5_rc1/documents/jsdoc/
branches/2.4.5_rc1/http/classes/class_administration.php
branches/2.4.5_rc1/http/classes/class_stripRequest.php
branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php
branches/2.4.5_rc1/http/extensions/ext_weldMaps.php
branches/2.4.5_rc1/http/extensions/geom2wfst.php
branches/2.4.5_rc1/http/extensions/markResult.php
branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js
branches/2.4.5_rc1/http/frames/index.php
branches/2.4.5_rc1/http/include/dyn_css.php
branches/2.4.5_rc1/http/include/dyn_js.php
branches/2.4.5_rc1/http/include/dyn_php.php
branches/2.4.5_rc1/http/index.php
branches/2.4.5_rc1/http/javascripts/geometry.js
branches/2.4.5_rc1/http/javascripts/map.php
branches/2.4.5_rc1/http/javascripts/mod_addWMS.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php
branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php
branches/2.4.5_rc1/http/javascripts/mod_back.php
branches/2.4.5_rc1/http/javascripts/mod_center1.php
branches/2.4.5_rc1/http/javascripts/mod_coords.php
branches/2.4.5_rc1/http/javascripts/mod_coords_div.php
branches/2.4.5_rc1/http/javascripts/mod_copyright.php
branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php
branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php
branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php
branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php
branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php
branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php
branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php
branches/2.4.5_rc1/http/javascripts/mod_export_image.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php
branches/2.4.5_rc1/http/javascripts/mod_forward.php
branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php
branches/2.4.5_rc1/http/javascripts/mod_getArea.php
branches/2.4.5_rc1/http/javascripts/mod_help.php
branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php
branches/2.4.5_rc1/http/javascripts/mod_home.php
branches/2.4.5_rc1/http/javascripts/mod_initWmc.php
branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php
branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php
branches/2.4.5_rc1/http/javascripts/mod_key.php
branches/2.4.5_rc1/http/javascripts/mod_legend.php
branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php
branches/2.4.5_rc1/http/javascripts/mod_measure.php
branches/2.4.5_rc1/http/javascripts/mod_navFrame.php
branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php
branches/2.4.5_rc1/http/javascripts/mod_pan.php
branches/2.4.5_rc1/http/javascripts/mod_perimeter.php
branches/2.4.5_rc1/http/javascripts/mod_poi.php
branches/2.4.5_rc1/http/javascripts/mod_print1.php
branches/2.4.5_rc1/http/javascripts/mod_repaint.php
branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php
branches/2.4.5_rc1/http/javascripts/mod_sandclock.php
branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php
branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php
branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php
branches/2.4.5_rc1/http/javascripts/mod_savewmc.php
branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php
branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php
branches/2.4.5_rc1/http/javascripts/mod_scaleText.php
branches/2.4.5_rc1/http/javascripts/mod_scalebar.php
branches/2.4.5_rc1/http/javascripts/mod_selArea.php
branches/2.4.5_rc1/http/javascripts/mod_selArea1.php
branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php
branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php
branches/2.4.5_rc1/http/javascripts/mod_setBackground.php
branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php
branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php
branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php
branches/2.4.5_rc1/http/javascripts/mod_state.php
branches/2.4.5_rc1/http/javascripts/mod_tab.php
branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php
branches/2.4.5_rc1/http/javascripts/mod_usemap.php
branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php
branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php
branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php
branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php
branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php
branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php
branches/2.4.5_rc1/http/javascripts/wfs.js
branches/2.4.5_rc1/http/php/mb_js_exception.php
branches/2.4.5_rc1/http/php/mb_listWMCs.php
branches/2.4.5_rc1/http/php/mb_validatePermission.php
branches/2.4.5_rc1/http/php/mb_validateSession.php
branches/2.4.5_rc1/http/php/mod_SelectKeyword.php
branches/2.4.5_rc1/http/php/mod_WMSpreferences.php
branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php
branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php
branches/2.4.5_rc1/http/php/mod_changeEPSG.php
branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php
branches/2.4.5_rc1/http/php/mod_changePassword.php
branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php
branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php
branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php
branches/2.4.5_rc1/http/php/mod_createUser.php
branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php
branches/2.4.5_rc1/http/php/mod_deleteGUI.php
branches/2.4.5_rc1/http/php/mod_deleteWFS.php
branches/2.4.5_rc1/http/php/mod_deleteWMS.php
branches/2.4.5_rc1/http/php/mod_editElementVars.php
branches/2.4.5_rc1/http/php/mod_editElements.php
branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php
branches/2.4.5_rc1/http/php/mod_editFilteredUser.php
branches/2.4.5_rc1/http/php/mod_editGroup.php
branches/2.4.5_rc1/http/php/mod_editGuiWms.php
branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php
branches/2.4.5_rc1/http/php/mod_editSelf.php
branches/2.4.5_rc1/http/php/mod_editUser.php
branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php
branches/2.4.5_rc1/http/php/mod_edit_element_vars.php
branches/2.4.5_rc1/http/php/mod_edit_metadata.php
branches/2.4.5_rc1/http/php/mod_evalArea.php
branches/2.4.5_rc1/http/php/mod_exportElement.php
branches/2.4.5_rc1/http/php/mod_exportGUI.php
branches/2.4.5_rc1/http/php/mod_export_image.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php
branches/2.4.5_rc1/http/php/mod_filteredGui_User.php
branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php
branches/2.4.5_rc1/http/php/mod_filteredGui_group.php
branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php
branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php
branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php
branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php
branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php
branches/2.4.5_rc1/http/php/mod_forgottenPassword.php
branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php
branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php
branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php
branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php
branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php
branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php
branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php
branches/2.4.5_rc1/http/php/mod_getStyles.php
branches/2.4.5_rc1/http/php/mod_group_filteredGui.php
branches/2.4.5_rc1/http/php/mod_group_filteredUser.php
branches/2.4.5_rc1/http/php/mod_group_gui.php
branches/2.4.5_rc1/http/php/mod_group_user.php
branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php
branches/2.4.5_rc1/http/php/mod_gui_group.php
branches/2.4.5_rc1/http/php/mod_gui_owner.php
branches/2.4.5_rc1/http/php/mod_gui_user.php
branches/2.4.5_rc1/http/php/mod_help.php
branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php
branches/2.4.5_rc1/http/php/mod_layerMetadata.php
branches/2.4.5_rc1/http/php/mod_loadCapabilities.php
branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php
branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php
branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php
branches/2.4.5_rc1/http/php/mod_loadwfs.php
branches/2.4.5_rc1/http/php/mod_loadwms.php
branches/2.4.5_rc1/http/php/mod_loadwms_temp.php
branches/2.4.5_rc1/http/php/mod_log.php
branches/2.4.5_rc1/http/php/mod_logout.php
branches/2.4.5_rc1/http/php/mod_map1.php
branches/2.4.5_rc1/http/php/mod_mapOV.php
branches/2.4.5_rc1/http/php/mod_meetingPoint.php
branches/2.4.5_rc1/http/php/mod_newGui.php
branches/2.4.5_rc1/http/php/mod_orphanWMS.php
branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php
branches/2.4.5_rc1/http/php/mod_printView1.php
branches/2.4.5_rc1/http/php/mod_renameGUI.php
branches/2.4.5_rc1/http/php/mod_saveWKT.php
branches/2.4.5_rc1/http/php/mod_showLoggedUser.php
branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php
branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php
branches/2.4.5_rc1/http/php/mod_treefolderClient.php
branches/2.4.5_rc1/http/php/mod_updateWMS.php
branches/2.4.5_rc1/http/php/mod_usemap.php
branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_user_filteredGui.php
branches/2.4.5_rc1/http/php/mod_user_group.php
branches/2.4.5_rc1/http/php/mod_user_gui.php
branches/2.4.5_rc1/http/php/mod_wfs.php
branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php
branches/2.4.5_rc1/http/php/mod_wfs_conf.php
branches/2.4.5_rc1/http/php/mod_wfs_edit.php
branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php
branches/2.4.5_rc1/http/php/mod_wfs_result.php
branches/2.4.5_rc1/http/php/mod_wfs_save.php
branches/2.4.5_rc1/http/php/mod_wfsrequest.php
branches/2.4.5_rc1/http/php/mod_zoomCoords.php
branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php
branches/2.4.5_rc1/http/php/nestedSets.php
branches/2.4.5_rc1/http/print/mod_printPDF.php
branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php
branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql
branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql
branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql
branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql
branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql
Removed:
branches/2.4.5_rc1/conf/mapbender.conf-dist
branches/2.4.5_rc1/documents/jsdoc/
branches/2.4.5_rc1/http/classes/class_administration.php
branches/2.4.5_rc1/http/classes/class_stripRequest.php
branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php
branches/2.4.5_rc1/http/extensions/ext_weldMaps.php
branches/2.4.5_rc1/http/extensions/geom2wfst.php
branches/2.4.5_rc1/http/extensions/markResult.php
branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js
branches/2.4.5_rc1/http/frames/index.php
branches/2.4.5_rc1/http/include/dyn_css.php
branches/2.4.5_rc1/http/include/dyn_js.php
branches/2.4.5_rc1/http/include/dyn_php.php
branches/2.4.5_rc1/http/index.php
branches/2.4.5_rc1/http/javascripts/geometry.js
branches/2.4.5_rc1/http/javascripts/map.php
branches/2.4.5_rc1/http/javascripts/mod_addWMS.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php
branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php
branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php
branches/2.4.5_rc1/http/javascripts/mod_back.php
branches/2.4.5_rc1/http/javascripts/mod_center1.php
branches/2.4.5_rc1/http/javascripts/mod_coords.php
branches/2.4.5_rc1/http/javascripts/mod_coords_div.php
branches/2.4.5_rc1/http/javascripts/mod_copyright.php
branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php
branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php
branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php
branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php
branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php
branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php
branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php
branches/2.4.5_rc1/http/javascripts/mod_export_image.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php
branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php
branches/2.4.5_rc1/http/javascripts/mod_forward.php
branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php
branches/2.4.5_rc1/http/javascripts/mod_getArea.php
branches/2.4.5_rc1/http/javascripts/mod_help.php
branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php
branches/2.4.5_rc1/http/javascripts/mod_home.php
branches/2.4.5_rc1/http/javascripts/mod_initWmc.php
branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php
branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php
branches/2.4.5_rc1/http/javascripts/mod_key.php
branches/2.4.5_rc1/http/javascripts/mod_legend.php
branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php
branches/2.4.5_rc1/http/javascripts/mod_measure.php
branches/2.4.5_rc1/http/javascripts/mod_navFrame.php
branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php
branches/2.4.5_rc1/http/javascripts/mod_pan.php
branches/2.4.5_rc1/http/javascripts/mod_perimeter.php
branches/2.4.5_rc1/http/javascripts/mod_poi.php
branches/2.4.5_rc1/http/javascripts/mod_print1.php
branches/2.4.5_rc1/http/javascripts/mod_repaint.php
branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php
branches/2.4.5_rc1/http/javascripts/mod_sandclock.php
branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php
branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php
branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php
branches/2.4.5_rc1/http/javascripts/mod_savewmc.php
branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php
branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php
branches/2.4.5_rc1/http/javascripts/mod_scaleText.php
branches/2.4.5_rc1/http/javascripts/mod_scalebar.php
branches/2.4.5_rc1/http/javascripts/mod_selArea.php
branches/2.4.5_rc1/http/javascripts/mod_selArea1.php
branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php
branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php
branches/2.4.5_rc1/http/javascripts/mod_setBackground.php
branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php
branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php
branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php
branches/2.4.5_rc1/http/javascripts/mod_state.php
branches/2.4.5_rc1/http/javascripts/mod_tab.php
branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php
branches/2.4.5_rc1/http/javascripts/mod_usemap.php
branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php
branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php
branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php
branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php
branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php
branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php
branches/2.4.5_rc1/http/javascripts/wfs.js
branches/2.4.5_rc1/http/php/mb_js_exception.php
branches/2.4.5_rc1/http/php/mb_listWMCs.php
branches/2.4.5_rc1/http/php/mb_validatePermission.php
branches/2.4.5_rc1/http/php/mb_validateSession.php
branches/2.4.5_rc1/http/php/mod_SelectKeyword.php
branches/2.4.5_rc1/http/php/mod_WMSpreferences.php
branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php
branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php
branches/2.4.5_rc1/http/php/mod_changeEPSG.php
branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php
branches/2.4.5_rc1/http/php/mod_changePassword.php
branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php
branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php
branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php
branches/2.4.5_rc1/http/php/mod_createUser.php
branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php
branches/2.4.5_rc1/http/php/mod_deleteGUI.php
branches/2.4.5_rc1/http/php/mod_deleteWFS.php
branches/2.4.5_rc1/http/php/mod_deleteWMS.php
branches/2.4.5_rc1/http/php/mod_editElementVars.php
branches/2.4.5_rc1/http/php/mod_editElements.php
branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php
branches/2.4.5_rc1/http/php/mod_editFilteredUser.php
branches/2.4.5_rc1/http/php/mod_editGroup.php
branches/2.4.5_rc1/http/php/mod_editGuiWms.php
branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php
branches/2.4.5_rc1/http/php/mod_editSelf.php
branches/2.4.5_rc1/http/php/mod_editUser.php
branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php
branches/2.4.5_rc1/http/php/mod_edit_element_vars.php
branches/2.4.5_rc1/http/php/mod_edit_metadata.php
branches/2.4.5_rc1/http/php/mod_evalArea.php
branches/2.4.5_rc1/http/php/mod_exportElement.php
branches/2.4.5_rc1/http/php/mod_exportGUI.php
branches/2.4.5_rc1/http/php/mod_export_image.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php
branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php
branches/2.4.5_rc1/http/php/mod_filteredGui_User.php
branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php
branches/2.4.5_rc1/http/php/mod_filteredGui_group.php
branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php
branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php
branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php
branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php
branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php
branches/2.4.5_rc1/http/php/mod_forgottenPassword.php
branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php
branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php
branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php
branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php
branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php
branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php
branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php
branches/2.4.5_rc1/http/php/mod_getStyles.php
branches/2.4.5_rc1/http/php/mod_group_filteredGui.php
branches/2.4.5_rc1/http/php/mod_group_filteredUser.php
branches/2.4.5_rc1/http/php/mod_group_gui.php
branches/2.4.5_rc1/http/php/mod_group_user.php
branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php
branches/2.4.5_rc1/http/php/mod_gui_group.php
branches/2.4.5_rc1/http/php/mod_gui_owner.php
branches/2.4.5_rc1/http/php/mod_gui_user.php
branches/2.4.5_rc1/http/php/mod_help.php
branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php
branches/2.4.5_rc1/http/php/mod_layerMetadata.php
branches/2.4.5_rc1/http/php/mod_loadCapabilities.php
branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php
branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php
branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php
branches/2.4.5_rc1/http/php/mod_loadwfs.php
branches/2.4.5_rc1/http/php/mod_loadwms.php
branches/2.4.5_rc1/http/php/mod_loadwms_temp.php
branches/2.4.5_rc1/http/php/mod_log.php
branches/2.4.5_rc1/http/php/mod_logout.php
branches/2.4.5_rc1/http/php/mod_map1.php
branches/2.4.5_rc1/http/php/mod_mapOV.php
branches/2.4.5_rc1/http/php/mod_meetingPoint.php
branches/2.4.5_rc1/http/php/mod_newGui.php
branches/2.4.5_rc1/http/php/mod_orphanWMS.php
branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php
branches/2.4.5_rc1/http/php/mod_printView1.php
branches/2.4.5_rc1/http/php/mod_renameGUI.php
branches/2.4.5_rc1/http/php/mod_saveWKT.php
branches/2.4.5_rc1/http/php/mod_showLoggedUser.php
branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php
branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php
branches/2.4.5_rc1/http/php/mod_treefolderClient.php
branches/2.4.5_rc1/http/php/mod_updateWMS.php
branches/2.4.5_rc1/http/php/mod_usemap.php
branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php
branches/2.4.5_rc1/http/php/mod_user_filteredGui.php
branches/2.4.5_rc1/http/php/mod_user_group.php
branches/2.4.5_rc1/http/php/mod_user_gui.php
branches/2.4.5_rc1/http/php/mod_wfs.php
branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php
branches/2.4.5_rc1/http/php/mod_wfs_conf.php
branches/2.4.5_rc1/http/php/mod_wfs_edit.php
branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php
branches/2.4.5_rc1/http/php/mod_wfs_result.php
branches/2.4.5_rc1/http/php/mod_wfs_save.php
branches/2.4.5_rc1/http/php/mod_wfsrequest.php
branches/2.4.5_rc1/http/php/mod_zoomCoords.php
branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php
branches/2.4.5_rc1/http/php/nestedSets.php
branches/2.4.5_rc1/http/print/mod_printPDF.php
branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php
branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql
branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql
branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql
branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql
branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql
Log:
2.4.5 rc1
Copied: branches/2.4.5_rc1 (from rev 2131, branches/2.4.5)
Deleted: branches/2.4.5_rc1/conf/mapbender.conf-dist
===================================================================
--- branches/2.4.5/conf/mapbender.conf-dist 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/conf/mapbender.conf-dist 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,157 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Mapbender.conf
-# Copyright (C) 2002 CCGIS
-
-# --------------------------------------------
-# type of mapbender database
-# --------------------------------------------
-
-
-define("SYS_DBTYPE", "mysql");
-#define("SYS_DBTYPE", "pgsql");
-
-# --------------------------------------------
-# database information
-# --------------------------------------------
-
-if(SYS_DBTYPE=="mysql")
-{
- define("DBSERVER", "<HOST>");
- define("PORT", "3306");
- define("DB", "<database>");
- define("OWNER", "<owner>");
- define("PW", "<password>");
-
- include_once("../../http/php/database-mysql.php");
-
- # --------------------------------------------
- # database with geos functions
- # --------------------------------------------
-
- define("GEOS_DBSERVER", "<HOST>");
- define("GEOS_PORT", "5432");
- define("GEOS_DB", "<database with geos functions>");
- define("GEOS_OWNER", "<owner>");
- define("GEOS_PW", "<password>");
-
-}
-else {
- define("DBSERVER", "<HOST>");
- define("PORT", "5432");
- define("DB", "<database>");
- define("OWNER", "<owner>");
- define("PW", "<password>");
-
- include_once("../../http/php/database-pgsql.php");
-}
-
-# --------------------------------------------
-# prepared statements (PHP > 5.1.x, PostgreSQL > 7.4)
-# --------------------------------------------
-define("PREPAREDSTATEMENTS",true);
-
-# --------------------------------------------
-# encoding - default characterset UTF-8 / ISO-8859-1
-# --------------------------------------------
-define("CHARSET","UTF-8");
-
-# --------------------------------------------
-# error_reporting
-# --------------------------------------------
-
-//ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
-
-# --------------------------------------------
-# directory for temporary files
-# --------------------------------------------
-
-define("TMPDIR", "../tmp");
-
-# --------------------------------------------
-# URL to login
-# --------------------------------------------
-
-define("LOGIN", "http://localhost/mapbender/frames/login.php");
-define("MAXLOGIN", 3);
-$login = LOGIN;
-
-# --------------------------------------------
-# URL to owsproxy
-# (no terminating slash)
-# --------------------------------------------
-
-define("OWSPROXY", "http://<ip or name>/owsproxy");
-
-# --------------------------------------------
-# type of server-connection
-# curl, socket, http
-# --------------------------------------------
-
-#define("CONNECTION", "curl");
-define("CONNECTION", "http");
-#define("CONNECTION", "socket");
-
-define("CONNECTION_PROXY", "<ip>");
-define("CONNECTION_PORT", "<port>");
-define("CONNECTION_USER", "<user>");
-define("CONNECTION_PASSWORD", "<password>");
-
-# --------------------------------------------
-# security: path to modules
-# --------------------------------------------
-
-define("CHECK", false);
-
-# --------------------------------------------
-# enable/disable portal
-# --------------------------------------------
-
-define("PORTAL", false);
-
-# --------------------------------------------
-# mail settings for internal mapbender mails
-# smtp mailing
-# for further settings check 'class_administration.php'
-# please check phpmailer for more information
-# --------------------------------------------
-
-define("USE_PHP_MAILING", "false");
-define("MAILHOST", "<host>");
-define("MAILUSERNAME", "<user>");
-define("MAILPASSWORD", "<password>");
-define("MAILADMIN", "<mailaddress of the mailadmin>");
-define("MAILADMINNAME", "<mailadminname>");
-
-$mailHost = MAILHOST;
-$mailUsername = MAILUSERNAME;
-$mailPassword = MAILPASSWORD;
-
-# --------------------------------------------
-# wms monitoring
-# --------------------------------------------
-
-define("AUTO_UPDATE", "0");
-define("TIME_LIMIT", "300");
-define("PHP_PATH", "/usr/local/bin/");
-
-# --------------------------------------------
-# Mapbender error logging
-# --------------------------------------------
-
-define("LOG_LEVEL_LIST", "off,error,warning,notice,all");
-define("LOG_LEVEL", "all");
-define("LOG_JS", "on"); // "on", "alert", "console", "off"
-
-###HACK for GLOBALS
-$DBSERVER=DBSERVER;
- $DB=DB;
- $OWNER=OWNER;
- $PW=PW;
-
- $GEOS_DBSERVER=GEOS_DBSERVER;
- $GEOS_DB=GEOS_DB;
- $GEOS_PORT =GEOS_PORT;
- $GEOS_OWNER=GEOS_OWNER;
- $GEOS_PW=GEOS_PW;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/conf/mapbender.conf-dist (from rev 2188, branches/2.4.5/conf/mapbender.conf-dist)
===================================================================
--- branches/2.4.5_rc1/conf/mapbender.conf-dist (rev 0)
+++ branches/2.4.5_rc1/conf/mapbender.conf-dist 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,157 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Mapbender.conf
+# Copyright (C) 2002 CCGIS
+
+# --------------------------------------------
+# type of mapbender database
+# --------------------------------------------
+
+
+define("SYS_DBTYPE", "mysql");
+#define("SYS_DBTYPE", "pgsql");
+
+# --------------------------------------------
+# database information
+# --------------------------------------------
+
+if(SYS_DBTYPE=="mysql")
+{
+ define("DBSERVER", "<HOST>");
+ define("PORT", "3306");
+ define("DB", "<database>");
+ define("OWNER", "<owner>");
+ define("PW", "<password>");
+
+ include_once("../../http/php/database-mysql.php");
+
+ # --------------------------------------------
+ # database with geos functions
+ # --------------------------------------------
+
+ define("GEOS_DBSERVER", "<HOST>");
+ define("GEOS_PORT", "5432");
+ define("GEOS_DB", "<database with geos functions>");
+ define("GEOS_OWNER", "<owner>");
+ define("GEOS_PW", "<password>");
+
+}
+else {
+ define("DBSERVER", "<HOST>");
+ define("PORT", "5432");
+ define("DB", "<database>");
+ define("OWNER", "<owner>");
+ define("PW", "<password>");
+
+ include_once("../../http/php/database-pgsql.php");
+}
+
+# --------------------------------------------
+# prepared statements (PHP > 5.1.x, PostgreSQL > 7.4)
+# --------------------------------------------
+define("PREPAREDSTATEMENTS",true);
+
+# --------------------------------------------
+# encoding - default characterset UTF-8 / ISO-8859-1
+# --------------------------------------------
+define("CHARSET","UTF-8");
+
+# --------------------------------------------
+# error_reporting
+# --------------------------------------------
+
+//ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
+
+# --------------------------------------------
+# directory for temporary files
+# --------------------------------------------
+
+define("TMPDIR", "../tmp");
+
+# --------------------------------------------
+# URL to login
+# --------------------------------------------
+
+define("LOGIN", "http://localhost/mapbender/frames/login.php");
+define("MAXLOGIN", 3);
+$login = LOGIN;
+
+# --------------------------------------------
+# URL to owsproxy
+# (no terminating slash)
+# --------------------------------------------
+
+define("OWSPROXY", "http://<ip or name>/owsproxy");
+
+# --------------------------------------------
+# type of server-connection
+# curl, socket, http
+# --------------------------------------------
+
+#define("CONNECTION", "curl");
+define("CONNECTION", "http");
+#define("CONNECTION", "socket");
+
+define("CONNECTION_PROXY", "<ip>");
+define("CONNECTION_PORT", "<port>");
+define("CONNECTION_USER", "<user>");
+define("CONNECTION_PASSWORD", "<password>");
+
+# --------------------------------------------
+# security: path to modules
+# --------------------------------------------
+
+define("CHECK", false);
+
+# --------------------------------------------
+# enable/disable portal
+# --------------------------------------------
+
+define("PORTAL", false);
+
+# --------------------------------------------
+# mail settings for internal mapbender mails
+# smtp mailing
+# for further settings check 'class_administration.php'
+# please check phpmailer for more information
+# --------------------------------------------
+
+define("USE_PHP_MAILING", "false");
+define("MAILHOST", "<host>");
+define("MAILUSERNAME", "<user>");
+define("MAILPASSWORD", "<password>");
+define("MAILADMIN", "<mailaddress of the mailadmin>");
+define("MAILADMINNAME", "<mailadminname>");
+
+$mailHost = MAILHOST;
+$mailUsername = MAILUSERNAME;
+$mailPassword = MAILPASSWORD;
+
+# --------------------------------------------
+# wms monitoring
+# --------------------------------------------
+
+define("AUTO_UPDATE", "0");
+define("TIME_LIMIT", "300");
+define("PHP_PATH", "/usr/local/bin/");
+
+# --------------------------------------------
+# Mapbender error logging
+# --------------------------------------------
+
+define("LOG_LEVEL_LIST", "off,error,warning,notice,all"); // DO NOT CHANGE!!
+define("LOG_LEVEL", "off"); // one of the above
+define("LOG_JS", "off"); // "on", "alert", "console", "off"
+
+###HACK for GLOBALS
+$DBSERVER=DBSERVER;
+ $DB=DB;
+ $OWNER=OWNER;
+ $PW=PW;
+
+ $GEOS_DBSERVER=GEOS_DBSERVER;
+ $GEOS_DB=GEOS_DB;
+ $GEOS_PORT =GEOS_PORT;
+ $GEOS_OWNER=GEOS_OWNER;
+ $GEOS_PW=GEOS_PW;
+?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/documents/jsdoc (from rev 2191, branches/2.4.5/documents/jsdoc)
Deleted: branches/2.4.5_rc1/http/classes/class_administration.php
===================================================================
--- branches/2.4.5/http/classes/class_administration.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/classes/class_administration.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,974 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/class_administration
-# Copyright (C) 2002 CCGIS
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/class_mb_exception.php");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-require("phpmailer-1.72/class.phpmailer.php");
-
-/**
- * class to wrap administration methods
- *
- * @uses phpmailer
- */
-class administration{
- /**
- * checks whether the passed email-address is valid / following a pattern
- * @todo is this an exact representation of the RFC 2822?
- * @todo this should be checked: what about umlaut-domains and tld like '.museum'?
- * @see http://tools.ietf.org/html/rfc2822
- *
- * @param <string> a all lowercase email adress to test
- * @return <boolean> answer to "is the passed over email valid?""
- */
- function isValidEmail($email) {
- if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
- return true;
- }
- return false;
- }
-
- /**
- * sends an email via php mailer
- *
- * @param <string> an email address for the "From"-field
- * @param <string> the displayed name for the "From"-field
- * @param <string> an email address for the "To"-field
- * @param <string> the displayed name for the "From"-field
- * @param <string> the text to be set as "Subject"
- * @param <string> the text of the emails body
- * @param <string> a reference to an error string
- */
- function sendEmail($fromAddr, $fromName, $toAddr, $toName, $subject, $body, &$error_msg ){
-
- global $mailHost, $mailUsername, $mailPassword;
- if($fromAddr == ''){
- $fromAddr = MAILADMIN;
- }
-
- if($fromName == ''){
- $fromName = MAILADMINNAME;
- }
-
- if ($this->isValidEmail($fromAddr) && $this->isValidEmail($toAddr)) {
- $mail = new PHPMailer();
-
- if ($fromName != "" ) {
- $mail->FromName = $fromName;
- }
-
- $mail->IsSMTP(); // set mailer to use SMTP
- $mail->Host = $mailHost; // specify main and backup server
- $mail->SMTPAuth = true; // turn on SMTP authentication
- $mail->Username = $mailUsername; // SMTP username
- $mail->Password = $mailPassword; // SMTP password
-
- $mail->From = $fromAddr;
- $mail->AddAddress($toAddr, $toName);
- #$mail->AddReplyTo("info at ccgis.de", "Information");
-
- $mail->WordWrap = 50; // set word wrap to 50 characters
- #$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
- #$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
- $mail->IsHTML(false); // set email format to HTML
-
- $mail->Subject = "[".$fromName."] ".$subject;
- $mail->Body = $body;
- #$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
-
- $error_msg='';
-
- if(!$mail->Send())
- {
- $error_msg .= "Mailer Error: " . $mail->ErrorInfo;
- return false;
- }
-
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * returns a random password with numbers and chars both lowercase and uppercase (0-9a-zA-Z)
- *
- * @return <string> the new password
- */
- function getRandomPassword() {
-
- // password length
- $max = 16;
-
- //new password
- $newpass = "";
-
- for ($i=0;$i <= $max;$i++) {
- //die ASCII-Zeichen 48 - 57 sind die zahlen 0-9
- //die ASCII-Zeichen 65 - 90 sind die buchstaben A-Z (Groß)
- //die ASCII-Zeichen 97 - 122 sind die buchstaben a-z (Klein)
- $ascii = 0;
- do {
- $ascii=rand(48,122);
- } while ( ($ascii > 57 && $ascii < 65) || ($ascii > 90 && $ascii < 97));
- $newpass .= chr($ascii);
- }
- return $newpass;
- }
-
- /**
- * returns the name of a mapbender user which owns the GUI identified by the passed over gui_id.
- *
- * @param <string> the gui_id
- * @return <string> the name of the owner
- */
- function getOwnerByGui($gui_id){
- $sql = "(SELECT mb_user.mb_user_name";
- $sql .= "FROM mb_user ";
- $sql .= "JOIN gui_mb_user ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
- $sql .= "WHERE gui_mb_user.mb_user_type = 'owner' ";
- $sql .= "AND gui_mb_user.fkey_gui_id = $1 ";
- $sql .= "GROUP BY mb_user.mb_user_name ";
- $sql .= ") ";
- $sql .= "UNION ( ";
- $sql .= "SELECT mb_user.mb_user_name ";
- $sql .= "FROM gui_mb_group ";
- $sql .= "JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id ";
- $sql .= "JOIN mb_user ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
- $sql .= "JOIN gui_mb_user ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
- $sql .= "WHERE gui_mb_group.mb_group_type = 'owner' ";
- $sql .= "AND gui_mb_group.fkey_gui_id = $2 ";
- $sql .= "GROUP BY mb_user.mb_user_name)";
- $owner = array();
- $v = array($gui_id,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $owner[$cnt] = $row["mb_user_name"];
- $cnt++;
- }
- return $owner;
- }
-
- /**
- * returns the content of the field mb_user_email for the given userid.
- *
- * @param <integer> the userid
- * @return <mixed> the email if one row is found or false if none is foundd
- */
- function getEmailByUserId($userid){
- $sql = "SELECT mb_user_email FROM mb_user ";
- $sql .= "WHERE mb_user_id = $1 GROUP by mb_user_email";
- // TODO why do we group, when userid is a primary key?
- $v = array($userid);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- // TODO shall the next two lines be removed?
- $count_g = 0;
- $array = array();
- $row = db_fetch_array($res);
- if ($row) {
- return $row["mb_user_email"];
- }
- else {
- return false;
- }
- }
-
- /**
- * returns the name of the user for the given userid.
- *
- * @param <integer> the userid
- * @return the name if one row is found or false if none is foundd
- */
- function getUserNameByUserId($userid){
- $sql = "SELECT mb_user_name FROM mb_user ";
- $sql .= "WHERE mb_user_id = $1 GROUP BY mb_user_name";
- // TODO why do we group, when userid is a primary key?
- $v = array($userid);
- $t = array("i");
- $res = db_prep_query($sql,$v,$t);
- // TODO shall the next two lines be removed?
- $count_g = 0;
- $array = array();
- $row = db_fetch_array($res);
- if ($row) {
- return $row["mb_user_name"];
- }
- else {
- return false;
- }
- }
-
- /**
- * returns one or more userids from the given email or false,
- * if there is no record in the database matching the given email
- *
- * @param <string> the email
- * @return <mixed> returns an array of userids or false when no records matches
- */
- function getUserIdByEmail($email){
- $sql = "SELECT mb_user_id FROM mb_user ";
- $sql .= "WHERE mb_user_email = $1 GROUP BY mb_user_id";
- $v = array($email);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $count_g = 0;
- $array = array();
- while($row = db_fetch_array($res)){
- $array[$count_g] = $row["mb_user_id"];
- $count_g++;
- }
- if ($count_g >0) {
- return $array;
- }
- else {
- return false;
- }
- }
-
- /**
- * returns one or more owners for the given wm_id. First all guis deploying
- * this wms are selected. Afterwards for each of the guis the owners are
- * selected and stored within an array.
- *
- * @param <integer> the wms_id
- * @return <mixed> an array of usernames which use thw wms in their guis (both for persona or group ownership)
- */
- function getOwnerByWms($wms_id){
- // first get guis which deploy this wms.
- $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
- $v = array($wms_id);
- $t = array('i');
- $count=0;
- $res = db_prep_query($sql,$v,$t);
- while($row = db_fetch_array($res)){
- $gui[$count] = $row["fkey_gui_id"];
- $count++;
- }
-
- if ($count > 0) {
- // this is not needed! count($gui) is always equal to $count
- if(count($gui)>0) {
- $v = array();
- $t = array();
- $c = 1;
- $sql = "(SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
- $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
- $sql .= " WHERE gui_mb_user.mb_user_type = 'owner'";
- $sql .= " AND gui_mb_user.fkey_gui_id IN (";
- for($i=0; $i<count($gui); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- $c++;
- array_push($v, $gui[$i]);
- array_push($t, 's');
- }
- $sql .= ") GROUP BY mb_user.mb_user_name";
- $sql .= ") UNION (";
- $sql .= "SELECT mb_user.mb_user_name FROM gui_mb_group JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id JOIN mb_user ";
- $sql .= "ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
- $sql .= " WHERE gui_mb_group.mb_group_type = 'owner'";
- $sql .= " AND gui_mb_group.fkey_gui_id IN (";
-
- for($j=0; $j<count($gui); $j++){
- if($j>0){ $sql .= ",";}
- $sql .= "$".$c;
- $c++;
- array_push($v, $gui[$i]);
- array_push($t, 's');
- }
- $sql .= ") GROUP BY mb_user.mb_user_name)";
-
- $user = array();
- $res = db_prep_query($sql,$v,$t);
- }
- $cnt = 0;
-
- while($row = db_fetch_array($res)){
- $user[$cnt] = $row["mb_user_name"];
- $cnt++;
- }
- if ($cnt>0) {
- return $user;
- } else {
- return false;
- }
- } else {
- return false;
- }
- }
- /**
- * tests whether a gui with the passed gui_id exits and returns true or false.
- *
- * @param <string> the gui_id to test
- * @return <boolean> Does a Gui with the passed over gui_id exist?
- */
- function guiExists($id){
- $sql = "SELECT * FROM gui WHERE gui_id = $1 ";
- $v = array($id);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $row = db_fetch_array($res);
- if ($row) {
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * deletes a WMC entry specified by wmc_id and user_id
- *
- * @param <integer> the user_id
- * @param <string> the wmc_id
- * @return <boolean> Did the query run succesfull? This does not necessarily mean that an entry was deleted.
- */
- function deleteWmc($wmc_id, $user_id){
- $sql = "DELETE FROM mb_user_wmc ";
- $sql .= "WHERE fkey_user_id = $1 AND wmc_id = $2";
- $v = array($user_id,$wmc_id);
- $t = array('i','s');
- $res = db_prep_query($sql,$v,$t);
- if ($res) {
- return true;
- }
- else {
- return false;
- }
- }
-
- /**
- * inserts a gui with the specified gui_id, after checking the uniqueness of teh gui id.
- *
- * @uses guiExists
- * @param <string> the name and id of the gui to insert.
- * @return <boolean> could the gui be inserted?
- */
- function insertGui($guiId) {
- if (!$this->guiExists($guiId)) {
- $sql = "INSERT INTO gui VALUES ($1, $2, '', '1')";
- $v = array($guiId,$guiId);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- if ($res) {
- return true;
- }
- }
- return false;
- }
-
- /**
- * deletes links between user and guis in gui_mb_user for a certain gui.
- *
- * @param <string> the gui name
- * @return <boolean> could the sql be executed without errors. This does not necessarily mean, that entries were deleted
- */
- function delAllUsersOfGui($guiId) {
- $sql = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 ";
- $v = array($guiId);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if (!$res) {
- return false;
- }
- else {
- return true;
- }
- }
-
- /**
- * returns an array of WMS for a given user id
- * @uses getGuisByOwner
- * @param <integer> the user id
- * @return <array> wms ids for the user
- */
- function getWmsByOwner($user_id){
- $gui_list = $this->getGuisByOwner($user_id,true);
- return $this->getWmsByOwnGuis($gui_list);
- }
-
- /**
- * returns an array of WMS where the owner is the user with the passed user_id
- * @param <integer> the user id
- * @return <array> wms ids for the user
- */
- function getWmsByWmsOwner($user_id){
- $sql = "SELECT wms_id FROM wms WHERE wms_owner = $1";
- $v = array($user_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $r = array();
- while($row = db_fetch_array($res)){
- array_push($r,$row["wms_id"]);
- }
- return $r;
- }
-
- /**
- * returns an array of user which are associated with a wms
- *
- * @param <integer> the wms id
- * @return <array> user_ids for the wms
- */
- function getUserByWms($wms_id){
- $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
- $v = array($wms_id);
- $t = array('i');
- $count=0;
- $res = db_prep_query($sql,$v,$t);
- while($row = db_fetch_array($res)){
- $gui[$count] = $row["fkey_gui_id"];
- $count++;
- }
- $c = 1;
- $v = array();
- $t = array();
- if(count($gui)>0){
- $sql = "(SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
- $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
- $sql .= " WHERE gui_mb_user.fkey_gui_id IN (";
- for($i=0; $i<count($gui); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- array_push($v,$gui[$i]);
- array_push($t, 's');
- $c++;
- }
- $sql .= ") GROUP BY mb_user.mb_user_name) UNION";
- $sql .= "(SELECT mb_user.mb_user_name FROM gui_mb_group JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id JOIN mb_user ";
- $sql .= "ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
- $sql .= " WHERE gui_mb_group.fkey_gui_id IN (";
- for($i=0; $i<count($gui); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- array_push($v,$gui[$i]);
- array_push($t, 's');
- $c++;
- }
- $sql .= ") GROUP BY mb_user.mb_user_name )";
- $user = array();
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $user[$cnt] = $row["mb_user_name"];
- $cnt++;
- }
- }
- return $user;
- }
-
- /**
- * selects the WMS-title for a given wms id.
- *
- * @param <integer> the wms id
- * @return <string|boolean> either the title of the wms as string or false when none exists
- */
- function getWmsTitleByWmsId($id){
- $sql = "SELECT wms_title FROM wms WHERE wms_id = $1 GROUP BY wms_title";
- $v = array($id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $row = db_fetch_array($res);
- if ($row) return $row["wms_title"]; else return false;
- }
-
- /**
- * selects the Layer-title for a given layer id.
- *
- * @param <integer> the wms id
- * @return <string|boolean> either the title of the wms as string or false when none exists
- */
- function getLayerTitleByLayerId($id){
- $sql = "SELECT layer_title FROM layer WHERE layer_id = $1 GROUP BY layer_title";
- $v = array($id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $row = db_fetch_array($res);
- if ($row) return $row["layer_title"]; else return false;
- }
-
- /**
- * selects the WMC for a given wmc_id.
- *
- * @param <integer> the wms id
- * @return <string|boolean> either the wmc as string or false when none exists
- */
- function getWmcById($id){
- $sql = "SELECT wmc FROM mb_user_wmc WHERE wmc_id = $1 ";
- $v = array($id);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $row = db_fetch_array($res);
- if ($row) {
- return $row["wmc"];
- }
- else {
- return false;
- }
- }
-
- /**
- * resets the loin count of a given user to 0
- * @param <integer> the user id
- * @return <boolean> could the login count be reseted?
- */
- function resetLoginCount($userId) {
- // TODO: isn't mb_user_login_count a integer?
- $sql = "UPDATE mb_user SET mb_user_login_count = '0' ";
- $sql .= "WHERE mb_user_id = $1 ";
- $v = array($userId);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if (!$res) {
- return false;
- }
- else {
- return true;
- }
- }
-
- function getUserIdByUserName($username){
- $sql = "SELECT mb_user_id FROM mb_user ";
- $sql .= "WHERE mb_user_name = $1 GROUP BY mb_user_id";
- $v = array($username);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $row = db_fetch_array($res);
- if ($row) return $row["mb_user_id"]; else return false;
- }
-
- function setUserAsGuiOwner($guiId, $userId) {
- $sql = "UPDATE gui_mb_user SET mb_user_type = 'owner' ";
- $sql .= "WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2 ";
- $v = array($guiId,$userId);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
-
- if (!$res) {
- return false;
- }
- else {
- return true;
- }
- }
-
- function getGuiIdByGuiName($guiTitle){
- $sql = "SELECT gui_id FROM gui ";
- $sql .= "WHERE gui_name = $1 GROUP BY gui_id";
- $v = array($guiTitle);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $count_g = 0;
- $array = array();
- while($row = db_fetch_array($res)){
- $array[$count_g] = $row["gui_id"];
- $count_g++;
- }
- if ($count_g >0) {
- return $array;
- }
- else {
- return false;
- }
- }
-
- function getGuisByOwner($user_id,$ignore_public)
- {
- $sql_guis = "SELECT gui.gui_id FROM gui,gui_mb_user ";
- $sql_guis .= "WHERE (gui.gui_id = gui_mb_user.fkey_gui_id AND gui_mb_user.fkey_mb_user_id = $1) ";
- if (!isset($ignore_public) OR $ignore_public == false){
- $sql_guis .= " AND gui.gui_public = 1 ";
- }
- $sql_guis .= " AND gui_mb_user.mb_user_type = 'owner' GROUP BY gui.gui_id";
- $sql_guis .= " ORDER by gui.gui_id";
- $v = array($user_id);
- $t = array('i');
- $res_guis = db_prep_query($sql_guis,$v,$t);
- $count_g = 0;
- $arrayGuis = array();
- while($row = db_fetch_array($res_guis)){
- $arrayGuis[$count_g] = $row["gui_id"];
- $count_g++;
- }
- return $arrayGuis;
- }
-
- function getWmcByOwner($user_id){
- $sql_wmc = "SELECT wmc_id FROM mb_user_wmc ";
- $sql_wmc .= "WHERE fkey_user_id = $1 GROUP BY wmc_id";
- $v = array($user_id);
- $t = array('i');
- $res_wmc = db_prep_query($sql_wmc,$v,$t);
- $count_g = 0;
- $arrayWmc = array();
- while($row = db_fetch_array($res_wmc)){
- $arrayWmc[$count_g] = $row["wmc_id"];
- $count_g++;
- }
- return $arrayWmc;
- }
-
- function getGuisByPermission($mb_user_id,$ignore_public){
- $arrayGuis = array();
- $mb_user_groups = array();
- $sql_groups = "SELECT fkey_mb_group_id FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 ";
- $v = array($mb_user_id);
- $t = array("i");
- $res_groups = db_prep_query($sql_groups,$v,$t);
- $cnt_groups = 0;
- while($row = db_fetch_array($res_groups)){
- $mb_user_groups[$cnt_groups] = $row["fkey_mb_group_id"];
- $cnt_groups++;
- }
- if($cnt_groups > 0){
- $v = array();
- $t = array();
- $sql_g = "SELECT gui.gui_id FROM gui JOIN gui_mb_group ";
- $sql_g .= " ON gui.gui_id = gui_mb_group.fkey_gui_id WHERE gui_mb_group.fkey_mb_group_id IN (";
- for($i=0; $i<count($mb_user_groups);$i++){
- if($i > 0){$sql_g .= ",";}
- $sql_g .= "$".strval($i+1);
- array_push($v,$mb_user_groups[$i]);
- array_push($t,"i");
- }
- $sql_g .= ") GROUP BY gui.gui_id";
- $res_g = db_prep_query($sql_g,$v,$t);
- while($row = db_fetch_array($res_g)){
- array_push($arrayGuis,$row["gui_id"]);
- }
- }
- $sql_guis = "SELECT gui.gui_id FROM gui JOIN gui_mb_user ON gui.gui_id = gui_mb_user.fkey_gui_id";
- $sql_guis .= " WHERE (gui_mb_user.fkey_mb_user_id = $1) ";
- if (!isset($ignore_public) OR $ignore_public== false){
- $sql_guis .= " AND gui.gui_public = 1 ";
- }
- $sql_guis .= " GROUP BY gui.gui_id";
- $v = array($mb_user_id);
- $t = array("i");
- $res_guis = db_prep_query($sql_guis,$v,$t);
- $guis = array();
- while($row = db_fetch_array($res_guis)){
- if(!in_array($row['gui_id'],$arrayGuis)){
- array_push($arrayGuis,$row["gui_id"]);
- }
- }
- return $arrayGuis;
- }
-
- function getWmsByOwnGuis($array_gui_ids){
- if(count($array_gui_ids)>0){
- $v = array();
- $t = array();
- $sql = "SELECT fkey_wms_id from gui_wms WHERE gui_wms.fkey_gui_id IN(";
- for($i=0; $i<count($array_gui_ids); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".strval($i+1);
- array_push($v, $array_gui_ids[$i]);
- array_push($t, "s");
- }
- $sql .= ") GROUP BY fkey_wms_id ORDER BY fkey_wms_id";
- $res = db_prep_query($sql,$v,$t);
- $ownguis = array();
- $i=0;
- while($row = db_fetch_array($res)){
- $ownguis[$i] = $row['fkey_wms_id'];
- $i++;
- }
- }
- return $ownguis;
- }
-
- function getLayerByWms($wms_id){
- $sql = "SELECT layer_id from layer WHERE fkey_wms_id = $1 AND layer_pos NOT IN ('0') GROUP BY layer_id, layer_title ORDER BY layer_title";
- $v = array($wms_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $layer_id_array = array();
- while($row = db_fetch_array($res)){
- $layer_id_array[count($layer_id_array)] = $row['layer_id'];
- }
- return $layer_id_array;
- }
-
- function getWmsOwner($wms_id){
- $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
- $v = array($wms_id);
- $t = array('i');
- $count=0;
- $res = db_prep_query($sql,$v,$t);
- while($row = db_fetch_array($res)){
- $gui[$count] = $row["fkey_gui_id"];
- $count++;
- }
- $v = array();
- $t = array();
- if(count($gui)>0){
- $sql = "SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
- $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id WHERE";
- $sql .= " gui_mb_user.fkey_gui_id IN (";
- for($i=0; $i<count($gui); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i+1);
- array_push($v,$gui[$i]);
- array_push($t,'s');
- }
- $sql .= ")";
- $sql .= " AND gui_mb_user.mb_user_type = 'owner' GROUP BY mb_user.mb_user_name";
- $res = db_prep_query($sql,$v,$t);
- $i=0;
- $wmsowner = array();
- while($row = db_fetch_array($res)){
- $wmsowner[$i]=$row['mb_user_name'];
- $i++;
- }
- }
- return $wmsowner;
- }
-
- function insertUserAsGuiOwner($guiId, $userId){
- $sql = "INSERT INTO gui_mb_user VALUES ($1, $2, 'owner')";
- $v = array($guiId,$userId);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if (!$res) {
- return false;
- }
- else {
- return true;
- }
- }
-
- function checkModulePermission($arrayGuis, $modulePath, $column){
- $check = true;
- if($check == true){
- $perm = false;
- if(count($arrayGuis)>0){
- $v = array();
- $t = array();
- $sql = "SELECT ".$column." FROM gui_element WHERE fkey_gui_id IN(";
- for($i=0; $i<count($arrayGuis); $i++){
- if($i > 0){ $sql .= ","; }
- $sql .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
- }
- $sql .= ")";
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- if(strpos(stripslashes($row[$column]),$modulePath) !== false){
- $perm = true;
- }
- $cnt++;
- }
- }
- return $perm;
- }
- else{
- return true;
- }
- }
-
- function getWMSOWSstring($wms_id){
- $sql = "SELECT wms_owsproxy FROM wms WHERE wms_id = $1 ";
- $v = array($wms_id);
- $t = array("i");
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return $row["wms_owsproxy"];
- }
- else{
- return false;
- }
- }
-
- function setWMSOWSstring($wms_id, $status){
- $sql = "UPDATE wms SET wms_owsproxy = $1 WHERE wms_id = $2 ";
- $t = array("s","i");
- if($status == 'on'){
- $time = md5(microtime(1));
- $v = array($time,$wms_id);
- }
- else{
- $v = array("",$wms_id);
- }
- $res = db_prep_query($sql,$v,$t);
- }
-
- function checkURL($url){
- $pos_qm = strpos($url,"?");
- if($pos_qm > 0 && $pos_qm < (strlen($url)-1) && substr($url,(strlen($url)-1)) != "&"){
- $url = $url."&";
- return $url;
- }
- else if($pos_qm === false){
- return $url."?";
- }
- else{
- return $url;
- }
- }
- function getModulPermission($userID,$guiID,$elementID){
- $g = $this->getGuisByPermission($userID,true);
- if(in_array($guiID,$g)){
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2 ";
- $v = array($guiID,$elementID);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return true;
- }
- else{
- return false;
- }
- }
- else{
- return false;
- }
- }
- function getLayerPermission($wms_id, $layer_name, $user_id){
- $layer_id = $this->getLayerIdByLayerName($wms_id,$layer_name);
- $array_guis = $this->getGuisByPermission($user_id,true);
- $v = array();
- $t = array();
- $sql = "SELECT * FROM gui_layer WHERE fkey_gui_id IN (";
- $c = 1;
- for($i=0; $i<count($array_guis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- $c++;
- array_push($v, $array_guis[$i]);
- array_push($t, 's');
- }
- $sql .= ") AND fkey_layer_id = $".$c." AND gui_layer_status = 1";
- array_push($v,$layer_id);
- array_push($t,'i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return true;
- }
- else{
- return false;
- }
- }
- function getWmsPermission($wms_id, $user_id) {
- $array_guis = $this->getGuisByPermission($user_id,true);
- $v = array();
- $t = array();
- $sql = "SELECT * FROM gui_wms WHERE fkey_gui_id IN (";
- $c = 1;
- for($i=0; $i<count($array_guis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- $c++;
- array_push($v, $array_guis[$i]);
- array_push($t, 's');
- }
- $sql .= ") AND fkey_wms_id = $".$c;
- array_push($v,$wms_id);
- array_push($t,'i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return true;
- }
- else{
- return false;
- }
- }
- function getLayerIdByLayerName($wms_id, $layer_name){
- $sql = "SELECT layer_id FROM layer WHERE ";
- $sql .= "fkey_wms_id = $1 AND layer_name = $2";
- $v = array($wms_id,$layer_name);
- $t = array('i','s');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return $row['layer_id'];
- }
- else{
- return false;
- }
- }
- function getWmsIdByWmsGetmap($getmap) {
- $sql = "SELECT wms_id FROM wms WHERE ";
- $sql .= "wms_getmap LIKE $1 LIMIT 1";
- $v = array($getmap."%");
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- return $row['wms_id'];
- }
- else{
- return false;
- }
- }
-
- function is_utf8_string($string) {
- return preg_match('%(?:
- [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
- |\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
- |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
- |\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
- |\xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
- |[\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
- |\xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
- )+%xs', $string);
- }
-
- function is_utf8_xml($xml) {
- return preg_match('/<\?xml[^>]+encoding="utf-8"[^>]*\?>/is', $xml);
- }
-
- function is_utf8 ($data) {
- return ($this->is_utf8_xml($data) || $this->is_utf8_string($data));
- }
-
- function char_encode($data) {
- if (CHARSET == "UTF-8") {
- if (!$this->is_utf8($data)) {
- $e = new mb_notice("Conversion: ISO-8859-1 to UTF-8");
- return utf8_encode($data);
- }
- }
- else {
- if ($this->is_utf8($data)) {
- $e = new mb_notice("Conversion: UTF-8 to ISO-8859-1");
- return utf8_decode($data);
- }
- }
- $e = new mb_notice("No conversion: is " . CHARSET);
- return $data;
- }
-
- function char_decode($data) {
- if (CHARSET == "UTF-8") {
- if ($this->is_utf8($data)) {
- $e = new mb_notice("Conversion: UTF-8 to ISO-8859-1");
- return utf8_decode($data);
- }
- }
- $e = new mb_notice("no conversion: is " . CHARSET);
- return $data;
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/classes/class_administration.php (from rev 2207, branches/2.4.5/http/classes/class_administration.php)
===================================================================
--- branches/2.4.5_rc1/http/classes/class_administration.php (rev 0)
+++ branches/2.4.5_rc1/http/classes/class_administration.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,1033 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/class_administration
+# Copyright (C) 2002 CCGIS
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/class_mb_exception.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+require("phpmailer-1.72/class.phpmailer.php");
+
+/**
+ * class to wrap administration methods
+ *
+ * @uses phpmailer
+ */
+class administration{
+ /**
+ * checks whether the passed email-address is valid / following a pattern
+ * @todo is this an exact representation of the RFC 2822?
+ * @todo this should be checked: what about umlaut-domains and tld like '.museum'?
+ * @see http://tools.ietf.org/html/rfc2822
+ *
+ * @param <string> a all lowercase email adress to test
+ * @return <boolean> answer to "is the passed over email valid?""
+ */
+ function isValidEmail($email) {
+ if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * sends an email via php mailer
+ *
+ * @param <string> an email address for the "From"-field
+ * @param <string> the displayed name for the "From"-field
+ * @param <string> an email address for the "To"-field
+ * @param <string> the displayed name for the "From"-field
+ * @param <string> the text to be set as "Subject"
+ * @param <string> the text of the emails body
+ * @param <string> a reference to an error string
+ */
+ function sendEmail($fromAddr, $fromName, $toAddr, $toName, $subject, $body, &$error_msg ){
+
+ global $mailHost, $mailUsername, $mailPassword;
+ if($fromAddr == ''){
+ $fromAddr = MAILADMIN;
+ }
+
+ if($fromName == ''){
+ $fromName = MAILADMINNAME;
+ }
+
+ if ($this->isValidEmail($fromAddr) && $this->isValidEmail($toAddr)) {
+ $mail = new PHPMailer();
+
+ if ($fromName != "" ) {
+ $mail->FromName = $fromName;
+ }
+
+ $mail->IsSMTP(); // set mailer to use SMTP
+ $mail->Host = $mailHost; // specify main and backup server
+ $mail->SMTPAuth = true; // turn on SMTP authentication
+ $mail->Username = $mailUsername; // SMTP username
+ $mail->Password = $mailPassword; // SMTP password
+
+ $mail->From = $fromAddr;
+ $mail->AddAddress($toAddr, $toName);
+ #$mail->AddReplyTo("info at ccgis.de", "Information");
+
+ $mail->WordWrap = 50; // set word wrap to 50 characters
+ #$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
+ #$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
+ $mail->IsHTML(false); // set email format to HTML
+
+ $mail->Subject = "[".$fromName."] ".$subject;
+ $mail->Body = $body;
+ #$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
+
+ $error_msg='';
+
+ if(!$mail->Send())
+ {
+ $error_msg .= "Mailer Error: " . $mail->ErrorInfo;
+ return false;
+ }
+
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * returns a random password with numbers and chars both lowercase and uppercase (0-9a-zA-Z)
+ *
+ * @return <string> the new password
+ */
+ function getRandomPassword() {
+
+ // password length
+ $max = 16;
+
+ //new password
+ $newpass = "";
+
+ for ($i=0;$i <= $max;$i++) {
+ //die ASCII-Zeichen 48 - 57 sind die zahlen 0-9
+ //die ASCII-Zeichen 65 - 90 sind die buchstaben A-Z (Gro�)
+ //die ASCII-Zeichen 97 - 122 sind die buchstaben a-z (Klein)
+ $ascii = 0;
+ do {
+ $ascii=rand(48,122);
+ } while ( ($ascii > 57 && $ascii < 65) || ($ascii > 90 && $ascii < 97));
+ $newpass .= chr($ascii);
+ }
+ return $newpass;
+ }
+
+ /**
+ * returns the name of a mapbender user which owns the GUI identified by the passed over gui_id.
+ *
+ * @param <string> the gui_id
+ * @return <string> the name of the owner
+ */
+ function getOwnerByGui($gui_id){
+ $sql = "(SELECT mb_user.mb_user_name";
+ $sql .= "FROM mb_user ";
+ $sql .= "JOIN gui_mb_user ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
+ $sql .= "WHERE gui_mb_user.mb_user_type = 'owner' ";
+ $sql .= "AND gui_mb_user.fkey_gui_id = $1 ";
+ $sql .= "GROUP BY mb_user.mb_user_name ";
+ $sql .= ") ";
+ $sql .= "UNION ( ";
+ $sql .= "SELECT mb_user.mb_user_name ";
+ $sql .= "FROM gui_mb_group ";
+ $sql .= "JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id ";
+ $sql .= "JOIN mb_user ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
+ $sql .= "JOIN gui_mb_user ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
+ $sql .= "WHERE gui_mb_group.mb_group_type = 'owner' ";
+ $sql .= "AND gui_mb_group.fkey_gui_id = $2 ";
+ $sql .= "GROUP BY mb_user.mb_user_name)";
+ $owner = array();
+ $v = array($gui_id,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $owner[$cnt] = $row["mb_user_name"];
+ $cnt++;
+ }
+ return $owner;
+ }
+
+ /**
+ * returns the content of the field mb_user_email for the given userid.
+ *
+ * @param <integer> the userid
+ * @return <mixed> the email if one row is found or false if none is foundd
+ */
+ function getEmailByUserId($userid){
+ $sql = "SELECT mb_user_email FROM mb_user ";
+ $sql .= "WHERE mb_user_id = $1 GROUP by mb_user_email";
+ // TODO why do we group, when userid is a primary key?
+ $v = array($userid);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ // TODO shall the next two lines be removed?
+ $count_g = 0;
+ $array = array();
+ $row = db_fetch_array($res);
+ if ($row) {
+ return $row["mb_user_email"];
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * returns the name of the user for the given userid.
+ *
+ * @param <integer> the userid
+ * @return the name if one row is found or false if none is foundd
+ */
+ function getUserNameByUserId($userid){
+ $sql = "SELECT mb_user_name FROM mb_user ";
+ $sql .= "WHERE mb_user_id = $1 GROUP BY mb_user_name";
+ // TODO why do we group, when userid is a primary key?
+ $v = array($userid);
+ $t = array("i");
+ $res = db_prep_query($sql,$v,$t);
+ // TODO shall the next two lines be removed?
+ $count_g = 0;
+ $array = array();
+ $row = db_fetch_array($res);
+ if ($row) {
+ return $row["mb_user_name"];
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * returns one or more userids from the given email or false,
+ * if there is no record in the database matching the given email
+ *
+ * @param <string> the email
+ * @return <mixed> returns an array of userids or false when no records matches
+ */
+ function getUserIdByEmail($email){
+ $sql = "SELECT mb_user_id FROM mb_user ";
+ $sql .= "WHERE mb_user_email = $1 GROUP BY mb_user_id";
+ $v = array($email);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $count_g = 0;
+ $array = array();
+ while($row = db_fetch_array($res)){
+ $array[$count_g] = $row["mb_user_id"];
+ $count_g++;
+ }
+ if ($count_g >0) {
+ return $array;
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * returns one or more owners for the given wm_id. First all guis deploying
+ * this wms are selected. Afterwards for each of the guis the owners are
+ * selected and stored within an array.
+ *
+ * @param <integer> the wms_id
+ * @return <mixed> an array of usernames which use thw wms in their guis (both for persona or group ownership)
+ */
+ function getOwnerByWms($wms_id){
+ // first get guis which deploy this wms.
+ $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
+ $v = array($wms_id);
+ $t = array('i');
+ $count=0;
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ $gui[$count] = $row["fkey_gui_id"];
+ $count++;
+ }
+
+ if ($count > 0) {
+ // this is not needed! count($gui) is always equal to $count
+ if(count($gui)>0) {
+ $v = array();
+ $t = array();
+ $c = 1;
+ $sql = "(SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
+ $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
+ $sql .= " WHERE gui_mb_user.mb_user_type = 'owner'";
+ $sql .= " AND gui_mb_user.fkey_gui_id IN (";
+ for($i=0; $i<count($gui); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $gui[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") GROUP BY mb_user.mb_user_name";
+ $sql .= ") UNION (";
+ $sql .= "SELECT mb_user.mb_user_name FROM gui_mb_group JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id JOIN mb_user ";
+ $sql .= "ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
+ $sql .= " WHERE gui_mb_group.mb_group_type = 'owner'";
+ $sql .= " AND gui_mb_group.fkey_gui_id IN (";
+
+ for($j=0; $j<count($gui); $j++){
+ if($j>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $gui[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") GROUP BY mb_user.mb_user_name)";
+
+ $user = array();
+ $res = db_prep_query($sql,$v,$t);
+ }
+ $cnt = 0;
+
+ while($row = db_fetch_array($res)){
+ $user[$cnt] = $row["mb_user_name"];
+ $cnt++;
+ }
+ if ($cnt>0) {
+ return $user;
+ } else {
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+ /**
+ * tests whether a gui with the passed gui_id exits and returns true or false.
+ *
+ * @param <string> the gui_id to test
+ * @return <boolean> Does a Gui with the passed over gui_id exist?
+ */
+ function guiExists($id){
+ $sql = "SELECT * FROM gui WHERE gui_id = $1 ";
+ $v = array($id);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $row = db_fetch_array($res);
+ if ($row) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * deletes a WMC entry specified by wmc_id and user_id
+ *
+ * @param <integer> the user_id
+ * @param <string> the wmc_id
+ * @return <boolean> Did the query run succesfull? This does not necessarily mean that an entry was deleted.
+ */
+ function deleteWmc($wmc_id, $user_id){
+ $sql = "DELETE FROM mb_user_wmc ";
+ $sql .= "WHERE fkey_user_id = $1 AND wmc_id = $2";
+ $v = array($user_id,$wmc_id);
+ $t = array('i','s');
+ $res = db_prep_query($sql,$v,$t);
+ if ($res) {
+ return true;
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * inserts a gui with the specified gui_id, after checking the uniqueness of teh gui id.
+ *
+ * @uses guiExists
+ * @param <string> the name and id of the gui to insert.
+ * @return <boolean> could the gui be inserted?
+ */
+ function insertGui($guiId) {
+ if (!$this->guiExists($guiId)) {
+ $sql = "INSERT INTO gui VALUES ($1, $2, '', '1')";
+ $v = array($guiId,$guiId);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ if ($res) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * deletes links between user and guis in gui_mb_user for a certain gui.
+ *
+ * @param <string> the gui name
+ * @return <boolean> could the sql be executed without errors. This does not necessarily mean, that entries were deleted
+ */
+ function delAllUsersOfGui($guiId) {
+ $sql = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 ";
+ $v = array($guiId);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if (!$res) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+
+ /**
+ * returns an array of WMS for a given user id
+ * @uses getGuisByOwner
+ * @param <integer> the user id
+ * @return <array> wms ids for the user
+ */
+ function getWmsByOwner($user_id){
+ $gui_list = $this->getGuisByOwner($user_id,true);
+ return $this->getWmsByOwnGuis($gui_list);
+ }
+
+ /**
+ * returns an array of WMS where the owner is the user with the passed user_id
+ * @param <integer> the user id
+ * @return <array> wms ids for the user
+ */
+ function getWmsByWmsOwner($user_id){
+ $sql = "SELECT wms_id FROM wms WHERE wms_owner = $1";
+ $v = array($user_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $r = array();
+ while($row = db_fetch_array($res)){
+ array_push($r,$row["wms_id"]);
+ }
+ return $r;
+ }
+
+ /**
+ * returns an array of user which are associated with a wms
+ *
+ * @param <integer> the wms id
+ * @return <array> user_ids for the wms
+ */
+ function getUserByWms($wms_id){
+ $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
+ $v = array($wms_id);
+ $t = array('i');
+ $count=0;
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ $gui[$count] = $row["fkey_gui_id"];
+ $count++;
+ }
+ $c = 1;
+ $v = array();
+ $t = array();
+ if(count($gui)>0){
+ $sql = "(SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
+ $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id ";
+ $sql .= " WHERE gui_mb_user.fkey_gui_id IN (";
+ for($i=0; $i<count($gui); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ array_push($v,$gui[$i]);
+ array_push($t, 's');
+ $c++;
+ }
+ $sql .= ") GROUP BY mb_user.mb_user_name) UNION";
+ $sql .= "(SELECT mb_user.mb_user_name FROM gui_mb_group JOIN mb_user_mb_group ON mb_user_mb_group.fkey_mb_group_id = gui_mb_group.fkey_mb_group_id JOIN mb_user ";
+ $sql .= "ON mb_user.mb_user_id = mb_user_mb_group.fkey_mb_user_id ";
+ $sql .= " WHERE gui_mb_group.fkey_gui_id IN (";
+ for($i=0; $i<count($gui); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ array_push($v,$gui[$i]);
+ array_push($t, 's');
+ $c++;
+ }
+ $sql .= ") GROUP BY mb_user.mb_user_name )";
+ $user = array();
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $user[$cnt] = $row["mb_user_name"];
+ $cnt++;
+ }
+ }
+ return $user;
+ }
+
+ /**
+ * selects the WMS-title for a given wms id.
+ *
+ * @param <integer> the wms id
+ * @return <string|boolean> either the title of the wms as string or false when none exists
+ */
+ function getWmsTitleByWmsId($id){
+ $sql = "SELECT wms_title FROM wms WHERE wms_id = $1 GROUP BY wms_title";
+ $v = array($id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $row = db_fetch_array($res);
+ if ($row) return $row["wms_title"]; else return false;
+ }
+
+ /**
+ * selects the Layer-title for a given layer id.
+ *
+ * @param <integer> the wms id
+ * @return <string|boolean> either the title of the wms as string or false when none exists
+ */
+ function getLayerTitleByLayerId($id){
+ $sql = "SELECT layer_title FROM layer WHERE layer_id = $1 GROUP BY layer_title";
+ $v = array($id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $row = db_fetch_array($res);
+ if ($row) return $row["layer_title"]; else return false;
+ }
+
+ /**
+ * selects the WMC for a given wmc_id.
+ *
+ * @param <integer> the wms id
+ * @return <string|boolean> either the wmc as string or false when none exists
+ */
+ function getWmcById($id){
+ $sql = "SELECT wmc FROM mb_user_wmc WHERE wmc_id = $1 ";
+ $v = array($id);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $row = db_fetch_array($res);
+ if ($row) {
+ return $row["wmc"];
+ }
+ else {
+ return false;
+ }
+ }
+
+ /**
+ * resets the loin count of a given user to 0
+ * @param <integer> the user id
+ * @return <boolean> could the login count be reseted?
+ */
+ function resetLoginCount($userId) {
+ // TODO: isn't mb_user_login_count a integer?
+ $sql = "UPDATE mb_user SET mb_user_login_count = '0' ";
+ $sql .= "WHERE mb_user_id = $1 ";
+ $v = array($userId);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if (!$res) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+
+ function getUserIdByUserName($username){
+ $sql = "SELECT mb_user_id FROM mb_user ";
+ $sql .= "WHERE mb_user_name = $1 GROUP BY mb_user_id";
+ $v = array($username);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $row = db_fetch_array($res);
+ if ($row) return $row["mb_user_id"]; else return false;
+ }
+
+ function setUserAsGuiOwner($guiId, $userId) {
+ $sql = "UPDATE gui_mb_user SET mb_user_type = 'owner' ";
+ $sql .= "WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2 ";
+ $v = array($guiId,$userId);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+
+ if (!$res) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+
+ function getGuiIdByGuiName($guiTitle){
+ $sql = "SELECT gui_id FROM gui ";
+ $sql .= "WHERE gui_name = $1 GROUP BY gui_id";
+ $v = array($guiTitle);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $count_g = 0;
+ $array = array();
+ while($row = db_fetch_array($res)){
+ $array[$count_g] = $row["gui_id"];
+ $count_g++;
+ }
+ if ($count_g >0) {
+ return $array;
+ }
+ else {
+ return false;
+ }
+ }
+
+ function getGuisByOwner($user_id,$ignore_public)
+ {
+ $sql_guis = "SELECT gui.gui_id FROM gui,gui_mb_user ";
+ $sql_guis .= "WHERE (gui.gui_id = gui_mb_user.fkey_gui_id AND gui_mb_user.fkey_mb_user_id = $1) ";
+ if (!isset($ignore_public) OR $ignore_public == false){
+ $sql_guis .= " AND gui.gui_public = 1 ";
+ }
+ $sql_guis .= " AND gui_mb_user.mb_user_type = 'owner' GROUP BY gui.gui_id";
+ $sql_guis .= " ORDER by gui.gui_id";
+ $v = array($user_id);
+ $t = array('i');
+ $res_guis = db_prep_query($sql_guis,$v,$t);
+ $count_g = 0;
+ $arrayGuis = array();
+ while($row = db_fetch_array($res_guis)){
+ $arrayGuis[$count_g] = $row["gui_id"];
+ $count_g++;
+ }
+ return $arrayGuis;
+ }
+
+ function getWmcByOwner($user_id){
+ $sql_wmc = "SELECT wmc_id FROM mb_user_wmc ";
+ $sql_wmc .= "WHERE fkey_user_id = $1 GROUP BY wmc_id";
+ $v = array($user_id);
+ $t = array('i');
+ $res_wmc = db_prep_query($sql_wmc,$v,$t);
+ $count_g = 0;
+ $arrayWmc = array();
+ while($row = db_fetch_array($res_wmc)){
+ $arrayWmc[$count_g] = $row["wmc_id"];
+ $count_g++;
+ }
+ return $arrayWmc;
+ }
+
+ function getGuisByPermission($mb_user_id,$ignore_public){
+ $arrayGuis = array();
+ $mb_user_groups = array();
+ $sql_groups = "SELECT fkey_mb_group_id FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 ";
+ $v = array($mb_user_id);
+ $t = array("i");
+ $res_groups = db_prep_query($sql_groups,$v,$t);
+ $cnt_groups = 0;
+ while($row = db_fetch_array($res_groups)){
+ $mb_user_groups[$cnt_groups] = $row["fkey_mb_group_id"];
+ $cnt_groups++;
+ }
+ if($cnt_groups > 0){
+ $v = array();
+ $t = array();
+ $sql_g = "SELECT gui.gui_id FROM gui JOIN gui_mb_group ";
+ $sql_g .= " ON gui.gui_id = gui_mb_group.fkey_gui_id WHERE gui_mb_group.fkey_mb_group_id IN (";
+ for($i=0; $i<count($mb_user_groups);$i++){
+ if($i > 0){$sql_g .= ",";}
+ $sql_g .= "$".strval($i+1);
+ array_push($v,$mb_user_groups[$i]);
+ array_push($t,"i");
+ }
+ $sql_g .= ") GROUP BY gui.gui_id";
+ $res_g = db_prep_query($sql_g,$v,$t);
+ while($row = db_fetch_array($res_g)){
+ array_push($arrayGuis,$row["gui_id"]);
+ }
+ }
+ $sql_guis = "SELECT gui.gui_id FROM gui JOIN gui_mb_user ON gui.gui_id = gui_mb_user.fkey_gui_id";
+ $sql_guis .= " WHERE (gui_mb_user.fkey_mb_user_id = $1) ";
+ if (!isset($ignore_public) OR $ignore_public== false){
+ $sql_guis .= " AND gui.gui_public = 1 ";
+ }
+ $sql_guis .= " GROUP BY gui.gui_id";
+ $v = array($mb_user_id);
+ $t = array("i");
+ $res_guis = db_prep_query($sql_guis,$v,$t);
+ $guis = array();
+ while($row = db_fetch_array($res_guis)){
+ if(!in_array($row['gui_id'],$arrayGuis)){
+ array_push($arrayGuis,$row["gui_id"]);
+ }
+ }
+ return $arrayGuis;
+ }
+
+ function getWmsByOwnGuis($array_gui_ids){
+ if(count($array_gui_ids)>0){
+ $v = array();
+ $t = array();
+ $sql = "SELECT fkey_wms_id from gui_wms WHERE gui_wms.fkey_gui_id IN(";
+ for($i=0; $i<count($array_gui_ids); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".strval($i+1);
+ array_push($v, $array_gui_ids[$i]);
+ array_push($t, "s");
+ }
+ $sql .= ") GROUP BY fkey_wms_id ORDER BY fkey_wms_id";
+ $res = db_prep_query($sql,$v,$t);
+ $ownguis = array();
+ $i=0;
+ while($row = db_fetch_array($res)){
+ $ownguis[$i] = $row['fkey_wms_id'];
+ $i++;
+ }
+ }
+ return $ownguis;
+ }
+
+ function getLayerByWms($wms_id){
+ $sql = "SELECT layer_id from layer WHERE fkey_wms_id = $1 AND layer_pos NOT IN ('0') GROUP BY layer_id, layer_title ORDER BY layer_title";
+ $v = array($wms_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $layer_id_array = array();
+ while($row = db_fetch_array($res)){
+ $layer_id_array[count($layer_id_array)] = $row['layer_id'];
+ }
+ return $layer_id_array;
+ }
+
+ function getWmsOwner($wms_id){
+ $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1 GROUP BY fkey_gui_id";
+ $v = array($wms_id);
+ $t = array('i');
+ $count=0;
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ $gui[$count] = $row["fkey_gui_id"];
+ $count++;
+ }
+ $v = array();
+ $t = array();
+ if(count($gui)>0){
+ $sql = "SELECT mb_user.mb_user_name FROM mb_user JOIN gui_mb_user ";
+ $sql .= "ON mb_user.mb_user_id = gui_mb_user.fkey_mb_user_id WHERE";
+ $sql .= " gui_mb_user.fkey_gui_id IN (";
+ for($i=0; $i<count($gui); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i+1);
+ array_push($v,$gui[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ")";
+ $sql .= " AND gui_mb_user.mb_user_type = 'owner' GROUP BY mb_user.mb_user_name";
+ $res = db_prep_query($sql,$v,$t);
+ $i=0;
+ $wmsowner = array();
+ while($row = db_fetch_array($res)){
+ $wmsowner[$i]=$row['mb_user_name'];
+ $i++;
+ }
+ }
+ return $wmsowner;
+ }
+
+ function insertUserAsGuiOwner($guiId, $userId){
+ $sql = "INSERT INTO gui_mb_user VALUES ($1, $2, 'owner')";
+ $v = array($guiId,$userId);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if (!$res) {
+ return false;
+ }
+ else {
+ return true;
+ }
+ }
+
+ function checkModulePermission($arrayGuis, $modulePath, $column){
+ $check = CHECK;
+
+ if($check == true){
+ $perm = false;
+ if (!preg_match("/[a-z_]+/", $column)) {
+ return false;
+ }
+ if(count($arrayGuis)>0){
+ $v = array();
+ $t = array();
+ $sql = "SELECT ".$column." FROM gui_element WHERE fkey_gui_id IN(";
+ for($i=0; $i<count($arrayGuis); $i++){
+ if($i > 0){ $sql .= ","; }
+ $sql .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ")";
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ if(strpos(stripslashes($row[$column]),$modulePath) !== false){
+ $perm = true;
+ }
+ $cnt++;
+ }
+ }
+ return $perm;
+ }
+ else{
+ return true;
+ }
+ }
+
+ /**
+ * Checks if a user is allowed to access a GUI element
+ *
+ * @return boolean
+ * @param $arrayGuis Object
+ * @param $modulePath Object
+ * @param $elementTag Object
+ */
+ function checkModulePermission_new($userId, $modulePath, $elementTag){
+ if (CHECK) {
+ $arrayGuis = $this->getGuisByPermission($userId, true);
+
+ switch ($elementTag) {
+ case "a" :
+ $column = "e_attributes";
+ $pattern = "/^.*href\s*=\s*(\'|\")\.\.((\/[a-zA-Z0-9_\/\.]+)+)(\?|\'|\").*$/";
+ $replace = "$2";
+ break;
+ case "iframe" :
+ $column = "e_src";
+ $pattern = "/^\.\.((\/[a-zA-Z0-9_\/\.]+)+)(\?|\'|\").*$/";
+ $replace = "$1";
+ break;
+ }
+
+ if ($column && count($arrayGuis) > 0) {
+ $v = array();
+ $t = array();
+ $sql = "SELECT DISTINCT ".$column." FROM gui_element WHERE fkey_gui_id IN (";
+ for($i=0; $i<count($arrayGuis); $i++){
+ if($i > 0){ $sql .= ","; }
+ $sql .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ") ORDER BY " . $column;
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+ if ($row[$column]) {
+ if (preg_match($pattern, stripslashes($row[$column]))) {
+ $dbFilename = preg_replace($pattern, $replace, stripslashes($row[$column]));
+// $e = new mb_notice($dbFilename . " - " . $modulePath);
+
+ if(strpos($modulePath, $dbFilename) !== false){
+ return true;
+ }
+ }
+ }
+ }
+ }
+ return false;
+ }
+ return true;
+ }
+
+ function getWMSOWSstring($wms_id){
+ $sql = "SELECT wms_owsproxy FROM wms WHERE wms_id = $1 ";
+ $v = array($wms_id);
+ $t = array("i");
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return $row["wms_owsproxy"];
+ }
+ else{
+ return false;
+ }
+ }
+
+ function setWMSOWSstring($wms_id, $status){
+ $sql = "UPDATE wms SET wms_owsproxy = $1 WHERE wms_id = $2 ";
+ $t = array("s","i");
+ if($status == 'on'){
+ $time = md5(microtime(1));
+ $v = array($time,$wms_id);
+ }
+ else{
+ $v = array("",$wms_id);
+ }
+ $res = db_prep_query($sql,$v,$t);
+ }
+
+ function checkURL($url){
+ $pos_qm = strpos($url,"?");
+ if($pos_qm > 0 && $pos_qm < (strlen($url)-1) && substr($url,(strlen($url)-1)) != "&"){
+ $url = $url."&";
+ return $url;
+ }
+ else if($pos_qm === false){
+ return $url."?";
+ }
+ else{
+ return $url;
+ }
+ }
+ function getModulPermission($userID,$guiID,$elementID){
+ $g = $this->getGuisByPermission($userID,true);
+ if(in_array($guiID,$g)){
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2 ";
+ $v = array($guiID,$elementID);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+ else{
+ return false;
+ }
+ }
+ function getLayerPermission($wms_id, $layer_name, $user_id){
+ $layer_id = $this->getLayerIdByLayerName($wms_id,$layer_name);
+ $array_guis = $this->getGuisByPermission($user_id,true);
+ $v = array();
+ $t = array();
+ $sql = "SELECT * FROM gui_layer WHERE fkey_gui_id IN (";
+ $c = 1;
+ for($i=0; $i<count($array_guis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $array_guis[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") AND fkey_layer_id = $".$c." AND gui_layer_status = 1";
+ array_push($v,$layer_id);
+ array_push($t,'i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+ function getWmsPermission($wms_id, $user_id) {
+ $array_guis = $this->getGuisByPermission($user_id,true);
+ $v = array();
+ $t = array();
+ $sql = "SELECT * FROM gui_wms WHERE fkey_gui_id IN (";
+ $c = 1;
+ for($i=0; $i<count($array_guis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ $c++;
+ array_push($v, $array_guis[$i]);
+ array_push($t, 's');
+ }
+ $sql .= ") AND fkey_wms_id = $".$c;
+ array_push($v,$wms_id);
+ array_push($t,'i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+ function getLayerIdByLayerName($wms_id, $layer_name){
+ $sql = "SELECT layer_id FROM layer WHERE ";
+ $sql .= "fkey_wms_id = $1 AND layer_name = $2";
+ $v = array($wms_id,$layer_name);
+ $t = array('i','s');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return $row['layer_id'];
+ }
+ else{
+ return false;
+ }
+ }
+ function getWmsIdByWmsGetmap($getmap) {
+ $sql = "SELECT wms_id FROM wms WHERE ";
+ $sql .= "wms_getmap LIKE $1 LIMIT 1";
+ $v = array($getmap."%");
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ return $row['wms_id'];
+ }
+ else{
+ return false;
+ }
+ }
+
+ function is_utf8_string($string) {
+ return preg_match('%(?:
+ [\xC2-\xDF][\x80-\xBF] # non-overlong 2-byte
+ |\xE0[\xA0-\xBF][\x80-\xBF] # excluding overlongs
+ |[\xE1-\xEC\xEE\xEF][\x80-\xBF]{2} # straight 3-byte
+ |\xED[\x80-\x9F][\x80-\xBF] # excluding surrogates
+ |\xF0[\x90-\xBF][\x80-\xBF]{2} # planes 1-3
+ |[\xF1-\xF3][\x80-\xBF]{3} # planes 4-15
+ |\xF4[\x80-\x8F][\x80-\xBF]{2} # plane 16
+ )+%xs', $string);
+ }
+
+ function is_utf8_xml($xml) {
+ return preg_match('/<\?xml[^>]+encoding="utf-8"[^>]*\?>/is', $xml);
+ }
+
+ function is_utf8 ($data) {
+ return ($this->is_utf8_xml($data) || $this->is_utf8_string($data));
+ }
+
+ function char_encode($data) {
+ if (CHARSET == "UTF-8") {
+ if (!$this->is_utf8($data)) {
+ $e = new mb_notice("Conversion: ISO-8859-1 to UTF-8");
+ return utf8_encode($data);
+ }
+ }
+ else {
+ if ($this->is_utf8($data)) {
+ $e = new mb_notice("Conversion: UTF-8 to ISO-8859-1");
+ return utf8_decode($data);
+ }
+ }
+ $e = new mb_notice("No conversion: is " . CHARSET);
+ return $data;
+ }
+
+ function char_decode($data) {
+ if (CHARSET == "UTF-8") {
+ if ($this->is_utf8($data)) {
+ $e = new mb_notice("Conversion: UTF-8 to ISO-8859-1");
+ return utf8_decode($data);
+ }
+ }
+ $e = new mb_notice("no conversion: is " . CHARSET);
+ return $data;
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/classes/class_stripRequest.php
===================================================================
--- branches/2.4.5/http/classes/class_stripRequest.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/classes/class_stripRequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,134 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/class_stripRequest.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/class_mb_exception.php");
-
-
-class stripRequest{
- var $url;
- var $encodeParams = array("LAYERS", "QUERY_LAYERS");
- function stripRequest($mr){
- if(!$mr || $mr == ""){
- $t = new mb_exception("stripRequest: maprequest lacks ");
- die;
- }
- $this->url = $mr;
- }
-
- function set($key,$value){
- $exists = false;
- $a = explode("?",$this->url);
- $patterns = explode("&", $a[1]);
- for($i=0; $i<count($patterns); $i++){
- $tmp = explode("=", $patterns[$i]);
- if(strtoupper($tmp[0]) == strtoupper($key)){
- $replacement = strtoupper($key) . "=" . $value;
- $this->url = str_replace($patterns[$i],$replacement, $this->url);
- $exists = true;
- }
- }
- if($exists == false){
- $e = new mb_exception("stripRequest: key '".$key."' lacks");
- return false;
- }
- else{
- return $this->url;
- }
- }
-
- function get($key){
- $exists = false;
- $a = explode("?",$this->url);
- $patterns = explode("&", $a[1]);
- for($i=0; $i<count($patterns); $i++){
- $tmp = explode("=", $patterns[$i]);
- if(strtoupper($tmp[0]) == strtoupper($key)){
- $exists = true;
- return $tmp[1];
- }
- }
- if($exists == false){
- $e = new mb_exception("stripRequest: key '".$key."' lacks");
- return false;
- }
- }
-
- function setPNG(){
- $version = $this->get("version");
- if($version == "1.0.0"){
- $output = $this->set("format","PNG");
- return $output;
- }
- else{
- $output = $this->set("format","image/png");
- return $output;
- }
- }
- function append($param){
- $this->url .= "&".$param;
- $this->encodeGET();
- return $this->url;
- }
- function remove($key){
- $a = explode("?",$this->url);
- $patterns = explode("&", $a[1]);
- for($i=0; $i<count($patterns); $i++){
- $tmp = explode("=", $patterns[$i]);
- if(strtoupper($tmp[0]) == strtoupper($key)){
- $replacement = "";
- $this->url = str_replace($patterns[$i],$replacement, $this->url);
- }
- }
- $this->encodeGET();
- return $this->url;
- }
- function encodeGET(){
- $a = explode("?",$this->url);
- $patterns = explode("&", $a[1]);
- $a[0].= "?";
- for($i=0; $i<count($patterns); $i++){
- $tmp = explode("=", $patterns[$i]);
- if(in_array(strtoupper($tmp[0]),$this->encodeParams)){
- $val = explode(",", $tmp[1]);
- $a[0] .= $tmp[0]."=";
- for($ii=0; $ii<count($val); $ii++){
- if($ii>0){$a[0].=",";}
- $a[0].= urlencode($val[$ii]);
- }
- if ($i < (count($patterns)-1)) {
- $a[0] .= "&";
- }
- }
- else{
- $a[0] .= $tmp[0] . "=" .$tmp[1];
- if ($i < (count($patterns)-1)) {
- $a[0] .= "&";
- }
- }
- }
- $this->url = $a[0];
- return $this->url;
- }
-
- function encodeLegGET(){
- $this->url = str_replace("&", "\&", $this->url);
- return $this->url;
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/classes/class_stripRequest.php (from rev 2180, branches/2.4.5/http/classes/class_stripRequest.php)
===================================================================
--- branches/2.4.5_rc1/http/classes/class_stripRequest.php (rev 0)
+++ branches/2.4.5_rc1/http/classes/class_stripRequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,135 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/class_stripRequest.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/class_mb_exception.php");
+
+
+class stripRequest{
+ var $url;
+ var $encodeParams = array("LAYERS", "QUERY_LAYERS");
+ function stripRequest($mr){
+ if(!$mr || $mr == ""){
+ $t = new mb_exception("stripRequest: maprequest lacks ");
+ die;
+ }
+ $this->url = $mr;
+ }
+
+ function set($key,$value){
+ $exists = false;
+ $a = explode("?",$this->url);
+ $patterns = explode("&", $a[1]);
+ for($i=0; $i<count($patterns); $i++){
+ $tmp = explode("=", $patterns[$i]);
+ if(strtoupper($tmp[0]) == strtoupper($key)){
+ $replacement = strtoupper($key) . "=" . $value;
+ $this->url = str_replace($patterns[$i],$replacement, $this->url);
+ $exists = true;
+ }
+ }
+ if($exists == false){
+ $e = new mb_exception("stripRequest: key '".$key."' lacks");
+ return false;
+ }
+ else{
+ return $this->url;
+ }
+ }
+
+ function get($key){
+ $exists = false;
+ $a = explode("?",$this->url);
+ $patterns = explode("&", $a[1]);
+ for($i=0; $i<count($patterns); $i++){
+ $tmp = explode("=", $patterns[$i]);
+ if(strtoupper($tmp[0]) == strtoupper($key)){
+ $exists = true;
+ return $tmp[1];
+ }
+ }
+ if($exists == false){
+ $e = new mb_exception("stripRequest: key '".$key."' lacks");
+ return false;
+ }
+ }
+
+ function setPNG(){
+ $version = $this->get("version");
+ if($version == "1.0.0"){
+ $output = $this->set("format","PNG");
+ return $output;
+ }
+ else{
+ $output = $this->set("format","image/png");
+ return $output;
+ }
+ }
+
+ function append($param){
+ $this->url .= "&".$param;
+ $this->encodeGET();
+ return $this->url;
+ }
+ function remove($key){
+ $a = explode("?",$this->url);
+ $patterns = explode("&", $a[1]);
+ for($i=0; $i<count($patterns); $i++){
+ $tmp = explode("=", $patterns[$i]);
+ if(strtoupper($tmp[0]) == strtoupper($key)){
+ $replacement = "";
+ $this->url = str_replace($patterns[$i],$replacement, $this->url);
+ }
+ }
+ $this->encodeGET();
+ return $this->url;
+ }
+ function encodeGET(){
+ $a = explode("?",$this->url);
+ $patterns = explode("&", $a[1]);
+ $a[0].= "?";
+ for($i=0; $i<count($patterns); $i++){
+ $tmp = explode("=", $patterns[$i]);
+ if(in_array(strtoupper($tmp[0]),$this->encodeParams)){
+ $val = explode(",", $tmp[1]);
+ $a[0] .= $tmp[0]."=";
+ for($ii=0; $ii<count($val); $ii++){
+ if($ii>0){$a[0].=",";}
+ $a[0].= urlencode($val[$ii]);
+ }
+ if ($i < (count($patterns)-1)) {
+ $a[0] .= "&";
+ }
+ }
+ else{
+ $a[0] .= $tmp[0] . "=" .$tmp[1];
+ if ($i < (count($patterns)-1)) {
+ $a[0] .= "&";
+ }
+ }
+ }
+ $this->url = $a[0];
+ return $this->url;
+ }
+
+ function encodeLegGET(){
+ $this->url = str_replace("&", "\&", $this->url);
+ return $this->url;
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php
===================================================================
--- branches/2.4.5/http/extensions/ext_featureInfoTunnel.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,37 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/ext_featureInfoTunnel.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once("../classes/class_stripRequest.php");
-require_once("../classes/class_connector.php");
-$mr = new stripRequest(urldecode($_REQUEST["url"]));
-$nmr = $mr->encodeGET();
-$isOwsproxyRequest = (strpos($nmr,OWSPROXY) === 0);
-if($isOwsproxyRequest){
- header("Location: ".$nmr);
-}
-else{
- $x = new connector($nmr);
- if (empty($x->file)) {
- //do whatever you want
- }
- else {
- echo $x->file;
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php (from rev 2140, branches/2.4.5/http/extensions/ext_featureInfoTunnel.php)
===================================================================
--- branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php (rev 0)
+++ branches/2.4.5_rc1/http/extensions/ext_featureInfoTunnel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,37 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/ext_featureInfoTunnel.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once("../classes/class_stripRequest.php");
+require_once("../classes/class_connector.php");
+$mr = new stripRequest(urldecode($_REQUEST["url"]));
+$nmr = $mr->encodeGET();
+$isOwsproxyRequest = (strpos($nmr,OWSPROXY) === 0);
+if($isOwsproxyRequest){
+ header("Location: ".$nmr);
+}
+else{
+ $x = new connector($nmr);
+ if (empty($x->file)) {
+ //do whatever you want
+ }
+ else {
+ echo $x->file;
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/extensions/ext_weldMaps.php
===================================================================
--- branches/2.4.5/http/extensions/ext_weldMaps.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/extensions/ext_weldMaps.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,118 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/ext_weldMaps.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/*
-* extension weldMaps
-* expects an array $_SESSION["mb_print_urls"] containing the mapRequests
-* expects $_SESSION["mb_print_resolution"]
-* **/
-
-class weldMaps{
- var $map_width;
- var $map_height;
- var $integrateURL;
- var $matching;
- var $pattern;
- var $replacement;
-
- function weldMaps($map_urls, $factor){
- #{ file | false }
-
- #$debug_file = "/data/mapbender2/log/print.log";
- $debug_file = false;
-
- settype($factor, "integer");
-
- if($debug_file){
- $debug = fopen($debug_file,"a") ;
- fputs($debug, str_repeat("-",50) . chr(13). chr(10). date("d.m.y, H:i:s") . " Open debug-file: " . chr(13). chr(10));
- for($i=0; $i<count($map_urls); $i++){
- fputs($debug, $i . " " . $map_urls[$i] . chr(13). chr(10));
- //print_r($map_urls);
- }
- fclose($debug);
- }
-
- if(!isset($factor)){
- $factor = 1;
- }
- include(dirname(__FILE__)."/../../conf/print.conf");
- $this->integrateURL = $integrateURL;
- $this->matching = $matching;
- $this->pattern = $pattern;
- $this->replacement = $replacement;
- if(preg_match("/width=(\d*)/i", $map_urls[0], $matches)){
- $this->map_width = round(intval($matches[1]) * intval($factor) * floatval($deformation));
- }
- if(preg_match("/height=(\d*)/i", $map_urls[0], $matches)){
- $this->map_height = round(intval($matches[1]) * intval($factor) * floatval($deformation));
- }
- for($i=0; $i<count($map_urls); $i++){
- $my_urls[$i] = $this->changeResolution($map_urls[$i], $factor);
- if($debug_file){
- $debug = fopen($debug_file,"a") ;
- fputs($debug, "transformated: " . chr(13). chr(10));
- fputs($debug, $i . " ". $my_urls[$i] . chr(13). chr(10));
- fclose($debug);
- }
- }
- $image = imagecreate($this->map_width, $this->map_height);
- $white = ImageColorAllocate($image,255,255,255);
- ImageFilledRectangle($image,0,0,$this->map_width,$this->map_height,$white);
-
- for($i = 0; $i<count($my_urls); $i++){
- $im = $this->loadpng($my_urls[$i]);
- imagecopy($image, $im, 0, 0, 0, 0, $this->map_width, $this->map_height);
- }
- ImagePNG($image);
- ImageDestroy($image);
- }
- function loadpng ($imgname) {
- $im = @ImageCreateFromPNG ($imgname);
- if (!$im) {
- $im = ImageCreate ($this->map_width, $this->map_height);
- $bgc = ImageColorAllocate ($im, 255, 255, 255);
- $tc = ImageColorAllocate ($im, 0, 0, 0);
- ImageFilledRectangle ($im, 0, 0, $map_width, $map_height, $bgc);
- ImageString($im, 1, 5, 5, "Fehler beim Öffnen von: ", $tc);
- $chunk = chunk_split(urldecode($imgname), 60, "###");
- $array_chunk = explode("###", $chunk);
- for($i=0; $i<count($array_chunk); $i++){
- ImageString($im, 1, 5, 20+($i*10), $array_chunk[$i] , $tc);
- }
- }
- if($this->integrateURL == true){
- $tc = ImageColorAllocate ($im, 0, 0, 0);
- ImageString($im, 1, 5, 5, $imgname, $tc);
- }
- return $im;
- }
- function changeResolution($map_url,$factor){
- $newResolution = preg_replace("/width=\d*/i", "WIDTH=" . $this->map_width, $map_url);
- $newResolution = preg_replace("/height=\d*/i", "HEIGHT=" . $this->map_height, $newResolution);
- if($this->matching == true && $factor > 1){
- $newResolution = preg_replace($this->pattern, $this->replacement, $newResolution);
- }
- return $newResolution;
- }
-}
-session_start();
-$map_urls = explode("###",$_SESSION["mb_print_url"]);
-$output = new weldMaps($map_urls, $_SESSION["mb_print_resolution"]);
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/extensions/ext_weldMaps.php (from rev 2140, branches/2.4.5/http/extensions/ext_weldMaps.php)
===================================================================
--- branches/2.4.5_rc1/http/extensions/ext_weldMaps.php (rev 0)
+++ branches/2.4.5_rc1/http/extensions/ext_weldMaps.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,118 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/ext_weldMaps.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/*
+* extension weldMaps
+* expects an array $_SESSION["mb_print_urls"] containing the mapRequests
+* expects $_SESSION["mb_print_resolution"]
+* **/
+
+class weldMaps{
+ var $map_width;
+ var $map_height;
+ var $integrateURL;
+ var $matching;
+ var $pattern;
+ var $replacement;
+
+ function weldMaps($map_urls, $factor){
+ #{ file | false }
+
+ #$debug_file = "/data/mapbender2/log/print.log";
+ $debug_file = false;
+
+ settype($factor, "integer");
+
+ if($debug_file){
+ $debug = fopen($debug_file,"a") ;
+ fputs($debug, str_repeat("-",50) . chr(13). chr(10). date("d.m.y, H:i:s") . " Open debug-file: " . chr(13). chr(10));
+ for($i=0; $i<count($map_urls); $i++){
+ fputs($debug, $i . " " . $map_urls[$i] . chr(13). chr(10));
+ //print_r($map_urls);
+ }
+ fclose($debug);
+ }
+
+ if(!isset($factor)){
+ $factor = 1;
+ }
+ include(dirname(__FILE__)."/../../conf/print.conf");
+ $this->integrateURL = $integrateURL;
+ $this->matching = $matching;
+ $this->pattern = $pattern;
+ $this->replacement = $replacement;
+ if(preg_match("/width=(\d*)/i", $map_urls[0], $matches)){
+ $this->map_width = round(intval($matches[1]) * intval($factor) * floatval($deformation));
+ }
+ if(preg_match("/height=(\d*)/i", $map_urls[0], $matches)){
+ $this->map_height = round(intval($matches[1]) * intval($factor) * floatval($deformation));
+ }
+ for($i=0; $i<count($map_urls); $i++){
+ $my_urls[$i] = $this->changeResolution($map_urls[$i], $factor);
+ if($debug_file){
+ $debug = fopen($debug_file,"a") ;
+ fputs($debug, "transformated: " . chr(13). chr(10));
+ fputs($debug, $i . " ". $my_urls[$i] . chr(13). chr(10));
+ fclose($debug);
+ }
+ }
+ $image = imagecreate($this->map_width, $this->map_height);
+ $white = ImageColorAllocate($image,255,255,255);
+ ImageFilledRectangle($image,0,0,$this->map_width,$this->map_height,$white);
+
+ for($i = 0; $i<count($my_urls); $i++){
+ $im = $this->loadpng($my_urls[$i]);
+ imagecopy($image, $im, 0, 0, 0, 0, $this->map_width, $this->map_height);
+ }
+ ImagePNG($image);
+ ImageDestroy($image);
+ }
+ function loadpng ($imgname) {
+ $im = @ImageCreateFromPNG ($imgname);
+ if (!$im) {
+ $im = ImageCreate ($this->map_width, $this->map_height);
+ $bgc = ImageColorAllocate ($im, 255, 255, 255);
+ $tc = ImageColorAllocate ($im, 0, 0, 0);
+ ImageFilledRectangle ($im, 0, 0, $map_width, $map_height, $bgc);
+ ImageString($im, 1, 5, 5, "Fehler beim �ffnen von: ", $tc);
+ $chunk = chunk_split(urldecode($imgname), 60, "###");
+ $array_chunk = explode("###", $chunk);
+ for($i=0; $i<count($array_chunk); $i++){
+ ImageString($im, 1, 5, 20+($i*10), $array_chunk[$i] , $tc);
+ }
+ }
+ if($this->integrateURL == true){
+ $tc = ImageColorAllocate ($im, 0, 0, 0);
+ ImageString($im, 1, 5, 5, $imgname, $tc);
+ }
+ return $im;
+ }
+ function changeResolution($map_url,$factor){
+ $newResolution = preg_replace("/width=\d*/i", "WIDTH=" . $this->map_width, $map_url);
+ $newResolution = preg_replace("/height=\d*/i", "HEIGHT=" . $this->map_height, $newResolution);
+ if($this->matching == true && $factor > 1){
+ $newResolution = preg_replace($this->pattern, $this->replacement, $newResolution);
+ }
+ return $newResolution;
+ }
+}
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$map_urls = explode("###",$_SESSION["mb_print_url"]);
+$output = new weldMaps($map_urls, $_SESSION["mb_print_resolution"]);
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/extensions/geom2wfst.php
===================================================================
--- branches/2.4.5/http/extensions/geom2wfst.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/extensions/geom2wfst.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,121 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/geom2wfst.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-
-
-function sepNameSpace($s){
- $c = strpos($s,":");
- if($c>0) return substr($s,$c+1);
- return $s;
-}
-function sendToHost($host,$port,$method,$path,$data){
- $buf = '';
- if (empty($method)) $method = 'POST';
- $method = strtoupper($method);
- $fp = fsockopen($host, $port);
- fputs($fp, "$method $path HTTP/1.1\r\n");
- fputs($fp, "Host: $host\r\n");
- fputs($fp,"Content-type: application/xml\r\n");
- fputs($fp, "Content-length: " . strlen($data) . "\r\n");
- fputs($fp, "Connection: close\r\n\r\n");
- if ($method == 'POST') fputs($fp, $data);
- while (!feof($fp)) $buf .= fgets($fp,4096);
- fclose($fp);
- return $buf;
-}
-
-$result="";
-$error = false;
-$arURL = parse_url($_REQUEST["url"]);
-$host = $arURL["host"];
-$port = $arURL["port"];
-if($port == '') $port = 80;
-
-$path = $arURL["path"];
-$method = "POST";
-$filter = stripslashes($_REQUEST["filter"]);
-
-$data = sendToHost($host,$port,$method,html_entity_decode($path),$filter);
-
-$data = eregi_replace("^[^<]*", "", $data);
-$data = eregi_replace("[^>]*$", "", $data);
-
-/*
-$parser = xml_parser_create(CHARSET);
-xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
-xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
-xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,CHARSET);
-xml_parse_into_struct($parser,$data,$values,$tags);
-$code = xml_get_error_code ($parser);
-if ($code) {
- $result = "Error " . $code . " (" . xml_error_string($code) . ")";
- $error = true;
-}
-xml_parser_free($parser);
-if (!$error) {
- $section;
- foreach ($values as $element) {
- $element[tag] = sepNameSpace($element[tag]);
- if(strtoupper($element[tag]) == "SERVICEEXCEPTIONREPORT" && $element[type] == "open"){
- $section = "serviceexceptionreport";
- }
- if ($section == "serviceexceptionreport" && strtoupper($element[tag]) == "SERVICEEXCEPTION") {
-// $result = $element[value];
- $result = "An error occured.";
- $error = true;
- }
- if(strtoupper($element[tag]) == "STATUS" && $element[type] == "open"){
- $section = "status";
- }
- if ($section == "status" && strtoupper($element[tag]) == "SUCCESS") {
- $result = "Success.";
- $error = false;
- }
- }
-}
-
-
-if ($error) {
- $e = new mb_exception('WFS error at: host: '.$host.' port: '.$port.' filter: '.$_REQUEST["filter"].' - error message: '.$result);
-}
-else {
- $e = new mb_exception('WFS successfull host: '.$host.' port: '.$port.' filter: '.$_REQUEST["filter"]);
-}
-*/
-
-$e = new mb_exception('WFS-T: '.$filter);
-
-echo "{";
-if (stristr($data, "success") !== false) {
- $response = "success";
- if (ereg("^.*ogc:FeatureId fid=\"(.+)\"/>.*$", $data)) {
- $fid = ereg_replace("^.*ogc:FeatureId fid=\"(.+)\"/>.*$", "\\1", $data);
- echo "\"fid\":\"".$fid."\",";
- }
- echo "\"success confirmation\":\"".str_replace("\"", "'", str_replace("\n", "", str_replace("\r", "", $data)))."\",";
-}
-else {
- $response = "error";
- echo "\"error message\":\"".addslashes($data)."\",";
-}
-echo "\"response\":\"".$response."\"}";
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/extensions/geom2wfst.php (from rev 2140, branches/2.4.5/http/extensions/geom2wfst.php)
===================================================================
--- branches/2.4.5_rc1/http/extensions/geom2wfst.php (rev 0)
+++ branches/2.4.5_rc1/http/extensions/geom2wfst.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,121 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/geom2wfst.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+
+
+function sepNameSpace($s){
+ $c = strpos($s,":");
+ if($c>0) return substr($s,$c+1);
+ return $s;
+}
+function sendToHost($host,$port,$method,$path,$data){
+ $buf = '';
+ if (empty($method)) $method = 'POST';
+ $method = strtoupper($method);
+ $fp = fsockopen($host, $port);
+ fputs($fp, "$method $path HTTP/1.1\r\n");
+ fputs($fp, "Host: $host\r\n");
+ fputs($fp,"Content-type: application/xml\r\n");
+ fputs($fp, "Content-length: " . strlen($data) . "\r\n");
+ fputs($fp, "Connection: close\r\n\r\n");
+ if ($method == 'POST') fputs($fp, $data);
+ while (!feof($fp)) $buf .= fgets($fp,4096);
+ fclose($fp);
+ return $buf;
+}
+
+$result="";
+$error = false;
+$arURL = parse_url($_REQUEST["url"]);
+$host = $arURL["host"];
+$port = $arURL["port"];
+if($port == '') $port = 80;
+
+$path = $arURL["path"];
+$method = "POST";
+$filter = stripslashes($_REQUEST["filter"]);
+
+$data = sendToHost($host,$port,$method,html_entity_decode($path),$filter);
+
+$data = eregi_replace("^[^<]*", "", $data);
+$data = eregi_replace("[^>]*$", "", $data);
+
+/*
+$parser = xml_parser_create(CHARSET);
+xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
+xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,CHARSET);
+xml_parse_into_struct($parser,$data,$values,$tags);
+$code = xml_get_error_code ($parser);
+if ($code) {
+ $result = "Error " . $code . " (" . xml_error_string($code) . ")";
+ $error = true;
+}
+xml_parser_free($parser);
+if (!$error) {
+ $section;
+ foreach ($values as $element) {
+ $element[tag] = sepNameSpace($element[tag]);
+ if(strtoupper($element[tag]) == "SERVICEEXCEPTIONREPORT" && $element[type] == "open"){
+ $section = "serviceexceptionreport";
+ }
+ if ($section == "serviceexceptionreport" && strtoupper($element[tag]) == "SERVICEEXCEPTION") {
+// $result = $element[value];
+ $result = "An error occured.";
+ $error = true;
+ }
+ if(strtoupper($element[tag]) == "STATUS" && $element[type] == "open"){
+ $section = "status";
+ }
+ if ($section == "status" && strtoupper($element[tag]) == "SUCCESS") {
+ $result = "Success.";
+ $error = false;
+ }
+ }
+}
+
+
+if ($error) {
+ $e = new mb_exception('WFS error at: host: '.$host.' port: '.$port.' filter: '.$_REQUEST["filter"].' - error message: '.$result);
+}
+else {
+ $e = new mb_exception('WFS successfull host: '.$host.' port: '.$port.' filter: '.$_REQUEST["filter"]);
+}
+*/
+
+$e = new mb_exception('WFS-T: '.$filter);
+
+echo "{";
+if (stristr($data, "success") !== false) {
+ $response = "success";
+ if (ereg("^.*ogc:FeatureId fid=\"(.+)\"/>.*$", $data)) {
+ $fid = ereg_replace("^.*ogc:FeatureId fid=\"(.+)\"/>.*$", "\\1", $data);
+ echo "\"fid\":\"".$fid."\",";
+ }
+ echo "\"success confirmation\":\"".str_replace("\"", "'", str_replace("\n", "", str_replace("\r", "", $data)))."\",";
+}
+else {
+ $response = "error";
+ echo "\"error message\":\"".addslashes($data)."\",";
+}
+echo "\"response\":\"".$response."\"}";
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/extensions/markResult.php
===================================================================
--- branches/2.4.5/http/extensions/markResult.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/extensions/markResult.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,62 +0,0 @@
-<?PHP
-# $Id$
-# http://www.mapbender.org/index.php/markResult.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/*
-* following parameters are required:
-* $width, $height -> dimensions of the image
-* $color -> Color of the polygon/line, commasaparated RGB-values
-*
-*/
-import_request_variables("PG");
-$tmpx = array();
-$tmpy = array();
-$x = array();
-$y = array();
-$tmpx = explode(":", $_REQUEST["x"]);
-$tmpy = explode(":", $_REQUEST["y"]);
-for($i=0; $i<count($tmpx); $i++){
- $x[$i] = array();
- $y[$i] = array();
- $x[$i] = explode(",",$tmpx[$i]);
- $y[$i] = explode(",",$tmpy[$i]);
-}
-
-if(!$_REQUEST["color"]){ $color = "255,0,0"; }
-$myCol = split(",", $color);
-
-$image = imagecreate($width,$height);
-
-$transparent = ImageColorAllocate($image,155,155,155);
-ImageFilledRectangle($image,0,0,$width,$height,$transparent);
-ImageColorTransparent ($image , $transparent);
-
-
-$red = imagecolorallocate($image,$myCol[0],$myCol[1],$myCol[2]);
-for($j=0; $j<count($x); $j++){
- for($i=0; $i < (count($x[$j])-1); $i++){
- imageline($image,$x[$j][$i],$y[$j][$i],$x[$j][$i+1],$y[$j][$i+1],$red);
- imageline($image,$x[$j][$i]+1,$y[$j][$i],$x[$j][$i+1]+1,$y[$j][$i+1],$red);
- imageline($image,$x[$j][$i]-1,$y[$j][$i],$x[$j][$i+1]-1,$y[$j][$i+1],$red);
- imageline($image,$x[$j][$i],$y[$j][$i]+1,$x[$j][$i+1],$y[$j][$i+1]+1,$red);
- imageline($image,$x[$j][$i],$y[$j][$i]-1,$x[$j][$i+1],$y[$j][$i+1]-1,$red);
- }
-}
-header("Content-Type: image/png");
-imagepng($image);
-?>
Copied: branches/2.4.5_rc1/http/extensions/markResult.php (from rev 2140, branches/2.4.5/http/extensions/markResult.php)
===================================================================
--- branches/2.4.5_rc1/http/extensions/markResult.php (rev 0)
+++ branches/2.4.5_rc1/http/extensions/markResult.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,64 @@
+<?PHP
+# $Id$
+# http://www.mapbender.org/index.php/markResult.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/*
+* following parameters are required:
+* $width, $height -> dimensions of the image
+* $color -> Color of the polygon/line, commasaparated RGB-values
+*
+*/
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+import_request_variables("PG");
+$tmpx = array();
+$tmpy = array();
+$x = array();
+$y = array();
+$tmpx = explode(":", $_REQUEST["x"]);
+$tmpy = explode(":", $_REQUEST["y"]);
+for($i=0; $i<count($tmpx); $i++){
+ $x[$i] = array();
+ $y[$i] = array();
+ $x[$i] = explode(",",$tmpx[$i]);
+ $y[$i] = explode(",",$tmpy[$i]);
+}
+
+if(!$_REQUEST["color"]){ $color = "255,0,0"; }
+$myCol = split(",", $color);
+
+$image = imagecreate($width,$height);
+
+$transparent = ImageColorAllocate($image,155,155,155);
+ImageFilledRectangle($image,0,0,$width,$height,$transparent);
+ImageColorTransparent ($image , $transparent);
+
+
+$red = imagecolorallocate($image,$myCol[0],$myCol[1],$myCol[2]);
+for($j=0; $j<count($x); $j++){
+ for($i=0; $i < (count($x[$j])-1); $i++){
+ imageline($image,$x[$j][$i],$y[$j][$i],$x[$j][$i+1],$y[$j][$i+1],$red);
+ imageline($image,$x[$j][$i]+1,$y[$j][$i],$x[$j][$i+1]+1,$y[$j][$i+1],$red);
+ imageline($image,$x[$j][$i]-1,$y[$j][$i],$x[$j][$i+1]-1,$y[$j][$i+1],$red);
+ imageline($image,$x[$j][$i],$y[$j][$i]+1,$x[$j][$i+1],$y[$j][$i+1]+1,$red);
+ imageline($image,$x[$j][$i],$y[$j][$i]-1,$x[$j][$i+1],$y[$j][$i+1]-1,$red);
+ }
+}
+header("Content-Type: image/png");
+imagepng($image);
+?>
Deleted: branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js
===================================================================
--- branches/2.4.5/http/extensions/wz_jsgraphics.js 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,1107 +0,0 @@
-/* This notice must be untouched at all times.
-
-wz_jsgraphics.js v. 3.03
-The latest version is available at
-http://www.walterzorn.com
-or http://www.devira.com
-or http://www.walterzorn.de
-
-Copyright (c) 2002-2004 Walter Zorn. All rights reserved.
-Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
-Last modified: 28. 1. 2008
-
-Performance optimizations for Internet Explorer
-by Thomas Frank and John Holdsworth.
-fillPolygon method implemented by Matthieu Haller.
-
-High Performance JavaScript Graphics Library.
-Provides methods
-- to draw lines, rectangles, ellipses, polygons
- with specifiable line thickness,
-- to fill rectangles, polygons, ellipses and arcs
-- to draw text.
-NOTE: Operations, functions and branching have rather been optimized
-to efficiency and speed than to shortness of source code.
-
-LICENSE: LGPL
-
-This library is free software; you can redistribute it and/or
-modify it under the terms of the GNU Lesser General Public
-License (LGPL) as published by the Free Software Foundation; either
-version 2.1 of the License, or (at your option) any later version.
-
-This library is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-Lesser General Public License for more details.
-
-You should have received a copy of the GNU Lesser General Public
-License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
-or see http://www.gnu.org/copyleft/lesser.html
-*/
-
-
-var jg_ok, jg_ie, jg_fast, jg_dom, jg_moz;
-
-
-function _chkDHTM(x, i)
-{
- x = document.body || null;
- jg_ie = x && typeof x.insertAdjacentHTML != "undefined" && document.createElement;
- jg_dom = (x && !jg_ie &&
- typeof x.appendChild != "undefined" &&
- typeof document.createRange != "undefined" &&
- typeof (i = document.createRange()).setStartBefore != "undefined" &&
- typeof i.createContextualFragment != "undefined");
- jg_fast = jg_ie && document.all && !window.opera;
- jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
- jg_ok = !!(jg_ie || jg_dom);
-}
-
-function _pntCnvDom()
-{
- var x = this.wnd.document.createRange();
- x.setStartBefore(this.cnv);
- x = x.createContextualFragment(jg_fast? this._htmRpc() : this.htm);
- if(this.cnv) this.cnv.appendChild(x);
- this.htm = "";
-}
-
-function _pntCnvIe()
-{
- if(this.cnv) this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this._htmRpc() : this.htm);
- this.htm = "";
-}
-
-function _pntDoc()
-{
- this.wnd.document.write(jg_fast? this._htmRpc() : this.htm);
- this.htm = '';
-}
-
-function _pntN()
-{
- ;
-}
-
-function _mkDiv(x, y, w, h)
-{
- this.htm += '<div style="position:absolute;'+
- 'left:' + x + 'px;'+
- 'top:' + y + 'px;'+
- 'width:' + w + 'px;'+
- 'height:' + h + 'px;'+
- 'clip:rect(0,'+w+'px,'+h+'px,0);'+
- 'background-color:' + this.color +
- (!jg_moz? ';overflow:hidden' : '')+
- ';"><\/div>';
-}
-
-function _mkDivIe(x, y, w, h)
-{
- this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
-}
-
-function _mkDivPrt(x, y, w, h)
-{
- this.htm += '<div style="position:absolute;'+
- 'border-left:' + w + 'px solid ' + this.color + ';'+
- 'left:' + x + 'px;'+
- 'top:' + y + 'px;'+
- 'width:0px;'+
- 'height:' + h + 'px;'+
- 'clip:rect(0,'+w+'px,'+h+'px,0);'+
- 'background-color:' + this.color +
- (!jg_moz? ';overflow:hidden' : '')+
- ';"><\/div>';
-}
-
-var _regex = /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
-function _htmRpc()
-{
- return this.htm.replace(
- _regex,
- '<div style="overflow:hidden;position:absolute;background-color:'+
- '$1;left:$2;top:$3;width:$4;height:$5"></div>\n');
-}
-
-function _htmPrtRpc()
-{
- return this.htm.replace(
- _regex,
- '<div style="overflow:hidden;position:absolute;background-color:'+
- '$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');
-}
-
-function _mkLin(x1, y1, x2, y2)
-{
- if(x1 > x2)
- {
- var _x2 = x2;
- var _y2 = y2;
- x2 = x1;
- y2 = y1;
- x1 = _x2;
- y1 = _y2;
- }
- var dx = x2-x1, dy = Math.abs(y2-y1),
- x = x1, y = y1,
- yIncr = (y1 > y2)? -1 : 1;
-
- if(dx >= dy)
- {
- var pr = dy<<1,
- pru = pr - (dx<<1),
- p = pr-dx,
- ox = x;
- while(dx > 0)
- {--dx;
- ++x;
- if(p > 0)
- {
- this._mkDiv(ox, y, x-ox, 1);
- y += yIncr;
- p += pru;
- ox = x;
- }
- else p += pr;
- }
- this._mkDiv(ox, y, x2-ox+1, 1);
- }
-
- else
- {
- var pr = dx<<1,
- pru = pr - (dy<<1),
- p = pr-dy,
- oy = y;
- if(y2 <= y1)
- {
- while(dy > 0)
- {--dy;
- if(p > 0)
- {
- this._mkDiv(x++, y, 1, oy-y+1);
- y += yIncr;
- p += pru;
- oy = y;
- }
- else
- {
- y += yIncr;
- p += pr;
- }
- }
- this._mkDiv(x2, y2, 1, oy-y2+1);
- }
- else
- {
- while(dy > 0)
- {--dy;
- y += yIncr;
- if(p > 0)
- {
- this._mkDiv(x++, oy, 1, y-oy);
- p += pru;
- oy = y;
- }
- else p += pr;
- }
- this._mkDiv(x2, oy, 1, y2-oy+1);
- }
- }
-}
-
-function _mkLin2D(x1, y1, x2, y2)
-{
- if(x1 > x2)
- {
- var _x2 = x2;
- var _y2 = y2;
- x2 = x1;
- y2 = y1;
- x1 = _x2;
- y1 = _y2;
- }
- var dx = x2-x1, dy = Math.abs(y2-y1),
- x = x1, y = y1,
- yIncr = (y1 > y2)? -1 : 1;
-
- var s = this.stroke;
- if(dx >= dy)
- {
- if(dx > 0 && s-3 > 0)
- {
- var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
- _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
- }
- else var _s = s;
- var ad = Math.ceil(s/2);
-
- var pr = dy<<1,
- pru = pr - (dx<<1),
- p = pr-dx,
- ox = x;
- while(dx > 0)
- {--dx;
- ++x;
- if(p > 0)
- {
- this._mkDiv(ox, y, x-ox+ad, _s);
- y += yIncr;
- p += pru;
- ox = x;
- }
- else p += pr;
- }
- this._mkDiv(ox, y, x2-ox+ad+1, _s);
- }
-
- else
- {
- if(s-3 > 0)
- {
- var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
- _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
- }
- else var _s = s;
- var ad = Math.round(s/2);
-
- var pr = dx<<1,
- pru = pr - (dy<<1),
- p = pr-dy,
- oy = y;
- if(y2 <= y1)
- {
- ++ad;
- while(dy > 0)
- {--dy;
- if(p > 0)
- {
- this._mkDiv(x++, y, _s, oy-y+ad);
- y += yIncr;
- p += pru;
- oy = y;
- }
- else
- {
- y += yIncr;
- p += pr;
- }
- }
- this._mkDiv(x2, y2, _s, oy-y2+ad);
- }
- else
- {
- while(dy > 0)
- {--dy;
- y += yIncr;
- if(p > 0)
- {
- this._mkDiv(x++, oy, _s, y-oy+ad);
- p += pru;
- oy = y;
- }
- else p += pr;
- }
- this._mkDiv(x2, oy, _s, y2-oy+ad+1);
- }
- }
-}
-
-function _mkLinDott(x1, y1, x2, y2)
-{
- if(x1 > x2)
- {
- var _x2 = x2;
- var _y2 = y2;
- x2 = x1;
- y2 = y1;
- x1 = _x2;
- y1 = _y2;
- }
- var dx = x2-x1, dy = Math.abs(y2-y1),
- x = x1, y = y1,
- yIncr = (y1 > y2)? -1 : 1,
- drw = true;
- if(dx >= dy)
- {
- var pr = dy<<1,
- pru = pr - (dx<<1),
- p = pr-dx;
- while(dx > 0)
- {--dx;
- if(drw) this._mkDiv(x, y, 1, 1);
- drw = !drw;
- if(p > 0)
- {
- y += yIncr;
- p += pru;
- }
- else p += pr;
- ++x;
- }
- }
- else
- {
- var pr = dx<<1,
- pru = pr - (dy<<1),
- p = pr-dy;
- while(dy > 0)
- {--dy;
- if(drw) this._mkDiv(x, y, 1, 1);
- drw = !drw;
- y += yIncr;
- if(p > 0)
- {
- ++x;
- p += pru;
- }
- else p += pr;
- }
- }
- if(drw) this._mkDiv(x, y, 1, 1);
-}
-
-function _mkOv(left, top, width, height)
-{
- var a = (++width)>>1, b = (++height)>>1,
- wod = width&1, hod = height&1,
- cx = left+a, cy = top+b,
- x = 0, y = b,
- ox = 0, oy = b,
- aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
- st = (aa2>>1)*(1-(b<<1)) + bb2,
- tt = (bb2>>1) - aa2*((b<<1)-1),
- w, h;
- while(y > 0)
- {
- if(st < 0)
- {
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0)
- {
- st += bb2*((x<<1)+3) - aa4*(y-1);
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- w = x-ox;
- h = oy-y;
- if((w&2) && (h&2))
- {
- this._mkOvQds(cx, cy, x-2, y+2, 1, 1, wod, hod);
- this._mkOvQds(cx, cy, x-1, y+1, 1, 1, wod, hod);
- }
- else this._mkOvQds(cx, cy, x-1, oy, w, h, wod, hod);
- ox = x;
- oy = y;
- }
- else
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- }
- }
- w = a-ox+1;
- h = (oy<<1)+hod;
- y = cy-oy;
- this._mkDiv(cx-a, y, w, h);
- this._mkDiv(cx+ox+wod-1, y, w, h);
-}
-
-function _mkOv2D(left, top, width, height)
-{
- var s = this.stroke;
- width += s+1;
- height += s+1;
- var a = width>>1, b = height>>1,
- wod = width&1, hod = height&1,
- cx = left+a, cy = top+b,
- x = 0, y = b,
- aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
- st = (aa2>>1)*(1-(b<<1)) + bb2,
- tt = (bb2>>1) - aa2*((b<<1)-1);
-
- if(s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
- {
- var ox = 0, oy = b,
- w, h,
- pxw;
- while(y > 0)
- {
- if(st < 0)
- {
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0)
- {
- st += bb2*((x<<1)+3) - aa4*(y-1);
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- w = x-ox;
- h = oy-y;
-
- if(w-1)
- {
- pxw = w+1+(s&1);
- h = s;
- }
- else if(h-1)
- {
- pxw = s;
- h += 1+(s&1);
- }
- else pxw = h = s;
- this._mkOvQds(cx, cy, x-1, oy, pxw, h, wod, hod);
- ox = x;
- oy = y;
- }
- else
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- }
- }
- this._mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
- this._mkDiv(cx+a+wod-s, cy-oy, s, (oy<<1)+hod);
- }
-
- else
- {
- var _a = (width-(s<<1))>>1,
- _b = (height-(s<<1))>>1,
- _x = 0, _y = _b,
- _aa2 = (_a*_a)<<1, _aa4 = _aa2<<1, _bb2 = (_b*_b)<<1, _bb4 = _bb2<<1,
- _st = (_aa2>>1)*(1-(_b<<1)) + _bb2,
- _tt = (_bb2>>1) - _aa2*((_b<<1)-1),
-
- pxl = new Array(),
- pxt = new Array(),
- _pxb = new Array();
- pxl[0] = 0;
- pxt[0] = b;
- _pxb[0] = _b-1;
- while(y > 0)
- {
- if(st < 0)
- {
- pxl[pxl.length] = x;
- pxt[pxt.length] = y;
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0)
- {
- pxl[pxl.length] = x;
- st += bb2*((x<<1)+3) - aa4*(y-1);
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- pxt[pxt.length] = y;
- }
- else
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- }
-
- if(_y > 0)
- {
- if(_st < 0)
- {
- _st += _bb2*((_x<<1)+3);
- _tt += _bb4*(++_x);
- _pxb[_pxb.length] = _y-1;
- }
- else if(_tt < 0)
- {
- _st += _bb2*((_x<<1)+3) - _aa4*(_y-1);
- _tt += _bb4*(++_x) - _aa2*(((_y--)<<1)-3);
- _pxb[_pxb.length] = _y-1;
- }
- else
- {
- _tt -= _aa2*((_y<<1)-3);
- _st -= _aa4*(--_y);
- _pxb[_pxb.length-1]--;
- }
- }
- }
-
- var ox = -wod, oy = b,
- _oy = _pxb[0],
- l = pxl.length,
- w, h;
- for(var i = 0; i < l; i++)
- {
- if(typeof _pxb[i] != "undefined")
- {
- if(_pxb[i] < _oy || pxt[i] < oy)
- {
- x = pxl[i];
- this._mkOvQds(cx, cy, x, oy, x-ox, oy-_oy, wod, hod);
- ox = x;
- oy = pxt[i];
- _oy = _pxb[i];
- }
- }
- else
- {
- x = pxl[i];
- this._mkDiv(cx-x, cy-oy, 1, (oy<<1)+hod);
- this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
- ox = x;
- oy = pxt[i];
- }
- }
- this._mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
- this._mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
- }
-}
-
-function _mkOvDott(left, top, width, height)
-{
- var a = (++width)>>1, b = (++height)>>1,
- wod = width&1, hod = height&1, hodu = hod^1,
- cx = left+a, cy = top+b,
- x = 0, y = b,
- aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
- st = (aa2>>1)*(1-(b<<1)) + bb2,
- tt = (bb2>>1) - aa2*((b<<1)-1),
- drw = true;
- while(y > 0)
- {
- if(st < 0)
- {
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0)
- {
- st += bb2*((x<<1)+3) - aa4*(y-1);
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- }
- else
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- }
- if(drw && y >= hodu) this._mkOvQds(cx, cy, x, y, 1, 1, wod, hod);
- drw = !drw;
- }
-}
-
-function _mkRect(x, y, w, h)
-{
- var s = this.stroke;
- this._mkDiv(x, y, w, s);
- this._mkDiv(x+w, y, s, h);
- this._mkDiv(x, y+h, w+s, s);
- this._mkDiv(x, y+s, s, h-s);
-}
-
-function _mkRectDott(x, y, w, h)
-{
- this.drawLine(x, y, x+w, y);
- this.drawLine(x+w, y, x+w, y+h);
- this.drawLine(x, y+h, x+w, y+h);
- this.drawLine(x, y, x, y+h);
-}
-
-function jsgFont()
-{
- this.PLAIN = 'font-weight:normal;';
- this.BOLD = 'font-weight:bold;';
- this.ITALIC = 'font-style:italic;';
- this.ITALIC_BOLD = this.ITALIC + this.BOLD;
- this.BOLD_ITALIC = this.ITALIC_BOLD;
-}
-var Font = new jsgFont();
-
-function jsgStroke()
-{
- this.DOTTED = -1;
-}
-var Stroke = new jsgStroke();
-
-function jsGraphics(cnv, wnd)
-{
- this.setColor = function(x)
- {
- this.color = x.toLowerCase();
- };
-
- this.setStroke = function(x)
- {
- this.stroke = x;
- if(!(x+1))
- {
- this.drawLine = _mkLinDott;
- this._mkOv = _mkOvDott;
- this.drawRect = _mkRectDott;
- }
- else if(x-1 > 0)
- {
- this.drawLine = _mkLin2D;
- this._mkOv = _mkOv2D;
- this.drawRect = _mkRect;
- }
- else
- {
- this.drawLine = _mkLin;
- this._mkOv = _mkOv;
- this.drawRect = _mkRect;
- }
- };
-
- this.setPrintable = function(arg)
- {
- this.printable = arg;
- if(jg_fast)
- {
- this._mkDiv = _mkDivIe;
- this._htmRpc = arg? _htmPrtRpc : _htmRpc;
- }
- else this._mkDiv = arg? _mkDivPrt : _mkDiv;
- };
-
- this.setFont = function(fam, sz, sty)
- {
- this.ftFam = fam;
- this.ftSz = sz;
- this.ftSty = sty || Font.PLAIN;
- };
-
- this.drawPolyline = this.drawPolyLine = function(x, y)
- {
- for (var i=x.length - 1; i;)
- {--i;
- this.drawLine(x[i], y[i], x[i+1], y[i+1]);
- }
- };
-
- this.fillRect = function(x, y, w, h)
- {
- this._mkDiv(x, y, w, h);
- };
-
- this.drawPolygon = function(x, y)
- {
- this.drawPolyline(x, y);
- this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
- };
-
- this.drawEllipse = this.drawOval = function(x, y, w, h)
- {
- this._mkOv(x, y, w, h);
- };
-
- this.fillEllipse = this.fillOval = function(left, top, w, h)
- {
- var a = w>>1, b = h>>1,
- wod = w&1, hod = h&1,
- cx = left+a, cy = top+b,
- x = 0, y = b, oy = b,
- aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
- st = (aa2>>1)*(1-(b<<1)) + bb2,
- tt = (bb2>>1) - aa2*((b<<1)-1),
- xl, dw, dh;
- if(w) while(y > 0)
- {
- if(st < 0)
- {
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0)
- {
- st += bb2*((x<<1)+3) - aa4*(y-1);
- xl = cx-x;
- dw = (x<<1)+wod;
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- dh = oy-y;
- this._mkDiv(xl, cy-oy, dw, dh);
- this._mkDiv(xl, cy+y+hod, dw, dh);
- oy = y;
- }
- else
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- }
- }
- this._mkDiv(cx-a, cy-oy, w, (oy<<1)+hod);
- };
-
- this.fillArc = function(iL, iT, iW, iH, fAngA, fAngZ)
- {
- var a = iW>>1, b = iH>>1,
- iOdds = (iW&1) | ((iH&1) << 16),
- cx = iL+a, cy = iT+b,
- x = 0, y = b, ox = x, oy = y,
- aa2 = (a*a)<<1, aa4 = aa2<<1, bb2 = (b*b)<<1, bb4 = bb2<<1,
- st = (aa2>>1)*(1-(b<<1)) + bb2,
- tt = (bb2>>1) - aa2*((b<<1)-1),
- // Vars for radial boundary lines
- xEndA, yEndA, xEndZ, yEndZ,
- iSects = (1 << (Math.floor((fAngA %= 360.0)/180.0) << 3))
- | (2 << (Math.floor((fAngZ %= 360.0)/180.0) << 3))
- | ((fAngA >= fAngZ) << 16),
- aBndA = new Array(b+1), aBndZ = new Array(b+1);
-
- // Set up radial boundary lines
- fAngA *= Math.PI/180.0;
- fAngZ *= Math.PI/180.0;
- xEndA = cx+Math.round(a*Math.cos(fAngA));
- yEndA = cy+Math.round(-b*Math.sin(fAngA));
- _mkLinVirt(aBndA, cx, cy, xEndA, yEndA);
- xEndZ = cx+Math.round(a*Math.cos(fAngZ));
- yEndZ = cy+Math.round(-b*Math.sin(fAngZ));
- _mkLinVirt(aBndZ, cx, cy, xEndZ, yEndZ);
-
- while(y > 0)
- {
- if(st < 0) // Advance x
- {
- st += bb2*((x<<1)+3);
- tt += bb4*(++x);
- }
- else if(tt < 0) // Advance x and y
- {
- st += bb2*((x<<1)+3) - aa4*(y-1);
- ox = x;
- tt += bb4*(++x) - aa2*(((y--)<<1)-3);
- this._mkArcDiv(ox, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
- oy = y;
- }
- else // Advance y
- {
- tt -= aa2*((y<<1)-3);
- st -= aa4*(--y);
- if(y && (aBndA[y] != aBndA[y-1] || aBndZ[y] != aBndZ[y-1]))
- {
- this._mkArcDiv(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
- ox = x;
- oy = y;
- }
- }
- }
- this._mkArcDiv(x, 0, oy, cx, cy, iOdds, aBndA, aBndZ, iSects);
- if(iOdds >> 16) // Odd height
- {
- if(iSects >> 16) // Start-angle > end-angle
- {
- var xl = (yEndA <= cy || yEndZ > cy)? (cx - x) : cx;
- this._mkDiv(xl, cy, x + cx - xl + (iOdds & 0xffff), 1);
- }
- else if((iSects & 0x01) && yEndZ > cy)
- this._mkDiv(cx - x, cy, x, 1);
- }
- };
-
-/* fillPolygon method, implemented by Matthieu Haller.
-This javascript function is an adaptation of the gdImageFilledPolygon for Walter Zorn lib.
-C source of GD 1.8.4 found at http://www.boutell.com/gd/
-
-THANKS to Kirsten Schulz for the polygon fixes!
-
-The intersection finding technique of this code could be improved
-by remembering the previous intertersection, and by using the slope.
-That could help to adjust intersections to produce a nice
-interior_extrema. */
- this.fillPolygon = function(array_x, array_y)
- {
- var i;
- var y;
- var miny, maxy;
- var x1, y1;
- var x2, y2;
- var ind1, ind2;
- var ints;
-
- var n = array_x.length;
- if(!n) return;
-
- miny = array_y[0];
- maxy = array_y[0];
- for(i = 1; i < n; i++)
- {
- if(array_y[i] < miny)
- miny = array_y[i];
-
- if(array_y[i] > maxy)
- maxy = array_y[i];
- }
- for(y = miny; y <= maxy; y++)
- {
- var polyInts = new Array();
- ints = 0;
- for(i = 0; i < n; i++)
- {
- if(!i)
- {
- ind1 = n-1;
- ind2 = 0;
- }
- else
- {
- ind1 = i-1;
- ind2 = i;
- }
- y1 = array_y[ind1];
- y2 = array_y[ind2];
- if(y1 < y2)
- {
- x1 = array_x[ind1];
- x2 = array_x[ind2];
- }
- else if(y1 > y2)
- {
- y2 = array_y[ind1];
- y1 = array_y[ind2];
- x2 = array_x[ind1];
- x1 = array_x[ind2];
- }
- else continue;
-
- // Modified 11. 2. 2004 Walter Zorn
- if((y >= y1) && (y < y2))
- polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
-
- else if((y == maxy) && (y > y1) && (y <= y2))
- polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
- }
- polyInts.sort(_CompInt);
- for(i = 0; i < ints; i+=2)
- this._mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
- }
- };
-
- this.drawString = function(txt, x, y)
- {
- this.htm += '<div style="position:absolute;white-space:nowrap;'+
- 'left:' + x + 'px;'+
- 'top:' + y + 'px;'+
- 'font-family:' + this.ftFam + ';'+
- 'font-size:' + this.ftSz + ';'+
- 'color:' + this.color + ';' + this.ftSty + '">'+
- txt +
- '<\/div>';
- };
-
-/* drawStringRect() added by Rick Blommers.
-Allows to specify the size of the text rectangle and to align the
-text both horizontally (e.g. right) and vertically within that rectangle */
- this.drawStringRect = function(txt, x, y, width, halign)
- {
- this.htm += '<div style="position:absolute;overflow:hidden;'+
- 'left:' + x + 'px;'+
- 'top:' + y + 'px;'+
- 'width:'+width +'px;'+
- 'text-align:'+halign+';'+
- 'font-family:' + this.ftFam + ';'+
- 'font-size:' + this.ftSz + ';'+
- 'color:' + this.color + ';' + this.ftSty + '">'+
- txt +
- '<\/div>';
- };
-
- this.drawImage = function(imgSrc, x, y, w, h, a)
- {
- this.htm += '<div style="position:absolute;'+
- 'left:' + x + 'px;'+
- 'top:' + y + 'px;'+
- // w (width) and h (height) arguments are now optional.
- // Added by Mahmut Keygubatli, 14.1.2008
- (w? ('width:' + w + 'px;') : '') +
- (h? ('height:' + h + 'px;'):'')+'">'+
- '<img src="' + imgSrc +'"'+ (w ? (' width="' + w + '"'):'')+ (h ? (' height="' + h + '"'):'') + (a? (' '+a) : '') + '>'+
- '<\/div>';
- };
-
- this.clear = function()
- {
- this.htm = "";
- if(this.cnv) this.cnv.innerHTML = "";
- };
-
- this._mkOvQds = function(cx, cy, x, y, w, h, wod, hod)
- {
- var xl = cx - x, xr = cx + x + wod - w, yt = cy - y, yb = cy + y + hod - h;
- if(xr > xl+w)
- {
- this._mkDiv(xr, yt, w, h);
- this._mkDiv(xr, yb, w, h);
- }
- else
- w = xr - xl + w;
- this._mkDiv(xl, yt, w, h);
- this._mkDiv(xl, yb, w, h);
- };
-
- this._mkArcDiv = function(x, y, oy, cx, cy, iOdds, aBndA, aBndZ, iSects)
- {
- var xrDef = cx + x + (iOdds & 0xffff), y2, h = oy - y, xl, xr, w;
-
- if(!h) h = 1;
- x = cx - x;
-
- if(iSects & 0xff0000) // Start-angle > end-angle
- {
- y2 = cy - y - h;
- if(iSects & 0x00ff)
- {
- if(iSects & 0x02)
- {
- xl = Math.max(x, aBndZ[y]);
- w = xrDef - xl;
- if(w > 0) this._mkDiv(xl, y2, w, h);
- }
- if(iSects & 0x01)
- {
- xr = Math.min(xrDef, aBndA[y]);
- w = xr - x;
- if(w > 0) this._mkDiv(x, y2, w, h);
- }
- }
- else
- this._mkDiv(x, y2, xrDef - x, h);
- y2 = cy + y + (iOdds >> 16);
- if(iSects & 0xff00)
- {
- if(iSects & 0x0100)
- {
- xl = Math.max(x, aBndA[y]);
- w = xrDef - xl;
- if(w > 0) this._mkDiv(xl, y2, w, h);
- }
- if(iSects & 0x0200)
- {
- xr = Math.min(xrDef, aBndZ[y]);
- w = xr - x;
- if(w > 0) this._mkDiv(x, y2, w, h);
- }
- }
- else
- this._mkDiv(x, y2, xrDef - x, h);
- }
- else
- {
- if(iSects & 0x00ff)
- {
- if(iSects & 0x02)
- xl = Math.max(x, aBndZ[y]);
- else
- xl = x;
- if(iSects & 0x01)
- xr = Math.min(xrDef, aBndA[y]);
- else
- xr = xrDef;
- y2 = cy - y - h;
- w = xr - xl;
- if(w > 0) this._mkDiv(xl, y2, w, h);
- }
- if(iSects & 0xff00)
- {
- if(iSects & 0x0100)
- xl = Math.max(x, aBndA[y]);
- else
- xl = x;
- if(iSects & 0x0200)
- xr = Math.min(xrDef, aBndZ[y]);
- else
- xr = xrDef;
- y2 = cy + y + (iOdds >> 16);
- w = xr - xl;
- if(w > 0) this._mkDiv(xl, y2, w, h);
- }
- }
- };
-
- this.setStroke(1);
- this.setFont("verdana,geneva,helvetica,sans-serif", "12px", Font.PLAIN);
- this.color = "#000000";
- this.htm = "";
- this.wnd = wnd || window;
-
- if(!jg_ok) _chkDHTM();
- if(jg_ok)
- {
- if(cnv)
- {
- if(typeof(cnv) == "string")
- this.cont = document.all? (this.wnd.document.all[cnv] || null)
- : document.getElementById? (this.wnd.document.getElementById(cnv) || null)
- : null;
- else if(cnv == window.document)
- this.cont = document.getElementsByTagName("body")[0];
- // If cnv is a direct reference to a canvas DOM node
- // (option suggested by Andreas Luleich)
- else this.cont = cnv;
- // Create new canvas inside container DIV. Thus the drawing and clearing
- // methods won't interfere with the container's inner html.
- // Solution suggested by Vladimir.
- this.cnv = this.wnd.document.createElement("div");
- this.cnv.style.fontSize=0;
- this.cont.appendChild(this.cnv);
- this.paint = jg_dom? _pntCnvDom : _pntCnvIe;
- }
- else
- this.paint = _pntDoc;
- }
- else
- this.paint = _pntN;
-
- this.setPrintable(false);
-}
-
-function _mkLinVirt(aLin, x1, y1, x2, y2)
-{
- var dx = Math.abs(x2-x1), dy = Math.abs(y2-y1),
- x = x1, y = y1,
- xIncr = (x1 > x2)? -1 : 1,
- yIncr = (y1 > y2)? -1 : 1,
- p,
- i = 0;
- if(dx >= dy)
- {
- var pr = dy<<1,
- pru = pr - (dx<<1);
- p = pr-dx;
- while(dx > 0)
- {--dx;
- if(p > 0) // Increment y
- {
- aLin[i++] = x;
- y += yIncr;
- p += pru;
- }
- else p += pr;
- x += xIncr;
- }
- }
- else
- {
- var pr = dx<<1,
- pru = pr - (dy<<1);
- p = pr-dy;
- while(dy > 0)
- {--dy;
- y += yIncr;
- aLin[i++] = x;
- if(p > 0) // Increment x
- {
- x += xIncr;
- p += pru;
- }
- else p += pr;
- }
- }
- for(var len = aLin.length, i = len-i; i;)
- aLin[len-(i--)] = x;
-};
-
-function _CompInt(x, y)
-{
- return(x - y);
-}
-
Copied: branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js (from rev 2185, branches/2.4.5/http/extensions/wz_jsgraphics.js)
===================================================================
--- branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js (rev 0)
+++ branches/2.4.5_rc1/http/extensions/wz_jsgraphics.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,938 @@
+/* This notice must be untouched at all times.
+
+wz_jsgraphics.js v. 2.3
+The latest version is available at
+http://www.walterzorn.com
+or http://www.devira.com
+or http://www.walterzorn.de
+
+Copyright (c) 2002-2004 Walter Zorn. All rights reserved.
+Created 3. 11. 2002 by Walter Zorn (Web: http://www.walterzorn.com )
+Last modified: 29. 9. 2004
+
+Performance optimizations for Internet Explorer
+by Thomas Frank and John Holdsworth.
+fillPolygon method implemented by Matthieu Haller.
+
+High Performance JavaScript Graphics Library.
+Provides methods
+- to draw lines, rectangles, ellipses, polygons
+ with specifiable line thickness,
+- to fill rectangles and ellipses
+- to draw text.
+NOTE: Operations, functions and branching have rather been optimized
+to efficiency and speed than to shortness of source code.
+
+LICENSE: LGPL
+
+This library is free software; you can redistribute it and/or
+modify it under the terms of the GNU Lesser General Public
+License (LGPL) as published by the Free Software Foundation; either
+version 2.1 of the License, or (at your option) any later version.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA,
+or see http://www.gnu.org/copyleft/lesser.html
+*/
+
+
+var jg_ihtm, jg_ie, jg_fast, jg_dom, jg_moz,
+jg_n4 = (document.layers && typeof document.classes != "undefined");
+
+
+function chkDHTM(x, i)
+{
+ x = document.body || null;
+ jg_ie = x && typeof x.insertAdjacentHTML != "undefined";
+ jg_dom = (x && !jg_ie &&
+ typeof x.appendChild != "undefined" &&
+ typeof document.createRange != "undefined" &&
+ typeof (i = document.createRange()).setStartBefore != "undefined" &&
+ typeof i.createContextualFragment != "undefined");
+ jg_ihtm = !jg_ie && !jg_dom && x && typeof x.innerHTML != "undefined";
+ jg_fast = jg_ie && document.all && !window.opera;
+ jg_moz = jg_dom && typeof x.style.MozOpacity != "undefined";
+}
+
+
+function pntDoc()
+{
+ this.wnd.document.write(jg_fast? this.htmRpc() : this.htm);
+ this.htm = '';
+}
+
+
+function pntCnvDom()
+{
+ var x = document.createRange();
+ x.setStartBefore(this.cnv);
+ x = x.createContextualFragment(jg_fast? this.htmRpc() : this.htm);
+ this.cnv.appendChild(x);
+ this.htm = '';
+}
+
+
+function pntCnvIe()
+{
+ this.cnv.insertAdjacentHTML("BeforeEnd", jg_fast? this.htmRpc() : this.htm);
+ this.htm = '';
+}
+
+
+function pntCnvIhtm()
+{
+ this.cnv.innerHTML += this.htm;
+ this.htm = '';
+}
+
+
+function pntCnv()
+{
+ this.htm = '';
+}
+
+
+function mkDiv(x, y, w, h)
+{
+ if (!isNaN(h)) {
+ this.htm += '<div style="position:absolute;'+
+ 'left:' + x + 'px;'+
+ 'top:' + y + 'px;'+
+ 'width:' + w + 'px;'+
+ 'height:' + h + 'px;';
+ if (ie) {
+ this.htm += '-opacity:' + cw_opacity + ';' +
+ '-khtml-opacity:' + cw_opacity + ';'+
+ 'filter: alpha(opacity=' + (cw_opacity * 100) + ');';
+ }
+
+ //'-moz-opacity:' + window.cw_opacity + ';'+
+ this.htm +=
+ 'clip:rect(0,'+w+'px,'+h+'px,0);'+
+ 'background-color:' + this.color +
+ (!jg_moz? ';overflow:hidden' : '')+
+ ';"><\/div>';
+ }
+}
+
+
+function mkDivIe(x, y, w, h)
+{
+ if (!isNaN(h)) {
+ this.htm += '%%'+this.color+';'+x+';'+y+';'+w+';'+h+';';
+ }
+}
+
+
+function mkDivPrt(x, y, w, h)
+{
+ this.htm += '<div style="position:absolute;'+
+ 'border-left:' + w + 'px solid ' + this.color + ';'+
+ 'left:' + x + 'px;'+
+ 'top:' + y + 'px;'+
+ 'width:0px;'+
+ 'height:' + h + 'px;'+
+ 'clip:rect(0,'+w+'px,'+h+'px,0);'+
+ 'background-color:' + this.color +
+ (!jg_moz? ';overflow:hidden' : '')+
+ ';"><\/div>';
+}
+
+
+function mkLyr(x, y, w, h)
+{
+ this.htm += '<layer '+
+ 'left="' + x + '" '+
+ 'top="' + y + '" '+
+ 'width="' + w + '" '+
+ 'height="' + h + '" '+
+ 'bgcolor="' + this.color + '"><\/layer>\n';
+}
+
+
+var regex = /%%([^;]+);([^;]+);([^;]+);([^;]+);([^;]+);/g;
+function htmRpc()
+{
+ return this.htm.replace(
+ regex,
+ '<div style="overflow:hidden;position:absolute;background-color:'+
+ '$1;left:$2;top:$3;width:$4;height:$5"></div>\n');
+}
+
+
+function htmPrtRpc()
+{
+ return this.htm.replace(
+ regex,
+ '<div style="overflow:hidden;position:absolute;background-color:'+
+ '$1;left:$2;top:$3;width:$4;height:$5;border-left:$4px solid $1"></div>\n');
+}
+
+
+function mkLin(x1, y1, x2, y2)
+{
+ if (x1 > x2)
+ {
+ var _x2 = x2;
+ var _y2 = y2;
+ x2 = x1;
+ y2 = y1;
+ x1 = _x2;
+ y1 = _y2;
+ }
+ var dx = x2-x1, dy = Math.abs(y2-y1),
+ x = x1, y = y1,
+ yIncr = (y1 > y2)? -1 : 1;
+
+ if (dx >= dy)
+ {
+ var pr = dy<<1,
+ pru = pr - (dx<<1),
+ p = pr-dx,
+ ox = x;
+ while ((dx--) > 0)
+ {
+ ++x;
+ if (p > 0)
+ {
+ this.mkDiv(ox, y, x-ox, 1);
+ y += yIncr;
+ p += pru;
+ ox = x;
+ }
+ else p += pr;
+ }
+ this.mkDiv(ox, y, x2-ox+1, 1);
+ }
+
+ else
+ {
+ var pr = dx<<1,
+ pru = pr - (dy<<1),
+ p = pr-dy,
+ oy = y;
+ if (y2 <= y1)
+ {
+ while ((dy--) > 0)
+ {
+ if (p > 0)
+ {
+ this.mkDiv(x++, y, 1, oy-y+1);
+ y += yIncr;
+ p += pru;
+ oy = y;
+ }
+ else
+ {
+ y += yIncr;
+ p += pr;
+ }
+ }
+ this.mkDiv(x2, y2, 1, oy-y2+1);
+ }
+ else
+ {
+ while ((dy--) > 0)
+ {
+ y += yIncr;
+ if (p > 0)
+ {
+ this.mkDiv(x++, oy, 1, y-oy);
+ p += pru;
+ oy = y;
+ }
+ else p += pr;
+ }
+ this.mkDiv(x2, oy, 1, y2-oy+1);
+ }
+ }
+}
+
+
+function mkLin2D(x1, y1, x2, y2)
+{
+ if (x1 > x2)
+ {
+ var _x2 = x2;
+ var _y2 = y2;
+ x2 = x1;
+ y2 = y1;
+ x1 = _x2;
+ y1 = _y2;
+ }
+ var dx = x2-x1, dy = Math.abs(y2-y1),
+ x = x1, y = y1,
+ yIncr = (y1 > y2)? -1 : 1;
+
+ var s = this.stroke;
+ if (dx >= dy)
+ {
+ if (s-3 > 0)
+ {
+ var _s = (s*dx*Math.sqrt(1+dy*dy/(dx*dx))-dx-(s>>1)*dy) / dx;
+ _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
+ }
+ else var _s = s;
+ var ad = Math.ceil(s/2);
+
+ var pr = dy<<1,
+ pru = pr - (dx<<1),
+ p = pr-dx,
+ ox = x;
+ while ((dx--) > 0)
+ {
+ ++x;
+ if (p > 0)
+ {
+ this.mkDiv(ox, y, x-ox+ad, _s);
+ y += yIncr;
+ p += pru;
+ ox = x;
+ }
+ else p += pr;
+ }
+ this.mkDiv(ox, y, x2-ox+ad+1, _s);
+ }
+
+ else
+ {
+ if (s-3 > 0)
+ {
+ var _s = (s*dy*Math.sqrt(1+dx*dx/(dy*dy))-(s>>1)*dx-dy) / dy;
+ _s = (!(s-4)? Math.ceil(_s) : Math.round(_s)) + 1;
+ }
+ else var _s = s;
+ var ad = Math.round(s/2);
+
+ var pr = dx<<1,
+ pru = pr - (dy<<1),
+ p = pr-dy,
+ oy = y;
+ if (y2 <= y1)
+ {
+ ++ad;
+ while ((dy--) > 0)
+ {
+ if (p > 0)
+ {
+ this.mkDiv(x++, y, _s, oy-y+ad);
+ y += yIncr;
+ p += pru;
+ oy = y;
+ }
+ else
+ {
+ y += yIncr;
+ p += pr;
+ }
+ }
+ this.mkDiv(x2, y2, _s, oy-y2+ad);
+ }
+ else
+ {
+ while ((dy--) > 0)
+ {
+ y += yIncr;
+ if (p > 0)
+ {
+ this.mkDiv(x++, oy, _s, y-oy+ad);
+ p += pru;
+ oy = y;
+ }
+ else p += pr;
+ }
+ this.mkDiv(x2, oy, _s, y2-oy+ad+1);
+ }
+ }
+}
+
+
+function mkLinDott(x1, y1, x2, y2)
+{
+ if (x1 > x2)
+ {
+ var _x2 = x2;
+ var _y2 = y2;
+ x2 = x1;
+ y2 = y1;
+ x1 = _x2;
+ y1 = _y2;
+ }
+ var dx = x2-x1, dy = Math.abs(y2-y1),
+ x = x1, y = y1,
+ yIncr = (y1 > y2)? -1 : 1,
+ drw = true;
+ if (dx >= dy)
+ {
+ var pr = dy<<1,
+ pru = pr - (dx<<1),
+ p = pr-dx;
+ while ((dx--) > 0)
+ {
+ if (drw) this.mkDiv(x, y, 1, 1);
+ drw = !drw;
+ if (p > 0)
+ {
+ y += yIncr;
+ p += pru;
+ }
+ else p += pr;
+ ++x;
+ }
+ if (drw) this.mkDiv(x, y, 1, 1);
+ }
+
+ else
+ {
+ var pr = dx<<1,
+ pru = pr - (dy<<1),
+ p = pr-dy;
+ while ((dy--) > 0)
+ {
+ if (drw) this.mkDiv(x, y, 1, 1);
+ drw = !drw;
+ y += yIncr;
+ if (p > 0)
+ {
+ ++x;
+ p += pru;
+ }
+ else p += pr;
+ }
+ if (drw) this.mkDiv(x, y, 1, 1);
+ }
+}
+
+
+function mkOv(left, top, width, height)
+{
+ var a = width>>1, b = height>>1,
+ wod = width&1, hod = (height&1)+1,
+ cx = left+a, cy = top+b,
+ x = 0, y = b,
+ ox = 0, oy = b,
+ aa = (a*a)<<1, bb = (b*b)<<1,
+ st = (aa>>1)*(1-(b<<1)) + bb,
+ tt = (bb>>1) - aa*((b<<1)-1),
+ w, h;
+ while (y > 0)
+ {
+ if (st < 0)
+ {
+ st += bb*((x<<1)+3);
+ tt += (bb<<1)*(++x);
+ }
+ else if (tt < 0)
+ {
+ st += bb*((x<<1)+3) - (aa<<1)*(y-1);
+ tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
+ w = x-ox;
+ h = oy-y;
+ if (w&2 && h&2)
+ {
+ this.mkOvQds(cx, cy, -x+2, ox+wod, -oy, oy-1+hod, 1, 1);
+ this.mkOvQds(cx, cy, -x+1, x-1+wod, -y-1, y+hod, 1, 1);
+ }
+ else this.mkOvQds(cx, cy, -x+1, ox+wod, -oy, oy-h+hod, w, h);
+ ox = x;
+ oy = y;
+ }
+ else
+ {
+ tt -= aa*((y<<1)-3);
+ st -= (aa<<1)*(--y);
+ }
+ }
+ this.mkDiv(cx-a, cy-oy, a-ox+1, (oy<<1)+hod);
+ this.mkDiv(cx+ox+wod, cy-oy, a-ox+1, (oy<<1)+hod);
+}
+
+
+function mkOv2D(left, top, width, height)
+{
+ var s = this.stroke;
+ width += s-1;
+ height += s-1;
+ var a = width>>1, b = height>>1,
+ wod = width&1, hod = (height&1)+1,
+ cx = left+a, cy = top+b,
+ x = 0, y = b,
+ aa = (a*a)<<1, bb = (b*b)<<1,
+ st = (aa>>1)*(1-(b<<1)) + bb,
+ tt = (bb>>1) - aa*((b<<1)-1);
+
+ if (s-4 < 0 && (!(s-2) || width-51 > 0 && height-51 > 0))
+ {
+ var ox = 0, oy = b,
+ w, h,
+ pxl, pxr, pxt, pxb, pxw;
+ while (y > 0)
+ {
+ if (st < 0)
+ {
+ st += bb*((x<<1)+3);
+ tt += (bb<<1)*(++x);
+ }
+ else if (tt < 0)
+ {
+ st += bb*((x<<1)+3) - (aa<<1)*(y-1);
+ tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
+ w = x-ox;
+ h = oy-y;
+
+ if (w-1)
+ {
+ pxw = w+1+(s&1);
+ h = s;
+ }
+ else if (h-1)
+ {
+ pxw = s;
+ h += 1+(s&1);
+ }
+ else pxw = h = s;
+ this.mkOvQds(cx, cy, -x+1, ox-pxw+w+wod, -oy, -h+oy+hod, pxw, h);
+ ox = x;
+ oy = y;
+ }
+ else
+ {
+ tt -= aa*((y<<1)-3);
+ st -= (aa<<1)*(--y);
+ }
+ }
+ this.mkDiv(cx-a, cy-oy, s, (oy<<1)+hod);
+ this.mkDiv(cx+a+wod-s+1, cy-oy, s, (oy<<1)+hod);
+ }
+
+ else
+ {
+ var _a = (width-((s-1)<<1))>>1,
+ _b = (height-((s-1)<<1))>>1,
+ _x = 0, _y = _b,
+ _aa = (_a*_a)<<1, _bb = (_b*_b)<<1,
+ _st = (_aa>>1)*(1-(_b<<1)) + _bb,
+ _tt = (_bb>>1) - _aa*((_b<<1)-1),
+
+ pxl = new Array(),
+ pxt = new Array(),
+ _pxb = new Array();
+ pxl[0] = 0;
+ pxt[0] = b;
+ _pxb[0] = _b-1;
+ while (y > 0)
+ {
+ if (st < 0)
+ {
+ st += bb*((x<<1)+3);
+ tt += (bb<<1)*(++x);
+ pxl[pxl.length] = x;
+ pxt[pxt.length] = y;
+ }
+ else if (tt < 0)
+ {
+ st += bb*((x<<1)+3) - (aa<<1)*(y-1);
+ tt += (bb<<1)*(++x) - aa*(((y--)<<1)-3);
+ pxl[pxl.length] = x;
+ pxt[pxt.length] = y;
+ }
+ else
+ {
+ tt -= aa*((y<<1)-3);
+ st -= (aa<<1)*(--y);
+ }
+
+ if (_y > 0)
+ {
+ if (_st < 0)
+ {
+ _st += _bb*((_x<<1)+3);
+ _tt += (_bb<<1)*(++_x);
+ _pxb[_pxb.length] = _y-1;
+ }
+ else if (_tt < 0)
+ {
+ _st += _bb*((_x<<1)+3) - (_aa<<1)*(_y-1);
+ _tt += (_bb<<1)*(++_x) - _aa*(((_y--)<<1)-3);
+ _pxb[_pxb.length] = _y-1;
+ }
+ else
+ {
+ _tt -= _aa*((_y<<1)-3);
+ _st -= (_aa<<1)*(--_y);
+ _pxb[_pxb.length-1]--;
+ }
+ }
+ }
+
+ var ox = 0, oy = b,
+ _oy = _pxb[0],
+ l = pxl.length,
+ w, h;
+ for (var i = 0; i < l; i++)
+ {
+ if (typeof _pxb[i] != "undefined")
+ {
+ if (_pxb[i] < _oy || pxt[i] < oy)
+ {
+ x = pxl[i];
+ this.mkOvQds(cx, cy, -x+1, ox+wod, -oy, _oy+hod, x-ox, oy-_oy);
+ ox = x;
+ oy = pxt[i];
+ _oy = _pxb[i];
+ }
+ }
+ else
+ {
+ x = pxl[i];
+ this.mkDiv(cx-x+1, cy-oy, 1, (oy<<1)+hod);
+ this.mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
+ ox = x;
+ oy = pxt[i];
+ }
+ }
+ this.mkDiv(cx-a, cy-oy, 1, (oy<<1)+hod);
+ this.mkDiv(cx+ox+wod, cy-oy, 1, (oy<<1)+hod);
+ }
+}
+
+
+function mkOvDott(left, top, width, height)
+{
+ var a = width>>1, b = height>>1,
+ wod = width&1, hod = height&1,
+ cx = left+a, cy = top+b,
+ x = 0, y = b,
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb = (b*b)<<1,
+ st = (aa2>>1)*(1-(b<<1)) + bb,
+ tt = (bb>>1) - aa2*((b<<1)-1),
+ drw = true;
+ while (y > 0)
+ {
+ if (st < 0)
+ {
+ st += bb*((x<<1)+3);
+ tt += (bb<<1)*(++x);
+ }
+ else if (tt < 0)
+ {
+ st += bb*((x<<1)+3) - aa4*(y-1);
+ tt += (bb<<1)*(++x) - aa2*(((y--)<<1)-3);
+ }
+ else
+ {
+ tt -= aa2*((y<<1)-3);
+ st -= aa4*(--y);
+ }
+ if (drw) this.mkOvQds(cx, cy, -x, x+wod, -y, y+hod, 1, 1);
+ drw = !drw;
+ }
+}
+
+
+function mkRect(x, y, w, h)
+{
+ var s = this.stroke;
+ this.mkDiv(x, y, w, s);
+ this.mkDiv(x+w, y, s, h);
+ this.mkDiv(x, y+h, w+s, s);
+ this.mkDiv(x, y+s, s, h-s);
+}
+
+
+function mkRectDott(x, y, w, h)
+{
+ this.drawLine(x, y, x+w, y);
+ this.drawLine(x+w, y, x+w, y+h);
+ this.drawLine(x, y+h, x+w, y+h);
+ this.drawLine(x, y, x, y+h);
+}
+
+
+function jsgFont()
+{
+ this.PLAIN = 'font-weight:normal;';
+ this.BOLD = 'font-weight:bold;';
+ this.ITALIC = 'font-style:italic;';
+ this.ITALIC_BOLD = this.ITALIC + this.BOLD;
+ this.BOLD_ITALIC = this.ITALIC_BOLD;
+}
+var Font = new jsgFont();
+
+
+function jsgStroke()
+{
+ this.DOTTED = -1;
+}
+var Stroke = new jsgStroke();
+
+
+function jsGraphics(id, wnd)
+{
+ this.setColor = new Function('arg', 'this.color = arg.toLowerCase();');
+
+ this.setStroke = function(x)
+ {
+ this.stroke = x;
+ if (!(x+1))
+ {
+ this.drawLine = mkLinDott;
+ this.mkOv = mkOvDott;
+ this.drawRect = mkRectDott;
+ }
+ else if (x-1 > 0)
+ {
+ this.drawLine = mkLin2D;
+ this.mkOv = mkOv2D;
+ this.drawRect = mkRect;
+ }
+ else
+ {
+ this.drawLine = mkLin;
+ this.mkOv = mkOv;
+ this.drawRect = mkRect;
+ }
+ };
+
+
+ this.setPrintable = function(arg)
+ {
+ this.printable = arg;
+ if (jg_fast)
+ {
+ this.mkDiv = mkDivIe;
+ this.htmRpc = arg? htmPrtRpc : htmRpc;
+ }
+ else this.mkDiv = jg_n4? mkLyr : arg? mkDivPrt : mkDiv;
+ };
+
+
+ this.setFont = function(fam, sz, sty)
+ {
+ this.ftFam = fam;
+ this.ftSz = sz;
+ this.ftSty = sty || Font.PLAIN;
+ };
+
+
+ this.drawPolyline = this.drawPolyLine = function(x, y, s)
+ {
+ for (var i=0 ; i<x.length-1 ; i++ )
+ this.drawLine(x[i], y[i], x[i+1], y[i+1]);
+ };
+
+
+ this.fillRect = function(x, y, w, h)
+ {
+ this.mkDiv(x, y, w, h);
+ };
+
+
+ this.drawPolygon = function(x, y)
+ {
+ this.drawPolyline(x, y);
+ this.drawLine(x[x.length-1], y[x.length-1], x[0], y[0]);
+ };
+
+
+ this.drawEllipse = this.drawOval = function(x, y, w, h)
+ {
+ this.mkOv(x, y, w, h);
+ };
+
+
+ this.fillEllipse = this.fillOval = function(left, top, w, h)
+ {
+ var a = (w -= 1)>>1, b = (h -= 1)>>1,
+ wod = (w&1)+1, hod = (h&1)+1,
+ cx = left+a, cy = top+b,
+ x = 0, y = b,
+ ox = 0, oy = b,
+ aa2 = (a*a)<<1, aa4 = aa2<<1, bb = (b*b)<<1,
+ st = (aa2>>1)*(1-(b<<1)) + bb,
+ tt = (bb>>1) - aa2*((b<<1)-1),
+ pxl, dw, dh;
+ if (w+1) while (y > 0)
+ {
+ if (st < 0)
+ {
+ st += bb*((x<<1)+3);
+ tt += (bb<<1)*(++x);
+ }
+ else if (tt < 0)
+ {
+ st += bb*((x<<1)+3) - aa4*(y-1);
+ pxl = cx-x;
+ dw = (x<<1)+wod;
+ tt += (bb<<1)*(++x) - aa2*(((y--)<<1)-3);
+ dh = oy-y;
+ this.mkDiv(pxl, cy-oy, dw, dh);
+ this.mkDiv(pxl, cy+oy-dh+hod, dw, dh);
+ ox = x;
+ oy = y;
+ }
+ else
+ {
+ tt -= aa2*((y<<1)-3);
+ st -= aa4*(--y);
+ }
+ }
+ this.mkDiv(cx-a, cy-oy, w+1, (oy<<1)+hod);
+ };
+
+
+
+/* fillPolygon method, implemented by Matthieu Haller.
+This javascript function is an adaptation of the gdImageFilledPolygon for Walter Zorn lib.
+C source of GD 1.8.4 found at http://www.boutell.com/gd/
+
+THANKS to Kirsten Schulz for the polygon fixes!
+
+The intersection finding technique of this code could be improved
+by remembering the previous intertersection, and by using the slope.
+That could help to adjust intersections to produce a nice
+interior_extrema. */
+ this.fillPolygon = function(array_x, array_y)
+ {
+ var i;
+ var y;
+ var miny, maxy;
+ var x1, y1;
+ var x2, y2;
+ var ind1, ind2;
+ var ints;
+
+ var n = array_x.length;
+
+ if (!n) return;
+
+
+ miny = array_y[0];
+ maxy = array_y[0];
+ for (i = 1; i < n; i++)
+ {
+ if (array_y[i] < miny)
+ miny = array_y[i];
+
+ if (array_y[i] > maxy)
+ maxy = array_y[i];
+ }
+ for (y = miny; y <= maxy; y++)
+ {
+ var polyInts = new Array();
+ ints = 0;
+ for (i = 0; i < n; i++)
+ {
+ if (!i)
+ {
+ ind1 = n-1;
+ ind2 = 0;
+ }
+ else
+ {
+ ind1 = i-1;
+ ind2 = i;
+ }
+ y1 = array_y[ind1];
+ y2 = array_y[ind2];
+ if (y1 < y2)
+ {
+ x1 = array_x[ind1];
+ x2 = array_x[ind2];
+ }
+ else if (y1 > y2)
+ {
+ y2 = array_y[ind1];
+ y1 = array_y[ind2];
+ x2 = array_x[ind1];
+ x1 = array_x[ind2];
+ }
+ else continue;
+
+ // modified 11. 2. 2004 Walter Zorn
+ if ((y >= y1) && (y < y2))
+ polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
+
+ else if ((y == maxy) && (y > y1) && (y <= y2))
+ polyInts[ints++] = Math.round((y-y1) * (x2-x1) / (y2-y1) + x1);
+ }
+ polyInts.sort(integer_compare);
+ for (i = 0; i < ints; i+=2)
+ this.mkDiv(polyInts[i], y, polyInts[i+1]-polyInts[i]+1, 1);
+ }
+ };
+
+
+ this.drawString = function(txt, x, y)
+ {
+ this.htm += '<div style="position:absolute;white-space:nowrap;'+
+ 'left:' + x + 'px;'+
+ 'top:' + y + 'px;'+
+ 'font-family:' + this.ftFam + ';'+
+ 'font-size:' + this.ftSz + ';'+
+ 'color:' + this.color + ';' + this.ftSty + '">'+
+ txt +
+ '<\/div>';
+ }
+
+
+ this.drawImage = function(imgSrc, x, y, w, h)
+ {
+ this.htm += '<div style="position:absolute;'+
+ 'left:' + x + 'px;'+
+ 'top:' + y + 'px;'+
+ 'width:' + w + ';'+
+ 'height:' + h + ';">'+
+ '<img src="' + imgSrc + '" width="' + w + '" height="' + h + '">'+
+ '<\/div>';
+ }
+
+
+ this.clear = function()
+ {
+ this.htm = "";
+ if (this.cnv) this.cnv.innerHTML = this.defhtm;
+ };
+
+
+ this.mkOvQds = function(cx, cy, xl, xr, yt, yb, w, h)
+ {
+ this.mkDiv(xr+cx, yt+cy, w, h);
+ this.mkDiv(xr+cx, yb+cy, w, h);
+ this.mkDiv(xl+cx, yb+cy, w, h);
+ this.mkDiv(xl+cx, yt+cy, w, h);
+ };
+
+ this.setStroke(1);
+ this.setFont('verdana,geneva,helvetica,sans-serif', String.fromCharCode(0x31, 0x32, 0x70, 0x78), Font.PLAIN);
+ this.color = '#000000';
+ this.htm = '';
+ this.wnd = wnd || window;
+
+ if (!(jg_ie || jg_dom || jg_ihtm)) chkDHTM();
+ if (typeof id != 'string' || !id) this.paint = pntDoc;
+ else
+ {
+ this.cnv = document.all? (this.wnd.document.all[id] || null)
+ : document.getElementById? (this.wnd.document.getElementById(id) || null)
+ : null;
+ this.defhtm = (this.cnv && this.cnv.innerHTML)? this.cnv.innerHTML : '';
+ this.paint = jg_dom? pntCnvDom : jg_ie? pntCnvIe : jg_ihtm? pntCnvIhtm : pntCnv;
+ }
+
+ this.setPrintable(false);
+}
+
+
+
+function integer_compare(x,y)
+{
+ return (x < y) ? -1 : ((x > y)*1);
+}
+
Deleted: branches/2.4.5_rc1/http/frames/index.php
===================================================================
--- branches/2.4.5/http/frames/index.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/frames/index.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,158 +0,0 @@
-<?php
-#$Id$
-# http://www.mapbender.org/index.php/index.php
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-require("../php/mb_validateSession.php");
-$_SESSION["mb_user_gui"] = $_REQUEST["gui_id"];
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$pattern = '/sessionID/';
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<!--
-Licensing: See the GNU General Public License for more details.
-http://www.gnu.org/copyleft/gpl.html
-or:
-mapbender/licence/
--->
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title><?php echo $_REQUEST["gui_id"];?> - presented by Mapbender</title>
-<?php
-$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND fkey_gui_id = $1 and var_type='file/css'";
-$v = array($_REQUEST["gui_id"]);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$row["var_value"]."\">\n";
-}
-?>
-<style type="text/css">
-<!--
-<?php
-$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND fkey_gui_id = $1 and var_type='text/css'";
-$v = array($_REQUEST["gui_id"]);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo $row["var_value"];
-}
-?>
--->
-</style>
-
-<script type='text/javascript' src="../extensions/json.js"></script>
-<script type='text/javascript' src="../javascripts/point.js"></script>
-<script type='text/javascript' src="../javascripts/map_obj.js"></script>
-<script type='text/javascript' src="../javascripts/wfs_obj.js"></script>
-<?php
-echo "<script type='text/javascript' src='../javascripts/map.php?gui_id=".$_REQUEST["gui_id"]."&".strip_tags(SID)."&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
-echo "<script type='text/javascript' src='../php/mod_createJSObjFromDB.php?". strip_tags (SID)."'></script>";
-/*********************************************/
-$frame = "";
-/*********************************************/
-
-$sql = "SELECT DISTINCT e_mb_mod FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1";
-$v = array($_REQUEST["gui_id"]);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- if($row["e_mb_mod"] != ""){
- echo "<script type='text/javascript' src='../javascripts/".trim($row["e_mb_mod"])."?gui_id=".$_REQUEST["gui_id"]."'></script> ";
- }
- $cnt++;
-}
-?>
-</head>
-<?php
-$sql = "SELECT * FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos";
-$v = array($_REQUEST["gui_id"]);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$i = 0;
-while(db_fetch_row($res)){
- $replacement = SID."&guiID=".$_REQUEST["gui_id"]."&elementID=".db_result($res,$i,"e_id");
- echo "<".db_result($res,$i,"e_element")." ";
- if(db_result($res,$i,"e_id") != ""){
- echo " id='".db_result($res,$i,"e_id")."'";
- echo " name='".db_result($res,$i,"e_id")."'";
- }
- if(db_result($res,$i,"e_attributes") != ""){
- echo " ".stripslashes(preg_replace($pattern,$replacement,db_result($res,$i,"e_attributes")));
- }
- if(db_result($res,$i,"e_src") != ""){
- if(db_result($res,$i,"e_closetag") == "iframe" && db_result($res,$i,"e_id") != 'loadData'){
- echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"));
- if(strpos(db_result($res,$i,"e_src"), "?")) {
- echo "&";
- }
- else {
- echo "?";
- }
- echo "e_id_css=".db_result($res,$i,"e_id")."&e_id=".db_result($res,$i,"e_id")."&e_target=".db_result($res,$i,"e_target")."'";
- }
- else{
- echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"))."'";
- }
- }
- echo " style = '";
- if(db_result($res,$i,"e_left") != "" && db_result($res,$i,"e_top") != ""){
- echo "position:absolute;";
- echo "left:".db_result($res,$i,"e_left").";";
- echo "top:".db_result($res,$i,"e_top").";";
- }
- if(db_result($res,$i,"e_width") != "" && db_result($res,$i,"e_height") != ""){
- echo "width:".db_result($res,$i,"e_width").";";
- echo "height:".db_result($res,$i,"e_height").";";
- }
- if(db_result($res,$i,"e_z_index") != ""){
- echo "z-index:".db_result($res,$i,"e_z_index").";";
- }
- if(db_result($res,$i,"e_more_styles") != ""){
- echo db_result($res,$i,"e_more_styles");
- }
- echo "' >";
- if(db_result($res,$i,"e_content") != ""){
- echo " ".stripslashes(db_result($res,$i,"e_content"));
- }
- if(db_result($res,$i,"e_closetag") != "" && db_result($res,$i,"e_closetag") != "body"){
- echo " </".db_result($res,$i,"e_closetag").">";
- }
- $i++;
-}
-?>
-<form id='sendData' name='sendData' action='' method='POST' target='loadData' style='position:absolute;left:800px'>
-<input type='hidden' name='data'>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/frames/index.php (from rev 2172, branches/2.4.5/http/frames/index.php)
===================================================================
--- branches/2.4.5_rc1/http/frames/index.php (rev 0)
+++ branches/2.4.5_rc1/http/frames/index.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,164 @@
+<?php
+#$Id$
+# http://www.mapbender.org/index.php/index.php
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require("../php/mb_validateSession.php");
+
+//
+// check if user is allowed to access current GUI;
+// if not, return to login screen
+//
+if (!in_array($gui_id, $_SESSION["mb_user_guis"])) {
+ $e = new mb_exception("mb_validateSession.php: User: " . $_SESSION["mb_user_id"] . " not allowed to access GUI " . $gui_id);
+ header("Location: ".LOGIN);
+ die();
+}
+
+// user is allowed to access GUI, set in session.
+$_SESSION["mb_user_gui"] = $gui_id;
+
+// what is this for?
+$pattern = '/sessionID/';
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+Licensing: See the GNU General Public License for more details.
+http://www.gnu.org/copyleft/gpl.html
+or:
+mapbender/licence/
+-->
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
+<title><?php echo $gui_id;?> - presented by Mapbender</title>
+<?php
+$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND ";
+$sql .= "fkey_gui_id = $1 and var_type='file/css'";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$row["var_value"]."\">\n";
+}
+?>
+<style type="text/css">
+<!--
+<?php
+$sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = 'body' AND ";
+$sql .= "fkey_gui_id = $1 and var_type='text/css'";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+while($row = db_fetch_array($res)){
+ echo $row["var_value"];
+}
+?>
+-->
+</style>
+
+<script type='text/javascript' src="../extensions/json.js"></script>
+<script type='text/javascript' src="../javascripts/point.js"></script>
+<script type='text/javascript' src="../javascripts/map_obj.js"></script>
+<script type='text/javascript' src="../javascripts/wfs_obj.js"></script>
+
+<?php
+echo "<script type='text/javascript' src='../javascripts/map.php?" . $urlParameters . "&mb_myBBOX=".$_REQUEST["mb_myBBOX"]."'></script>";
+echo "<script type='text/javascript' src='../php/mod_createJSObjFromDB.php?". $urlParameters . "'></script>";
+/*********************************************/
+$frame = "";
+/*********************************************/
+
+$sql = "SELECT DISTINCT e_mb_mod FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+while($row = db_fetch_array($res)){
+ if($row["e_mb_mod"] != ""){
+ echo "<script type='text/javascript' src='../javascripts/".trim($row["e_mb_mod"])."?".$urlParameters."'></script> ";
+ }
+}
+?>
+</head>
+<?php
+$sql = "SELECT * FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$i = 0;
+while(db_fetch_row($res)){
+ $replacement = $urlParameters . "&elementID=" . db_result($res,$i,"e_id");
+ echo "<".db_result($res,$i,"e_element")." ";
+ if(db_result($res,$i,"e_id") != ""){
+ echo " id='".db_result($res,$i,"e_id")."'";
+ echo " name='".db_result($res,$i,"e_id")."'";
+ }
+ if(db_result($res,$i,"e_attributes") != ""){
+ echo " ".stripslashes(preg_replace($pattern,$replacement,db_result($res,$i,"e_attributes")));
+ }
+ if(db_result($res,$i,"e_src") != ""){
+ if(db_result($res,$i,"e_closetag") == "iframe" && db_result($res,$i,"e_id") != 'loadData'){
+ echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"));
+ if(strpos(db_result($res,$i,"e_src"), "?")) {
+ echo "&";
+ }
+ else {
+ echo "?";
+ }
+ echo "e_id_css=".db_result($res,$i,"e_id")."&e_id=".db_result($res,$i,"e_id")."&e_target=".db_result($res,$i,"e_target")."'";
+ }
+ else{
+ echo " src = '".preg_replace($pattern,$replacement,db_result($res,$i,"e_src"))."'";
+ }
+ }
+ echo " style = '";
+ if(db_result($res,$i,"e_left") != "" && db_result($res,$i,"e_top") != ""){
+ echo "position:absolute;";
+ echo "left:".db_result($res,$i,"e_left").";";
+ echo "top:".db_result($res,$i,"e_top").";";
+ }
+ if(db_result($res,$i,"e_width") != "" && db_result($res,$i,"e_height") != ""){
+ echo "width:".db_result($res,$i,"e_width").";";
+ echo "height:".db_result($res,$i,"e_height").";";
+ }
+ if(db_result($res,$i,"e_z_index") != ""){
+ echo "z-index:".db_result($res,$i,"e_z_index").";";
+ }
+ if(db_result($res,$i,"e_more_styles") != ""){
+ echo db_result($res,$i,"e_more_styles");
+ }
+ echo "' >";
+ if(db_result($res,$i,"e_content") != ""){
+ echo " ".stripslashes(db_result($res,$i,"e_content"));
+ }
+ if(db_result($res,$i,"e_closetag") != "" && db_result($res,$i,"e_closetag") != "body"){
+ echo " </".db_result($res,$i,"e_closetag").">";
+ }
+ $i++;
+}
+?>
+<form id='sendData' name='sendData' action='' method='POST' target='loadData' style='position:absolute;left:800px'>
+<input type='hidden' name='data'>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/include/dyn_css.php
===================================================================
--- branches/2.4.5/http/include/dyn_css.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/include/dyn_css.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,129 +0,0 @@
-<?php
-# $Id$
-# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-if(!isset($gui_id) && isset($_REQUEST["guiID"])){
- $gui_id = $_REQUEST["guiID"];
-}
-if(!isset($_REQUEST["e_id_css"]) && isset($_REQUEST["elementID"])){
- $e_id_css = $_REQUEST["elementID"];
-}
-if(isset($_REQUEST["e_id_css"])){
- $e_id_css = $_REQUEST["e_id_css"];
-}
-if(isset($gui_id) && $gui_id != ""){
- #echo $gui_id. " - ".$_REQUEST["e_id_css"];
- if (isset($e_id_css) && $e_id_css != '') {
- #
- #
- # css file
- #
- #
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='file/css'";
- $v = array($e_id_css,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$row["var_value"]."\" />\n";
- }
-
-
-
- #
- #
- # css text
- #
- #
-
-
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='text/css'";
- $v = array($e_id_css,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- $style = "";
- while($row = db_fetch_array($res)){
- $style .= $row["var_value"]."\n";
- }
- if ($style) {
- echo "<style type=\"text/css\">\n";
- echo "<!--\n";
- echo $style;
- echo "-->\n";
- echo "</style>\n";
- }
- }
-
- #
- #
- # php variables
- #
- #
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='php_var'";
- $v = array($e_id_css,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "\n";
- while($row = db_fetch_array($res))
- {
- $$row["var_name"] = stripslashes($row["var_value"]);
- echo "\n";
- }
-
-
-
- #
- #
- # JavaScript variables
- #
- #
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='var'";
- $v = array($e_id_css,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "\n";
- echo "<script type=\"text/javascript\">\n";
- echo "<!--\n";
- $arrays = array();
- $i=-1;
- while($row = db_fetch_array($res))
- {
- if (strpos($row["var_name"], "[")) {
- $arrayname = substr($row["var_name"], 0, strpos($row["var_name"], "["));
- if (!in_array($arrayname, $arrays)) {
- $i++;
- $arrays[$i] = $arrayname;
- echo "var " . $arrayname . " = new Array();\n";
- }
- }
- else {
- echo "var ";
- }
- echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
- }
- echo "// -->\n";
- echo "</script>\n";
-}
- ?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/include/dyn_css.php (from rev 2140, branches/2.4.5/http/include/dyn_css.php)
===================================================================
--- branches/2.4.5_rc1/http/include/dyn_css.php (rev 0)
+++ branches/2.4.5_rc1/http/include/dyn_css.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,129 @@
+<?php
+# $Id$
+# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+if(!isset($gui_id) && isset($_REQUEST["guiID"])){
+ $gui_id = $_REQUEST["guiID"];
+}
+if(!isset($_REQUEST["e_id_css"]) && isset($_REQUEST["elementID"])){
+ $e_id_css = $_REQUEST["elementID"];
+}
+if(isset($_REQUEST["e_id_css"])){
+ $e_id_css = $_REQUEST["e_id_css"];
+}
+if(isset($gui_id) && $gui_id != ""){
+ #echo $gui_id. " - ".$_REQUEST["e_id_css"];
+ if (isset($e_id_css) && $e_id_css != '') {
+ #
+ #
+ # css file
+ #
+ #
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='file/css'";
+ $v = array($e_id_css,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"".$row["var_value"]."\" />\n";
+ }
+
+
+
+ #
+ #
+ # css text
+ #
+ #
+
+
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='text/css'";
+ $v = array($e_id_css,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ $style = "";
+ while($row = db_fetch_array($res)){
+ $style .= $row["var_value"]."\n";
+ }
+ if ($style) {
+ echo "<style type=\"text/css\">\n";
+ echo "<!--\n";
+ echo $style;
+ echo "-->\n";
+ echo "</style>\n";
+ }
+ }
+
+ #
+ #
+ # php variables
+ #
+ #
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='php_var'";
+ $v = array($e_id_css,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "\n";
+ while($row = db_fetch_array($res))
+ {
+ $$row["var_name"] = stripslashes($row["var_value"]);
+ echo "\n";
+ }
+
+
+
+ #
+ #
+ # JavaScript variables
+ #
+ #
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='var'";
+ $v = array($e_id_css,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "\n";
+ echo "<script type=\"text/javascript\">\n";
+ echo "<!--\n";
+ $arrays = array();
+ $i=-1;
+ while($row = db_fetch_array($res))
+ {
+ if (strpos($row["var_name"], "[")) {
+ $arrayname = substr($row["var_name"], 0, strpos($row["var_name"], "["));
+ if (!in_array($arrayname, $arrays)) {
+ $i++;
+ $arrays[$i] = $arrayname;
+ echo "var " . $arrayname . " = new Array();\n";
+ }
+ }
+ else {
+ echo "var ";
+ }
+ echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+ }
+ echo "// -->\n";
+ echo "</script>\n";
+}
+ ?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/include/dyn_js.php
===================================================================
--- branches/2.4.5/http/include/dyn_js.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/include/dyn_js.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,50 +0,0 @@
-<?php
-# $Id: class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
-# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-if(isset($gui_id))
-{
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='var'";
- $v = array($e_id_css,$gui_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $arrays = array();
- echo "\n";
- while($row = db_fetch_array($res))
- {
- if (strpos($row["var_name"], "[")) {
- $arrayname = substr($row["var_name"], 0, strpos($row["var_name"], "["));
-
- if (!in_array($arrayname, $arrays)) {
- $i++;
- $arrays[$i] = $arrayname;
- echo "var " . $arrayname . " = new Array();\n";
- }
- }
- else {
- echo "var ";
- }
- if (is_numeric(stripslashes($row["var_value"]))) {
- echo $row["var_name"]." = ".stripslashes($row["var_value"]).";\n";
- }
- else {
- echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
- }
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/include/dyn_js.php (from rev 2140, branches/2.4.5/http/include/dyn_js.php)
===================================================================
--- branches/2.4.5_rc1/http/include/dyn_js.php (rev 0)
+++ branches/2.4.5_rc1/http/include/dyn_js.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,51 @@
+<?php
+# $Id: class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
+# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+if(isset($gui_id))
+{
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 and var_type='var'";
+ $v = array($e_id_css,$gui_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $arrays = array();
+ echo "\n";
+ while($row = db_fetch_array($res))
+ {
+ if (strpos($row["var_name"], "[")) {
+ $arrayname = substr($row["var_name"], 0, strpos($row["var_name"], "["));
+
+ if (!in_array($arrayname, $arrays)) {
+ $i++;
+ $arrays[$i] = $arrayname;
+ echo "var " . $arrayname . " = new Array();\n";
+ }
+ }
+ else {
+ echo "var ";
+ }
+ if (is_numeric(stripslashes($row["var_value"]))) {
+ echo $row["var_name"]." = ".stripslashes($row["var_value"]).";\n";
+ }
+ else {
+ echo $row["var_name"]." = '".stripslashes($row["var_value"])."';\n";
+ }
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/include/dyn_php.php
===================================================================
--- branches/2.4.5/http/include/dyn_php.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/include/dyn_php.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,34 +0,0 @@
-<?php
-# $Id: class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
-# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-if(isset($gui_id))
-{
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 and var_type='php_var'";
- $v = array($gui_id);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "\n";
- while($row = db_fetch_array($res))
- {
- $$row["var_name"] = stripslashes($row["var_value"]);
- echo "\n";
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/include/dyn_php.php (from rev 2140, branches/2.4.5/http/include/dyn_php.php)
===================================================================
--- branches/2.4.5_rc1/http/include/dyn_php.php (rev 0)
+++ branches/2.4.5_rc1/http/include/dyn_php.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,36 @@
+<?php
+# $Id: class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
+# $Header: /cvsroot/mapbender/mapbender/http/classes/class_wfs.php,v 1.15 2006/03/09 13:55:46 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+if(isset($gui_id))
+{
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 and var_type='php_var'";
+ $v = array($gui_id);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "\n";
+ while($row = db_fetch_array($res))
+ {
+ $$row["var_name"] = stripslashes($row["var_value"]);
+ echo "\n";
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/index.php
===================================================================
--- branches/2.4.5/http/index.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/index.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,150 +0,0 @@
-<?php
-# $Id$
-# maintained by http://www.mapbender.org/index.php/User:Astrid_Emde
-# http://www.mapbender.org/index.php/Mapbender_Portal
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 4.01 Transitional//EN">
-<html>
-<head>
-<!--
-Licensing: See the GNU General Public License for more details.
-http://www.gnu.org/copyleft/gpl.html
-or:
-mapbender/licence/
--->
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
-<title>Welcome to the Mapbender Portal</title>
-<link rel="stylesheet" type="text/css" href="css/mapbender.css" />
-<script type="text/javascript">
-<!--
-function changeTarget()
-{
- if (window.frames[0].document.forms['loginForm'].target){
- window.frames['login'].document.forms['loginForm'].setAttribute("target","_blank");
- }
- else{
- window.frames[0].document.forms['loginForm'].setAttribute("target","_blank");
- }
-}
-// -->
-</script>
-<body onload='changeTarget()'>
-
-<table BGCOLOR="#ffffff" width="70%" height="70%" ALIGN="top" CELLSPACING="0" CELLPADDING="10" STYLE="-moz-border-radius:8px; border:2px #000000 solid;">
-<tr><td COLSPAN="2" VALIGN="center" STYLE="margin-bottom:0px; padding-bottom:0px;">
-<div class="mapbender_headline" >
- <font align="left" color="#000000"> Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font>
-</div>
-
-<hr STYLE="color:#629093; height:2px; margin:0px; padding:0px;" WIDTH="100%" NOSHADE COLOR="#808080">
-</td></tr>
-<tr><td WIDTH="210" VALIGN="TOP">
-<table width="92%" height="99%" cellspacing="1" cellpadding="3" STYLE="-moz-border-radius:8px; border:2px #808080 solid;">
-<tr>
- <td bgcolor="#F0F0F0" valign="top">
- <br>
- <a href="http://www.mapbender.org" target="_blank"><b>Homepage</b></a><br>
- <br>
- <a href="http://www.mapbender.org/index.php/Modules" target="_blank"><b>Documentation</b></a><br>
- <br>
- <a href="http://www.mapbender.org/index.php/Mapbender_Gallery" target="_blank"><b>Application Gallery</b></a><br>
- <br>
- <a href="http://wms1.ccgis.de/mapbender2/frames/login.php?name=mb&password=mb&mb_user_myGui=mapbender" target="_blank"><b>Mapbender User Map</b></a><br>
- <br>
- <a href="http://mapbender.osgeo.org" target="_blank"><b>Mapbender on OSGeo</b></a><br>
- <br>
- <br>
- <br>
- <a href="http://www.mapbender.org/download/" target="_blank"><b>Download</b></a><br>
- <br>
- <a href="http://www.mapbender.org/index.php/SVN" target="_blank"><b>Source Code Repository</b></a><br>
- <br>
- <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" target="_blank"><b>User Mailing List</b></a><br>
- <br>
- <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_dev" target="_blank"><b>Devel Mailing List</b></a><br>
- <br>
- <a href="http://www.mapbender.org/index.php/Bugs" target="_blank"><b>Bug & Issue Tracker</b></a><br>
- <br>
- <br>
- <br>
- <a href="http://mapbender.telascience.org/" target="_blank"><b>Mapbender Development Server</b></a><br>
- <br>
- <br>
- <a href="http://www.osgeo.org" title="Open Source Geospatial Foundation" alt="Link to the OSGeo Portal" target="_blank">
- <br>
- <img title="OSGeo logo" src = "./img/OSGeo_150pix.png">
- </a>
- <br><br>
- Mapbender is an official OSGeo Project licensed under the <a href="http://www.gnu.org/licenses/licenses.html#GPL" title="GNU GPL license" alt="Link to the GNU license">GNU GPL</a>
- <br>
- </td>
-</tr>
-</table>
-<br>
-<br>
-</td>
-
-<td WIDTH="480" VALIGN="TOP" STYLE="line-height:133%">
-<div>
- <table width="93%" cellspacing="1" cellpadding="5" STYLE="-moz-border-radius:8px; border:2px #808080 solid;">
- <tr><td bgcolor="#F0F0F0">
-
- <div class="mapbender_welcome">Welcome to <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font></div>
-
- <font color="#ff0000">Mapbender Version 2.4.5 RC1 (2008-02-20)</font>
- </td></tr>
- </table>
-<br>
-
-<table width="93%" cellspacing="1" cellpadding="5" STYLE="-moz-border-radius:8px; border:1px #808080 solid;">
-<tr><td bgcolor="#ffffff">
-<p>
- <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> is the geospatial portal site management software for OGC OWS architectures. Mapbender comes with a data model to manage interfaces for displaying, navigating and querying OGC compliant web map and feature services (WMS and transactional WFS). Authentication and authorization are used by the <a href="http://www.mapbender.org/index.php/Mapbender_Security_Proxy" title="Mapbender OWS Security Proxy">OWS Security Proxy</a> and management interfaces for multi client capable user, group and service administration. The embedded metadata component follows ISO 19119 specification.
-</p>
-</td></tr>
-</table>
-<br>
-<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
- <tr><td bgcolor="#ffffff">
- <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> Login
- <br>
- <iframe id='login' name='login' scrolling="no" frameborder='0' src ='frames/login.php' style ='width:400;height:100;' >
- </iframe>
- </td></tr>
-</table>
-<br>
-<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
-<tr><td bgcolor="#ffffff">
-
- Create new user (neuen Benutzer anlegen)
-
- <iframe id='createUser' name='createUser' scrolling="auto" frameborder='0' src ='php/mod_createUser.php' style ='width:400;height:242;' >
- </iframe>
-</table>
-<br>
-<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
-<tr><td bgcolor="#ffffff">
-Have a lot of fun with
-<font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> !
-</td></tr>
-</table>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/index.php (from rev 2221, branches/2.4.5/http/index.php)
===================================================================
--- branches/2.4.5_rc1/http/index.php (rev 0)
+++ branches/2.4.5_rc1/http/index.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,150 @@
+<?php
+# $Id$
+# maintained by http://www.mapbender.org/index.php/User:Astrid_Emde
+# http://www.mapbender.org/index.php/Mapbender_Portal
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 4.01 Transitional//EN">
+<html>
+<head>
+<!--
+Licensing: See the GNU General Public License for more details.
+http://www.gnu.org/copyleft/gpl.html
+or:
+mapbender/licence/
+-->
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+<title>Welcome to the Mapbender Portal</title>
+<link rel="stylesheet" type="text/css" href="css/mapbender.css" />
+<script type="text/javascript">
+<!--
+function changeTarget()
+{
+ if (window.frames[0].document.forms['loginForm'].target){
+ window.frames['login'].document.forms['loginForm'].setAttribute("target","_blank");
+ }
+ else{
+ window.frames[0].document.forms['loginForm'].setAttribute("target","_blank");
+ }
+}
+// -->
+</script>
+<body onload='changeTarget()'>
+
+<table BGCOLOR="#ffffff" width="70%" height="70%" ALIGN="top" CELLSPACING="0" CELLPADDING="10" STYLE="-moz-border-radius:8px; border:2px #000000 solid;">
+<tr><td COLSPAN="2" VALIGN="center" STYLE="margin-bottom:0px; padding-bottom:0px;">
+<div class="mapbender_headline" >
+ <font align="left" color="#000000"> Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font>
+</div>
+
+<hr STYLE="color:#629093; height:2px; margin:0px; padding:0px;" WIDTH="100%" NOSHADE COLOR="#808080">
+</td></tr>
+<tr><td WIDTH="210" VALIGN="TOP">
+<table width="92%" height="99%" cellspacing="1" cellpadding="3" STYLE="-moz-border-radius:8px; border:2px #808080 solid;">
+<tr>
+ <td bgcolor="#F0F0F0" valign="top">
+ <br>
+ <a href="http://www.mapbender.org" target="_blank"><b>Homepage</b></a><br>
+ <br>
+ <a href="http://www.mapbender.org/index.php/Modules" target="_blank"><b>Documentation</b></a><br>
+ <br>
+ <a href="http://www.mapbender.org/index.php/Mapbender_Gallery" target="_blank"><b>Application Gallery</b></a><br>
+ <br>
+ <a href="http://wms1.ccgis.de/mapbender2/frames/login.php?name=mb&password=mb&mb_user_myGui=mapbender" target="_blank"><b>Mapbender User Map</b></a><br>
+ <br>
+ <a href="http://mapbender.osgeo.org" target="_blank"><b>Mapbender on OSGeo</b></a><br>
+ <br>
+ <br>
+ <br>
+ <a href="http://www.mapbender.org/download/" target="_blank"><b>Download</b></a><br>
+ <br>
+ <a href="http://www.mapbender.org/index.php/SVN" target="_blank"><b>Source Code Repository</b></a><br>
+ <br>
+ <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_users" target="_blank"><b>User Mailing List</b></a><br>
+ <br>
+ <a href="http://lists.osgeo.org/mailman/listinfo/mapbender_dev" target="_blank"><b>Devel Mailing List</b></a><br>
+ <br>
+ <a href="http://www.mapbender.org/index.php/Bugs" target="_blank"><b>Bug & Issue Tracker</b></a><br>
+ <br>
+ <br>
+ <br>
+ <a href="http://mapbender.telascience.org/" target="_blank"><b>Mapbender Development Server</b></a><br>
+ <br>
+ <br>
+ <a href="http://www.osgeo.org" title="Open Source Geospatial Foundation" alt="Link to the OSGeo Portal" target="_blank">
+ <br>
+ <img title="OSGeo logo" src = "./img/OSGeo_150pix.png">
+ </a>
+ <br><br>
+ Mapbender is an official OSGeo Project licensed under the <a href="http://www.gnu.org/licenses/licenses.html#GPL" title="GNU GPL license" alt="Link to the GNU license">GNU GPL</a>
+ <br>
+ </td>
+</tr>
+</table>
+<br>
+<br>
+</td>
+
+<td WIDTH="480" VALIGN="TOP" STYLE="line-height:133%">
+<div>
+ <table width="93%" cellspacing="1" cellpadding="5" STYLE="-moz-border-radius:8px; border:2px #808080 solid;">
+ <tr><td bgcolor="#F0F0F0">
+
+ <div class="mapbender_welcome">Welcome to <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font></div>
+
+ <font color="#ff0000">Mapbender Version 2.4.5 RC1 (2008-03-10)</font>
+ </td></tr>
+ </table>
+<br>
+
+<table width="93%" cellspacing="1" cellpadding="5" STYLE="-moz-border-radius:8px; border:1px #808080 solid;">
+<tr><td bgcolor="#ffffff">
+<p>
+ <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> is the geospatial portal site management software for OGC OWS architectures. Mapbender comes with a data model to manage interfaces for displaying, navigating and querying OGC compliant web map and feature services (WMS and transactional WFS). Authentication and authorization are used by the <a href="http://www.mapbender.org/index.php/Mapbender_Security_Proxy" title="Mapbender OWS Security Proxy">OWS Security Proxy</a> and management interfaces for multi client capable user, group and service administration. The embedded metadata component follows ISO 19119 specification.
+</p>
+</td></tr>
+</table>
+<br>
+<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
+ <tr><td bgcolor="#ffffff">
+ <font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> Login
+ <br>
+ <iframe id='login' name='login' scrolling="no" frameborder='0' src ='frames/login.php' style ='width:400;height:100;' >
+ </iframe>
+ </td></tr>
+</table>
+<br>
+<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
+<tr><td bgcolor="#ffffff">
+
+ Create new user (neuen Benutzer anlegen)
+
+ <iframe id='createUser' name='createUser' scrolling="auto" frameborder='0' src ='php/mod_createUser.php' style ='width:400;height:242;' >
+ </iframe>
+</table>
+<br>
+<table width="93%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #808080 solid;">
+<tr><td bgcolor="#ffffff">
+Have a lot of fun with
+<font align="left" color="#000000">Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font> !
+</td></tr>
+</table>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/geometry.js
===================================================================
--- branches/2.4.5/http/javascripts/geometry.js 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/geometry.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,98 +0,0 @@
-var nameGeometryArray="GeometryArray";var nameMultiGeometry="MultiGeometry";var nameGeometry="Geometry";function GeomType(){this.polygon="polygon";this.line="line";this.point="point";}
-var geomType=new GeomType();function GeometryArray(){this.addMember=function(geomType){this.add(new MultiGeometry(geomType));};this.name=nameGeometryArray;this.list=[];}
-GeometryArray.prototype=new List();GeometryArray.prototype.getGeometry=function(i,j){return this.get(i).get(j);};GeometryArray.prototype.getPoint=function(i,j,k){return this.get(i).get(j).get(k);};GeometryArray.prototype.findMultiGeometry=function(geom){var a=[];for(var i=0;i<this.count();i++){if(this.get(i).equals(geom)){a.push(i);}}
-return a;};GeometryArray.prototype.delGeometry=function(i,j){if(this.get(i).del(j)===false){this.del(i);}};GeometryArray.prototype.delPoint=function(i,j,k){var res=this.get(i).delPoint(j,k);if(res===false){this.del(i);}};GeometryArray.prototype.close=function(){if(!this.get(-1).get(-1).close()){this.delGeometry(-1,-1);}
-else{if(this.get(-1).get(-1).count()===0){this.get(-1).del(-1);}
-if(this.get(-1).count()===0){this.del(-1);}}};GeometryArray.prototype.delAllPointsLike=function(point){var finished=false;while(finished===false){finished=true;for(var i=0;finished===true&&i<this.count();i++){for(var j=0;finished===true&&j<this.get(i).count();j++){for(var k=0;finished===true&&k<this.get(i).get(j).count();k++){if(this.getPoint(i,j,k).equals(point)){this.delPoint(i,j,k);finished=false;}}}}}};GeometryArray.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};function MultiGeometry(geomType){this.addGeometry=function(){this.add(new Geometry(this.geomType));};this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];e[z]=e[z+1];}
-this.list.length-=1;if(this.list.length===0){return false;}}
-return true;};this.list=[];this.e=new Wfs_element();this.geomType=geomType;this.name=nameMultiGeometry;}
-MultiGeometry.prototype=new List();MultiGeometry.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};MultiGeometry.prototype.getBBox=function(){var q=this.get(0).get(0);var min=cloneObject(q);var max=cloneObject(q);for(var i=0;i<this.count();i++){var pos=this.get(i).getBBox();if(pos[0].x<min.x){min.x=pos[0].x;}
-if(pos[1].x>max.x){max.x=pos[1].x;}
-if(pos[1].y>max.y){max.y=pos[1].y;}
-if(pos[0].y<min.y){min.y=pos[0].y;}}
-return[min,max];};MultiGeometry.prototype.getCenter=function(){var tmp=this.getBBox();var x=parseFloat(tmp[0].x)+parseFloat((tmp[1].x-tmp[0].x)/2);var y=parseFloat(tmp[0].y)+parseFloat((tmp[1].y-tmp[0].y)/2);return new Point(x,y);};MultiGeometry.prototype.getTotalPointCount=function(){var c=0;for(var i=0;i<this.count();i++){c+=this.get(i).count();}
-return c;};MultiGeometry.prototype.getPoint=function(j,k){return this.get(j).get(k);};MultiGeometry.prototype.equals=function(multigeom){if(this.geomType!=multigeom.geomType){return false;}
-if(this.count()!=multigeom.count()){return false;}
-if(this.getTotalPointCount()!=multigeom.getTotalPointCount()){return false;}
-for(var i=0;i<this.count();i++){if(!this.get(i).equals(multigeom.get(i))){return false;}}
-return true;};MultiGeometry.prototype.delPoint=function(i,j){var res=this.get(i).del(j);if(res===false){return this.del(i);}
-return true;};function Geometry(aGeomtype){this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];}
-this.list.length-=1;if(this.geomType==geomType.polygon){if(i==tmpLength){this.list[0]=this.list[tmpLength-1];}
-else if(i===0){this.list[tmpLength-1]=this.list[0];}
-if(this.list.length==1){return false;}}
-updateDist();if(this.list.length===0){return false;}
-return true;}
-return false;};this.addPointByCoordinates=function(x,y){this.add(new Point(x,y));updateDist();};this.addPoint=function(aPoint){this.add(new Point(aPoint.x,aPoint.y));updateDist();};this.addPointAtIndex=function(p,i){i=this.getIndex(i);if(i!==false){for(var z=this.count();z>i;z--){this.list[z]=this.list[z-1];}
-this.list[i]=new Point(p.x,p.y);updateDist();}};this.updatePointAtIndex=function(p,i){i=this.getIndex(i);if((i===0||i==this.count()-1)&&this.geomType==geomType.polygon){this.list[0]=p;this.list[this.count()-1]=p;}
-else{this.list[i]=p;}
-updateDist();};var updateDist=function(){dist[0]=0;totaldist[0]=0;for(var i=1;i<that.count();i++){dist[i]=that.get(i-1).dist(that.get(i));totaldist[i]=totaldist[i-1]+dist[i];}};this.getCurrentDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(dist[this.count()-1],numberOfDigits);}
-return dist[this.count()-1];};this.getTotalDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(totaldist[this.count()-1],numberOfDigits);}
-return totaldist[this.count()-1];};this.close=function(){complete=true;if(this.geomType==geomType.polygon){if(this.count()>2){if(!this.get(0).equals(this.get(-1))){this.addPoint(this.get(0));}}
-else{return false;}}
-if(this.geomType==geomType.line){if(this.count()<2){return false;}}
-return true;};this.isComplete=function(){return complete;};this.list=[];var dist=[];var totaldist=[];var complete=false;var that=this;this.geomType=aGeomtype;this.name=nameGeometry;}
-Geometry.prototype=new List();Geometry.prototype.getBBox=function(){var q=this.get(0);var min=cloneObject(q);var max=cloneObject(q);for(var j=0;j<this.count();j++){var pos=this.get(j);if(pos.x<min.x){min.x=pos.x;}
-else if(pos.x>max.x){max.x=pos.x;}
-if(pos.y<min.y){min.y=pos.y;}
-else if(pos.y>max.y){max.y=pos.y;}}
-return[min,max];};Geometry.prototype.updateAllPointsLike=function(oldP,newP){var len=this.count();for(var i=0;i<len;i++){if(oldP.equals(this.get(i))){if(i>0&&newP.equals(this.get(i-1))){this.del(i);len--;i--;}
-else{this.updatePointAtIndex(newP,i);}}}};Geometry.prototype.equals=function(geom){if(this.geomType!=geom.geomType){return false;}
-if(this.count()!=geom.count()){return false;}
-for(var i=0;i<this.count();i++){if(!this.get(i).equals(geom.get(i))){return false;}}
-return true;};function Wfs_element(){this.count=function(){return name.length;};this.getName=function(i){if(isValidElementIndex(i)){return name[i];}
-return false;};this.getValue=function(i){if(isValidElementIndex(i)){return value[i];}
-return false;};this.setElement=function(aName,aValue){var i=this.getElementIndexByName(aName);if(i===false){i=this.count();}
-name[i]=aName;value[i]=aValue;};var isValidElementIndex=function(i){if(i>=0&&i<name.length){return true;}
-var e=new Mb_exception("class Wfs_element: function isValidElementIndex: illegal element index");return false;};var name=[];var value=[];}
-Wfs_element.prototype.getElementIndexByName=function(elementName){for(var j=0;j<this.count();j++){if(this.getName(j)==elementName){return j;}}
-return false;};Wfs_element.prototype.getElementValueByName=function(elementName){var i=this.getElementIndexByName(elementName);if(i===false){return false;}
-return this.getValue(i);};function Canvas(aMapframe,aTagName,aStyle,aLineWidth){this.drawGeometry=function(t,g,col){var mapObjInd=getMapObjIndexByName(mapframe);width=mb_mapObj[mapObjInd].width;height=mb_mapObj[mapObjInd].height;for(var i=0;i<g.count();i++){if(t==geomType.point){var p=realToMap(mapframe,g.get(i).get(0));if(p.x+diameter<mb_mapObj[mapObjInd].width&&p.x-diameter>0&&p.y+diameter<mb_mapObj[mapObjInd].height&&p.y-diameter>0){drawCircle(p.x-1,p.y-1,diameter,col);}}
-else if(t==geomType.line||t==geomType.polygon){for(var j=0;j<g.get(i).count()-1;j++){var pq=calculateVisibleDash(realToMap(mapframe,g.get(i).get(j)),realToMap(mapframe,g.get(i).get(j+1)),width,height);if(pq){drawLine([pq[0].x-1,pq[1].x-1],[pq[0].y-1,pq[1].y-1],col);}}}
-else{var e=new Mb_exception("class Canvas: function drawGeometry: unknown geomType "+t);}}};this.isTooSmall=function(g){var tmp=g.getBBox();var min=realToMap(mapframe,tmp[0]);var max=realToMap(mapframe,tmp[1]);if((Math.abs(max.x-min.x)<minWidth)&&(Math.abs(max.y-min.y)<minWidth)){return true;}
-return false;};this.getCanvas=function(){return canvas;};var drawCircle=function(x,y,diameter,color){canvas.setColor(color);canvas.drawEllipse(x-diameter/2,y-diameter/2,diameter,diameter);};var drawLine=function(x_array,y_array,color){canvas.setColor(color);canvas.drawPolyline(x_array,y_array);};this.canvasDivTag=new DivTag(aTagName,aMapframe,aStyle);var that=this;var diameter=8;var minWidth=8;var lineWidth=aLineWidth;var mapframe=aMapframe;var style=aStyle;var canvas=new jsGraphics(aTagName,window.frames[mapframe]);canvas.setStroke(lineWidth);mb_registerPanSubElement(aTagName);}
-Canvas.prototype.clean=function(){this.canvasDivTag.clean();};Canvas.prototype.paint=function(gA){for(var q=0;q<gA.count();q++){var m=gA.get(q);var t=m.geomType;var col=m.color;if(t==geomType.point){this.drawGeometry(t,m,col);}
-else{if(this.isTooSmall(m)){var newMember=new MultiGeometry(geomType.point);newMember.addGeometry();newMember.get(-1).addPoint(m.getCenter());this.drawGeometry(geomType.point,newMember,col);}
-else{if(t==geomType.line){this.drawGeometry(t,m,col);}
-else if(t==geomType.polygon){this.drawGeometry(t,m,col);}
-else{var e=new Mb_exception("class Canvas: function paint: unknown geomType"+t);}}}}
-this.getCanvas().paint();};function Highlight(aTargetArray,aTagName,aStyle,aLineWidth){this.del=function(m,color){var a=gA.findMultiGeometry(m);var del=false;for(var i=0;i<a.length&&del===false;i++){if(gA.get(a[i]).color==color){gA.del(a[i]);del=true;}}
-this.paint();};this.add=function(m,color){gA.addCopy(m);if(typeof(color)!='undefined'){gA.get(-1).color=color;}
-else{gA.get(-1).color=lineColor;}
-this.paint();};this.clean=function(){if(gA.count()>0){gA=new GeometryArray();this.paint();}};this.paint=function(){for(var i=0;i<canvas.length;i++){if(typeof(canvas[i])=="object"){canvas[i].clean();}}
-for(var i=0;i<targets.length;i++){if(typeof(canvas[i])=='undefined'){canvas[i]=new Canvas(targets[i],tagname,style,lineWidth);}
-canvas[i].paint(gA);}};var lineWidth=aLineWidth;var tagname='mod_gaz_draw'+aTagName;var style=aStyle;var targets=aTargetArray;var canvas=[];var gA=new GeometryArray();var lineColor="#ff0000";this.paint();}
-function Snapping(aTarget,aTolerance,aColor,aZIndex){this.draw=function(center,radius){mG=new MultiGeometry(geomType.point);mG.addGeometry();mG.get(-1).addPoint(center);highlight.add(mG);};this.getTolerance=function(){return tolerance;};this.getTarget=function(){return target;};this.cleanHighlight=function(){return highlight.clean();};this.addPoint=function(aPoint){coord.push(aPoint);};this.getPointCount=function(){return coord.length;};this.getPoint=function(i){return coord[i];};this.resetPoints=function(){coord=[];};this.getNearestNeighbour=function(){if(min_i!=-1){return this.getPoint(min_i);}
-return false;};this.setIndexOfNearestNeighbour=function(i){min_i=i;};this.resetIndexOfNearestNeighbour=function(){min_i=-1;};var tolerance=(typeof(aTolerance)=='undefined')?10:aTolerance;var zIndex=(typeof(aZIndex)=='undefined')?50:aZIndex;var coord=[];var min_i=-1;var target=aTarget;var lineWidth=2;var style={"position":"absolute","top":"0px","left":"0px","z-index":zIndex};var highlight=new Highlight([target],"snapping"+Math.round(Math.random()*Math.pow(10,10)),style,lineWidth);}
-Snapping.prototype.check=function(currPoint){var minDist=false;for(var i=0;i<this.getPointCount();i++){var currDist=currPoint.dist(realToMap(this.getTarget(),this.getPoint(i)));if(minDist===false||currDist<minDist){minDist=currDist;if(minDist<this.getTolerance()){this.setIndexOfNearestNeighbour(i);}}}
-if(this.getPointCount()>0&&minDist>this.getTolerance()){this.resetIndexOfNearestNeighbour();}
-this.cleanHighlight();if(this.isSnapped()){this.draw(this.getNearestNeighbour(),this.getTolerance());}};Snapping.prototype.store=function(geom,point){this.resetPoints();this.resetIndexOfNearestNeighbour();for(var i=0;i<geom.count();i++){if(geom.name==nameGeometryArray||geom.name==nameMultiGeometry){for(var j=0;j<geom.get(i).count();j++){if(geom.get(i).name==nameMultiGeometry){for(var k=0;k<geom.get(i).get(j).count();k++){if((geom.get(i).get(j).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j,k));}}}
-else{if((geom.get(i).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j));}}}}
-else{if(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point)){this.add(geom.get(i));}}}};Snapping.prototype.isSnapped=function(){if(this.getNearestNeighbour()!==false){return true;}
-return false;};Snapping.prototype.getSnappedPoint=function(){return this.getNearestNeighbour();};Snapping.prototype.add=function(aPoint){this.addPoint(aPoint);};Snapping.prototype.clean=function(){this.cleanHighlight();};function calculateVisibleDash(p0,p1,width,height){if(p0.x>p1.x){var p_temp=p0;p0=p1;p1=p_temp;p_temp=null;}
-var p=p0;var q=p1;var m;var ix;var iy;if(p1.x!=p0.x){m=-(p1.y-p0.y)/(p1.x-p0.x);if(p0.x<width&&p1.x>0&&!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.x<0){iy=p0.y-m*(0-p0.x);if(iy>0&&iy<height){p=new Point(0,iy);}
-else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
-else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
-else{return false;}}
-else if(p0.y>=0&&p0.y<=height){p=p0;}
-else if(p0.y<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
-else if(p0.y>height&&m>0){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
-else{return false;}
-if(p1.x>width){iy=p1.y-m*(width-p1.x);if(iy>0&&iy<height){q=new Point(width,iy);}
-else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
-else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}
-else{return false;}}
-else if(p1.y>=0&&p1.y<=height){q=p1;}
-else if(p1.y<0){ix=p1.x+(p1.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
-else if(p1.y>height){ix=p1.x+((p1.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}}
-else{return false;}}
-else{if(!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.y<0){p=new Point(p0.x,0);}
-else if(p0.y>height){p=new Point(p0.x,height);}
-else{p=p0;}
-if(p1.y<0){q=new Point(p0.x,0);}
-else if(p1.y>height){q=new Point(p0.x,height);}
-else{q=p1;}}
-else{return false;}}
-return[new Point(Math.round(q.x),Math.round(q.y)),new Point(Math.round(p.x),Math.round(p.y))];}
-function objString(a){var z="";for(attr in a){var b=a[attr];if(typeof(b)=="object"){z+=objString(b);}
-else{z+=attr+" "+b+"\n";alert(attr+" "+b);}}
-return z;}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/geometry.js (from rev 2183, branches/2.4.5/http/javascripts/geometry.js)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/geometry.js (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/geometry.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,98 @@
+var nameGeometryArray="GeometryArray";var nameMultiGeometry="MultiGeometry";var nameGeometry="Geometry";function GeomType(){this.polygon="polygon";this.line="line";this.point="point";}
+var geomType=new GeomType();function GeometryArray(){this.addMember=function(geomType){this.add(new MultiGeometry(geomType));};this.name=nameGeometryArray;this.list=[];}
+GeometryArray.prototype=new List();GeometryArray.prototype.getGeometry=function(i,j){return this.get(i).get(j);};GeometryArray.prototype.getPoint=function(i,j,k){return this.get(i).get(j).get(k);};GeometryArray.prototype.findMultiGeometry=function(geom){var a=[];for(var i=0;i<this.count();i++){if(this.get(i).equals(geom)){a.push(i);}}
+return a;};GeometryArray.prototype.delGeometry=function(i,j){if(this.get(i).del(j)===false){this.del(i);}};GeometryArray.prototype.delPoint=function(i,j,k){var res=this.get(i).delPoint(j,k);if(res===false){this.del(i);}};GeometryArray.prototype.close=function(){if(!this.get(-1).get(-1).close()){this.delGeometry(-1,-1);}
+else{if(this.get(-1).get(-1).count()===0){this.get(-1).del(-1);}
+if(this.get(-1).count()===0){this.del(-1);}}};GeometryArray.prototype.delAllPointsLike=function(point){var finished=false;while(finished===false){finished=true;for(var i=0;finished===true&&i<this.count();i++){for(var j=0;finished===true&&j<this.get(i).count();j++){for(var k=0;finished===true&&k<this.get(i).get(j).count();k++){if(this.getPoint(i,j,k).equals(point)){this.delPoint(i,j,k);finished=false;}}}}}};GeometryArray.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};function MultiGeometry(geomType){this.addGeometry=function(){this.add(new Geometry(this.geomType));};this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];e[z]=e[z+1];}
+this.list.length-=1;if(this.list.length===0){return false;}}
+return true;};this.list=[];this.e=new Wfs_element();this.geomType=geomType;this.name=nameMultiGeometry;}
+MultiGeometry.prototype=new List();MultiGeometry.prototype.updateAllPointsLike=function(oldP,newP){for(var i=0;i<this.count();i++){this.get(i).updateAllPointsLike(oldP,newP);}};MultiGeometry.prototype.getBBox=function(){var q=this.get(0).get(0);var min=cloneObject(q);var max=cloneObject(q);for(var i=0;i<this.count();i++){var pos=this.get(i).getBBox();if(pos[0].x<min.x){min.x=pos[0].x;}
+if(pos[1].x>max.x){max.x=pos[1].x;}
+if(pos[1].y>max.y){max.y=pos[1].y;}
+if(pos[0].y<min.y){min.y=pos[0].y;}}
+return[min,max];};MultiGeometry.prototype.getCenter=function(){var tmp=this.getBBox();var x=parseFloat(tmp[0].x)+parseFloat((tmp[1].x-tmp[0].x)/2);var y=parseFloat(tmp[0].y)+parseFloat((tmp[1].y-tmp[0].y)/2);return new Point(x,y);};MultiGeometry.prototype.getTotalPointCount=function(){var c=0;for(var i=0;i<this.count();i++){c+=this.get(i).count();}
+return c;};MultiGeometry.prototype.getPoint=function(j,k){return this.get(j).get(k);};MultiGeometry.prototype.equals=function(multigeom){if(this.geomType!=multigeom.geomType){return false;}
+if(this.count()!=multigeom.count()){return false;}
+if(this.getTotalPointCount()!=multigeom.getTotalPointCount()){return false;}
+for(var i=0;i<this.count();i++){if(!this.get(i).equals(multigeom.get(i))){return false;}}
+return true;};MultiGeometry.prototype.delPoint=function(i,j){var res=this.get(i).del(j);if(res===false){return this.del(i);}
+return true;};function Geometry(aGeomtype){this.del=function(i){i=this.getIndex(i);if(i!==false){var tmpLength=this.count()-1;for(var z=i;z<tmpLength;z++){this.list[z]=this.list[z+1];}
+this.list.length-=1;if(this.geomType==geomType.polygon){if(i==tmpLength){this.list[0]=this.list[tmpLength-1];}
+else if(i===0){this.list[tmpLength-1]=this.list[0];}
+if(this.list.length==1){return false;}}
+updateDist();if(this.list.length===0){return false;}
+return true;}
+return false;};this.addPointByCoordinates=function(x,y){this.add(new Point(x,y));updateDist();};this.addPoint=function(aPoint){this.add(new Point(aPoint.x,aPoint.y));updateDist();};this.addPointAtIndex=function(p,i){i=this.getIndex(i);if(i!==false){for(var z=this.count();z>i;z--){this.list[z]=this.list[z-1];}
+this.list[i]=new Point(p.x,p.y);updateDist();}};this.updatePointAtIndex=function(p,i){i=this.getIndex(i);if((i===0||i==this.count()-1)&&this.geomType==geomType.polygon){this.list[0]=p;this.list[this.count()-1]=p;}
+else{this.list[i]=p;}
+updateDist();};var updateDist=function(){dist[0]=0;totaldist[0]=0;for(var i=1;i<that.count();i++){dist[i]=that.get(i-1).dist(that.get(i));totaldist[i]=totaldist[i-1]+dist[i];}};this.getCurrentDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(dist[this.count()-1],numberOfDigits);}
+return dist[this.count()-1];};this.getTotalDist=function(numberOfDigits){if(typeof(numberOfDigits)=="number"){return roundToDigits(totaldist[this.count()-1],numberOfDigits);}
+return totaldist[this.count()-1];};this.close=function(){complete=true;if(this.geomType==geomType.polygon){if(this.count()>2){if(!this.get(0).equals(this.get(-1))){this.addPoint(this.get(0));}}
+else{return false;}}
+if(this.geomType==geomType.line){if(this.count()<2){return false;}}
+return true;};this.isComplete=function(){return complete;};this.list=[];var dist=[];var totaldist=[];var complete=false;var that=this;this.geomType=aGeomtype;this.name=nameGeometry;}
+Geometry.prototype=new List();Geometry.prototype.getBBox=function(){var q=this.get(0);var min=cloneObject(q);var max=cloneObject(q);for(var j=0;j<this.count();j++){var pos=this.get(j);if(pos.x<min.x){min.x=pos.x;}
+else if(pos.x>max.x){max.x=pos.x;}
+if(pos.y<min.y){min.y=pos.y;}
+else if(pos.y>max.y){max.y=pos.y;}}
+return[min,max];};Geometry.prototype.updateAllPointsLike=function(oldP,newP){var len=this.count();for(var i=0;i<len;i++){if(oldP.equals(this.get(i))){if(i>0&&newP.equals(this.get(i-1))){this.del(i);len--;i--;}
+else{this.updatePointAtIndex(newP,i);}}}};Geometry.prototype.equals=function(geom){if(this.geomType!=geom.geomType){return false;}
+if(this.count()!=geom.count()){return false;}
+for(var i=0;i<this.count();i++){if(!this.get(i).equals(geom.get(i))){return false;}}
+return true;};function Wfs_element(){this.count=function(){return name.length;};this.getName=function(i){if(isValidElementIndex(i)){return name[i];}
+return false;};this.getValue=function(i){if(isValidElementIndex(i)){return value[i];}
+return false;};this.setElement=function(aName,aValue){var i=this.getElementIndexByName(aName);if(i===false){i=this.count();}
+name[i]=aName;value[i]=aValue;};var isValidElementIndex=function(i){if(i>=0&&i<name.length){return true;}
+var e=new Mb_exception("class Wfs_element: function isValidElementIndex: illegal element index");return false;};var name=[];var value=[];}
+Wfs_element.prototype.getElementIndexByName=function(elementName){for(var j=0;j<this.count();j++){if(this.getName(j)==elementName){return j;}}
+return false;};Wfs_element.prototype.getElementValueByName=function(elementName){var i=this.getElementIndexByName(elementName);if(i===false){return false;}
+return this.getValue(i);};function Canvas(aMapframe,aTagName,aStyle,aLineWidth){this.drawGeometry=function(t,g,col){var mapObjInd=getMapObjIndexByName(mapframe);width=mb_mapObj[mapObjInd].width;height=mb_mapObj[mapObjInd].height;for(var i=0;i<g.count();i++){if(t==geomType.point){var p=realToMap(mapframe,g.get(i).get(0));if(p.x+diameter<mb_mapObj[mapObjInd].width&&p.x-diameter>0&&p.y+diameter<mb_mapObj[mapObjInd].height&&p.y-diameter>0){drawCircle(p.x-1,p.y-1,diameter,col);}}
+else if(t==geomType.line||t==geomType.polygon){for(var j=0;j<g.get(i).count()-1;j++){var pq=calculateVisibleDash(realToMap(mapframe,g.get(i).get(j)),realToMap(mapframe,g.get(i).get(j+1)),width,height);if(pq){drawLine([pq[0].x-1,pq[1].x-1],[pq[0].y-1,pq[1].y-1],col);}}}
+else{var e=new Mb_exception("class Canvas: function drawGeometry: unknown geomType "+t);}}};this.isTooSmall=function(g){var tmp=g.getBBox();var min=realToMap(mapframe,tmp[0]);var max=realToMap(mapframe,tmp[1]);if((Math.abs(max.x-min.x)<minWidth)&&(Math.abs(max.y-min.y)<minWidth)){return true;}
+return false;};this.getCanvas=function(){return canvas;};var drawCircle=function(x,y,diameter,color){canvas.setColor(color);canvas.drawEllipse(x-diameter/2,y-diameter/2,diameter,diameter);};var drawLine=function(x_array,y_array,color){canvas.setColor(color);canvas.drawPolyline(x_array,y_array);};this.canvasDivTag=new DivTag(aTagName,aMapframe,aStyle);var that=this;var diameter=8;var minWidth=8;var lineWidth=aLineWidth;var mapframe=aMapframe;var style=aStyle;var canvas=new jsGraphics(aTagName,window.frames[mapframe]);canvas.setStroke(lineWidth);mb_registerPanSubElement(aTagName);}
+Canvas.prototype.clean=function(){this.canvasDivTag.clean();};Canvas.prototype.paint=function(gA){for(var q=0;q<gA.count();q++){var m=gA.get(q);var t=m.geomType;var col=m.color;if(t==geomType.point){this.drawGeometry(t,m,col);}
+else{if(this.isTooSmall(m)){var newMember=new MultiGeometry(geomType.point);newMember.addGeometry();newMember.get(-1).addPoint(m.getCenter());this.drawGeometry(geomType.point,newMember,col);}
+else{if(t==geomType.line){this.drawGeometry(t,m,col);}
+else if(t==geomType.polygon){this.drawGeometry(t,m,col);}
+else{var e=new Mb_exception("class Canvas: function paint: unknown geomType"+t);}}}}
+this.getCanvas().paint();};function Highlight(aTargetArray,aTagName,aStyle,aLineWidth){this.del=function(m,color){var a=gA.findMultiGeometry(m);var del=false;for(var i=0;i<a.length&&del===false;i++){if(gA.get(a[i]).color==color){gA.del(a[i]);del=true;}}
+this.paint();};this.add=function(m,color){gA.addCopy(m);if(typeof(color)!='undefined'){gA.get(-1).color=color;}
+else{gA.get(-1).color=lineColor;}
+this.paint();};this.clean=function(){if(gA.count()>0){gA=new GeometryArray();this.paint();}};this.paint=function(){for(var i=0;i<canvas.length;i++){if(typeof(canvas[i])=="object"){canvas[i].clean();}}
+for(var i=0;i<targets.length;i++){if(typeof(canvas[i])=='undefined'){canvas[i]=new Canvas(targets[i],tagname,style,lineWidth);}
+canvas[i].paint(gA);}};var lineWidth=aLineWidth;var tagname='mod_gaz_draw'+aTagName;var style=aStyle;var targets=aTargetArray;var canvas=[];var gA=new GeometryArray();var lineColor="#ff0000";this.paint();}
+function Snapping(aTarget,aTolerance,aColor,aZIndex){this.draw=function(center,radius){mG=new MultiGeometry(geomType.point);mG.addGeometry();mG.get(-1).addPoint(center);highlight.add(mG);};this.getTolerance=function(){return tolerance;};this.getTarget=function(){return target;};this.cleanHighlight=function(){return highlight.clean();};this.addPoint=function(aPoint){coord.push(aPoint);};this.getPointCount=function(){return coord.length;};this.getPoint=function(i){return coord[i];};this.resetPoints=function(){coord=[];};this.getNearestNeighbour=function(){if(min_i!=-1){return this.getPoint(min_i);}
+return false;};this.setIndexOfNearestNeighbour=function(i){min_i=i;};this.resetIndexOfNearestNeighbour=function(){min_i=-1;};var tolerance=(typeof(aTolerance)=='undefined')?10:aTolerance;var zIndex=(typeof(aZIndex)=='undefined')?50:aZIndex;var coord=[];var min_i=-1;var target=aTarget;var lineWidth=2;var style={"position":"absolute","top":"0px","left":"0px","z-index":zIndex};var highlight=new Highlight([target],"snapping"+Math.round(Math.random()*Math.pow(10,10)),style,lineWidth);}
+Snapping.prototype.check=function(currPoint){var minDist=false;for(var i=0;i<this.getPointCount();i++){var currDist=currPoint.dist(realToMap(this.getTarget(),this.getPoint(i)));if(minDist===false||currDist<minDist){minDist=currDist;if(minDist<this.getTolerance()){this.setIndexOfNearestNeighbour(i);}}}
+if(this.getPointCount()>0&&minDist>this.getTolerance()){this.resetIndexOfNearestNeighbour();}
+this.cleanHighlight();if(this.isSnapped()){this.draw(this.getNearestNeighbour(),this.getTolerance());}};Snapping.prototype.store=function(geom,point){this.resetPoints();this.resetIndexOfNearestNeighbour();for(var i=0;i<geom.count();i++){if(geom.name==nameGeometryArray||geom.name==nameMultiGeometry){for(var j=0;j<geom.get(i).count();j++){if(geom.get(i).name==nameMultiGeometry){for(var k=0;k<geom.get(i).get(j).count();k++){if((geom.get(i).get(j).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j,k));}}}
+else{if((geom.get(i).isComplete()===true&&typeof(point)=='undefined')||(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point))){this.add(geom.getPoint(i,j));}}}}
+else{if(typeof(point)!='undefined'&&!geom.get(i).get(j).get(k).equals(point)){this.add(geom.get(i));}}}};Snapping.prototype.isSnapped=function(){if(this.getNearestNeighbour()!==false){return true;}
+return false;};Snapping.prototype.getSnappedPoint=function(){return this.getNearestNeighbour();};Snapping.prototype.add=function(aPoint){this.addPoint(aPoint);};Snapping.prototype.clean=function(){this.cleanHighlight();};function calculateVisibleDash(p0,p1,width,height){if(p0.x>p1.x){var p_temp=p0;p0=p1;p1=p_temp;p_temp=null;}
+var p=p0;var q=p1;var m;var ix;var iy;if(p1.x!=p0.x){m=-(p1.y-p0.y)/(p1.x-p0.x);if(p0.x<width&&p1.x>0&&!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.x<0){iy=p0.y-m*(0-p0.x);if(iy>0&&iy<height){p=new Point(0,iy);}
+else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
+else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
+else{return false;}}
+else if(p0.y>=0&&p0.y<=height){p=p0;}
+else if(p0.y<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){p=new Point(ix,0);}else{return false;}}
+else if(p0.y>height&&m>0){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){p=new Point(ix,height);}else{return false;}}
+else{return false;}
+if(p1.x>width){iy=p1.y-m*(width-p1.x);if(iy>0&&iy<height){q=new Point(width,iy);}
+else if(iy<0){ix=p0.x+(p0.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
+else if(iy>height){ix=p0.x+((p0.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}
+else{return false;}}
+else if(p1.y>=0&&p1.y<=height){q=p1;}
+else if(p1.y<0){ix=p1.x+(p1.y/m);if(ix>0&&ix<width){q=new Point(ix,0);}else{return false;}}
+else if(p1.y>height){ix=p1.x+((p1.y-height)/m);if(ix>0&&ix<width){q=new Point(ix,height);}else{return false;}}}
+else{return false;}}
+else{if(!(p0.y<0&&p1.y<0)&&!(p0.y>height&&p1.y>height)){if(p0.y<0){p=new Point(p0.x,0);}
+else if(p0.y>height){p=new Point(p0.x,height);}
+else{p=p0;}
+if(p1.y<0){q=new Point(p0.x,0);}
+else if(p1.y>height){q=new Point(p0.x,height);}
+else{q=p1;}}
+else{return false;}}
+return[new Point(Math.round(q.x),Math.round(q.y)),new Point(Math.round(p.x),Math.round(p.y))];}
+function objString(a){var z="";for(attr in a){var b=a[attr];if(typeof(b)=="object"){z+=objString(b);}
+else{z+=attr+" "+b+"\n";alert(attr+" "+b);}}
+return z;}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/map.php
===================================================================
--- branches/2.4.5/http/javascripts/map.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/map.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,59 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Map.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-ob_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-// see http://trac.osgeo.org/mapbender/ticket/79
-ini_set('session.bug_compat_42',0);
-ini_set('session.bug_compat_warn',0);
-
-session_start();
-header('Content-type: application/x-javascript');
-
-echo "var mb_nr = '".session_id()."';";
-echo "var mb_myLogin = '".$_SESSION["mb_login"]."';";
-echo "var mb_styleID = '".md5($_SESSION["mb_user_name"])."';";
-echo "var mb_myBBOX = '".$_SESSION["mb_myBBOX"]."';";
-echo "var owsproxy = '".OWSPROXY."';";
-echo "var global_mb_log_js = '".LOG_JS."';";
-echo "var global_mb_log_level = '".LOG_LEVEL."';";
-echo "var global_log_levels = '".LOG_LEVEL_LIST."';";
-
-include("map.js");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos ";
-$mb_sql .= "FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ORDER BY e_pos";
-$v = array($_REQUEST["gui_id"]);
-$t = array("s");
-$mb_res = db_prep_query($mb_sql, $v, $t);
-//$mb_cnt = 0;
-while($row_js = db_fetch_array($mb_res)){
- if($row_js["e_js_file"] != ""){
- $e_id = $row_js["e_id"];
- $e_id_css = $row_js["e_id"];
- $e_src = $row_js["e_src"];
- $e_target = $row_js["e_target"];
- include($row_js["e_js_file"]);
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/map.php (from rev 2174, branches/2.4.5/http/javascripts/map.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/map.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/map.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,56 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Map.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+ob_start();
+
+// see http://trac.osgeo.org/mapbender/ticket/79
+ini_set('session.bug_compat_42',0);
+ini_set('session.bug_compat_warn',0);
+
+header('Content-type: application/x-javascript');
+
+echo "var mb_nr = '".session_id()."';";
+echo "var mb_myLogin = '".$_SESSION["mb_login"]."';";
+echo "var mb_styleID = '".md5($_SESSION["mb_user_name"])."';";
+echo "var mb_myBBOX = '".$_SESSION["mb_myBBOX"]."';";
+echo "var owsproxy = '".OWSPROXY."';";
+echo "var global_mb_log_js = '".LOG_JS."';";
+echo "var global_mb_log_level = '".LOG_LEVEL."';";
+echo "var global_log_levels = '".LOG_LEVEL_LIST."';";
+
+include("map.js");
+
+$mb_sql = "SELECT DISTINCT e_js_file, e_id, e_src, e_target, e_pos ";
+$mb_sql .= "FROM gui_element WHERE e_public = 1 AND fkey_gui_id = $1 ";
+$mb_sql .= "ORDER BY e_pos";
+$v = array($gui_id);
+$t = array("s");
+$mb_res = db_prep_query($mb_sql, $v, $t);
+
+while($row_js = db_fetch_array($mb_res)){
+ if($row_js["e_js_file"] != ""){
+ $e_id = $row_js["e_id"];
+ $e_id_css = $row_js["e_id"];
+ $e_src = $row_js["e_src"];
+ $e_target = $row_js["e_target"];
+ include($row_js["e_js_file"]);
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_addWMS.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_addWMS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,52 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_addWMS.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-
-while ($row = db_fetch_array($res)) {
- $e_target = $row["e_target"];
- $e_require = $row["e_requires"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('addWMS: ID not unique!');";
-}
-echo "var mod_addWMS_data = '".$e_require."';";
-$target = explode(",", $e_target);
-echo "var mod_addWMS_target1 = '".trim($target[0])."';";
-echo "var mod_addWMS_target2 = '".trim($target[1])."';";
-?>
-
-function mod_addWMS(){
- var load = prompt("Capabilities - URL:","");
- if(load){
- mod_addWMS_load(load);
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_addWMS.php (from rev 2181, branches/2.4.5/http/javascripts/mod_addWMS.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_addWMS.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,47 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_addWMS.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+
+while ($row = db_fetch_array($res)) {
+ $e_target = $row["e_target"];
+ $e_require = $row["e_requires"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('addWMS: ID not unique!');";
+}
+echo "var mod_addWMS_data = '".$e_require."';";
+$target = explode(",", $e_target);
+echo "var mod_addWMS_target1 = '".trim($target[0])."';";
+echo "var mod_addWMS_target2 = '".trim($target[1])."';";
+?>
+
+function mod_addWMS(){
+ var load = prompt("Capabilities - URL:","");
+ if(load){
+ mod_addWMS_load(load);
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_addWMSfromList.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,202 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_addWMSfromList.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add WMS from Catalog</title>
-<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
-
-<script type="text/javascript">
-<!--
-
-function mod_addWMS(pointer_name,version)
-{
- pointer_name = pointer_name + window.opener.mb_getConjunctionCharacter(pointer_name);
-
- if (version == '1.0.0'){
- var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
- var load = cap;
- }
- else if (version == '1.1.0'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
- var load = cap;
- }
- else if (version == '1.1.1'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
- var load = cap;
- }
-
- if(load){
- window.opener.mod_addWMS_load(load);
- }
-}
-
-// -->
-</script>
-
-</head>
-<body onload='window.focus()'>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_gui_wms = 0;
-$cnt_wms = 0;
-
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-$logged_gui_id=$_SESSION["mb_user_gui"];
-
-/*get infos from gui_element ********************************************************************************************/
-
-$sql_target = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1";
-$v = array($logged_gui_id);
-$t = array('s');
-$res_target = db_prep_query($sql_target, $v, $t);
-$cnt_target = 0;
-while($row = db_fetch_array($res_target)){
- $e_target = $row["e_target"];
- $e_require = $row["e_requires"];
- $cnt_target++;
-}
-if($cnt_target > 1){
- echo "alert('addWMS: ID not unique!');";
-}
-echo "<script language='Javascript'>";
-echo "var gui_id = '".$logged_gui_id."';";
-echo "var mod_addWMS_data = '".$e_require."';";
-$target = explode(",", $e_target);
-echo "var mod_addWMS_target1 = '".trim($target[0])."';";
-echo "var mod_addWMS_target2 = '".trim($target[1])."';";
-echo "</script>";
-/*get infos from gui_element ********************************************************************************************/
-
-
-/*get allocated gui ********************************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-for ($i = 1; $i <= count($arrayGuis); $i++){
- if ($i > 1) {
- $sql_gui .= ",";
- }
- $sql_gui .= "$" . $i;
- array_push($t, "s");
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui, $v, $t);
-while($row = db_fetch_array($res_gui)){
- $gui_id[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-/*get allocated gui ********************************************************************************************/
-
-/*get allocated wms from allocated gui ********************************************************************************************/
-$sql_gui_wms = "SELECT DISTINCT fkey_wms_id FROM gui_wms WHERE fkey_gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-for ($i = 1; $i <= count($arrayGuis); $i++){
- if ($i > 1) {
- $sql_gui_wms .= ",";
- }
- $sql_gui_wms .= "$".$i;
- array_push($t, "s");
-}
-$sql_gui_wms.= ") ORDER BY fkey_wms_id";
-
-$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
-while($row = db_fetch_array($res_gui_wms)){
- $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
- $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
- $cnt_gui_wms++;
-}
-/*get allocated wms from allocated gui ********************************************************************************************/
-
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities,wms_version FROM wms WHERE wms_id IN (";
-$v = $fkey_wms_id;
-$t = array();
-for ($i = 1; $i <= count($fkey_wms_id); $i++){
- if ($i > 1) {
- $sql_wms .= ",";
- }
- $sql_wms .= "$" . $i;
- array_push($t, "s");
-}
-#$sql_wms.= ") ORDER BY wms_id";
-$sql_wms.= ") ORDER BY wms_title";
-
-$res_wms = db_prep_query($sql_wms, $v, $t);
-while($row = db_fetch_array($res_wms)){
- $wms_title[$cnt_wms] = $row["wms_title"];
- $wms_abstract[$cnt_wms] = $row["wms_abstract"];
- $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
- $wms_version[$cnt_wms] = $row["wms_version"];
- $cnt_wms++;
-}
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
-/*INSERT HTML*/
-
-#echo "<table border='2' cellpadding='5' rules='rows'>";
-echo "<table border='1' style='font-size: 11;' cellpadding='2' rules='rows'>";
-echo " <thead bgcolor = 'lightgrey' >";
-echo "<tr ><td height='30'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
-echo " </thead>";
-echo " <tbody >";
-for($i=0; $i<$cnt_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_abstract[$i]."</div></td>";
- echo "</tr>";
-}
-echo " </tbody>";
-echo "</table>";
-
-
-?>
-<script type="text/javascript">
-
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php (from rev 2140, branches/2.4.5/http/javascripts/mod_addWMSfromList.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,201 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_addWMSfromList.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add WMS from Catalog</title>
+<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
+
+<script type="text/javascript">
+<!--
+
+function mod_addWMS(pointer_name,version)
+{
+ pointer_name = pointer_name + window.opener.mb_getConjunctionCharacter(pointer_name);
+
+ if (version == '1.0.0'){
+ var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
+ var load = cap;
+ }
+ else if (version == '1.1.0'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
+ var load = cap;
+ }
+ else if (version == '1.1.1'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+ var load = cap;
+ }
+
+ if(load){
+ window.opener.mod_addWMS_load(load);
+ }
+}
+
+// -->
+</script>
+
+</head>
+<body onload='window.focus()'>
+<?php
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_gui_wms = 0;
+$cnt_wms = 0;
+
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+$logged_gui_id=$_SESSION["mb_user_gui"];
+
+/*get infos from gui_element ********************************************************************************************/
+
+$sql_target = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'addWMS' AND fkey_gui_id = $1";
+$v = array($logged_gui_id);
+$t = array('s');
+$res_target = db_prep_query($sql_target, $v, $t);
+$cnt_target = 0;
+while($row = db_fetch_array($res_target)){
+ $e_target = $row["e_target"];
+ $e_require = $row["e_requires"];
+ $cnt_target++;
+}
+if($cnt_target > 1){
+ echo "alert('addWMS: ID not unique!');";
+}
+echo "<script language='Javascript'>";
+echo "var gui_id = '".$logged_gui_id."';";
+echo "var mod_addWMS_data = '".$e_require."';";
+$target = explode(",", $e_target);
+echo "var mod_addWMS_target1 = '".trim($target[0])."';";
+echo "var mod_addWMS_target2 = '".trim($target[1])."';";
+echo "</script>";
+/*get infos from gui_element ********************************************************************************************/
+
+
+/*get allocated gui ********************************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+for ($i = 1; $i <= count($arrayGuis); $i++){
+ if ($i > 1) {
+ $sql_gui .= ",";
+ }
+ $sql_gui .= "$" . $i;
+ array_push($t, "s");
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui, $v, $t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+/*get allocated gui ********************************************************************************************/
+
+/*get allocated wms from allocated gui ********************************************************************************************/
+$sql_gui_wms = "SELECT DISTINCT fkey_wms_id FROM gui_wms WHERE fkey_gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+for ($i = 1; $i <= count($arrayGuis); $i++){
+ if ($i > 1) {
+ $sql_gui_wms .= ",";
+ }
+ $sql_gui_wms .= "$".$i;
+ array_push($t, "s");
+}
+$sql_gui_wms.= ") ORDER BY fkey_wms_id";
+
+$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
+while($row = db_fetch_array($res_gui_wms)){
+ $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
+ $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
+ $cnt_gui_wms++;
+}
+/*get allocated wms from allocated gui ********************************************************************************************/
+
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities,wms_version FROM wms WHERE wms_id IN (";
+$v = $fkey_wms_id;
+$t = array();
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+ if ($i > 1) {
+ $sql_wms .= ",";
+ }
+ $sql_wms .= "$" . $i;
+ array_push($t, "s");
+}
+#$sql_wms.= ") ORDER BY wms_id";
+$sql_wms.= ") ORDER BY wms_title";
+
+$res_wms = db_prep_query($sql_wms, $v, $t);
+while($row = db_fetch_array($res_wms)){
+ $wms_title[$cnt_wms] = $row["wms_title"];
+ $wms_abstract[$cnt_wms] = $row["wms_abstract"];
+ $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
+ $wms_version[$cnt_wms] = $row["wms_version"];
+ $cnt_wms++;
+}
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+/*INSERT HTML*/
+
+#echo "<table border='2' cellpadding='5' rules='rows'>";
+echo "<table border='1' style='font-size: 11;' cellpadding='2' rules='rows'>";
+echo " <thead bgcolor = 'lightgrey' >";
+echo "<tr ><td height='30'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
+echo " </thead>";
+echo " <tbody >";
+for($i=0; $i<$cnt_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMS(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+}
+echo " </tbody>";
+echo "</table>";
+
+
+?>
+<script type="text/javascript">
+
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_addWMSfromfilteredList.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,756 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-include '../include/dyn_css.php';
-?>
-<title>Add WMS from Filtered Catalog</title>
-<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
-
-<STYLE TYPE="text/css">
-<!--
-body{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:10pt
-}
-
-table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:11;
-}
-
-.wms_button{
- color: black;
- border: solid thin;
- height:22px;
- width:60px;
-}
-
--->
-</STYLE>
-
-
-<script type="text/javascript">
-<!--
-function mod_addWMSfromDB(gui_id, wms_id) {
- //alert("1/3 mod_addWMSfromDB: GUI ID = " + gui_id + ", WMS ID = " + wms_id);
- window.opener.mod_addWMSById_load(gui_id, wms_id);
-}
-function mod_addWMSfromfilteredList(pointer_name,version){
-
- pointer_name=pointer_name + window.opener.mb_getConjunctionCharacter(pointer_name);
-
- if (version == '1.0.0'){
- var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
- var load = cap;
- }
- else if (version == '1.1.0'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
- var load = cap;
- }
- else if (version == '1.1.1'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
- var load = cap;
- }
- //alert (load);
-
- if(load){
- if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
- window.opener.mod_addWMS_load('http://localhost' + load);
- }
- else{
- window.opener.mod_addWMS_load(load);
- }
- }
-}
-
-function mod_show_group_wms(wert){
- document.form1.show_group_wms.value = wert;
- document.form1.submit();
-}
-
-function mod_show_gui_wms(wert2){
- document.form1.show_gui_wms.value = wert2;
- document.form1.submit();
-}
-
-function mod_show_gui_configured_wms(wert2){
- document.form1.show_gui_configured_wms.value = wert2;
- document.form1.submit();
-}
-
-function mod_show_wms(wert3){
-
- document.form1.wms_show.value = wert3;
- if (wert3 == 4) {
- document.form1.wmsSource.nodeValue = "db";
- }
- else {
- document.form1.wmsSource.nodeValue = "capabilities";
- }
- document.form1.submit();
-}
-
-function setButtons(wms_option, wms_option2, wms_option3, wms_option4) {
- if (typeof(option_all) == "undefined") {
- option_all = '<?php echo $set_option_all;?>';
- }
- document.getElementById("set_option_all").value = option_all;
- if (typeof(option_group) == "undefined") {
- option_group = '<?php echo $set_option_group;?>';
- }
- document.getElementById("set_option_group").value = option_group;
- if (typeof(option_gui) == "undefined") {
- option_gui = '<?php echo $set_option_gui;?>';
- }
- document.getElementById("set_option_gui").value = option_gui;
- if (typeof(option_db) == "undefined") {
- option_db = '<?php echo $set_option_db;?>';
- }
- document.getElementById("set_option_db").value = option_db;
-
- if (wms_option == '' && wms_option2 == '' && wms_option3 == '' && wms_option4 == '') {
- if (option_all == '1') {
- mod_show_wms(1);
- }
- else if (option_group == '1') {
- mod_show_wms(2);
- }
- else if (option_gui == '1') {
- mod_show_wms(3);
- }
- else if (option_db == '1') {
- mod_show_wms(4);
- }
- }
- else {
- if (option_all == '0') {
- var aNode = document.getElementById("_option_all");
- if (aNode != null) removeChildNodes(aNode);
- }
- if (option_group == '0') {
- var aNode = document.getElementById("_option_group");
- if (aNode != null) removeChildNodes(aNode);
- }
- if (option_gui == '0') {
- var aNode = document.getElementById("_option_gui");
- if (aNode != null) removeChildNodes(aNode);
- }
- if (option_db == '0') {
- var aNode = document.getElementById("_option_db");
- if (aNode != null) removeChildNodes(aNode);
- }
- }
-}
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-// -->
-</script>
-
-</head>
-<body onLoad="window.focus();setButtons('<?php echo $wms_show;?>','<?php echo $show_gui_configured_wms;?>','<?php echo $show_group_wms;?>','<?php echo $show_gui_wms;?>')">
-
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-$cnt_gui = 0;
-$cnt_gui_wms = 0;
-$cnt_wms = 0;
-$cnt_user_group = 0;
-$cnt_group = 0;
-$cnt_gui_mb_group = 0;
-$cnt_group_gui_wms = 0;
-$cnt_fkey_group_gui_wms = 0;
-$cnt_fkey_show_gui_wms = 0;
-$cnt_show_gui_wms = 0;
-$cnt_group_name = 0;
-$cnt_gui_table = 0;
-$exists = false;
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-$logged_gui_id=$_SESSION["mb_user_gui"];
-
-###### SQL #####################################################################################
-
-/*get infos from gui_element ********************************************************/
-
-/*get group from logged user *******************************************************/
-$sql_user_group = "SELECT * FROM mb_user_mb_group WHERE fkey_mb_user_id= $1 ";
-$array_values = array($logged_user_id);
-$array_types = array('s');
-$res_user_group = db_prep_query($sql_user_group, $array_values, $array_types);
-while($row = db_fetch_array($res_user_group)){
- $user_id[$cnt_user_group] = $row["fkey_mb_user_id"];
- $group_id[$cnt_user_group] = $row["fkey_mb_group_id"];
- $cnt_user_group++;
-}
-/*get group from logged user ************************************************************/
-
-# Thekla, please recheck
-/*get group name ********************************************************************************************/
-if(count($group_id) > 0){
- $v = array();
- $t = array();
- $sql_group = "SELECT mb_group_id, mb_group_name, mb_group_description FROM mb_group WHERE mb_group_id IN (";
- for($i=0; $i < count($group_id); $i++){
- if($i>0){ $sql_group .= ",";}
- $sql_group .= "$".strval($i + 1);
- array_push($v,$group_id[$i]);
- array_push($t,"i");
- }
- $sql_group.= ") ORDER BY mb_group_name";
- $res_group = db_prep_query($sql_group,$v,$t);
- while($row = db_fetch_array($res_group)){
- $mb_group_description[$cnt_group] = $row["mb_group_description"];
- $my_group_name[$cnt_group] = $row["mb_group_name"];
- $my_group_id[$cnt_group] = $row["mb_group_id"];
- $cnt_group++;
- }
-}
-/*get group name ********************************************************************************************/
-
-/*get allocated gui ********************************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-
-for ($i = 1; $i <= count($arrayGuis); $i++){
- if ($i > 1) {
- $sql_gui .= ",";
- }
- $sql_gui .= "$" . $i;
- array_push($t, "s");
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-
-$res_gui = db_prep_query($sql_gui, $v, $t);
- while($row = db_fetch_array($res_gui)){
- $gui_id[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $gui_description[$cnt_gui] = $row["gui_description"];
- #echo"$gui_name[$cnt_gui]";
- $cnt_gui++;
- }
-/*get allocated gui ********************************************************************************************/
-
-/*get allocated wms from allocated gui ********************************************************************************************/
-$sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-for ($i = 1; $i <= count($arrayGuis); $i++){
- if ($i > 1) {
- $sql_gui_wms .= ",";
- }
- $sql_gui_wms .= "$".$i;
- array_push($t, "s");
-}
-$sql_gui_wms.= ") ORDER BY fkey_wms_id";
-
-$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
-while($row = db_fetch_array($res_gui_wms)){
- $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
- $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
- $cnt_gui_wms++;
-}
-/*get allocated wms from allocated gui ********************************************************************************************/
-
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
-$v = $fkey_wms_id;
-$t = array();
-for ($i = 1; $i <= count($fkey_wms_id); $i++){
- if ($i > 1) {
- $sql_wms .= ",";
- }
- $sql_wms .= "$".$i;
- array_push($t, "s");
-}
-$sql_wms.= ") ORDER BY wms_title";
-
-$res_wms = db_prep_query($sql_wms, $v, $t);
- while($row = db_fetch_array($res_wms)){
- $wms_title[$cnt_wms] = $row["wms_title"];
- $wms_abstract[$cnt_wms] = $row["wms_abstract"];
- $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
- $wms_version[$cnt_wms] = $row["wms_version"];
- $cnt_wms++;
- }
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-# Button
-echo "<table border='0' cellpadding='3' rules='rows'>";
-echo "<tr>";
-if (!empty($wms_show) || !empty($show_gui_configured_wms) || !empty($show_group_wms) || !empty($show_gui_wms)){
- echo "<td id='_option_all'><input type='button' class='wms_button' name='wms1' value='all wms' onclick='mod_show_wms(1)'></td>";
- echo "<td id='_option_group'><input type='button' class='wms_button' name='wms2' value='group' onclick = 'mod_show_wms(2)'></td>";
- echo "<td id='_option_gui'><input type='button' class='wms_button' name='wms3' value='gui' onclick = 'mod_show_wms(3)'></td>";
- echo "<td id='_option_db'><input type='button' class='wms_button' name='wms4' value='db' onclick = 'mod_show_wms(4)'></td>";
- echo "</tr>";
- echo "</table>";
-
-
-###### SQL #####################################################################################
-
-
-###### SHOW GUI WMS OR GROUP WMS #####################################################################################
-
-/*show goup wms ********************************************************************************************/
-#if (isset($show_group_wms))
-if (!empty($show_group_wms)){
- /*get gui goup ********************************************************************************************/
- $sql_gui_mb_group = "SELECT fkey_gui_id, fkey_mb_group_id FROM gui_mb_group WHERE fkey_mb_group_id=$1";
- $v = array($show_group_wms);
- $t = array("s");
- $res_gui_mb_group = db_prep_query($sql_gui_mb_group, $v, $t);
-
- while($row = db_fetch_array($res_gui_mb_group)){
- $group_gui_id[$cnt_gui_mb_group] = $row["fkey_gui_id"];
- $fkey_mb_group_id[$cnt_gui_mb_group] = $row["fkey_mb_group_id"];
- #echo"$group_gui_id[$cnt_gui_mb_group]";
- $cnt_gui_mb_group++;
- }
-
- /*get gui goup ********************************************************************************************/
-
- /*get group gui WMS ********************************************************************************************/
- if(count($group_gui_id)>0) {
- $sql_fkey_group_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
- $v = $group_gui_id;
- $t = array();
- for ($i = 1; $i <= count($group_gui_id); $i++){
- if ($i > 1) {
- $sql_fkey_group_gui_wms .= ",";
- }
- $sql_fkey_group_gui_wms .= "$".$i;
- array_push($t, "s");
- }
- $sql_fkey_group_gui_wms.= ") ORDER BY fkey_wms_id";
-
- $res_fkey_group_gui_wms = db_prep_query($sql_fkey_group_gui_wms, $v, $t);
- while($row = db_fetch_array($res_fkey_group_gui_wms)){
- $fkey_group_gui_gui_id[$cnt_fkey_group_gui_wms] = $row["fkey_gui_id"];
- $fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms] = $row["fkey_wms_id"];
- #echo"$fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms]";
- $cnt_fkey_group_gui_wms++;
- }
-
- /*get group gui WMS ********************************************************************************************/
-
- /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- if(count($fkey_group_gui_wms_id)>0){
- $sql_group_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
- $v = $fkey_group_gui_wms_id;
- $t = array();
- for ($i = 1; $i <= count($fkey_group_gui_wms_id); $i++){
- if ($i > 1) {
- $sql_group_gui_wms .= ",";
- }
- $sql_group_gui_wms .= "$".$i;
- array_push($t, "s");
- }
- $sql_group_gui_wms.= ") ORDER BY wms_title";
-
- $res_group_gui_wms = db_prep_query($sql_group_gui_wms, $v, $t);
- while($row = db_fetch_array($res_group_gui_wms)){
- $group_wms_title[$cnt_group_gui_wms] = $row["wms_title"];
- $group_wms_abstract[$cnt_group_gui_wms] = $row["wms_abstract"];
- $group_wms_getcapabilities[$cnt_group_gui_wms] = $row["wms_getcapabilities"];
- $group_wms_version[$cnt_group_gui_wms] = $row["wms_version"];
- #echo"$group_wms_title[$cnt_group_gui_wms]";
- $cnt_group_gui_wms++;
- }
- }
- }
-
- /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- #if ($show_group_wms > 0)
- if ($cnt_group_gui_wms > 0){
- /*get goup name for showing in the table ********************************************************************************************/
- $sql_group_name = "SELECT mb_group_id, mb_group_name FROM mb_group WHERE mb_group_id = $1";
- $v = array($show_group_wms);
- $t = array("s");
- $res_group_name = db_prep_query($sql_group_name, $v, $t);
- while($row = db_fetch_array($res_group_name)){
- $group_name_table[$cnt_group_name] = $row["mb_group_name"];
- $my_group_id_table[$cnt_group_name] = $row["mb_group_id"];
- $cnt_group_name++;
- }
-
- /*get goup name ********************************************************************************************/
-
- echo"<br>";
- echo"<br>";
- echo"wms from group: $group_name_table[0]";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = '#FAEBD7' >";
- echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_group_gui_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
-
- echo "<td><div id ='id_".$group_wms_title[$i]."' class='even' name ='name_".$group_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$group_wms_getcapabilities[$i]."\",\"".$group_wms_version[$i]."\")'>".$group_wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$group_wms_abstract[$i]."' class='even' name ='name_".$group_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$group_wms_getcapabilities[$i]."\",\"".$group_wms_version[$i]."\")'>".$group_wms_abstract[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
- else{
- echo"<br>";
- echo"<br>";
- echo "no wms in this group";
- }/*End: if ($show_group_wms > 0) *********/
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
- }/*End: if (!empty($show_group_wms)) *********/
-
-/*show gui wms ********************************************************************************************/
-if (!empty($show_gui_wms)){
- /*get group gui WMS ********************************************************************************************/
- $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
- $v = array($show_gui_wms);
- $t = array("s");
- #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
-
- $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_fkey_show_gui_wms)){
- $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
- $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
- #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
- $cnt_fkey_show_gui_wms++;
- }
- /*get group gui WMS ********************************************************************************************/
-
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- if(count($fkey_show_gui_wms_id)>0){
- $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
- $v = $fkey_show_gui_wms_id;
- $t = array();
- for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
- if ($i > 1) {
- $sql_show_gui_wms .= ",";
- }
- $sql_show_gui_wms .= "$".$i;
- array_push($t, "s");
- }
- $sql_show_gui_wms.= ") ORDER BY wms_title";
-
- $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_show_gui_wms)){
- $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
- $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
- $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
- $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
- $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
- #echo"$gui_wms_title[$cnt_show_gui_wms]";
- $cnt_show_gui_wms++;
- }
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- #if (isset($cnt_show_gui_wms > 0))
- }
-
- if ($cnt_show_gui_wms > 0){
- /*get selected gui name for table caption ********************************************************************************************/
- $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
- $v = array($show_gui_wms);
- $t = array("s");
- $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
- while($row = db_fetch_array($res_gui_table)){
- $gui_id_table[$cnt_gui_table] = $row["gui_id"];
- $gui_name_table[$cnt_gui_table] = $row["gui_name"];
- $cnt_gui_table++;
- #echo"$gui_id_table[0]";
- }
-
- /*get selected gui name for table caption ********************************************************************************************/
-
- echo"<br>";
- echo"<br>";
- echo"wms from gui: $gui_name_table[0]";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = '#FAEBD7' >";
- echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_show_gui_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$gui_wms_getcapabilities[$i]."\",\"".$gui_wms_version[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$gui_wms_getcapabilities[$i]."\",\"".$gui_wms_version[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
- else{
- echo"<br>";
- echo"<br>";
- echo"<br>";
-
- echo "no wms in this gui";
- } /*End: if ($cnt_show_gui_wms > 0) *********/
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
-} /*End: if(isset($show_gui_wms)) *********/
-
-
-
-/*show gui wms ********************************************************************************************/
-if (!empty($show_gui_configured_wms)){
- /*get group gui WMS ********************************************************************************************/
- $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
- #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
- $v = array($show_gui_configured_wms);
- $t = array("s");
- $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_fkey_show_gui_wms)){
- $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
- $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
- #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
- $cnt_fkey_show_gui_wms++;
- }
- /*get group gui WMS ********************************************************************************************/
-
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- if(count($fkey_show_gui_wms_id)>0){
- $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
- $v = $fkey_show_gui_wms_id;
- $t = array();
- for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
- if ($i > 1) {
- $sql_show_gui_wms .= ",";
- }
- $sql_show_gui_wms .= "$".$i;
- array_push($t, "s");
- }
- $sql_show_gui_wms.= ") ORDER BY wms_title";
-
- $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_show_gui_wms)){
- $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
- $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
- $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
- $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
- $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
- #echo"$gui_wms_title[$cnt_show_gui_wms]";
- $cnt_show_gui_wms++;
- }
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- #if (isset($cnt_show_gui_wms > 0))
- }
-
- if ($cnt_show_gui_wms > 0){
- /*get selected gui name for table caption ********************************************************************************************/
- $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
- $v = array($show_gui_configured_wms);
- $t = array("s");
- $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
- while($row = db_fetch_array($res_gui_table)){
- $gui_id_table[$cnt_gui_table] = $row["gui_id"];
- $gui_name_table[$cnt_gui_table] = $row["gui_name"];
- $cnt_gui_table++;
- #echo"$gui_id_table[0]";
- }
-
- /*get selected gui name for table caption ********************************************************************************************/
-
- echo"<br>";
- echo"<br>";
- echo"wms from gui: $gui_name_table[0]";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = '#FAEBD7' >";
- echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_show_gui_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$show_gui_configured_wms."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$show_gui_configured_wms."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
- else{
- echo"<br>";
- echo"<br>";
- echo"<br>";
-
- echo "no wms in this gui";
- } /*End: if ($cnt_show_gui_wms > 0) *********/
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
-} /*End: if(isset($show_gui_configured_wms)) *********/
-
-###### SHOW GUI WMS OR GROUP WMS #####################################################################################
-
-###### SHOW GUI OR GROUP OR ALL WMS #####################################################################################
-
- if ($wms_show == 4){ #gui
- echo"<br>";
- echo"<br>";
- echo"Please select a gui:";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = 'lightgrey' >";
- echo "<tr><td width='200' height='10'>gui name</td><td align = 'left' class='fieldnames_s'>description</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_gui; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
-
- }
- if ($wms_show == 3){ #gui
- echo"<br>";
- echo"<br>";
- echo"Please select a gui:";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = 'lightgrey' >";
- echo "<tr><td width='200' height='10'>gui name</td><td align = 'left' class='fieldnames_s'>description</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_gui; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
-
- }
- elseif ($wms_show== 2){ # group
- echo"<br>";
- echo"<br>";
-
- if($cnt_group>0){
- echo "Please select a group:";
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = 'lightgrey' >";
- echo "<tr><td width='200' height='10'>group name</td><td align = 'left' class='fieldnames_s'>description</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_group; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$my_group_name[$i]."' value='".$my_group_id[$i]."' class='even' name ='".$my_group_name[$i]."' style='cursor:pointer' onclick = 'mod_show_group_wms(\"".$my_group_id[$i]."\")'>".$my_group_name[$i]."</div></td>";
- echo "<td><div id ='id_".$mb_group_description[$i]."' value='".$my_group_id[$i]."' class='even' name ='".$mb_group_description[$i]."' style='cursor:pointer' onclick = 'mod_show_group_wms(\"".$my_group_id[$i]."\")'>".$mb_group_description[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
- else{
- echo"no group for this user";
- }
-
- }
- elseif ($wms_show== 1){ # all wms
- echo"<br>";
- echo"<br>";
-
- echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = '#FAEBD7' >";
- echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_abstract[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
-}
-
-
-###### SHOW GUI OR GROUP OR ALL WMS #####################################################################################
-
-
-/*show group wms ********************************************************************************************/
-echo "<input type='hidden' name='show_group_wms'>";
-/*show gui wms ********************************************************************************************/
-echo "<input type='hidden' name='show_gui_wms'>";
-echo "<input type='hidden' name='show_gui_configured_wms'>";
-/*show button ********************************************************************************************/
-echo "<input type='hidden' name='wms_show'>";
-echo "<input id='wmsSource' type='hidden' name='wmsSource'>";
-echo "<input name ='set_option_all' id='set_option_all' type='hidden'>";
-echo "<input name='set_option_group' id='set_option_group' type='hidden'>";
-echo "<input name='set_option_gui' id='set_option_gui' type='hidden'>";
-echo "<input name='set_option_db' id='set_option_db' type='hidden'>";
-echo "</form>";
-?>
-<script type="text/javascript">
-
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php (from rev 2171, branches/2.4.5/http/javascripts/mod_addWMSfromfilteredList.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,755 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+include '../include/dyn_css.php';
+?>
+<title>Add WMS from Filtered Catalog</title>
+<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
+
+<STYLE TYPE="text/css">
+<!--
+body{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:10pt
+}
+
+table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:11;
+}
+
+.wms_button{
+ color: black;
+ border: solid thin;
+ height:22px;
+ width:60px;
+}
+
+-->
+</STYLE>
+
+
+<script type="text/javascript">
+<!--
+function mod_addWMSfromDB(gui_id, wms_id) {
+ //alert("1/3 mod_addWMSfromDB: GUI ID = " + gui_id + ", WMS ID = " + wms_id);
+ window.opener.mod_addWMSById_load(gui_id, wms_id);
+}
+function mod_addWMSfromfilteredList(pointer_name,version){
+
+ pointer_name=pointer_name + window.opener.mb_getConjunctionCharacter(pointer_name);
+
+ if (version == '1.0.0'){
+ var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
+ var load = cap;
+ }
+ else if (version == '1.1.0'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
+ var load = cap;
+ }
+ else if (version == '1.1.1'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+ var load = cap;
+ }
+ //alert (load);
+
+ if(load){
+ if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
+ window.opener.mod_addWMS_load('http://localhost' + load);
+ }
+ else{
+ window.opener.mod_addWMS_load(load);
+ }
+ }
+}
+
+function mod_show_group_wms(wert){
+ document.form1.show_group_wms.value = wert;
+ document.form1.submit();
+}
+
+function mod_show_gui_wms(wert2){
+ document.form1.show_gui_wms.value = wert2;
+ document.form1.submit();
+}
+
+function mod_show_gui_configured_wms(wert2){
+ document.form1.show_gui_configured_wms.value = wert2;
+ document.form1.submit();
+}
+
+function mod_show_wms(wert3){
+
+ document.form1.wms_show.value = wert3;
+ if (wert3 == 4) {
+ document.form1.wmsSource.nodeValue = "db";
+ }
+ else {
+ document.form1.wmsSource.nodeValue = "capabilities";
+ }
+ document.form1.submit();
+}
+
+function setButtons(wms_option, wms_option2, wms_option3, wms_option4) {
+ if (typeof(option_all) == "undefined") {
+ option_all = '<?php echo $set_option_all;?>';
+ }
+ document.getElementById("set_option_all").value = option_all;
+ if (typeof(option_group) == "undefined") {
+ option_group = '<?php echo $set_option_group;?>';
+ }
+ document.getElementById("set_option_group").value = option_group;
+ if (typeof(option_gui) == "undefined") {
+ option_gui = '<?php echo $set_option_gui;?>';
+ }
+ document.getElementById("set_option_gui").value = option_gui;
+ if (typeof(option_db) == "undefined") {
+ option_db = '<?php echo $set_option_db;?>';
+ }
+ document.getElementById("set_option_db").value = option_db;
+
+ if (wms_option == '' && wms_option2 == '' && wms_option3 == '' && wms_option4 == '') {
+ if (option_all == '1') {
+ mod_show_wms(1);
+ }
+ else if (option_group == '1') {
+ mod_show_wms(2);
+ }
+ else if (option_gui == '1') {
+ mod_show_wms(3);
+ }
+ else if (option_db == '1') {
+ mod_show_wms(4);
+ }
+ }
+ else {
+ if (option_all == '0') {
+ var aNode = document.getElementById("_option_all");
+ if (aNode != null) removeChildNodes(aNode);
+ }
+ if (option_group == '0') {
+ var aNode = document.getElementById("_option_group");
+ if (aNode != null) removeChildNodes(aNode);
+ }
+ if (option_gui == '0') {
+ var aNode = document.getElementById("_option_gui");
+ if (aNode != null) removeChildNodes(aNode);
+ }
+ if (option_db == '0') {
+ var aNode = document.getElementById("_option_db");
+ if (aNode != null) removeChildNodes(aNode);
+ }
+ }
+}
+
+function removeChildNodes(node) {
+ while (node.childNodes.length > 0) {
+ var childNode = node.firstChild;
+ node.removeChild(childNode);
+ }
+}
+// -->
+</script>
+
+</head>
+<body onLoad="window.focus();setButtons('<?php echo $wms_show;?>','<?php echo $show_gui_configured_wms;?>','<?php echo $show_group_wms;?>','<?php echo $show_gui_wms;?>')">
+
+<?php
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+$cnt_gui = 0;
+$cnt_gui_wms = 0;
+$cnt_wms = 0;
+$cnt_user_group = 0;
+$cnt_group = 0;
+$cnt_gui_mb_group = 0;
+$cnt_group_gui_wms = 0;
+$cnt_fkey_group_gui_wms = 0;
+$cnt_fkey_show_gui_wms = 0;
+$cnt_show_gui_wms = 0;
+$cnt_group_name = 0;
+$cnt_gui_table = 0;
+$exists = false;
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+$logged_gui_id=$_SESSION["mb_user_gui"];
+
+###### SQL #####################################################################################
+
+/*get infos from gui_element ********************************************************/
+
+/*get group from logged user *******************************************************/
+$sql_user_group = "SELECT * FROM mb_user_mb_group WHERE fkey_mb_user_id= $1 ";
+$array_values = array($logged_user_id);
+$array_types = array('s');
+$res_user_group = db_prep_query($sql_user_group, $array_values, $array_types);
+while($row = db_fetch_array($res_user_group)){
+ $user_id[$cnt_user_group] = $row["fkey_mb_user_id"];
+ $group_id[$cnt_user_group] = $row["fkey_mb_group_id"];
+ $cnt_user_group++;
+}
+/*get group from logged user ************************************************************/
+
+# Thekla, please recheck
+/*get group name ********************************************************************************************/
+if(count($group_id) > 0){
+ $v = array();
+ $t = array();
+ $sql_group = "SELECT mb_group_id, mb_group_name, mb_group_description FROM mb_group WHERE mb_group_id IN (";
+ for($i=0; $i < count($group_id); $i++){
+ if($i>0){ $sql_group .= ",";}
+ $sql_group .= "$".strval($i + 1);
+ array_push($v,$group_id[$i]);
+ array_push($t,"i");
+ }
+ $sql_group.= ") ORDER BY mb_group_name";
+ $res_group = db_prep_query($sql_group,$v,$t);
+ while($row = db_fetch_array($res_group)){
+ $mb_group_description[$cnt_group] = $row["mb_group_description"];
+ $my_group_name[$cnt_group] = $row["mb_group_name"];
+ $my_group_id[$cnt_group] = $row["mb_group_id"];
+ $cnt_group++;
+ }
+}
+/*get group name ********************************************************************************************/
+
+/*get allocated gui ********************************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+
+for ($i = 1; $i <= count($arrayGuis); $i++){
+ if ($i > 1) {
+ $sql_gui .= ",";
+ }
+ $sql_gui .= "$" . $i;
+ array_push($t, "s");
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+
+$res_gui = db_prep_query($sql_gui, $v, $t);
+ while($row = db_fetch_array($res_gui)){
+ $gui_id[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $gui_description[$cnt_gui] = $row["gui_description"];
+ #echo"$gui_name[$cnt_gui]";
+ $cnt_gui++;
+ }
+/*get allocated gui ********************************************************************************************/
+
+/*get allocated wms from allocated gui ********************************************************************************************/
+$sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+for ($i = 1; $i <= count($arrayGuis); $i++){
+ if ($i > 1) {
+ $sql_gui_wms .= ",";
+ }
+ $sql_gui_wms .= "$".$i;
+ array_push($t, "s");
+}
+$sql_gui_wms.= ") ORDER BY fkey_wms_id";
+
+$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
+while($row = db_fetch_array($res_gui_wms)){
+ $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
+ $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
+ $cnt_gui_wms++;
+}
+/*get allocated wms from allocated gui ********************************************************************************************/
+
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
+$v = $fkey_wms_id;
+$t = array();
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+ if ($i > 1) {
+ $sql_wms .= ",";
+ }
+ $sql_wms .= "$".$i;
+ array_push($t, "s");
+}
+$sql_wms.= ") ORDER BY wms_title";
+
+$res_wms = db_prep_query($sql_wms, $v, $t);
+ while($row = db_fetch_array($res_wms)){
+ $wms_title[$cnt_wms] = $row["wms_title"];
+ $wms_abstract[$cnt_wms] = $row["wms_abstract"];
+ $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
+ $wms_version[$cnt_wms] = $row["wms_version"];
+ $cnt_wms++;
+ }
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self . "' method='post'>";
+# Button
+echo "<table border='0' cellpadding='3' rules='rows'>";
+echo "<tr>";
+if (!empty($wms_show) || !empty($show_gui_configured_wms) || !empty($show_group_wms) || !empty($show_gui_wms)){
+ echo "<td id='_option_all'><input type='button' class='wms_button' name='wms1' value='all wms' onclick='mod_show_wms(1)'></td>";
+ echo "<td id='_option_group'><input type='button' class='wms_button' name='wms2' value='group' onclick = 'mod_show_wms(2)'></td>";
+ echo "<td id='_option_gui'><input type='button' class='wms_button' name='wms3' value='gui' onclick = 'mod_show_wms(3)'></td>";
+ echo "<td id='_option_db'><input type='button' class='wms_button' name='wms4' value='db' onclick = 'mod_show_wms(4)'></td>";
+ echo "</tr>";
+ echo "</table>";
+
+
+###### SQL #####################################################################################
+
+
+###### SHOW GUI WMS OR GROUP WMS #####################################################################################
+
+/*show goup wms ********************************************************************************************/
+#if (isset($show_group_wms))
+if (!empty($show_group_wms)){
+ /*get gui goup ********************************************************************************************/
+ $sql_gui_mb_group = "SELECT fkey_gui_id, fkey_mb_group_id FROM gui_mb_group WHERE fkey_mb_group_id=$1";
+ $v = array($show_group_wms);
+ $t = array("s");
+ $res_gui_mb_group = db_prep_query($sql_gui_mb_group, $v, $t);
+
+ while($row = db_fetch_array($res_gui_mb_group)){
+ $group_gui_id[$cnt_gui_mb_group] = $row["fkey_gui_id"];
+ $fkey_mb_group_id[$cnt_gui_mb_group] = $row["fkey_mb_group_id"];
+ #echo"$group_gui_id[$cnt_gui_mb_group]";
+ $cnt_gui_mb_group++;
+ }
+
+ /*get gui goup ********************************************************************************************/
+
+ /*get group gui WMS ********************************************************************************************/
+ if(count($group_gui_id)>0) {
+ $sql_fkey_group_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
+ $v = $group_gui_id;
+ $t = array();
+ for ($i = 1; $i <= count($group_gui_id); $i++){
+ if ($i > 1) {
+ $sql_fkey_group_gui_wms .= ",";
+ }
+ $sql_fkey_group_gui_wms .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql_fkey_group_gui_wms.= ") ORDER BY fkey_wms_id";
+
+ $res_fkey_group_gui_wms = db_prep_query($sql_fkey_group_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_fkey_group_gui_wms)){
+ $fkey_group_gui_gui_id[$cnt_fkey_group_gui_wms] = $row["fkey_gui_id"];
+ $fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms] = $row["fkey_wms_id"];
+ #echo"$fkey_group_gui_wms_id[$cnt_fkey_group_gui_wms]";
+ $cnt_fkey_group_gui_wms++;
+ }
+
+ /*get group gui WMS ********************************************************************************************/
+
+ /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ if(count($fkey_group_gui_wms_id)>0){
+ $sql_group_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
+ $v = $fkey_group_gui_wms_id;
+ $t = array();
+ for ($i = 1; $i <= count($fkey_group_gui_wms_id); $i++){
+ if ($i > 1) {
+ $sql_group_gui_wms .= ",";
+ }
+ $sql_group_gui_wms .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql_group_gui_wms.= ") ORDER BY wms_title";
+
+ $res_group_gui_wms = db_prep_query($sql_group_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_group_gui_wms)){
+ $group_wms_title[$cnt_group_gui_wms] = $row["wms_title"];
+ $group_wms_abstract[$cnt_group_gui_wms] = $row["wms_abstract"];
+ $group_wms_getcapabilities[$cnt_group_gui_wms] = $row["wms_getcapabilities"];
+ $group_wms_version[$cnt_group_gui_wms] = $row["wms_version"];
+ #echo"$group_wms_title[$cnt_group_gui_wms]";
+ $cnt_group_gui_wms++;
+ }
+ }
+ }
+
+ /*group: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ #if ($show_group_wms > 0)
+ if ($cnt_group_gui_wms > 0){
+ /*get goup name for showing in the table ********************************************************************************************/
+ $sql_group_name = "SELECT mb_group_id, mb_group_name FROM mb_group WHERE mb_group_id = $1";
+ $v = array($show_group_wms);
+ $t = array("s");
+ $res_group_name = db_prep_query($sql_group_name, $v, $t);
+ while($row = db_fetch_array($res_group_name)){
+ $group_name_table[$cnt_group_name] = $row["mb_group_name"];
+ $my_group_id_table[$cnt_group_name] = $row["mb_group_id"];
+ $cnt_group_name++;
+ }
+
+ /*get goup name ********************************************************************************************/
+
+ echo"<br>";
+ echo"<br>";
+ echo"wms from group: $group_name_table[0]";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = '#FAEBD7' >";
+ echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_group_gui_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+
+ echo "<td><div id ='id_".$group_wms_title[$i]."' class='even' name ='name_".$group_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$group_wms_getcapabilities[$i]."\",\"".$group_wms_version[$i]."\")'>".$group_wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$group_wms_abstract[$i]."' class='even' name ='name_".$group_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$group_wms_getcapabilities[$i]."\",\"".$group_wms_version[$i]."\")'>".$group_wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+ else{
+ echo"<br>";
+ echo"<br>";
+ echo "no wms in this group";
+ }/*End: if ($show_group_wms > 0) *********/
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+ }/*End: if (!empty($show_group_wms)) *********/
+
+/*show gui wms ********************************************************************************************/
+if (!empty($show_gui_wms)){
+ /*get group gui WMS ********************************************************************************************/
+ $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
+ $v = array($show_gui_wms);
+ $t = array("s");
+ #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
+
+ $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_fkey_show_gui_wms)){
+ $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
+ $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
+ #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
+ $cnt_fkey_show_gui_wms++;
+ }
+ /*get group gui WMS ********************************************************************************************/
+
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ if(count($fkey_show_gui_wms_id)>0){
+ $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
+ $v = $fkey_show_gui_wms_id;
+ $t = array();
+ for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+ if ($i > 1) {
+ $sql_show_gui_wms .= ",";
+ }
+ $sql_show_gui_wms .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql_show_gui_wms.= ") ORDER BY wms_title";
+
+ $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_show_gui_wms)){
+ $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
+ $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
+ $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
+ $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
+ $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
+ #echo"$gui_wms_title[$cnt_show_gui_wms]";
+ $cnt_show_gui_wms++;
+ }
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ #if (isset($cnt_show_gui_wms > 0))
+ }
+
+ if ($cnt_show_gui_wms > 0){
+ /*get selected gui name for table caption ********************************************************************************************/
+ $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
+ $v = array($show_gui_wms);
+ $t = array("s");
+ $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
+ while($row = db_fetch_array($res_gui_table)){
+ $gui_id_table[$cnt_gui_table] = $row["gui_id"];
+ $gui_name_table[$cnt_gui_table] = $row["gui_name"];
+ $cnt_gui_table++;
+ #echo"$gui_id_table[0]";
+ }
+
+ /*get selected gui name for table caption ********************************************************************************************/
+
+ echo"<br>";
+ echo"<br>";
+ echo"wms from gui: $gui_name_table[0]";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = '#FAEBD7' >";
+ echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_show_gui_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$gui_wms_getcapabilities[$i]."\",\"".$gui_wms_version[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$gui_wms_getcapabilities[$i]."\",\"".$gui_wms_version[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+ else{
+ echo"<br>";
+ echo"<br>";
+ echo"<br>";
+
+ echo "no wms in this gui";
+ } /*End: if ($cnt_show_gui_wms > 0) *********/
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+} /*End: if(isset($show_gui_wms)) *********/
+
+
+
+/*show gui wms ********************************************************************************************/
+if (!empty($show_gui_configured_wms)){
+ /*get group gui WMS ********************************************************************************************/
+ $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
+ #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
+ $v = array($show_gui_configured_wms);
+ $t = array("s");
+ $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_fkey_show_gui_wms)){
+ $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
+ $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
+ #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
+ $cnt_fkey_show_gui_wms++;
+ }
+ /*get group gui WMS ********************************************************************************************/
+
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ if(count($fkey_show_gui_wms_id)>0){
+ $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
+ $v = $fkey_show_gui_wms_id;
+ $t = array();
+ for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+ if ($i > 1) {
+ $sql_show_gui_wms .= ",";
+ }
+ $sql_show_gui_wms .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql_show_gui_wms.= ") ORDER BY wms_title";
+
+ $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_show_gui_wms)){
+ $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
+ $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
+ $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
+ $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
+ $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
+ #echo"$gui_wms_title[$cnt_show_gui_wms]";
+ $cnt_show_gui_wms++;
+ }
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ #if (isset($cnt_show_gui_wms > 0))
+ }
+
+ if ($cnt_show_gui_wms > 0){
+ /*get selected gui name for table caption ********************************************************************************************/
+ $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
+ $v = array($show_gui_configured_wms);
+ $t = array("s");
+ $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
+ while($row = db_fetch_array($res_gui_table)){
+ $gui_id_table[$cnt_gui_table] = $row["gui_id"];
+ $gui_name_table[$cnt_gui_table] = $row["gui_name"];
+ $cnt_gui_table++;
+ #echo"$gui_id_table[0]";
+ }
+
+ /*get selected gui name for table caption ********************************************************************************************/
+
+ echo"<br>";
+ echo"<br>";
+ echo"wms from gui: $gui_name_table[0]";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = '#FAEBD7' >";
+ echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_show_gui_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$show_gui_configured_wms."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$show_gui_configured_wms."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+ else{
+ echo"<br>";
+ echo"<br>";
+ echo"<br>";
+
+ echo "no wms in this gui";
+ } /*End: if ($cnt_show_gui_wms > 0) *********/
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+} /*End: if(isset($show_gui_configured_wms)) *********/
+
+###### SHOW GUI WMS OR GROUP WMS #####################################################################################
+
+###### SHOW GUI OR GROUP OR ALL WMS #####################################################################################
+
+ if ($wms_show == 4){ #gui
+ echo"<br>";
+ echo"<br>";
+ echo"Please select a gui:";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = 'lightgrey' >";
+ echo "<tr><td width='200' height='10'>gui name</td><td align = 'left' class='fieldnames_s'>description</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_gui; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+
+ }
+ if ($wms_show == 3){ #gui
+ echo"<br>";
+ echo"<br>";
+ echo"Please select a gui:";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = 'lightgrey' >";
+ echo "<tr><td width='200' height='10'>gui name</td><td align = 'left' class='fieldnames_s'>description</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_gui; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+
+ }
+ elseif ($wms_show== 2){ # group
+ echo"<br>";
+ echo"<br>";
+
+ if($cnt_group>0){
+ echo "Please select a group:";
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = 'lightgrey' >";
+ echo "<tr><td width='200' height='10'>group name</td><td align = 'left' class='fieldnames_s'>description</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_group; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$my_group_name[$i]."' value='".$my_group_id[$i]."' class='even' name ='".$my_group_name[$i]."' style='cursor:pointer' onclick = 'mod_show_group_wms(\"".$my_group_id[$i]."\")'>".$my_group_name[$i]."</div></td>";
+ echo "<td><div id ='id_".$mb_group_description[$i]."' value='".$my_group_id[$i]."' class='even' name ='".$mb_group_description[$i]."' style='cursor:pointer' onclick = 'mod_show_group_wms(\"".$my_group_id[$i]."\")'>".$mb_group_description[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+ else{
+ echo"no group for this user";
+ }
+
+ }
+ elseif ($wms_show== 1){ # all wms
+ echo"<br>";
+ echo"<br>";
+
+ echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = '#FAEBD7' >";
+ echo "<tr><td width='200' height='10'>WMS-Title</td><td align = 'left' class='fieldnames_s'>WMS-Abstract</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$wms_title[$i]."' class='even' name ='name_".$wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$wms_abstract[$i]."' class='even' name ='name_".$wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromfilteredList(\"".$wms_getcapabilities[$i]."\",\"".$wms_version[$i]."\")'>".$wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+}
+
+
+###### SHOW GUI OR GROUP OR ALL WMS #####################################################################################
+
+
+/*show group wms ********************************************************************************************/
+echo "<input type='hidden' name='show_group_wms'>";
+/*show gui wms ********************************************************************************************/
+echo "<input type='hidden' name='show_gui_wms'>";
+echo "<input type='hidden' name='show_gui_configured_wms'>";
+/*show button ********************************************************************************************/
+echo "<input type='hidden' name='wms_show'>";
+echo "<input id='wmsSource' type='hidden' name='wmsSource'>";
+echo "<input name ='set_option_all' id='set_option_all' type='hidden'>";
+echo "<input name='set_option_group' id='set_option_group' type='hidden'>";
+echo "<input name='set_option_gui' id='set_option_gui' type='hidden'>";
+echo "<input name='set_option_db' id='set_option_db' type='hidden'>";
+echo "</form>";
+?>
+<script type="text/javascript">
+
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_addWMSfromfilteredListDB.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,289 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
-<title>Add WMS from Filtered Catalog</title>
-<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
-<STYLE TYPE="text/css">
-<!--
-body{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:10pt
-}
-table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:11;
-}
-.wms_button{
- color: black;
- border: solid thin;
- height:22px;
-}
--->
-</STYLE>
-<script type="text/javascript">
-<!--
-function mod_addWMSfromDB(gui_id, wms_id) {
- //alert("1/3 mod_addWMSfromDB: GUI ID = " + gui_id + ", WMS ID = " + wms_id);
- window.opener.mod_addWMSById_load(gui_id, wms_id);
-}
-
-function mod_show_gui_configured_wms(wert3){
- document.form1.wms_show.value = wert3;
- document.form1.submit();
-}
-
-function mod_show_gui(){
- document.form1.wms_show.value = '';
- document.form1.submit();
-}
-
-// -->
-</script>
-<?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-include '../include/dyn_css.php';
-?>
-</head>
-<body onLoad="window.focus()">
-
-<?php
-$wms_show = $_POST["wms_show"];
-
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$gui_id = array();
-$fieldHeight = 20;
-$cnt_gui = 0;
-$cnt_gui_wms = 0;
-$cnt_wms = 0;
-$cnt_user_group = 0;
-$cnt_group = 0;
-$cnt_gui_mb_group = 0;
-$cnt_group_gui_wms = 0;
-$cnt_fkey_group_gui_wms = 0;
-$cnt_fkey_show_gui_wms = 0;
-$cnt_show_gui_wms = 0;
-$cnt_group_name = 0;
-$cnt_gui_table = 0;
-$exists = false;
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-$logged_gui_id=$_SESSION["mb_user_gui"];
-
-
-/*get allocated gui ********************************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-for ($i = 1; $i <= count($arrayGuis); $i++){
- if ($i > 1) {
- $sql_gui .= ",";
- }
- $sql_gui .= "$" . $i;
- array_push($t, "s");
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui, $v, $t);
- while($row = db_fetch_array($res_gui)){
- $gui_id[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $gui_description[$cnt_gui] = $row["gui_description"];
- #echo"$gui_name[$cnt_gui]";
- $cnt_gui++;
- }
-/*get allocated gui ********************************************************************************************/
-
-/*get allocated wms from allocated gui ********************************************************************************************/
-$sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
-$v = $arrayGuis;
-$t = array();
-for ($i = 1; $i <= count($arrayGuis); $i++) {
- if ($i > 1) {
- $sql_gui_wms .= ",";
- }
- $sql_gui_wms .= "$".$i;
- array_push($t, "s");
-}
-$sql_gui_wms.= ") ORDER BY fkey_wms_id";
-
-$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
-while($row = db_fetch_array($res_gui_wms)){
- $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
- $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
- $cnt_gui_wms++;
-}
-/*get allocated wms from allocated gui ********************************************************************************************/
-
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
-$v = $fkey_wms_id;
-$t = array();
-for ($i = 1; $i <= count($fkey_wms_id); $i++){
- if ($i > 1) {
- $sql_wms .= ",";
- }
- $sql_wms .= "$" . $i;
- array_push($t, "s");
-}
-$sql_wms.= ") ORDER BY wms_title";
-
-$res_wms = db_prep_query($sql_wms, $v, $t);
- while($row = db_fetch_array($res_wms)){
- $wms_title[$cnt_wms] = $row["wms_title"];
- $wms_abstract[$cnt_wms] = $row["wms_abstract"];
- $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
- $wms_version[$cnt_wms] = $row["wms_version"];
- $cnt_wms++;
- }
-/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-
-if (empty($wms_show)){ #gui
- echo $selectGuiText;
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = 'lightgrey' >";
- echo "<tr><td width='200' height='10'>".$guiNameText."</td><td align = 'left' class='fieldnames_s'>".$guiAbstractText."</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_gui; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
-}
-
-else {
- echo "<input type='button' class='wms_button' name='wms2' value='" . $selectOtherGuiText . "' onclick = 'mod_show_gui()'></td>";
-
- /*get group gui WMS ********************************************************************************************/
- $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
- #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
-
- $v = array($wms_show);
- $t = array("s");
- $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_fkey_show_gui_wms)){
- $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
- $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
- #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
- $cnt_fkey_show_gui_wms++;
- }
- /*get group gui WMS ********************************************************************************************/
-
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- if(count($fkey_show_gui_wms_id)>0){
- $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
- $v = $fkey_show_gui_wms_id;
- $t = array();
- for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
- if ($i > 1) {
- $sql_show_gui_wms .= ",";
- }
- $sql_show_gui_wms .= "$".$i;
- array_push($t, "s");
- }
- $sql_show_gui_wms.= ") ORDER BY wms_title";
-
- $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
- while($row = db_fetch_array($res_show_gui_wms)){
- $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
- $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
- $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
- $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
- $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
- #echo"$gui_wms_title[$cnt_show_gui_wms]";
- $cnt_show_gui_wms++;
- }
- /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
-
- /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
- #if (isset($cnt_show_gui_wms > 0))
- }
-
- if ($cnt_show_gui_wms > 0){
- /*get selected gui name for table caption ********************************************************************************************/
- $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
- $v = array($wms_show);
- $t = array("s");
- $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
- while($row = db_fetch_array($res_gui_table)){
- $gui_id_table[$cnt_gui_table] = $row["gui_id"];
- $gui_name_table[$cnt_gui_table] = $row["gui_name"];
- $cnt_gui_table++;
- #echo"$gui_id_table[0]";
- }
-
- /*get selected gui name for table caption ********************************************************************************************/
-
- echo"<br>";
- echo"<br>";
- echo $selectWmsText . " " . $gui_name_table[0];
- echo"<br>";
- echo"<br>";
- echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
- echo " <thead bgcolor = '#FAEBD7' >";
- echo "<tr><td width='200' height='10'>".$wmsTitleText."</td><td align = 'left' class='fieldnames_s'>".$wmsAbstractText."</td>";
- echo " </thead>";
- echo " <tbody >";
- for($i=0; $i<$cnt_show_gui_wms; $i++){
- echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$wms_show."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
- echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$wms_show."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
- echo "</tr>";
- }
- echo " </tbody>";
- echo "</table>";
- }
- else{
- echo"<br>";
- echo"<br>";
- echo"<br>";
-
- echo "no wms in this gui";
- }
-}
-
-echo "<input type='hidden' name='guiID' value='" . $_REQUEST["guiID"] . "'>";
-echo "<input type='hidden' name='elementID' value='" . $e_id_css . "'>";
-echo "<input type='hidden' id='wms_show' name='wms_show'>";
-echo "</form>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php (from rev 2171, branches/2.4.5/http/javascripts/mod_addWMSfromfilteredListDB.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredListDB.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,288 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
+<title>Add WMS from Filtered Catalog</title>
+<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
+<STYLE TYPE="text/css">
+<!--
+body{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:10pt
+}
+table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:11;
+}
+.wms_button{
+ color: black;
+ border: solid thin;
+ height:22px;
+}
+-->
+</STYLE>
+<script type="text/javascript">
+<!--
+function mod_addWMSfromDB(gui_id, wms_id) {
+ //alert("1/3 mod_addWMSfromDB: GUI ID = " + gui_id + ", WMS ID = " + wms_id);
+ window.opener.mod_addWMSById_load(gui_id, wms_id);
+}
+
+function mod_show_gui_configured_wms(wert3){
+ document.form1.wms_show.value = wert3;
+ document.form1.submit();
+}
+
+function mod_show_gui(){
+ document.form1.wms_show.value = '';
+ document.form1.submit();
+}
+
+// -->
+</script>
+<?php
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+include '../include/dyn_css.php';
+?>
+</head>
+<body onLoad="window.focus()">
+
+<?php
+$wms_show = $_POST["wms_show"];
+
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$gui_id = array();
+$fieldHeight = 20;
+$cnt_gui = 0;
+$cnt_gui_wms = 0;
+$cnt_wms = 0;
+$cnt_user_group = 0;
+$cnt_group = 0;
+$cnt_gui_mb_group = 0;
+$cnt_group_gui_wms = 0;
+$cnt_fkey_group_gui_wms = 0;
+$cnt_fkey_show_gui_wms = 0;
+$cnt_show_gui_wms = 0;
+$cnt_group_name = 0;
+$cnt_gui_table = 0;
+$exists = false;
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+$logged_gui_id=$_SESSION["mb_user_gui"];
+
+
+/*get allocated gui ********************************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+for ($i = 1; $i <= count($arrayGuis); $i++){
+ if ($i > 1) {
+ $sql_gui .= ",";
+ }
+ $sql_gui .= "$" . $i;
+ array_push($t, "s");
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui, $v, $t);
+ while($row = db_fetch_array($res_gui)){
+ $gui_id[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $gui_description[$cnt_gui] = $row["gui_description"];
+ #echo"$gui_name[$cnt_gui]";
+ $cnt_gui++;
+ }
+/*get allocated gui ********************************************************************************************/
+
+/*get allocated wms from allocated gui ********************************************************************************************/
+$sql_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id IN (";
+$v = $arrayGuis;
+$t = array();
+for ($i = 1; $i <= count($arrayGuis); $i++) {
+ if ($i > 1) {
+ $sql_gui_wms .= ",";
+ }
+ $sql_gui_wms .= "$".$i;
+ array_push($t, "s");
+}
+$sql_gui_wms.= ") ORDER BY fkey_wms_id";
+
+$res_gui_wms = db_prep_query($sql_gui_wms, $v, $t);
+while($row = db_fetch_array($res_gui_wms)){
+ $fkey_gui_id[$cnt_gui_wms] = $row["fkey_gui_id"];
+ $fkey_wms_id[$cnt_gui_wms] = $row["fkey_wms_id"];
+ $cnt_gui_wms++;
+}
+/*get allocated wms from allocated gui ********************************************************************************************/
+
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+$sql_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_version FROM wms WHERE wms_id IN (";
+$v = $fkey_wms_id;
+$t = array();
+for ($i = 1; $i <= count($fkey_wms_id); $i++){
+ if ($i > 1) {
+ $sql_wms .= ",";
+ }
+ $sql_wms .= "$" . $i;
+ array_push($t, "s");
+}
+$sql_wms.= ") ORDER BY wms_title";
+
+$res_wms = db_prep_query($sql_wms, $v, $t);
+ while($row = db_fetch_array($res_wms)){
+ $wms_title[$cnt_wms] = $row["wms_title"];
+ $wms_abstract[$cnt_wms] = $row["wms_abstract"];
+ $wms_getcapabilities[$cnt_wms] = $row["wms_getcapabilities"];
+ $wms_version[$cnt_wms] = $row["wms_version"];
+ $cnt_wms++;
+ }
+/*get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self."' method='post'>";
+
+if (empty($wms_show)){ #gui
+ echo $selectGuiText;
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = 'lightgrey' >";
+ echo "<tr><td width='200' height='10'>".$guiNameText."</td><td align = 'left' class='fieldnames_s'>".$guiAbstractText."</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_gui; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_name[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_name[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_name[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_description[$i]."' value='".$gui_id[$i]."' class='even' name ='".$gui_description[$i]."' style='cursor:pointer' onclick = 'mod_show_gui_configured_wms(\"".$gui_id[$i]."\")'>".$gui_description[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+}
+
+else {
+ echo "<input type='button' class='wms_button' name='wms2' value='" . $selectOtherGuiText . "' onclick = 'mod_show_gui()'></td>";
+
+ /*get group gui WMS ********************************************************************************************/
+ $sql_fkey_show_gui_wms = "SELECT DISTINCT fkey_wms_id, fkey_gui_id FROM gui_wms WHERE fkey_gui_id = $1";
+ #$sql_fkey_show_gui_wms.= ") ORDER BY fkey_wms_id";
+
+ $v = array($wms_show);
+ $t = array("s");
+ $res_fkey_show_gui_wms = db_prep_query($sql_fkey_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_fkey_show_gui_wms)){
+ $fkey_show_gui_gui_id[$cnt_fkey_show_gui_wms] = $row["fkey_gui_id"];
+ $fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms] = $row["fkey_wms_id"];
+ #echo"$fkey_show_gui_wms_id[$cnt_fkey_show_gui_wms]";
+ $cnt_fkey_show_gui_wms++;
+ }
+ /*get group gui WMS ********************************************************************************************/
+
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ if(count($fkey_show_gui_wms_id)>0){
+ $sql_show_gui_wms = "SELECT DISTINCT wms_title, wms_abstract, wms_getcapabilities, wms_id, wms_version FROM wms WHERE wms_id IN (";
+ $v = $fkey_show_gui_wms_id;
+ $t = array();
+ for ($i = 1; $i <= count($fkey_show_gui_wms_id); $i++){
+ if ($i > 1) {
+ $sql_show_gui_wms .= ",";
+ }
+ $sql_show_gui_wms .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql_show_gui_wms.= ") ORDER BY wms_title";
+
+ $res_show_gui_wms = db_prep_query($sql_show_gui_wms, $v, $t);
+ while($row = db_fetch_array($res_show_gui_wms)){
+ $gui_wms_id[$cnt_show_gui_wms] = $row["wms_id"];
+ $gui_wms_title[$cnt_show_gui_wms] = $row["wms_title"];
+ $gui_wms_abstract[$cnt_show_gui_wms] = $row["wms_abstract"];
+ $gui_wms_getcapabilities[$cnt_show_gui_wms] = $row["wms_getcapabilities"];
+ $gui_wms_version[$cnt_show_gui_wms] = $row["wms_version"];
+ #echo"$gui_wms_title[$cnt_show_gui_wms]";
+ $cnt_show_gui_wms++;
+ }
+ /*gui: get allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+
+ /*table with allocated wms-Abstract and wms-Capabilities from allocated gui ********************************************************************************************/
+ #if (isset($cnt_show_gui_wms > 0))
+ }
+
+ if ($cnt_show_gui_wms > 0){
+ /*get selected gui name for table caption ********************************************************************************************/
+ $sql_gui_table = "SELECT * FROM gui WHERE gui_id = $1";
+ $v = array($wms_show);
+ $t = array("s");
+ $res_gui_table = db_prep_query($sql_gui_table, $v, $t);
+ while($row = db_fetch_array($res_gui_table)){
+ $gui_id_table[$cnt_gui_table] = $row["gui_id"];
+ $gui_name_table[$cnt_gui_table] = $row["gui_name"];
+ $cnt_gui_table++;
+ #echo"$gui_id_table[0]";
+ }
+
+ /*get selected gui name for table caption ********************************************************************************************/
+
+ echo"<br>";
+ echo"<br>";
+ echo $selectWmsText . " " . $gui_name_table[0];
+ echo"<br>";
+ echo"<br>";
+ echo "<table border='1' width ='98%' cellpadding='3' rules='rows'>";
+ echo " <thead bgcolor = '#FAEBD7' >";
+ echo "<tr><td width='200' height='10'>".$wmsTitleText."</td><td align = 'left' class='fieldnames_s'>".$wmsAbstractText."</td>";
+ echo " </thead>";
+ echo " <tbody >";
+ for($i=0; $i<$cnt_show_gui_wms; $i++){
+ echo "<tr class='Farbe' onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ echo "<td><div id ='id_".$gui_wms_title[$i]."' class='even' name ='name_".$gui_wms_title[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$wms_show."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_title[$i]."</div></td>";
+ echo "<td><div id ='id_".$gui_wms_abstract[$i]."' class='even' name ='name_".$gui_wms_abstract[$i]."' style='cursor:pointer' onclick = 'mod_addWMSfromDB(\"".$wms_show."\",\"".$gui_wms_id[$i]."\")'>".$gui_wms_abstract[$i]."</div></td>";
+ echo "</tr>";
+ }
+ echo " </tbody>";
+ echo "</table>";
+ }
+ else{
+ echo"<br>";
+ echo"<br>";
+ echo"<br>";
+
+ echo "no wms in this gui";
+ }
+}
+
+echo "<input type='hidden' name='guiID' value='" . $_REQUEST["guiID"] . "'>";
+echo "<input type='hidden' name='elementID' value='" . $e_id_css . "'>";
+echo "<input type='hidden' id='wms_show' name='wms_show'>";
+echo "</form>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,289 +0,0 @@
-<?php
-# $Id: mod_addWMSfromfilteredList.php 830 2006-11-20 13:39:10Z christoph $
-# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'>
-<title>Add WMS from Filtered Catalog</title>
-<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
-<STYLE TYPE="text/css">
-<!--
-body{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:10pt
-}
-
-table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- font-size:11;
-}
-
-.wms_button{
- color: black;
- border: solid thin;
- height:22px;
- width:60px;
-}
--->
-</STYLE>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-<!--
-var global_source = "capabilities"; // "capabilities" || "db"
-var phpUrl = "../php/mod_addWMSfromfilteredList_server.php";
-
-// ----------------- Load service --------------------
-
-function mod_addWMSfromDB(gui_id, wms_id) {
- window.opener.mod_addWMSById_load(gui_id, wms_id);
-}
-
-function mod_addWMSfromfilteredList(pointer_name,version){
-
- var load = false;
- var conjunctionCharacter = window.opener.mb_getConjunctionCharacter(pointer_name);
-
- if (version == '1.0.0') {
- load = pointer_name + conjunctionCharacter + "REQUEST=capabilities&WMTVER=1.0.0";
- }
- else if (version == '1.1.0' || version == '1.1.1') {
- load = pointer_name + conjunctionCharacter + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=" + version;
- }
- if (load !== false) {
- window.opener.mod_addWMS_load(load);
- }
-}
-
-// ----------------- Retrieve data --------------------
-
-function setSource(sourceValue) {
- global_source = sourceValue;
-}
-
-function getGroups() {
- imageOn();
- window.opener.mb_ajax_json(phpUrl, {"command":"getGroups"}, function (json, status) {
- imageOff();
- displayGroups(json.group);
- });
-}
-
-function getGUIs() {
- imageOn();
- window.opener.mb_ajax_json(phpUrl, {"command":"getGUIs"}, function (json, status) {
- imageOff();
- displayGUIs(json.gui);
- });
-}
-
-function getWMSByGUI(guiId) {
- imageOn();
- window.opener.mb_ajax_json(phpUrl, {"command":"getWMSByGUI", "guiId":guiId}, function (json, status) {
- imageOff();
- displayWMS(json.wms, guiId);
- });
-}
-
-function getWMSByGroup(groupId) {
- imageOn();
- window.opener.mb_ajax_json(phpUrl, {"command":"getWMSByGroup", "groupId":groupId}, function (json, status) {
- imageOff();
- displayWMS(json.wms);
- });
-}
-
-function getAllWMS() {
- imageOn();
- window.opener.mb_ajax_json(phpUrl, {"command":"getAllWMS"}, function (json, status) {
- imageOff();
- displayWMS(json.wms);
- });
-}
-
-// ----------------- Display results --------------------
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-
-function setTableHeader(text, titleLeft, titleRight) {
- document.getElementById("resultTable").style.visibility = 'visible';
- document.getElementById("resultString").innerHTML = text;
- document.getElementById("titleLeft").innerHTML = titleLeft;
- document.getElementById("titleRight").innerHTML = titleRight;
- removeChildNodes(document.getElementById("resultTableBody"));
-}
-
-function addRow(tableId, leftText, rightText, onClick) {
- var leftNode = document.createElement("td");
- var leftDivNode = createDiv(leftText, onClick);
- leftNode.appendChild(leftDivNode);
-
- var rightNode = document.createElement("td");
- var rightDivNode = createDiv(rightText, onClick);
- rightNode.appendChild(rightDivNode);
-
- var rowNode = document.createElement("tr");
- rowNode.setAttribute("onmouseover", "this.style.backgroundColor = \"#F08080\"");
- rowNode.setAttribute("onmouseout", "this.style.backgroundColor = \"#FFFFFF\"");
- rowNode.appendChild(leftNode);
- rowNode.appendChild(rightNode);
-
- document.getElementById(tableId).appendChild(rowNode);
-}
-
-function createDiv(text, onClick) {
- var divNode = document.createElement("div");
- divNode.style.cursor = "pointer";
- divNode.setAttribute("onclick", onClick);
- divNode.innerHTML = text;
- return divNode;
-}
-
-function imageOn() {
- document.getElementById("searchImage").style.visibility = "visible";
- document.getElementById("resultTable").style.visibility = "hidden";
- document.getElementById("resultString").style.visibility = "hidden";
-}
-
-function imageOff() {
- document.getElementById("searchImage").style.visibility = "hidden";
- document.getElementById("resultTable").style.visibility = "visible";
- document.getElementById("resultString").style.visibility = "visible";
-}
-
-function noResult() {
- document.getElementById("resultTable").style.visibility = 'hidden';
- document.getElementById("resultString").innerHTML = noResultText;
-}
-
-function setButtons() {
- if (typeof(option_all) != "undefined" && option_all == '0') {
- var child = document.getElementById("button_all");
- child.parentNode.removeChild(child);
- }
- if (typeof(option_group) != "undefined" && option_group == '0') {
- var child = document.getElementById("button_group");
- child.parentNode.removeChild(child);
- }
- if (typeof(option_gui) != "undefined" && option_gui == '0') {
- var child = document.getElementById("button_gui");
- child.parentNode.removeChild(child);
- }
- if (typeof(option_db) != "undefined" && option_db == '0') {
- var child = document.getElementById("button_db");
- child.parentNode.removeChild(child);
- }
-}
-
-function displayGroups (groupArray) {
- if (groupArray.length > 0) {
- setTableHeader(selectGroupText, groupNameText, groupAbstractText);
-
- for (var i = 0; i < groupArray.length; i++) {
- var onClick = "getWMSByGroup('" + groupArray[i].id + "')";
- addRow("resultTableBody", groupArray[i].name, groupArray[i].description, onClick);
- }
- }
- else {
- noResult();
- }
-}
-
-function displayGUIs (guiArray) {
- if (guiArray.length > 0) {
- setTableHeader(selectGuiText, guiNameText, guiAbstractText);
-
- for (var i = 0; i < guiArray.length; i++) {
- var onClick = "getWMSByGUI('" + guiArray[i].id + "')";
- addRow("resultTableBody", guiArray[i].name, guiArray[i].description, onClick);
- }
- }
- else {
- noResult();
- }
-}
-
-function displayWMS (wmsArray, guiId) {
- if (wmsArray.length > 0) {
- setTableHeader(selectWmsText, wmsNameText, wmsAbstractText);
-
- for (var i = 0; i < wmsArray.length; i++) {
-
- if (global_source == "db" && typeof(guiId) !== "undefined" ) {
- var onClick = "mod_addWMSfromDB('" + guiId + "', '" + wmsArray[i].id + "')";
- }
- else {
- var onClick = "mod_addWMSfromfilteredList('" + wmsArray[i].getCapabilitiesUrl + "', '" + wmsArray[i].version + "')";
- }
- addRow("resultTableBody", wmsArray[i].title, wmsArray[i].abstract, onClick);
- }
- }
- else {
- noResult();
- }
-}
-
-// -->
-</script>
-</head>
-<body onLoad="window.focus();setButtons();">
-
-<form name='addWMSForm'>
- <table border='0' cellpadding='3' rules='rows'>
- <tr>
- <td><input type='button' class='wms_button' name='button_all' id='button_all' value='all wms' onclick='setSource("capabilities");getAllWMS()'></td>
- <td><input type='button' class='wms_button' name='button_group' id='button_group' value='group' onclick = 'setSource("capabilities");getGroups()'></td>
- <td><input type='button' class='wms_button' name='button_gui' id='button_gui' value='gui' onclick = 'setSource("capabilities");getGUIs()'></td>
- <td><input type='button' class='wms_button' name='button_db' id='button_db' value='db' onclick = 'setSource("db");getGUIs()'></td>
- </tr>
- </table>
-</form>
-
-<div id='searchImage' name='searchImage' style='visibility:hidden'>
- <img src='../img/indicator_wheel.gif'>
-</div>
-
-<div id='resultString' name='resultString'></div>
-
-<br>
-
-<table id='resultTable' name='resultTable' border=1 width="98%" cellpadding=3 rules='rows' style='visibility:hidden'>
- <thead bgcolor="#FAEBD7">
- <tr>
- <td id='titleLeft' name='titleLeft' width=200 height=10></td>
- <td id='titleRight' name='titleRight' align=left class=fieldnames_s></td>
- </tr>
- </thead>
- <tbody id='resultTableBody' name='resultTableBody'>
- </tbody>
-</table>
-</div>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php (from rev 2140, branches/2.4.5/http/javascripts/mod_addWMSfromfilteredList_ajax.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_addWMSfromfilteredList_ajax.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,289 @@
+<?php
+# $Id: mod_addWMSfromfilteredList.php 830 2006-11-20 13:39:10Z christoph $
+# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'>
+<title>Add WMS from Filtered Catalog</title>
+<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
+<STYLE TYPE="text/css">
+<!--
+body{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:10pt
+}
+
+table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ font-size:11;
+}
+
+.wms_button{
+ color: black;
+ border: solid thin;
+ height:22px;
+ width:60px;
+}
+-->
+</STYLE>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+<!--
+var global_source = "capabilities"; // "capabilities" || "db"
+var phpUrl = "../php/mod_addWMSfromfilteredList_server.php";
+
+// ----------------- Load service --------------------
+
+function mod_addWMSfromDB(gui_id, wms_id) {
+ window.opener.mod_addWMSById_load(gui_id, wms_id);
+}
+
+function mod_addWMSfromfilteredList(pointer_name,version){
+
+ var load = false;
+ var conjunctionCharacter = window.opener.mb_getConjunctionCharacter(pointer_name);
+
+ if (version == '1.0.0') {
+ load = pointer_name + conjunctionCharacter + "REQUEST=capabilities&WMTVER=1.0.0";
+ }
+ else if (version == '1.1.0' || version == '1.1.1') {
+ load = pointer_name + conjunctionCharacter + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=" + version;
+ }
+ if (load !== false) {
+ window.opener.mod_addWMS_load(load);
+ }
+}
+
+// ----------------- Retrieve data --------------------
+
+function setSource(sourceValue) {
+ global_source = sourceValue;
+}
+
+function getGroups() {
+ imageOn();
+ window.opener.mb_ajax_json(phpUrl, {"command":"getGroups"}, function (json, status) {
+ imageOff();
+ displayGroups(json.group);
+ });
+}
+
+function getGUIs() {
+ imageOn();
+ window.opener.mb_ajax_json(phpUrl, {"command":"getGUIs"}, function (json, status) {
+ imageOff();
+ displayGUIs(json.gui);
+ });
+}
+
+function getWMSByGUI(guiId) {
+ imageOn();
+ window.opener.mb_ajax_json(phpUrl, {"command":"getWMSByGUI", "guiId":guiId}, function (json, status) {
+ imageOff();
+ displayWMS(json.wms, guiId);
+ });
+}
+
+function getWMSByGroup(groupId) {
+ imageOn();
+ window.opener.mb_ajax_json(phpUrl, {"command":"getWMSByGroup", "groupId":groupId}, function (json, status) {
+ imageOff();
+ displayWMS(json.wms);
+ });
+}
+
+function getAllWMS() {
+ imageOn();
+ window.opener.mb_ajax_json(phpUrl, {"command":"getAllWMS"}, function (json, status) {
+ imageOff();
+ displayWMS(json.wms);
+ });
+}
+
+// ----------------- Display results --------------------
+
+function removeChildNodes(node) {
+ while (node.childNodes.length > 0) {
+ var childNode = node.firstChild;
+ node.removeChild(childNode);
+ }
+}
+
+function setTableHeader(text, titleLeft, titleRight) {
+ document.getElementById("resultTable").style.visibility = 'visible';
+ document.getElementById("resultString").innerHTML = text;
+ document.getElementById("titleLeft").innerHTML = titleLeft;
+ document.getElementById("titleRight").innerHTML = titleRight;
+ removeChildNodes(document.getElementById("resultTableBody"));
+}
+
+function addRow(tableId, leftText, rightText, onClick) {
+ var leftNode = document.createElement("td");
+ var leftDivNode = createDiv(leftText, onClick);
+ leftNode.appendChild(leftDivNode);
+
+ var rightNode = document.createElement("td");
+ var rightDivNode = createDiv(rightText, onClick);
+ rightNode.appendChild(rightDivNode);
+
+ var rowNode = document.createElement("tr");
+ rowNode.setAttribute("onmouseover", "this.style.backgroundColor = \"#F08080\"");
+ rowNode.setAttribute("onmouseout", "this.style.backgroundColor = \"#FFFFFF\"");
+ rowNode.appendChild(leftNode);
+ rowNode.appendChild(rightNode);
+
+ document.getElementById(tableId).appendChild(rowNode);
+}
+
+function createDiv(text, onClick) {
+ var divNode = document.createElement("div");
+ divNode.style.cursor = "pointer";
+ divNode.setAttribute("onclick", onClick);
+ divNode.innerHTML = text;
+ return divNode;
+}
+
+function imageOn() {
+ document.getElementById("searchImage").style.visibility = "visible";
+ document.getElementById("resultTable").style.visibility = "hidden";
+ document.getElementById("resultString").style.visibility = "hidden";
+}
+
+function imageOff() {
+ document.getElementById("searchImage").style.visibility = "hidden";
+ document.getElementById("resultTable").style.visibility = "visible";
+ document.getElementById("resultString").style.visibility = "visible";
+}
+
+function noResult() {
+ document.getElementById("resultTable").style.visibility = 'hidden';
+ document.getElementById("resultString").innerHTML = noResultText;
+}
+
+function setButtons() {
+ if (typeof(option_all) != "undefined" && option_all == '0') {
+ var child = document.getElementById("button_all");
+ child.parentNode.removeChild(child);
+ }
+ if (typeof(option_group) != "undefined" && option_group == '0') {
+ var child = document.getElementById("button_group");
+ child.parentNode.removeChild(child);
+ }
+ if (typeof(option_gui) != "undefined" && option_gui == '0') {
+ var child = document.getElementById("button_gui");
+ child.parentNode.removeChild(child);
+ }
+ if (typeof(option_db) != "undefined" && option_db == '0') {
+ var child = document.getElementById("button_db");
+ child.parentNode.removeChild(child);
+ }
+}
+
+function displayGroups (groupArray) {
+ if (groupArray.length > 0) {
+ setTableHeader(selectGroupText, groupNameText, groupAbstractText);
+
+ for (var i = 0; i < groupArray.length; i++) {
+ var onClick = "getWMSByGroup('" + groupArray[i].id + "')";
+ addRow("resultTableBody", groupArray[i].name, groupArray[i].description, onClick);
+ }
+ }
+ else {
+ noResult();
+ }
+}
+
+function displayGUIs (guiArray) {
+ if (guiArray.length > 0) {
+ setTableHeader(selectGuiText, guiNameText, guiAbstractText);
+
+ for (var i = 0; i < guiArray.length; i++) {
+ var onClick = "getWMSByGUI('" + guiArray[i].id + "')";
+ addRow("resultTableBody", guiArray[i].name, guiArray[i].description, onClick);
+ }
+ }
+ else {
+ noResult();
+ }
+}
+
+function displayWMS (wmsArray, guiId) {
+ if (wmsArray.length > 0) {
+ setTableHeader(selectWmsText, wmsNameText, wmsAbstractText);
+
+ for (var i = 0; i < wmsArray.length; i++) {
+
+ if (global_source == "db" && typeof(guiId) !== "undefined" ) {
+ var onClick = "mod_addWMSfromDB('" + guiId + "', '" + wmsArray[i].id + "')";
+ }
+ else {
+ var onClick = "mod_addWMSfromfilteredList('" + wmsArray[i].getCapabilitiesUrl + "', '" + wmsArray[i].version + "')";
+ }
+ addRow("resultTableBody", wmsArray[i].title, wmsArray[i].abstract, onClick);
+ }
+ }
+ else {
+ noResult();
+ }
+}
+
+// -->
+</script>
+</head>
+<body onLoad="window.focus();setButtons();">
+
+<form name='addWMSForm'>
+ <table border='0' cellpadding='3' rules='rows'>
+ <tr>
+ <td><input type='button' class='wms_button' name='button_all' id='button_all' value='all wms' onclick='setSource("capabilities");getAllWMS()'></td>
+ <td><input type='button' class='wms_button' name='button_group' id='button_group' value='group' onclick = 'setSource("capabilities");getGroups()'></td>
+ <td><input type='button' class='wms_button' name='button_gui' id='button_gui' value='gui' onclick = 'setSource("capabilities");getGUIs()'></td>
+ <td><input type='button' class='wms_button' name='button_db' id='button_db' value='db' onclick = 'setSource("db");getGUIs()'></td>
+ </tr>
+ </table>
+</form>
+
+<div id='searchImage' name='searchImage' style='visibility:hidden'>
+ <img src='../img/indicator_wheel.gif'>
+</div>
+
+<div id='resultString' name='resultString'></div>
+
+<br>
+
+<table id='resultTable' name='resultTable' border=1 width="98%" cellpadding=3 rules='rows' style='visibility:hidden'>
+ <thead bgcolor="#FAEBD7">
+ <tr>
+ <td id='titleLeft' name='titleLeft' width=200 height=10></td>
+ <td id='titleRight' name='titleRight' align=left class=fieldnames_s></td>
+ </tr>
+ </thead>
+ <tbody id='resultTableBody' name='resultTableBody'>
+ </tbody>
+</table>
+</div>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_add_vendorspecific.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,27 +0,0 @@
-<?php
-# $Id:
-# add vendor-specific parameters to MapRequest and FeatureInfoRequests
-# http://www.mapbender.org/index.php/mod_add_vendorspecific.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-?>
-mb_registerVendorSpecific("mod_vs_init()");
-function mod_vs_init(){
- var re = "vendorspecific=<?php echo $_SESSION['mb_user_name'] ?>";
- return re;
-}
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php (from rev 2140, branches/2.4.5/http/javascripts/mod_add_vendorspecific.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_add_vendorspecific.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,29 @@
+<?php
+# $Id:
+# add vendor-specific parameters to MapRequest and FeatureInfoRequests
+# http://www.mapbender.org/index.php/mod_add_vendorspecific.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+?>
+mb_registerVendorSpecific("mod_vs_init()");
+function mod_vs_init(){
+ var re = "vendorspecific=<?php echo $_SESSION['mb_user_name'] ?>";
+ return re;
+}
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_back.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_back.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_back.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,126 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Back
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'back' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = split(",",$row["e_target"]);
- $cnt++;
-}
-if($cnt > 1){ echo "alert('back: ID not unique!');";}
-echo "var mod_back_map = '".$e_target[0]."';";
-echo "var mod_back_overview = '".$e_target[1]."';";
-
-?>
-var mb_MapHistoryObj = new Array();
-var mod_back_img_off = new Image(); mod_back_img_off.src = "<?php echo preg_replace("/_off_disabled/","_off",$e_src); ?>";
-var mod_back_img_off_disabled = new Image(); mod_back_img_off_disabled.src = "<?php echo $e_src; ?>";
-var mod_back_img_over = new Image(); mod_back_img_over.src = "<?php echo preg_replace("/_off_disabled/","_over",$e_src); ?>";
-var mod_back_img_previous = null;
-var mod_back_cnt = -1;
-
-mb_registerSubFunctions("mb_setHistoryObj(frameName)");
-mb_registerSubFunctions("mod_back_check(frameName)");
-
-function mod_back_check(frameName){
- if(frameName == mod_back_map){
- mod_back_cnt++;
- if(mb_MapHistoryObj[mod_back_map].length > 1){
- document.getElementById("back").src = mod_back_img_off.src;
- }
- else{
- document.getElementById("back").src = mod_back_img_off_disabled.src;
- mod_back_img_previous = document.getElementById("back").src;
- }
- }
-}
-function mod_back_over(obj){
- mod_back_img_previous = document.getElementById("back").src;
- if(document.getElementById("back").src == mod_back_img_off.src){
- document.getElementById("back").src = mod_back_img_over.src;
- }
-}
-
-function mod_back_out(obj){
- document.getElementById("back").src = mod_back_img_previous;
-}
-
-function mod_back_set(){
- if(mod_back_img_previous == mod_back_img_off.src){
- if(mb_MapFutureObj){
- mb_setFutureObj(mod_back_map);
- }
- var ind = getMapObjIndexByName(mod_back_map);
- var cnt = mb_MapHistoryObj[mod_back_map].length - 2;
- if(mb_mapObj[ind].epsg != mb_MapHistoryObj[mod_back_map][cnt].epsg){
- var oind = getMapObjIndexByName(mod_back_overview);
- for(var i=0; i < mb_MapHistoryObj[mod_back_overview].length; i++){
- if(mb_MapHistoryObj[mod_back_overview][i].epsg == mb_MapHistoryObj[mod_back_map][cnt].epsg){
- mb_mapObj[oind].epsg = mb_MapHistoryObj[mod_back_overview][i].epsg;
- mb_mapObj[oind].extent = mb_MapHistoryObj[mod_back_overview][i].extent;
- setMapRequest(mod_back_overview);
- break;
- }
- }
- }
- document.getElementById(mod_back_map).style.width = mb_MapHistoryObj[mod_back_map][cnt].width;
- document.getElementById(mod_back_map).style.height = mb_MapHistoryObj[mod_back_map][cnt].height;
- mb_mapObj[ind].width = mb_MapHistoryObj[mod_back_map][cnt].width;
- mb_mapObj[ind].height = mb_MapHistoryObj[mod_back_map][cnt].height;
- mb_mapObj[ind].epsg = mb_MapHistoryObj[mod_back_map][cnt].epsg;
- mb_mapObj[ind].extent = mb_MapHistoryObj[mod_back_map][cnt].extent;
- mb_mapObj[ind].layers = mb_MapHistoryObj[mod_back_map][cnt].layers;
- mb_mapObj[ind].styles = mb_MapHistoryObj[mod_back_map][cnt].styles;
- mb_mapObj[ind].querylayers = mb_MapHistoryObj[mod_back_map][cnt].querylayers;
- mb_MapHistoryObj[mod_back_map].length = (mb_MapHistoryObj[mod_back_map].length - 2);
- setMapRequest(mod_back_map);
- }
-}
-function mb_setHistoryObj(frameName){
- if(mb_MapHistoryObj[frameName] == null){
- mb_MapHistoryObj[frameName] = new Array();
- }
- var ind = getMapObjIndexByName(frameName);
- var cnt = mb_MapHistoryObj[frameName].length;
- mb_MapHistoryObj[frameName][cnt] = new Object();
- mb_MapHistoryObj[frameName][cnt].width = mb_mapObj[ind].width;
- mb_MapHistoryObj[frameName][cnt].height = mb_mapObj[ind].height;
- mb_MapHistoryObj[frameName][cnt].epsg = mb_mapObj[ind].epsg;
- mb_MapHistoryObj[frameName][cnt].extent = mb_mapObj[ind].extent;
- mb_MapHistoryObj[frameName][cnt].layers = new Array();
- for(var i=0; i<mb_mapObj[ind].layers.length;i++){
- mb_MapHistoryObj[frameName][cnt].layers[i] = mb_mapObj[ind].layers[i];
- }
- mb_MapHistoryObj[frameName][cnt].styles = new Array();
- for(var i=0; i<mb_mapObj[ind].styles.length;i++){
- mb_MapHistoryObj[frameName][cnt].styles[i] = mb_mapObj[ind].styles[i];
- }
- mb_MapHistoryObj[frameName][cnt].querylayers = new Array();
- for(var i=0; i<mb_mapObj[ind].querylayers.length;i++){
- mb_MapHistoryObj[frameName][cnt].querylayers[i] = mb_mapObj[ind].querylayers[i];
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_back.php (from rev 2181, branches/2.4.5/http/javascripts/mod_back.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_back.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_back.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,123 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Back
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'back' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = split(",",$row["e_target"]);
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('back: ID not unique!');";}
+echo "var mod_back_map = '".$e_target[0]."';";
+echo "var mod_back_overview = '".$e_target[1]."';";
+
+?>
+var mb_MapHistoryObj = new Array();
+var mod_back_img_off = new Image(); mod_back_img_off.src = "<?php echo preg_replace("/_off_disabled/","_off",$e_src); ?>";
+var mod_back_img_off_disabled = new Image(); mod_back_img_off_disabled.src = "<?php echo $e_src; ?>";
+var mod_back_img_over = new Image(); mod_back_img_over.src = "<?php echo preg_replace("/_off_disabled/","_over",$e_src); ?>";
+var mod_back_img_previous = null;
+var mod_back_cnt = -1;
+
+mb_registerSubFunctions("mb_setHistoryObj(frameName)");
+mb_registerSubFunctions("mod_back_check(frameName)");
+
+function mod_back_check(frameName){
+ if(frameName == mod_back_map){
+ mod_back_cnt++;
+ if(mb_MapHistoryObj[mod_back_map].length > 1){
+ document.getElementById("back").src = mod_back_img_off.src;
+ }
+ else{
+ document.getElementById("back").src = mod_back_img_off_disabled.src;
+ mod_back_img_previous = document.getElementById("back").src;
+ }
+ }
+}
+function mod_back_over(obj){
+ mod_back_img_previous = document.getElementById("back").src;
+ if(document.getElementById("back").src == mod_back_img_off.src){
+ document.getElementById("back").src = mod_back_img_over.src;
+ }
+}
+
+function mod_back_out(obj){
+ document.getElementById("back").src = mod_back_img_previous;
+}
+
+function mod_back_set(){
+ if(mod_back_img_previous == mod_back_img_off.src){
+ if(mb_MapFutureObj){
+ mb_setFutureObj(mod_back_map);
+ }
+ var ind = getMapObjIndexByName(mod_back_map);
+ var cnt = mb_MapHistoryObj[mod_back_map].length - 2;
+ if(mb_mapObj[ind].epsg != mb_MapHistoryObj[mod_back_map][cnt].epsg){
+ var oind = getMapObjIndexByName(mod_back_overview);
+ for(var i=0; i < mb_MapHistoryObj[mod_back_overview].length; i++){
+ if(mb_MapHistoryObj[mod_back_overview][i].epsg == mb_MapHistoryObj[mod_back_map][cnt].epsg){
+ mb_mapObj[oind].epsg = mb_MapHistoryObj[mod_back_overview][i].epsg;
+ mb_mapObj[oind].extent = mb_MapHistoryObj[mod_back_overview][i].extent;
+ setMapRequest(mod_back_overview);
+ break;
+ }
+ }
+ }
+ document.getElementById(mod_back_map).style.width = mb_MapHistoryObj[mod_back_map][cnt].width;
+ document.getElementById(mod_back_map).style.height = mb_MapHistoryObj[mod_back_map][cnt].height;
+ mb_mapObj[ind].width = mb_MapHistoryObj[mod_back_map][cnt].width;
+ mb_mapObj[ind].height = mb_MapHistoryObj[mod_back_map][cnt].height;
+ mb_mapObj[ind].epsg = mb_MapHistoryObj[mod_back_map][cnt].epsg;
+ mb_mapObj[ind].extent = mb_MapHistoryObj[mod_back_map][cnt].extent;
+ mb_mapObj[ind].layers = mb_MapHistoryObj[mod_back_map][cnt].layers;
+ mb_mapObj[ind].styles = mb_MapHistoryObj[mod_back_map][cnt].styles;
+ mb_mapObj[ind].querylayers = mb_MapHistoryObj[mod_back_map][cnt].querylayers;
+ mb_MapHistoryObj[mod_back_map].length = (mb_MapHistoryObj[mod_back_map].length - 2);
+ setMapRequest(mod_back_map);
+ }
+}
+function mb_setHistoryObj(frameName){
+ if(mb_MapHistoryObj[frameName] == null){
+ mb_MapHistoryObj[frameName] = new Array();
+ }
+ var ind = getMapObjIndexByName(frameName);
+ var cnt = mb_MapHistoryObj[frameName].length;
+ mb_MapHistoryObj[frameName][cnt] = new Object();
+ mb_MapHistoryObj[frameName][cnt].width = mb_mapObj[ind].width;
+ mb_MapHistoryObj[frameName][cnt].height = mb_mapObj[ind].height;
+ mb_MapHistoryObj[frameName][cnt].epsg = mb_mapObj[ind].epsg;
+ mb_MapHistoryObj[frameName][cnt].extent = mb_mapObj[ind].extent;
+ mb_MapHistoryObj[frameName][cnt].layers = new Array();
+ for(var i=0; i<mb_mapObj[ind].layers.length;i++){
+ mb_MapHistoryObj[frameName][cnt].layers[i] = mb_mapObj[ind].layers[i];
+ }
+ mb_MapHistoryObj[frameName][cnt].styles = new Array();
+ for(var i=0; i<mb_mapObj[ind].styles.length;i++){
+ mb_MapHistoryObj[frameName][cnt].styles[i] = mb_mapObj[ind].styles[i];
+ }
+ mb_MapHistoryObj[frameName][cnt].querylayers = new Array();
+ for(var i=0; i<mb_mapObj[ind].querylayers.length;i++){
+ mb_MapHistoryObj[frameName][cnt].querylayers[i] = mb_mapObj[ind].querylayers[i];
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_center1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_center1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_center1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,77 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_center1.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'center1' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('center1: ID not unique!');";}
-echo "var mod_center_target = '".$e_target."';";
-?>
-
-var mod_center_elName = "center1";
-var mod_center_frameName = "";
-
-
-var mod_center_img_on = new Image(); mod_center_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_center_img_off = new Image(); mod_center_img_off.src = "<?php echo $e_src; ?>";
-var mod_center_img_over = new Image(); mod_center_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_gui1_center(ind){
- mb_button[ind] = document.getElementById(mod_center_elName);
- mb_button[ind].img_over = mod_center_img_over.src;
- mb_button[ind].img_on = mod_center_img_on.src;
- mb_button[ind].img_off = mod_center_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_center_elName;
- mb_button[ind].fName = mod_center_frameName;
- mb_button[ind].go = new Function ("mod_center_click()");
- mb_button[ind].stop = new Function ("mod_center_disable()");
-}
-function mod_center_click(){
- window.frames[mod_center_target].document.onclick = mod_center_event;
-}
-function mod_center_disable(){
- window.frames[mod_center_target].document.onclick = null;
-}
-function mod_center_event(e){
- if(ie){
- clickX = window.frames[mod_center_target].event.clientX;
- clickY = window.frames[mod_center_target].event.clientY;
-
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_center_target, clickX, clickY);
- zoom(mod_center_target,true,1.0,pos[0], pos[1]);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_center1.php (from rev 2181, branches/2.4.5/http/javascripts/mod_center1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_center1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_center1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,73 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_center1.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'center1' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('center1: ID not unique!');";}
+echo "var mod_center_target = '".$e_target."';";
+?>
+
+var mod_center_elName = "center1";
+var mod_center_frameName = "";
+
+
+var mod_center_img_on = new Image(); mod_center_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_center_img_off = new Image(); mod_center_img_off.src = "<?php echo $e_src; ?>";
+var mod_center_img_over = new Image(); mod_center_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_gui1_center(ind){
+ mb_button[ind] = document.getElementById(mod_center_elName);
+ mb_button[ind].img_over = mod_center_img_over.src;
+ mb_button[ind].img_on = mod_center_img_on.src;
+ mb_button[ind].img_off = mod_center_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_center_elName;
+ mb_button[ind].fName = mod_center_frameName;
+ mb_button[ind].go = new Function ("mod_center_click()");
+ mb_button[ind].stop = new Function ("mod_center_disable()");
+}
+function mod_center_click(){
+ window.frames[mod_center_target].document.onclick = mod_center_event;
+}
+function mod_center_disable(){
+ window.frames[mod_center_target].document.onclick = null;
+}
+function mod_center_event(e){
+ if(ie){
+ clickX = window.frames[mod_center_target].event.clientX;
+ clickY = window.frames[mod_center_target].event.clientY;
+
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_center_target, clickX, clickY);
+ zoom(mod_center_target,true,1.0,pos[0], pos[1]);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_coords.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_coords.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_coords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,93 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_coords.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('showCoords ID not unique!');";}
-echo "var mod_showCoords_target = '".$e_target."';";
-?>
-
-var mod_showCoords_win = null;
-var mod_showCoords_elName = "showCoords";
-var mod_showCoords_frameName = "";
-var mod_showCoords_img_on = new Image(); mod_showCoords_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_showCoords_img_off = new Image(); mod_showCoords_img_off.src = "<?php echo $e_src; ?>";
-var mod_showCoords_img_over = new Image(); mod_showCoords_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_mod_showCoords(ind){
- mb_button[ind] = document.getElementById(mod_showCoords_elName);
- mb_button[ind].img_over = mod_showCoords_img_over.src;
- mb_button[ind].img_on = mod_showCoords_img_on.src;
- mb_button[ind].img_off = mod_showCoords_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_showCoords_elName;
- mb_button[ind].fName = mod_showCoords_frameName;
- mb_button[ind].go = new Function ("mod_showCoords_run()");
- mb_button[ind].stop = new Function ("mod_showCoords_disable()");
-}
-function mod_showCoords_run(){
- window.frames[mod_showCoords_target].document.onmousemove = mod_showCoords_display;
- window.frames[mod_showCoords_target].document.onclick = mod_showCoords_click;
-}
-function mod_showCoords_disable(){
- window.frames[mod_showCoords_target].document.onclick = null;
- window.frames[mod_showCoords_target].document.onmousemove = null;
- window.status = "";
-}
-function mod_showCoords_click(e){
- mod_showCoords_win = window.open("","","width=150, height=100");
- mod_showCoords_win.document.open("text/html");
- if(ie){
- clickX = window.frames[mod_showCoords_target].event.clientX;
- clickY = window.frames[mod_showCoords_target].event.clientY;
-
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY);
- mod_showCoords_win.document.write((Math.round(pos[0]*100)/100) + " / " + (Math.round(pos[1]*100)/100));
- mod_showCoords_win.document.close();
- mod_showCoords_win.focus();
-}
-function mod_showCoords_display(e){
- if(ie){
- clickX = window.frames[mod_showCoords_target].event.clientX;
- clickY = window.frames[mod_showCoords_target].event.clientY;
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY);
- window.status = pos[0] + " / " + pos[1];
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_coords.php (from rev 2181, branches/2.4.5/http/javascripts/mod_coords.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_coords.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_coords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,90 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_coords.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('showCoords ID not unique!');";}
+echo "var mod_showCoords_target = '".$e_target."';";
+?>
+
+var mod_showCoords_win = null;
+var mod_showCoords_elName = "showCoords";
+var mod_showCoords_frameName = "";
+var mod_showCoords_img_on = new Image(); mod_showCoords_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_showCoords_img_off = new Image(); mod_showCoords_img_off.src = "<?php echo $e_src; ?>";
+var mod_showCoords_img_over = new Image(); mod_showCoords_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_mod_showCoords(ind){
+ mb_button[ind] = document.getElementById(mod_showCoords_elName);
+ mb_button[ind].img_over = mod_showCoords_img_over.src;
+ mb_button[ind].img_on = mod_showCoords_img_on.src;
+ mb_button[ind].img_off = mod_showCoords_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_showCoords_elName;
+ mb_button[ind].fName = mod_showCoords_frameName;
+ mb_button[ind].go = new Function ("mod_showCoords_run()");
+ mb_button[ind].stop = new Function ("mod_showCoords_disable()");
+}
+function mod_showCoords_run(){
+ window.frames[mod_showCoords_target].document.onmousemove = mod_showCoords_display;
+ window.frames[mod_showCoords_target].document.onclick = mod_showCoords_click;
+}
+function mod_showCoords_disable(){
+ window.frames[mod_showCoords_target].document.onclick = null;
+ window.frames[mod_showCoords_target].document.onmousemove = null;
+ window.status = "";
+}
+function mod_showCoords_click(e){
+ mod_showCoords_win = window.open("","","width=150, height=100");
+ mod_showCoords_win.document.open("text/html");
+ if(ie){
+ clickX = window.frames[mod_showCoords_target].event.clientX;
+ clickY = window.frames[mod_showCoords_target].event.clientY;
+
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY);
+ mod_showCoords_win.document.write((Math.round(pos[0]*100)/100) + " / " + (Math.round(pos[1]*100)/100));
+ mod_showCoords_win.document.close();
+ mod_showCoords_win.focus();
+}
+function mod_showCoords_display(e){
+ if(ie){
+ clickX = window.frames[mod_showCoords_target].event.clientX;
+ clickY = window.frames[mod_showCoords_target].event.clientY;
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_showCoords_target, clickX, clickY);
+ window.status = pos[0] + " / " + pos[1];
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_coords_div.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_coords_div.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_coords_div.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,103 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_coords_div.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords_div' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('showCoords_div ID not unique!');";}
-echo "var mod_showCoords_div_target = '".$e_target."';";
-?>
-
-var mod_showCoords_div_win = null;
-var mod_showCoords_div_elName = "showCoords_div";
-var mod_showCoords_div_frameName = "";
-var mod_showCoords_div_img_on = new Image(); mod_showCoords_div_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_showCoords_div_img_off = new Image(); mod_showCoords_div_img_off.src = "<?php echo $e_src; ?>";
-var mod_showCoords_div_img_over = new Image(); mod_showCoords_div_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-var mod_showCoords_div_fix = "";
-
-function init_mod_showCoords_div(ind){
- mb_button[ind] = document.getElementById(mod_showCoords_div_elName);
- mb_button[ind].img_over = mod_showCoords_div_img_over.src;
- mb_button[ind].img_on = mod_showCoords_div_img_on.src;
- mb_button[ind].img_off = mod_showCoords_div_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_showCoords_div_elName;
- mb_button[ind].fName = mod_showCoords_div_frameName;
- mb_button[ind].go = new Function ("mod_showCoords_div_run()");
- mb_button[ind].stop = new Function ("mod_showCoords_div_disable()");
-}
-function mod_showCoords_div_run(){
- window.frames[mod_showCoords_div_target].document.onmousemove = mod_showCoords_div_display;
- window.frames[mod_showCoords_div_target].document.onclick = mod_showCoords_div_click;
-}
-function mod_showCoords_div_disable(){
- window.frames[mod_showCoords_div_target].document.onclick = null;
- window.frames[mod_showCoords_div_target].document.onmousemove = null;
- if(document.getElementById("dependentDiv")){
- writeTag("","dependentDiv","");
- }
-}
-function mod_showCoords_div_click(e){
- if(ie){
- clickX = window.frames[mod_showCoords_div_target].event.clientX;
- clickY = window.frames[mod_showCoords_div_target].event.clientY;
-
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
- mod_showCoords_div_fix = "Selection: " + pos[0] + " / " + pos[1];
- mod_showCoord_write(pos[0],pos[1]);
-}
-function mod_showCoords_div_display(e){
- if(ie){
- clickX = window.frames[mod_showCoords_div_target].event.clientX;
- clickY = window.frames[mod_showCoords_div_target].event.clientY;
-
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
- mod_showCoord_write(pos[0],pos[1]);
-}
-function mod_showCoord_write(x,y){
- if(document.getElementById("dependentDiv")){
- var str = x + " / " + y;
- if(mod_showCoords_div_fix != ""){
- str += "<div>" + mod_showCoords_div_fix + "</div>";
- }
- writeTag("","dependentDiv", str);
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_coords_div.php (from rev 2181, branches/2.4.5/http/javascripts/mod_coords_div.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_coords_div.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_coords_div.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,100 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_coords_div.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'showCoords_div' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('showCoords_div ID not unique!');";}
+echo "var mod_showCoords_div_target = '".$e_target."';";
+?>
+
+var mod_showCoords_div_win = null;
+var mod_showCoords_div_elName = "showCoords_div";
+var mod_showCoords_div_frameName = "";
+var mod_showCoords_div_img_on = new Image(); mod_showCoords_div_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_showCoords_div_img_off = new Image(); mod_showCoords_div_img_off.src = "<?php echo $e_src; ?>";
+var mod_showCoords_div_img_over = new Image(); mod_showCoords_div_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+var mod_showCoords_div_fix = "";
+
+function init_mod_showCoords_div(ind){
+ mb_button[ind] = document.getElementById(mod_showCoords_div_elName);
+ mb_button[ind].img_over = mod_showCoords_div_img_over.src;
+ mb_button[ind].img_on = mod_showCoords_div_img_on.src;
+ mb_button[ind].img_off = mod_showCoords_div_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_showCoords_div_elName;
+ mb_button[ind].fName = mod_showCoords_div_frameName;
+ mb_button[ind].go = new Function ("mod_showCoords_div_run()");
+ mb_button[ind].stop = new Function ("mod_showCoords_div_disable()");
+}
+function mod_showCoords_div_run(){
+ window.frames[mod_showCoords_div_target].document.onmousemove = mod_showCoords_div_display;
+ window.frames[mod_showCoords_div_target].document.onclick = mod_showCoords_div_click;
+}
+function mod_showCoords_div_disable(){
+ window.frames[mod_showCoords_div_target].document.onclick = null;
+ window.frames[mod_showCoords_div_target].document.onmousemove = null;
+ if(document.getElementById("dependentDiv")){
+ writeTag("","dependentDiv","");
+ }
+}
+function mod_showCoords_div_click(e){
+ if(ie){
+ clickX = window.frames[mod_showCoords_div_target].event.clientX;
+ clickY = window.frames[mod_showCoords_div_target].event.clientY;
+
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
+ mod_showCoords_div_fix = "Selection: " + pos[0] + " / " + pos[1];
+ mod_showCoord_write(pos[0],pos[1]);
+}
+function mod_showCoords_div_display(e){
+ if(ie){
+ clickX = window.frames[mod_showCoords_div_target].event.clientX;
+ clickY = window.frames[mod_showCoords_div_target].event.clientY;
+
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_showCoords_div_target, clickX, clickY);
+ mod_showCoord_write(pos[0],pos[1]);
+}
+function mod_showCoord_write(x,y){
+ if(document.getElementById("dependentDiv")){
+ var str = x + " / " + y;
+ if(mod_showCoords_div_fix != ""){
+ str += "<div>" + mod_showCoords_div_fix + "</div>";
+ }
+ writeTag("","dependentDiv", str);
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_copyright.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_copyright.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_copyright.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,62 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_copyright.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'copyright';
-$gui_id = $_REQUEST["gui_id"];
-include '../include/dyn_js.php';
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'copyright' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('copyright: ID not unique!');";}
-echo "var mod_copyright_target = '".$e_target."';";
-?>
-try{
- if (mod_copyright_text){}
-}
-catch(e){
- mod_copyright_text = "mapbender.org"
-}
-
-var mod_copyright_left = 5;
-var mod_copyright_bottom = 20;
-var mod_copyright_color1 = "white";
-var mod_copyright_color2 = "black";
-var mod_copyright_font = "Arial, Helvetica, sans-serif";
-var mod_copyright_fontsize = "9px";
-
-mb_registerSubFunctions("mod_copyright()");
-function mod_copyright(){
- var ind = getMapObjIndexByName(mod_copyright_target);
- var str_c = "<div>";
- str_c += "<img src='../img/transparent.gif' width ='"+mb_mapObj[ind].width+"' height='"+mb_mapObj[ind].height+"'>";
- str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - (mod_copyright_bottom-1))+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
- str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
- str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color2+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+(mod_copyright_left+1)+"px'>"+mod_copyright_text+"</div>";
- str_c += "</div>";
- writeTag(mod_copyright_target,"copyright",str_c);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_copyright.php (from rev 2181, branches/2.4.5/http/javascripts/mod_copyright.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_copyright.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_copyright.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,62 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_copyright.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$e_id_css = 'copyright';
+include '../include/dyn_js.php';
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'copyright' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('copyright: ID not unique!');";}
+echo "var mod_copyright_target = '".$e_target."';";
+?>
+try{
+ if (mod_copyright_text){}
+}
+catch(e){
+ mod_copyright_text = "mapbender.org"
+}
+
+var mod_copyright_left = 5;
+var mod_copyright_bottom = 20;
+var mod_copyright_color1 = "white";
+var mod_copyright_color2 = "black";
+var mod_copyright_font = "Arial, Helvetica, sans-serif";
+var mod_copyright_fontsize = "9px";
+
+mb_registerSubFunctions("mod_copyright()");
+function mod_copyright(){
+ var ind = getMapObjIndexByName(mod_copyright_target);
+ var str_c = "<div>";
+ str_c += "<img src='../img/transparent.gif' width ='"+mb_mapObj[ind].width+"' height='"+mb_mapObj[ind].height+"'>";
+ str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - (mod_copyright_bottom-1))+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
+ str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color1+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+mod_copyright_left+"px'>"+mod_copyright_text+"</div>";
+ str_c += "<div style='font-family:"+mod_copyright_font+";font-size:"+mod_copyright_fontsize+";color:"+mod_copyright_color2+";position:absolute;top:"+(mb_mapObj[ind].height - mod_copyright_bottom)+"px;left:"+(mod_copyright_left+1)+"px'>"+mod_copyright_text+"</div>";
+ str_c += "</div>";
+ writeTag(mod_copyright_target,"copyright",str_c);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_dependentDiv.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,48 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_dependentDiv.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentDiv' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target =$row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('dependentDiv: ID not unique!');";}
-echo "var mod_dependentDiv_target = '".$e_target."';";
-?>
-mod_dependentDiv_offsetLeft = 10;
-mod_dependentDiv_offsetTop = 10;
-
-mb_registerSubFunctions("mod_dependentDiv()");
-function mod_dependentDiv(){
- var obj = document.getElementById(mod_dependentDiv_target).style;
- var thisObj = document.getElementById('dependentDiv').style;
- thisObj.left = parseInt(obj.left) - mod_dependentDiv_offsetLeft;
- thisObj.top = parseInt(obj.top) + parseInt(obj.height) + mod_dependentDiv_offsetTop;
- thisObj.width = parseInt(obj.width) + (2*mod_dependentDiv_offsetTop);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php (from rev 2181, branches/2.4.5/http/javascripts/mod_dependentDiv.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_dependentDiv.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,44 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_dependentDiv.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentDiv' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target =$row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('dependentDiv: ID not unique!');";}
+echo "var mod_dependentDiv_target = '".$e_target."';";
+?>
+mod_dependentDiv_offsetLeft = 10;
+mod_dependentDiv_offsetTop = 10;
+
+mb_registerSubFunctions("mod_dependentDiv()");
+function mod_dependentDiv(){
+ var obj = document.getElementById(mod_dependentDiv_target).style;
+ var thisObj = document.getElementById('dependentDiv').style;
+ thisObj.left = parseInt(obj.left) - mod_dependentDiv_offsetLeft;
+ thisObj.top = parseInt(obj.top) + parseInt(obj.height) + mod_dependentDiv_offsetTop;
+ thisObj.width = parseInt(obj.width) + (2*mod_dependentDiv_offsetTop);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_dependentIframe.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,47 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_dependentIframe.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentIframe' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('dependentIframe: ID not unique!');";}
-echo "var mod_dependentIframe_target = '".$e_target."';";
-?>
-mod_dependentIframe_offsetLeft = 10;
-mod_dependentIframe_offsetTop = 10;
-
-parent.mb_registerSubFunctions("mod_dependentIframe()");
-
-function mod_dependentIframe(){
- var obj = document.getElementById(mod_dependentIframe_target).style;
- var thisObj = document.getElementById('dependentIframe').style;
- thisObj.left = parseInt(obj.left) + parseInt(obj.width) + mod_dependentIframe_offsetLeft;
- thisObj.top = parseInt(obj.top) - mod_dependentIframe_offsetTop;
- thisObj.height = parseInt(obj.height) + (2*mod_dependentIframe_offsetTop);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php (from rev 2181, branches/2.4.5/http/javascripts/mod_dependentIframe.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_dependentIframe.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,45 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_dependentIframe.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dependentIframe' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('dependentIframe: ID not unique!');";}
+echo "var mod_dependentIframe_target = '".$e_target."';";
+?>
+mod_dependentIframe_offsetLeft = 10;
+mod_dependentIframe_offsetTop = 10;
+
+parent.mb_registerSubFunctions("mod_dependentIframe()");
+
+function mod_dependentIframe(){
+ var obj = document.getElementById(mod_dependentIframe_target).style;
+ var thisObj = document.getElementById('dependentIframe').style;
+ thisObj.left = parseInt(obj.left) + parseInt(obj.width) + mod_dependentIframe_offsetLeft;
+ thisObj.top = parseInt(obj.top) - mod_dependentIframe_offsetTop;
+ thisObj.height = parseInt(obj.height) + (2*mod_dependentIframe_offsetTop);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_digitize_tab.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,1274 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_digitize_tab.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once("../php/mb_validateSession.php");
-require_once("../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Digitize</title>
-<?php
-$digitize_conf_filename = "digitize_default.conf";
-include '../include/dyn_css.php';
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'digitize' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = explode(",",$row["e_target"]);
- $cnt++;
-}
-if($cnt > 1) echo "alert('digitize_button: ID not unique!');";
-
-echo "<script language='JavaScript'>";
-echo "var mod_digitize_target = '".$e_target[0]."';";
-echo "var mod_digitize_frame = '".$e_target[1]."';";
-include("../../conf/" . $digitize_conf_filename);
-?>
-
-var wfsWindow;
-var dwin = null;
-var wfsConf = [];
-var d = new parent.GeometryArray();
-var mod_digitize_width;
-var mod_digitize_height;
-var mod_digitizeEvent = false;
-var nonTransactionalHighlight;
-
-var button_point = "Point";
-var button_line = "Line";
-var button_polygon = "Polygon";
-var button_move = "dragBasePoint";
-var button_insert = "setBasePoint";
-var button_delete = "delBasePoint";
-var button_clear = "clear";
-var button_combine = "combine";
-
-var digitizeDivTag;
-
-var featureTypeElementFormId = "featureTypeElementForm";
-
-try {if(mod_digitize_elName){}}catch(e) {mod_digitize_elName = "digitize";}
-
-// ------------------------------------------------------------------------------------------------------------------------
-// --- polygon, line, point insertion (begin) ----------------------------------------------------------------------------------------------
-
-function appendGeometryArray(obj) {
- executeDigitizePreFunctions();
- for (i=0; i<obj.count(); i++) {
- d.addCopy(obj.get(i));
- }
- executeDigitizeSubFunctions();
-}
-
-function mod_digitize_go(e){
- parent.mb_registerGML(mod_digitize_target,d);
-
- // ie workaround
- if (e == undefined) {
- e = parent.frames[mod_digitize_target].event;
- }
- if (e) {
- // track mouse position
- parent.mb_getMousePos(e, mod_digitize_target);
- var currentPos = new parent.Point(parent.clickX, parent.clickY);
- s.check(currentPos);
- }
- else {
-// s.clean();
- }
-
- var el = parent.frames[mod_digitize_target].document;
- el.onmousedown = mod_digitize_start;
-}
-
-function mod_digitize_timeout(){
- var el = parent.frames[mod_digitize_target].document;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
-}
-
-function mod_digitize_start(e){
- // check if a proper geometry is selected
- if (d.getGeometry(-1,-1).isComplete() || d.count() == 0){
-
- if (mod_digitizeEvent != false) {
- alert(errorMessageNoGeometrySelected[selectedLanguage]);
- }
- return false;
- }
-
- var realWorldPos;
- if (s.isSnapped()) {
- realWorldPos = s.getSnappedPoint();
- s.clean();
- }
- else {
- parent.mb_getMousePos(e,mod_digitize_target);
- realWorldPos = parent.mapToReal(mod_digitize_target,new parent.Point(parent.clickX,parent.clickY));
- }
-
- if (d.get(-1).geomType == parent.geomType.polygon && d.getGeometry(-1,-1).count() > 1 && d.getGeometry(-1,-1).get(0).equals(realWorldPos)) {
-
- // close the polygon
- d.close();
- parent.mb_disableThisButton(button_polygon);
- return true;
- }
- else if (d.get(-1).geomType == parent.geomType.line && d.getGeometry(-1,-1).count() > 1 && d.getGeometry(-1,-1).get(-1).equals(realWorldPos)) {
- // close the line
- d.close();
- parent.mb_disableThisButton(button_line);
- return true;
- }
- else {
- // set the calculated real world position as point of the geometry
- d.getGeometry(-1,-1).addPoint(realWorldPos);
-
- if(d.get(-1).geomType == parent.geomType.point){
- d.close();
- parent.mb_disableThisButton(button_point);
- return true;
- }
-
- // add first point of polygon to snapping list (if three points have been inserted).
- else if (d.get(-1).geomType == parent.geomType.polygon && d.getGeometry(-1,-1).count() == 3) {
- s.add(d.getPoint(-1, -1, 0));
- }
-
- // add last point of line to snapping list (if at least two points have been inserted).
- else if (d.get(-1).geomType == parent.geomType.line && d.getGeometry(-1,-1).count() >= 2) {
- if (mod_digitizeEvent != button_move) {
- s.store(d);
- }
- s.add(d.getPoint(-1, -1, -1));
- }
- }
- executeDigitizeSubFunctions();
- return true;
-}
-// --- polygon, line, point insertion (begin) ----------------------------------------------------------------------------------------------
-// ------------------------------------------------------------------------------------------------------------------------
-
-// ------------------------------------------------------------------------------------------------------------------------
-// --- basepoint handling (begin) -----------------------------------------------------------------------------------------
-
-var basepointObject = false;
-var basepointMemberIndex = null;
-var basepointGeometryIndex = null;
-var basepointPointIndex = null;
-var basepointDragActive = false;
-
-function handleBasepoint(obj,memberIndex,geometryIndex,pointIndex){
- if(!(mod_digitizeEvent == button_move || mod_digitizeEvent == button_insert || mod_digitizeEvent == button_delete)){ return false; }
-
- basepointObject = obj;
- basepointMemberIndex = memberIndex;
- basepointGeometryIndex = geometryIndex;
- basepointPointIndex = pointIndex;
-
- if(mod_digitizeEvent == button_move){
- mod_digitize_timeout();
- basepointObject.style.cursor = 'move';
- basepointObject.onmousedown = parent.window.frames[mod_digitize_elName].selectBasepoint;
- }
-
- if(mod_digitizeEvent == button_delete){
- mod_digitize_timeout();
- basepointObject.style.cursor = 'crosshair';
- basepointObject.onmousedown = parent.window.frames[mod_digitize_elName].deleteBasepoint;
- }
-}
-
-function convertLinepointToBasepoint(obj, memberIndex, geomIndex, pointIndex){
- if(!(mod_digitizeEvent == button_insert)){ return false; }
-
- if(mod_digitizeEvent == button_insert){
- mod_digitize_timeout();
- obj.style.cursor = 'crosshair';
- obj.onclick = insertBasepoint;
-
- basepointObject = obj;
- basepointMemberIndex = memberIndex;
- basepointGeometryIndex = geomIndex;
- basepointPointIndex = pointIndex;
- }
-}
-
-function insertBasepoint(e){
- var i = basepointMemberIndex;
- var j = basepointGeometryIndex;
- var k = basepointPointIndex;
-
- parent.mb_getMousePos(e, mod_digitize_target);
- var pos = parent.makeClickPos2RealWorldPos(mod_digitize_target,parent.clickX, parent.clickY);
- var p = new parent.Point(pos[0], pos[1]);
- d.getGeometry(i,j).addPointAtIndex(p, k);
-
- executeDigitizeSubFunctions();
-}
-
-function deleteBasepoint(){
- var i = basepointMemberIndex;
- var j = basepointGeometryIndex;
- var k = basepointPointIndex;
- d.delAllPointsLike(d.getPoint(i,j,k));
-
- executeDigitizeSubFunctions();
-}
-
-function selectBasepoint(e){
- if(!basepointDragActive && mod_digitizeEvent == button_move){
- basepointDragActive = true;
- s.store(d, d.getPoint(basepointMemberIndex, basepointGeometryIndex, basepointPointIndex));
- // replace basepoint by transparent blob
- basepointObject.style.width = mod_digitize_width;
- basepointObject.style.height = mod_digitize_height;
- basepointObject.style.left = 0;
- basepointObject.style.top = 0;
-
- if (parent.ie) {
- // ie cannot handle backgroundColor = 'transparent'
- basepointObject.style.background = "url(../img/transparent.gif)";
- }
- else{
- basepointObject.style.backgroundColor = 'transparent';
- }
-
- basepointObject.onmouseup = releaseBasepoint;
- basepointObject.onmousemove = dragBasepoint;
- }
-}
-
-function dragBasepoint(e){
- if(basepointDragActive){
- parent.mb_getMousePos(e, mod_digitize_target);
- var currentPos = new parent.Point(parent.clickX, parent.clickY);
- var res = s.check(currentPos);
-
- }
-}
-
-function updateAllPointsOfNonTransactionalLike(oldP, newP){
- for (var i = 0; i < d.count(); i++) {
- if (isTransactional(d.get(i))) {
- d.get(i).updateAllPointsLike(oldP, newP);
- }
- }
-}
-
-
-function releaseBasepoint(e){
-
- var i = basepointMemberIndex;
- var j = basepointGeometryIndex;
- var k = basepointPointIndex;
- basepointDragActive = false;
-
- parent.mb_getMousePos(e, mod_digitize_target);
- var basepointDragEnd = new parent.Point(parent.clickX, parent.clickY);
- basepointObject.onmousedown = null;
- var p = parent.makeClickPos2RealWorldPos(mod_digitize_target, basepointDragEnd.x, basepointDragEnd.y);
-
- var oldPoint = parent.cloneObject(d.getPoint(i,j,k));
- if (s.isSnapped()) {
- var snappedPoint = parent.cloneObject(s.getSnappedPoint());
- if (!nonTransactionalEditable) {
- updateAllPointsOfNonTransactionalLike(oldPoint, snappedPoint);
- }
- else {
- d.updateAllPointsLike(oldPoint, snappedPoint);
- }
- s.clean();
- }
- else {
- var newPoint = new parent.Point(p[0],p[1]);
- if (!nonTransactionalEditable) {
- updateAllPointsOfNonTransactionalLike(oldPoint, newPoint);
- }
- else {
- d.updateAllPointsLike(oldPoint, newPoint);
- }
- }
- basepointMemberIndex = null;
- basepointGeometryIndex = null;
- basepointPointIndex = null;
-
- executeDigitizeSubFunctions();
-}
-// --- basepoint handling (end) -----------------------------------------------------------------------------------------
-// ------------------------------------------------------------------------------------------------------------------------
-
-// ------------------------------------------------------------------------------------------------------------------------
-// --- registered functions (begin) ---------------------------------------------------------------------------------------
-
-function registerDigitizePreFunctions(stringFunction){
- mod_digitizePreFunctions[mod_digitizePreFunctions.length] = stringFunction;
-}
-
-function registerDigitizeSubFunctions(stringFunction){
- mod_digitizeSubFunctions[mod_digitizeSubFunctions.length] = stringFunction;
-}
-
-function executeDigitizeSubFunctions(){
- for(var i=0; i<mod_digitizeSubFunctions.length; i++){
- eval(mod_digitizeSubFunctions[i]);
- }
-}
-
-function executeDigitizePreFunctions(){
- for(var i=0; i<mod_digitizePreFunctions.length; i++){
- eval(mod_digitizePreFunctions[i]);
- }
-}
-
-function registerFunctions(){
- mod_digitizePreFunctions = [];
- mod_digitizeSubFunctions = [];
- registerDigitizePreFunctions("updateExtent()");
- registerDigitizePreFunctions("drawDashedLine()");
- registerDigitizeSubFunctions("updateListOfGeometries()");
- registerDigitizeSubFunctions("drawDashedLine()");
- registerDigitizeSubFunctions("updateMeasureTag()");
- parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].setStyleForTargetFrame()");
- parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].checkDigitizeTag()");
- parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseSnapping()");
- if (!nonTransactionalEditable) {
- parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseHighlight()");
- }
- parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseMeasure()");
- parent.mb_registerSubFunctions("window.frames['" + mod_digitize_elName + "'].updateExtent()");
- parent.mb_registerSubFunctions("window.frames['"+ mod_digitize_elName + "'].drawDashedLine()");
- parent.mb_registerSubFunctions("window.frames['"+ mod_digitize_elName + "'].updateMeasureTag()");
- parent.mb_registerWfsReadSubFunctions(function(geom){parent.tab_open(mod_digitize_elName);parent.window.frames[mod_digitize_elName].appendGeometryArray(geom);});
- parent.mb_registerWfsWriteSubFunctions(function(){parent.zoom(mod_digitize_target, true, 0.999);});
-}
-
-function checkDigitizeTag(){
- var digitizeTagName = "digitize";
- var digitizeTagStyle = {"position":"absolute", "top":"0px", "left":"0px", "z-index":digitizeTransactionalZIndex, "font-size":"10px"};
-
- digitizeDivTag = new parent.DivTag(digitizeTagName, mod_digitize_target, digitizeTagStyle);
- parent.mb_registerPanSubElement(digitizeTagName);
-}
-
-
-function setStyleForTargetFrame(){
- var cssLink = parent.window.frames[mod_digitize_target].document.createElement("link");
- cssLink.setAttribute("href", cssUrl);
- cssLink.setAttribute("type", "text/css");
- cssLink.setAttribute("rel", "stylesheet");
- var cssTmp = parent.window.frames[mod_digitize_target].document.getElementsByTagName("head")[0];
- cssTmp.appendChild(cssLink);
-}
-
-function initialiseSnapping(){
- s = new parent.Snapping(mod_digitize_target, snappingTolerance, snappingColor, snappingHighlightZIndex);
-}
-function initialiseHighlight(){
- nonTransactionalHighlight = new parent.Highlight(new Array(mod_digitize_target), "nonTransactional", {"position":"absolute", "top":"0px", "left":"0px", "z-index":digitizeNonTransactionalZIndex}, nonTransactionalLineWidth);
-}
-function initialiseMeasure(){
- measureDivTag = new parent.DivTag(measureTagName, measureTagTarget, measureTagStyle);
-}
-// --- registered functions (end) -----------------------------------------------------------------------------------------
-// ------------------------------------------------------------------------------------------------------------------------
-
-
-function updateMeasureTag () {
- if (d.count() > 0 ) {
- if (d.get(-1).count() > 0) {
- if (d.getGeometry(-1, -1).count() > 0) {
- if (mod_digitizeEvent == button_line || mod_digitizeEvent == button_polygon) {
- var measureString = "";
- measureString += measureTagLabelCurrent[selectedLanguage] + d.getGeometry(-1, -1).getCurrentDist(measureNumberOfDigits) + "<br>";
- measureString += measureTagLabelTotal[selectedLanguage] + d.getGeometry(-1, -1).getTotalDist(measureNumberOfDigits);
- measureDivTag.write(measureString);
- return true;
- }
- }
- }
- }
- measureDivTag.clean();
-}
-
-
-
-// ------------------------------------------------------------------------------------------------------------------------
-// --- button handling (begin) --------------------------------------------------------------------------------------------
-
-function displayButtons(){
- for (var i = 0 ; i < buttonDig_id.length ; i ++) {
- if (parseInt(buttonDig_on[i])==1) {
- var divTag = document.createElement("div");
- divTag.setAttribute("id", "div_" + buttonDig_id[i]);
-// FIREFOX
- document.getElementById("digButtons").appendChild(divTag);
-
-//IE WORKAROUND, WORKS ALSO FOR FIREFOX
- var tagContent = "<div style='position:absolute; top:"+buttonDig_y[i]+"px; left:"+buttonDig_x[i]+"px;'><img name=\""+buttonDig_id[i]+"\" onmouseover=\"parent.mb_regButton_frame('initDigButton', mod_digitize_elName, "+i+");\" id=\""+buttonDig_id[i]+"\" title=\""+buttonDig_title_off[i]+"\" src=\""+buttonDig_imgdir+buttonDig_src[i]+"\"></div>";
- parent.writeTag(mod_digitize_elName,"div_" + buttonDig_id[i],tagContent);
- }
- }
-}
-
-function initDigButton(ind, pos){
- parent.mb_button[ind] = document.getElementById(buttonDig_id[pos]);
- parent.mb_button[ind].img_over = buttonDig_imgdir + buttonDig_src[pos].replace(/_off/,"_over");
- parent.mb_button[ind].img_on = buttonDig_imgdir + buttonDig_src[pos].replace(/_off/,"_on");
- parent.mb_button[ind].img_off = buttonDig_imgdir + buttonDig_src[pos];
- parent.mb_button[ind].title_on = buttonDig_title_on[pos];
- parent.mb_button[ind].title_off = buttonDig_title_off[pos];
- parent.mb_button[ind].status = 0;
- parent.mb_button[ind].elName = buttonDig_id[pos];
- parent.mb_button[ind].fName = "";
- parent.mb_button[ind].go = new Function ("digitizeEnable(parent.mb_button["+ind+"])");
- parent.mb_button[ind].stop = new Function ("digitizeDisable(parent.mb_button["+ind+"])");
-}
-
-function digitizeEnable(obj) {
- if (obj.id == button_move || obj.id == button_insert || obj.id == button_delete) {
- mod_digitizeEvent = obj.id;
- executeDigitizePreFunctions();
- }
- else if (obj.id == button_point || obj.id == button_line || obj.id == button_polygon || obj.id == button_clear || obj.id == button_combine){
- var el = parent.frames[mod_digitize_target].document;
- el.onmousemove = mod_digitize_go;
-
- mod_digitizeEvent = obj.id;
-
- if (mod_digitizeEvent == button_point || mod_digitizeEvent == button_line || mod_digitizeEvent == button_polygon || mod_digitizeEvent == button_insert ) {
- s.store(d);
- }
-
- executeDigitizePreFunctions();
- obj.title = obj.title_on;
- if (obj.id == button_point) {
- if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
- if (d.get(-1).geomType != parent.geomType.point) {
- d.close();
- executeDigitizeSubFunctions();
- }
- else {
- s.add(d.getPoint(-1, -1, 0));
- }
- }
- if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
- d.addMember(parent.geomType.point);
- d.get(-1).addGeometry();
- }
- else {
-/*
-//
-// delete existing line or polygon
-//
- d.del(-1);
- d.addMember(parent.geomType.point);
- d.get(-1).addGeometry();
-*/
- }
- }
- else if (obj.id == button_polygon) {
- if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
- if (d.get(-1).geomType != parent.geomType.polygon) {
- d.close();
- executeDigitizeSubFunctions();
- }
- else {
- s.add(d.getPoint(-1, -1, 0));
- }
- }
- if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
- // new geometry
- d.addMember(parent.geomType.polygon);
- d.get(-1).addGeometry();
- }
- else {
-/*
-//
-// continue a line as a polygon
-//
- if (d.get(-1).geomType != parent.geomType.polygon) {
- var geometryTemplate = parent.cloneObject(d.get(-1));
- d.del(-1);
- d.addMember(parent.geomType.polygon);
- for (var i = 0; i < geometryTemplate.count(); i++) {
- d.get(-1).addGeometry();
- for (var j = 0; j < geometryTemplate.get(i).count(); j++) {
- d.get(-1).get(-1).addPoint(geometryTemplate.get(i).get(j));
- }
- }
- }
- s.add(d.getPoint(-1, -1, 0));
-*/
- }
- }
- else if (obj.id == button_line) {
- if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
- if (d.get(-1).geomType != parent.geomType.line) {
- d.close();
- executeDigitizeSubFunctions();
- }
- else {
- s.add(d.getPoint(-1, -1, 0));
- }
- }
- if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
- d.addMember(parent.geomType.line);
- d.get(-1).addGeometry();
- }
- else {
-/*
-//
-// continue a polygon as a line
-//
- if (d.get(-1).geomType != parent.geomType.line) {
- var geometryTemplate = parent.cloneObject(d.get(-1));
- d.del(-1);
- d.addMember(parent.geomType.line);
- for (var i = 0; i < geometryTemplate.count(); i++) {
- d.get(-1).addGeometry();
- for (var j = 0; j < geometryTemplate.get(i).count(); j++) {
- d.get(-1).get(-1).addPoint(geometryTemplate.get(i).get(j));
- }
- }
- }
-*/
- }
- }
- else if (obj.id == button_clear) {
- var clear = confirm(messageConfirmDeleteAllGeomFromList[selectedLanguage]);
- if (clear) {
- d = new parent.GeometryArray();
- parent.mb_disableThisButton(button_clear);
- }
- }
- else if (obj.id == button_combine) {
-// d.combineToMultiGeometry();
-// prompt('', d.toJSONString());
-// parent.mb_ajax_post("../php/jsonTest.php", {json:d.toJSONString()}, function(test, status) {
-// alert(test);
-// });
- parent.mb_disableThisButton(button_combine);
- }
- }
-}
-
-function digitizeDisable(obj) {
- if (obj.id == button_point || obj.id == button_line || obj.id == button_polygon){
- obj.title = obj.title_off;
- if (d.get(-1).get(-1).count() == 0) {
- d.delGeometry(-1,-1);
- }
- mod_digitize_timeout();
- executeDigitizeSubFunctions();
- }
- else if (obj.id == button_clear) {
- mod_digitize_timeout();
- executeDigitizeSubFunctions();
- }
- mod_digitizeEvent = false;
-}
-// --- button handling (end) ----------------------------------------------------------------------------------------------
-// ------------------------------------------------------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------------------------------------
-// --- display (begin) -----------------------------------------------------------------------------------------
-
-function updateExtent() {
- var anInd = parent.getMapObjIndexByName(mod_digitize_target);
- var change = false;
- if (typeof(mod_digitize_width) == 'undefined' || mod_digitize_width != parent.mb_mapObj[anInd].width) {
- mod_digitize_width = parent.mb_mapObj[anInd].width;
- change = true;
- }
- if (typeof(mod_digitize_height) == 'undefined' || mod_digitize_height != parent.mb_mapObj[anInd].height) {
- mod_digitize_height = parent.mb_mapObj[anInd].height;
- change = true;
- }
- if (typeof(mod_digitize_epsg) == 'undefined' || mod_digitize_epsg != parent.mb_mapObj[anInd].epsg) {
- mod_digitize_epsg = parent.mb_mapObj[anInd].epsg;
- change = true;
- }
-// if (change) {
-// drawDashedLine();
-// }
-}
-
-function drawDashedLine(){
- if (!nonTransactionalEditable) {
- nonTransactionalHighlight.clean();
- }
- var smP = "";
- smP += "<div class='t_img'>";
- smP += "<img src='"+parent.mb_trans.src+"' width='"+mod_digitize_width+"' height='0'></div>";
- smP += "<div class='t_img'>";
- smP += "<img src='"+parent.mb_trans.src+"' width='0' height='"+mod_digitize_height+"'></div>";
-
- if (!nonTransactionalEditable) {
- nonTransactionalHighlight.clean();
- }
- var smPArray = [];
- smPArray[smPArray.length] = "<div class='t_img'>"
- + "<img src='"+parent.mb_trans.src+"' width='"+mod_digitize_width+"' height='0'></div>"
- + "<div class='t_img'>"
- + "<img src='"+parent.mb_trans.src+"' width='0' height='"+mod_digitize_height+"'></div>";
-
- var mapObj = parent.mb_mapObj[parent.getMapObjIndexByName(mod_digitize_target)];
- var width = mapObj.width;
- var height = mapObj.height;
- var isMoveOrInsertOrDelete = mod_digitizeEvent == button_move || mod_digitizeEvent == button_insert || mod_digitizeEvent == button_delete;
- var minDist = 5;
-
- for(var i=0, lenGeomArray = d.count(); i < lenGeomArray; i++){
- var currentGeomArray = d.get(i);
-
- if (!nonTransactionalEditable && !isTransactional(currentGeomArray)) {
- nonTransactionalHighlight.add(currentGeomArray, nonTransactionalColor);
- }
- else {
- for(var j=0, lenGeom = currentGeomArray.count(); j < lenGeom ; j++){
- var currentGeometry = d.getGeometry(i,j);
- var isPolygon = currentGeomArray.geomType == parent.geomType.polygon;
- var isLine = currentGeomArray.geomType == parent.geomType.line;
- var isComplete = currentGeometry.isComplete();
- var lastPaintedPoint = false;
-
- for(var k = 0, lenPoint = currentGeometry.count(); k < lenPoint; k++){
- var currentPoint = currentGeometry.get(k);
- var currentPointMap = parent.realToMap(mod_digitize_target, currentPoint)
-
- var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && (Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist);
- if (!isTooCloseToPrevious) {
- var currentPointIsVisible = currentPointMap.x > 0 && currentPointMap.x < width && currentPointMap.y > 0 && currentPointMap.y < height;
- if (currentPointIsVisible) {
- if (!isComplete && ((k == 0 && isPolygon) || (k == lenPoint-1 && isLine))) {
- smPArray[smPArray.length] = "<div class='bp' style='top:"+
- (currentPointMap.y-2)+"px;left:"+(currentPointMap.x-2)+"px;z-index:"+
- digitizeTransactionalZIndex+";background-color:"+linepointColor+"'";
- }
- else {
- smPArray[smPArray.length] = "<div class='bp' style='top:"+(currentPointMap.y-2)+"px;left:"+(currentPointMap.x-2)+"px;z-index:"+digitizeTransactionalZIndex+";'";
- }
- if(k==0 && isPolygon && !isComplete){
- smPArray[smPArray.length] = " title='"+closePolygon_title+"' ";
- }
- if(isMoveOrInsertOrDelete) {
- smPArray[smPArray.length] = " onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].handleBasepoint(this,"+i+","+j+","+k+")' ;";
- }
- smPArray[smPArray.length] = "></div>";
- lastPaintedPoint = currentPointMap;
- }
- if (k > 0) {
- points = parent.calculateVisibleDash(currentPointMap, previousPointMap, width, height);
- if (points != false) {
- smPArray[smPArray.length] = evaluateDashes(points[0], points[1], i, j, k);
- }
- }
- }
- var previousPointMap = currentPointMap;
- }
- }
- }
- }
- digitizeDivTag.write(smPArray.join(""));
-
-}
-
-function evaluateDashes(start, end, memberIndex, geomIndex, pointIndex){
- var str_dashedLine = "";
- var delta = new parent.Point(end.x - start.x, end.y - start.y);
-
- var vecLength = start.dist(end);
- var n = Math.round(vecLength/dotDistance);
- var step = new parent.Point(delta.x/n, delta.y/n);
- for(var i=1; i<n; i++){
- var x = Math.round(start.x + i * step.x) - 2;
- var y = Math.round(start.y + i * step.y) - 2;
- if(x >= 0 && x <= mod_digitize_width && y >= 0 && y <= mod_digitize_height){
- if (memberIndex == d.count()-1 && !d.getGeometry(-1,-1).isComplete()) {
- str_dashedLine += "<div class='lp' style='top:"+y+"px;left:"+x+"px;z-index:"+digitizeTransactionalZIndex+";background-color:"+linepointColor+"' ";
- }
- else {
- str_dashedLine += "<div class='lp' style='top:"+y+"px;left:"+x+"px;z-index:"+digitizeTransactionalZIndex+";' ";
- }
- if(mod_digitizeEvent == button_insert) {
- str_dashedLine += "onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].convertLinepointToBasepoint(this,"+memberIndex+","+geomIndex+","+pointIndex+")'";
- }
- str_dashedLine += "></div>";
- }
- }
- return str_dashedLine;
-}
-
-function isTransactional(geom) {
-// alert(typeof(geom.wfs_conf) + " " + geom.wfs_conf + " " + wfsConf.length);
- if (typeof(geom.wfs_conf) == 'number') {
- if (geom.wfs_conf >= 0 && geom.wfs_conf < wfsConf.length) {
- var isTransactionalGeom = (wfsConf[geom.wfs_conf]['wfs_transaction'] != "" && wfsConf[geom.wfs_conf]['fkey_featuretype_id'] != "");
- if (isTransactionalGeom) {
- return true;
- }
- else{
- return false;
- }
- }
- }
- else if (typeof(geom.wfs_conf) == 'undefined') {
- return true;
- }
-}
-
-function isValidWfsConfIndex (wfsConf, wfsConfIndex) {
- return (typeof(wfsConfIndex) == "number" && wfsConfIndex >=0 && wfsConfIndex < wfsConf.length);
-}
-
-function getName (geom) {
- wfsConfId = geom.wfs_conf;
- wfsConf = parent.get_complete_wfs_conf();
- if (isValidWfsConfIndex(wfsConf, wfsConfId)) {
- var resultName = "";
- for (var i = 0 ; i < wfsConf[wfsConfId]['element'].length ; i++) {
- if (wfsConf[wfsConfId]['element'][i]['f_show'] == 1) {
- resultName += geom.e.getElementValueByName(wfsConf[wfsConfId]['element'][i]['element_name']) + " ";
- }
- }
- if (resultName == "") {
- resultName = wfsConf[wfsConfId]['g_label'];
- }
- return resultName;
- }
- else {
- return digitizeDefaultGeometryName[selectedLanguage];
- }
-}
-
-function updateListOfGeometries(){
- var listOfGeom = "<table style='position:absolute; top:"+geomList_y+"px; left:"+geomList_x+"px;'>\n";
- if (d.count() > 0) {
- wfsConf = parent.get_complete_wfs_conf();
- for (var i = 0 ; i < d.count(); i ++) {
-
- if (d.get(i).get(-1).isComplete() && (nonTransactionalEditable || isTransactional(d.get(i)))) {
-
- listOfGeom += "\t<tr>\n\t\t<td>\n";
- if (wfsExistsForGeom(d.get(i), wfsConf)) {
- listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_wfs_src+"' title='"+buttonDig_wfs_title[selectedLanguage]+"' onclick='showWfs("+i+")'>\n";
- }
- listOfGeom += "\t\t</td>\n\t\t<td>\n";
- listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_remove_src+"' title='"+buttonDig_remove_title[selectedLanguage]+"' onclick='parent.mb_disableThisButton(mod_digitizeEvent);d.del("+i+");executeDigitizeSubFunctions();'>\n";
- listOfGeom += "\t\t</td>\n\t\t<td>\n";
-
- if (isValidWfsConfIndex(wfsConf, d.get(i).wfs_conf)) {
- listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_removeDb_src+"' title='"+buttonDig_removeDb_title[selectedLanguage]+"' onclick=\"var deltrans = confirm('"+messageConfirmDeleteGeomFromDb[selectedLanguage]+"');if (deltrans) dbGeom('delete', "+i+")\">\n";
- }
- listOfGeom += "\t\t</td>\n\t\t<td style = 'color:blue;font-size:12px'>\n";
- listOfGeom += "\t\t\t<div onmouseover='parent.mb_wfs_perform(\"over\",d.get("+i+"));' ";
- listOfGeom += " onmouseout='parent.mb_wfs_perform(\"out\",d.get("+i+"))' ";
- listOfGeom += " onclick='parent.mb_wfs_perform(\"click\",d.get("+i+"));' ";
- var geomName = getName(d.get(i));
- if (d.get(i).geomType == parent.geomType.polygon) {geomName += " ("+messageDescriptionPolygon[selectedLanguage]+")";}
- else if (d.get(i).geomType == parent.geomType.line) {geomName += " ("+messageDescriptionLine[selectedLanguage]+")";}
- else if (d.get(i).geomType == parent.geomType.point) {geomName += " ("+messageDescriptionPoint[selectedLanguage]+")";}
-
- listOfGeom += ">" + geomName +"</div>\t\t</td>\n\t</tr>\n";
- }
- }
- }
- listOfGeom += "</table>\n";
- parent.writeTag(mod_digitize_elName,"listOfGeometries",listOfGeom);
-}
-// --- display (end) -----------------------------------------------------------------------------------------
-// -----------------------------------------------------------------------------------------------------------
-
-
-// -----------------------------------------------------------------------------------------------------------
-// --- wfs window (begin) -----------------------------------------------------------------------------------------
-
-// -----------------------------------------------------------------------------------------------------------
-// --- wfs window form check (begin) -----------------------------------------------------------------------------------------
-
-function formCorrect(doc, formId) {
- var isCorrect = true;
- var errorMessage = "";
- var result;
- var form = doc.getElementById(formId);
-
- result = mandatoryFieldsNotEmpty(doc, form);
- isCorrect = isCorrect && result.isCorrect;
- errorMessage += result.errorMessage;
-
- result = validBoxEntrySelected(form);
- isCorrect = isCorrect && result.isCorrect;
- errorMessage += result.errorMessage;
-
- result = dataTypeIsCorrect(doc, form);
- isCorrect = isCorrect && result.isCorrect;
- errorMessage += result.errorMessage;
-
- return {"isCorrect":isCorrect, "errorMessage":errorMessage};
-}
-
-function validBoxEntrySelected(form){
- var isCorrect = true;
- var errorMessage = "";
- for (var i = 0; i < form.childNodes.length && isCorrect; i++) {
- if (form.childNodes[i].nodeName.toUpperCase() == "SELECT") {
- if (parseInt(form.childNodes[i].selectedIndex) == 0) {
- return {"isCorrect":false, "errorMessage":errorMessage};
- }
- }
- else if (form.childNodes[i].hasChildNodes()) {
- isCorrect = validBoxEntrySelected(form.childNodes[i]).isCorrect;
- }
- }
- if (!isCorrect) {
- errorMessage = messageSelectAnOption[selectedLanguage] + "\n";
- }
- return {"isCorrect":isCorrect, "errorMessage":errorMessage};
-}
-
-function mandatoryFieldsNotEmpty(doc, node){
- var isCorrect = true;
- var errorMessage = "";
-
- nodeArray = doc.getElementsByName("mandatory");
- for (var i = 0; i < nodeArray.length && isCorrect; i++) {
- if (nodeArray[i].nodeName.toUpperCase() == "INPUT" && nodeArray[i].type == "hidden" && nodeArray[i].id.substr(0,10) == "mandatory_") {
- var nodeId = nodeArray[i].id.substr(10);
- if (nodeArray[i].value == "true") {
- if (doc.getElementById(nodeId).value == "") {
- isCorrect = false;
- errorMessage += "'"+ doc.getElementById(nodeId).name +"': "+ messageErrorFieldIsEmpty[selectedLanguage] +"\n";
- }
- }
- }
- }
- return {"isCorrect":isCorrect, "errorMessage":errorMessage};
-}
-
-function isInteger(str) {
- if (str.match(/^\d+$/)) {
- return true;
- }
- return false;
-}
-
-function isFloat(str) {
- if (isInteger(str)) {
- return true;
- }
- if (str.match(/^\d+\.\d+$/)) {
- return true;
- }
- return false;
-}
-
-function replaceCommaByDecimalPoint(str) {
- var patternString = ",";
- var pattern = new RegExp(patternString);
- while (str.match(pattern)) {
- str = str.replace(pattern, ".");
- }
- return str;
-}
-
-function dataTypeIsCorrect(doc, node){
- var isCorrect = true;
- var errorMessage = "";
-
- nodeArray = doc.getElementsByName("datatype");
- for (var i = 0; i < nodeArray.length ; i++) {
- if (nodeArray[i].nodeName.toUpperCase() == "INPUT" && nodeArray[i].type == "hidden" && nodeArray[i].id.substr(0,9) == "datatype_") {
- var nodeId = nodeArray[i].id.substr(9);
- var nodeValue = doc.getElementById(nodeId).value;
-
- if (nodeArray[i].value == "int") {
- if (!isInteger(nodeValue)) {
- isCorrect = false;
- errorMessage += "'"+doc.getElementById(nodeId).name+"': "+ messageErrorNotAnInteger[selectedLanguage] + "\n";
- }
- }
- else if (nodeArray[i].value == "double") {
- nodeValue = replaceCommaByDecimalPoint(nodeValue);
- if (!isFloat(nodeValue)) {
- isCorrect = false;
- errorMessage += "'"+doc.getElementById(nodeId).name+"': "+ messageErrorNotAFloat[selectedLanguage] + "\n";
- }
- else {
- doc.getElementById(nodeId).value = nodeValue;
- }
- }
- }
- }
- return {"isCorrect":isCorrect, "errorMessage":errorMessage};
-}
-// --- wfs window form check (end) -----------------------------------------------------------------------------------------
-// -----------------------------------------------------------------------------------------------------------
-
-function getAvailableWfsForGeom(geom, wfsConf) {
- var wfsConfIndices = [];
-
- for (var attr in wfsConf) {
- var isTrans = (wfsConf[attr]['wfs_transaction'] != "");
- if (!isTrans) {
- continue;
- }
- if (isValidWfsConfIndex(wfsConf, parseInt(geom.wfs_conf))) {
-
- if (parseInt(geom.wfs_conf) == parseInt(attr)) {
- wfsConfIndices.push(attr);
- }
- }
- else {
- for (var elementIndex = 0; elementIndex < wfsConf[attr]['element'].length ; elementIndex++) {
- var isGeomColumn = (parseInt(wfsConf[attr]['element'][elementIndex]['f_geom']) == 1);
- if (isGeomColumn) {
- var isMultiPolygon = (geom.geomType == parent.geomType.polygon && wfsConf[attr]['element'][elementIndex]['element_type'] == 'MultiPolygonPropertyType');
- var isPolygon = (geom.geomType == parent.geomType.polygon && geom.count() == 1 && wfsConf[attr]['element'][elementIndex]['element_type'] == 'PolygonPropertyType');
- var isMultiLine = (geom.geomType == parent.geomType.line && wfsConf[attr]['element'][elementIndex]['element_type'] == 'MultiLineStringPropertyType');
- var isLine = (geom.geomType == parent.geomType.line && geom.count() == 1 && wfsConf[attr]['element'][elementIndex]['element_type'] == 'LineStringPropertyType');
- var isPoint = (geom.geomType == parent.geomType.point && wfsConf[attr]['element'][elementIndex]['element_type'] == 'PointPropertyType');
-// alert(isMultiPolygon + " " + isPolygon + " " + isMultiLine + " " + isLine + " " + isPoint);
- if (isMultiPolygon || isPolygon || isMultiLine || isLine || isPoint || wfsConf[attr]['element'][elementIndex]['element_type'] == 'GeometryAssociationType') {
-
- wfsConfIndices.push(attr);
- }
- }
- }
- }
- }
- return wfsConfIndices;
-}
-function wfsExistsForGeom(geom, wfsConf) {
- wfsConfIndices = getAvailableWfsForGeom(geom, wfsConf);
-// alert(wfsConfIndices.join(","));
- if (wfsConfIndices.length > 0) {
- return true;
- }
- return false;
-}
-
-
-//
-// this method opens a new window and displays the attributes in wfs_conf
-//
-function showWfs(geometryIndex) {
- wfsConf = parent.get_complete_wfs_conf();
-
- wfsWindow = open("", "wfsattributes", "width="+wfsWindowWidth+", height="+wfsWindowHeight+", resizable, dependent=yes, scrollbars=yes");
- wfsWindow.document.open("text/html");
-
- var str = "";
- var strStyle = "";
- var defaultIndex = -1;
-
- str += "<form id='wfs'>\n";
-
- //
- // 1. add select box
- //
-
- var onChangeText = "document.getElementById('elementForm').innerHTML = ";
- onChangeText += "window.opener.buildElementForm(this.value , " + geometryIndex + ");";
- onChangeText += "window.opener.setWfsWindowStyle(this.value);";
-
- str += "\t<select name='wfs' size='" + wfsConf.length + "'";
- str += " onChange=\""+ onChangeText +"\"";
- str += ">\n\t\t";
-
- var wfsConfIndices = getAvailableWfsForGeom(d.get(geometryIndex), wfsConf);
-// alert(wfsConfIndices.join(","));
- var selected = false;
- for (var i = 0; i < wfsConfIndices.length ; i++) {
- str += "<option value='" + wfsConfIndices[i] + "'";
- if (!selected) {
- str += " selected";
- selected = true;
- defaultIndex = parseInt(wfsConfIndices[i]);
- }
- str += ">" + wfsConf[wfsConfIndices[i]]['wfs_conf_abstract'];
- str += "</option>\n\t\t";
- }
-
-
- str += "</select>\n\t\t</form>\n\t";
- str += "<div id='elementForm'>\n</div>";
-
- if (defaultIndex != -1) {
- wfsWindow.document.writeln("<html><head><style type='text/css'>"+wfsConf[defaultIndex]['g_style']+"</style></head><body></body></html>");
- wfsWindow.document.write(str);
- wfsWindow.document.close();
- wfsWindow.document.getElementById("elementForm").innerHTML = buildElementForm(defaultIndex, geometryIndex);
- }
- else {
- wfsWindow.document.writeln("<html><head><style type='text/css'></style></head><body></body></html>");
- wfsWindow.document.write(str);
- wfsWindow.document.close();
- }
-}
-
-function setWfsWindowStyle(wfsConfIndex) {
- wfsWindow.document.getElementsByTagName("style")[0].innerHTML = wfsConf[wfsConfIndex]['g_style'];
-}
-
-// returns a form with the elements of a selected wfs
-// (if the original wfs is the selected wfs, the values are set too)
-function buildElementForm(wfsConfIndex, memberIndex){
- var featureTypeMismatch = false;
- if (parseInt(d.get(memberIndex).wfs_conf) != parseInt(wfsConfIndex)) {featureTypeMismatch = true;}
- var str = "";
- var hasGeometryColumn = false;
- var featureTypeArray = wfsConf[wfsConfIndex];
- var memberElements;
- var fid = false;
-
- if (!featureTypeMismatch) {
- memberElements = d.get(memberIndex).e;
- fid = memberElements.getElementValueByName('fid');
- }
-
- if (typeof(featureTypeArray["element"]) !== "undefined") {
-
- str += "<form id='"+featureTypeElementFormId+"'>\n\t<table>\n";
- featureTypeElementArray = featureTypeArray["element"];
-
- //
- // 2. add rows to form
- //
- for (var i = 0 ; i < featureTypeElementArray.length ; i ++) {
- var featureTypeElement = featureTypeElementArray[i];
-
- var elementName = featureTypeElement['element_name'];
- var elementType = featureTypeElement['element_type'];
- var isEditable = (parseInt(featureTypeElement['f_edit']) == 1);
- var isMandatory = (parseInt(featureTypeElement['f_mandatory']) == 1);
- var isGeomColumn = (parseInt(featureTypeElement['f_geom']) == 1);
-
- var elementLabelExists = (featureTypeElement['f_label'] != "");
- var elementLabel = "";
- if (elementLabelExists) {
- elementLabel = featureTypeElement['f_label'];
- }
- var elementLabelStyle = featureTypeElement['f_label_id'];
-
- if (!isGeomColumn) {
- if (isEditable) {
- str += "\t\t<tr>\n";
- str += "\t\t\t<td>\n\t\t\t\t<div class = '"+elementLabelStyle+"''>" + elementLabel + "</div>\n\t\t\t</td>\n";
- str += "\t\t\t<td>\n";
-
- var elementValue = "";
- if (!featureTypeMismatch) {
- for (var j = 0 ; j < memberElements.count() ; j ++) {
- if (memberElements.getName(j) == featureTypeElement['element_name']) {
- elementValue = memberElements.getValue(j);
- }
- }
- }
- var formElementHtml = featureTypeElement['f_form_element_html'];
- if (!formElementHtml) {
- str += "\t\t\t\t<input id = 'datatype_" + elementName + "' name='datatype' type='hidden' value = '" + elementType + "'>\n";
- str += "\t\t\t\t<input id = 'mandatory_" + elementName + "' name='mandatory' type='hidden' value = '" + isMandatory + "'>\n";
- str += "\t\t\t\t<input id = '" + elementName + "' name='" + elementLabel + "' type='text' class = '"+featureTypeElement['f_style_id']+"' size=20 value = '" + elementValue + "'>\n";
- }
- else {
- while (formElementHtml.match(/\\/)) {
- formElementHtml = formElementHtml.replace(/\\/, "");
- }
-// alert(formElementHtml);
- // preselect the correct entry of the box
- var patternString = "option value='"+elementValue+"'";
- var pattern = new RegExp(patternString);
- formElementHtml = formElementHtml.replace(pattern, patternString+" selected");
-// alert(formElementHtml);
- str += formElementHtml;
-
- }
- str += "\t\t\t</td>\n\t\t</tr>\n";
- }
- }
- else {
- hasGeometryColumn = true;
- }
- }
-
- //
- // 3. add buttons "save", "update", "delete"
- //
- str += "</table><table>";
- var isTransactional = (featureTypeArray['wfs_transaction']);
- if (isTransactional) {
- str += "\t\t<tr>\n";
-
- var options = ["save", "update", "delete", "abort"];
- for (var i = 0 ; i < options.length ; i++) {
- var onClickText = "this.disabled=true;var result = window.opener.formCorrect(document, '"+featureTypeElementFormId+"');";
- onClickText += "if (result.isCorrect) {";
- onClickText += "window.opener.dbGeom('"+options[i]+"', "+memberIndex+"); ";
-// onClickText += "window.close();";
- onClickText += "}";
- onClickText += "else {";
- onClickText += "alert(result.errorMessage);this.disabled=false;"
- onClickText += "}";
-
- if (options[i] == "save" && hasGeometryColumn && (!fid || showSaveButtonForExistingGeometries)) {
- str += "\t\t\t<td><input type='button' name='saveButton' value='"+buttonLabelSaveGeometry[selectedLanguage]+"' onclick=\""+onClickText+"\" /></td>\n";
- }
-
- if (!featureTypeMismatch && fid) {
- if (options[i] == "update" && hasGeometryColumn) {
- str += "\t\t\t<td><input type='button' name='updateButton' value='"+buttonLabelUpdateGeometry[selectedLanguage]+"' onclick=\""+onClickText+"\"/></td>\n";
- }
- if (options[i] == "delete"){
- var deleteOnClickText = "var deltrans = confirm('"+messageConfirmDeleteGeomFromDb[selectedLanguage]+"');";
- deleteOnClickText += "if (deltrans){";
- deleteOnClickText += onClickText + "}";
- str += "\t\t\t<td><input type='button' name='deleteButton' value='"+buttonLabelDeleteGeometry[selectedLanguage]+"' onclick=\""+deleteOnClickText+"\"/></td>\n";
- }
- }
- if (options[i] == "abort") {
- str += "\t\t\t<td><input type='button' name='abortButton' value='"+buttonLabelAbort[selectedLanguage]+"' onclick=\"window.close();\" /></td>\n";
- }
- }
- str += "\t\t</tr>\n";
- }
- str += "\t</table>\n";
- str += "<input type='hidden' id='fid' value='"+fid+"'>";
-// str += "<input type='text' name='mb_wfs_conf'>";
- str += "</form>\n";
- }
- return str;
-}
-
-function dbGeom(type,m) {
- if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
- d.get(m).wfs_conf = parseInt(wfsWindow.document.forms[0].wfs.options[wfsWindow.document.forms[0].wfs.selectedIndex].value);
- d.get(m).e = new parent.Wfs_element();
- }
- else {
- wfsConf = parent.get_complete_wfs_conf();
- }
- var myconf = wfsConf[d.get(m).wfs_conf];
-
- var mapObjInd = parent.getMapObjIndexByName(mod_digitize_target);
-
- if (myconf['featuretype_srs'] != parent.mb_mapObj[mapObjInd].epsg) {
- alert(errorMessageEpsgMismatch[selectedLanguage] + parent.mb_mapObj[mapObjInd].epsg + " / "+ myconf['featuretype_srs']);
- }
- else {
- var fid = false;
- var errorMessage = "";
- if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
- myform = wfsWindow.document.getElementById(featureTypeElementFormId);
-
- for (var i=0; i<myform.length; i++){
- if (myform.elements[i].id == "fid") {
- fid = myform.elements[i].value;
- d.get(m).e.setElement('fid', fid);
- }
- else if (myform.elements[i].type == 'text' ){
- if (myform.elements[i].id) {
- d.get(m).e.setElement(myform.elements[i].id, myform.elements[i].value);
- }
- else {
- errorMessage = messageErrorFormEvaluation[selectedLanguage];
- }
- }
- // selectbox
- else if (typeof(myform.elements[i].selectedIndex) == 'number') {
- if (myform.elements[i].id) {
- d.get(m).e.setElement(myform.elements[i].id, myform.elements[i].options[myform.elements[i].selectedIndex].value);
- }
- else {
- errorMessage = messageErrorFormEvaluation[selectedLanguage];
- }
- }
- }
- }
- else {
- fid = d.get(m).e.getElementValueByName('fid');
- }
- str = parent.get_wfs_str(myconf, d, m, type, fid);
-
- parent.mb_ajax_post("../extensions/geom2wfst.php", {'filter':str,'url':myconf['wfs_transaction']}, function(json,status){
- var result = eval('('+json+')');
- var response = result.response;
- var fid = result.fid;
- wfsSubWrite(m, type, status, response, fid);
- });
- }
-}
-
-function wfsSubWrite(m, type, status, response, fid) {
- if (type == 'save' && fid) {
- d.get(m).e.setElement("fid", fid);
- }
- if (type == 'delete') {
- parent.mb_disableThisButton(mod_digitizeEvent);
- d.del(m);
- }
- parent.mb_execWfsWriteSubFunctions();
- executeDigitizeSubFunctions();
-
- if (status == "success" && response == "success") {
- var wfsWriteMessage = messageSuccessWfsWrite[selectedLanguage];
- }
- else {
- var wfsWriteMessage = messageErrorWfsWrite[selectedLanguage];
- }
-
- if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
- wfsWindow.alert(wfsWriteMessage);
- window.setTimeout("wfsWindow.close()",0);
- }
- else {
- alert(wfsWriteMessage);
- }
-}
-// --- wfs window (begin) -----------------------------------------------------------------------------------------
-// -----------------------------------------------------------------------------------------------------------
-
- </script>
- </head>
- <body onload="registerFunctions();displayButtons();">
- <table cellpadding='0' cellspacing='0' align = center><tr><td><div id='digButtons'></div></td></tr></table>
- <div id = 'listOfGeometries'></div>
- </body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php (from rev 2140, branches/2.4.5/http/javascripts/mod_digitize_tab.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_digitize_tab.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,1272 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_digitize_tab.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Digitize</title>
+<?php
+$digitize_conf_filename = "digitize_default.conf";
+include '../include/dyn_css.php';
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'digitize' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = explode(",",$row["e_target"]);
+ $cnt++;
+}
+if($cnt > 1) echo "alert('digitize_button: ID not unique!');";
+
+echo "<script language='JavaScript'>";
+echo "var mod_digitize_target = '".$e_target[0]."';";
+echo "var mod_digitize_frame = '".$e_target[1]."';";
+include("../../conf/" . $digitize_conf_filename);
+?>
+
+var wfsWindow;
+var dwin = null;
+var wfsConf = [];
+var d = new parent.GeometryArray();
+var mod_digitize_width;
+var mod_digitize_height;
+var mod_digitizeEvent = false;
+var nonTransactionalHighlight;
+
+var button_point = "Point";
+var button_line = "Line";
+var button_polygon = "Polygon";
+var button_move = "dragBasePoint";
+var button_insert = "setBasePoint";
+var button_delete = "delBasePoint";
+var button_clear = "clear";
+var button_combine = "combine";
+
+var digitizeDivTag;
+
+var featureTypeElementFormId = "featureTypeElementForm";
+
+try {if(mod_digitize_elName){}}catch(e) {mod_digitize_elName = "digitize";}
+
+// ------------------------------------------------------------------------------------------------------------------------
+// --- polygon, line, point insertion (begin) ----------------------------------------------------------------------------------------------
+
+function appendGeometryArray(obj) {
+ executeDigitizePreFunctions();
+ for (i=0; i<obj.count(); i++) {
+ d.addCopy(obj.get(i));
+ }
+ executeDigitizeSubFunctions();
+}
+
+function mod_digitize_go(e){
+ parent.mb_registerGML(mod_digitize_target,d);
+
+ // ie workaround
+ if (e == undefined) {
+ e = parent.frames[mod_digitize_target].event;
+ }
+ if (e) {
+ // track mouse position
+ parent.mb_getMousePos(e, mod_digitize_target);
+ var currentPos = new parent.Point(parent.clickX, parent.clickY);
+ s.check(currentPos);
+ }
+ else {
+// s.clean();
+ }
+
+ var el = parent.frames[mod_digitize_target].document;
+ el.onmousedown = mod_digitize_start;
+}
+
+function mod_digitize_timeout(){
+ var el = parent.frames[mod_digitize_target].document;
+ el.onmousedown = null;
+ el.onmouseup = null;
+ el.onmousemove = null;
+}
+
+function mod_digitize_start(e){
+ // check if a proper geometry is selected
+ if (d.getGeometry(-1,-1).isComplete() || d.count() == 0){
+
+ if (mod_digitizeEvent != false) {
+ alert(errorMessageNoGeometrySelected[selectedLanguage]);
+ }
+ return false;
+ }
+
+ var realWorldPos;
+ if (s.isSnapped()) {
+ realWorldPos = s.getSnappedPoint();
+ s.clean();
+ }
+ else {
+ parent.mb_getMousePos(e,mod_digitize_target);
+ realWorldPos = parent.mapToReal(mod_digitize_target,new parent.Point(parent.clickX,parent.clickY));
+ }
+
+ if (d.get(-1).geomType == parent.geomType.polygon && d.getGeometry(-1,-1).count() > 1 && d.getGeometry(-1,-1).get(0).equals(realWorldPos)) {
+
+ // close the polygon
+ d.close();
+ parent.mb_disableThisButton(button_polygon);
+ return true;
+ }
+ else if (d.get(-1).geomType == parent.geomType.line && d.getGeometry(-1,-1).count() > 1 && d.getGeometry(-1,-1).get(-1).equals(realWorldPos)) {
+ // close the line
+ d.close();
+ parent.mb_disableThisButton(button_line);
+ return true;
+ }
+ else {
+ // set the calculated real world position as point of the geometry
+ d.getGeometry(-1,-1).addPoint(realWorldPos);
+
+ if(d.get(-1).geomType == parent.geomType.point){
+ d.close();
+ parent.mb_disableThisButton(button_point);
+ return true;
+ }
+
+ // add first point of polygon to snapping list (if three points have been inserted).
+ else if (d.get(-1).geomType == parent.geomType.polygon && d.getGeometry(-1,-1).count() == 3) {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+
+ // add last point of line to snapping list (if at least two points have been inserted).
+ else if (d.get(-1).geomType == parent.geomType.line && d.getGeometry(-1,-1).count() >= 2) {
+ if (mod_digitizeEvent != button_move) {
+ s.store(d);
+ }
+ s.add(d.getPoint(-1, -1, -1));
+ }
+ }
+ executeDigitizeSubFunctions();
+ return true;
+}
+// --- polygon, line, point insertion (begin) ----------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------------------------------
+// --- basepoint handling (begin) -----------------------------------------------------------------------------------------
+
+var basepointObject = false;
+var basepointMemberIndex = null;
+var basepointGeometryIndex = null;
+var basepointPointIndex = null;
+var basepointDragActive = false;
+
+function handleBasepoint(obj,memberIndex,geometryIndex,pointIndex){
+ if(!(mod_digitizeEvent == button_move || mod_digitizeEvent == button_insert || mod_digitizeEvent == button_delete)){ return false; }
+
+ basepointObject = obj;
+ basepointMemberIndex = memberIndex;
+ basepointGeometryIndex = geometryIndex;
+ basepointPointIndex = pointIndex;
+
+ if(mod_digitizeEvent == button_move){
+ mod_digitize_timeout();
+ basepointObject.style.cursor = 'move';
+ basepointObject.onmousedown = parent.window.frames[mod_digitize_elName].selectBasepoint;
+ }
+
+ if(mod_digitizeEvent == button_delete){
+ mod_digitize_timeout();
+ basepointObject.style.cursor = 'crosshair';
+ basepointObject.onmousedown = parent.window.frames[mod_digitize_elName].deleteBasepoint;
+ }
+}
+
+function convertLinepointToBasepoint(obj, memberIndex, geomIndex, pointIndex){
+ if(!(mod_digitizeEvent == button_insert)){ return false; }
+
+ if(mod_digitizeEvent == button_insert){
+ mod_digitize_timeout();
+ obj.style.cursor = 'crosshair';
+ obj.onclick = insertBasepoint;
+
+ basepointObject = obj;
+ basepointMemberIndex = memberIndex;
+ basepointGeometryIndex = geomIndex;
+ basepointPointIndex = pointIndex;
+ }
+}
+
+function insertBasepoint(e){
+ var i = basepointMemberIndex;
+ var j = basepointGeometryIndex;
+ var k = basepointPointIndex;
+
+ parent.mb_getMousePos(e, mod_digitize_target);
+ var pos = parent.makeClickPos2RealWorldPos(mod_digitize_target,parent.clickX, parent.clickY);
+ var p = new parent.Point(pos[0], pos[1]);
+ d.getGeometry(i,j).addPointAtIndex(p, k);
+
+ executeDigitizeSubFunctions();
+}
+
+function deleteBasepoint(){
+ var i = basepointMemberIndex;
+ var j = basepointGeometryIndex;
+ var k = basepointPointIndex;
+ d.delAllPointsLike(d.getPoint(i,j,k));
+
+ executeDigitizeSubFunctions();
+}
+
+function selectBasepoint(e){
+ if(!basepointDragActive && mod_digitizeEvent == button_move){
+ basepointDragActive = true;
+ s.store(d, d.getPoint(basepointMemberIndex, basepointGeometryIndex, basepointPointIndex));
+ // replace basepoint by transparent blob
+ basepointObject.style.width = mod_digitize_width;
+ basepointObject.style.height = mod_digitize_height;
+ basepointObject.style.left = 0;
+ basepointObject.style.top = 0;
+
+ if (parent.ie) {
+ // ie cannot handle backgroundColor = 'transparent'
+ basepointObject.style.background = "url(../img/transparent.gif)";
+ }
+ else{
+ basepointObject.style.backgroundColor = 'transparent';
+ }
+
+ basepointObject.onmouseup = releaseBasepoint;
+ basepointObject.onmousemove = dragBasepoint;
+ }
+}
+
+function dragBasepoint(e){
+ if(basepointDragActive){
+ parent.mb_getMousePos(e, mod_digitize_target);
+ var currentPos = new parent.Point(parent.clickX, parent.clickY);
+ var res = s.check(currentPos);
+
+ }
+}
+
+function updateAllPointsOfNonTransactionalLike(oldP, newP){
+ for (var i = 0; i < d.count(); i++) {
+ if (isTransactional(d.get(i))) {
+ d.get(i).updateAllPointsLike(oldP, newP);
+ }
+ }
+}
+
+
+function releaseBasepoint(e){
+
+ var i = basepointMemberIndex;
+ var j = basepointGeometryIndex;
+ var k = basepointPointIndex;
+ basepointDragActive = false;
+
+ parent.mb_getMousePos(e, mod_digitize_target);
+ var basepointDragEnd = new parent.Point(parent.clickX, parent.clickY);
+ basepointObject.onmousedown = null;
+ var p = parent.makeClickPos2RealWorldPos(mod_digitize_target, basepointDragEnd.x, basepointDragEnd.y);
+
+ var oldPoint = parent.cloneObject(d.getPoint(i,j,k));
+ if (s.isSnapped()) {
+ var snappedPoint = parent.cloneObject(s.getSnappedPoint());
+ if (!nonTransactionalEditable) {
+ updateAllPointsOfNonTransactionalLike(oldPoint, snappedPoint);
+ }
+ else {
+ d.updateAllPointsLike(oldPoint, snappedPoint);
+ }
+ s.clean();
+ }
+ else {
+ var newPoint = new parent.Point(p[0],p[1]);
+ if (!nonTransactionalEditable) {
+ updateAllPointsOfNonTransactionalLike(oldPoint, newPoint);
+ }
+ else {
+ d.updateAllPointsLike(oldPoint, newPoint);
+ }
+ }
+ basepointMemberIndex = null;
+ basepointGeometryIndex = null;
+ basepointPointIndex = null;
+
+ executeDigitizeSubFunctions();
+}
+// --- basepoint handling (end) -----------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------------------
+
+// ------------------------------------------------------------------------------------------------------------------------
+// --- registered functions (begin) ---------------------------------------------------------------------------------------
+
+function registerDigitizePreFunctions(stringFunction){
+ mod_digitizePreFunctions[mod_digitizePreFunctions.length] = stringFunction;
+}
+
+function registerDigitizeSubFunctions(stringFunction){
+ mod_digitizeSubFunctions[mod_digitizeSubFunctions.length] = stringFunction;
+}
+
+function executeDigitizeSubFunctions(){
+ for(var i=0; i<mod_digitizeSubFunctions.length; i++){
+ eval(mod_digitizeSubFunctions[i]);
+ }
+}
+
+function executeDigitizePreFunctions(){
+ for(var i=0; i<mod_digitizePreFunctions.length; i++){
+ eval(mod_digitizePreFunctions[i]);
+ }
+}
+
+function registerFunctions(){
+ mod_digitizePreFunctions = [];
+ mod_digitizeSubFunctions = [];
+ registerDigitizePreFunctions("updateExtent()");
+ registerDigitizePreFunctions("drawDashedLine()");
+ registerDigitizeSubFunctions("updateListOfGeometries()");
+ registerDigitizeSubFunctions("drawDashedLine()");
+ registerDigitizeSubFunctions("updateMeasureTag()");
+ parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].setStyleForTargetFrame()");
+ parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].checkDigitizeTag()");
+ parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseSnapping()");
+ if (!nonTransactionalEditable) {
+ parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseHighlight()");
+ }
+ parent.mb_registerInitFunctions("window.frames['"+ mod_digitize_elName + "'].initialiseMeasure()");
+ parent.mb_registerSubFunctions("window.frames['" + mod_digitize_elName + "'].updateExtent()");
+ parent.mb_registerSubFunctions("window.frames['"+ mod_digitize_elName + "'].drawDashedLine()");
+ parent.mb_registerSubFunctions("window.frames['"+ mod_digitize_elName + "'].updateMeasureTag()");
+ parent.mb_registerWfsReadSubFunctions(function(geom){parent.tab_open(mod_digitize_elName);parent.window.frames[mod_digitize_elName].appendGeometryArray(geom);});
+ parent.mb_registerWfsWriteSubFunctions(function(){parent.zoom(mod_digitize_target, true, 0.999);});
+}
+
+function checkDigitizeTag(){
+ var digitizeTagName = "digitize";
+ var digitizeTagStyle = {"position":"absolute", "top":"0px", "left":"0px", "z-index":digitizeTransactionalZIndex, "font-size":"10px"};
+
+ digitizeDivTag = new parent.DivTag(digitizeTagName, mod_digitize_target, digitizeTagStyle);
+ parent.mb_registerPanSubElement(digitizeTagName);
+}
+
+
+function setStyleForTargetFrame(){
+ var cssLink = parent.window.frames[mod_digitize_target].document.createElement("link");
+ cssLink.setAttribute("href", cssUrl);
+ cssLink.setAttribute("type", "text/css");
+ cssLink.setAttribute("rel", "stylesheet");
+ var cssTmp = parent.window.frames[mod_digitize_target].document.getElementsByTagName("head")[0];
+ cssTmp.appendChild(cssLink);
+}
+
+function initialiseSnapping(){
+ s = new parent.Snapping(mod_digitize_target, snappingTolerance, snappingColor, snappingHighlightZIndex);
+}
+function initialiseHighlight(){
+ nonTransactionalHighlight = new parent.Highlight(new Array(mod_digitize_target), "nonTransactional", {"position":"absolute", "top":"0px", "left":"0px", "z-index":digitizeNonTransactionalZIndex}, nonTransactionalLineWidth);
+}
+function initialiseMeasure(){
+ measureDivTag = new parent.DivTag(measureTagName, measureTagTarget, measureTagStyle);
+}
+// --- registered functions (end) -----------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------------------
+
+
+function updateMeasureTag () {
+ if (d.count() > 0 ) {
+ if (d.get(-1).count() > 0) {
+ if (d.getGeometry(-1, -1).count() > 0) {
+ if (mod_digitizeEvent == button_line || mod_digitizeEvent == button_polygon) {
+ var measureString = "";
+ measureString += measureTagLabelCurrent[selectedLanguage] + d.getGeometry(-1, -1).getCurrentDist(measureNumberOfDigits) + "<br>";
+ measureString += measureTagLabelTotal[selectedLanguage] + d.getGeometry(-1, -1).getTotalDist(measureNumberOfDigits);
+ measureDivTag.write(measureString);
+ return true;
+ }
+ }
+ }
+ }
+ measureDivTag.clean();
+}
+
+
+
+// ------------------------------------------------------------------------------------------------------------------------
+// --- button handling (begin) --------------------------------------------------------------------------------------------
+
+function displayButtons(){
+ for (var i = 0 ; i < buttonDig_id.length ; i ++) {
+ if (parseInt(buttonDig_on[i])==1) {
+ var divTag = document.createElement("div");
+ divTag.setAttribute("id", "div_" + buttonDig_id[i]);
+// FIREFOX
+ document.getElementById("digButtons").appendChild(divTag);
+
+//IE WORKAROUND, WORKS ALSO FOR FIREFOX
+ var tagContent = "<div style='position:absolute; top:"+buttonDig_y[i]+"px; left:"+buttonDig_x[i]+"px;'><img name=\""+buttonDig_id[i]+"\" onmouseover=\"parent.mb_regButton_frame('initDigButton', mod_digitize_elName, "+i+");\" id=\""+buttonDig_id[i]+"\" title=\""+buttonDig_title_off[i]+"\" src=\""+buttonDig_imgdir+buttonDig_src[i]+"\"></div>";
+ parent.writeTag(mod_digitize_elName,"div_" + buttonDig_id[i],tagContent);
+ }
+ }
+}
+
+function initDigButton(ind, pos){
+ parent.mb_button[ind] = document.getElementById(buttonDig_id[pos]);
+ parent.mb_button[ind].img_over = buttonDig_imgdir + buttonDig_src[pos].replace(/_off/,"_over");
+ parent.mb_button[ind].img_on = buttonDig_imgdir + buttonDig_src[pos].replace(/_off/,"_on");
+ parent.mb_button[ind].img_off = buttonDig_imgdir + buttonDig_src[pos];
+ parent.mb_button[ind].title_on = buttonDig_title_on[pos];
+ parent.mb_button[ind].title_off = buttonDig_title_off[pos];
+ parent.mb_button[ind].status = 0;
+ parent.mb_button[ind].elName = buttonDig_id[pos];
+ parent.mb_button[ind].fName = "";
+ parent.mb_button[ind].go = new Function ("digitizeEnable(parent.mb_button["+ind+"])");
+ parent.mb_button[ind].stop = new Function ("digitizeDisable(parent.mb_button["+ind+"])");
+}
+
+function digitizeEnable(obj) {
+ if (obj.id == button_move || obj.id == button_insert || obj.id == button_delete) {
+ mod_digitizeEvent = obj.id;
+ executeDigitizePreFunctions();
+ }
+ else if (obj.id == button_point || obj.id == button_line || obj.id == button_polygon || obj.id == button_clear || obj.id == button_combine){
+ var el = parent.frames[mod_digitize_target].document;
+ el.onmousemove = mod_digitize_go;
+
+ mod_digitizeEvent = obj.id;
+
+ if (mod_digitizeEvent == button_point || mod_digitizeEvent == button_line || mod_digitizeEvent == button_polygon || mod_digitizeEvent == button_insert ) {
+ s.store(d);
+ }
+
+ executeDigitizePreFunctions();
+ obj.title = obj.title_on;
+ if (obj.id == button_point) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.point) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
+ if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
+ d.addMember(parent.geomType.point);
+ d.get(-1).addGeometry();
+ }
+ else {
+/*
+//
+// delete existing line or polygon
+//
+ d.del(-1);
+ d.addMember(parent.geomType.point);
+ d.get(-1).addGeometry();
+*/
+ }
+ }
+ else if (obj.id == button_polygon) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.polygon) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
+ if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
+ // new geometry
+ d.addMember(parent.geomType.polygon);
+ d.get(-1).addGeometry();
+ }
+ else {
+/*
+//
+// continue a line as a polygon
+//
+ if (d.get(-1).geomType != parent.geomType.polygon) {
+ var geometryTemplate = parent.cloneObject(d.get(-1));
+ d.del(-1);
+ d.addMember(parent.geomType.polygon);
+ for (var i = 0; i < geometryTemplate.count(); i++) {
+ d.get(-1).addGeometry();
+ for (var j = 0; j < geometryTemplate.get(i).count(); j++) {
+ d.get(-1).get(-1).addPoint(geometryTemplate.get(i).get(j));
+ }
+ }
+ }
+ s.add(d.getPoint(-1, -1, 0));
+*/
+ }
+ }
+ else if (obj.id == button_line) {
+ if (d.count() > 0 && d.get(-1).count() > 0 && !d.get(-1).get(-1).isComplete()) {
+ if (d.get(-1).geomType != parent.geomType.line) {
+ d.close();
+ executeDigitizeSubFunctions();
+ }
+ else {
+ s.add(d.getPoint(-1, -1, 0));
+ }
+ }
+ if (d.count() == 0 || (d.count() > 0 && d.get(-1).count() > 0 && d.get(-1).get(-1).isComplete())) {
+ d.addMember(parent.geomType.line);
+ d.get(-1).addGeometry();
+ }
+ else {
+/*
+//
+// continue a polygon as a line
+//
+ if (d.get(-1).geomType != parent.geomType.line) {
+ var geometryTemplate = parent.cloneObject(d.get(-1));
+ d.del(-1);
+ d.addMember(parent.geomType.line);
+ for (var i = 0; i < geometryTemplate.count(); i++) {
+ d.get(-1).addGeometry();
+ for (var j = 0; j < geometryTemplate.get(i).count(); j++) {
+ d.get(-1).get(-1).addPoint(geometryTemplate.get(i).get(j));
+ }
+ }
+ }
+*/
+ }
+ }
+ else if (obj.id == button_clear) {
+ var clear = confirm(messageConfirmDeleteAllGeomFromList[selectedLanguage]);
+ if (clear) {
+ d = new parent.GeometryArray();
+ parent.mb_disableThisButton(button_clear);
+ }
+ }
+ else if (obj.id == button_combine) {
+// d.combineToMultiGeometry();
+// prompt('', d.toJSONString());
+// parent.mb_ajax_post("../php/jsonTest.php", {json:d.toJSONString()}, function(test, status) {
+// alert(test);
+// });
+ parent.mb_disableThisButton(button_combine);
+ }
+ }
+}
+
+function digitizeDisable(obj) {
+ if (obj.id == button_point || obj.id == button_line || obj.id == button_polygon){
+ obj.title = obj.title_off;
+ if (d.get(-1).get(-1).count() == 0) {
+ d.delGeometry(-1,-1);
+ }
+ mod_digitize_timeout();
+ executeDigitizeSubFunctions();
+ }
+ else if (obj.id == button_clear) {
+ mod_digitize_timeout();
+ executeDigitizeSubFunctions();
+ }
+ mod_digitizeEvent = false;
+}
+// --- button handling (end) ----------------------------------------------------------------------------------------------
+// ------------------------------------------------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------------------------------------
+// --- display (begin) -----------------------------------------------------------------------------------------
+
+function updateExtent() {
+ var anInd = parent.getMapObjIndexByName(mod_digitize_target);
+ var change = false;
+ if (typeof(mod_digitize_width) == 'undefined' || mod_digitize_width != parent.mb_mapObj[anInd].width) {
+ mod_digitize_width = parent.mb_mapObj[anInd].width;
+ change = true;
+ }
+ if (typeof(mod_digitize_height) == 'undefined' || mod_digitize_height != parent.mb_mapObj[anInd].height) {
+ mod_digitize_height = parent.mb_mapObj[anInd].height;
+ change = true;
+ }
+ if (typeof(mod_digitize_epsg) == 'undefined' || mod_digitize_epsg != parent.mb_mapObj[anInd].epsg) {
+ mod_digitize_epsg = parent.mb_mapObj[anInd].epsg;
+ change = true;
+ }
+// if (change) {
+// drawDashedLine();
+// }
+}
+
+function drawDashedLine(){
+ if (!nonTransactionalEditable) {
+ nonTransactionalHighlight.clean();
+ }
+ var smP = "";
+ smP += "<div class='t_img'>";
+ smP += "<img src='"+parent.mb_trans.src+"' width='"+mod_digitize_width+"' height='0'></div>";
+ smP += "<div class='t_img'>";
+ smP += "<img src='"+parent.mb_trans.src+"' width='0' height='"+mod_digitize_height+"'></div>";
+
+ if (!nonTransactionalEditable) {
+ nonTransactionalHighlight.clean();
+ }
+ var smPArray = [];
+ smPArray[smPArray.length] = "<div class='t_img'>"
+ + "<img src='"+parent.mb_trans.src+"' width='"+mod_digitize_width+"' height='0'></div>"
+ + "<div class='t_img'>"
+ + "<img src='"+parent.mb_trans.src+"' width='0' height='"+mod_digitize_height+"'></div>";
+
+ var mapObj = parent.mb_mapObj[parent.getMapObjIndexByName(mod_digitize_target)];
+ var width = mapObj.width;
+ var height = mapObj.height;
+ var isMoveOrInsertOrDelete = mod_digitizeEvent == button_move || mod_digitizeEvent == button_insert || mod_digitizeEvent == button_delete;
+ var minDist = 5;
+
+ for(var i=0, lenGeomArray = d.count(); i < lenGeomArray; i++){
+ var currentGeomArray = d.get(i);
+
+ if (!nonTransactionalEditable && !isTransactional(currentGeomArray)) {
+ nonTransactionalHighlight.add(currentGeomArray, nonTransactionalColor);
+ }
+ else {
+ for(var j=0, lenGeom = currentGeomArray.count(); j < lenGeom ; j++){
+ var currentGeometry = d.getGeometry(i,j);
+ var isPolygon = currentGeomArray.geomType == parent.geomType.polygon;
+ var isLine = currentGeomArray.geomType == parent.geomType.line;
+ var isComplete = currentGeometry.isComplete();
+ var lastPaintedPoint = false;
+
+ for(var k = 0, lenPoint = currentGeometry.count(); k < lenPoint; k++){
+ var currentPoint = currentGeometry.get(k);
+ var currentPointMap = parent.realToMap(mod_digitize_target, currentPoint)
+
+ var isTooCloseToPrevious = lastPaintedPoint && (k > 0) && (Math.abs(currentPointMap.x-lastPaintedPoint.x) <= minDist && Math.abs(currentPointMap.y-lastPaintedPoint.y) <= minDist);
+ if (!isTooCloseToPrevious) {
+ var currentPointIsVisible = currentPointMap.x > 0 && currentPointMap.x < width && currentPointMap.y > 0 && currentPointMap.y < height;
+ if (currentPointIsVisible) {
+ if (!isComplete && ((k == 0 && isPolygon) || (k == lenPoint-1 && isLine))) {
+ smPArray[smPArray.length] = "<div class='bp' style='top:"+
+ (currentPointMap.y-2)+"px;left:"+(currentPointMap.x-2)+"px;z-index:"+
+ digitizeTransactionalZIndex+";background-color:"+linepointColor+"'";
+ }
+ else {
+ smPArray[smPArray.length] = "<div class='bp' style='top:"+(currentPointMap.y-2)+"px;left:"+(currentPointMap.x-2)+"px;z-index:"+digitizeTransactionalZIndex+";'";
+ }
+ if(k==0 && isPolygon && !isComplete){
+ smPArray[smPArray.length] = " title='"+closePolygon_title+"' ";
+ }
+ if(isMoveOrInsertOrDelete) {
+ smPArray[smPArray.length] = " onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].handleBasepoint(this,"+i+","+j+","+k+")' ;";
+ }
+ smPArray[smPArray.length] = "></div>";
+ lastPaintedPoint = currentPointMap;
+ }
+ if (k > 0) {
+ points = parent.calculateVisibleDash(currentPointMap, previousPointMap, width, height);
+ if (points != false) {
+ smPArray[smPArray.length] = evaluateDashes(points[0], points[1], i, j, k);
+ }
+ }
+ }
+ var previousPointMap = currentPointMap;
+ }
+ }
+ }
+ }
+ digitizeDivTag.write(smPArray.join(""));
+
+}
+
+function evaluateDashes(start, end, memberIndex, geomIndex, pointIndex){
+ var str_dashedLine = "";
+ var delta = new parent.Point(end.x - start.x, end.y - start.y);
+
+ var vecLength = start.dist(end);
+ var n = Math.round(vecLength/dotDistance);
+ var step = new parent.Point(delta.x/n, delta.y/n);
+ for(var i=1; i<n; i++){
+ var x = Math.round(start.x + i * step.x) - 2;
+ var y = Math.round(start.y + i * step.y) - 2;
+ if(x >= 0 && x <= mod_digitize_width && y >= 0 && y <= mod_digitize_height){
+ if (memberIndex == d.count()-1 && !d.getGeometry(-1,-1).isComplete()) {
+ str_dashedLine += "<div class='lp' style='top:"+y+"px;left:"+x+"px;z-index:"+digitizeTransactionalZIndex+";background-color:"+linepointColor+"' ";
+ }
+ else {
+ str_dashedLine += "<div class='lp' style='top:"+y+"px;left:"+x+"px;z-index:"+digitizeTransactionalZIndex+";' ";
+ }
+ if(mod_digitizeEvent == button_insert) {
+ str_dashedLine += "onmouseover='parent.window.frames[\""+mod_digitize_elName+"\"].convertLinepointToBasepoint(this,"+memberIndex+","+geomIndex+","+pointIndex+")'";
+ }
+ str_dashedLine += "></div>";
+ }
+ }
+ return str_dashedLine;
+}
+
+function isTransactional(geom) {
+// alert(typeof(geom.wfs_conf) + " " + geom.wfs_conf + " " + wfsConf.length);
+ if (typeof(geom.wfs_conf) == 'number') {
+ if (geom.wfs_conf >= 0 && geom.wfs_conf < wfsConf.length) {
+ var isTransactionalGeom = (wfsConf[geom.wfs_conf]['wfs_transaction'] != "" && wfsConf[geom.wfs_conf]['fkey_featuretype_id'] != "");
+ if (isTransactionalGeom) {
+ return true;
+ }
+ else{
+ return false;
+ }
+ }
+ }
+ else if (typeof(geom.wfs_conf) == 'undefined') {
+ return true;
+ }
+}
+
+function isValidWfsConfIndex (wfsConf, wfsConfIndex) {
+ return (typeof(wfsConfIndex) == "number" && wfsConfIndex >=0 && wfsConfIndex < wfsConf.length);
+}
+
+function getName (geom) {
+ wfsConfId = geom.wfs_conf;
+ wfsConf = parent.get_complete_wfs_conf();
+ if (isValidWfsConfIndex(wfsConf, wfsConfId)) {
+ var resultName = "";
+ for (var i = 0 ; i < wfsConf[wfsConfId]['element'].length ; i++) {
+ if (wfsConf[wfsConfId]['element'][i]['f_show'] == 1) {
+ resultName += geom.e.getElementValueByName(wfsConf[wfsConfId]['element'][i]['element_name']) + " ";
+ }
+ }
+ if (resultName == "") {
+ resultName = wfsConf[wfsConfId]['g_label'];
+ }
+ return resultName;
+ }
+ else {
+ return digitizeDefaultGeometryName[selectedLanguage];
+ }
+}
+
+function updateListOfGeometries(){
+ var listOfGeom = "<table style='position:absolute; top:"+geomList_y+"px; left:"+geomList_x+"px;'>\n";
+ if (d.count() > 0) {
+ wfsConf = parent.get_complete_wfs_conf();
+ for (var i = 0 ; i < d.count(); i ++) {
+
+ if (d.get(i).get(-1).isComplete() && (nonTransactionalEditable || isTransactional(d.get(i)))) {
+
+ listOfGeom += "\t<tr>\n\t\t<td>\n";
+ if (wfsExistsForGeom(d.get(i), wfsConf)) {
+ listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_wfs_src+"' title='"+buttonDig_wfs_title[selectedLanguage]+"' onclick='showWfs("+i+")'>\n";
+ }
+ listOfGeom += "\t\t</td>\n\t\t<td>\n";
+ listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_remove_src+"' title='"+buttonDig_remove_title[selectedLanguage]+"' onclick='parent.mb_disableThisButton(mod_digitizeEvent);d.del("+i+");executeDigitizeSubFunctions();'>\n";
+ listOfGeom += "\t\t</td>\n\t\t<td>\n";
+
+ if (isValidWfsConfIndex(wfsConf, d.get(i).wfs_conf)) {
+ listOfGeom += "\t\t\t<img src = '"+buttonDig_imgdir+buttonDig_removeDb_src+"' title='"+buttonDig_removeDb_title[selectedLanguage]+"' onclick=\"var deltrans = confirm('"+messageConfirmDeleteGeomFromDb[selectedLanguage]+"');if (deltrans) dbGeom('delete', "+i+")\">\n";
+ }
+ listOfGeom += "\t\t</td>\n\t\t<td style = 'color:blue;font-size:12px'>\n";
+ listOfGeom += "\t\t\t<div onmouseover='parent.mb_wfs_perform(\"over\",d.get("+i+"));' ";
+ listOfGeom += " onmouseout='parent.mb_wfs_perform(\"out\",d.get("+i+"))' ";
+ listOfGeom += " onclick='parent.mb_wfs_perform(\"click\",d.get("+i+"));' ";
+ var geomName = getName(d.get(i));
+ if (d.get(i).geomType == parent.geomType.polygon) {geomName += " ("+messageDescriptionPolygon[selectedLanguage]+")";}
+ else if (d.get(i).geomType == parent.geomType.line) {geomName += " ("+messageDescriptionLine[selectedLanguage]+")";}
+ else if (d.get(i).geomType == parent.geomType.point) {geomName += " ("+messageDescriptionPoint[selectedLanguage]+")";}
+
+ listOfGeom += ">" + geomName +"</div>\t\t</td>\n\t</tr>\n";
+ }
+ }
+ }
+ listOfGeom += "</table>\n";
+ parent.writeTag(mod_digitize_elName,"listOfGeometries",listOfGeom);
+}
+// --- display (end) -----------------------------------------------------------------------------------------
+// -----------------------------------------------------------------------------------------------------------
+
+
+// -----------------------------------------------------------------------------------------------------------
+// --- wfs window (begin) -----------------------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------------------------------------
+// --- wfs window form check (begin) -----------------------------------------------------------------------------------------
+
+function formCorrect(doc, formId) {
+ var isCorrect = true;
+ var errorMessage = "";
+ var result;
+ var form = doc.getElementById(formId);
+
+ result = mandatoryFieldsNotEmpty(doc, form);
+ isCorrect = isCorrect && result.isCorrect;
+ errorMessage += result.errorMessage;
+
+ result = validBoxEntrySelected(form);
+ isCorrect = isCorrect && result.isCorrect;
+ errorMessage += result.errorMessage;
+
+ result = dataTypeIsCorrect(doc, form);
+ isCorrect = isCorrect && result.isCorrect;
+ errorMessage += result.errorMessage;
+
+ return {"isCorrect":isCorrect, "errorMessage":errorMessage};
+}
+
+function validBoxEntrySelected(form){
+ var isCorrect = true;
+ var errorMessage = "";
+ for (var i = 0; i < form.childNodes.length && isCorrect; i++) {
+ if (form.childNodes[i].nodeName.toUpperCase() == "SELECT") {
+ if (parseInt(form.childNodes[i].selectedIndex) == 0) {
+ return {"isCorrect":false, "errorMessage":errorMessage};
+ }
+ }
+ else if (form.childNodes[i].hasChildNodes()) {
+ isCorrect = validBoxEntrySelected(form.childNodes[i]).isCorrect;
+ }
+ }
+ if (!isCorrect) {
+ errorMessage = messageSelectAnOption[selectedLanguage] + "\n";
+ }
+ return {"isCorrect":isCorrect, "errorMessage":errorMessage};
+}
+
+function mandatoryFieldsNotEmpty(doc, node){
+ var isCorrect = true;
+ var errorMessage = "";
+
+ nodeArray = doc.getElementsByName("mandatory");
+ for (var i = 0; i < nodeArray.length && isCorrect; i++) {
+ if (nodeArray[i].nodeName.toUpperCase() == "INPUT" && nodeArray[i].type == "hidden" && nodeArray[i].id.substr(0,10) == "mandatory_") {
+ var nodeId = nodeArray[i].id.substr(10);
+ if (nodeArray[i].value == "true") {
+ if (doc.getElementById(nodeId).value == "") {
+ isCorrect = false;
+ errorMessage += "'"+ doc.getElementById(nodeId).name +"': "+ messageErrorFieldIsEmpty[selectedLanguage] +"\n";
+ }
+ }
+ }
+ }
+ return {"isCorrect":isCorrect, "errorMessage":errorMessage};
+}
+
+function isInteger(str) {
+ if (str.match(/^\d+$/)) {
+ return true;
+ }
+ return false;
+}
+
+function isFloat(str) {
+ if (isInteger(str)) {
+ return true;
+ }
+ if (str.match(/^\d+\.\d+$/)) {
+ return true;
+ }
+ return false;
+}
+
+function replaceCommaByDecimalPoint(str) {
+ var patternString = ",";
+ var pattern = new RegExp(patternString);
+ while (str.match(pattern)) {
+ str = str.replace(pattern, ".");
+ }
+ return str;
+}
+
+function dataTypeIsCorrect(doc, node){
+ var isCorrect = true;
+ var errorMessage = "";
+
+ nodeArray = doc.getElementsByName("datatype");
+ for (var i = 0; i < nodeArray.length ; i++) {
+ if (nodeArray[i].nodeName.toUpperCase() == "INPUT" && nodeArray[i].type == "hidden" && nodeArray[i].id.substr(0,9) == "datatype_") {
+ var nodeId = nodeArray[i].id.substr(9);
+ var nodeValue = doc.getElementById(nodeId).value;
+
+ if (nodeArray[i].value == "int") {
+ if (!isInteger(nodeValue)) {
+ isCorrect = false;
+ errorMessage += "'"+doc.getElementById(nodeId).name+"': "+ messageErrorNotAnInteger[selectedLanguage] + "\n";
+ }
+ }
+ else if (nodeArray[i].value == "double") {
+ nodeValue = replaceCommaByDecimalPoint(nodeValue);
+ if (!isFloat(nodeValue)) {
+ isCorrect = false;
+ errorMessage += "'"+doc.getElementById(nodeId).name+"': "+ messageErrorNotAFloat[selectedLanguage] + "\n";
+ }
+ else {
+ doc.getElementById(nodeId).value = nodeValue;
+ }
+ }
+ }
+ }
+ return {"isCorrect":isCorrect, "errorMessage":errorMessage};
+}
+// --- wfs window form check (end) -----------------------------------------------------------------------------------------
+// -----------------------------------------------------------------------------------------------------------
+
+function getAvailableWfsForGeom(geom, wfsConf) {
+ var wfsConfIndices = [];
+
+ for (var attr in wfsConf) {
+ var isTrans = (wfsConf[attr]['wfs_transaction'] != "");
+ if (!isTrans) {
+ continue;
+ }
+ if (isValidWfsConfIndex(wfsConf, parseInt(geom.wfs_conf))) {
+
+ if (parseInt(geom.wfs_conf) == parseInt(attr)) {
+ wfsConfIndices.push(attr);
+ }
+ }
+ else {
+ for (var elementIndex = 0; elementIndex < wfsConf[attr]['element'].length ; elementIndex++) {
+ var isGeomColumn = (parseInt(wfsConf[attr]['element'][elementIndex]['f_geom']) == 1);
+ if (isGeomColumn) {
+ var isMultiPolygon = (geom.geomType == parent.geomType.polygon && wfsConf[attr]['element'][elementIndex]['element_type'] == 'MultiPolygonPropertyType');
+ var isPolygon = (geom.geomType == parent.geomType.polygon && geom.count() == 1 && wfsConf[attr]['element'][elementIndex]['element_type'] == 'PolygonPropertyType');
+ var isMultiLine = (geom.geomType == parent.geomType.line && wfsConf[attr]['element'][elementIndex]['element_type'] == 'MultiLineStringPropertyType');
+ var isLine = (geom.geomType == parent.geomType.line && geom.count() == 1 && wfsConf[attr]['element'][elementIndex]['element_type'] == 'LineStringPropertyType');
+ var isPoint = (geom.geomType == parent.geomType.point && wfsConf[attr]['element'][elementIndex]['element_type'] == 'PointPropertyType');
+// alert(isMultiPolygon + " " + isPolygon + " " + isMultiLine + " " + isLine + " " + isPoint);
+ if (isMultiPolygon || isPolygon || isMultiLine || isLine || isPoint || wfsConf[attr]['element'][elementIndex]['element_type'] == 'GeometryAssociationType') {
+
+ wfsConfIndices.push(attr);
+ }
+ }
+ }
+ }
+ }
+ return wfsConfIndices;
+}
+function wfsExistsForGeom(geom, wfsConf) {
+ wfsConfIndices = getAvailableWfsForGeom(geom, wfsConf);
+// alert(wfsConfIndices.join(","));
+ if (wfsConfIndices.length > 0) {
+ return true;
+ }
+ return false;
+}
+
+
+//
+// this method opens a new window and displays the attributes in wfs_conf
+//
+function showWfs(geometryIndex) {
+ wfsConf = parent.get_complete_wfs_conf();
+
+ wfsWindow = open("", "wfsattributes", "width="+wfsWindowWidth+", height="+wfsWindowHeight+", resizable, dependent=yes, scrollbars=yes");
+ wfsWindow.document.open("text/html");
+
+ var str = "";
+ var strStyle = "";
+ var defaultIndex = -1;
+
+ str += "<form id='wfs'>\n";
+
+ //
+ // 1. add select box
+ //
+
+ var onChangeText = "document.getElementById('elementForm').innerHTML = ";
+ onChangeText += "window.opener.buildElementForm(this.value , " + geometryIndex + ");";
+ onChangeText += "window.opener.setWfsWindowStyle(this.value);";
+
+ str += "\t<select name='wfs' size='" + wfsConf.length + "'";
+ str += " onChange=\""+ onChangeText +"\"";
+ str += ">\n\t\t";
+
+ var wfsConfIndices = getAvailableWfsForGeom(d.get(geometryIndex), wfsConf);
+// alert(wfsConfIndices.join(","));
+ var selected = false;
+ for (var i = 0; i < wfsConfIndices.length ; i++) {
+ str += "<option value='" + wfsConfIndices[i] + "'";
+ if (!selected) {
+ str += " selected";
+ selected = true;
+ defaultIndex = parseInt(wfsConfIndices[i]);
+ }
+ str += ">" + wfsConf[wfsConfIndices[i]]['wfs_conf_abstract'];
+ str += "</option>\n\t\t";
+ }
+
+
+ str += "</select>\n\t\t</form>\n\t";
+ str += "<div id='elementForm'>\n</div>";
+
+ if (defaultIndex != -1) {
+ wfsWindow.document.writeln("<html><head><style type='text/css'>"+wfsConf[defaultIndex]['g_style']+"</style></head><body></body></html>");
+ wfsWindow.document.write(str);
+ wfsWindow.document.close();
+ wfsWindow.document.getElementById("elementForm").innerHTML = buildElementForm(defaultIndex, geometryIndex);
+ }
+ else {
+ wfsWindow.document.writeln("<html><head><style type='text/css'></style></head><body></body></html>");
+ wfsWindow.document.write(str);
+ wfsWindow.document.close();
+ }
+}
+
+function setWfsWindowStyle(wfsConfIndex) {
+ wfsWindow.document.getElementsByTagName("style")[0].innerHTML = wfsConf[wfsConfIndex]['g_style'];
+}
+
+// returns a form with the elements of a selected wfs
+// (if the original wfs is the selected wfs, the values are set too)
+function buildElementForm(wfsConfIndex, memberIndex){
+ var featureTypeMismatch = false;
+ if (parseInt(d.get(memberIndex).wfs_conf) != parseInt(wfsConfIndex)) {featureTypeMismatch = true;}
+ var str = "";
+ var hasGeometryColumn = false;
+ var featureTypeArray = wfsConf[wfsConfIndex];
+ var memberElements;
+ var fid = false;
+
+ if (!featureTypeMismatch) {
+ memberElements = d.get(memberIndex).e;
+ fid = memberElements.getElementValueByName('fid');
+ }
+
+ if (typeof(featureTypeArray["element"]) !== "undefined") {
+
+ str += "<form id='"+featureTypeElementFormId+"'>\n\t<table>\n";
+ featureTypeElementArray = featureTypeArray["element"];
+
+ //
+ // 2. add rows to form
+ //
+ for (var i = 0 ; i < featureTypeElementArray.length ; i ++) {
+ var featureTypeElement = featureTypeElementArray[i];
+
+ var elementName = featureTypeElement['element_name'];
+ var elementType = featureTypeElement['element_type'];
+ var isEditable = (parseInt(featureTypeElement['f_edit']) == 1);
+ var isMandatory = (parseInt(featureTypeElement['f_mandatory']) == 1);
+ var isGeomColumn = (parseInt(featureTypeElement['f_geom']) == 1);
+
+ var elementLabelExists = (featureTypeElement['f_label'] != "");
+ var elementLabel = "";
+ if (elementLabelExists) {
+ elementLabel = featureTypeElement['f_label'];
+ }
+ var elementLabelStyle = featureTypeElement['f_label_id'];
+
+ if (!isGeomColumn) {
+ if (isEditable) {
+ str += "\t\t<tr>\n";
+ str += "\t\t\t<td>\n\t\t\t\t<div class = '"+elementLabelStyle+"''>" + elementLabel + "</div>\n\t\t\t</td>\n";
+ str += "\t\t\t<td>\n";
+
+ var elementValue = "";
+ if (!featureTypeMismatch) {
+ for (var j = 0 ; j < memberElements.count() ; j ++) {
+ if (memberElements.getName(j) == featureTypeElement['element_name']) {
+ elementValue = memberElements.getValue(j);
+ }
+ }
+ }
+ var formElementHtml = featureTypeElement['f_form_element_html'];
+ if (!formElementHtml) {
+ str += "\t\t\t\t<input id = 'datatype_" + elementName + "' name='datatype' type='hidden' value = '" + elementType + "'>\n";
+ str += "\t\t\t\t<input id = 'mandatory_" + elementName + "' name='mandatory' type='hidden' value = '" + isMandatory + "'>\n";
+ str += "\t\t\t\t<input id = '" + elementName + "' name='" + elementLabel + "' type='text' class = '"+featureTypeElement['f_style_id']+"' size=20 value = '" + elementValue + "'>\n";
+ }
+ else {
+ while (formElementHtml.match(/\\/)) {
+ formElementHtml = formElementHtml.replace(/\\/, "");
+ }
+// alert(formElementHtml);
+ // preselect the correct entry of the box
+ var patternString = "option value='"+elementValue+"'";
+ var pattern = new RegExp(patternString);
+ formElementHtml = formElementHtml.replace(pattern, patternString+" selected");
+// alert(formElementHtml);
+ str += formElementHtml;
+
+ }
+ str += "\t\t\t</td>\n\t\t</tr>\n";
+ }
+ }
+ else {
+ hasGeometryColumn = true;
+ }
+ }
+
+ //
+ // 3. add buttons "save", "update", "delete"
+ //
+ str += "</table><table>";
+ var isTransactional = (featureTypeArray['wfs_transaction']);
+ if (isTransactional) {
+ str += "\t\t<tr>\n";
+
+ var options = ["save", "update", "delete", "abort"];
+ for (var i = 0 ; i < options.length ; i++) {
+ var onClickText = "this.disabled=true;var result = window.opener.formCorrect(document, '"+featureTypeElementFormId+"');";
+ onClickText += "if (result.isCorrect) {";
+ onClickText += "window.opener.dbGeom('"+options[i]+"', "+memberIndex+"); ";
+// onClickText += "window.close();";
+ onClickText += "}";
+ onClickText += "else {";
+ onClickText += "alert(result.errorMessage);this.disabled=false;"
+ onClickText += "}";
+
+ if (options[i] == "save" && hasGeometryColumn && (!fid || showSaveButtonForExistingGeometries)) {
+ str += "\t\t\t<td><input type='button' name='saveButton' value='"+buttonLabelSaveGeometry[selectedLanguage]+"' onclick=\""+onClickText+"\" /></td>\n";
+ }
+
+ if (!featureTypeMismatch && fid) {
+ if (options[i] == "update" && hasGeometryColumn) {
+ str += "\t\t\t<td><input type='button' name='updateButton' value='"+buttonLabelUpdateGeometry[selectedLanguage]+"' onclick=\""+onClickText+"\"/></td>\n";
+ }
+ if (options[i] == "delete"){
+ var deleteOnClickText = "var deltrans = confirm('"+messageConfirmDeleteGeomFromDb[selectedLanguage]+"');";
+ deleteOnClickText += "if (deltrans){";
+ deleteOnClickText += onClickText + "}";
+ str += "\t\t\t<td><input type='button' name='deleteButton' value='"+buttonLabelDeleteGeometry[selectedLanguage]+"' onclick=\""+deleteOnClickText+"\"/></td>\n";
+ }
+ }
+ if (options[i] == "abort") {
+ str += "\t\t\t<td><input type='button' name='abortButton' value='"+buttonLabelAbort[selectedLanguage]+"' onclick=\"window.close();\" /></td>\n";
+ }
+ }
+ str += "\t\t</tr>\n";
+ }
+ str += "\t</table>\n";
+ str += "<input type='hidden' id='fid' value='"+fid+"'>";
+// str += "<input type='text' name='mb_wfs_conf'>";
+ str += "</form>\n";
+ }
+ return str;
+}
+
+function dbGeom(type,m) {
+ if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
+ d.get(m).wfs_conf = parseInt(wfsWindow.document.forms[0].wfs.options[wfsWindow.document.forms[0].wfs.selectedIndex].value);
+ d.get(m).e = new parent.Wfs_element();
+ }
+ else {
+ wfsConf = parent.get_complete_wfs_conf();
+ }
+ var myconf = wfsConf[d.get(m).wfs_conf];
+
+ var mapObjInd = parent.getMapObjIndexByName(mod_digitize_target);
+
+ if (myconf['featuretype_srs'] != parent.mb_mapObj[mapObjInd].epsg) {
+ alert(errorMessageEpsgMismatch[selectedLanguage] + parent.mb_mapObj[mapObjInd].epsg + " / "+ myconf['featuretype_srs']);
+ }
+ else {
+ var fid = false;
+ var errorMessage = "";
+ if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
+ myform = wfsWindow.document.getElementById(featureTypeElementFormId);
+
+ for (var i=0; i<myform.length; i++){
+ if (myform.elements[i].id == "fid") {
+ fid = myform.elements[i].value;
+ d.get(m).e.setElement('fid', fid);
+ }
+ else if (myform.elements[i].type == 'text' ){
+ if (myform.elements[i].id) {
+ d.get(m).e.setElement(myform.elements[i].id, myform.elements[i].value);
+ }
+ else {
+ errorMessage = messageErrorFormEvaluation[selectedLanguage];
+ }
+ }
+ // selectbox
+ else if (typeof(myform.elements[i].selectedIndex) == 'number') {
+ if (myform.elements[i].id) {
+ d.get(m).e.setElement(myform.elements[i].id, myform.elements[i].options[myform.elements[i].selectedIndex].value);
+ }
+ else {
+ errorMessage = messageErrorFormEvaluation[selectedLanguage];
+ }
+ }
+ }
+ }
+ else {
+ fid = d.get(m).e.getElementValueByName('fid');
+ }
+ str = parent.get_wfs_str(myconf, d, m, type, fid);
+
+ parent.mb_ajax_post("../extensions/geom2wfst.php", {'filter':str,'url':myconf['wfs_transaction']}, function(json,status){
+ var result = eval('('+json+')');
+ var response = result.response;
+ var fid = result.fid;
+ wfsSubWrite(m, type, status, response, fid);
+ });
+ }
+}
+
+function wfsSubWrite(m, type, status, response, fid) {
+ if (type == 'save' && fid) {
+ d.get(m).e.setElement("fid", fid);
+ }
+ if (type == 'delete') {
+ parent.mb_disableThisButton(mod_digitizeEvent);
+ d.del(m);
+ }
+ parent.mb_execWfsWriteSubFunctions();
+ executeDigitizeSubFunctions();
+
+ if (status == "success" && response == "success") {
+ var wfsWriteMessage = messageSuccessWfsWrite[selectedLanguage];
+ }
+ else {
+ var wfsWriteMessage = messageErrorWfsWrite[selectedLanguage];
+ }
+
+ if (typeof(wfsWindow) != 'undefined' && !wfsWindow.closed) {
+ wfsWindow.alert(wfsWriteMessage);
+ window.setTimeout("wfsWindow.close()",0);
+ }
+ else {
+ alert(wfsWriteMessage);
+ }
+}
+// --- wfs window (begin) -----------------------------------------------------------------------------------------
+// -----------------------------------------------------------------------------------------------------------
+
+ </script>
+ </head>
+ <body onload="registerFunctions();displayButtons();">
+ <table cellpadding='0' cellspacing='0' align = center><tr><td><div id='digButtons'></div></td></tr></table>
+ <div id = 'listOfGeometries'></div>
+ </body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_displayWmc.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,47 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_displayWmc.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-
- $wmc_id = $_GET["wmc_id"];
-
- if ($wmc_id){
- require_once(dirname(__FILE__)."/../classes/class_administration.php");
- $admin = new administration();
- $wmc_gml = $admin->getWmcById($wmc_id);
-
- if ($wmc_gml){
- //Display WMC
-
- // if "short open tags" is activated, the xml output is interpreted
- // as php, because the XML begins with "<?xml "
- if (ini_get("short_open_tag") == 1) {
- echo htmlentities($wmc_gml);
- }
- else {
- header("Content-type: application/xhtml+xml; charset=".CHARSET);
- echo $wmc_gml;
- }
- }
- else{
- echo "Invalid document!";
- }
- }
-?>
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php (from rev 2140, branches/2.4.5/http/javascripts/mod_displayWmc.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_displayWmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,47 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_displayWmc.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+
+ $wmc_id = $_GET["wmc_id"];
+
+ if ($wmc_id){
+ require_once(dirname(__FILE__)."/../classes/class_administration.php");
+ $admin = new administration();
+ $wmc_gml = $admin->getWmcById($wmc_id);
+
+ if ($wmc_gml){
+ //Display WMC
+
+ // if "short open tags" is activated, the xml output is interpreted
+ // as php, because the XML begins with "<?xml "
+ if (ini_get("short_open_tag") == 1) {
+ echo htmlentities($wmc_gml);
+ }
+ else {
+ header("Content-type: application/xhtml+xml; charset=".CHARSET);
+ echo $wmc_gml;
+ }
+ }
+ else{
+ echo "Invalid document!";
+ }
+ }
+?>
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_dragMapSize.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,132 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_dragMapSize.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dragMapSize' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-echo "var mod_dragMapSize_target = '".$e_target."';";
-if($cnt > 1){
- echo "alert('dragMapSize: ID not unique!');";
-}
-?>
-var mod_dagMapSize_offset = 15;
-var mod_dagMapSize_active = false;
-mb_registerInitFunctions("mod_dragMapSize_init()");
-mb_registerSubFunctions("mod_dragMapSize_arrange()");
-
-function mod_dragMapSize_arrange(){
- var left = parseInt(document.getElementById(mod_dragMapSize_target).style.left) + parseInt(document.getElementById(mod_dragMapSize_target).style.width) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.width)/2);
- var top = parseInt(document.getElementById(mod_dragMapSize_target).style.top) + parseInt(document.getElementById(mod_dragMapSize_target).style.height) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.height)/2);
- mb_arrangeElement('','dragMapSize' , left, top);
-}
-
-function mod_dragMapSize_init(){
- var el = document.getElementById("dragMapSize");
- el.onmousedown = mod_dragMapSize_down;
- mod_dragMapSize_arrange();
-}
-
-function mod_dragMapSize_down(e){
- if(mod_dagMapSize_active == false){
- document.onmouseup = mod_dragMapSize_up;
- document.onmousemove = mod_dragMapSize_drag;
-
- mb_getMousePos(e);
- mb_start_x = clickX;
- mb_start_y = clickY;
- mb_end_x = clickX;
- mb_end_y = clickY;
- mod_dagMapSize_active = true;
-
- //create a div that catches all mouse interactions
- var dragElement = document.getElementById("dragMapSize");
- var mouseCatcher = dragElement.parentNode.appendChild(document.createElement('div'));
- mouseCatcher.setAttribute("id", "dragMapSize_helper");
- mouseCatcher.style.position = "absolute";
- mouseCatcher.style.cursor = "move";
- mouseCatcher.style.width = 500;
- mouseCatcher.style.height = 500;
- mouseCatcher.style.zIndex = 160;
- if(top.ie)
- mouseCatcher.style.background = "url(/../img/tranparent.gif)";
- mouseCatcher.style.left=clickX-250;
- mouseCatcher.style.top=clickY-250;
-
- return false;
- }
-}
-
-function mod_dragMapSize_up(e){
- document.onmouseup = null;
- document.onmousemove = null;
-
- var mouseCatcher = document.getElementById("dragMapSize_helper");
- mouseCatcher.parentNode.removeChild(mouseCatcher);
-
- mod_dagMapSize_active = false;
- mb_getMousePos(e);
- mb_end_x = clickX;
- mb_end_y = clickY;
- var ind = getMapObjIndexByName(mod_dragMapSize_target);
- var dif_x = (parseFloat(mb_end_x) - parseFloat(mb_start_x));
- var dif_y = (parseFloat(mb_end_y) - parseFloat(mb_start_y));
-
- if(parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x)<0 ||
- parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y)<0)
- {
- var dif_x = mb_start_x - (parseInt(document.getElementById('dragMapSize').style.width) / 2);
- var dif_y = mb_start_y - (parseInt(document.getElementById('dragMapSize').style.height) / 2);
- mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
- return;
- }
-
- var pos = makeClickPos2RealWorldPos(mod_dragMapSize_target, (parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x)), (parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y)));
- mb_mapObj[ind].width = parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x);
- mb_mapObj[ind].height = parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y);
- document.getElementById(mod_dragMapSize_target).style.width = mb_mapObj[ind].width;
- document.getElementById(mod_dragMapSize_target).style.height = mb_mapObj[ind].height;
- window.frames[mod_dragMapSize_target].document.getElementById("maps").style.width = mb_mapObj[ind].width;
- window.frames[mod_dragMapSize_target].document.getElementById("maps").style.height = mb_mapObj[ind].height;
- var mybbox = mb_mapObj[ind].extent.split(",");
- mb_mapObj[ind].extent = mybbox[0] + "," + pos[1] + "," + pos[0] + "," + mybbox[3];
- setMapRequest(mod_dragMapSize_target);
-}
-
-function mod_dragMapSize_drag(e){
- if(mod_dagMapSize_active){
- if (!e)
- e = window.event;
- mb_getMousePos(e);
- var dif_x = clickX - (parseInt(document.getElementById('dragMapSize').style.width)/2);
- var dif_y = clickY - (parseInt(document.getElementById('dragMapSize').style.height)/2);
- mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
- mb_arrangeElement('', "dragMapSize_helper", clickX-250, clickY-250);
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php (from rev 2181, branches/2.4.5/http/javascripts/mod_dragMapSize.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_dragMapSize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,129 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_dragMapSize.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'dragMapSize' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+echo "var mod_dragMapSize_target = '".$e_target."';";
+if($cnt > 1){
+ echo "alert('dragMapSize: ID not unique!');";
+}
+?>
+var mod_dagMapSize_offset = 15;
+var mod_dagMapSize_active = false;
+mb_registerInitFunctions("mod_dragMapSize_init()");
+mb_registerSubFunctions("mod_dragMapSize_arrange()");
+
+function mod_dragMapSize_arrange(){
+ var left = parseInt(document.getElementById(mod_dragMapSize_target).style.left) + parseInt(document.getElementById(mod_dragMapSize_target).style.width) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.width)/2);
+ var top = parseInt(document.getElementById(mod_dragMapSize_target).style.top) + parseInt(document.getElementById(mod_dragMapSize_target).style.height) + mod_dagMapSize_offset - (parseInt(document.getElementById('dragMapSize').style.height)/2);
+ mb_arrangeElement('','dragMapSize' , left, top);
+}
+
+function mod_dragMapSize_init(){
+ var el = document.getElementById("dragMapSize");
+ el.onmousedown = mod_dragMapSize_down;
+ mod_dragMapSize_arrange();
+}
+
+function mod_dragMapSize_down(e){
+ if(mod_dagMapSize_active == false){
+ document.onmouseup = mod_dragMapSize_up;
+ document.onmousemove = mod_dragMapSize_drag;
+
+ mb_getMousePos(e);
+ mb_start_x = clickX;
+ mb_start_y = clickY;
+ mb_end_x = clickX;
+ mb_end_y = clickY;
+ mod_dagMapSize_active = true;
+
+ //create a div that catches all mouse interactions
+ var dragElement = document.getElementById("dragMapSize");
+ var mouseCatcher = dragElement.parentNode.appendChild(document.createElement('div'));
+ mouseCatcher.setAttribute("id", "dragMapSize_helper");
+ mouseCatcher.style.position = "absolute";
+ mouseCatcher.style.cursor = "move";
+ mouseCatcher.style.width = 500;
+ mouseCatcher.style.height = 500;
+ mouseCatcher.style.zIndex = 160;
+ if(top.ie)
+ mouseCatcher.style.background = "url(/../img/tranparent.gif)";
+ mouseCatcher.style.left=clickX-250;
+ mouseCatcher.style.top=clickY-250;
+
+ return false;
+ }
+}
+
+function mod_dragMapSize_up(e){
+ document.onmouseup = null;
+ document.onmousemove = null;
+
+ var mouseCatcher = document.getElementById("dragMapSize_helper");
+ mouseCatcher.parentNode.removeChild(mouseCatcher);
+
+ mod_dagMapSize_active = false;
+ mb_getMousePos(e);
+ mb_end_x = clickX;
+ mb_end_y = clickY;
+ var ind = getMapObjIndexByName(mod_dragMapSize_target);
+ var dif_x = (parseFloat(mb_end_x) - parseFloat(mb_start_x));
+ var dif_y = (parseFloat(mb_end_y) - parseFloat(mb_start_y));
+
+ if(parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x)<0 ||
+ parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y)<0)
+ {
+ var dif_x = mb_start_x - (parseInt(document.getElementById('dragMapSize').style.width) / 2);
+ var dif_y = mb_start_y - (parseInt(document.getElementById('dragMapSize').style.height) / 2);
+ mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
+ return;
+ }
+
+ var pos = makeClickPos2RealWorldPos(mod_dragMapSize_target, (parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x)), (parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y)));
+ mb_mapObj[ind].width = parseFloat(mb_mapObj[ind].width) + parseFloat(dif_x);
+ mb_mapObj[ind].height = parseFloat(mb_mapObj[ind].height) + parseFloat(dif_y);
+ document.getElementById(mod_dragMapSize_target).style.width = mb_mapObj[ind].width;
+ document.getElementById(mod_dragMapSize_target).style.height = mb_mapObj[ind].height;
+ window.frames[mod_dragMapSize_target].document.getElementById("maps").style.width = mb_mapObj[ind].width;
+ window.frames[mod_dragMapSize_target].document.getElementById("maps").style.height = mb_mapObj[ind].height;
+ var mybbox = mb_mapObj[ind].extent.split(",");
+ mb_mapObj[ind].extent = mybbox[0] + "," + pos[1] + "," + pos[0] + "," + mybbox[3];
+ setMapRequest(mod_dragMapSize_target);
+}
+
+function mod_dragMapSize_drag(e){
+ if(mod_dagMapSize_active){
+ if (!e)
+ e = window.event;
+ mb_getMousePos(e);
+ var dif_x = clickX - (parseInt(document.getElementById('dragMapSize').style.width)/2);
+ var dif_y = clickY - (parseInt(document.getElementById('dragMapSize').style.height)/2);
+ mb_arrangeElement('', "dragMapSize", dif_x, dif_y);
+ mb_arrangeElement('', "dragMapSize_helper", clickX-250, clickY-250);
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_dynamicOverview.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,193 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Owsproxy
-# Module maintainer Uli
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'dynamicOverview';
-$gui_id = $_REQUEST["gui_id"];
-include '../include/dyn_js.php';
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'dynamicOverview' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('dynamicOverview: ID not unique!');";}
-echo "var mod_dynamicOverview_target = '".$e_target."';";
-
-?>
-/*
-* element_var: mod_dynamicOverview_zoomFactor (proportion between main- and overview-map)
-* element_var: mod_dynamicOverview_startExtent (startextent of the main mapframe, minx,miny,maxx,maxy commaseparated)
-* element_var: mod_dynamicOverview_wmsIndex (wms by index to calculate the maxExtent)
-* element_var: mod_dynamicOverview_useMaxExtent (consider the maxExtent for the wms in the given srs)
-*/
-try{
- if (mod_dynamicOverview_startExtent){}
-}
-catch(e){
- mod_dynamicOverview_startExtent = false;
-}
-try{
- if (mod_dynamicOverview_wmsIndex){ mod_dynamicOverview_wmsIndex = parseInt(mod_dynamicOverview_wmsIndex);}
-}
-catch(e){
- mod_dynamicOverview_wmsIndex = 0;
-}
-try{
- if (mod_dynamicOverview_useMaxExtent){}
-}
-catch(e){
- mod_dynamicOverview_useMaxExtent = false;
-}
-
-var mod_dynamicOverviewCount = 0;
-var mod_dynamicOverviewSwitch = false;
-
-mb_registerPreFunctions("mod_dynamicOverviewCalculateExtent(frameName)");
-mb_registerSubFunctions("mod_dynamicOverviewSetVisibility(frameName)");
-
-function mod_dynamicOverviewCalculateExtent(frameName){
- var arrayTargets = mod_dynamicOverview_target.split(",");
- var disty = false;
- var distx = false;
- //set extent for the main mapframe from configuration param element_var
- if(mod_dynamicOverview_startExtent && mod_dynamicOverviewCount == 0){
- mod_dynamicOverviewCount++;
- var arrayCoords = mod_dynamicOverview_startExtent.split(",");
- var minx = parseFloat(arrayCoords[0]);
- var miny = parseFloat(arrayCoords[1]);
- var maxx = parseFloat(arrayCoords[2]);
- var maxy = parseFloat(arrayCoords[3]);
- mb_calculateExtent(arrayTargets[0],minx,miny,maxx,maxy);
- }
- // read params from main-mapframe
- if(frameName == arrayTargets[0]){
- var ind = getMapObjIndexByName(frameName);
-
- // get center in coords:
- var coords = mb_mapObj[ind].extent.split(",");
- var minx = parseFloat(coords[0]);
- var miny = parseFloat(coords[1]);
- var maxx = parseFloat(coords[2]);
- var maxy = parseFloat(coords[3]);
- distx = maxx - minx;
- disty = maxy - miny;
- var centerx = minx + distx/2;
- var centery = miny + disty/2;
-
- if(mod_dynamicOverview_zoomFactor){
- mod_dynamicOverview_zoomFactor = parseFloat(mod_dynamicOverview_zoomFactor);
- minx = centerx - ((distx/2)*mod_dynamicOverview_zoomFactor);
- miny = centery - ((disty/2)*mod_dynamicOverview_zoomFactor);
- maxx = centerx + ((distx/2)*mod_dynamicOverview_zoomFactor);
- maxy = centery + ((disty/2)*mod_dynamicOverview_zoomFactor);
- distx = maxx - minx;
- disty = maxy - miny;
- }
-
- // check and set maxExtent for orverview
- if(mod_dynamicOverview_useMaxExtent){
- if(mod_dynamicOverview_useMaxExtent){
- var maxExtent = mod_dynamicOverview_useMaxExtent;
- }
- else{
- var maxExtent = mod_dynamicOverviewGetMaxExtent(wms[mod_dynamicOverview_wmsIndex], wms[0].gui_wms_epsg);
- }
- if(maxExtent){
- maxExtent = maxExtent.split(",");
- var maxMinx = parseFloat(maxExtent[0]);
- var maxMiny = parseFloat(maxExtent[1]);
- var maxMaxx = parseFloat(maxExtent[2]);
- var maxMaxy = parseFloat(maxExtent[3]);
- var maxDistx = maxMaxx - maxMinx;
- var maxDisty = maxMaxy - maxMiny;
-
- if(distx && disty && (distx > maxDistx || disty > maxDisty)){
- minx = maxMinx;
- miny = maxMiny;
- maxx = maxMaxx;
- maxy = maxMaxy;
- }
- }
- }
- //check and set minExtent for overview
- var newMinExt = mod_dynamicOverviewCheckDiagonal(arrayTargets[1], minx,miny, maxx, maxy);
- if(newMinExt){
-// console.log("newMin: "+newMinExt);
- var minCoords = newMinExt.split(",");
- minx = parseFloat(minCoords[0]);
- miny = parseFloat(minCoords[1]);
- maxx = parseFloat(minCoords[2]);
- maxy = parseFloat(minCoords[3]);
- }
- mb_calculateExtent(arrayTargets[1],minx,miny,maxx,maxy)
- zoom(arrayTargets[1],true, 1.0);
- }
- else if(frameName == arrayTargets[1]){
- //switch hidden wms to visible
- if(wms[mod_dynamicOverview_wmsIndex].gui_wms_visible != 1){
- mod_dynamicOverviewSwitch = wms[mod_dynamicOverview_wmsIndex].gui_wms_visible;
- wms[mod_dynamicOverview_wmsIndex].gui_wms_visible = 1;
- }
- }
-}
-function mod_dynamicOverviewCheckDiagonal(frameName, minx,miny, maxx, maxy){
- var r = false;
- var ind = getMapObjIndexByName(frameName);
- var distx = maxx-minx;
- var disty = maxy-miny;
- var centerx = minx + distx/2;
- var centery = miny + distx/2;
- var xPerPix = distx/mb_mapObj[ind].width;
- var yPerPix = disty/mb_mapObj[ind].height;
- var d = Math.sqrt(Math.pow(xPerPix,2)+Math.pow(yPerPix,2));
- if(mod_dynamicOverview_minScale && mod_dynamicOverview_minScale > d){
- var newDistx = Math.sqrt(Math.pow((mod_dynamicOverview_minScale),2)/2)*mb_mapObj[ind].width;
-// console.log(newDistx);
- minx = centerx - newDistx/2;
- maxx = centerx + newDistx/2;
- miny = centery - newDistx/2;
- maxy = centery + newDistx/2;
- r = minx + ","+ miny + "," + maxx + "," + maxy;
- }
- return r;
-}
-function mod_dynamicOverviewSetVisibility(frameName){
- var arrayTargets = mod_dynamicOverview_target.split(",");
- if(mod_dynamicOverviewSwitch && frameName == arrayTargets[1]){
- wms[mod_dynamicOverview_wmsIndex].gui_wms_visible = mod_dynamicOverviewSwitch;
-
- }
-}
-function mod_dynamicOverviewGetMaxExtent(wms, srs){
- var re = false;
- for(var i=0; i<wms.gui_epsg.length; i++){
- if(srs == wms.gui_epsg[i]){
- var re = wms.gui_minx[i] +","+ wms.gui_miny[i] +","+ wms.gui_maxx[i] +","+ wms.gui_maxy[i];
-// window.console.log(re);
- }
- }
- return re;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php (from rev 2181, branches/2.4.5/http/javascripts/mod_dynamicOverview.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_dynamicOverview.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,192 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Owsproxy
+# Module maintainer Uli
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$e_id_css = 'dynamicOverview';
+include '../include/dyn_js.php';
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'dynamicOverview' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('dynamicOverview: ID not unique!');";}
+echo "var mod_dynamicOverview_target = '".$e_target."';";
+
+?>
+/*
+* element_var: mod_dynamicOverview_zoomFactor (proportion between main- and overview-map)
+* element_var: mod_dynamicOverview_startExtent (startextent of the main mapframe, minx,miny,maxx,maxy commaseparated)
+* element_var: mod_dynamicOverview_wmsIndex (wms by index to calculate the maxExtent)
+* element_var: mod_dynamicOverview_useMaxExtent (consider the maxExtent for the wms in the given srs)
+*/
+try{
+ if (mod_dynamicOverview_startExtent){}
+}
+catch(e){
+ mod_dynamicOverview_startExtent = false;
+}
+try{
+ if (mod_dynamicOverview_wmsIndex){ mod_dynamicOverview_wmsIndex = parseInt(mod_dynamicOverview_wmsIndex);}
+}
+catch(e){
+ mod_dynamicOverview_wmsIndex = 0;
+}
+try{
+ if (mod_dynamicOverview_useMaxExtent){}
+}
+catch(e){
+ mod_dynamicOverview_useMaxExtent = false;
+}
+
+var mod_dynamicOverviewCount = 0;
+var mod_dynamicOverviewSwitch = false;
+
+mb_registerPreFunctions("mod_dynamicOverviewCalculateExtent(frameName)");
+mb_registerSubFunctions("mod_dynamicOverviewSetVisibility(frameName)");
+
+function mod_dynamicOverviewCalculateExtent(frameName){
+ var arrayTargets = mod_dynamicOverview_target.split(",");
+ var disty = false;
+ var distx = false;
+ //set extent for the main mapframe from configuration param element_var
+ if(mod_dynamicOverview_startExtent && mod_dynamicOverviewCount == 0){
+ mod_dynamicOverviewCount++;
+ var arrayCoords = mod_dynamicOverview_startExtent.split(",");
+ var minx = parseFloat(arrayCoords[0]);
+ var miny = parseFloat(arrayCoords[1]);
+ var maxx = parseFloat(arrayCoords[2]);
+ var maxy = parseFloat(arrayCoords[3]);
+ mb_calculateExtent(arrayTargets[0],minx,miny,maxx,maxy);
+ }
+ // read params from main-mapframe
+ if(frameName == arrayTargets[0]){
+ var ind = getMapObjIndexByName(frameName);
+
+ // get center in coords:
+ var coords = mb_mapObj[ind].extent.split(",");
+ var minx = parseFloat(coords[0]);
+ var miny = parseFloat(coords[1]);
+ var maxx = parseFloat(coords[2]);
+ var maxy = parseFloat(coords[3]);
+ distx = maxx - minx;
+ disty = maxy - miny;
+ var centerx = minx + distx/2;
+ var centery = miny + disty/2;
+
+ if(mod_dynamicOverview_zoomFactor){
+ mod_dynamicOverview_zoomFactor = parseFloat(mod_dynamicOverview_zoomFactor);
+ minx = centerx - ((distx/2)*mod_dynamicOverview_zoomFactor);
+ miny = centery - ((disty/2)*mod_dynamicOverview_zoomFactor);
+ maxx = centerx + ((distx/2)*mod_dynamicOverview_zoomFactor);
+ maxy = centery + ((disty/2)*mod_dynamicOverview_zoomFactor);
+ distx = maxx - minx;
+ disty = maxy - miny;
+ }
+
+ // check and set maxExtent for orverview
+ if(mod_dynamicOverview_useMaxExtent){
+ if(mod_dynamicOverview_useMaxExtent){
+ var maxExtent = mod_dynamicOverview_useMaxExtent;
+ }
+ else{
+ var maxExtent = mod_dynamicOverviewGetMaxExtent(wms[mod_dynamicOverview_wmsIndex], wms[0].gui_wms_epsg);
+ }
+ if(maxExtent){
+ maxExtent = maxExtent.split(",");
+ var maxMinx = parseFloat(maxExtent[0]);
+ var maxMiny = parseFloat(maxExtent[1]);
+ var maxMaxx = parseFloat(maxExtent[2]);
+ var maxMaxy = parseFloat(maxExtent[3]);
+ var maxDistx = maxMaxx - maxMinx;
+ var maxDisty = maxMaxy - maxMiny;
+
+ if(distx && disty && (distx > maxDistx || disty > maxDisty)){
+ minx = maxMinx;
+ miny = maxMiny;
+ maxx = maxMaxx;
+ maxy = maxMaxy;
+ }
+ }
+ }
+ //check and set minExtent for overview
+ var newMinExt = mod_dynamicOverviewCheckDiagonal(arrayTargets[1], minx,miny, maxx, maxy);
+ if(newMinExt){
+// console.log("newMin: "+newMinExt);
+ var minCoords = newMinExt.split(",");
+ minx = parseFloat(minCoords[0]);
+ miny = parseFloat(minCoords[1]);
+ maxx = parseFloat(minCoords[2]);
+ maxy = parseFloat(minCoords[3]);
+ }
+ mb_calculateExtent(arrayTargets[1],minx,miny,maxx,maxy)
+ zoom(arrayTargets[1],true, 1.0);
+ }
+ else if(frameName == arrayTargets[1]){
+ //switch hidden wms to visible
+ if(wms[mod_dynamicOverview_wmsIndex].gui_wms_visible != 1){
+ mod_dynamicOverviewSwitch = wms[mod_dynamicOverview_wmsIndex].gui_wms_visible;
+ wms[mod_dynamicOverview_wmsIndex].gui_wms_visible = 1;
+ }
+ }
+}
+function mod_dynamicOverviewCheckDiagonal(frameName, minx,miny, maxx, maxy){
+ var r = false;
+ var ind = getMapObjIndexByName(frameName);
+ var distx = maxx-minx;
+ var disty = maxy-miny;
+ var centerx = minx + distx/2;
+ var centery = miny + distx/2;
+ var xPerPix = distx/mb_mapObj[ind].width;
+ var yPerPix = disty/mb_mapObj[ind].height;
+ var d = Math.sqrt(Math.pow(xPerPix,2)+Math.pow(yPerPix,2));
+ if(mod_dynamicOverview_minScale && mod_dynamicOverview_minScale > d){
+ var newDistx = Math.sqrt(Math.pow((mod_dynamicOverview_minScale),2)/2)*mb_mapObj[ind].width;
+// console.log(newDistx);
+ minx = centerx - newDistx/2;
+ maxx = centerx + newDistx/2;
+ miny = centery - newDistx/2;
+ maxy = centery + newDistx/2;
+ r = minx + ","+ miny + "," + maxx + "," + maxy;
+ }
+ return r;
+}
+function mod_dynamicOverviewSetVisibility(frameName){
+ var arrayTargets = mod_dynamicOverview_target.split(",");
+ if(mod_dynamicOverviewSwitch && frameName == arrayTargets[1]){
+ wms[mod_dynamicOverview_wmsIndex].gui_wms_visible = mod_dynamicOverviewSwitch;
+
+ }
+}
+function mod_dynamicOverviewGetMaxExtent(wms, srs){
+ var re = false;
+ for(var i=0; i<wms.gui_epsg.length; i++){
+ if(srs == wms.gui_epsg[i]){
+ var re = wms.gui_minx[i] +","+ wms.gui_miny[i] +","+ wms.gui_maxx[i] +","+ wms.gui_maxy[i];
+// window.console.log(re);
+ }
+ }
+ return re;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_embedded_legend.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,71 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_embedded_legend.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Legend</title>
-<?php
-
-$gui_id = $_SESSION["mb_user_gui"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-include_once '../include/dyn_css.php';
-
-$sql = "SELECT DISTINCT e_target, e_width, e_height FROM gui_element WHERE e_id = 'legend_embedded' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('legend: ID not unique!');";
-}
-#target position, with and height...
-$sql = "SELECT e_left,e_top,e_width,e_height FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-echo "<script type='text/javascript'>";
-echo "var mod_legend_target = '".$e_target."';";
-echo "var mod_legend_target_left = ".db_result($res,0,"e_left").";";
-echo "var mod_legend_target_top = ".db_result($res,0,"e_top").";";
-echo "var mod_legend_target_width = ".db_result($res,0,"e_width").";";
-echo "var mod_legend_target_height = ".db_result($res,0,"e_height").";";
-
-echo "</script>";
-?>
-</head>
-<body onload='mod_legend_init()'>
-<form><span class='switch'>Legende ON/OFF<input type='checkbox' name='sw' onclick='mod_legend_repaint(this)'></span></form>
-<div name='leg' id='leg'></div>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php (from rev 2140, branches/2.4.5/http/javascripts/mod_embedded_legend.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_embedded_legend.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,70 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_embedded_legend.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Legend</title>
+<?php
+
+$gui_id = $_SESSION["mb_user_gui"];
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+include_once '../include/dyn_css.php';
+
+$sql = "SELECT DISTINCT e_target, e_width, e_height FROM gui_element WHERE e_id = 'legend_embedded' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('legend: ID not unique!');";
+}
+#target position, with and height...
+$sql = "SELECT e_left,e_top,e_width,e_height FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+echo "<script type='text/javascript'>";
+echo "var mod_legend_target = '".$e_target."';";
+echo "var mod_legend_target_left = ".db_result($res,0,"e_left").";";
+echo "var mod_legend_target_top = ".db_result($res,0,"e_top").";";
+echo "var mod_legend_target_width = ".db_result($res,0,"e_width").";";
+echo "var mod_legend_target_height = ".db_result($res,0,"e_height").";";
+
+echo "</script>";
+?>
+</head>
+<body onload='mod_legend_init()'>
+<form><span class='switch'>Legende ON/OFF<input type='checkbox' name='sw' onclick='mod_legend_repaint(this)'></span></form>
+<div name='leg' id='leg'></div>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_export_image.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_export_image.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_export_image.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,256 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_export_image.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Druck</title>
-</head>
-<style type="text/css">
-<!--
-
-select{
- width:180px;
-}
-.textField{
- width: 180px;
-}
-body{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
-}
--->
-</style>
-<?php
-/******Name of this module**************/
-$mb_module_id = "print1";
-/**********************************/
-include(dirname(__FILE__)."/../../conf/print.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
-$v = array($mb_module_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-
-echo "<script type='text/javascript'>";
-#echo "var mb_user_resolution = ".$_SESSION["mb_user_resolution"]." / 2.54;";
-echo "var deformation = ".$deformation.";";
-#echo "var DPC = 28.35 * deformation;";
-echo "var DPC = 28.35;";
-echo "var a4_width = " . $a4_width . " * DPC;";
-echo "var a4_height = " . $a4_height . " * DPC;";
-echo "var a3_width = " . $a3_width . " * DPC;";
-echo "var a3_height = " . $a3_height . " * DPC;";
-
-
-echo "var border_Portrait_a4_left = " . $border_Portrait_a4_left . " * DPC;";
-echo "var border_Portrait_a4_top = " . $border_Portrait_a4_top . " * DPC;";
-echo "var border_Portrait_a4_right = " . $border_Portrait_a4_right . " * DPC;";
-echo "var border_Portrait_a4_bottom = " . $border_Portrait_a4_bottom . " * DPC;";
-echo "var header_Portrait_a4_height = " . $header_Portrait_a4_height . " * DPC;";
-
-echo "var border_Landscape_a4_left = " . $border_Landscape_a4_left . " * DPC;";
-echo "var border_Landscape_a4_top = " . $border_Landscape_a4_top . " * DPC;";
-echo "var border_Landscape_a4_right = " . $border_Landscape_a4_right . " * DPC;";
-echo "var border_Landscape_a4_bottom = " . $border_Landscape_a4_bottom . " * DPC;";
-echo "var header_Landscape_a4_height = " . $header_Landscape_a4_height . " * DPC;";
-
-echo "var border_Portrait_a3_left = " . $border_Portrait_a3_left . " * DPC;";
-echo "var border_Portrait_a3_top = " . $border_Portrait_a3_top . " * DPC;";
-echo "var border_Portrait_a3_right = " . $border_Portrait_a3_right . " * DPC;";
-echo "var border_Portrait_a3_bottom = " . $border_Portrait_a3_bottom . " * DPC;";
-echo "var header_Portrait_a3_height = " . $header_Portrait_a3_height . " * DPC;";
-
-echo "var border_Landscape_a3_left = " . $border_Landscape_a3_left . " * DPC;";
-echo "var border_Landscape_a3_top = " . $border_Landscape_a3_top . " * DPC;";
-echo "var border_Landscape_a3_right = " . $border_Landscape_a3_right . " * DPC;";
-echo "var border_Landscape_a3_bottom = " . $border_Landscape_a3_bottom . " * DPC;";
-echo "var header_Landscape_a3_height = " . $header_Landscape_a3_height . " * DPC;";
-
-echo "var mod_print1_target = '".db_result($res,0,"e_target")."';";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-/******PARAMS********************/
-var mb_resolution = null;
-var ind_size = null;
-var ind_format = null;
-
-/**END*PARAMS********************/
-
-function validate(){
- //window.opener.mb_resolution = DPC;
- ind_size = document.form1.size.selectedIndex;
- ind_format = document.form1.format.selectedIndex;
-
- if(ind_size != 0 && ind_format != 0){
- var ind = window.opener.getMapObjIndexByName(mod_print1_target);
- var coord = window.opener.mb_mapObj[ind].extent.split(",");
- var centerX = parseInt(coord[0]) + (parseInt(coord[2]) - parseInt(coord[0]))/2
- var centerY = parseInt(coord[1]) + (parseInt(coord[3]) - parseInt(coord[1]))/2
- if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "portrait"){
- document.form1.page_width.value = a4_width;
- document.form1.page_height.value = a4_height;
- document.form1.printOffset_left.value = border_Portrait_a4_left;
- document.form1.printOffset_top.value = border_Portrait_a4_top;
- document.form1.map_width.value = Math.round(a4_width - border_Portrait_a4_left - border_Portrait_a4_right);
- document.form1.map_height.value = Math.round(a4_height - border_Portrait_a4_top - border_Portrait_a4_bottom - header_Portrait_a4_height);
- document.form1.header_height.value = header_Portrait_a4_height;
- }
- if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "landscape"){
- document.form1.page_width.value = a4_height;
- document.form1.page_height.value = a4_width;
- document.form1.printOffset_left.value = border_Landscape_a4_left;
- document.form1.printOffset_top.value = border_Landscape_a4_top;
- document.form1.map_width.value = Math.round(a4_height - border_Landscape_a4_left - border_Landscape_a4_right);
- document.form1.map_height.value = Math.round(a4_width - border_Landscape_a4_top - border_Landscape_a4_bottom - header_Landscape_a4_height);
- document.form1.header_height.value = header_Landscape_a4_height;
- }
- if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "portrait"){
- document.form1.page_width.value = a3_width;
- document.form1.page_height.value = a3_height;
- document.form1.printOffset_left.value = border_Portrait_a3_left;
- document.form1.printOffset_top.value = border_Portrait_a3_top;
- document.form1.map_width.value = Math.round(a3_width - border_Portrait_a3_left - border_Portrait_a3_right);
- document.form1.map_height.value = Math.round(a3_height - border_Portrait_a3_top - border_Portrait_a3_bottom - header_Portrait_a3_height);
- document.form1.header_height.value = header_Portrait_a3_height;
- }
- if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "landscape"){
- document.form1.page_width.value = a3_height;
- document.form1.page_height.value = a3_width;
- document.form1.printOffset_left.value = border_Landscape_a3_left;
- document.form1.printOffset_top.value = border_Landscape_a3_top;
- document.form1.map_width.value = Math.round(a3_height - border_Landscape_a3_left - border_Landscape_a3_right);
- document.form1.map_height.value = Math.round(a3_width - border_Landscape_a3_top - border_Landscape_a3_bottom - header_Landscape_a3_height);
- document.form1.header_height.value = header_Landscape_a3_height;
- }
- var pos = window.opener.makeClickPos2RealWorldPos(mod_print1_target, document.form1.map_width.value , document.form1.map_height.value );
- window.opener.mb_mapObj[ind].width = document.form1.map_width.value;
- window.opener.mb_mapObj[ind].height = document.form1.map_height.value;
- window.opener.document.getElementById(mod_print1_target).style.width = document.form1.map_width.value;
- window.opener.document.getElementById(mod_print1_target).style.height = document.form1.map_height.value;
- window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.width = document.form1.map_width.value;
- window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.height = document.form1.map_height.value;
-
- window.opener.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
- window.opener.setMapRequest(mod_print1_target);
- }
-}
-function refreshParams(){
- var ind = window.opener.getMapObjIndexByName(mod_print1_target);
- document.form1.map_url.value = "";
- var cnt_urls = 0;
- for(var i=0; i<window.opener.mb_mapObj[ind].wms.length; i++){
- if(window.opener.mb_mapObj[ind].wms[i].mapURL != false){
- if(cnt_urls > 0){
- document.form1.map_url.value += "###";
- }
- if(window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(0) == '/' && window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(1) == 'c'){
- document.form1.map_url.value += 'http://localhost' + window.opener.mb_mapObj[ind].wms[i].mapURL;
- }
- else{
- document.form1.map_url.value += window.opener.mb_mapObj[ind].wms[i].mapURL;
- }
- cnt_urls++;
- }
- }
- document.form1.map_extent.value = window.opener.mb_mapObj[ind].extent;
- document.form1.map_scale.value = window.opener.mb_getScale(mod_print1_target);
-}
-function printMap(){
- // if(ind_size > 0 && ind_format >0){
- refreshParams();
- document.form1.submit();
- //disablePrinting();
- //}
- //else{
- // alert("Das Format ist noch nicht ausgewählt.");
- //}
- // window.opener.mod_back_set();
-}
-function disablePrinting(){
- //window.opener.mb_resolution = mb_user_resolution;
- window.close();
-}
-// -->
-</script>
-<body onunload="disablePrinting()">
-<form name='form1' method='POST' action='../php/mod_export_image.php?<?php echo SID; ?>' >
-<table border='0'>
-<tr>
- <td align="center">
- <table border='0'>
- <tr>
- <td class="text">
- Vergrößerungsfaktor
- </td>
- </tr>
- <tr>
- <td>
-
- <select name='quality'>
- <option value='1'>gering</option>
- <option value='2'>mittel</option>
- <option value='4'>hoch</option>
- <option value='16.6'>sehr hoch</option>
- <!-- <option value='<?php #echo $printFactor; ?>'>hoch</option> -->
- </select>
- </td>
-</tr>
-
-<tr>
- <td>
- <input type='button' class="button" name='print' value="Speichern" onclick='printMap()'>
- </td>
-</tr>
-<tr>
- <td>
-
- </td>
-</tr>
-
-</table>
-</table>
-<input type='hidden' name='printOffset_left' value=''>
-<input type='hidden' name='printOffset_top' value=''>
-<input type='hidden' name='map_width' value=''>
-<input type='hidden' name='map_height' value=''>
-<input type='hidden' name='page_width' value=''>
-<input type='hidden' name='page_height' value=''>
-<input type='hidden' name='header_height' value=''>
-<input type='hidden' name='map_url' value=''>
-<input type='hidden' name='map_extent' value=''>
-<input type='hidden' name='map_scale' value=''>
-<!-- <input type='hidden' name='footer' value='<?php echo $footer ?>'> -->
-
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_export_image.php (from rev 2140, branches/2.4.5/http/javascripts/mod_export_image.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_export_image.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_export_image.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,256 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_export_image.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Druck</title>
+</head>
+<style type="text/css">
+<!--
+
+select{
+ width:180px;
+}
+.textField{
+ width: 180px;
+}
+body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+-->
+</style>
+<?php
+/******Name of this module**************/
+$mb_module_id = "print1";
+/**********************************/
+include(dirname(__FILE__)."/../../conf/print.conf");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
+$v = array($mb_module_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+
+echo "<script type='text/javascript'>";
+#echo "var mb_user_resolution = ".$_SESSION["mb_user_resolution"]." / 2.54;";
+echo "var deformation = ".$deformation.";";
+#echo "var DPC = 28.35 * deformation;";
+echo "var DPC = 28.35;";
+echo "var a4_width = " . $a4_width . " * DPC;";
+echo "var a4_height = " . $a4_height . " * DPC;";
+echo "var a3_width = " . $a3_width . " * DPC;";
+echo "var a3_height = " . $a3_height . " * DPC;";
+
+
+echo "var border_Portrait_a4_left = " . $border_Portrait_a4_left . " * DPC;";
+echo "var border_Portrait_a4_top = " . $border_Portrait_a4_top . " * DPC;";
+echo "var border_Portrait_a4_right = " . $border_Portrait_a4_right . " * DPC;";
+echo "var border_Portrait_a4_bottom = " . $border_Portrait_a4_bottom . " * DPC;";
+echo "var header_Portrait_a4_height = " . $header_Portrait_a4_height . " * DPC;";
+
+echo "var border_Landscape_a4_left = " . $border_Landscape_a4_left . " * DPC;";
+echo "var border_Landscape_a4_top = " . $border_Landscape_a4_top . " * DPC;";
+echo "var border_Landscape_a4_right = " . $border_Landscape_a4_right . " * DPC;";
+echo "var border_Landscape_a4_bottom = " . $border_Landscape_a4_bottom . " * DPC;";
+echo "var header_Landscape_a4_height = " . $header_Landscape_a4_height . " * DPC;";
+
+echo "var border_Portrait_a3_left = " . $border_Portrait_a3_left . " * DPC;";
+echo "var border_Portrait_a3_top = " . $border_Portrait_a3_top . " * DPC;";
+echo "var border_Portrait_a3_right = " . $border_Portrait_a3_right . " * DPC;";
+echo "var border_Portrait_a3_bottom = " . $border_Portrait_a3_bottom . " * DPC;";
+echo "var header_Portrait_a3_height = " . $header_Portrait_a3_height . " * DPC;";
+
+echo "var border_Landscape_a3_left = " . $border_Landscape_a3_left . " * DPC;";
+echo "var border_Landscape_a3_top = " . $border_Landscape_a3_top . " * DPC;";
+echo "var border_Landscape_a3_right = " . $border_Landscape_a3_right . " * DPC;";
+echo "var border_Landscape_a3_bottom = " . $border_Landscape_a3_bottom . " * DPC;";
+echo "var header_Landscape_a3_height = " . $header_Landscape_a3_height . " * DPC;";
+
+echo "var mod_print1_target = '".db_result($res,0,"e_target")."';";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+/******PARAMS********************/
+var mb_resolution = null;
+var ind_size = null;
+var ind_format = null;
+
+/**END*PARAMS********************/
+
+function validate(){
+ //window.opener.mb_resolution = DPC;
+ ind_size = document.form1.size.selectedIndex;
+ ind_format = document.form1.format.selectedIndex;
+
+ if(ind_size != 0 && ind_format != 0){
+ var ind = window.opener.getMapObjIndexByName(mod_print1_target);
+ var coord = window.opener.mb_mapObj[ind].extent.split(",");
+ var centerX = parseInt(coord[0]) + (parseInt(coord[2]) - parseInt(coord[0]))/2
+ var centerY = parseInt(coord[1]) + (parseInt(coord[3]) - parseInt(coord[1]))/2
+ if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "portrait"){
+ document.form1.page_width.value = a4_width;
+ document.form1.page_height.value = a4_height;
+ document.form1.printOffset_left.value = border_Portrait_a4_left;
+ document.form1.printOffset_top.value = border_Portrait_a4_top;
+ document.form1.map_width.value = Math.round(a4_width - border_Portrait_a4_left - border_Portrait_a4_right);
+ document.form1.map_height.value = Math.round(a4_height - border_Portrait_a4_top - border_Portrait_a4_bottom - header_Portrait_a4_height);
+ document.form1.header_height.value = header_Portrait_a4_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "landscape"){
+ document.form1.page_width.value = a4_height;
+ document.form1.page_height.value = a4_width;
+ document.form1.printOffset_left.value = border_Landscape_a4_left;
+ document.form1.printOffset_top.value = border_Landscape_a4_top;
+ document.form1.map_width.value = Math.round(a4_height - border_Landscape_a4_left - border_Landscape_a4_right);
+ document.form1.map_height.value = Math.round(a4_width - border_Landscape_a4_top - border_Landscape_a4_bottom - header_Landscape_a4_height);
+ document.form1.header_height.value = header_Landscape_a4_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "portrait"){
+ document.form1.page_width.value = a3_width;
+ document.form1.page_height.value = a3_height;
+ document.form1.printOffset_left.value = border_Portrait_a3_left;
+ document.form1.printOffset_top.value = border_Portrait_a3_top;
+ document.form1.map_width.value = Math.round(a3_width - border_Portrait_a3_left - border_Portrait_a3_right);
+ document.form1.map_height.value = Math.round(a3_height - border_Portrait_a3_top - border_Portrait_a3_bottom - header_Portrait_a3_height);
+ document.form1.header_height.value = header_Portrait_a3_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "landscape"){
+ document.form1.page_width.value = a3_height;
+ document.form1.page_height.value = a3_width;
+ document.form1.printOffset_left.value = border_Landscape_a3_left;
+ document.form1.printOffset_top.value = border_Landscape_a3_top;
+ document.form1.map_width.value = Math.round(a3_height - border_Landscape_a3_left - border_Landscape_a3_right);
+ document.form1.map_height.value = Math.round(a3_width - border_Landscape_a3_top - border_Landscape_a3_bottom - header_Landscape_a3_height);
+ document.form1.header_height.value = header_Landscape_a3_height;
+ }
+ var pos = window.opener.makeClickPos2RealWorldPos(mod_print1_target, document.form1.map_width.value , document.form1.map_height.value );
+ window.opener.mb_mapObj[ind].width = document.form1.map_width.value;
+ window.opener.mb_mapObj[ind].height = document.form1.map_height.value;
+ window.opener.document.getElementById(mod_print1_target).style.width = document.form1.map_width.value;
+ window.opener.document.getElementById(mod_print1_target).style.height = document.form1.map_height.value;
+ window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.width = document.form1.map_width.value;
+ window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.height = document.form1.map_height.value;
+
+ window.opener.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
+ window.opener.setMapRequest(mod_print1_target);
+ }
+}
+function refreshParams(){
+ var ind = window.opener.getMapObjIndexByName(mod_print1_target);
+ document.form1.map_url.value = "";
+ var cnt_urls = 0;
+ for(var i=0; i<window.opener.mb_mapObj[ind].wms.length; i++){
+ if(window.opener.mb_mapObj[ind].wms[i].mapURL != false){
+ if(cnt_urls > 0){
+ document.form1.map_url.value += "###";
+ }
+ if(window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(0) == '/' && window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(1) == 'c'){
+ document.form1.map_url.value += 'http://localhost' + window.opener.mb_mapObj[ind].wms[i].mapURL;
+ }
+ else{
+ document.form1.map_url.value += window.opener.mb_mapObj[ind].wms[i].mapURL;
+ }
+ cnt_urls++;
+ }
+ }
+ document.form1.map_extent.value = window.opener.mb_mapObj[ind].extent;
+ document.form1.map_scale.value = window.opener.mb_getScale(mod_print1_target);
+}
+function printMap(){
+ // if(ind_size > 0 && ind_format >0){
+ refreshParams();
+ document.form1.submit();
+ //disablePrinting();
+ //}
+ //else{
+ // alert("Das Format ist noch nicht ausgew�hlt.");
+ //}
+ // window.opener.mod_back_set();
+}
+function disablePrinting(){
+ //window.opener.mb_resolution = mb_user_resolution;
+ window.close();
+}
+// -->
+</script>
+<body onunload="disablePrinting()">
+<form name='form1' method='POST' action='../php/mod_export_image.php?<?php echo SID; ?>' >
+<table border='0'>
+<tr>
+ <td align="center">
+ <table border='0'>
+ <tr>
+ <td class="text">
+ Vergr��erungsfaktor
+ </td>
+ </tr>
+ <tr>
+ <td>
+
+ <select name='quality'>
+ <option value='1'>gering</option>
+ <option value='2'>mittel</option>
+ <option value='4'>hoch</option>
+ <option value='16.6'>sehr hoch</option>
+ <!-- <option value='<?php #echo $printFactor; ?>'>hoch</option> -->
+ </select>
+ </td>
+</tr>
+
+<tr>
+ <td>
+ <input type='button' class="button" name='print' value="Speichern" onclick='printMap()'>
+ </td>
+</tr>
+<tr>
+ <td>
+
+ </td>
+</tr>
+
+</table>
+</table>
+<input type='hidden' name='printOffset_left' value=''>
+<input type='hidden' name='printOffset_top' value=''>
+<input type='hidden' name='map_width' value=''>
+<input type='hidden' name='map_height' value=''>
+<input type='hidden' name='page_width' value=''>
+<input type='hidden' name='page_height' value=''>
+<input type='hidden' name='header_height' value=''>
+<input type='hidden' name='map_url' value=''>
+<input type='hidden' name='map_extent' value=''>
+<input type='hidden' name='map_scale' value=''>
+<!-- <input type='hidden' name='footer' value='<?php echo $footer ?>'> -->
+
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_featureInfo.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,73 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_featureInfo.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfo1' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('featureInfo1: ID not unique!');";}
-?>
-var mod_featureInfo_elName = "featureInfo1";
-var mod_featureInfo_frameName = "";
-var mod_featureInfo_target = "<?php echo $e_target; ?>";
-
-var mod_featureInfo_img_on = new Image(); mod_featureInfo_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_featureInfo_img_off = new Image(); mod_featureInfo_img_off.src ="<?php echo $e_src; ?>";
-var mod_featureInfo_img_over = new Image(); mod_featureInfo_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_featureInfo1(ind){
- mb_button[ind] = document.getElementById(mod_featureInfo_elName);
- mb_button[ind].img_over = mod_featureInfo_img_over.src;
- mb_button[ind].img_on = mod_featureInfo_img_on.src;
- mb_button[ind].img_off = mod_featureInfo_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_featureInfo_elName;
- mb_button[ind].fName = mod_featureInfo_frameName;
- mb_button[ind].go = new Function ("mod_featureInfo_click()");
- mb_button[ind].stop = new Function ("mod_featureInfo_disable()");
-}
-function mod_featureInfo_click(){
- window.frames[mod_featureInfo_target].document.onclick = mod_featureInfo_event;
-}
-function mod_featureInfo_disable(){
- window.frames[mod_featureInfo_target].document.onclick = null;
-}
-function mod_featureInfo_event(e){
- if(ie){
- clickX = window.frames[mod_featureInfo_target].event.clientX;
- clickY = window.frames[mod_featureInfo_target].event.clientY;
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- setFeatureInfoRequest(mod_featureInfo_target,clickX,clickY);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php (from rev 2181, branches/2.4.5/http/javascripts/mod_featureInfo.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfo.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,69 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_featureInfo.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfo1' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('featureInfo1: ID not unique!');";}
+?>
+var mod_featureInfo_elName = "featureInfo1";
+var mod_featureInfo_frameName = "";
+var mod_featureInfo_target = "<?php echo $e_target; ?>";
+
+var mod_featureInfo_img_on = new Image(); mod_featureInfo_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_featureInfo_img_off = new Image(); mod_featureInfo_img_off.src ="<?php echo $e_src; ?>";
+var mod_featureInfo_img_over = new Image(); mod_featureInfo_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_featureInfo1(ind){
+ mb_button[ind] = document.getElementById(mod_featureInfo_elName);
+ mb_button[ind].img_over = mod_featureInfo_img_over.src;
+ mb_button[ind].img_on = mod_featureInfo_img_on.src;
+ mb_button[ind].img_off = mod_featureInfo_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_featureInfo_elName;
+ mb_button[ind].fName = mod_featureInfo_frameName;
+ mb_button[ind].go = new Function ("mod_featureInfo_click()");
+ mb_button[ind].stop = new Function ("mod_featureInfo_disable()");
+}
+function mod_featureInfo_click(){
+ window.frames[mod_featureInfo_target].document.onclick = mod_featureInfo_event;
+}
+function mod_featureInfo_disable(){
+ window.frames[mod_featureInfo_target].document.onclick = null;
+}
+function mod_featureInfo_event(e){
+ if(ie){
+ clickX = window.frames[mod_featureInfo_target].event.clientX;
+ clickY = window.frames[mod_featureInfo_target].event.clientY;
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ setFeatureInfoRequest(mod_featureInfo_target,clickX,clickY);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_featureInfoRedirect.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,67 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_featureInfoRedirect.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-?>
-
-/*
-* sticky IFRAME, right from the main mapframe "mapframe1"
-*/
-
-mb_registerSubFunctions("mod_featureInfoRedirect_position()");
-mb_registerFeatureInfoPreFunctions("mod_featureInfoRedirect_set(fName)");
-
-function mod_featureInfoRedirect_set(fName){
- var ind = getMapObjIndexByName("mapframe1");
- var res = new Array();
- for(var i=0; i<mb_mapObj[ind].wms.length; i++){
- if(mb_mapObj[ind].querylayers[i] != ""){
- res[res.length] = mb_mapObj[ind].wms[i].wms_id;
- }
- }
-
- var newWin = document.getElementById("FeatureInfoRedirect").style;
- var width = parseInt(newWin.width);
- var height = parseInt(newWin.height) / res.length;
-
- window.frames["FeatureInfoRedirect"].document.open("text/html");
- for(i=0; i<res.length; i++){
- var top = i * height;
- window.frames["FeatureInfoRedirect"].document.write("<iframe src='' id='"+res[i]+"' style='position:absolute;top:"+top+"px;left:0px;width:"+width+"px;height:"+height+"px' frameborder='0'></iframe>");
- }
- window.frames["FeatureInfoRedirect"].document.close();
-}
-
-function mod_featureInfoRedirect_position(){
- var leftOffset = 10;
- var borderOffset = 10;
- var width = 450;
-
- var newWin = document.getElementById("FeatureInfoRedirect").style;
- var mapframe = document.getElementById("mapframe1").style;
-
- newWin.left = parseInt(mapframe.left) + parseInt(mapframe.width) + leftOffset;
- newWin.top = parseInt(mapframe.top) - borderOffset;
- newWin.width = width;
- newWin.height = parseInt(mapframe.height) + 2 * borderOffset;
-
- var resWin = window.frames["FeatureInfoRedirect"].document.getElementsByTagName("iframe");
-
- for(var i=0; i<resWin.length; i++){
- resWin[i].style.height = parseInt(newWin.height) / resWin.length;
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php (from rev 2140, branches/2.4.5/http/javascripts/mod_featureInfoRedirect.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfoRedirect.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,69 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_featureInfoRedirect.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+
+/*
+* sticky IFRAME, right from the main mapframe "mapframe1"
+*/
+
+mb_registerSubFunctions("mod_featureInfoRedirect_position()");
+mb_registerFeatureInfoPreFunctions("mod_featureInfoRedirect_set(fName)");
+
+function mod_featureInfoRedirect_set(fName){
+ var ind = getMapObjIndexByName("mapframe1");
+ var res = new Array();
+ for(var i=0; i<mb_mapObj[ind].wms.length; i++){
+ if(mb_mapObj[ind].querylayers[i] != ""){
+ res[res.length] = mb_mapObj[ind].wms[i].wms_id;
+ }
+ }
+
+ var newWin = document.getElementById("FeatureInfoRedirect").style;
+ var width = parseInt(newWin.width);
+ var height = parseInt(newWin.height) / res.length;
+
+ window.frames["FeatureInfoRedirect"].document.open("text/html");
+ for(i=0; i<res.length; i++){
+ var top = i * height;
+ window.frames["FeatureInfoRedirect"].document.write("<iframe src='' id='"+res[i]+"' style='position:absolute;top:"+top+"px;left:0px;width:"+width+"px;height:"+height+"px' frameborder='0'></iframe>");
+ }
+ window.frames["FeatureInfoRedirect"].document.close();
+}
+
+function mod_featureInfoRedirect_position(){
+ var leftOffset = 10;
+ var borderOffset = 10;
+ var width = 450;
+
+ var newWin = document.getElementById("FeatureInfoRedirect").style;
+ var mapframe = document.getElementById("mapframe1").style;
+
+ newWin.left = parseInt(mapframe.left) + parseInt(mapframe.width) + leftOffset;
+ newWin.top = parseInt(mapframe.top) - borderOffset;
+ newWin.width = width;
+ newWin.height = parseInt(mapframe.height) + 2 * borderOffset;
+
+ var resWin = window.frames["FeatureInfoRedirect"].document.getElementsByTagName("iframe");
+
+ for(var i=0; i<resWin.length; i++){
+ resWin[i].style.height = parseInt(newWin.height) / resWin.length;
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_featureInfoTunnel.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,73 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_featureInfoTunnel.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfoTunnel' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('featureInfoTunnel: ID not unique!');";}
-?>
-var mod_featureInfoTunnel_elName = "featureInfoTunnel";
-var mod_featureInfoTunnel_frameName = "";
-var mod_featureInfoTunnel_target = "<?php echo $e_target; ?>";
-
-var mod_featureInfoTunnel_img_on = new Image(); mod_featureInfoTunnel_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_featureInfoTunnel_img_off = new Image(); mod_featureInfoTunnel_img_off.src ="<?php echo $e_src; ?>";
-var mod_featureInfoTunnel_img_over = new Image(); mod_featureInfoTunnel_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_featureInfoTunnel(ind){
- mb_button[ind] = document.getElementById(mod_featureInfoTunnel_elName);
- mb_button[ind].img_over = mod_featureInfoTunnel_img_over.src;
- mb_button[ind].img_on = mod_featureInfoTunnel_img_on.src;
- mb_button[ind].img_off = mod_featureInfoTunnel_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_featureInfoTunnel_elName;
- mb_button[ind].fName = mod_featureInfoTunnel_frameName;
- mb_button[ind].go = new Function ("mod_featureInfoTunnel_click()");
- mb_button[ind].stop = new Function ("mod_featureInfoTunnel_disable()");
-}
-function mod_featureInfoTunnel_click(){
- window.frames[mod_featureInfoTunnel_target].document.onclick = mod_featureInfoTunnel_event;
-}
-function mod_featureInfoTunnel_disable(){
- window.frames[mod_featureInfoTunnel_target].document.onclick = null;
-}
-function mod_featureInfoTunnel_event(e){
- if(ie){
- clickX = window.frames[mod_featureInfoTunnel_target].event.clientX;
- clickY = window.frames[mod_featureInfoTunnel_target].event.clientY;
-
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- setFeatureInfoRequest(mod_featureInfoTunnel_target,clickX,clickY, '../extensions/ext_featureInfoTunnel.php');
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php (from rev 2219, branches/2.4.5/http/javascripts/mod_featureInfoTunnel.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_featureInfoTunnel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,68 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_featureInfoTunnel.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'featureInfoTunnel' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('featureInfoTunnel: ID not unique!');";}
+?>
+var mod_featureInfoTunnel_elName = "featureInfoTunnel";
+var mod_featureInfoTunnel_frameName = "";
+var mod_featureInfoTunnel_target = "<?php echo $e_target; ?>";
+
+var mod_featureInfoTunnel_img_on = new Image(); mod_featureInfoTunnel_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_featureInfoTunnel_img_off = new Image(); mod_featureInfoTunnel_img_off.src ="<?php echo $e_src; ?>";
+var mod_featureInfoTunnel_img_over = new Image(); mod_featureInfoTunnel_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_featureInfoTunnel(ind){
+ mb_button[ind] = document.getElementById(mod_featureInfoTunnel_elName);
+ mb_button[ind].img_over = mod_featureInfoTunnel_img_over.src;
+ mb_button[ind].img_on = mod_featureInfoTunnel_img_on.src;
+ mb_button[ind].img_off = mod_featureInfoTunnel_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_featureInfoTunnel_elName;
+ mb_button[ind].fName = mod_featureInfoTunnel_frameName;
+ mb_button[ind].go = new Function ("mod_featureInfoTunnel_click()");
+ mb_button[ind].stop = new Function ("mod_featureInfoTunnel_disable()");
+}
+function mod_featureInfoTunnel_click(){
+ window.frames[mod_featureInfoTunnel_target].document.onclick = mod_featureInfoTunnel_event;
+}
+function mod_featureInfoTunnel_disable(){
+ window.frames[mod_featureInfoTunnel_target].document.onclick = null;
+}
+function mod_featureInfoTunnel_event(e){
+ if(ie){
+ clickX = window.frames[mod_featureInfoTunnel_target].event.clientX;
+ clickY = window.frames[mod_featureInfoTunnel_target].event.clientY;
+
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ setFeatureInfoRequest(mod_featureInfoTunnel_target,clickX,clickY, '../extensions/ext_featureInfoTunnel.php');
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_forward.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_forward.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_forward.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,138 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_forward.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'forward' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = split(",",$row["e_target"]);
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('forward: ID not unique!');";
-}
-echo "var mod_forward_map = '".$e_target[0]."';";
-echo "var mod_forward_overview = '".$e_target[1]."';";
-
-?>
-var mb_MapFutureObj = new Array();
-var mod_forward_img_off = new Image(); mod_forward_img_off.src = "<?php echo preg_replace("/_off_disabled/","_off",$e_src); ?>";
-var mod_forward_img_off_disabled = new Image(); mod_forward_img_off_disabled.src = "<?php echo $e_src; ?>";
-var mod_forward_img_over = new Image(); mod_forward_img_over.src = "<?php echo preg_replace("/_off_disabled/","_over",$e_src); ?>";
-var mod_forward_img_previous = mod_forward_img_off_disabled.src;
-var mod_forward_cnt = 0;
-var mod_forward_hist_cnt = 0;
-mb_registerSubFunctions("mod_forward_check(frameName)");
-
-function mod_forward_check(frameName){
- if(mb_MapFutureObj[frameName] == null){
- mb_MapFutureObj[frameName] = new Array();
- }
- if(frameName == mod_forward_map){
- if(mb_MapFutureObj[mod_forward_map].length > 0){
- document.getElementById("forward").src = mod_forward_img_off.src;
- }
- else{
- document.getElementById("forward").src = mod_forward_img_off_disabled.src;
- mod_forward_img_previous = document.getElementById("forward").src;
- }
- }
- if(mb_MapHistoryObj[mod_forward_map]){
- if(mb_MapHistoryObj[mod_forward_map].length > mod_forward_hist_cnt && mb_MapFutureObj[mod_forward_map].length == mod_forward_cnt){
- mod_forward_reset();
- }
- mod_forward_cnt = mb_MapFutureObj[mod_forward_map].length;
- mod_forward_hist_cnt = mb_MapHistoryObj[mod_forward_map].length;
- }
-}
-function mod_forward_reset(){
- if(mb_MapHistoryObj[mod_forward_map].length > 0){
- mb_MapFutureObj[mod_forward_map] = new Array();
- document.getElementById("forward").src = mod_forward_img_off_disabled.src;
- mod_forward_img_previous = document.getElementById("forward").src;
- }
-}
-function mod_forward_over(obj){
- mod_forward_img_previous = document.getElementById("forward").src;
- if(document.getElementById("forward").src == mod_forward_img_off.src){
- document.getElementById("forward").src = mod_forward_img_over.src;
- }
-}
-function mod_forward_out(obj){
- document.getElementById("forward").src = mod_forward_img_previous;
-}
-function mod_forward_set(){
- if(mod_forward_img_previous == mod_forward_img_off.src){
- var ind = getMapObjIndexByName(mod_forward_map);
- var cnt = mb_MapFutureObj[mod_forward_map].length - 1;
- if(mb_mapObj[ind].epsg != mb_MapFutureObj[mod_forward_map][cnt].epsg){
- var oind = getMapObjIndexByName(mod_forward_overview);
- for(var i=0; i<mb_MapHistoryObj[mod_forward_overview].length; i++){
- if(mb_MapHistoryObj[mod_forward_overview][i].epsg == mb_MapFutureObj[mod_forward_map][cnt].epsg){
- mb_mapObj[oind].epsg = mb_MapHistoryObj[mod_forward_overview][i].epsg;
- mb_mapObj[oind].extent = mb_MapHistoryObj[mod_forward_overview][i].extent;
- setMapRequest(mod_forward_overview);
- break;
- }
- }
- }
- document.getElementById(mod_forward_map).style.width = mb_MapFutureObj[mod_forward_map][cnt].width;
- document.getElementById(mod_forward_map).style.height = mb_MapFutureObj[mod_forward_map][cnt].height;
- mb_mapObj[ind].width = mb_MapFutureObj[mod_forward_map][cnt].width;
- mb_mapObj[ind].height = mb_MapFutureObj[mod_forward_map][cnt].height;
- mb_mapObj[ind].epsg = mb_MapFutureObj[mod_forward_map][cnt].epsg;
- mb_mapObj[ind].extent = mb_MapFutureObj[mod_forward_map][cnt].extent;
- mb_mapObj[ind].layers = mb_MapFutureObj[mod_forward_map][cnt].layers;
- mb_mapObj[ind].styles = mb_MapFutureObj[mod_forward_map][cnt].styles;
- mb_mapObj[ind].querylayers = mb_MapFutureObj[mod_forward_map][cnt].querylayers;
- mb_MapFutureObj[mod_forward_map].length = (mb_MapFutureObj[mod_forward_map].length - 1);
- setMapRequest(mod_forward_map);
- }
-}
-function mb_setFutureObj(frameName){
- var ind = getMapObjIndexByName(frameName);
- var cnt = mb_MapFutureObj[frameName].length;
- mb_MapFutureObj[frameName][cnt] = new Object();
- mb_MapFutureObj[frameName][cnt].reqCnt = mod_back_cnt;
- mb_MapFutureObj[frameName][cnt].width = mb_mapObj[ind].width;
- mb_MapFutureObj[frameName][cnt].height = mb_mapObj[ind].height;
- mb_MapFutureObj[frameName][cnt].epsg = mb_mapObj[ind].epsg;
- mb_MapFutureObj[frameName][cnt].extent = mb_mapObj[ind].extent;
- mb_MapFutureObj[frameName][cnt].layers = new Array();
- for(var i=0; i<mb_mapObj[ind].layers.length;i++){
- mb_MapFutureObj[frameName][cnt].layers[i] = mb_mapObj[ind].layers[i];
- }
- mb_MapFutureObj[frameName][cnt].styles = new Array();
- for(var i=0; i<mb_mapObj[ind].styles.length;i++){
- mb_MapFutureObj[frameName][cnt].styles[i] = mb_mapObj[ind].styles[i];
- }
- mb_MapFutureObj[frameName][cnt].querylayers = new Array();
- for(var i=0; i<mb_mapObj[ind].querylayers.length;i++){
- mb_MapFutureObj[frameName][cnt].querylayers[i] = mb_mapObj[ind].querylayers[i];
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_forward.php (from rev 2181, branches/2.4.5/http/javascripts/mod_forward.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_forward.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_forward.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,134 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_forward.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'forward' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = split(",",$row["e_target"]);
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('forward: ID not unique!');";
+}
+echo "var mod_forward_map = '".$e_target[0]."';";
+echo "var mod_forward_overview = '".$e_target[1]."';";
+
+?>
+var mb_MapFutureObj = new Array();
+var mod_forward_img_off = new Image(); mod_forward_img_off.src = "<?php echo preg_replace("/_off_disabled/","_off",$e_src); ?>";
+var mod_forward_img_off_disabled = new Image(); mod_forward_img_off_disabled.src = "<?php echo $e_src; ?>";
+var mod_forward_img_over = new Image(); mod_forward_img_over.src = "<?php echo preg_replace("/_off_disabled/","_over",$e_src); ?>";
+var mod_forward_img_previous = mod_forward_img_off_disabled.src;
+var mod_forward_cnt = 0;
+var mod_forward_hist_cnt = 0;
+mb_registerSubFunctions("mod_forward_check(frameName)");
+
+function mod_forward_check(frameName){
+ if(mb_MapFutureObj[frameName] == null){
+ mb_MapFutureObj[frameName] = new Array();
+ }
+ if(frameName == mod_forward_map){
+ if(mb_MapFutureObj[mod_forward_map].length > 0){
+ document.getElementById("forward").src = mod_forward_img_off.src;
+ }
+ else{
+ document.getElementById("forward").src = mod_forward_img_off_disabled.src;
+ mod_forward_img_previous = document.getElementById("forward").src;
+ }
+ }
+ if(mb_MapHistoryObj[mod_forward_map]){
+ if(mb_MapHistoryObj[mod_forward_map].length > mod_forward_hist_cnt && mb_MapFutureObj[mod_forward_map].length == mod_forward_cnt){
+ mod_forward_reset();
+ }
+ mod_forward_cnt = mb_MapFutureObj[mod_forward_map].length;
+ mod_forward_hist_cnt = mb_MapHistoryObj[mod_forward_map].length;
+ }
+}
+function mod_forward_reset(){
+ if(mb_MapHistoryObj[mod_forward_map].length > 0){
+ mb_MapFutureObj[mod_forward_map] = new Array();
+ document.getElementById("forward").src = mod_forward_img_off_disabled.src;
+ mod_forward_img_previous = document.getElementById("forward").src;
+ }
+}
+function mod_forward_over(obj){
+ mod_forward_img_previous = document.getElementById("forward").src;
+ if(document.getElementById("forward").src == mod_forward_img_off.src){
+ document.getElementById("forward").src = mod_forward_img_over.src;
+ }
+}
+function mod_forward_out(obj){
+ document.getElementById("forward").src = mod_forward_img_previous;
+}
+function mod_forward_set(){
+ if(mod_forward_img_previous == mod_forward_img_off.src){
+ var ind = getMapObjIndexByName(mod_forward_map);
+ var cnt = mb_MapFutureObj[mod_forward_map].length - 1;
+ if(mb_mapObj[ind].epsg != mb_MapFutureObj[mod_forward_map][cnt].epsg){
+ var oind = getMapObjIndexByName(mod_forward_overview);
+ for(var i=0; i<mb_MapHistoryObj[mod_forward_overview].length; i++){
+ if(mb_MapHistoryObj[mod_forward_overview][i].epsg == mb_MapFutureObj[mod_forward_map][cnt].epsg){
+ mb_mapObj[oind].epsg = mb_MapHistoryObj[mod_forward_overview][i].epsg;
+ mb_mapObj[oind].extent = mb_MapHistoryObj[mod_forward_overview][i].extent;
+ setMapRequest(mod_forward_overview);
+ break;
+ }
+ }
+ }
+ document.getElementById(mod_forward_map).style.width = mb_MapFutureObj[mod_forward_map][cnt].width;
+ document.getElementById(mod_forward_map).style.height = mb_MapFutureObj[mod_forward_map][cnt].height;
+ mb_mapObj[ind].width = mb_MapFutureObj[mod_forward_map][cnt].width;
+ mb_mapObj[ind].height = mb_MapFutureObj[mod_forward_map][cnt].height;
+ mb_mapObj[ind].epsg = mb_MapFutureObj[mod_forward_map][cnt].epsg;
+ mb_mapObj[ind].extent = mb_MapFutureObj[mod_forward_map][cnt].extent;
+ mb_mapObj[ind].layers = mb_MapFutureObj[mod_forward_map][cnt].layers;
+ mb_mapObj[ind].styles = mb_MapFutureObj[mod_forward_map][cnt].styles;
+ mb_mapObj[ind].querylayers = mb_MapFutureObj[mod_forward_map][cnt].querylayers;
+ mb_MapFutureObj[mod_forward_map].length = (mb_MapFutureObj[mod_forward_map].length - 1);
+ setMapRequest(mod_forward_map);
+ }
+}
+function mb_setFutureObj(frameName){
+ var ind = getMapObjIndexByName(frameName);
+ var cnt = mb_MapFutureObj[frameName].length;
+ mb_MapFutureObj[frameName][cnt] = new Object();
+ mb_MapFutureObj[frameName][cnt].reqCnt = mod_back_cnt;
+ mb_MapFutureObj[frameName][cnt].width = mb_mapObj[ind].width;
+ mb_MapFutureObj[frameName][cnt].height = mb_mapObj[ind].height;
+ mb_MapFutureObj[frameName][cnt].epsg = mb_mapObj[ind].epsg;
+ mb_MapFutureObj[frameName][cnt].extent = mb_mapObj[ind].extent;
+ mb_MapFutureObj[frameName][cnt].layers = new Array();
+ for(var i=0; i<mb_mapObj[ind].layers.length;i++){
+ mb_MapFutureObj[frameName][cnt].layers[i] = mb_mapObj[ind].layers[i];
+ }
+ mb_MapFutureObj[frameName][cnt].styles = new Array();
+ for(var i=0; i<mb_mapObj[ind].styles.length;i++){
+ mb_MapFutureObj[frameName][cnt].styles[i] = mb_mapObj[ind].styles[i];
+ }
+ mb_MapFutureObj[frameName][cnt].querylayers = new Array();
+ for(var i=0; i<mb_mapObj[ind].querylayers.length;i++){
+ mb_MapFutureObj[frameName][cnt].querylayers[i] = mb_mapObj[ind].querylayers[i];
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_gazetteerSQL_client.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,394 +0,0 @@
-<?php
-session_start();
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$e_id = $_REQUEST["elementID"];
-$e_target = explode(",", $_REQUEST["e_target"]);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
-<title>Gazetteer</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-
-var targetFrameArray = [];
-<?php
-echo "var e_id = '". $e_id . "';";
-for ($i = 0; $i < count($e_target); $i++) {
- echo "targetFrameArray.push('".$e_target[$i]."');";
-}
-?>
-<!--
-// --- begin: expected element vars ---
-// var scale
-// var numberOfResults
-// var profile = "adresse" | "alk" | "alb" | "adresse2"
-
-if (typeof(scale) == 'undefined') {
- var scale = 2000;
- var e = new parent.Mb_warning("mod_gazetteerSQL: element var scale is missing.");
-}
-if (typeof(numberOfResults) == 'undefined') {
- var numberOfResults = 0;
- var e = new parent.Mb_warning("mod_gazetteerSQL: element var numberOfResults is missing.");
-}
-if (typeof(tooManyResultsString) == 'undefined') {
- var tooManyResultsString = "Too many results. Please specify your query.";
- var e = new parent.Mb_warning("mod_gazetteerSQL: element var tooManyResultsString is missing.");
-}
-if (typeof(profile) == 'undefined' || (profile != "alb" && profile != "alk" && profile != "adresse" && profile != "adresse2")) {
- profile = "adresse"
- var e = new parent.Mb_exception("mod_gazetteerSQL: element var profile is missing.");
-}
-
-// --- end: expected element vars ---
-
-
-var generalPreFunctions = [];
-var generalSubFunctions = [];
-var onloadSubFunctions = [];
-var communesSubFunctions = [];
-var streetSubFunctions = [];
-var numberSubFunctions = [];
-var districtSubFunctions = [];
-var parcelSubFunctions = [];
-var ownerSubFunctions = [];
-
-registerFunction(generalPreFunctions, "disableForm();");
-registerFunction(generalSubFunctions, "enableForm();");
-if (profile == "alb") {
- registerFunction(onloadSubFunctions, "updateCommunes();");
- registerFunction(communesSubFunctions, "updateOwner();");
- registerFunction(ownerSubFunctions, "updateOwner();");
-}
-else if (profile == "alk") {
- registerFunction(onloadSubFunctions, "updateCommunes();");
- registerFunction(communesSubFunctions, "updateDistricts();");
- registerFunction(parcelSubFunctions, "updateParcels();");
-}
-else if (profile == "adresse") {
- registerFunction(onloadSubFunctions, "updateCommunes();");
- registerFunction(communesSubFunctions, "updateStreets();");
- registerFunction(streetSubFunctions, "updateNumbers();");
-}
-else if (profile == "adresse2") {
- registerFunction(onloadSubFunctions, "updateStreets();");
- registerFunction(streetSubFunctions, "updateNumbers();");
-}
-
-function executeFunctions(arrayOfFunctionStrings) {
- for (var i = 0; i < arrayOfFunctionStrings.length; i++) {
- eval(arrayOfFunctionStrings[i]);
- }
-}
-
-function registerFunction(functionStringArray, functionString) {
- functionStringArray.push(functionString);
-}
-
-function disableForm() {
- document.getElementById('selectCommune').disabled = true;
- document.getElementById('selectStreet').disabled = true;
- document.getElementById('selectDistrict').disabled = true;
- document.getElementById('inputParcel1').disabled = true;
- document.getElementById('inputParcel2').disabled = true;
- document.getElementById('inputParcelButton').disabled = true;
- document.getElementById('inputOwner').disabled = true;
- document.getElementById('inputOwnerButton').disabled = true;
- document.getElementById("divResults").innerHTML = searchImage;
-}
-
-function enableForm() {
- document.getElementById('selectCommune').removeAttribute("disabled");
- document.getElementById('selectStreet').removeAttribute("disabled");
- document.getElementById('selectDistrict').removeAttribute("disabled");
- document.getElementById('inputParcel1').removeAttribute("disabled");
- document.getElementById('inputParcel2').removeAttribute("disabled");
- document.getElementById('inputParcelButton').removeAttribute("disabled");
- document.getElementById('inputOwner').removeAttribute("disabled");
- document.getElementById('inputOwnerButton').removeAttribute("disabled");
- document.getElementById("divResults").innerHTML = "";
-}
-
-var highlight;
-var houseLocation;
-var parcelLocation;
-var searchImage = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
-var phpUrl = "../php/mod_gazetteerSQL_server.php";
-
-parent.mb_registerInitFunctions("window.frames['"+e_id+"'].initHighlight()");
-parent.mb_registerInitFunctions("window.frames['"+e_id+"'].executeFunctions(window.frames['"+e_id+"'].onloadSubFunctions)");
-
-
-// - BEGIN -------- HIGHLIGHTING AND ZOOMING ------------------------------------------
-
-function zoomToLocation(aPoint) {
- parent.mb_repaintScale(targetFrameArray[0], aPoint.x, aPoint.y, scale)
-}
-
-function initHighlight() {
- var generalHighlightZIndex = 100;
- var generalHighlightLineWidth = 3;
- var styleObj = {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex};
- highlight = new parent.Highlight(targetFrameArray, e_id, styleObj, generalHighlightLineWidth);
-}
-
-function zoomToHouseNumber(houseNumber) {
- zoomToLocation(houseLocation[houseNumber]);
- removeHighlight();
- highlightHouseNumber(houseNumber);
-}
-
-function zoomToParcel(parcelId) {
- zoomToLocation(parcelLocation[parcelId]);
- removeHighlight();
- highlightParcel(parcelId);
-}
-
-function highlightHouseNumber(houseNumber) {
- var mG = new parent.MultiGeometry(parent.geomType.point);
- mG.addGeometry();
- mG.get(-1).addPoint(houseLocation[houseNumber]);
- highlight.add(mG);
-}
-
-function highlightParcel(parcelId) {
- var mG = new parent.MultiGeometry(parent.geomType.point);
- mG.addGeometry();
- mG.get(-1).addPoint(parcelLocation[parcelId]);
- highlight.add(mG);
-}
-
-function removeHighlight() {
- highlight.clean();
-}
-
-// - END -------- HIGHLIGHTING AND ZOOMING ------------------------------------------
-
-
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-
-function getSize(result) {
- if (typeof(result) == "array") {
- return result.length;
- }
- else if (typeof(result) == "object") {
- var c = 0;
- for (var attr in result) {
- c++;
- }
- return c;
- }
- return 1;
-}
-
-function updateCommunes() {
- executeFunctions(generalPreFunctions);
- parent.mb_ajax_json(phpUrl, {"command":"getCommunes"}, function (json, status) {
- executeFunctions(generalSubFunctions);
-
- removeChildNodes(document.getElementById('selectCommune'));
-
- for (var communeId in json.communes) {
- if (typeof(json.communes[communeId]) != 'function') {
- var currentNode = document.createElement("option");
-
- if (document.getElementById('selectCommune').childNodes.length == 0) {
- currentNode.selected = "selected";
- }
- currentNode.value = communeId;
- currentNode.innerHTML = json.communes[communeId];
- document.getElementById('selectCommune').appendChild(currentNode);
- }
- }
- executeFunctions(communesSubFunctions);
- });
-}
-
-function updateStreets() {
- executeFunctions(generalPreFunctions);
- var communeId = document.getElementById('selectCommune').value;
-
- parent.mb_ajax_json(phpUrl, {"command":"getStreets", "communeId":communeId}, function (json, status) {
- executeFunctions(generalSubFunctions);
-
- removeChildNodes(document.getElementById('selectStreet'));
-
- for (var streetId in json.streets) {
- if (typeof(json.streets[streetId]) != 'function') {
- var currentNode = document.createElement("option");
-
- if (document.getElementById('selectStreet').childNodes.length == 0) {
- currentNode.selected = "selected";
- }
-
- currentNode.value = json.streets[streetId];
- currentNode.innerHTML = json.streets[streetId];
- document.getElementById('selectStreet').appendChild(currentNode);
- }
- }
- executeFunctions(streetSubFunctions);
- });
-}
-
-function updateDistricts() {
- executeFunctions(generalPreFunctions);
-
- var communeId = document.getElementById('selectCommune').value;
-
- parent.mb_ajax_json(phpUrl, {"command":"getDistricts", "communeId":communeId}, function (districtObject, status) {
- executeFunctions(generalSubFunctions);
-
- removeChildNodes(document.getElementById('selectDistrict'));
-
- for (var districtId in districtObject.districts) {
- if (typeof(districtObject.districts[districtId]) != 'function') {
- var currentNode = document.createElement("option");
-
- currentNode.value = districtId;
-
- if (document.getElementById('selectDistrict').childNodes.length == 0) {
- currentNode.selected = "selected";
- }
-
- currentNode.value = districtObject.districts[districtId];
- currentNode.innerHTML = districtObject.districts[districtId];
- document.getElementById('selectDistrict').appendChild(currentNode);
- }
- }
- executeFunctions(districtSubFunctions);
- });
-}
-
-function updateNumbers() {
- executeFunctions(generalPreFunctions);
-
- var streetName = document.getElementById('selectStreet').value;
- var communeId = document.getElementById('selectCommune').value;
-
- parent.mb_ajax_json(phpUrl, {"command":"getNumbers", "communeId":communeId, "streetName":streetName, "numberOfResults":numberOfResults}, function (json, status) {
- executeFunctions(generalSubFunctions);
- houseLocation = {};
- var resultString = "";
- if (getSize(json.houseNumbers) > 0) {
- if (json.limited === true) {
- resultString += tooManyResultsString;
- }
- for (var houseNumber in json.houseNumbers) {
- if (typeof(json.houseNumbers[houseNumber]) != 'function') {
- houseLocation[houseNumber] = new parent.Point(json.houseNumbers[houseNumber].x, json.houseNumbers[houseNumber].y);
- resultString += "<b style=\"cursor:pointer\" onclick=\"zoomToHouseNumber('"+houseNumber+"')\" onmouseover=\"highlightHouseNumber('"+houseNumber+"')\" onmouseout=\"removeHighlight()\">"+houseNumber+"</b> ";
- }
- }
- }
- else {
- resultString += noResultsString;
- }
- document.getElementById("divResults").innerHTML = resultString;
- executeFunctions(numberSubFunctions);
- });
-}
-
-function updateParcels() {
- executeFunctions(generalPreFunctions);
-
- var districtId = document.getElementById('selectDistrict').value;
- var inputParcel1 = document.getElementById('inputParcel1').value;
- var inputParcel2 = document.getElementById('inputParcel2').value;
-
-
- parent.mb_ajax_json(phpUrl, {"command":"getLandparcelsByDistrict", "districtId":districtId, "parcelNumber1":inputParcel1, "parcelNumber2":inputParcel2, "numberOfResults":numberOfResults}, function (json, status) {
- executeFunctions(generalSubFunctions);
-
- parcelLocation = {};
- var resultString = "";
- if (getSize(json.landparcels) > 0) {
- if (json.limited === true) {
- resultString += tooManyResultsString;
- }
- resultString += "<ol>";
- for (var parcelId in json.landparcels) {
- if (typeof(json.landparcels[parcelId]) != 'function') {
- parcelLocation[parcelId] = new parent.Point(json.landparcels[parcelId].x, json.landparcels[parcelId].y);
- resultString += "<li style=\"cursor:pointer\" onclick=\"zoomToParcel('"+parcelId+"')\" onmouseover=\"highlightParcel('"+parcelId+"')\" onmouseout=\"removeHighlight()\">"+parcelId+"</li>";
- }
- }
- resultString += "</ol>";
- }
- else {
- resultString += noResultsString;
- }
- document.getElementById("divResults").innerHTML = resultString;
- executeFunctions(numberSubFunctions);
- });
-}
-
-function updateOwner() {
- var ownerQueryString = document.getElementById('inputOwner').value;
- var communeId = document.getElementById('selectCommune').value;
-
- document.getElementById("divResults").innerHTML = "";
- document.getElementById('selectCommune').removeAttribute("disabled");
- document.getElementById('inputOwner').removeAttribute("disabled");
- document.getElementById('inputOwnerButton').removeAttribute("disabled");
-
- if (ownerQueryString != "") {
- executeFunctions(generalPreFunctions);
- parent.mb_ajax_json(phpUrl, {"command":"getLandparcelsByOwner", "communeId":communeId, "ownerQueryString":ownerQueryString, "numberOfResults":numberOfResults}, function (json, status) {
- executeFunctions(generalSubFunctions);
-
- parcelLocation = {};
- var resultString = "";
- if (getSize(json.landparcels) > 0) {
- if (json.limited === true) {
- resultString += tooManyResultsString;
- }
- resultString += "<ol>";
- for (var i=0; i < json.landparcels.length; i++) {
- var parcelId = json.landparcels[i].landparcelId;
- parcelLocation[parcelId] = new parent.Point(json.landparcels[i].x, json.landparcels[i].y);
- resultString += "<li style=\"cursor:pointer\" onclick=\"zoomToParcel('"+parcelId+"')\" onmouseover=\"highlightParcel('"+parcelId+"')\" onmouseout=\"removeHighlight()\">"+json.landparcels[i].owner+ " (" + parcelId+")</li>";
- }
- resultString += "</ol>";
- }
- else {
- resultString += noResultsString;
- }
- document.getElementById("divResults").innerHTML = resultString;
- executeFunctions(numberSubFunctions);
-
- });
- }
-}
-// -->
-</script>
-</head>
-<body>
-<form>
-<select class='selectCommune' id='selectCommune' onchange='executeFunctions(communesSubFunctions)'></select>
-<select class='selectStreet' id='selectStreet' onchange='executeFunctions(streetSubFunctions);' size=5 disabled></select>
-<select class='selectDistrict' id='selectDistrict' onchange='executeFunctions(districtSubFunctions);' size=5 disabled></select>
-<div id='divParcel' class='divParcel'>
-Flur: <input type='input' class='inputParcel1' id='inputParcel1' disabled></select>
-Flstz: <input type='input' class='inputParcel2' id='inputParcel2' disabled></select>
-<input type='button' id='inputParcelButton' value='?' onclick='executeFunctions(parcelSubFunctions);'>
-</div>
-<div id='divOwner' class='divOwner'>
-Eigentümer: <input type='input' class='inputOwner' id='inputOwner' disabled></select>
-<input type='button' id='inputOwnerButton' value='?' onclick='executeFunctions(ownerSubFunctions);'>
-</div>
-</form>
-<div class='divResults' id='divResults'></div>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php (from rev 2140, branches/2.4.5/http/javascripts/mod_gazetteerSQL_client.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_gazetteerSQL_client.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,392 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$e_id = $_REQUEST["elementID"];
+$e_target = explode(",", $_REQUEST["e_target"]);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
+<title>Gazetteer</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+
+var targetFrameArray = [];
+<?php
+echo "var e_id = '". $e_id . "';";
+for ($i = 0; $i < count($e_target); $i++) {
+ echo "targetFrameArray.push('".$e_target[$i]."');";
+}
+?>
+<!--
+// --- begin: expected element vars ---
+// var scale
+// var numberOfResults
+// var profile = "adresse" | "alk" | "alb" | "adresse2"
+
+if (typeof(scale) == 'undefined') {
+ var scale = 2000;
+ var e = new parent.Mb_warning("mod_gazetteerSQL: element var scale is missing.");
+}
+if (typeof(numberOfResults) == 'undefined') {
+ var numberOfResults = 0;
+ var e = new parent.Mb_warning("mod_gazetteerSQL: element var numberOfResults is missing.");
+}
+if (typeof(tooManyResultsString) == 'undefined') {
+ var tooManyResultsString = "Too many results. Please specify your query.";
+ var e = new parent.Mb_warning("mod_gazetteerSQL: element var tooManyResultsString is missing.");
+}
+if (typeof(profile) == 'undefined' || (profile != "alb" && profile != "alk" && profile != "adresse" && profile != "adresse2")) {
+ profile = "adresse"
+ var e = new parent.Mb_exception("mod_gazetteerSQL: element var profile is missing.");
+}
+
+// --- end: expected element vars ---
+
+
+var generalPreFunctions = [];
+var generalSubFunctions = [];
+var onloadSubFunctions = [];
+var communesSubFunctions = [];
+var streetSubFunctions = [];
+var numberSubFunctions = [];
+var districtSubFunctions = [];
+var parcelSubFunctions = [];
+var ownerSubFunctions = [];
+
+registerFunction(generalPreFunctions, "disableForm();");
+registerFunction(generalSubFunctions, "enableForm();");
+if (profile == "alb") {
+ registerFunction(onloadSubFunctions, "updateCommunes();");
+ registerFunction(communesSubFunctions, "updateOwner();");
+ registerFunction(ownerSubFunctions, "updateOwner();");
+}
+else if (profile == "alk") {
+ registerFunction(onloadSubFunctions, "updateCommunes();");
+ registerFunction(communesSubFunctions, "updateDistricts();");
+ registerFunction(parcelSubFunctions, "updateParcels();");
+}
+else if (profile == "adresse") {
+ registerFunction(onloadSubFunctions, "updateCommunes();");
+ registerFunction(communesSubFunctions, "updateStreets();");
+ registerFunction(streetSubFunctions, "updateNumbers();");
+}
+else if (profile == "adresse2") {
+ registerFunction(onloadSubFunctions, "updateStreets();");
+ registerFunction(streetSubFunctions, "updateNumbers();");
+}
+
+function executeFunctions(arrayOfFunctionStrings) {
+ for (var i = 0; i < arrayOfFunctionStrings.length; i++) {
+ eval(arrayOfFunctionStrings[i]);
+ }
+}
+
+function registerFunction(functionStringArray, functionString) {
+ functionStringArray.push(functionString);
+}
+
+function disableForm() {
+ document.getElementById('selectCommune').disabled = true;
+ document.getElementById('selectStreet').disabled = true;
+ document.getElementById('selectDistrict').disabled = true;
+ document.getElementById('inputParcel1').disabled = true;
+ document.getElementById('inputParcel2').disabled = true;
+ document.getElementById('inputParcelButton').disabled = true;
+ document.getElementById('inputOwner').disabled = true;
+ document.getElementById('inputOwnerButton').disabled = true;
+ document.getElementById("divResults").innerHTML = searchImage;
+}
+
+function enableForm() {
+ document.getElementById('selectCommune').removeAttribute("disabled");
+ document.getElementById('selectStreet').removeAttribute("disabled");
+ document.getElementById('selectDistrict').removeAttribute("disabled");
+ document.getElementById('inputParcel1').removeAttribute("disabled");
+ document.getElementById('inputParcel2').removeAttribute("disabled");
+ document.getElementById('inputParcelButton').removeAttribute("disabled");
+ document.getElementById('inputOwner').removeAttribute("disabled");
+ document.getElementById('inputOwnerButton').removeAttribute("disabled");
+ document.getElementById("divResults").innerHTML = "";
+}
+
+var highlight;
+var houseLocation;
+var parcelLocation;
+var searchImage = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
+var phpUrl = "../php/mod_gazetteerSQL_server.php";
+
+parent.mb_registerInitFunctions("window.frames['"+e_id+"'].initHighlight()");
+parent.mb_registerInitFunctions("window.frames['"+e_id+"'].executeFunctions(window.frames['"+e_id+"'].onloadSubFunctions)");
+
+
+// - BEGIN -------- HIGHLIGHTING AND ZOOMING ------------------------------------------
+
+function zoomToLocation(aPoint) {
+ parent.mb_repaintScale(targetFrameArray[0], aPoint.x, aPoint.y, scale)
+}
+
+function initHighlight() {
+ var generalHighlightZIndex = 100;
+ var generalHighlightLineWidth = 3;
+ var styleObj = {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex};
+ highlight = new parent.Highlight(targetFrameArray, e_id, styleObj, generalHighlightLineWidth);
+}
+
+function zoomToHouseNumber(houseNumber) {
+ zoomToLocation(houseLocation[houseNumber]);
+ removeHighlight();
+ highlightHouseNumber(houseNumber);
+}
+
+function zoomToParcel(parcelId) {
+ zoomToLocation(parcelLocation[parcelId]);
+ removeHighlight();
+ highlightParcel(parcelId);
+}
+
+function highlightHouseNumber(houseNumber) {
+ var mG = new parent.MultiGeometry(parent.geomType.point);
+ mG.addGeometry();
+ mG.get(-1).addPoint(houseLocation[houseNumber]);
+ highlight.add(mG);
+}
+
+function highlightParcel(parcelId) {
+ var mG = new parent.MultiGeometry(parent.geomType.point);
+ mG.addGeometry();
+ mG.get(-1).addPoint(parcelLocation[parcelId]);
+ highlight.add(mG);
+}
+
+function removeHighlight() {
+ highlight.clean();
+}
+
+// - END -------- HIGHLIGHTING AND ZOOMING ------------------------------------------
+
+
+
+function removeChildNodes(node) {
+ while (node.childNodes.length > 0) {
+ var childNode = node.firstChild;
+ node.removeChild(childNode);
+ }
+}
+
+function getSize(result) {
+ if (typeof(result) == "array") {
+ return result.length;
+ }
+ else if (typeof(result) == "object") {
+ var c = 0;
+ for (var attr in result) {
+ c++;
+ }
+ return c;
+ }
+ return 1;
+}
+
+function updateCommunes() {
+ executeFunctions(generalPreFunctions);
+ parent.mb_ajax_json(phpUrl, {"command":"getCommunes"}, function (json, status) {
+ executeFunctions(generalSubFunctions);
+
+ removeChildNodes(document.getElementById('selectCommune'));
+
+ for (var communeId in json.communes) {
+ if (typeof(json.communes[communeId]) != 'function') {
+ var currentNode = document.createElement("option");
+
+ if (document.getElementById('selectCommune').childNodes.length == 0) {
+ currentNode.selected = "selected";
+ }
+ currentNode.value = communeId;
+ currentNode.innerHTML = json.communes[communeId];
+ document.getElementById('selectCommune').appendChild(currentNode);
+ }
+ }
+ executeFunctions(communesSubFunctions);
+ });
+}
+
+function updateStreets() {
+ executeFunctions(generalPreFunctions);
+ var communeId = document.getElementById('selectCommune').value;
+
+ parent.mb_ajax_json(phpUrl, {"command":"getStreets", "communeId":communeId}, function (json, status) {
+ executeFunctions(generalSubFunctions);
+
+ removeChildNodes(document.getElementById('selectStreet'));
+
+ for (var streetId in json.streets) {
+ if (typeof(json.streets[streetId]) != 'function') {
+ var currentNode = document.createElement("option");
+
+ if (document.getElementById('selectStreet').childNodes.length == 0) {
+ currentNode.selected = "selected";
+ }
+
+ currentNode.value = json.streets[streetId];
+ currentNode.innerHTML = json.streets[streetId];
+ document.getElementById('selectStreet').appendChild(currentNode);
+ }
+ }
+ executeFunctions(streetSubFunctions);
+ });
+}
+
+function updateDistricts() {
+ executeFunctions(generalPreFunctions);
+
+ var communeId = document.getElementById('selectCommune').value;
+
+ parent.mb_ajax_json(phpUrl, {"command":"getDistricts", "communeId":communeId}, function (districtObject, status) {
+ executeFunctions(generalSubFunctions);
+
+ removeChildNodes(document.getElementById('selectDistrict'));
+
+ for (var districtId in districtObject.districts) {
+ if (typeof(districtObject.districts[districtId]) != 'function') {
+ var currentNode = document.createElement("option");
+
+ currentNode.value = districtId;
+
+ if (document.getElementById('selectDistrict').childNodes.length == 0) {
+ currentNode.selected = "selected";
+ }
+
+ currentNode.value = districtObject.districts[districtId];
+ currentNode.innerHTML = districtObject.districts[districtId];
+ document.getElementById('selectDistrict').appendChild(currentNode);
+ }
+ }
+ executeFunctions(districtSubFunctions);
+ });
+}
+
+function updateNumbers() {
+ executeFunctions(generalPreFunctions);
+
+ var streetName = document.getElementById('selectStreet').value;
+ var communeId = document.getElementById('selectCommune').value;
+
+ parent.mb_ajax_json(phpUrl, {"command":"getNumbers", "communeId":communeId, "streetName":streetName, "numberOfResults":numberOfResults}, function (json, status) {
+ executeFunctions(generalSubFunctions);
+ houseLocation = {};
+ var resultString = "";
+ if (getSize(json.houseNumbers) > 0) {
+ if (json.limited === true) {
+ resultString += tooManyResultsString;
+ }
+ for (var houseNumber in json.houseNumbers) {
+ if (typeof(json.houseNumbers[houseNumber]) != 'function') {
+ houseLocation[houseNumber] = new parent.Point(json.houseNumbers[houseNumber].x, json.houseNumbers[houseNumber].y);
+ resultString += "<b style=\"cursor:pointer\" onclick=\"zoomToHouseNumber('"+houseNumber+"')\" onmouseover=\"highlightHouseNumber('"+houseNumber+"')\" onmouseout=\"removeHighlight()\">"+houseNumber+"</b> ";
+ }
+ }
+ }
+ else {
+ resultString += noResultsString;
+ }
+ document.getElementById("divResults").innerHTML = resultString;
+ executeFunctions(numberSubFunctions);
+ });
+}
+
+function updateParcels() {
+ executeFunctions(generalPreFunctions);
+
+ var districtId = document.getElementById('selectDistrict').value;
+ var inputParcel1 = document.getElementById('inputParcel1').value;
+ var inputParcel2 = document.getElementById('inputParcel2').value;
+
+
+ parent.mb_ajax_json(phpUrl, {"command":"getLandparcelsByDistrict", "districtId":districtId, "parcelNumber1":inputParcel1, "parcelNumber2":inputParcel2, "numberOfResults":numberOfResults}, function (json, status) {
+ executeFunctions(generalSubFunctions);
+
+ parcelLocation = {};
+ var resultString = "";
+ if (getSize(json.landparcels) > 0) {
+ if (json.limited === true) {
+ resultString += tooManyResultsString;
+ }
+ resultString += "<ol>";
+ for (var parcelId in json.landparcels) {
+ if (typeof(json.landparcels[parcelId]) != 'function') {
+ parcelLocation[parcelId] = new parent.Point(json.landparcels[parcelId].x, json.landparcels[parcelId].y);
+ resultString += "<li style=\"cursor:pointer\" onclick=\"zoomToParcel('"+parcelId+"')\" onmouseover=\"highlightParcel('"+parcelId+"')\" onmouseout=\"removeHighlight()\">"+parcelId+"</li>";
+ }
+ }
+ resultString += "</ol>";
+ }
+ else {
+ resultString += noResultsString;
+ }
+ document.getElementById("divResults").innerHTML = resultString;
+ executeFunctions(numberSubFunctions);
+ });
+}
+
+function updateOwner() {
+ var ownerQueryString = document.getElementById('inputOwner').value;
+ var communeId = document.getElementById('selectCommune').value;
+
+ document.getElementById("divResults").innerHTML = "";
+ document.getElementById('selectCommune').removeAttribute("disabled");
+ document.getElementById('inputOwner').removeAttribute("disabled");
+ document.getElementById('inputOwnerButton').removeAttribute("disabled");
+
+ if (ownerQueryString != "") {
+ executeFunctions(generalPreFunctions);
+ parent.mb_ajax_json(phpUrl, {"command":"getLandparcelsByOwner", "communeId":communeId, "ownerQueryString":ownerQueryString, "numberOfResults":numberOfResults}, function (json, status) {
+ executeFunctions(generalSubFunctions);
+
+ parcelLocation = {};
+ var resultString = "";
+ if (getSize(json.landparcels) > 0) {
+ if (json.limited === true) {
+ resultString += tooManyResultsString;
+ }
+ resultString += "<ol>";
+ for (var i=0; i < json.landparcels.length; i++) {
+ var parcelId = json.landparcels[i].landparcelId;
+ parcelLocation[parcelId] = new parent.Point(json.landparcels[i].x, json.landparcels[i].y);
+ resultString += "<li style=\"cursor:pointer\" onclick=\"zoomToParcel('"+parcelId+"')\" onmouseover=\"highlightParcel('"+parcelId+"')\" onmouseout=\"removeHighlight()\">"+json.landparcels[i].owner+ " (" + parcelId+")</li>";
+ }
+ resultString += "</ol>";
+ }
+ else {
+ resultString += noResultsString;
+ }
+ document.getElementById("divResults").innerHTML = resultString;
+ executeFunctions(numberSubFunctions);
+
+ });
+ }
+}
+// -->
+</script>
+</head>
+<body>
+<form>
+<select class='selectCommune' id='selectCommune' onchange='executeFunctions(communesSubFunctions)'></select>
+<select class='selectStreet' id='selectStreet' onchange='executeFunctions(streetSubFunctions);' size=5 disabled></select>
+<select class='selectDistrict' id='selectDistrict' onchange='executeFunctions(districtSubFunctions);' size=5 disabled></select>
+<div id='divParcel' class='divParcel'>
+Flur: <input type='input' class='inputParcel1' id='inputParcel1' disabled></select>
+Flstz: <input type='input' class='inputParcel2' id='inputParcel2' disabled></select>
+<input type='button' id='inputParcelButton' value='?' onclick='executeFunctions(parcelSubFunctions);'>
+</div>
+<div id='divOwner' class='divOwner'>
+Eigentümer: <input type='input' class='inputOwner' id='inputOwner' disabled></select>
+<input type='button' id='inputOwnerButton' value='?' onclick='executeFunctions(ownerSubFunctions);'>
+</div>
+</form>
+<div class='divResults' id='divResults'></div>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_getArea.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_getArea.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_getArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,86 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_getArea.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'getArea' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('copyright: ID not unique!');";}
-echo "var mod_getArea_target = '".$e_target."';";
-?>
-var mod_getArea_img = new Image();
-mod_getArea_img.src = "../img/button_gray/getArea_off.gif";
-register_measureSubFunctions("mod_getArea()");
-
-function mod_getArea(){
- var str = "<div style='position:absolute;top:50px' onmouseup='parent.mod_getArea_go()' ";
- str += "onmouseover='parent.mod_measure_timeout()' onmouseout='parent.mod_measure_disableTimeout()'><img src='"+mod_getArea_img.src+"'></div>";
- return str;
-}
-function mod_getArea_go(){
- if(mod_measure_RX[mod_measure_RX.length -1] == mod_measure_RX[0] && mod_measure_RY[mod_measure_RY.length -1] == mod_measure_RY[0]){
- var ind = getMapObjIndexByName(mod_getArea_target);
- var url = "../php/mod_evalArea.php?x=";
- for(var i=0; i<mod_measure_RX.length;i++){
- if(i>0){ url += ",";}
- url += mod_measure_RX[i];
- }
- url += "&y=";
- for(var i=0; i<mod_measure_RY.length;i++){
- if(i>0){ url += ",";}
- url += mod_measure_RY[i];
- }
- var srs = mb_mapObj[ind].epsg.split(":");
- url += "&srs="+ escape(srs[1]);
- url += "&length=" + mod_measure_TotalDist[mod_measure_TotalDist.length-1];
- url += "&distance=" + mod_measure_TotalDist[mod_measure_TotalDist.length-2];
- if(!mod_measure_win || mod_measure_win == null || mod_measure_win.closed == true){
- mod_measure_win = window.open(url,"mod_measure_win","width=200,height=150,resizable=yes");
- }
- else{
- mod_measure_win.document.location.href = url;
- }
- mod_measure_win.focus();
- }
- else{
- if(!mod_measure_win || mod_measure_win == null || mod_measure_win.closed == true){
- mod_measure_win = window.open("","mod_measure_win","width=200,height=150,resizable=yes");
- mod_measure_win.document.open("text/html");
- mod_measure_win.document.write("<span style = 'font-family : Arial, Helvetica, sans-serif;font-size : 12px;font-weight : bold;';>Strecke: " +mod_measure_TotalDist[mod_measure_TotalDist.length-1]+" m</span>");
- mod_measure_win.document.close();
- }
- else{
- mod_measure_win.document.open("text/html");
- mod_measure_win.document.write("<span style = 'font-family : Arial, Helvetica, sans-serif;font-size : 12px;font-weight : bold;';>Strecke: " +mod_measure_TotalDist[mod_measure_TotalDist.length-1]+" m</span>");
- mod_measure_win.document.close();
- }
- mod_measure_win.focus();
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_getArea.php (from rev 2219, branches/2.4.5/http/javascripts/mod_getArea.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_getArea.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_getArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,82 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_getArea.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'getArea' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('copyright: ID not unique!');";}
+echo "var mod_getArea_target = '".$e_target."';";
+?>
+var mod_getArea_img = new Image();
+mod_getArea_img.src = "../img/button_gray/getArea_off.gif";
+register_measureSubFunctions("mod_getArea()");
+
+function mod_getArea(){
+ var str = "<div style='position:absolute;top:50px' onmouseup='parent.mod_getArea_go()' ";
+ str += "onmouseover='parent.mod_measure_timeout()' onmouseout='parent.mod_measure_disableTimeout()'><img src='"+mod_getArea_img.src+"'></div>";
+ return str;
+}
+function mod_getArea_go(){
+ if(mod_measure_RX[mod_measure_RX.length -1] == mod_measure_RX[0] && mod_measure_RY[mod_measure_RY.length -1] == mod_measure_RY[0]){
+ var ind = getMapObjIndexByName(mod_getArea_target);
+ var url = "../php/mod_evalArea.php?<?php echo $urlParameters;?>&x=";
+ for(var i=0; i<mod_measure_RX.length;i++){
+ if(i>0){ url += ",";}
+ url += mod_measure_RX[i];
+ }
+ url += "&y=";
+ for(var i=0; i<mod_measure_RY.length;i++){
+ if(i>0){ url += ",";}
+ url += mod_measure_RY[i];
+ }
+ var srs = mb_mapObj[ind].epsg.split(":");
+ url += "&srs="+ escape(srs[1]);
+ url += "&length=" + mod_measure_TotalDist[mod_measure_TotalDist.length-1];
+ url += "&distance=" + mod_measure_TotalDist[mod_measure_TotalDist.length-2];
+ if(!mod_measure_win || mod_measure_win == null || mod_measure_win.closed == true){
+ mod_measure_win = window.open(url,"mod_measure_win","width=200,height=150,resizable=yes");
+ }
+ else{
+ mod_measure_win.document.location.href = url;
+ }
+ mod_measure_win.focus();
+ }
+ else{
+ if(!mod_measure_win || mod_measure_win == null || mod_measure_win.closed == true){
+ mod_measure_win = window.open("","mod_measure_win","width=200,height=150,resizable=yes");
+ mod_measure_win.document.open("text/html");
+ mod_measure_win.document.write("<span style = 'font-family : Arial, Helvetica, sans-serif;font-size : 12px;font-weight : bold;';>Strecke: " +mod_measure_TotalDist[mod_measure_TotalDist.length-1]+" m</span>");
+ mod_measure_win.document.close();
+ }
+ else{
+ mod_measure_win.document.open("text/html");
+ mod_measure_win.document.write("<span style = 'font-family : Arial, Helvetica, sans-serif;font-size : 12px;font-weight : bold;';>Strecke: " +mod_measure_TotalDist[mod_measure_TotalDist.length-1]+" m</span>");
+ mod_measure_win.document.close();
+ }
+ mod_measure_win.focus();
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_help.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_help.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_help.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,119 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_help
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-$gui_id = $_REQUEST["gui_id"];
-
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'help' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $cnt++;
-}
-$e_id_css = 'help';
-include(dirname(__FILE__)."/../include/dyn_js.php");
-if($cnt > 1){ echo "alert('help: ID not unique!');";}
-?>
-try{if(mod_help_color){}}catch(e){mod_help_color = '#cc33cc';}
-try{if(mod_help_thickness){}}catch(e){mod_help_color = 3;}
-var mod_help_elName = "help";
-var mod_help_str = "";
-var mod_help_img_on = new Image(); mod_help_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_help_img_off = new Image(); mod_help_img_off.src ="<?php echo $e_src; ?>";
-var mod_help_img_over = new Image(); mod_help_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_help(ind){
- mb_button[ind] = document.getElementById(mod_help_elName);
- mb_button[ind].img_over = mod_help_img_over.src;
- mb_button[ind].img_on = mod_help_img_on.src;
- mb_button[ind].img_off = mod_help_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_help_elName;
- mb_button[ind].go = new Function ("mod_help_click()");
- mb_button[ind].stop = new Function ("mod_help_disable()");
-}
-function mod_help_click(){
- if(document.getElementById('mod_help_load')){
- document.getElementById('mod_help_img').innerHTML = mod_help_str;
- mod_help_draw();
- }
- else{
- var t = mod_help_set();
- }
-}
-function mod_help_disable(){
- document.getElementById('mod_help_img').innerHTML = '';
- document.getElementById('mod_help_img').style.width = '0px';
- document.getElementById('mod_help_img').style.height = '0px';
- document.getElementById('mod_help_draw').innerHTML = '';
- mb_disableThisButton(mod_help_elName);
-}
-function mod_help_set(){
- var iframe = document.createElement('iframe');
- iframe.setAttribute("src", "../php/mod_help.php?gui_id=<?php echo $gui_id ?>");
- var tmp = document.body.appendChild(iframe);
- tmp.id = 'mod_help_load';
- tmp.style.width = '1px';
- tmp.style.height='1px';
- tmp.style.visibility = 'hidden';
-
- var helpimg = document.createElement('div');
- var tmp = document.body.appendChild(helpimg);
- tmp.id = 'mod_help_img';
- tmp.style.position = 'absolute';
- tmp.style.zIndex = '1000';
- tmp.style.top = '0px';
- tmp.style.left = '0px';
- tmp.style.width = '1px';
- tmp.style.height='1px';
-
- var helpdraw = document.createElement('div');
- var tmp = document.body.appendChild(helpdraw);
- tmp.id = 'mod_help_draw';
- tmp.style.position = 'absolute';
- tmp.style.zIndex = '999';
- tmp.style.top = '0px';
- tmp.style.left = '0px';
- tmp.style.width = '0px';
- tmp.style.height='0px';
-
- return true;
-}
-function mod_help_set_str(str){
- mod_help_str = str;
- document.getElementById('mod_help_img').innerHTML = mod_help_str;
- mod_help_draw();
-}
-function mod_help_draw(){
- var canvas = new jsGraphics('mod_help_draw');
- canvas.setStroke(parseInt(mod_help_thickness));
- canvas.setColor(mod_help_color);
- var my = document.getElementsByName("mod_help_imagemap")[0];
- for(var i=0; i<my.areas.length; i++){
- var myc = my.areas[i].coords.split(",");
- canvas.drawRect(parseInt(myc[0]),parseInt(myc[1]),parseInt(myc[2]) - parseInt(myc[0]),parseInt(myc[3]) - parseInt(myc[1]));
- canvas.paint();
- }
-}
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_help.php (from rev 2181, branches/2.4.5/http/javascripts/mod_help.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_help.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_help.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,116 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_help
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'help' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $cnt++;
+}
+$e_id_css = 'help';
+include(dirname(__FILE__)."/../include/dyn_js.php");
+if($cnt > 1){ echo "alert('help: ID not unique!');";}
+?>
+try{if(mod_help_color){}}catch(e){mod_help_color = '#cc33cc';}
+try{if(mod_help_thickness){}}catch(e){mod_help_color = 3;}
+var mod_help_elName = "help";
+var mod_help_str = "";
+var mod_help_img_on = new Image(); mod_help_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_help_img_off = new Image(); mod_help_img_off.src ="<?php echo $e_src; ?>";
+var mod_help_img_over = new Image(); mod_help_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_help(ind){
+ mb_button[ind] = document.getElementById(mod_help_elName);
+ mb_button[ind].img_over = mod_help_img_over.src;
+ mb_button[ind].img_on = mod_help_img_on.src;
+ mb_button[ind].img_off = mod_help_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_help_elName;
+ mb_button[ind].go = new Function ("mod_help_click()");
+ mb_button[ind].stop = new Function ("mod_help_disable()");
+}
+function mod_help_click(){
+ if(document.getElementById('mod_help_load')){
+ document.getElementById('mod_help_img').innerHTML = mod_help_str;
+ mod_help_draw();
+ }
+ else{
+ var t = mod_help_set();
+ }
+}
+function mod_help_disable(){
+ document.getElementById('mod_help_img').innerHTML = '';
+ document.getElementById('mod_help_img').style.width = '0px';
+ document.getElementById('mod_help_img').style.height = '0px';
+ document.getElementById('mod_help_draw').innerHTML = '';
+ mb_disableThisButton(mod_help_elName);
+}
+function mod_help_set(){
+ var iframe = document.createElement('iframe');
+ iframe.setAttribute("src", "../php/mod_help.php?gui_id=<?php echo $gui_id ?>");
+ var tmp = document.body.appendChild(iframe);
+ tmp.id = 'mod_help_load';
+ tmp.style.width = '1px';
+ tmp.style.height='1px';
+ tmp.style.visibility = 'hidden';
+
+ var helpimg = document.createElement('div');
+ var tmp = document.body.appendChild(helpimg);
+ tmp.id = 'mod_help_img';
+ tmp.style.position = 'absolute';
+ tmp.style.zIndex = '1000';
+ tmp.style.top = '0px';
+ tmp.style.left = '0px';
+ tmp.style.width = '1px';
+ tmp.style.height='1px';
+
+ var helpdraw = document.createElement('div');
+ var tmp = document.body.appendChild(helpdraw);
+ tmp.id = 'mod_help_draw';
+ tmp.style.position = 'absolute';
+ tmp.style.zIndex = '999';
+ tmp.style.top = '0px';
+ tmp.style.left = '0px';
+ tmp.style.width = '0px';
+ tmp.style.height='0px';
+
+ return true;
+}
+function mod_help_set_str(str){
+ mod_help_str = str;
+ document.getElementById('mod_help_img').innerHTML = mod_help_str;
+ mod_help_draw();
+}
+function mod_help_draw(){
+ var canvas = new jsGraphics('mod_help_draw');
+ canvas.setStroke(parseInt(mod_help_thickness));
+ canvas.setColor(mod_help_color);
+ var my = document.getElementsByName("mod_help_imagemap")[0];
+ for(var i=0; i<my.areas.length; i++){
+ var myc = my.areas[i].coords.split(",");
+ canvas.drawRect(parseInt(myc[0]),parseInt(myc[1]),parseInt(myc[2]) - parseInt(myc[0]),parseInt(myc[3]) - parseInt(myc[1]));
+ canvas.paint();
+ }
+}
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_highlightPOI.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,164 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_highlightPOI.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-include("../../conf/mapbender.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-
-/* Mapbender version lower 2.4
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = '".$gui_id."'";
-$res = db_query($sql);
-$cnt = 0;
-*/
-
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('highlightPOI: ID not unique!');";
-}
-echo "var mod_highlightPOI_target = '".$e_target."';";
-
-$e_id_css = 'highlightPOI';
-include('../include/dyn_js.php');
-
-?>
-try{
- if (poi_image){}
-}
-catch(e){
- poi_image = '../img/redball.gif';
-}
-
-try{
- if (poi_width){}
-}
-catch(e){
- poi_width = 14;
-}
-
-try{
- if (poi_height){}
-}
-catch(e){
- poi_height = 14;
-}
-
-try{
- if (poi_style){}
-}
-catch(e){
- poi_style = 'background-color:white;font-weight: bold;color:black;font-family:Arial;';
-}
-
-mb_registerInitFunctions('mod_highlightPOI_init()');
-mb_registerSubFunctions('mod_highlightPOI_draw()');
-
-var mod_highlightPOI_minx;
-var mod_highlightPOI_miny;
-var mod_highlightPOI_maxx;
-var mod_highlightPOI_maxy;
-var mod_highlightPOI_name = new Array();
-var mod_highlightPOI_x = new Array();
-var mod_highlightPOI_y = new Array();
-var mod_highlightPOI_params = new Array();
-var myPOI;
-
-function mod_highlightPOI_init(){
- var myPOI = "<?php if (CHARSET == 'UTF-8'){
- echo utf8_encode($_SESSION['mb_myPOI']);
- }else{
- echo $_SESSION['mb_myPOI'];
- }
- ?>";
-
- if(myPOI != ""){
- mod_highlightPOI_params = myPOI.split(",");
-
-
-
- for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
- if(i==0){
- mod_highlightPOI_name[i] = mod_highlightPOI_params[i];
- mod_highlightPOI_minx = parseInt(mod_highlightPOI_params[i+1]);
- mod_highlightPOI_miny = parseInt(mod_highlightPOI_params[i+2]);
- mod_highlightPOI_maxx = parseInt(mod_highlightPOI_params[i+1]);
- mod_highlightPOI_maxy = parseInt(mod_highlightPOI_params[i+2]);
- }
- else{
- mod_highlightPOI_name[i] = mod_highlightPOI_params[i];
- if(mod_highlightPOI_params[i+1] < mod_highlightPOI_minx){
- mod_highlightPOI_minx = parseInt(mod_highlightPOI_params[i+1]);
- }
- if(mod_highlightPOI_params[i+2] < mod_highlightPOI_miny){
- mod_highlightPOI_miny = parseInt(mod_highlightPOI_params[i+2]);
- }
- if(mod_highlightPOI_params[i+1] > mod_highlightPOI_maxx){
- mod_highlightPOI_maxx = parseInt(mod_highlightPOI_params[i+1]);
- }
- if(mod_highlightPOI_params[i+2] > mod_highlightPOI_maxy){
- mod_highlightPOI_maxy = parseInt(mod_highlightPOI_params[i+2]);
- }
- }
- }
- if((mod_highlightPOI_maxx - mod_highlightPOI_minx) < 100){
- mod_highlightPOI_minx -= 50;
- mod_highlightPOI_maxx += 50;
- }
- if((mod_highlightPOI_maxy - mod_highlightPOI_miny) < 100){
- mod_highlightPOI_miny -= 50;
- mod_highlightPOI_maxy += 50;
- }
- mod_highlightPOI_minx -= 50;
- mod_highlightPOI_maxx += 50;
- mod_highlightPOI_miny -= 50;
- mod_highlightPOI_maxy += 50;
- //mb_calculateExtent( mod_highlightPOI_target,mod_highlightPOI_minx,mod_highlightPOI_miny,mod_highlightPOI_maxx,mod_highlightPOI_maxy);
- }
-}
-
-
-function mod_highlightPOI_draw(){
- var ind = getMapObjIndexByName(mod_highlightPOI_target);
- window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.width = mb_mapObj[ind].width;
- window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.height = mb_mapObj[ind].height;
- window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.top = 0;
- window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.left = 0;
- window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.visibility = 'visible';
- var tagSource = "";
- for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
- var pos = makeRealWorld2mapPos(mod_highlightPOI_target,mod_highlightPOI_params[i+1], mod_highlightPOI_params[i+2]);
- tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]-Math.round(0.5*poi_width))+"px;top:"+(pos[1]-Math.round(0.5*poi_height))+"px'>";
- tagSource += "<img src='"+poi_image+"'>";
- tagSource += "<span style='"+poi_style+"'>"+mod_highlightPOI_params[i]+"<span>";
- tagSource += "</div>";
- }
- writeTag(mod_highlightPOI_target, "permanent", tagSource);
-}
-
-
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php (from rev 2181, branches/2.4.5/http/javascripts/mod_highlightPOI.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_highlightPOI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,161 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_highlightPOI.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+
+/* Mapbender version lower 2.4
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'highlightPOI' AND fkey_gui_id = '".$gui_id."'";
+$res = db_query($sql);
+$cnt = 0;
+*/
+
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('highlightPOI: ID not unique!');";
+}
+echo "var mod_highlightPOI_target = '".$e_target."';";
+
+$e_id_css = 'highlightPOI';
+include('../include/dyn_js.php');
+
+?>
+try{
+ if (poi_image){}
+}
+catch(e){
+ poi_image = '../img/redball.gif';
+}
+
+try{
+ if (poi_width){}
+}
+catch(e){
+ poi_width = 14;
+}
+
+try{
+ if (poi_height){}
+}
+catch(e){
+ poi_height = 14;
+}
+
+try{
+ if (poi_style){}
+}
+catch(e){
+ poi_style = 'background-color:white;font-weight: bold;color:black;font-family:Arial;';
+}
+
+mb_registerInitFunctions('mod_highlightPOI_init()');
+mb_registerSubFunctions('mod_highlightPOI_draw()');
+
+var mod_highlightPOI_minx;
+var mod_highlightPOI_miny;
+var mod_highlightPOI_maxx;
+var mod_highlightPOI_maxy;
+var mod_highlightPOI_name = new Array();
+var mod_highlightPOI_x = new Array();
+var mod_highlightPOI_y = new Array();
+var mod_highlightPOI_params = new Array();
+var myPOI;
+
+function mod_highlightPOI_init(){
+ var myPOI = "<?php if (CHARSET == 'UTF-8'){
+ echo utf8_encode($_SESSION['mb_myPOI']);
+ }else{
+ echo $_SESSION['mb_myPOI'];
+ }
+ ?>";
+
+ if(myPOI != ""){
+ mod_highlightPOI_params = myPOI.split(",");
+
+
+
+ for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
+ if(i==0){
+ mod_highlightPOI_name[i] = mod_highlightPOI_params[i];
+ mod_highlightPOI_minx = parseInt(mod_highlightPOI_params[i+1]);
+ mod_highlightPOI_miny = parseInt(mod_highlightPOI_params[i+2]);
+ mod_highlightPOI_maxx = parseInt(mod_highlightPOI_params[i+1]);
+ mod_highlightPOI_maxy = parseInt(mod_highlightPOI_params[i+2]);
+ }
+ else{
+ mod_highlightPOI_name[i] = mod_highlightPOI_params[i];
+ if(mod_highlightPOI_params[i+1] < mod_highlightPOI_minx){
+ mod_highlightPOI_minx = parseInt(mod_highlightPOI_params[i+1]);
+ }
+ if(mod_highlightPOI_params[i+2] < mod_highlightPOI_miny){
+ mod_highlightPOI_miny = parseInt(mod_highlightPOI_params[i+2]);
+ }
+ if(mod_highlightPOI_params[i+1] > mod_highlightPOI_maxx){
+ mod_highlightPOI_maxx = parseInt(mod_highlightPOI_params[i+1]);
+ }
+ if(mod_highlightPOI_params[i+2] > mod_highlightPOI_maxy){
+ mod_highlightPOI_maxy = parseInt(mod_highlightPOI_params[i+2]);
+ }
+ }
+ }
+ if((mod_highlightPOI_maxx - mod_highlightPOI_minx) < 100){
+ mod_highlightPOI_minx -= 50;
+ mod_highlightPOI_maxx += 50;
+ }
+ if((mod_highlightPOI_maxy - mod_highlightPOI_miny) < 100){
+ mod_highlightPOI_miny -= 50;
+ mod_highlightPOI_maxy += 50;
+ }
+ mod_highlightPOI_minx -= 50;
+ mod_highlightPOI_maxx += 50;
+ mod_highlightPOI_miny -= 50;
+ mod_highlightPOI_maxy += 50;
+ //mb_calculateExtent( mod_highlightPOI_target,mod_highlightPOI_minx,mod_highlightPOI_miny,mod_highlightPOI_maxx,mod_highlightPOI_maxy);
+ }
+}
+
+
+function mod_highlightPOI_draw(){
+ var ind = getMapObjIndexByName(mod_highlightPOI_target);
+ window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.width = mb_mapObj[ind].width;
+ window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.height = mb_mapObj[ind].height;
+ window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.top = 0;
+ window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.left = 0;
+ window.frames[mod_highlightPOI_target].document.getElementById('permanent').style.visibility = 'visible';
+ var tagSource = "";
+ for(var i=0; i<mod_highlightPOI_params.length; i=i+3){
+ var pos = makeRealWorld2mapPos(mod_highlightPOI_target,mod_highlightPOI_params[i+1], mod_highlightPOI_params[i+2]);
+ tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]-Math.round(0.5*poi_width))+"px;top:"+(pos[1]-Math.round(0.5*poi_height))+"px'>";
+ tagSource += "<img src='"+poi_image+"'>";
+ tagSource += "<span style='"+poi_style+"'>"+mod_highlightPOI_params[i]+"<span>";
+ tagSource += "</div>";
+ }
+ writeTag(mod_highlightPOI_target, "permanent", tagSource);
+}
+
+
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_home.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_home.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_home.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,39 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_home
-# Copyright (C) 2002 CCGIS
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-?>
-function mod_home_init(){
-<?php
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-echo "var url = '".LOGIN."';";
-echo "var name = '".urlencode($_SESSION["mb_user_name"])."';";
-echo "var pw = '".$_SESSION["mb_user_password"]."';";
-
-?>
- var str = "<form name='myGuiList_form' method='POST' action='' target='_self'>";
- str += "<input type='text' name='name' value='"+name+"' />";
- str += "<input type='text' name='password' value='"+pw+"' />";
- str += "</form>";
-
- var mod_home_div = document.createElement('div');
- mod_home_div.setAttribute("id","mod_home_d");
- var tmp = document.body.appendChild(mod_home_div);
- document.getElementById("mod_home_d").innerHTML = str;
- document.forms.myGuiList_form.action = url;
- document.forms.myGuiList_form.submit();
- //document.location.href = url + "?name=" + name + "&password=" + pw;
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_home.php (from rev 2140, branches/2.4.5/http/javascripts/mod_home.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_home.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_home.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,40 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_home
+# Copyright (C) 2002 CCGIS
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+function mod_home_init(){
+<?php
+echo "var url = '".LOGIN."';";
+echo "var name = '".urlencode($_SESSION["mb_user_name"])."';";
+echo "var pw = '".$_SESSION["mb_user_password"]."';";
+
+?>
+ var str = "<form name='myGuiList_form' method='POST' action='' target='_self'>";
+ str += "<input type='text' name='name' value='"+name+"' />";
+ str += "<input type='text' name='password' value='"+pw+"' />";
+ str += "</form>";
+
+ var mod_home_div = document.createElement('div');
+ mod_home_div.setAttribute("id","mod_home_d");
+ var tmp = document.body.appendChild(mod_home_div);
+ document.getElementById("mod_home_d").innerHTML = str;
+ document.forms.myGuiList_form.action = url;
+ document.forms.myGuiList_form.submit();
+ //document.location.href = url + "?name=" + name + "&password=" + pw;
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_initWmc.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_initWmc.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_initWmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,139 +0,0 @@
-<?php
-session_start();
-if ($_SESSION['mb_myWmc'] && $_SESSION['mb_myWmc_action'] && in_array($_SESSION['mb_myWmc_action'], array("load", "merge", "append"))) {
- $action = $_SESSION['mb_myWmc_action'];
- $wmc_id = $_SESSION['mb_myWmc'];
-}
-$user = $_SESSION['mb_user_id'];
-$meetingPointId = $_SESSION['mb_myKml'];
-
-require_once("../classes/class_wmc.php");
-require_once("../classes/class_kml.php");
-require_once("../classes/class_administration.php");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'initWmc' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = explode(",",$row["e_target"]);
- $cnt++;
-}
-if ($cnt > 1 || $cnt == 0){
- echo "alert('initWMC: ID not unique!');";
-}
-
-$x = false;
-$y = false;
-$icon = false;
-$alt = false;
-$url = false;
-
-$adm = new administration();
-
-
-//KML
-if (isset($meetingPointId)) {
- $sql = "SELECT * FROM mb_meetingpoint WHERE mb_meetingpoint_id = $1";
- $v = array($meetingPointId);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $user = $row['fkey_mb_user_id'];
- $password = $row['mb_user_password'];
- $gui = $row['fkey_gui_id'];
- $wmc_id = $row['fkey_wmc_id'];
- $kml_doc = $row['kml'];
-
- $kml = new kml("", "", 0, 0, "");
- $value = $kml->createObjFromKML($kml_doc);
-
- $x = $kml->x;
- $y = $kml->y;
- $icon = $kml->icon;
- if ($kml->title) {
- if ($kml->description) $alt = $kml->title . ", " .$kml->description;
- else $alt = $kml->title;
- }
- else $alt = $kml->description;
-
- if (ereg("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", $kml->title)) {
- $url = ereg_replace("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", "\\1", $kml->title);
- if (substr($url, 0, 4) == "www.") {
- $url = "http://" . $url;
- }
- }
- }
- else {
- $js_error .= "alert('Meetingpoint ID id ".$meetingPointId." is not valid. Default GUI will be loaded instead.');";
- }
-}
-
-//WMC
-if (isset($wmc_id)) {
- if ($adm->getWmcById($wmc_id) != false) {
-
- $valid_wmcs = $adm->getWmcByOwner($user);
- if (in_array($wmc_id, $valid_wmcs)) {
- echo "var wmc_id = false;";
- echo "wmc_id = '".$wmc_id."';";
- $wmc = new wmc();
- $wmc->createObjFromWMC_id($wmc_id);
- $js_wmc .= $wmc->createJsObjFromWMC("", $e_target[0], $action);
-
- if (!empty($x) && !empty($y) && !empty($icon)) {
-
- $js_kml .= "var myPoint = realToMap('".$e_target[0]."', new Point(".$x.",".$y."));\n";
-
- // 7 is half the width of pin.png
- $js_kml .= "myPoint.x -= 7;";
- // 20 is the height of pin.png
- $js_kml .= "myPoint.y -= 20;";
-
- $js_kml .= "var meetingPointLogoStyle = {'position':'absolute', 'top':0, 'left':0, 'z-index':100, 'font-size':'10px'};\n";
- $js_kml .= "meetingPointLogoTag = new DivTag('meeting_logo', '".$e_target[0]."', meetingPointLogoStyle);\n";
- $js_img .= "<img id='meeting_img' border='0' src='".$icon."' title='".$alt."'>";
- if ($url) {
- $js_img = "<a href='".$url."' target='_blank'>" . $js_img . "</a>";
- }
- $js_kml .= "var meetingPointLogoText = \"" . $js_img . "\";\n";
- $js_kml .= "meetingPointLogoTag.write(meetingPointLogoText);\n";
- $js_kml .= "var meeting_img = window.frames['".$e_target[0]."'].document.getElementById('meeting_img');";
- $js_kml .= "meeting_img.style.position = 'absolute';";
- $js_kml .= "meeting_img.style.top = myPoint.y;";
- $js_kml .= "meeting_img.style.left = myPoint.x;";
- $js_kml .= "mb_registerPanSubElement('meeting_logo');";
- }
- }
- else {
- $js_error .= "alert('".$adm->getUserNameByUserId($user)." is not allowed to access WMC ".$wmc_id.". Default GUI will be loaded instead.');";
- }
- }
- else {
- $js_error .= "alert('WMC id ".$wmc_id." is not valid. Default GUI will be loaded instead.');";
- }
-}
-echo "function mod_initWMC_init() {";
-echo $js_wmc;
-echo $js_kml;
-echo $js_error;
-echo "}";
-
-echo "function addFlag() {";
-echo $js_kml;
-echo $js_error;
-echo "}";
-
-
-?>
-
-mb_registerInitFunctions("mod_initWMC()");
-function mod_initWMC(){
- mod_initWMC_init();
- mb_registerSubFunctions('addFlag()');
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_initWmc.php (from rev 2140, branches/2.4.5/http/javascripts/mod_initWmc.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_initWmc.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_initWmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,140 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+if ($_SESSION['mb_myWmc'] && $_SESSION['mb_myWmc_action'] && in_array($_SESSION['mb_myWmc_action'], array("load", "merge", "append"))) {
+ $action = $_SESSION['mb_myWmc_action'];
+ $wmc_id = $_SESSION['mb_myWmc'];
+}
+$user = $_SESSION['mb_user_id'];
+$meetingPointId = $_SESSION['mb_myKml'];
+
+require_once("../classes/class_wmc.php");
+require_once("../classes/class_kml.php");
+require_once("../classes/class_administration.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'initWmc' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = explode(",",$row["e_target"]);
+ $cnt++;
+}
+if ($cnt > 1 || $cnt == 0){
+ echo "alert('initWMC: ID not unique!');";
+}
+
+$x = false;
+$y = false;
+$icon = false;
+$alt = false;
+$url = false;
+
+$adm = new administration();
+
+
+//KML
+if (isset($meetingPointId)) {
+ $sql = "SELECT * FROM mb_meetingpoint WHERE mb_meetingpoint_id = $1";
+ $v = array($meetingPointId);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $user = $row['fkey_mb_user_id'];
+ $password = $row['mb_user_password'];
+ $gui = $row['fkey_gui_id'];
+ $wmc_id = $row['fkey_wmc_id'];
+ $kml_doc = $row['kml'];
+
+ $kml = new kml("", "", 0, 0, "");
+ $value = $kml->createObjFromKML($kml_doc);
+
+ $x = $kml->x;
+ $y = $kml->y;
+ $icon = $kml->icon;
+ if ($kml->title) {
+ if ($kml->description) $alt = $kml->title . ", " .$kml->description;
+ else $alt = $kml->title;
+ }
+ else $alt = $kml->description;
+
+ if (ereg("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", $kml->title)) {
+ $url = ereg_replace("^.*,[[:space:]]((([[:alpha:]]+://)|(www.))[^<>[:space:]]+[[:alnum:]/]).*$", "\\1", $kml->title);
+ if (substr($url, 0, 4) == "www.") {
+ $url = "http://" . $url;
+ }
+ }
+ }
+ else {
+ $js_error .= "alert('Meetingpoint ID id ".$meetingPointId." is not valid. Default GUI will be loaded instead.');";
+ }
+}
+
+//WMC
+if (isset($wmc_id)) {
+ if ($adm->getWmcById($wmc_id) != false) {
+
+ $valid_wmcs = $adm->getWmcByOwner($user);
+ if (in_array($wmc_id, $valid_wmcs)) {
+ echo "var wmc_id = false;";
+ echo "wmc_id = '".$wmc_id."';";
+ $wmc = new wmc();
+ $wmc->createObjFromWMC_id($wmc_id);
+ $js_wmc .= $wmc->createJsObjFromWMC("", $e_target[0], $action);
+
+ if (!empty($x) && !empty($y) && !empty($icon)) {
+
+ $js_kml .= "var myPoint = realToMap('".$e_target[0]."', new Point(".$x.",".$y."));\n";
+
+ // 7 is half the width of pin.png
+ $js_kml .= "myPoint.x -= 7;";
+ // 20 is the height of pin.png
+ $js_kml .= "myPoint.y -= 20;";
+
+ $js_kml .= "var meetingPointLogoStyle = {'position':'absolute', 'top':0, 'left':0, 'z-index':100, 'font-size':'10px'};\n";
+ $js_kml .= "meetingPointLogoTag = new DivTag('meeting_logo', '".$e_target[0]."', meetingPointLogoStyle);\n";
+ $js_img .= "<img id='meeting_img' border='0' src='".$icon."' title='".$alt."'>";
+ if ($url) {
+ $js_img = "<a href='".$url."' target='_blank'>" . $js_img . "</a>";
+ }
+ $js_kml .= "var meetingPointLogoText = \"" . $js_img . "\";\n";
+ $js_kml .= "meetingPointLogoTag.write(meetingPointLogoText);\n";
+ $js_kml .= "var meeting_img = window.frames['".$e_target[0]."'].document.getElementById('meeting_img');";
+ $js_kml .= "meeting_img.style.position = 'absolute';";
+ $js_kml .= "meeting_img.style.top = myPoint.y;";
+ $js_kml .= "meeting_img.style.left = myPoint.x;";
+ $js_kml .= "mb_registerPanSubElement('meeting_logo');";
+ }
+ }
+ else {
+ $js_error .= "alert('".$adm->getUserNameByUserId($user)." is not allowed to access WMC ".$wmc_id.". Default GUI will be loaded instead.');";
+ }
+ }
+ else {
+ $js_error .= "alert('WMC id ".$wmc_id." is not valid. Default GUI will be loaded instead.');";
+ }
+}
+echo "function mod_initWMC_init() {";
+echo $js_wmc;
+echo $js_kml;
+echo $js_error;
+echo "}";
+
+echo "function addFlag() {";
+echo $js_kml;
+echo $js_error;
+echo "}";
+
+
+?>
+
+mb_registerInitFunctions("mod_initWMC()");
+function mod_initWMC(){
+ mod_initWMC_init();
+ mb_registerSubFunctions('addFlag()');
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_insertKmlIntoDb.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,105 +0,0 @@
-<?php
-#$Id: mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-include("../../conf/mapbender.conf");
-include("../classes/class_kml.php");
-session_start();
-$gui_id = $_REQUEST["gui_id"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<!--
-Licensing: See the GNU General Public License for more details.
-http://www.gnu.org/copyleft/gpl.html
-or:
-mapbender/licence/
--->
-
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>MB2 - <?php echo $_REQUEST["gui_id"];?></title>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-</head>
-<body>
-<?php
-if ($_POST["data"]) {
-
- $d = explode("____", $_POST["data"]);
- $wmc_id = $d[0];
- $x = $d[1];
- $y = $d[2];
- $icon = $d[3];
- $gui_id = $d[4];
- $title_array = array();
- if ($_POST['name']) $title_array[count($title_array)] = $_POST['name'];
- if ($_POST['street']) $title_array[count($title_array)] = $_POST['street'];
- if ($_POST['postcode']) {
- if ($_POST['city']) {
- $title_array[count($title_array)] = $_POST['postcode'] . " " . $_POST['city'];
- }
- else {
- $title_array[count($title_array)] = $_POST['postcode'];
- }
- }
- elseif ($_POST['city']) {
- $title_array[count($title_array)] = $_POST['city'];
- }
- if ($_POST['website']) $title_array[count($title_array)] = $_POST['website'];
-
- $title = implode(", ", $title_array);
- $description = $_POST['description'];
-
- $kml = new kml($title, $description, $x, $y, $icon);
- $kml->createKMLFromObj();
-
- $sql = "INSERT INTO mb_meetingpoint VALUES ($1, $2, $3, $4, $5, $6)";
- $v = array($kml->kml_id, $wmc_id, str_replace("&", "&" , html_entity_decode($kml->kml)), $_SESSION["mb_user_id"], $_SESSION["mb_user_password"], $gui_id);
- $t = array('s', 's', 's', 'i', 's', 's');
- $res = db_prep_query($sql, $v, $t);
-
- if (db_error()) {
- echo "<script>var title = \"" . $title . "\";alert(\"Error while saving KML document \" + title + \"! ".db_error()."\");</script>";
- }
- else {
- if ($alert) {
- echo "<script>var title = \"" . $title . "\";alert(\"KML document \" + title + \"has been saved!\")</script>";
- }
- }
- $filename = "../tmp/".$kml->kml_id.'.kml';
- $handle = fopen($filename, "w");
- fputs($handle, str_replace("&", "&" , html_entity_decode($kml->kml)));
- fclose($handle);
-
- echo "Please feel free to add the <a href = 'http://".$_SERVER['HTTP_HOST']."/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.<br><br>";
- echo "<a href='".$filename."'>kml</a>";
-}
-?>
-
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php (from rev 2181, branches/2.4.5/http/javascripts/mod_insertKmlIntoDb.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_insertKmlIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,103 @@
+<?php
+#$Id: mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+include("../classes/class_kml.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<!--
+Licensing: See the GNU General Public License for more details.
+http://www.gnu.org/copyleft/gpl.html
+or:
+mapbender/licence/
+-->
+
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>MB2 - <?php echo $gui_id;?></title>
+<?php
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+</head>
+<body>
+<?php
+if ($_POST["data"]) {
+
+ $d = explode("____", $_POST["data"]);
+ $wmc_id = $d[0];
+ $x = $d[1];
+ $y = $d[2];
+ $icon = $d[3];
+ $gui_id = $d[4];
+ $title_array = array();
+ if ($_POST['name']) $title_array[count($title_array)] = $_POST['name'];
+ if ($_POST['street']) $title_array[count($title_array)] = $_POST['street'];
+ if ($_POST['postcode']) {
+ if ($_POST['city']) {
+ $title_array[count($title_array)] = $_POST['postcode'] . " " . $_POST['city'];
+ }
+ else {
+ $title_array[count($title_array)] = $_POST['postcode'];
+ }
+ }
+ elseif ($_POST['city']) {
+ $title_array[count($title_array)] = $_POST['city'];
+ }
+ if ($_POST['website']) $title_array[count($title_array)] = $_POST['website'];
+
+ $title = implode(", ", $title_array);
+ $description = $_POST['description'];
+
+ $kml = new kml($title, $description, $x, $y, $icon);
+ $kml->createKMLFromObj();
+
+ $sql = "INSERT INTO mb_meetingpoint VALUES ($1, $2, $3, $4, $5, $6)";
+ $v = array($kml->kml_id, $wmc_id, str_replace("&", "&" , html_entity_decode($kml->kml)), $_SESSION["mb_user_id"], $_SESSION["mb_user_password"], $gui_id);
+ $t = array('s', 's', 's', 'i', 's', 's');
+ $res = db_prep_query($sql, $v, $t);
+
+ if (db_error()) {
+ echo "<script>var title = \"" . $title . "\";alert(\"Error while saving KML document \" + title + \"! ".db_error()."\");</script>";
+ }
+ else {
+ if ($alert) {
+ echo "<script>var title = \"" . $title . "\";alert(\"KML document \" + title + \"has been saved!\")</script>";
+ }
+ }
+ $filename = "../tmp/".$kml->kml_id.'.kml';
+ $handle = fopen($filename, "w");
+ fputs($handle, str_replace("&", "&" , html_entity_decode($kml->kml)));
+ fclose($handle);
+
+ echo "Please feel free to add the <a href = 'http://".$_SERVER['HTTP_HOST']."/mburl/".$kml->kml_id."'>link</a> to your meeting point to your website.<br><br>";
+ echo "<a href='".$filename."'>kml</a>";
+}
+?>
+
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_insertLayerPreviewIntoDb.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,152 +0,0 @@
-<?php
-#$Id: mod_insertWmcIntoDb.php 359 2006-10-09 16:41:18Z christoph $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include("../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-
-function escByteA($binData) {
- $search = array();
- $replace = array();
- array_push($search, chr(92));
- array_push($replace, '\\134');
- array_push($search, chr(0));
- array_push($replace, '\\000');
- array_push($search, chr(39));
- array_push($replace, '\\047');
- array_push($search, chr(13));
- array_push($replace, '\\015');
- array_push($search, chr(10));
- array_push($replace, '\\012');
-
- $binData = str_replace($search, $replace, $binData);
- return $binData;
-}
-
-
-if ($_POST["data"]) {
- $d = explode("____", $_POST["data"]);
-
- $mapurl = $d[0];
- $legendurl = $d[1];
-
- $mapurl = eregi_replace("(&width=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
- $mapurl = eregi_replace("(&height=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
-
- $adm = new administration();
- $layer_id = $_SESSION['layer_preview'];
- if (!$layer_id) {
- echo "<script>alert('Could not find wms: ".$wms_getmap."');</script>";
- }
- else {
- $map_img = file_get_contents($mapurl);
- $legend_img = file_get_contents($legendurl);
-
-// $rlp_4326_box = array(6.10988942079081,48.987785376052,8.58790010810365,50.9273496139233);
- $rlp_4326_box = array(6.05,48.9,8.6,50.96);
-
- $sql = "SELECT * FROM layer_epsg WHERE fkey_layer_id = $1 AND epsg = 'EPSG:4326'";
- $v = array($layer_id);
- $t = array('i');
- $res = db_prep_query($sql, $v, $t);
- $row = db_fetch_array($res);
- if ($row['minx'] && $row['miny'] && $row['maxx'] && $row['maxy']) {
- $extent_layer_id = $layer_id;
- $layer_4326_box = array($row['minx'], $row['miny'], $row['maxx'], $row['maxy']);
- }
- else {
- $sql = "SELECT * FROM (SELECT fkey_wms_id FROM layer WHERE layer_id = $1 LIMIT 1) AS w, layer_epsg AS e, layer AS l WHERE l.fkey_wms_id = w.fkey_wms_id AND l.layer_pos = 0 AND l.layer_id = e.fkey_layer_id AND e.epsg = 'EPSG:4326'";
- $v = array($layer_id);
- $t = array('i');
- $res = db_prep_query($sql, $v, $t);
- $row = db_fetch_array($res);
- if ($row['epsg'] && $row['minx'] && $row['miny'] && $row['maxx'] && $row['maxy']) {
- $layer_4326_box = array($row['minx'], $row['miny'], $row['maxx'], $row['maxy']);
- $extent_layer_id = $row['layer_id'];
- }
- else {
- $layer_4326_box = $rlp_4326_box;
- $extent_layer_id = $layer_id;
- }
- }
-
- if ($layer_4326_box[0] <= $rlp_4326_box[0] || $layer_4326_box[2] >= $rlp_4326_box[2] || $layer_4326_box[1] <= $rlp_4326_box[1] || $layer_4326_box[3] >= $rlp_4326_box[3]) {
- if ($layer_4326_box[0] < $rlp_4326_box[0]) {
- $rlp_4326_box[0] = $layer_4326_box[0];
- }
- if ($layer_4326_box[2] > $rlp_4326_box[2]) {
- $rlp_4326_box[2] = $layer_4326_box[2];
- }
- if ($layer_4326_box[1] < $rlp_4326_box[1]) {
- $rlp_4326_box[1] = $layer_4326_box[1];
- }
- if ($layer_4326_box[3] > $rlp_4326_box[3]) {
- $rlp_4326_box[3] = $layer_4326_box[3];
- }
-
- $d_x = $rlp_4326_box[2] - $rlp_4326_box[0];
- $d_y = $rlp_4326_box[3] - $rlp_4326_box[1];
-
- $new_minx = $rlp_4326_box[0] - 0.05*($d_x);
- $new_maxx = $rlp_4326_box[2] + 0.05*($d_x);
- $new_miny = $rlp_4326_box[1] - 0.05*($d_y);
- $new_maxy = $rlp_4326_box[3] + 0.05*($d_y);
-
- if ($new_minx < -180) $rlp_4326_box[0] = -180; else $rlp_4326_box[0] = $new_minx;
- if ($new_maxx > 180) $rlp_4326_box[2] = 180; else $rlp_4326_box[2] = $new_maxx;
- if ($new_miny < -90) $rlp_4326_box[1] = -90; else $rlp_4326_box[1] = $new_miny;
- if ($new_maxy > 90) $rlp_4326_box[3] = 90; else $rlp_4326_box[3] = $new_maxy;
- }
-// echo "<script>prompt('link', 'http://212.79.172.107/cgi-bin/mapserv?map=/data/umn/service_layer.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=rlp,ows_layer&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=600&HEIGHT=600&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&layer_id=".$extent_layer_id."');</script>";
- $extent_img = file_get_contents("http://212.79.172.107/cgi-bin/mapserv?map=/data/umn/service_layer.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=rlp,ows_layer&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&layer_id=".$extent_layer_id);
-
- $sql = "SELECT * FROM layer_preview WHERE fkey_layer_id = $1";
- $v = array($layer_id);
- $t = array('i');
- $res = db_prep_query($sql, $v, $t);
- $row = db_fetch_array($res);
- if ($row['fkey_layer_id'] == $layer_id) {
- $sql = "UPDATE layer_preview SET layer_map_preview = $1, layer_extent_preview = $2, layer_legend_preview = $3 WHERE fkey_layer_id = $4";
- $v = array( escByteA($map_img), escByteA($extent_img), escByteA($legend_img), $layer_id);
- $t = array('s', 's', 's', 'i');
- }
- else {
- $sql = "INSERT INTO layer_preview (fkey_layer_id, layer_map_preview, layer_extent_preview, layer_legend_preview) VALUES ($1, $2, $3, $4)";
- $v = array($layer_id, escByteA($map_img), escByteA($extent_img), escByteA($legend_img));
- $t = array('i', 's', 's', 's');
- }
-
-
- $res = db_prep_query($sql, $v, $t);
- if (db_error()) {
- echo "<script>alert(\"Error while saving layer preview: ".addslashes(db_error())."\");</script>";
- }
- else {
- echo "<script>try{parent.opener.document.getElementById('".$layer_id."_dp').style.display='';}catch(e){};alert(\"Layer preview has been saved!\")</script>";
- }
- }
-}
-?>
-</body>
-<html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php (from rev 2181, branches/2.4.5/http/javascripts/mod_insertLayerPreviewIntoDb.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_insertLayerPreviewIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,146 @@
+<?php
+#$Id: mod_insertWmcIntoDb.php 359 2006-10-09 16:41:18Z christoph $
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+function escByteA($binData) {
+ $search = array();
+ $replace = array();
+ array_push($search, chr(92));
+ array_push($replace, '\\134');
+ array_push($search, chr(0));
+ array_push($replace, '\\000');
+ array_push($search, chr(39));
+ array_push($replace, '\\047');
+ array_push($search, chr(13));
+ array_push($replace, '\\015');
+ array_push($search, chr(10));
+ array_push($replace, '\\012');
+
+ $binData = str_replace($search, $replace, $binData);
+ return $binData;
+}
+
+
+if ($_POST["data"]) {
+ $d = explode("____", $_POST["data"]);
+
+ $mapurl = $d[0];
+ $legendurl = $d[1];
+
+ $mapurl = eregi_replace("(&width=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
+ $mapurl = eregi_replace("(&height=)[0-9]+($|[^0-9])", "\\1200\\2", $mapurl);
+
+ $adm = new administration();
+ $layer_id = $_SESSION['layer_preview'];
+ if (!$layer_id) {
+ echo "<script>alert('Could not find wms: ".$wms_getmap."');</script>";
+ }
+ else {
+ $map_img = file_get_contents($mapurl);
+ $legend_img = file_get_contents($legendurl);
+
+// $rlp_4326_box = array(6.10988942079081,48.987785376052,8.58790010810365,50.9273496139233);
+ $rlp_4326_box = array(6.05,48.9,8.6,50.96);
+
+ $sql = "SELECT * FROM layer_epsg WHERE fkey_layer_id = $1 AND epsg = 'EPSG:4326'";
+ $v = array($layer_id);
+ $t = array('i');
+ $res = db_prep_query($sql, $v, $t);
+ $row = db_fetch_array($res);
+ if ($row['minx'] && $row['miny'] && $row['maxx'] && $row['maxy']) {
+ $extent_layer_id = $layer_id;
+ $layer_4326_box = array($row['minx'], $row['miny'], $row['maxx'], $row['maxy']);
+ }
+ else {
+ $sql = "SELECT * FROM (SELECT fkey_wms_id FROM layer WHERE layer_id = $1 LIMIT 1) AS w, layer_epsg AS e, layer AS l WHERE l.fkey_wms_id = w.fkey_wms_id AND l.layer_pos = 0 AND l.layer_id = e.fkey_layer_id AND e.epsg = 'EPSG:4326'";
+ $v = array($layer_id);
+ $t = array('i');
+ $res = db_prep_query($sql, $v, $t);
+ $row = db_fetch_array($res);
+ if ($row['epsg'] && $row['minx'] && $row['miny'] && $row['maxx'] && $row['maxy']) {
+ $layer_4326_box = array($row['minx'], $row['miny'], $row['maxx'], $row['maxy']);
+ $extent_layer_id = $row['layer_id'];
+ }
+ else {
+ $layer_4326_box = $rlp_4326_box;
+ $extent_layer_id = $layer_id;
+ }
+ }
+
+ if ($layer_4326_box[0] <= $rlp_4326_box[0] || $layer_4326_box[2] >= $rlp_4326_box[2] || $layer_4326_box[1] <= $rlp_4326_box[1] || $layer_4326_box[3] >= $rlp_4326_box[3]) {
+ if ($layer_4326_box[0] < $rlp_4326_box[0]) {
+ $rlp_4326_box[0] = $layer_4326_box[0];
+ }
+ if ($layer_4326_box[2] > $rlp_4326_box[2]) {
+ $rlp_4326_box[2] = $layer_4326_box[2];
+ }
+ if ($layer_4326_box[1] < $rlp_4326_box[1]) {
+ $rlp_4326_box[1] = $layer_4326_box[1];
+ }
+ if ($layer_4326_box[3] > $rlp_4326_box[3]) {
+ $rlp_4326_box[3] = $layer_4326_box[3];
+ }
+
+ $d_x = $rlp_4326_box[2] - $rlp_4326_box[0];
+ $d_y = $rlp_4326_box[3] - $rlp_4326_box[1];
+
+ $new_minx = $rlp_4326_box[0] - 0.05*($d_x);
+ $new_maxx = $rlp_4326_box[2] + 0.05*($d_x);
+ $new_miny = $rlp_4326_box[1] - 0.05*($d_y);
+ $new_maxy = $rlp_4326_box[3] + 0.05*($d_y);
+
+ if ($new_minx < -180) $rlp_4326_box[0] = -180; else $rlp_4326_box[0] = $new_minx;
+ if ($new_maxx > 180) $rlp_4326_box[2] = 180; else $rlp_4326_box[2] = $new_maxx;
+ if ($new_miny < -90) $rlp_4326_box[1] = -90; else $rlp_4326_box[1] = $new_miny;
+ if ($new_maxy > 90) $rlp_4326_box[3] = 90; else $rlp_4326_box[3] = $new_maxy;
+ }
+// echo "<script>prompt('link', 'http://212.79.172.107/cgi-bin/mapserv?map=/data/umn/service_layer.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=rlp,ows_layer&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=600&HEIGHT=600&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&layer_id=".$extent_layer_id."');</script>";
+ $extent_img = file_get_contents("http://212.79.172.107/cgi-bin/mapserv?map=/data/umn/service_layer.map&VERSION=1.1.1&REQUEST=GetMap&SERVICE=WMS&LAYERS=rlp,ows_layer&STYLES=&SRS=EPSG:4326&BBOX=".$rlp_4326_box[0].",".$rlp_4326_box[1].",".$rlp_4326_box[2].",".$rlp_4326_box[3]."&WIDTH=120&HEIGHT=120&FORMAT=image/png&BGCOLOR=0xffffff&TRANSPARENT=TRUE&EXCEPTIONS=application/vnd.ogc.se_inimage&layer_id=".$extent_layer_id);
+
+ $sql = "SELECT * FROM layer_preview WHERE fkey_layer_id = $1";
+ $v = array($layer_id);
+ $t = array('i');
+ $res = db_prep_query($sql, $v, $t);
+ $row = db_fetch_array($res);
+ if ($row['fkey_layer_id'] == $layer_id) {
+ $sql = "UPDATE layer_preview SET layer_map_preview = $1, layer_extent_preview = $2, layer_legend_preview = $3 WHERE fkey_layer_id = $4";
+ $v = array( escByteA($map_img), escByteA($extent_img), escByteA($legend_img), $layer_id);
+ $t = array('s', 's', 's', 'i');
+ }
+ else {
+ $sql = "INSERT INTO layer_preview (fkey_layer_id, layer_map_preview, layer_extent_preview, layer_legend_preview) VALUES ($1, $2, $3, $4)";
+ $v = array($layer_id, escByteA($map_img), escByteA($extent_img), escByteA($legend_img));
+ $t = array('i', 's', 's', 's');
+ }
+
+
+ $res = db_prep_query($sql, $v, $t);
+ if (db_error()) {
+ echo "<script>alert(\"Error while saving layer preview: ".addslashes(db_error())."\");</script>";
+ }
+ else {
+ echo "<script>try{parent.opener.document.getElementById('".$layer_id."_dp').style.display='';}catch(e){};alert(\"Layer preview has been saved!\")</script>";
+ }
+ }
+}
+?>
+</body>
+<html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_key.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_key.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_key.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,104 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_key.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'keyHandler' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('keyHandler: ID not unique!');";}
-echo "var mod_key_map = '".$e_target."';";
-
-$sql = "SELECT e_id,e_element FROM gui_element WHERE (e_element = 'body' or e_element = 'iframe') AND fkey_gui_id = $1 AND e_public = 1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $ids[$cnt] = $row["e_id"];
- $elements[$cnt] = $row["e_element"];
- $cnt++;
-}
-
-echo "var mb_key_elements = new Array(";
-for($i=0; $i < count($elements); $i++){
- if($i > 0){
- echo ",";
- }
- echo "'".$elements[$i]."'";
-}
-echo ");";
-echo "var mb_key_ids = new Array(";
-for($i=0; $i < count($ids); $i++){
- if($i > 0){ echo ",";}
- echo "'".$ids[$i]."'";
-}
-echo ");";
-?>
-if(ie){
- mb_registerInitFunctions('mod_key_init()');
-}
-function mod_key_init(){
- for(var i=0; i<mb_key_elements.length; i++){
- if(mb_key_elements[i] == "body"){
- document.getElementById(mb_key_ids[i]).onkeydown = mod_key_Keyhandler;
- }
- else{
- window.frames[mb_key_ids[i]].document.getElementsByTagName("body")[0].onkeydown = new Function("mod_key_Keyhandler('" +mb_key_ids[i] + "');");
- }
- }
-}
-function mod_key_Keyhandler(frameName){
- if(frameName){
- var code = eval("window.frames['"+frameName+"'].event.keyCode");
- focus();
- }
- else{
- var code = event.keyCode;
- }
- if(code == 187 || code == 107){
- zoom(mod_key_map,true, '2.0');
- }
- if(code == 189 || code == 109){
- zoom(mod_key_map,false, '2.0');
- }
- if(code == 32 || code == 13){
- setMapRequest(mod_key_map);
- }
- if(code == 37){
- mb_panMap(mod_key_map,"W");
- }
- if(code == 38){
- mb_panMap(mod_key_map,"N");
- }
- if(code == 39){
- mb_panMap(mod_key_map,"E");
- }
- if(code == 40){
- mb_panMap(mod_key_map,"S");
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_key.php (from rev 2181, branches/2.4.5/http/javascripts/mod_key.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_key.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_key.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,102 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_key.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'keyHandler' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('keyHandler: ID not unique!');";}
+echo "var mod_key_map = '".$e_target."';";
+
+$sql = "SELECT e_id,e_element FROM gui_element WHERE (e_element = 'body' or e_element = 'iframe') AND fkey_gui_id = $1 AND e_public = 1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $ids[$cnt] = $row["e_id"];
+ $elements[$cnt] = $row["e_element"];
+ $cnt++;
+}
+
+echo "var mb_key_elements = new Array(";
+for($i=0; $i < count($elements); $i++){
+ if($i > 0){
+ echo ",";
+ }
+ echo "'".$elements[$i]."'";
+}
+echo ");";
+echo "var mb_key_ids = new Array(";
+for($i=0; $i < count($ids); $i++){
+ if($i > 0){ echo ",";}
+ echo "'".$ids[$i]."'";
+}
+echo ");";
+?>
+if(ie){
+ mb_registerInitFunctions('mod_key_init()');
+}
+function mod_key_init(){
+ for(var i=0; i<mb_key_elements.length; i++){
+ if(mb_key_elements[i] == "body"){
+ document.getElementById(mb_key_ids[i]).onkeydown = mod_key_Keyhandler;
+ }
+ else{
+ window.frames[mb_key_ids[i]].document.getElementsByTagName("body")[0].onkeydown = new Function("mod_key_Keyhandler('" +mb_key_ids[i] + "');");
+ }
+ }
+}
+function mod_key_Keyhandler(frameName){
+ if(frameName){
+ var code = eval("window.frames['"+frameName+"'].event.keyCode");
+ focus();
+ }
+ else{
+ var code = event.keyCode;
+ }
+ if(code == 187 || code == 107){
+ zoom(mod_key_map,true, '2.0');
+ }
+ if(code == 189 || code == 109){
+ zoom(mod_key_map,false, '2.0');
+ }
+ if(code == 32 || code == 13){
+ setMapRequest(mod_key_map);
+ }
+ if(code == 37){
+ mb_panMap(mod_key_map,"W");
+ }
+ if(code == 38){
+ mb_panMap(mod_key_map,"N");
+ }
+ if(code == 39){
+ mb_panMap(mod_key_map,"E");
+ }
+ if(code == 40){
+ mb_panMap(mod_key_map,"S");
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_legend.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_legend.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_legend.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,234 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Legend
-# Copyright (C) 2005 CCGIS / terrestris
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Legend</title>
-<?php
-include '../include/dyn_css.php';
-
-$sql = "SELECT DISTINCT e_target, e_width, e_height FROM gui_element WHERE e_id = '".$_REQUEST["e_id_css"]."' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('legend: ID not unique!');";
-}
-
-$sql2 = "SELECT e_left,e_top,e_width,e_height FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res2 = db_prep_query($sql2, $v, $t);
-echo "<script type='text/javascript'>\n";
-echo "var mod_legend_target = '".$e_target."';\n";
-echo "var mod_legend_target_left = ".db_result($res2,0,"e_left").";\n";
-echo "var mod_legend_target_top = ".db_result($res2,0,"e_top").";\n";
-echo "var mod_legend_target_width = ".db_result($res2,0,"e_width").";\n";
-echo "var mod_legend_target_height = ".db_result($res2,0,"e_height").";\n";
-echo "</script>\n";
-?>
-
-<script type="text/javascript">
-<!--
-mod_legend_offsetLeft = 25;
-mod_legend_offsetTop = -10;
-
-try{
- if (checkbox_on_off){}
-}
-catch(e){
- checkbox_on_off = 'false';
-}
-
-try{
- if (stickylegend){}
-}
-catch(e){
- stickylegend = 'false';
-}
-
-parent.mb_registerSubFunctions("window.frames['legend'].mod_legend_pos()");
-
-
-function mod_legend_init(){
- var obj = parent.document.getElementById("legend");
- obj.style.top = mod_legend_target_top + mod_legend_offsetTop;
- obj.style.left = mod_legend_target_left + mod_legend_target_width + mod_legend_offsetLeft;
- var checkobj = document.getElementById("checkboxstyle");
- if (checkbox_on_off == 'false'){
- checkobj.style.visibility = "hidden";
- checkobj.style.width = 0;
- checkobj.style.height = 0;
- }
-}
-function mod_legend_repaint(obj){
- var checkobj = document.getElementById("checkboxstyle");
- if(checkobj.style.visibility == "visible"){
- mod_legend_pos();
- }
-}
-function mod_legend_pos(){
- var ind = parent.getMapObjIndexByName(mod_legend_target);
- var obj = parent.document.getElementById("legend");
-
- if(stickylegend == 'true'){
- obj.style.left = parseInt(parent.mb_mapObj[ind].width) + mod_legend_target_left + mod_legend_offsetLeft;
- }
-
- if(document.forms[0].sw.checked == false){
- parent.writeTag("legend", "leg", "");
- return true;
- }
-
- var layers;
- var str = "";
- var str_tmp = "";
-
- for(var i=0; i<parent.mb_mapObj[ind].wms.length; i++){
- var img_format = parent.mb_mapObj[ind].wms[i].gui_wms_mapformat;
- //if(parent.mb_mapObj[ind].wms[i].wms_getlegendurl != ""){
- if(parent.mb_mapObj[ind].wms[i].gui_wms_visible != 0){
- layers = parent.mb_checkScale(mod_legend_target,ind,i);
-
- if(layers[0] != ""){
- var layer = layers[0].split(",");
- var titles = layers[2].split(",");
- var legendurl = layers[3].split(",");
- var layerparent= layers[4].split(",");
- var tmp_name = "";
-
-
- for(var j=0; j<layer.length; j++){
-
- var l = parent.mb_getchildsbyname(ind,i,layer[j]);
-
- // handle grouped layers
- if (l) {
- for (var k=0; k<l["name"].length; k++){
- //str_tmp += l["title"][k]; // ------
-
-
- if (l["legendurl"][k]!='' && l["legendurl"][k]!=0){
- if (tmp_name != l["title"][k]) {
- if (showgroupedlayertitle == 'true'){
- str_tmp += "<div><span class='titles'>" +l["title"][k]+ "</span></div>";
- }
- str_tmp += "<div>";
- if(legendlink == 'true'){
- str_tmp += "<a href='../php/result.php?lingo=deutsch&layer="+layer[j]+l["name"][k]+"' class='legendlink' title='Zeigt Liste zum Thema: "+titles[j]+"' target='result'>";
- }
- str_tmp += "<img border=0 src = '";
- str_tmp += l["legendurl"][k];
- str_tmp += "'></img>";
- //str_tmp += l["legendurl"][k];
- if (legendlink == 'true'){
- str_tmp += "</a>";
- }
- str_tmp += "</div>";
- tmp_name = l["title"][k];
- } // if
- } // if legendurl
- } // for var k=0
- } // if (l)
- else {
- if (legendurl[j]!='' && legendurl[j]!=0){
- if(layerparent[j] == 0){
- if(showlayertitle == 'true'){
- str_tmp += "<div><span class='titles'>" + titles[j]+ "</span></div>";
- }
- str_tmp += "<div>";
- if(legendlink == 'true'){
- str_tmp += "<a href='../php/result.php?lingo=deutsch&layer="+layer[j]+"' class='link_metadata' title='Zeigt Liste zum Thema: "+titles[j]+"' target='result'>";
- }
- str_tmp += "<img border=0 src = '";
- str_tmp += legendurl[j];
-
- str_tmp += "'></img>";
-
- //str_tmp += "legend:"+legendurl[j];
- if (legendlink == 'true'){
- str_tmp += "</a>";
- }
- str_tmp += "</div>";
- }//layerparent
- } // legendurl[j]!='' && legendurl[j]!=0
- } // else
-
-
-
-
- }// for
- } // if (layers[0...
- //} // if (parent.mb_mapObj[ind].wms[i].wms_getlegendurl != "")
- }
-
- if(str_tmp !=''){
- if (showwmstitle == 'true'){
- str += "<div><span class='header'>" +parent.mb_mapObj[ind].wms[i].wms_title+ "</span></div>";
- }
- str += str_tmp;
- //prompt('',str_tmp);
- str_tmp ='';
- }
-
- }// for
-
- if(str != ""){
- parent.writeTag("legend", "leg", str);
- //prompt('',str);
- }
- else{
- parent.writeTag("legend", "leg", "");
- }
- return true;
-} // function mod_legend_pos()
-
-// -->
-</script>
-
-</head>
-<body onload='mod_legend_init()'>
-<form>
-
-<span class='switch'>
-<div id="checkboxstyle" style="visibility:visible;">on/off<input type='checkbox' name='sw' checked='true' onclick='mod_legend_repaint(this)'></div>
-</span>
-<div name='leg' id='leg' ></div>
-
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_legend.php (from rev 2140, branches/2.4.5/http/javascripts/mod_legend.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_legend.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_legend.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,233 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Legend
+# Copyright (C) 2005 CCGIS / terrestris
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Legend</title>
+<?php
+include '../include/dyn_css.php';
+
+$sql = "SELECT DISTINCT e_target, e_width, e_height FROM gui_element WHERE e_id = '".$_REQUEST["e_id_css"]."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('legend: ID not unique!');";
+}
+
+$sql2 = "SELECT e_left,e_top,e_width,e_height FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res2 = db_prep_query($sql2, $v, $t);
+echo "<script type='text/javascript'>\n";
+echo "var mod_legend_target = '".$e_target."';\n";
+echo "var mod_legend_target_left = ".db_result($res2,0,"e_left").";\n";
+echo "var mod_legend_target_top = ".db_result($res2,0,"e_top").";\n";
+echo "var mod_legend_target_width = ".db_result($res2,0,"e_width").";\n";
+echo "var mod_legend_target_height = ".db_result($res2,0,"e_height").";\n";
+echo "</script>\n";
+?>
+
+<script type="text/javascript">
+<!--
+mod_legend_offsetLeft = 25;
+mod_legend_offsetTop = -10;
+
+try{
+ if (checkbox_on_off){}
+}
+catch(e){
+ checkbox_on_off = 'false';
+}
+
+try{
+ if (stickylegend){}
+}
+catch(e){
+ stickylegend = 'false';
+}
+
+parent.mb_registerSubFunctions("window.frames['legend'].mod_legend_pos()");
+
+
+function mod_legend_init(){
+ var obj = parent.document.getElementById("legend");
+ obj.style.top = mod_legend_target_top + mod_legend_offsetTop;
+ obj.style.left = mod_legend_target_left + mod_legend_target_width + mod_legend_offsetLeft;
+ var checkobj = document.getElementById("checkboxstyle");
+ if (checkbox_on_off == 'false'){
+ checkobj.style.visibility = "hidden";
+ checkobj.style.width = 0;
+ checkobj.style.height = 0;
+ }
+}
+function mod_legend_repaint(obj){
+ var checkobj = document.getElementById("checkboxstyle");
+ if(checkobj.style.visibility == "visible"){
+ mod_legend_pos();
+ }
+}
+function mod_legend_pos(){
+ var ind = parent.getMapObjIndexByName(mod_legend_target);
+ var obj = parent.document.getElementById("legend");
+
+ if(stickylegend == 'true'){
+ obj.style.left = parseInt(parent.mb_mapObj[ind].width) + mod_legend_target_left + mod_legend_offsetLeft;
+ }
+
+ if(document.forms[0].sw.checked == false){
+ parent.writeTag("legend", "leg", "");
+ return true;
+ }
+
+ var layers;
+ var str = "";
+ var str_tmp = "";
+
+ for(var i=0; i<parent.mb_mapObj[ind].wms.length; i++){
+ var img_format = parent.mb_mapObj[ind].wms[i].gui_wms_mapformat;
+ //if(parent.mb_mapObj[ind].wms[i].wms_getlegendurl != ""){
+ if(parent.mb_mapObj[ind].wms[i].gui_wms_visible != 0){
+ layers = parent.mb_checkScale(mod_legend_target,ind,i);
+
+ if(layers[0] != ""){
+ var layer = layers[0].split(",");
+ var titles = layers[2].split(",");
+ var legendurl = layers[3].split(",");
+ var layerparent= layers[4].split(",");
+ var tmp_name = "";
+
+
+ for(var j=0; j<layer.length; j++){
+
+ var l = parent.mb_getchildsbyname(ind,i,layer[j]);
+
+ // handle grouped layers
+ if (l) {
+ for (var k=0; k<l["name"].length; k++){
+ //str_tmp += l["title"][k]; // ------
+
+
+ if (l["legendurl"][k]!='' && l["legendurl"][k]!=0){
+ if (tmp_name != l["title"][k]) {
+ if (showgroupedlayertitle == 'true'){
+ str_tmp += "<div><span class='titles'>" +l["title"][k]+ "</span></div>";
+ }
+ str_tmp += "<div>";
+ if(legendlink == 'true'){
+ str_tmp += "<a href='../php/result.php?lingo=deutsch&layer="+layer[j]+l["name"][k]+"' class='legendlink' title='Zeigt Liste zum Thema: "+titles[j]+"' target='result'>";
+ }
+ str_tmp += "<img border=0 src = '";
+ str_tmp += l["legendurl"][k];
+ str_tmp += "'></img>";
+ //str_tmp += l["legendurl"][k];
+ if (legendlink == 'true'){
+ str_tmp += "</a>";
+ }
+ str_tmp += "</div>";
+ tmp_name = l["title"][k];
+ } // if
+ } // if legendurl
+ } // for var k=0
+ } // if (l)
+ else {
+ if (legendurl[j]!='' && legendurl[j]!=0){
+ if(layerparent[j] == 0){
+ if(showlayertitle == 'true'){
+ str_tmp += "<div><span class='titles'>" + titles[j]+ "</span></div>";
+ }
+ str_tmp += "<div>";
+ if(legendlink == 'true'){
+ str_tmp += "<a href='../php/result.php?lingo=deutsch&layer="+layer[j]+"' class='link_metadata' title='Zeigt Liste zum Thema: "+titles[j]+"' target='result'>";
+ }
+ str_tmp += "<img border=0 src = '";
+ str_tmp += legendurl[j];
+
+ str_tmp += "'></img>";
+
+ //str_tmp += "legend:"+legendurl[j];
+ if (legendlink == 'true'){
+ str_tmp += "</a>";
+ }
+ str_tmp += "</div>";
+ }//layerparent
+ } // legendurl[j]!='' && legendurl[j]!=0
+ } // else
+
+
+
+
+ }// for
+ } // if (layers[0...
+ //} // if (parent.mb_mapObj[ind].wms[i].wms_getlegendurl != "")
+ }
+
+ if(str_tmp !=''){
+ if (showwmstitle == 'true'){
+ str += "<div><span class='header'>" +parent.mb_mapObj[ind].wms[i].wms_title+ "</span></div>";
+ }
+ str += str_tmp;
+ //prompt('',str_tmp);
+ str_tmp ='';
+ }
+
+ }// for
+
+ if(str != ""){
+ parent.writeTag("legend", "leg", str);
+ //prompt('',str);
+ }
+ else{
+ parent.writeTag("legend", "leg", "");
+ }
+ return true;
+} // function mod_legend_pos()
+
+// -->
+</script>
+
+</head>
+<body onload='mod_legend_init()'>
+<form>
+
+<span class='switch'>
+<div id="checkboxstyle" style="visibility:visible;">on/off<input type='checkbox' name='sw' checked='true' onclick='mod_legend_repaint(this)'></div>
+</span>
+<div name='leg' id='leg' ></div>
+
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_loadwmc.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,78 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_loadwmc.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_wmc.php");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect(DBSERVER, OWNER, PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('loadwmc: ID not unique!');";
-}
-
-echo "mod_loadwmc_target = '".$e_target."';";
-
-?>
-
-function load_wmc_session() {
- <?php
- if (isset($_SESSION['mb_wmc']) && !empty($_SESSION['mb_wmc'])) {
- $wmc = new wmc();
- if ($wmc->createObjFromWMC_xml($_SESSION['mb_wmc'])) {
-/*
- if ($_SESSION['layer_preview']) {
- $js = $wmc->createJsObjFromWMC("", $e_target, "load");
- }
- else if ($_SESSION['startup'] == true) {
- $js = $wmc->createJsObjFromWMC("", $e_target, "merge");
- $_SESSION['startup'] = false;
- }
- else {
-*/
- $js = $wmc->createJsObjFromWMC("", $e_target, "load");
-// }
- echo $js;
- }
- }
- ?>
-}
-//mb_registerInitFunctions('load_wmc_session()');
-
-var mod_loadwmc_img = new Image(); mod_loadwmc_img.src = "<?php echo $e_src; ?>";
-//var mod_loadwmc_img_over = new Image(); mod_loadwmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function mod_loadwmc(obj){
- windowWmc = window.open("../php/mb_listWMCs.php?<?php echo "e_id=".$e_id . "&" . SID;?>","displayWmc","width=500, height=600, scrollbars=yes, dependent=yes");
- //windowWmc.focus();
-}
-function mod_loadwmc_init(obj){
- //document.getElementById("loadwmc").src = mod_zoom1_img_over.src;
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php (from rev 2181, branches/2.4.5/http/javascripts/mod_loadwmc.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_loadwmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,74 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_loadwmc.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_wmc.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('loadwmc: ID not unique!');";
+}
+
+echo "mod_loadwmc_target = '".$e_target."';";
+
+?>
+
+function load_wmc_session() {
+ <?php
+ if (isset($_SESSION['mb_wmc']) && !empty($_SESSION['mb_wmc'])) {
+ $wmc = new wmc();
+ if ($wmc->createObjFromWMC_xml($_SESSION['mb_wmc'])) {
+/*
+ if ($_SESSION['layer_preview']) {
+ $js = $wmc->createJsObjFromWMC("", $e_target, "load");
+ }
+ else if ($_SESSION['startup'] == true) {
+ $js = $wmc->createJsObjFromWMC("", $e_target, "merge");
+ $_SESSION['startup'] = false;
+ }
+ else {
+*/
+ $js = $wmc->createJsObjFromWMC("", $e_target, "load");
+// }
+ echo $js;
+ }
+ }
+ ?>
+}
+//mb_registerInitFunctions('load_wmc_session()');
+
+var mod_loadwmc_img = new Image(); mod_loadwmc_img.src = "<?php echo $e_src; ?>";
+//var mod_loadwmc_img_over = new Image(); mod_loadwmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function mod_loadwmc(obj){
+ windowWmc = window.open("../php/mb_listWMCs.php?<?php echo "e_id=".$e_id . "&" . SID;?>","displayWmc","width=500, height=600, scrollbars=yes, dependent=yes");
+ //windowWmc.focus();
+}
+function mod_loadwmc_init(obj){
+ //document.getElementById("loadwmc").src = mod_zoom1_img_over.src;
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_measure.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_measure.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_measure.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,260 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_measure.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'measure' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('measure: ID not unique!');";
-}
-echo "var mod_measure_target = '".$e_target."';";
-?>
-var mod_measure_color1 = "white";
-var mod_measure_color2 = "black";
-var mod_measure_font = "Arial, Helvetica, sans-serif";
-var mod_measure_fontsize = "9px";
-var mod_measure_basepoint = "#8a2be2";
-var mod_measure_linepoint = "#ff00ff";
-var mod_measure_bg = "";
-var mod_measure_pgsql = true;
-
-var mod_measure_win = null;
-
-var mod_measure_elName = "measure";
-var mod_measure_frameName = "";
-var mod_measure_epsg;
-var mod_measure_width;
-var mod_measure_height;
-var mod_measure_RX = new Array();
-var mod_measure_RY = new Array();
-var mod_measure_Dist = new Array();
-var mod_measure_TotalDist = new Array();
-var mod_measureSubFunctions = new Array();
-
-var mod_measure_img_on = new Image(); mod_measure_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_measure_img_off = new Image(); mod_measure_img_off.src = "<?php echo $e_src; ?>";
-var mod_measure_img_over = new Image(); mod_measure_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_mod_measure(ind){
- mb_button[ind] = document.getElementById(mod_measure_elName);
- mb_button[ind].img_over = mod_measure_img_over.src;
- mb_button[ind].img_on = mod_measure_img_on.src;
- mb_button[ind].img_off = mod_measure_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_measure_elName;
- mb_button[ind].fName = mod_measure_frameName;
- mb_button[ind].go = new Function ("mod_measure_go()");
- mb_button[ind].stop = new Function ("mod_measure_disable()");
- var ind = getMapObjIndexByName(mod_measure_target);
- mod_measure_width = mb_mapObj[ind].width;
- mod_measure_height = mb_mapObj[ind].height;
- mod_measure_epsg = mb_mapObj[ind].epsg;
- mb_registerSubFunctions("drawDashedLine()");
- mb_registerPanSubElement("measuring");
-}
-function register_measureSubFunctions(stringFunction){
- mod_measureSubFunctions[mod_measureSubFunctions.length] = stringFunction;
-}
-function mod_measure_go(){
- var el = window.frames[mod_measure_target].document;
- el.onmousedown = mod_measure_start;
- el.onmousemove = mod_measure_run;
- var measureSub = "";
- for(var i=0; i<mod_measureSubFunctions.length; i++){
- measureSub += eval(mod_measureSubFunctions[i]);
- }
- writeTag(mod_measure_target,"measure_sub",measureSub);
-}
-function mod_measure_disable(){
- var el = window.frames[mod_measure_target].document;
- el.onmousedown = null;
- el.onmousemove = null;
- writeTag(mod_measure_target,"measure_display","");
- writeTag(mod_measure_target,"measure_sub","");
-}
-function mod_measure_timeout(){
- var el = window.frames[mod_measure_target].document;
- el.onmousedown = null;
- el.ondblclick = null;
- el.onmousemove = null;
-}
-function mod_measure_disableTimeout(){
- var el = window.frames[mod_measure_target].document;
- el.onmousedown = mod_measure_start;
- el.onmousemove = mod_measure_run;
-}
-function mod_measure_start(e){
- mb_getMousePos(e,mod_measure_target);
- var realWorldPos = makeClickPos2RealWorldPos(mod_measure_target,clickX,clickY);
- if(mod_measure_epsg=="EPSG:4326"){
- mod_measure_RX[mod_measure_RX.length] = realWorldPos[0];
- mod_measure_RY[mod_measure_RY.length] = realWorldPos[1];
- }
- else{
- mod_measure_RX[mod_measure_RX.length] = Math.round(realWorldPos[0] * 100)/100;
- mod_measure_RY[mod_measure_RY.length] = Math.round(realWorldPos[1] * 100)/100;
- }
- if(mod_measure_RX.length > 1){
- var dist;
- if(mod_measure_epsg=="EPSG:4326"){
- //convert coordinates to radian
- var lon_from=(mod_measure_RX[mod_measure_RX.length-2]*Math.PI)/180;
- var lat_from=(mod_measure_RY[mod_measure_RY.length-2]*Math.PI)/180;
- var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
- var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
- dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
- dist=Math.round(dist*100)/100;
- }
- else{
- var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-2] - mod_measure_RX[mod_measure_RX.length-1]);
- var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-2] - mod_measure_RY[mod_measure_RY.length-1]);
- dist = Math.round(Math.sqrt(Math.pow(dist_x,2) + Math.pow(dist_y,2))*100)/100;
- }
- mod_measure_Dist[mod_measure_Dist.length] = dist;
- var totalDist = mod_measure_TotalDist[mod_measure_TotalDist.length-1] + dist;
- mod_measure_TotalDist[mod_measure_TotalDist.length] = Math.round(totalDist * 100)/100;
- }
- else{
- mod_measure_Dist[mod_measure_Dist.length] = 0;
- mod_measure_TotalDist[mod_measure_TotalDist.length] = 0;
- }
- drawDashedLine();
-}
-function drawDashedLine(){
- var str_mPoints = "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='"+mod_measure_width+"' height='0'></div>";
- str_mPoints += "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='0' height='"+mod_measure_height+"'></div>";
- for(var i=0; i<mod_measure_RX.length; i++){
- var pos = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[i],mod_measure_RY[i]);
- str_mPoints += "<div style='font-size:1px;position:absolute;top:"+(pos[1]-2)+"px;left:"+(pos[0]-2)+"px;width:4px;height:4px;background-color:"+mod_measure_basepoint+"'></div>";
- if(i>0){
- str_mPoints += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color1+";";
- if(mod_measure_bg != ""){
- str_mPoints += "background-color:"+mod_measure_bg+";";
- }
- str_mPoints += "position:absolute;top:"+(pos[1] + 3)+"px;left:"+(pos[0]+3)+"px;z-index:20'>"+mod_measure_TotalDist[i]+"</div>";
- str_mPoints += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";position:absolute;top:"+(pos[1] + 4)+"px;left:"+(pos[0]+4)+"px;z-index:21'>"+mod_measure_TotalDist[i]+"</div>";
- }
- }
- if(mod_measure_RX.length>1){
- for(var k=1; k<mod_measure_RX.length; k++){
- var pos0 = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[k], mod_measure_RY[k]);
- var pos1 = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[k-1], mod_measure_RY[k-1]);
- str_mPoints += evaluateDashes(pos1[0],pos1[1],pos0[0],pos0[1],k);
- }
- }
- writeTag(mod_measure_target,"measuring",str_mPoints);
-}
-function evaluateDashes(x1,y1,x2,y2,count){
- var str_dashedLine = "";
- var s = 10;
- var d = Math.sqrt(Math.pow((y1-y2),2) + Math.pow((x1-x2),2)) ;
- var n = Math.round(d/s);
- var s_x = (x2 - x1)/n;
- var s_y = (y2 - y1)/n;
- for(var i=1; i<n; i++){
- var x = Math.round(x1 + i * s_x)-2;
- var y = Math.round(y1 + i * s_y)-2;
- if(x >= 0 && x <= mod_measure_width && y >= 0 && y <= mod_measure_height){
- str_dashedLine += "<div style='font-size:1px;position:absolute;top:"+y+"px;left:"+x+"px;width:4px;height:4px;background-color:"+mod_measure_linepoint+"'></div>";
- }
- }
- str_dashedLine += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color1+";";
- if(mod_measure_bg != ""){
- str_dashedLine += "background-color:"+mod_measure_bg+";";
- }
- str_dashedLine += "position:absolute;top:"+(Math.round(y1 + (y2-y1)/2 +3))+"px;left:"+(Math.round(x1 + (x2-x1)/2 +3))+"px'>"+mod_measure_Dist[count]+"</div>";
- str_dashedLine += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";position:absolute;top:"+(Math.round(y1 + (y2-y1)/2 + 4))+"px;left:"+(Math.round(x1 + (x2-x1)/2+4))+"px'>"+mod_measure_Dist[count]+"</div>";
- return str_dashedLine;
-}
-function mod_measure_run(e){
- mb_getMousePos(e,mod_measure_target);
- var pos = makeClickPos2RealWorldPos(mod_measure_target,clickX,clickY);
- var dist;
- if(mod_measure_epsg=="EPSG:4326"){
- //convert coordinates to radian
- var lon_from=(pos[0]*Math.PI)/180;
- var lat_from=(pos[1]*Math.PI)/180;
- var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
- var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
- dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
- }
- else{
- var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-1] - pos[0]);
- var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-1] - pos[1]);
- dist=Math.sqrt(dist_x*dist_x+dist_y*dist_y);
- }
- if(isNaN(dist) == false && clickX > 0 && clickX < mod_measure_width && clickY > 0 && clickY < mod_measure_height){
- var str_display = "<span style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";'>"+(Math.round(dist*100)/100)+" m</span>";
- writeTag(mod_measure_target,"measure_display",str_display);
- mb_arrangeElement(mod_measure_target,"measure_display",clickX +2, clickY - 10);
- }
- else{
- writeTag(mod_measure_target,"measure_display","");
- }
-}
-function mod_measure_close(){
- if(mod_measure_RX.length < 3 || (mod_measure_RX[mod_measure_RX.length-1] == mod_measure_RX[0] && mod_measure_RY[mod_measure_RY.length-1] == mod_measure_RY[0])){return;}
- mod_measure_RX[mod_measure_RX.length] = mod_measure_RX[0];
- mod_measure_RY[mod_measure_RY.length] = mod_measure_RY[0];
- if(mod_measure_RX.length > 1){
- var dist;
- if(mod_measure_epsg=="EPSG:4326"){
- //convert coordinates to radian
- var lon_from=(mod_measure_RX[mod_measure_RX.length-2]*Math.PI)/180;
- var lat_from=(mod_measure_RY[mod_measure_RY.length-2]*Math.PI)/180;
- var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
- var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
- dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
- dist=Math.round(dist*100)/100;
- }
- else{
- var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-2] - mod_measure_RX[mod_measure_RX.length-1]);
- var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-2] - mod_measure_RY[mod_measure_RY.length-1]);
- dist = Math.round(Math.sqrt(Math.pow(dist_x,2) + Math.pow(dist_y,2))*100)/100;
- }
- mod_measure_Dist[mod_measure_Dist.length] = dist;
- var totalDist = mod_measure_TotalDist[mod_measure_TotalDist.length-1] + dist;
- mod_measure_TotalDist[mod_measure_TotalDist.length] = Math.round(totalDist * 100)/100;
- }
- else{
- mod_measure_Dist[mod_measure_Dist.length] = 0;
- mod_measure_TotalDist[mod_measure_TotalDist.length] = 0;
- }
- drawDashedLine();
-}
-function mod_measure_delete(){
- mod_measure_RX = new Array();
- mod_measure_RY = new Array();
- mod_measure_Dist = new Array();
- mod_measure_TotalDist = new Array();
- writeTag(mod_measure_target,"measuring","");
- writeTag(mod_measure_target,"measure_display","");
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_measure.php (from rev 2181, branches/2.4.5/http/javascripts/mod_measure.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_measure.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_measure.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,257 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_measure.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'measure' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('measure: ID not unique!');";
+}
+echo "var mod_measure_target = '".$e_target."';";
+?>
+var mod_measure_color1 = "white";
+var mod_measure_color2 = "black";
+var mod_measure_font = "Arial, Helvetica, sans-serif";
+var mod_measure_fontsize = "9px";
+var mod_measure_basepoint = "#8a2be2";
+var mod_measure_linepoint = "#ff00ff";
+var mod_measure_bg = "";
+var mod_measure_pgsql = true;
+
+var mod_measure_win = null;
+
+var mod_measure_elName = "measure";
+var mod_measure_frameName = "";
+var mod_measure_epsg;
+var mod_measure_width;
+var mod_measure_height;
+var mod_measure_RX = new Array();
+var mod_measure_RY = new Array();
+var mod_measure_Dist = new Array();
+var mod_measure_TotalDist = new Array();
+var mod_measureSubFunctions = new Array();
+
+var mod_measure_img_on = new Image(); mod_measure_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_measure_img_off = new Image(); mod_measure_img_off.src = "<?php echo $e_src; ?>";
+var mod_measure_img_over = new Image(); mod_measure_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_mod_measure(ind){
+ mb_button[ind] = document.getElementById(mod_measure_elName);
+ mb_button[ind].img_over = mod_measure_img_over.src;
+ mb_button[ind].img_on = mod_measure_img_on.src;
+ mb_button[ind].img_off = mod_measure_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_measure_elName;
+ mb_button[ind].fName = mod_measure_frameName;
+ mb_button[ind].go = new Function ("mod_measure_go()");
+ mb_button[ind].stop = new Function ("mod_measure_disable()");
+ var ind = getMapObjIndexByName(mod_measure_target);
+ mod_measure_width = mb_mapObj[ind].width;
+ mod_measure_height = mb_mapObj[ind].height;
+ mod_measure_epsg = mb_mapObj[ind].epsg;
+ mb_registerSubFunctions("drawDashedLine()");
+ mb_registerPanSubElement("measuring");
+}
+function register_measureSubFunctions(stringFunction){
+ mod_measureSubFunctions[mod_measureSubFunctions.length] = stringFunction;
+}
+function mod_measure_go(){
+ var el = window.frames[mod_measure_target].document;
+ el.onmousedown = mod_measure_start;
+ el.onmousemove = mod_measure_run;
+ var measureSub = "";
+ for(var i=0; i<mod_measureSubFunctions.length; i++){
+ measureSub += eval(mod_measureSubFunctions[i]);
+ }
+ writeTag(mod_measure_target,"measure_sub",measureSub);
+}
+function mod_measure_disable(){
+ var el = window.frames[mod_measure_target].document;
+ el.onmousedown = null;
+ el.onmousemove = null;
+ writeTag(mod_measure_target,"measure_display","");
+ writeTag(mod_measure_target,"measure_sub","");
+}
+function mod_measure_timeout(){
+ var el = window.frames[mod_measure_target].document;
+ el.onmousedown = null;
+ el.ondblclick = null;
+ el.onmousemove = null;
+}
+function mod_measure_disableTimeout(){
+ var el = window.frames[mod_measure_target].document;
+ el.onmousedown = mod_measure_start;
+ el.onmousemove = mod_measure_run;
+}
+function mod_measure_start(e){
+ mb_getMousePos(e,mod_measure_target);
+ var realWorldPos = makeClickPos2RealWorldPos(mod_measure_target,clickX,clickY);
+ if(mod_measure_epsg=="EPSG:4326"){
+ mod_measure_RX[mod_measure_RX.length] = realWorldPos[0];
+ mod_measure_RY[mod_measure_RY.length] = realWorldPos[1];
+ }
+ else{
+ mod_measure_RX[mod_measure_RX.length] = Math.round(realWorldPos[0] * 100)/100;
+ mod_measure_RY[mod_measure_RY.length] = Math.round(realWorldPos[1] * 100)/100;
+ }
+ if(mod_measure_RX.length > 1){
+ var dist;
+ if(mod_measure_epsg=="EPSG:4326"){
+ //convert coordinates to radian
+ var lon_from=(mod_measure_RX[mod_measure_RX.length-2]*Math.PI)/180;
+ var lat_from=(mod_measure_RY[mod_measure_RY.length-2]*Math.PI)/180;
+ var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
+ var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
+ dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
+ dist=Math.round(dist*100)/100;
+ }
+ else{
+ var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-2] - mod_measure_RX[mod_measure_RX.length-1]);
+ var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-2] - mod_measure_RY[mod_measure_RY.length-1]);
+ dist = Math.round(Math.sqrt(Math.pow(dist_x,2) + Math.pow(dist_y,2))*100)/100;
+ }
+ mod_measure_Dist[mod_measure_Dist.length] = dist;
+ var totalDist = mod_measure_TotalDist[mod_measure_TotalDist.length-1] + dist;
+ mod_measure_TotalDist[mod_measure_TotalDist.length] = Math.round(totalDist * 100)/100;
+ }
+ else{
+ mod_measure_Dist[mod_measure_Dist.length] = 0;
+ mod_measure_TotalDist[mod_measure_TotalDist.length] = 0;
+ }
+ drawDashedLine();
+}
+function drawDashedLine(){
+ var str_mPoints = "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='"+mod_measure_width+"' height='0'></div>";
+ str_mPoints += "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='0' height='"+mod_measure_height+"'></div>";
+ for(var i=0; i<mod_measure_RX.length; i++){
+ var pos = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[i],mod_measure_RY[i]);
+ str_mPoints += "<div style='font-size:1px;position:absolute;top:"+(pos[1]-2)+"px;left:"+(pos[0]-2)+"px;width:4px;height:4px;background-color:"+mod_measure_basepoint+"'></div>";
+ if(i>0){
+ str_mPoints += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color1+";";
+ if(mod_measure_bg != ""){
+ str_mPoints += "background-color:"+mod_measure_bg+";";
+ }
+ str_mPoints += "position:absolute;top:"+(pos[1] + 3)+"px;left:"+(pos[0]+3)+"px;z-index:20'>"+mod_measure_TotalDist[i]+"</div>";
+ str_mPoints += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";position:absolute;top:"+(pos[1] + 4)+"px;left:"+(pos[0]+4)+"px;z-index:21'>"+mod_measure_TotalDist[i]+"</div>";
+ }
+ }
+ if(mod_measure_RX.length>1){
+ for(var k=1; k<mod_measure_RX.length; k++){
+ var pos0 = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[k], mod_measure_RY[k]);
+ var pos1 = makeRealWorld2mapPos(mod_measure_target,mod_measure_RX[k-1], mod_measure_RY[k-1]);
+ str_mPoints += evaluateDashes(pos1[0],pos1[1],pos0[0],pos0[1],k);
+ }
+ }
+ writeTag(mod_measure_target,"measuring",str_mPoints);
+}
+function evaluateDashes(x1,y1,x2,y2,count){
+ var str_dashedLine = "";
+ var s = 10;
+ var d = Math.sqrt(Math.pow((y1-y2),2) + Math.pow((x1-x2),2)) ;
+ var n = Math.round(d/s);
+ var s_x = (x2 - x1)/n;
+ var s_y = (y2 - y1)/n;
+ for(var i=1; i<n; i++){
+ var x = Math.round(x1 + i * s_x)-2;
+ var y = Math.round(y1 + i * s_y)-2;
+ if(x >= 0 && x <= mod_measure_width && y >= 0 && y <= mod_measure_height){
+ str_dashedLine += "<div style='font-size:1px;position:absolute;top:"+y+"px;left:"+x+"px;width:4px;height:4px;background-color:"+mod_measure_linepoint+"'></div>";
+ }
+ }
+ str_dashedLine += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color1+";";
+ if(mod_measure_bg != ""){
+ str_dashedLine += "background-color:"+mod_measure_bg+";";
+ }
+ str_dashedLine += "position:absolute;top:"+(Math.round(y1 + (y2-y1)/2 +3))+"px;left:"+(Math.round(x1 + (x2-x1)/2 +3))+"px'>"+mod_measure_Dist[count]+"</div>";
+ str_dashedLine += "<div style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";position:absolute;top:"+(Math.round(y1 + (y2-y1)/2 + 4))+"px;left:"+(Math.round(x1 + (x2-x1)/2+4))+"px'>"+mod_measure_Dist[count]+"</div>";
+ return str_dashedLine;
+}
+function mod_measure_run(e){
+ mb_getMousePos(e,mod_measure_target);
+ var pos = makeClickPos2RealWorldPos(mod_measure_target,clickX,clickY);
+ var dist;
+ if(mod_measure_epsg=="EPSG:4326"){
+ //convert coordinates to radian
+ var lon_from=(pos[0]*Math.PI)/180;
+ var lat_from=(pos[1]*Math.PI)/180;
+ var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
+ var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
+ dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
+ }
+ else{
+ var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-1] - pos[0]);
+ var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-1] - pos[1]);
+ dist=Math.sqrt(dist_x*dist_x+dist_y*dist_y);
+ }
+ if(isNaN(dist) == false && clickX > 0 && clickX < mod_measure_width && clickY > 0 && clickY < mod_measure_height){
+ var str_display = "<span style='font-family:"+mod_measure_font+";font-size:"+mod_measure_fontsize+";color:"+mod_measure_color2+";'>"+(Math.round(dist*100)/100)+" m</span>";
+ writeTag(mod_measure_target,"measure_display",str_display);
+ mb_arrangeElement(mod_measure_target,"measure_display",clickX +2, clickY - 10);
+ }
+ else{
+ writeTag(mod_measure_target,"measure_display","");
+ }
+}
+function mod_measure_close(){
+ if(mod_measure_RX.length < 3 || (mod_measure_RX[mod_measure_RX.length-1] == mod_measure_RX[0] && mod_measure_RY[mod_measure_RY.length-1] == mod_measure_RY[0])){return;}
+ mod_measure_RX[mod_measure_RX.length] = mod_measure_RX[0];
+ mod_measure_RY[mod_measure_RY.length] = mod_measure_RY[0];
+ if(mod_measure_RX.length > 1){
+ var dist;
+ if(mod_measure_epsg=="EPSG:4326"){
+ //convert coordinates to radian
+ var lon_from=(mod_measure_RX[mod_measure_RX.length-2]*Math.PI)/180;
+ var lat_from=(mod_measure_RY[mod_measure_RY.length-2]*Math.PI)/180;
+ var lon_to=(mod_measure_RX[mod_measure_RX.length-1]*Math.PI)/180;
+ var lat_to=(mod_measure_RY[mod_measure_RY.length-1]*Math.PI)/180;
+ dist=6371229*Math.acos(Math.sin(lat_from)*Math.sin(lat_to)+Math.cos(lat_from)*Math.cos(lat_to)*Math.cos(lon_from-lon_to));
+ dist=Math.round(dist*100)/100;
+ }
+ else{
+ var dist_x = Math.abs(mod_measure_RX[mod_measure_RX.length-2] - mod_measure_RX[mod_measure_RX.length-1]);
+ var dist_y = Math.abs(mod_measure_RY[mod_measure_RY.length-2] - mod_measure_RY[mod_measure_RY.length-1]);
+ dist = Math.round(Math.sqrt(Math.pow(dist_x,2) + Math.pow(dist_y,2))*100)/100;
+ }
+ mod_measure_Dist[mod_measure_Dist.length] = dist;
+ var totalDist = mod_measure_TotalDist[mod_measure_TotalDist.length-1] + dist;
+ mod_measure_TotalDist[mod_measure_TotalDist.length] = Math.round(totalDist * 100)/100;
+ }
+ else{
+ mod_measure_Dist[mod_measure_Dist.length] = 0;
+ mod_measure_TotalDist[mod_measure_TotalDist.length] = 0;
+ }
+ drawDashedLine();
+}
+function mod_measure_delete(){
+ mod_measure_RX = new Array();
+ mod_measure_RY = new Array();
+ mod_measure_Dist = new Array();
+ mod_measure_TotalDist = new Array();
+ writeTag(mod_measure_target,"measuring","");
+ writeTag(mod_measure_target,"measure_display","");
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_navFrame.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_navFrame.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_navFrame.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,82 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_navFrame.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include '../include/dyn_js.php';
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target,e_src FROM gui_element WHERE e_id = 'navFrame' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-echo "var mod_navFrame_target = '".$e_target."';";
-if($cnt > 1){
- echo "alert('navFrame: ID not unique!');";
-}
-echo "var mod_navFrame_src = '".db_result($res,0,"e_src")."';";
-?>
-
-try{
- if (mod_navFrame_ext){}
-}
-catch(e){
- mod_navFrame_ext = 10;
-}
-
-mb_registerSubFunctions("mod_navFrame_arrange()");
-
-function mod_navFrame_arrange(){
- var el = document.getElementById(mod_navFrame_target).style;
- var ext = mod_navFrame_ext;
- var myLeft = parseInt(el.left);
- var myTop = parseInt(el.top);
- var myWidth = parseInt(el.width);
- var myHeight = parseInt(el.height);
-
- //left,top,width,height
- mod_navFrame_pos("mbN",(myLeft),(myTop - ext),(myWidth),(ext));
- document.getElementById("arrow_n").style.left = myWidth/2 - document.getElementById("arrow_n").width/2;
- mod_navFrame_pos("mbNE",(myLeft + myWidth),(myTop - ext),(ext),(ext));
- mod_navFrame_pos("mbE",(myLeft + myWidth),(myTop),(ext),(myHeight));
- document.getElementById("arrow_e").style.top = myHeight/2 - document.getElementById("arrow_n").height/2;
- mod_navFrame_pos("mbSE",(myLeft + myWidth),(myTop + myHeight),(ext),(ext));
- mod_navFrame_pos("mbS",(myLeft),(myTop + myHeight),(myWidth),(ext));
- document.getElementById("arrow_s").style.left = myWidth/2 - document.getElementById("arrow_s").width/2;
- mod_navFrame_pos("mbSW",(myLeft - ext),(myTop + myHeight),(ext),(ext));
- mod_navFrame_pos("mbW",(myLeft - ext),(myTop),(ext),(myHeight));
- document.getElementById("arrow_w").style.top = myHeight/2 - document.getElementById("arrow_w").height/2;
- mod_navFrame_pos("mbNW",(myLeft - ext),(myTop -ext),(ext),(ext));
-}
-function mod_navFrame(val){
- mb_panMap(mod_navFrame_target,val);
-}
-function mod_navFrame_pos(el,left,top,width,height){
-//alert(el + " , " +left + " , " +top + " , " +width + " , " +height)
- document.getElementById(el).style.left = left;
- document.getElementById(el).style.top = top;
- document.getElementById(el).style.width = width;
- document.getElementById(el).style.height = height;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_navFrame.php (from rev 2181, branches/2.4.5/http/javascripts/mod_navFrame.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_navFrame.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_navFrame.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,80 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_navFrame.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+include '../include/dyn_js.php';
+
+$sql = "SELECT e_target,e_src FROM gui_element WHERE e_id = 'navFrame' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+echo "var mod_navFrame_target = '".$e_target."';";
+if($cnt > 1){
+ echo "alert('navFrame: ID not unique!');";
+}
+echo "var mod_navFrame_src = '".db_result($res,0,"e_src")."';";
+?>
+
+try{
+ if (mod_navFrame_ext){}
+}
+catch(e){
+ mod_navFrame_ext = 10;
+}
+
+mb_registerSubFunctions("mod_navFrame_arrange()");
+
+function mod_navFrame_arrange(){
+ var el = document.getElementById(mod_navFrame_target).style;
+ var ext = mod_navFrame_ext;
+ var myLeft = parseInt(el.left);
+ var myTop = parseInt(el.top);
+ var myWidth = parseInt(el.width);
+ var myHeight = parseInt(el.height);
+
+ //left,top,width,height
+ mod_navFrame_pos("mbN",(myLeft),(myTop - ext),(myWidth),(ext));
+ document.getElementById("arrow_n").style.left = myWidth/2 - document.getElementById("arrow_n").width/2;
+ mod_navFrame_pos("mbNE",(myLeft + myWidth),(myTop - ext),(ext),(ext));
+ mod_navFrame_pos("mbE",(myLeft + myWidth),(myTop),(ext),(myHeight));
+ document.getElementById("arrow_e").style.top = myHeight/2 - document.getElementById("arrow_n").height/2;
+ mod_navFrame_pos("mbSE",(myLeft + myWidth),(myTop + myHeight),(ext),(ext));
+ mod_navFrame_pos("mbS",(myLeft),(myTop + myHeight),(myWidth),(ext));
+ document.getElementById("arrow_s").style.left = myWidth/2 - document.getElementById("arrow_s").width/2;
+ mod_navFrame_pos("mbSW",(myLeft - ext),(myTop + myHeight),(ext),(ext));
+ mod_navFrame_pos("mbW",(myLeft - ext),(myTop),(ext),(myHeight));
+ document.getElementById("arrow_w").style.top = myHeight/2 - document.getElementById("arrow_w").height/2;
+ mod_navFrame_pos("mbNW",(myLeft - ext),(myTop -ext),(ext),(ext));
+}
+function mod_navFrame(val){
+ mb_panMap(mod_navFrame_target,val);
+}
+function mod_navFrame_pos(el,left,top,width,height){
+//alert(el + " , " +left + " , " +top + " , " +width + " , " +height)
+ document.getElementById(el).style.left = left;
+ document.getElementById(el).style.top = top;
+ document.getElementById(el).style.width = width;
+ document.getElementById(el).style.height = height;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_owsproxy.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,65 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_owsproxy.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-include(dirname(__FILE__)."/../classes/class_administration.php");
-
-?>
-<html>
-<head><title></title></head>
-<body>
-<table>
-<?php
-$n = new administration();
-$myguis = $n->getGuisByPermission($_SESSION["mb_user_id"],true);
-$mywms = $n->getWmsByOwnGuis($myguis);
-$v = array();
-$t = array();
-$sql = "SELECT * FROM wms WHERE wms_id IN(";
-for($i=0; $i<count($mywms); $i++){
- if($i>0){$sql .= ",";}
- $sql .= "$".strval($i+1);
- array_push($v, $mywms[$i]);
- array_push($t, "i");
-}
-$sql .= ")";
-$res = db_prep_query($sql,$v,$t);
-while($row = db_fetch_array($res)){
- if($row["wms_owsproxy"] != ""){
- echo "<tr>";
- echo "<td>";
- echo "<input type='button' value='getURL' onclick='prompt(\"Online-resource: \",\"";
- echo OWSPROXY."/".session_id()."/".$row["wms_owsproxy"]."?";
- echo "\")'>";
- echo "</td>";
- echo "<td>";
- echo $row["wms_title"];
- echo "</td>";
- echo "<td>";
- echo $row["wms_abstract"];
- echo "</td>";
- echo "</tr>";
- }
-}
-?>
-</table>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php (from rev 2140, branches/2.4.5/http/javascripts/mod_owsproxy.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_owsproxy.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,63 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_owsproxy.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__)."/../classes/class_administration.php");
+
+?>
+<html>
+<head><title></title></head>
+<body>
+<table>
+<?php
+$n = new administration();
+$myguis = $n->getGuisByPermission($_SESSION["mb_user_id"],true);
+$mywms = $n->getWmsByOwnGuis($myguis);
+$v = array();
+$t = array();
+$sql = "SELECT * FROM wms WHERE wms_id IN(";
+for($i=0; $i<count($mywms); $i++){
+ if($i>0){$sql .= ",";}
+ $sql .= "$".strval($i+1);
+ array_push($v, $mywms[$i]);
+ array_push($t, "i");
+}
+$sql .= ")";
+$res = db_prep_query($sql,$v,$t);
+while($row = db_fetch_array($res)){
+ if($row["wms_owsproxy"] != ""){
+ echo "<tr>";
+ echo "<td>";
+ echo "<input type='button' value='getURL' onclick='prompt(\"Online-resource: \",\"";
+ echo OWSPROXY."/".session_id()."/".$row["wms_owsproxy"]."?";
+ echo "\")'>";
+ echo "</td>";
+ echo "<td>";
+ echo $row["wms_title"];
+ echo "</td>";
+ echo "<td>";
+ echo $row["wms_abstract"];
+ echo "</td>";
+ echo "</tr>";
+ }
+}
+?>
+</table>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_pan.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_pan.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_pan.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,120 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_pan.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'pan1' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('pan1: ID not unique!');";
-}
-echo "var mod_pan_target = '".$e_target."';";
-?>
-var mod_pan_elName = "pan1";
-var mod_pan_frameName = "";
-
-
-var mod_pan_img_on = new Image(); mod_pan_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_pan_img_off = new Image(); mod_pan_img_off.src = "<?php echo $e_src; ?>";
-var mod_pan_img_over = new Image(); mod_pan_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_mod_pan(ind){
- mb_button[ind] = document.getElementById(mod_pan_elName);
- mb_button[ind].img_over = mod_pan_img_over.src;
- mb_button[ind].img_on = mod_pan_img_on.src;
- mb_button[ind].img_off = mod_pan_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_pan_elName;
- mb_button[ind].fName = mod_pan_frameName;
- mb_button[ind].go = new Function ("mod_pan_click()");
- mb_button[ind].stop = new Function ("mod_pan_disable()");
-}
-function mod_pan_click(){
- var el = window.frames[mod_pan_target].document;
- el.onmousedown = mod_pan_start;
- el.onmouseup = mod_pan_stop;
- el.onmousemove = mod_pan_run;
-}
-function mod_pan_disable(){
- var el = window.frames[mod_pan_target].document;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
-}
-function mod_pan_start(e){
- mb_panActive = true;
- mb_getMousePos(e,mod_pan_target);
- mb_start_x=clickX;
- mb_start_y=clickY;
- mb_end_x = clickX;
- mb_end_y = clickY;
- return false;
-}
-function mod_pan_run(e){
- if(mb_panActive){
- mb_getMousePos(e,mod_pan_target);
- mb_end_x = clickX;
- mb_end_y = clickY;
- mod_pan_move_map();
- if(ie){
- return false;
- }
- else{
- return true;
- }
- }
-}
-function mod_pan_stop(e){
- mb_panActive = false;
- var dif_x = mb_end_x - mb_start_x;
- var dif_y = mb_end_y - mb_start_y;
- for(var i=0; i<mb_mapObj.length; i++){
- if(mb_mapObj[i].frameName == mod_pan_target){
- var width = mb_mapObj[i].width;
- var height = mb_mapObj[i].height;
- }
- }
- var center_x = (width / 2) - dif_x;
- var center_y = (height / 2) - dif_y;
- var real_center = makeClickPos2RealWorldPos(mod_pan_target,center_x, center_y);
- mb_arrangeElement(mod_pan_target, "maps", 0, 0);
- for(var i=0; i<mb_PanSubElements.length; i++){
- mb_arrangeElement(mod_pan_target, mb_PanSubElements[i], 0, 0);
- }
- zoom(mod_pan_target,false, 1.0, real_center[0], real_center[1]);
-}
-function mod_pan_move_map(){
- var dif_x = mb_end_x - mb_start_x;
- var dif_y = mb_end_y - mb_start_y;
- mb_arrangeElement(mod_pan_target, "maps", dif_x, dif_y);
- for(var i=0; i<mb_PanSubElements.length; i++){
- mb_arrangeElement(mod_pan_target, mb_PanSubElements[i], dif_x, dif_y);
- }
- return false;
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_pan.php (from rev 2181, branches/2.4.5/http/javascripts/mod_pan.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_pan.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_pan.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,118 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_pan.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'pan1' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('pan1: ID not unique!');";
+}
+echo "var mod_pan_target = '".$e_target."';";
+?>
+var mod_pan_elName = "pan1";
+var mod_pan_frameName = "";
+
+
+var mod_pan_img_on = new Image(); mod_pan_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_pan_img_off = new Image(); mod_pan_img_off.src = "<?php echo $e_src; ?>";
+var mod_pan_img_over = new Image(); mod_pan_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_mod_pan(ind){
+ mb_button[ind] = document.getElementById(mod_pan_elName);
+ mb_button[ind].img_over = mod_pan_img_over.src;
+ mb_button[ind].img_on = mod_pan_img_on.src;
+ mb_button[ind].img_off = mod_pan_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_pan_elName;
+ mb_button[ind].fName = mod_pan_frameName;
+ mb_button[ind].go = new Function ("mod_pan_click()");
+ mb_button[ind].stop = new Function ("mod_pan_disable()");
+}
+function mod_pan_click(){
+ var el = window.frames[mod_pan_target].document;
+ el.onmousedown = mod_pan_start;
+ el.onmouseup = mod_pan_stop;
+ el.onmousemove = mod_pan_run;
+}
+function mod_pan_disable(){
+ var el = window.frames[mod_pan_target].document;
+ el.onmousedown = null;
+ el.onmouseup = null;
+ el.onmousemove = null;
+}
+function mod_pan_start(e){
+ mb_panActive = true;
+ mb_getMousePos(e,mod_pan_target);
+ mb_start_x=clickX;
+ mb_start_y=clickY;
+ mb_end_x = clickX;
+ mb_end_y = clickY;
+ return false;
+}
+function mod_pan_run(e){
+ if(mb_panActive){
+ mb_getMousePos(e,mod_pan_target);
+ mb_end_x = clickX;
+ mb_end_y = clickY;
+ mod_pan_move_map();
+ if(ie){
+ return false;
+ }
+ else{
+ return true;
+ }
+ }
+}
+function mod_pan_stop(e){
+ mb_panActive = false;
+ var dif_x = mb_end_x - mb_start_x;
+ var dif_y = mb_end_y - mb_start_y;
+ for(var i=0; i<mb_mapObj.length; i++){
+ if(mb_mapObj[i].frameName == mod_pan_target){
+ var width = mb_mapObj[i].width;
+ var height = mb_mapObj[i].height;
+ }
+ }
+ var center_x = (width / 2) - dif_x;
+ var center_y = (height / 2) - dif_y;
+ var real_center = makeClickPos2RealWorldPos(mod_pan_target,center_x, center_y);
+ mb_arrangeElement(mod_pan_target, "maps", 0, 0);
+ for(var i=0; i<mb_PanSubElements.length; i++){
+ mb_arrangeElement(mod_pan_target, mb_PanSubElements[i], 0, 0);
+ }
+ zoom(mod_pan_target,false, 1.0, real_center[0], real_center[1]);
+}
+function mod_pan_move_map(){
+ var dif_x = mb_end_x - mb_start_x;
+ var dif_y = mb_end_y - mb_start_y;
+ mb_arrangeElement(mod_pan_target, "maps", dif_x, dif_y);
+ for(var i=0; i<mb_PanSubElements.length; i++){
+ mb_arrangeElement(mod_pan_target, mb_PanSubElements[i], dif_x, dif_y);
+ }
+ return false;
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_perimeter.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_perimeter.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_perimeter.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,158 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_perimeter.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'perimeter' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('perimeter: ID not unique!');";
-}
-$e_id_css = 'perimeter';
-include(dirname(__FILE__).'/../include/dyn_js.php');
-?>
-
-var mod_perimeter_target = "<?php echo $e_target; ?>";
-mb_registerInitFunctions("mod_perimeter_prepare()");
-mb_registerSubFunctions("mod_perimeter_draw()");
-mb_registerPanSubElement("perimeter");
-var mod_perimeter_img_on = new Image(); mod_perimeter_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_perimeter_img_off = new Image(); mod_perimeter_img_off.src ="<?php echo $e_src; ?>";
-var mod_perimeter_img_over = new Image(); mod_perimeter_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-var mod_perimeter_prevEvent = null;
-var mod_perimeter_x = null;
-var mod_perimeter_y = null;
-var mod_perimeter_r = null;
-var mod_perimeter_canvas = null;
-var mod_perimeter_status = 0;
-var mod_perimeter_img_obj = null;
-
-function mod_perimeter_checkDefaults(){
- try{var t = mod_perimeter_thickness;}catch(e){mod_perimeter_thickness = 2;}
- try{var t = mod_perimeter_color;}catch(e){mod_perimeter_color = '#000000';}
- try{var t = mod_perimeter_text;}catch(e){mod_perimeter_text = 'Please insert a radius: ';}
- try{var t = mod_perimeter_error;}catch(e){mod_perimeter_error = 'Invalid Input.';}
-}
-function mod_perimeter_click(o){
- mod_perimeter_img_obj = o;
- mod_perimeter_status = (mod_perimeter_status == 0) ? 1 : 0;
- o.src = (mod_perimeter_status == 0) ? mod_perimeter_img_off.src : mod_perimeter_img_on.src;
- if(mod_perimeter_status == 1){
- mod_perimeter_saveEvents();
- }
- else{
- mod_perimeter_disable();
- }
-}
-function mod_perimeter_saveEvents(){
- var myE = window.frames[mod_perimeter_target].document;
- mod_perimeter_mouseclick = myE.onclick;
- mod_perimeter_mouseover = myE.onmouseover;
- mod_perimeter_mousedown = myE.onmousedown;
- mod_perimeter_mouseup = myE.onmouseup;
- mod_perimeter_mousemove = myE.onmousemove;
- myE.onclick = mod_perimeter_event;
- myE.onmouseover = null;
- myE.onmousedown = null;
- myE.onmouseup = null;
- myE.onmousemove = null;
-}
-function mod_perimeter_restoreEvents(){
- var myE = window.frames[mod_perimeter_target].document;
- myE.onclick = mod_perimeter_mouseclick;
- myE.onmouseover = mod_perimeter_mouseover;
- myE.onmousedown = mod_perimeter_mousedown;
- myE.onmouseup = mod_perimeter_mouseup;
- myE.onmousemove = mod_perimeter_mousemove;
-}
-function mod_perimeter_over(o){
- o.src = mod_perimeter_img_over.src;
-}
-function mod_perimeter_out(o){
- o.src = (mod_perimeter_status == 0) ? mod_perimeter_img_off.src : mod_perimeter_img_on.src;
-}
-function mod_perimeter_disable(){
- window.frames[mod_perimeter_target].document.getElementById("perimeter").innerHTML = '';
-}
-function mod_perimeter_event(e){
- if(ie){
- clickX = window.frames[mod_perimeter_target].event.clientX;
- clickY = window.frames[mod_perimeter_target].event.clientY;
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
- var pos = makeClickPos2RealWorldPos(mod_perimeter_target, clickX, clickY)
- mod_perimeter_x = pos[0];
- mod_perimeter_y = pos[1];
- var units = prompt(mod_perimeter_text);
- var myUnits = mod_perimeter_validate(units);
- if(myUnits != false){
- mod_perimeter_r = myUnits;
- mod_perimeter_draw();
- }
- else{
- mod_perimeter_click(mod_perimeter_img_obj);
- }
- mod_perimeter_restoreEvents();
-}
-function mod_perimeter_validate(u){
- if(isNaN(u) == true){
- alert(mod_perimeter_error);
- return false;
- }
- else{
- return parseInt(u);
- }
-}
-function mod_perimeter_prepare(){
- cw_opacity=1;
- mod_perimeter_checkDefaults();
- var attributes = new Array();
- attributes[0] = new Array();
- attributes[0][0] = "style";
- attributes[0][1] = "position:absolute; top:0px; left:0px; z-index:100; font-size:10px;";
- var node = mb_checkTag(mod_perimeter_target, "div", "perimeter", "body", attributes);
- mod_perimeter_canvas = new jsGraphics("perimeter", window.frames[mod_perimeter_target]);
- mod_perimeter_canvas.setStroke(mod_perimeter_thickness);
- mod_perimeter_canvas.setColor(mod_perimeter_color);
-}
-function mod_perimeter_draw(){
- if(mod_perimeter_status == 1){
- mod_perimeter_disable();
- var posCenter = makeRealWorld2mapPos(mod_perimeter_target,mod_perimeter_x, mod_perimeter_y);
- var posRadius = makeRealWorld2mapPos(mod_perimeter_target,(mod_perimeter_x + mod_perimeter_r), mod_perimeter_y);
- var pxRadius = posRadius[0] - posCenter[0];
- mod_perimeter_canvas.drawEllipse((posCenter[0]-pxRadius), (posCenter[1]-pxRadius), pxRadius*2, pxRadius*2);
- mod_perimeter_canvas.paint();
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_perimeter.php (from rev 2181, branches/2.4.5/http/javascripts/mod_perimeter.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_perimeter.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_perimeter.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,154 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_perimeter.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'perimeter' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('perimeter: ID not unique!');";
+}
+$e_id_css = 'perimeter';
+include(dirname(__FILE__).'/../include/dyn_js.php');
+?>
+
+var mod_perimeter_target = "<?php echo $e_target; ?>";
+mb_registerInitFunctions("mod_perimeter_prepare()");
+mb_registerSubFunctions("mod_perimeter_draw()");
+mb_registerPanSubElement("perimeter");
+var mod_perimeter_img_on = new Image(); mod_perimeter_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_perimeter_img_off = new Image(); mod_perimeter_img_off.src ="<?php echo $e_src; ?>";
+var mod_perimeter_img_over = new Image(); mod_perimeter_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+var mod_perimeter_prevEvent = null;
+var mod_perimeter_x = null;
+var mod_perimeter_y = null;
+var mod_perimeter_r = null;
+var mod_perimeter_canvas = null;
+var mod_perimeter_status = 0;
+var mod_perimeter_img_obj = null;
+
+function mod_perimeter_checkDefaults(){
+ try{var t = mod_perimeter_thickness;}catch(e){mod_perimeter_thickness = 2;}
+ try{var t = mod_perimeter_color;}catch(e){mod_perimeter_color = '#000000';}
+ try{var t = mod_perimeter_text;}catch(e){mod_perimeter_text = 'Please insert a radius: ';}
+ try{var t = mod_perimeter_error;}catch(e){mod_perimeter_error = 'Invalid Input.';}
+}
+function mod_perimeter_click(o){
+ mod_perimeter_img_obj = o;
+ mod_perimeter_status = (mod_perimeter_status == 0) ? 1 : 0;
+ o.src = (mod_perimeter_status == 0) ? mod_perimeter_img_off.src : mod_perimeter_img_on.src;
+ if(mod_perimeter_status == 1){
+ mod_perimeter_saveEvents();
+ }
+ else{
+ mod_perimeter_disable();
+ }
+}
+function mod_perimeter_saveEvents(){
+ var myE = window.frames[mod_perimeter_target].document;
+ mod_perimeter_mouseclick = myE.onclick;
+ mod_perimeter_mouseover = myE.onmouseover;
+ mod_perimeter_mousedown = myE.onmousedown;
+ mod_perimeter_mouseup = myE.onmouseup;
+ mod_perimeter_mousemove = myE.onmousemove;
+ myE.onclick = mod_perimeter_event;
+ myE.onmouseover = null;
+ myE.onmousedown = null;
+ myE.onmouseup = null;
+ myE.onmousemove = null;
+}
+function mod_perimeter_restoreEvents(){
+ var myE = window.frames[mod_perimeter_target].document;
+ myE.onclick = mod_perimeter_mouseclick;
+ myE.onmouseover = mod_perimeter_mouseover;
+ myE.onmousedown = mod_perimeter_mousedown;
+ myE.onmouseup = mod_perimeter_mouseup;
+ myE.onmousemove = mod_perimeter_mousemove;
+}
+function mod_perimeter_over(o){
+ o.src = mod_perimeter_img_over.src;
+}
+function mod_perimeter_out(o){
+ o.src = (mod_perimeter_status == 0) ? mod_perimeter_img_off.src : mod_perimeter_img_on.src;
+}
+function mod_perimeter_disable(){
+ window.frames[mod_perimeter_target].document.getElementById("perimeter").innerHTML = '';
+}
+function mod_perimeter_event(e){
+ if(ie){
+ clickX = window.frames[mod_perimeter_target].event.clientX;
+ clickY = window.frames[mod_perimeter_target].event.clientY;
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+ var pos = makeClickPos2RealWorldPos(mod_perimeter_target, clickX, clickY)
+ mod_perimeter_x = pos[0];
+ mod_perimeter_y = pos[1];
+ var units = prompt(mod_perimeter_text);
+ var myUnits = mod_perimeter_validate(units);
+ if(myUnits != false){
+ mod_perimeter_r = myUnits;
+ mod_perimeter_draw();
+ }
+ else{
+ mod_perimeter_click(mod_perimeter_img_obj);
+ }
+ mod_perimeter_restoreEvents();
+}
+function mod_perimeter_validate(u){
+ if(isNaN(u) == true){
+ alert(mod_perimeter_error);
+ return false;
+ }
+ else{
+ return parseInt(u);
+ }
+}
+function mod_perimeter_prepare(){
+ cw_opacity=1;
+ mod_perimeter_checkDefaults();
+ var attributes = new Array();
+ attributes[0] = new Array();
+ attributes[0][0] = "style";
+ attributes[0][1] = "position:absolute; top:0px; left:0px; z-index:100; font-size:10px;";
+ var node = mb_checkTag(mod_perimeter_target, "div", "perimeter", "body", attributes);
+ mod_perimeter_canvas = new jsGraphics("perimeter", window.frames[mod_perimeter_target]);
+ mod_perimeter_canvas.setStroke(mod_perimeter_thickness);
+ mod_perimeter_canvas.setColor(mod_perimeter_color);
+}
+function mod_perimeter_draw(){
+ if(mod_perimeter_status == 1){
+ mod_perimeter_disable();
+ var posCenter = makeRealWorld2mapPos(mod_perimeter_target,mod_perimeter_x, mod_perimeter_y);
+ var posRadius = makeRealWorld2mapPos(mod_perimeter_target,(mod_perimeter_x + mod_perimeter_r), mod_perimeter_y);
+ var pxRadius = posRadius[0] - posCenter[0];
+ mod_perimeter_canvas.drawEllipse((posCenter[0]-pxRadius), (posCenter[1]-pxRadius), pxRadius*2, pxRadius*2);
+ mod_perimeter_canvas.paint();
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_poi.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_poi.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_poi.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,322 +0,0 @@
-<?php
-require_once("../../conf/mapbender.conf");
-session_start();
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="DC.Rights" content="CCGIS GbR, Bonn">
-<title>Suche</title>
-<?
- $gui_id = $_SESSION["mb_user_gui"];
- $e_id_css = 'poi';
- include_once("../include/dyn_css.php");
-?>
-<style type="text/css">
-<!--
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- background-color: 'ffffff';
- }
- .header{
- color: #cc3366;
- }
- a:link{
- font-family : Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- font-weight : bold;
- }
- a:visited{
- font-family : Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- font-weight : bold;
- }
- a:hover{
- font-family : Arial, Helvetica, sans-serif;
- color: white;
- text-decoration : none;
- font-weight : bold;
- background-color : #999999;
- }
- a:active{
- font-family : Arial, Helvetica, sans-serif;
- color: blue;
- text-decoration : none;
- font-weight : bold;
- }
- .textfield{
- border : 2 solid #D3D3D3;
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- width: 100px;
- position: absolute;
- left: 50px
- }
- .sbutton{
- font-size : 10px;
- width: 28px;
- height: 22px;
- position: absolute;
- left: 152px;
- }
- .resultFrame{
- width: 180px;
- height: 140px;
- border: 1px;
- position: absolute;
- top: 25px;
- left: 5px;
- overflow-x : hidden;
- }
--->
-</style>
-<?php
-#if(isset($lingo)){$lingo = $_REQUEST["lingo"];}
-#else{$lingo = "deutsch";}
-#$language = parse_ini_file("../language/".$lingo.".txt");
-
-echo "<script type='text/javascript'>";
-echo "var conffile = '".$_REQUEST["conf_file"]."';";
-echo "var lingo = '".$_REQUEST["lingo"]."';";
-echo "var backlink = '".$_REQUEST["backlink"]."';";
-
-$lingo = $_REQUEST["lingo"];
-$title = "layername_".$lingo;
-require_once("../../conf/".$_REQUEST["conf_file"]);
-
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-
-function validate(){
-
- if(document.form1.search.value.length < 1){
- alert("Bitte vervollständigen Sie die Angaben!");
- document.form1.search.focus();
- return false;
- }
- else{
- text = "mod_poi.php?&search=" + document.form1.search.value+"&conf_file="+conffile+"&lingo="+lingo+"&backlink="+backlink;
- if (backlink=='parent'){
- window.frames["result"].location.href = text;
- }else{
- parent.result.window.location.href = text;
- }
- return false;
- }
-}
-function statistic(value){
- if (backlink =='parent'){
- parent.parent.StatisticFrame.location.href = "../statistic.php?request=" + escape(value);
- }
- else{
- parent.StatisticFrame.location.href = "../statistic.php?request=" + escape(value);
- }
- return;
-}
-
-
-function showHighlight(x,y){
-
- if (backlink =='parent'){
- parent.parent.mb_showHighlight("mapframe1",x,y);
- parent.parent.mb_showHighlight("overview",x,y);
- //alert (backlink);
- }else{
- parent.mb_showHighlight("mapframe1",x,y);
- parent.mb_showHighlight("overview",x,y);
- }
-}
-function hideHighlight(){
- if (backlink =='parent'){
- parent.parent.mb_hideHighlight("mapframe1");
- parent.parent.mb_hideHighlight("overview");
- }else{
- parent.mb_hideHighlight("mapframe1");
- parent.mb_hideHighlight("overview");
- }
-}
-
-function handleLayer(sel_lay, wms_title){
-
- //var wms_title = document.forms[0].wmsTitle.value
-
- var x = new Array();
-
- x[0] = sel_lay;
-
- var y = new Array();
-
- if (backlink =='parent'){
- var wms_ID = parent.parent.getWMSIDByTitle('mapframe1',wms_title);
- }
- else{
- var wms_ID = parent.getWMSIDByTitle('mapframe1',wms_title);
- }
-
- y[0] = wms_ID;
-
- //alert(wms_title + " -- X "+ x + "wms_id" + wms_ID);
-
- if (backlink =='parent'){
- parent.parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
- parent.parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
- parent.parent.mb_execloadWmsSubFunctions();
- }
- else{
- parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
- parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
- parent.mb_execloadWmsSubFunctions();
- }
-}
-// -->
-</script>
-</head>
-<body leftmargin="2" topmargin="0" bgcolor="#ffffff">
-<?php
-
-if(!isset($_REQUEST["search"]) || $_REQUEST["search"] == ""){
- echo "<form name='form1' target='result' onsubmit='return validate();'>";
- echo "Suchen: <input class='textfield' name='search' type='text'> ";
- echo "<input class='sbutton' type='submit' name='send' value='ok'>";
- echo "<iframe frameborder='1' name='result' src='../html/mod_blank.html' class='resultFrame' scrolling='auto'></iframe>";
- echo "</form>";
-}
-else{
- if(preg_match("/\*/",$_REQUEST["search"])){
- $search = trim(preg_replace("/\*/i","", $_REQUEST["search"]));
- }
-
- $con = pg_connect ($con_string) or die ("Error while connecting database $dbname");
-
- #$sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,search_columns, search_result FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'";
- $sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,".$title.",search_columns, search_result,search_keywords, wms_title FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'";
- $res = pg_query($con,$sql);
- $cnt = 0;
-
- while(pg_fetch_row($res)){
- $table[$cnt] = pg_result($res,$cnt,"identificationinfo"); # Tabellen, Abfragenname
- $minscale[$cnt] = pg_result($res,$cnt,"minscale");
- $md_fileidentifier[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername
- $layername[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername in der Mapdatei
- $result_title[$cnt] = pg_result($res,$cnt,"\"".$title."\""); # layer_deutsch Ergebnisname
- $search_columns[$cnt] = pg_result($res,$cnt,"search_columns"); # Suchspalten, Trennung über ,
- $search_result[$cnt] = pg_result($res,$cnt,"search_result"); # Ergebnisspalte
- $search_keywords[$cnt] = pg_result($res,$cnt,"search_keywords"); # Ergebnisspalte
- $wms_title[$cnt] = pg_result($res,$cnt,"wms_title"); # WMS tile
-
- # if one of the searchkeywords is found the data of the whole table is displayed as the result
- if($search_keywords[$cnt] != '') {
- $array_search_keywords = explode(",", $search_keywords[$cnt]);
- $all[$cnt] = false;
- for ($p=0 ; $p<count($array_search_keywords);$p++){
- $hit = preg_match("/".$_REQUEST["search"]."/i",$array_search_keywords[$p]);
- if ($hit >0){
- $all[$cnt] = true;
- }
- }
- }
- //echo "hit:".$hit."all: ".$all[$cnt] ;
- $cnt++;
- }
- $field_has_parent = false;
- $has_result = false;
-
- for($i=0; $i<count($table); $i++){
- $sql = "Select GeometryType(the_geom) as type FROM ".$table[$i]." LIMIT 1";
- $res = pg_query($con,$sql);
- $type = pg_result($res,0,"type");
- $sql = "Select * FROM ".$table[$i]." LIMIT 1";
- $res = pg_query($con,$sql);
-
- if(strtoupper($type) =='MULTIPOLYGON'){
- $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].", '".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
- }
- if(strtoupper($type) =='MULTILINESTRING'){
- $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
- }
- if(strtoupper($type)=='POINT'){
- $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(the_geom) as x,Y(the_geom) as y FROM ".$table[$i];
- }
-
- #---------------- search_columns search_result
- if ($all[$i] == false){
- $array_search_columns = explode(",", $search_columns[$i]);
-
- if (count($array_search_columns)>0){
- $array_search_columns[count($array_search_columns)] = $array_search_columns [0];
- $array_search_columns [0] = "platzhalterxy";
-
- for($j=0; $j<pg_num_fields($res); $j++){
- if(array_search(pg_field_name($res,$j),$array_search_columns) == true ){
- if($field_has_parent == true){
- $sql1 .= " OR ";
- }
- else {
- $sql1 .= " WHERE ";
- };
- $field_has_parent = true;
- $sql1 .= pg_field_name($res,$j) ." ILIKE ";
- $sql1 .= "'%".$_REQUEST["search"]."%'";
- }
- }
- $field_has_parent = false;
- };
- }
- else {
- }
- $sql1 .= " ORDER BY ".$search_result[$i];
- $res1 = pg_query($con,$sql1);
- $cnt = 0;
- if(pg_fetch_row($res1)>0){
- $sel_lay = pg_result($res1,$cnt,"fkey_md_fileidentifier");
-
- if($minscale[$i] > 0){$scale = $minscale[$i]+100; }
-
- for ($cnt=0; $cnt < pg_num_rows($res1); $cnt++){
- if($cnt == 0){
- $title = "layername_".$lingo;
- echo "<div class='header'>".$result_title[$i]. "</div>";
- }
- if($_REQUEST["backlink"]=='parent'){
- echo "<nobr><a href='javascript:hideHighlight();parent.parent.mb_repaintScale(\"mapframe1\"," .pg_result($res1,$cnt,"x"). ",".pg_result($res1,$cnt,"y"). ",$scale);'";
- }
- else{
- echo "<nobr><a href='javascript:hideHighlight();parent.mb_repaintScale(\"mapframe1\"," .pg_result($res1,$cnt,"x"). ",".pg_result($res1,$cnt,"y"). ",$scale);'";
- }
-
- echo " onmouseover='showHighlight(" .pg_result($res1,$cnt,"x"). "," .pg_result($res1,$cnt,"y"). ")' ";
- echo "onmouseout='hideHighlight();' ";
- echo "onclick='handleLayer(\"" .pg_result($res1,$cnt,"fkey_md_fileidentifier"). "\",\"".pg_result($res1,$cnt,"wms_title")."\")'>";
-
- echo pg_result($res1,$cnt,$search_result[$i])."</a></nobr><br>";
- $has_result = true;
- }
- }
- }
- if($has_result == false){echo "Kein Ergebnis!";}
- echo "<form action='" . $PHP_SELF . "?".SID."' method='post'>";
- echo "</form>";
-}
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_poi.php (from rev 2171, branches/2.4.5/http/javascripts/mod_poi.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_poi.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_poi.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,322 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta name="DC.Rights" content="CCGIS GbR, Bonn">
+<title>Suche</title>
+<?
+ $gui_id = $_SESSION["mb_user_gui"];
+ $e_id_css = 'poi';
+ include_once("../include/dyn_css.php");
+?>
+<style type="text/css">
+<!--
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ background-color: 'ffffff';
+ }
+ .header{
+ color: #cc3366;
+ }
+ a:link{
+ font-family : Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ font-weight : bold;
+ }
+ a:visited{
+ font-family : Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ font-weight : bold;
+ }
+ a:hover{
+ font-family : Arial, Helvetica, sans-serif;
+ color: white;
+ text-decoration : none;
+ font-weight : bold;
+ background-color : #999999;
+ }
+ a:active{
+ font-family : Arial, Helvetica, sans-serif;
+ color: blue;
+ text-decoration : none;
+ font-weight : bold;
+ }
+ .textfield{
+ border : 2 solid #D3D3D3;
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ width: 100px;
+ position: absolute;
+ left: 50px
+ }
+ .sbutton{
+ font-size : 10px;
+ width: 28px;
+ height: 22px;
+ position: absolute;
+ left: 152px;
+ }
+ .resultFrame{
+ width: 180px;
+ height: 140px;
+ border: 1px;
+ position: absolute;
+ top: 25px;
+ left: 5px;
+ overflow-x : hidden;
+ }
+-->
+</style>
+<?php
+#if(isset($lingo)){$lingo = $_REQUEST["lingo"];}
+#else{$lingo = "deutsch";}
+#$language = parse_ini_file("../language/".$lingo.".txt");
+
+echo "<script type='text/javascript'>";
+echo "var conffile = '".$_REQUEST["conf_file"]."';";
+echo "var lingo = '".$_REQUEST["lingo"]."';";
+echo "var backlink = '".$_REQUEST["backlink"]."';";
+
+$lingo = $_REQUEST["lingo"];
+$title = "layername_".$lingo;
+require_once("../../conf/".$_REQUEST["conf_file"]);
+
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+
+function validate(){
+
+ if(document.form1.search.value.length < 1){
+ alert("Bitte vervollst�ndigen Sie die Angaben!");
+ document.form1.search.focus();
+ return false;
+ }
+ else{
+ text = "mod_poi.php?&search=" + document.form1.search.value+"&conf_file="+conffile+"&lingo="+lingo+"&backlink="+backlink;
+ if (backlink=='parent'){
+ window.frames["result"].location.href = text;
+ }else{
+ parent.result.window.location.href = text;
+ }
+ return false;
+ }
+}
+function statistic(value){
+ if (backlink =='parent'){
+ parent.parent.StatisticFrame.location.href = "../statistic.php?request=" + escape(value);
+ }
+ else{
+ parent.StatisticFrame.location.href = "../statistic.php?request=" + escape(value);
+ }
+ return;
+}
+
+
+function showHighlight(x,y){
+
+ if (backlink =='parent'){
+ parent.parent.mb_showHighlight("mapframe1",x,y);
+ parent.parent.mb_showHighlight("overview",x,y);
+ //alert (backlink);
+ }else{
+ parent.mb_showHighlight("mapframe1",x,y);
+ parent.mb_showHighlight("overview",x,y);
+ }
+}
+function hideHighlight(){
+ if (backlink =='parent'){
+ parent.parent.mb_hideHighlight("mapframe1");
+ parent.parent.mb_hideHighlight("overview");
+ }else{
+ parent.mb_hideHighlight("mapframe1");
+ parent.mb_hideHighlight("overview");
+ }
+}
+
+function handleLayer(sel_lay, wms_title){
+
+ //var wms_title = document.forms[0].wmsTitle.value
+
+ var x = new Array();
+
+ x[0] = sel_lay;
+
+ var y = new Array();
+
+ if (backlink =='parent'){
+ var wms_ID = parent.parent.getWMSIDByTitle('mapframe1',wms_title);
+ }
+ else{
+ var wms_ID = parent.getWMSIDByTitle('mapframe1',wms_title);
+ }
+
+ y[0] = wms_ID;
+
+ //alert(wms_title + " -- X "+ x + "wms_id" + wms_ID);
+
+ if (backlink =='parent'){
+ parent.parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
+ parent.parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
+ parent.parent.mb_execloadWmsSubFunctions();
+ }
+ else{
+ parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
+ parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
+ parent.mb_execloadWmsSubFunctions();
+ }
+}
+// -->
+</script>
+</head>
+<body leftmargin="2" topmargin="0" bgcolor="#ffffff">
+<?php
+
+if(!isset($_REQUEST["search"]) || $_REQUEST["search"] == ""){
+ echo "<form name='form1' target='result' onsubmit='return validate();'>";
+ echo "Suchen: <input class='textfield' name='search' type='text'> ";
+ echo "<input class='sbutton' type='submit' name='send' value='ok'>";
+ echo "<iframe frameborder='1' name='result' src='../html/mod_blank.html' class='resultFrame' scrolling='auto'></iframe>";
+ echo "</form>";
+}
+else{
+ if(preg_match("/\*/",$_REQUEST["search"])){
+ $search = trim(preg_replace("/\*/i","", $_REQUEST["search"]));
+ }
+
+ $con = pg_connect ($con_string) or die ("Error while connecting database $dbname");
+
+ #$sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,search_columns, search_result FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'";
+ $sql = "SELECT DISTINCT identificationinfo,minscale, md_fileidentifier ,".$title.",search_columns, search_result,search_keywords, wms_title FROM tab_metadata WHERE public = '1' and not identificationinfo = 'Rasterebene' and not identificationinfo = 'rasterlayer'";
+ $res = pg_query($con,$sql);
+ $cnt = 0;
+
+ while(pg_fetch_row($res)){
+ $table[$cnt] = pg_result($res,$cnt,"identificationinfo"); # Tabellen, Abfragenname
+ $minscale[$cnt] = pg_result($res,$cnt,"minscale");
+ $md_fileidentifier[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername
+ $layername[$cnt] = pg_result($res,$cnt,"md_fileidentifier"); # Layername in der Mapdatei
+ $result_title[$cnt] = pg_result($res,$cnt,"\"".$title."\""); # layer_deutsch Ergebnisname
+ $search_columns[$cnt] = pg_result($res,$cnt,"search_columns"); # Suchspalten, Trennung �ber ,
+ $search_result[$cnt] = pg_result($res,$cnt,"search_result"); # Ergebnisspalte
+ $search_keywords[$cnt] = pg_result($res,$cnt,"search_keywords"); # Ergebnisspalte
+ $wms_title[$cnt] = pg_result($res,$cnt,"wms_title"); # WMS tile
+
+ # if one of the searchkeywords is found the data of the whole table is displayed as the result
+ if($search_keywords[$cnt] != '') {
+ $array_search_keywords = explode(",", $search_keywords[$cnt]);
+ $all[$cnt] = false;
+ for ($p=0 ; $p<count($array_search_keywords);$p++){
+ $hit = preg_match("/".$_REQUEST["search"]."/i",$array_search_keywords[$p]);
+ if ($hit >0){
+ $all[$cnt] = true;
+ }
+ }
+ }
+ //echo "hit:".$hit."all: ".$all[$cnt] ;
+ $cnt++;
+ }
+ $field_has_parent = false;
+ $has_result = false;
+
+ for($i=0; $i<count($table); $i++){
+ $sql = "Select GeometryType(the_geom) as type FROM ".$table[$i]." LIMIT 1";
+ $res = pg_query($con,$sql);
+ $type = pg_result($res,0,"type");
+ $sql = "Select * FROM ".$table[$i]." LIMIT 1";
+ $res = pg_query($con,$sql);
+
+ if(strtoupper($type) =='MULTIPOLYGON'){
+ $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].", '".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
+ }
+ if(strtoupper($type) =='MULTILINESTRING'){
+ $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(Centroid(the_geom)) as x,Y(Centroid(the_geom)) as y FROM ".$table[$i];
+ }
+ if(strtoupper($type)=='POINT'){
+ $sql1 = "SELECT '". $layername[$i]."' as fkey_md_fileidentifier,".$search_result[$i].",'".$wms_title[$i]."' as wms_title, X(the_geom) as x,Y(the_geom) as y FROM ".$table[$i];
+ }
+
+ #---------------- search_columns search_result
+ if ($all[$i] == false){
+ $array_search_columns = explode(",", $search_columns[$i]);
+
+ if (count($array_search_columns)>0){
+ $array_search_columns[count($array_search_columns)] = $array_search_columns [0];
+ $array_search_columns [0] = "platzhalterxy";
+
+ for($j=0; $j<pg_num_fields($res); $j++){
+ if(array_search(pg_field_name($res,$j),$array_search_columns) == true ){
+ if($field_has_parent == true){
+ $sql1 .= " OR ";
+ }
+ else {
+ $sql1 .= " WHERE ";
+ };
+ $field_has_parent = true;
+ $sql1 .= pg_field_name($res,$j) ." ILIKE ";
+ $sql1 .= "'%".$_REQUEST["search"]."%'";
+ }
+ }
+ $field_has_parent = false;
+ };
+ }
+ else {
+ }
+ $sql1 .= " ORDER BY ".$search_result[$i];
+ $res1 = pg_query($con,$sql1);
+ $cnt = 0;
+ if(pg_fetch_row($res1)>0){
+ $sel_lay = pg_result($res1,$cnt,"fkey_md_fileidentifier");
+
+ if($minscale[$i] > 0){$scale = $minscale[$i]+100; }
+
+ for ($cnt=0; $cnt < pg_num_rows($res1); $cnt++){
+ if($cnt == 0){
+ $title = "layername_".$lingo;
+ echo "<div class='header'>".$result_title[$i]. "</div>";
+ }
+ if($_REQUEST["backlink"]=='parent'){
+ echo "<nobr><a href='javascript:hideHighlight();parent.parent.mb_repaintScale(\"mapframe1\"," .pg_result($res1,$cnt,"x"). ",".pg_result($res1,$cnt,"y"). ",$scale);'";
+ }
+ else{
+ echo "<nobr><a href='javascript:hideHighlight();parent.mb_repaintScale(\"mapframe1\"," .pg_result($res1,$cnt,"x"). ",".pg_result($res1,$cnt,"y"). ",$scale);'";
+ }
+
+ echo " onmouseover='showHighlight(" .pg_result($res1,$cnt,"x"). "," .pg_result($res1,$cnt,"y"). ")' ";
+ echo "onmouseout='hideHighlight();' ";
+ echo "onclick='handleLayer(\"" .pg_result($res1,$cnt,"fkey_md_fileidentifier"). "\",\"".pg_result($res1,$cnt,"wms_title")."\")'>";
+
+ echo pg_result($res1,$cnt,$search_result[$i])."</a></nobr><br>";
+ $has_result = true;
+ }
+ }
+ }
+ if($has_result == false){echo "Kein Ergebnis!";}
+ echo "<form action='" . $self."' method='post'>";
+ echo "</form>";
+}
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_print1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_print1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_print1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,265 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_print1.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include(dirname(__FILE__)."/../../conf/print.conf");
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Print</title>
-</head>
-<style type="text/css">
-<!--
-
- select{
- width:180px;
- }
- .textField{
- width: 180px;
- }
- body{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
--->
-</style>
-<?php
-/******Name of this module**************/
-$mb_module_id = "print1";
-/**********************************/
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
-$v = array($mb_module_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-
-echo "<script type='text/javascript'>";
-#echo "var mb_user_resolution = ".$_SESSION["mb_user_resolution"]." / 2.54;";
-echo "var deformation = ".$deformation.";";
-#echo "var DPC = 28.35 * deformation;";
-echo "var DPC = 28.35;";
-echo "var a4_width = " . $a4_width . " * DPC;";
-echo "var a4_height = " . $a4_height . " * DPC;";
-echo "var a3_width = " . $a3_width . " * DPC;";
-echo "var a3_height = " . $a3_height . " * DPC;";
-
-
-echo "var border_Portrait_a4_left = " . $border_Portrait_a4_left . " * DPC;";
-echo "var border_Portrait_a4_top = " . $border_Portrait_a4_top . " * DPC;";
-echo "var border_Portrait_a4_right = " . $border_Portrait_a4_right . " * DPC;";
-echo "var border_Portrait_a4_bottom = " . $border_Portrait_a4_bottom . " * DPC;";
-echo "var header_Portrait_a4_height = " . $header_Portrait_a4_height . " * DPC;";
-
-echo "var border_Landscape_a4_left = " . $border_Landscape_a4_left . " * DPC;";
-echo "var border_Landscape_a4_top = " . $border_Landscape_a4_top . " * DPC;";
-echo "var border_Landscape_a4_right = " . $border_Landscape_a4_right . " * DPC;";
-echo "var border_Landscape_a4_bottom = " . $border_Landscape_a4_bottom . " * DPC;";
-echo "var header_Landscape_a4_height = " . $header_Landscape_a4_height . " * DPC;";
-
-echo "var border_Portrait_a3_left = " . $border_Portrait_a3_left . " * DPC;";
-echo "var border_Portrait_a3_top = " . $border_Portrait_a3_top . " * DPC;";
-echo "var border_Portrait_a3_right = " . $border_Portrait_a3_right . " * DPC;";
-echo "var border_Portrait_a3_bottom = " . $border_Portrait_a3_bottom . " * DPC;";
-echo "var header_Portrait_a3_height = " . $header_Portrait_a3_height . " * DPC;";
-
-echo "var border_Landscape_a3_left = " . $border_Landscape_a3_left . " * DPC;";
-echo "var border_Landscape_a3_top = " . $border_Landscape_a3_top . " * DPC;";
-echo "var border_Landscape_a3_right = " . $border_Landscape_a3_right . " * DPC;";
-echo "var border_Landscape_a3_bottom = " . $border_Landscape_a3_bottom . " * DPC;";
-echo "var header_Landscape_a3_height = " . $header_Landscape_a3_height . " * DPC;";
-
-echo "var mod_print1_target = '".db_result($res,0,"e_target")."';";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-/******PARAMS********************/
-var mb_resolution = null;
-var ind_size = null;
-var ind_format = null;
-
-/**END*PARAMS********************/
-
-function validate(){
- //window.opener.mb_resolution = DPC;
- ind_size = document.form1.size.selectedIndex;
- ind_format = document.form1.format.selectedIndex;
-
- if(ind_size != 0 && ind_format != 0){
- var ind = window.opener.getMapObjIndexByName(mod_print1_target);
- var coord = window.opener.mb_mapObj[ind].extent.split(",");
- var centerX = parseInt(coord[0]) + (parseInt(coord[2]) - parseInt(coord[0]))/2
- var centerY = parseInt(coord[1]) + (parseInt(coord[3]) - parseInt(coord[1]))/2
- if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "portrait"){
- document.form1.page_width.value = a4_width;
- document.form1.page_height.value = a4_height;
- document.form1.printOffset_left.value = border_Portrait_a4_left;
- document.form1.printOffset_top.value = border_Portrait_a4_top;
- document.form1.map_width.value = Math.round(a4_width - border_Portrait_a4_left - border_Portrait_a4_right);
- document.form1.map_height.value = Math.round(a4_height - border_Portrait_a4_top - border_Portrait_a4_bottom - header_Portrait_a4_height);
- document.form1.header_height.value = header_Portrait_a4_height;
- }
- if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "landscape"){
- document.form1.page_width.value = a4_height;
- document.form1.page_height.value = a4_width;
- document.form1.printOffset_left.value = border_Landscape_a4_left;
- document.form1.printOffset_top.value = border_Landscape_a4_top;
- document.form1.map_width.value = Math.round(a4_height - border_Landscape_a4_left - border_Landscape_a4_right);
- document.form1.map_height.value = Math.round(a4_width - border_Landscape_a4_top - border_Landscape_a4_bottom - header_Landscape_a4_height);
- document.form1.header_height.value = header_Landscape_a4_height;
- }
- if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "portrait"){
- document.form1.page_width.value = a3_width;
- document.form1.page_height.value = a3_height;
- document.form1.printOffset_left.value = border_Portrait_a3_left;
- document.form1.printOffset_top.value = border_Portrait_a3_top;
- document.form1.map_width.value = Math.round(a3_width - border_Portrait_a3_left - border_Portrait_a3_right);
- document.form1.map_height.value = Math.round(a3_height - border_Portrait_a3_top - border_Portrait_a3_bottom - header_Portrait_a3_height);
- document.form1.header_height.value = header_Portrait_a3_height;
- }
- if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "landscape"){
- document.form1.page_width.value = a3_height;
- document.form1.page_height.value = a3_width;
- document.form1.printOffset_left.value = border_Landscape_a3_left;
- document.form1.printOffset_top.value = border_Landscape_a3_top;
- document.form1.map_width.value = Math.round(a3_height - border_Landscape_a3_left - border_Landscape_a3_right);
- document.form1.map_height.value = Math.round(a3_width - border_Landscape_a3_top - border_Landscape_a3_bottom - header_Landscape_a3_height);
- document.form1.header_height.value = header_Landscape_a3_height;
- }
- var pos = window.opener.makeClickPos2RealWorldPos(mod_print1_target, document.form1.map_width.value , document.form1.map_height.value );
- window.opener.mb_mapObj[ind].width = document.form1.map_width.value;
- window.opener.mb_mapObj[ind].height = document.form1.map_height.value;
- window.opener.document.getElementById(mod_print1_target).style.width = document.form1.map_width.value;
- window.opener.document.getElementById(mod_print1_target).style.height = document.form1.map_height.value;
- window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.width = document.form1.map_width.value;
- window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.height = document.form1.map_height.value;
-
- window.opener.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
- window.opener.setMapRequest(mod_print1_target);
- }
-}
-function refreshParams(){
- var ind = window.opener.getMapObjIndexByName(mod_print1_target);
- document.form1.map_url.value = "";
- var cnt_urls = 0;
- for(var i=0; i<window.opener.mb_mapObj[ind].wms.length; i++){
- if(window.opener.mb_mapObj[ind].wms[i].mapURL != false){
- if(cnt_urls > 0){
- document.form1.map_url.value += "###";
- }
- //hack for relativ WMS_ONLINERESOURCE
- if(window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(0) == '/' && window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(1) == 'c'){
- document.form1.map_url.value += 'http://localhost' + window.opener.mb_mapObj[ind].wms[i].mapURL;
- }
- else{
- document.form1.map_url.value += window.opener.mb_mapObj[ind].wms[i].mapURL;
- }
- cnt_urls++;
- }
- }
- document.form1.map_extent.value = window.opener.mb_mapObj[ind].extent;
- document.form1.map_scale.value = window.opener.mb_getScale(mod_print1_target);
-}
-function printMap(){
- if(ind_size > 0 && ind_format >0){
- refreshParams();
- document.form1.submit();
- disablePrinting();
- }
- else{
- alert("Das Format ist noch nicht ausgewählt.");
- }
- window.opener.mod_back_set();
-}
-function disablePrinting(){
- //window.opener.mb_resolution = mb_user_resolution;
- window.close();
-}
-// -->
-</script>
-<body onunload="disablePrinting()">
-<form name='form1' method='POST' action='../php/mod_printView1.php?<?php echo SID; ?>' target="_blank">
-<table border='0'>
-<tr>
- <td>
- Format:<br />
-
- <select name='size' onchange='validate()'>
- <option value=''>Paper size...</option>
- <option value='A4'>A4</option>
- <!-- <option value='A3'>A3</option> -->
- </select>
- </td>
-</tr>
-<tr>
- <td>
- <select name='format' onchange='validate()'>
- <option value=''>Orientation...(portrait,landscape)</option>
- <option value='portrait'>Portrait</option>
- <option value='landscape'>Landscape</option>
- </select>
- </td>
-</tr>
-<tr>
- <td>
- <br />Resolution:<br />
- <select name='quality'>
- <option value='1'>Standard</option>
- <!-- <option value='<?php #echo $printFactor; ?>'>hoch</option> -->
- </select>
- </td>
-</tr>
-<tr>
- <td>
- <br />Titel: <br />
- <input type="text" class="textField" name="printTitle" value= "Preview">
- </td>
-</tr>
-<tr>
- <td>
- <br />Text: <br />
- <textarea name="printComment" rows="4" cols="20"></textarea>
- </td>
-</tr>
-<table>
-<input type='hidden' name='printOffset_left' value=''>
-<input type='hidden' name='printOffset_top' value=''>
-<input type='hidden' name='map_width' value=''>
-<input type='hidden' name='map_height' value=''>
-<input type='hidden' name='page_width' value=''>
-<input type='hidden' name='page_height' value=''>
-<input type='hidden' name='header_height' value=''>
-<input type='hidden' name='map_url' value=''>
-<input type='hidden' name='map_extent' value=''>
-<input type='hidden' name='map_scale' value=''>
-<!-- <input type='hidden' name='footer' value='<?php echo $footer ?>'> -->
-<input type='button' name='print' value="Preview" onclick='printMap()'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_print1.php (from rev 2140, branches/2.4.5/http/javascripts/mod_print1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_print1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_print1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,264 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_print1.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+include(dirname(__FILE__)."/../../conf/print.conf");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Print</title>
+</head>
+<style type="text/css">
+<!--
+
+ select{
+ width:180px;
+ }
+ .textField{
+ width: 180px;
+ }
+ body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ }
+-->
+</style>
+<?php
+/******Name of this module**************/
+$mb_module_id = "print1";
+/**********************************/
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT * from gui_element WHERE fkey_gui_id = '".$_SESSION["mb_user_gui"]."' AND e_id = $1";
+$v = array($mb_module_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+
+echo "<script type='text/javascript'>";
+#echo "var mb_user_resolution = ".$_SESSION["mb_user_resolution"]." / 2.54;";
+echo "var deformation = ".$deformation.";";
+#echo "var DPC = 28.35 * deformation;";
+echo "var DPC = 28.35;";
+echo "var a4_width = " . $a4_width . " * DPC;";
+echo "var a4_height = " . $a4_height . " * DPC;";
+echo "var a3_width = " . $a3_width . " * DPC;";
+echo "var a3_height = " . $a3_height . " * DPC;";
+
+
+echo "var border_Portrait_a4_left = " . $border_Portrait_a4_left . " * DPC;";
+echo "var border_Portrait_a4_top = " . $border_Portrait_a4_top . " * DPC;";
+echo "var border_Portrait_a4_right = " . $border_Portrait_a4_right . " * DPC;";
+echo "var border_Portrait_a4_bottom = " . $border_Portrait_a4_bottom . " * DPC;";
+echo "var header_Portrait_a4_height = " . $header_Portrait_a4_height . " * DPC;";
+
+echo "var border_Landscape_a4_left = " . $border_Landscape_a4_left . " * DPC;";
+echo "var border_Landscape_a4_top = " . $border_Landscape_a4_top . " * DPC;";
+echo "var border_Landscape_a4_right = " . $border_Landscape_a4_right . " * DPC;";
+echo "var border_Landscape_a4_bottom = " . $border_Landscape_a4_bottom . " * DPC;";
+echo "var header_Landscape_a4_height = " . $header_Landscape_a4_height . " * DPC;";
+
+echo "var border_Portrait_a3_left = " . $border_Portrait_a3_left . " * DPC;";
+echo "var border_Portrait_a3_top = " . $border_Portrait_a3_top . " * DPC;";
+echo "var border_Portrait_a3_right = " . $border_Portrait_a3_right . " * DPC;";
+echo "var border_Portrait_a3_bottom = " . $border_Portrait_a3_bottom . " * DPC;";
+echo "var header_Portrait_a3_height = " . $header_Portrait_a3_height . " * DPC;";
+
+echo "var border_Landscape_a3_left = " . $border_Landscape_a3_left . " * DPC;";
+echo "var border_Landscape_a3_top = " . $border_Landscape_a3_top . " * DPC;";
+echo "var border_Landscape_a3_right = " . $border_Landscape_a3_right . " * DPC;";
+echo "var border_Landscape_a3_bottom = " . $border_Landscape_a3_bottom . " * DPC;";
+echo "var header_Landscape_a3_height = " . $header_Landscape_a3_height . " * DPC;";
+
+echo "var mod_print1_target = '".db_result($res,0,"e_target")."';";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+/******PARAMS********************/
+var mb_resolution = null;
+var ind_size = null;
+var ind_format = null;
+
+/**END*PARAMS********************/
+
+function validate(){
+ //window.opener.mb_resolution = DPC;
+ ind_size = document.form1.size.selectedIndex;
+ ind_format = document.form1.format.selectedIndex;
+
+ if(ind_size != 0 && ind_format != 0){
+ var ind = window.opener.getMapObjIndexByName(mod_print1_target);
+ var coord = window.opener.mb_mapObj[ind].extent.split(",");
+ var centerX = parseInt(coord[0]) + (parseInt(coord[2]) - parseInt(coord[0]))/2
+ var centerY = parseInt(coord[1]) + (parseInt(coord[3]) - parseInt(coord[1]))/2
+ if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "portrait"){
+ document.form1.page_width.value = a4_width;
+ document.form1.page_height.value = a4_height;
+ document.form1.printOffset_left.value = border_Portrait_a4_left;
+ document.form1.printOffset_top.value = border_Portrait_a4_top;
+ document.form1.map_width.value = Math.round(a4_width - border_Portrait_a4_left - border_Portrait_a4_right);
+ document.form1.map_height.value = Math.round(a4_height - border_Portrait_a4_top - border_Portrait_a4_bottom - header_Portrait_a4_height);
+ document.form1.header_height.value = header_Portrait_a4_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A4" && document.form1.format.options[ind_format].value == "landscape"){
+ document.form1.page_width.value = a4_height;
+ document.form1.page_height.value = a4_width;
+ document.form1.printOffset_left.value = border_Landscape_a4_left;
+ document.form1.printOffset_top.value = border_Landscape_a4_top;
+ document.form1.map_width.value = Math.round(a4_height - border_Landscape_a4_left - border_Landscape_a4_right);
+ document.form1.map_height.value = Math.round(a4_width - border_Landscape_a4_top - border_Landscape_a4_bottom - header_Landscape_a4_height);
+ document.form1.header_height.value = header_Landscape_a4_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "portrait"){
+ document.form1.page_width.value = a3_width;
+ document.form1.page_height.value = a3_height;
+ document.form1.printOffset_left.value = border_Portrait_a3_left;
+ document.form1.printOffset_top.value = border_Portrait_a3_top;
+ document.form1.map_width.value = Math.round(a3_width - border_Portrait_a3_left - border_Portrait_a3_right);
+ document.form1.map_height.value = Math.round(a3_height - border_Portrait_a3_top - border_Portrait_a3_bottom - header_Portrait_a3_height);
+ document.form1.header_height.value = header_Portrait_a3_height;
+ }
+ if(document.form1.size.options[ind_size].value == "A3" && document.form1.format.options[ind_format].value == "landscape"){
+ document.form1.page_width.value = a3_height;
+ document.form1.page_height.value = a3_width;
+ document.form1.printOffset_left.value = border_Landscape_a3_left;
+ document.form1.printOffset_top.value = border_Landscape_a3_top;
+ document.form1.map_width.value = Math.round(a3_height - border_Landscape_a3_left - border_Landscape_a3_right);
+ document.form1.map_height.value = Math.round(a3_width - border_Landscape_a3_top - border_Landscape_a3_bottom - header_Landscape_a3_height);
+ document.form1.header_height.value = header_Landscape_a3_height;
+ }
+ var pos = window.opener.makeClickPos2RealWorldPos(mod_print1_target, document.form1.map_width.value , document.form1.map_height.value );
+ window.opener.mb_mapObj[ind].width = document.form1.map_width.value;
+ window.opener.mb_mapObj[ind].height = document.form1.map_height.value;
+ window.opener.document.getElementById(mod_print1_target).style.width = document.form1.map_width.value;
+ window.opener.document.getElementById(mod_print1_target).style.height = document.form1.map_height.value;
+ window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.width = document.form1.map_width.value;
+ window.opener.window.frames[mod_print1_target].document.getElementById("maps").style.height = document.form1.map_height.value;
+
+ window.opener.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
+ window.opener.setMapRequest(mod_print1_target);
+ }
+}
+function refreshParams(){
+ var ind = window.opener.getMapObjIndexByName(mod_print1_target);
+ document.form1.map_url.value = "";
+ var cnt_urls = 0;
+ for(var i=0; i<window.opener.mb_mapObj[ind].wms.length; i++){
+ if(window.opener.mb_mapObj[ind].wms[i].mapURL != false){
+ if(cnt_urls > 0){
+ document.form1.map_url.value += "###";
+ }
+ //hack for relativ WMS_ONLINERESOURCE
+ if(window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(0) == '/' && window.opener.mb_mapObj[ind].wms[i].mapURL.charAt(1) == 'c'){
+ document.form1.map_url.value += 'http://localhost' + window.opener.mb_mapObj[ind].wms[i].mapURL;
+ }
+ else{
+ document.form1.map_url.value += window.opener.mb_mapObj[ind].wms[i].mapURL;
+ }
+ cnt_urls++;
+ }
+ }
+ document.form1.map_extent.value = window.opener.mb_mapObj[ind].extent;
+ document.form1.map_scale.value = window.opener.mb_getScale(mod_print1_target);
+}
+function printMap(){
+ if(ind_size > 0 && ind_format >0){
+ refreshParams();
+ document.form1.submit();
+ disablePrinting();
+ }
+ else{
+ alert("Das Format ist noch nicht ausgew�hlt.");
+ }
+ window.opener.mod_back_set();
+}
+function disablePrinting(){
+ //window.opener.mb_resolution = mb_user_resolution;
+ window.close();
+}
+// -->
+</script>
+<body onunload="disablePrinting()">
+<form name='form1' method='POST' action='../php/mod_printView1.php?<?php echo SID; ?>' target="_blank">
+<table border='0'>
+<tr>
+ <td>
+ Format:<br />
+
+ <select name='size' onchange='validate()'>
+ <option value=''>Paper size...</option>
+ <option value='A4'>A4</option>
+ <!-- <option value='A3'>A3</option> -->
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>
+ <select name='format' onchange='validate()'>
+ <option value=''>Orientation...(portrait,landscape)</option>
+ <option value='portrait'>Portrait</option>
+ <option value='landscape'>Landscape</option>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>
+ <br />Resolution:<br />
+ <select name='quality'>
+ <option value='1'>Standard</option>
+ <!-- <option value='<?php #echo $printFactor; ?>'>hoch</option> -->
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>
+ <br />Titel: <br />
+ <input type="text" class="textField" name="printTitle" value= "Preview">
+ </td>
+</tr>
+<tr>
+ <td>
+ <br />Text: <br />
+ <textarea name="printComment" rows="4" cols="20"></textarea>
+ </td>
+</tr>
+<table>
+<input type='hidden' name='printOffset_left' value=''>
+<input type='hidden' name='printOffset_top' value=''>
+<input type='hidden' name='map_width' value=''>
+<input type='hidden' name='map_height' value=''>
+<input type='hidden' name='page_width' value=''>
+<input type='hidden' name='page_height' value=''>
+<input type='hidden' name='header_height' value=''>
+<input type='hidden' name='map_url' value=''>
+<input type='hidden' name='map_extent' value=''>
+<input type='hidden' name='map_scale' value=''>
+<!-- <input type='hidden' name='footer' value='<?php echo $footer ?>'> -->
+<input type='button' name='print' value="Preview" onclick='printMap()'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_repaint.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_repaint.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_repaint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,54 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_repaint.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'repaint' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('repaint: ID not unique!');";
-}
-?>
-var mod_repaint_img = new Image(); mod_repaint_img.src = "<?php echo $e_src; ?>";
-var mod_repaint_img_over = new Image(); mod_repaint_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function mod_repaint(){
- zoom("<?php echo $e_target; ?>", true,0.999);
-}
-function mod_repaint_init(obj){
- document.getElementById("repaint").src = mod_repaint_img_over.src;
- obj.onmouseover = new Function("mod_repaint_over()");
- obj.onmouseout = new Function("mod_repaint_out()");
-}
-function mod_repaint_over(){
- document.getElementById("repaint").src = mod_repaint_img_over.src;
-}
-function mod_repaint_out(){
- document.getElementById("repaint").src = mod_repaint_img.src;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_repaint.php (from rev 2181, branches/2.4.5/http/javascripts/mod_repaint.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_repaint.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_repaint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,52 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_repaint.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'repaint' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('repaint: ID not unique!');";
+}
+?>
+var mod_repaint_img = new Image(); mod_repaint_img.src = "<?php echo $e_src; ?>";
+var mod_repaint_img_over = new Image(); mod_repaint_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function mod_repaint(){
+ zoom("<?php echo $e_target; ?>", true,0.999);
+}
+function mod_repaint_init(obj){
+ document.getElementById("repaint").src = mod_repaint_img_over.src;
+ obj.onmouseover = new Function("mod_repaint_over()");
+ obj.onmouseout = new Function("mod_repaint_out()");
+}
+function mod_repaint_over(){
+ document.getElementById("repaint").src = mod_repaint_img_over.src;
+}
+function mod_repaint_out(){
+ document.getElementById("repaint").src = mod_repaint_img.src;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_resize_mapsize.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,130 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/ResizeMapsize
-# Created on 12.07.2006/07:32:08
-# Copyright (C) 2002 CCGIS
-# Projekt: mapbender
-# File: mod_resize_mapsize.php
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$gui_id = $_REQUEST["gui_id"];
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$e_id_css = "resizeMapsize";
-include("../include/dyn_js.php");
-
-$sqltarget = "SELECT e_target FROM gui_element WHERE e_id = 'resizeMapsize' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sqltarget, $v, $t);
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
-}
-
-$sql = "SELECT e_left, e_top FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-while($row = db_fetch_array($res)){
- $e_left = $row["e_left"];
- $e_top = $row["e_top"];
-}
-
-$sqllegend = "SELECT e_width FROM gui_element WHERE e_id = 'legend' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sqllegend, $v, $t);
-while($row = db_fetch_array($res)){
- $leg_e_width = $row["e_width"];
-}
-
-?>
-try{
- if (resize_option){}
-}
-catch(e){
- resize_option = "auto";
-}
-
-try{
- if (adjust_width){}
-}
-catch(e){
- adjust_width = "-45";
-}
-
-try{
- if (adjust_height){}
-}
-catch(e){
- adjust_height = "-35";
-}
-var map_frame = "<?php echo $e_target ?>";
-var map_frame_left = "<?php echo $e_left ?>";
-var map_frame_top = "<?php echo $e_top ?>";
-var legend_width = "<?php echo $leg_e_width ?>";
-
-function frameWidth(){
- if (window.innerWidth) return window.innerWidth;
- else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
- else return 0;
-}
-
-function frameHeight(){
- if (window.innerHeight)return window.innerHeight;
- else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
- else return 0;
-}
-
-function adjustDimension(){
- var ind = getMapObjIndexByName("<?php echo $e_target; ?>");
- var mapheight = frameHeight() - <?php echo $e_top ?> + parseInt(adjust_height);
- var mapwidth = frameWidth() - map_frame_left - legend_width + parseInt(adjust_width) ;
- var coords = mb_mapObj[ind].extent.split(",");
- midcoordx=parseFloat((parseFloat(coords[2])-parseFloat(coords[0]))/2)+parseFloat(coords[0]);
- midcoordy=parseFloat((parseFloat(coords[3])-parseFloat(coords[1]))/2)+parseFloat(coords[1]);
- mb_mapObj[ind].width = mapwidth;
- mb_mapObj[ind].height = mapheight;
- document.getElementById(map_frame).style.width = mb_mapObj[ind].width;
- document.getElementById(map_frame).style.height = mb_mapObj[ind].height;
- window.frames[map_frame].document.getElementById("maps").style.width = mb_mapObj[ind].width;
- window.frames[map_frame].document.getElementById("maps").style.height = mb_mapObj[ind].height;
- mb_repaintScale("<?php echo $e_target; ?>",midcoordx,midcoordy,mb_getScale("<?php echo $e_target; ?>"));
-}
-
-function rebuild() {
- if (width_temp != frameWidth() || height_temp != frameHeight()) window.setTimeout('adjustDimension()', 500);
-}
-
-function control(){
- adjustDimension();
- if (!window.width_temp && window.innerWidth) {
- window.onresize = rebuild;
- width_temp = frameWidth();
- height_temp = frameHeight();
- }
-
- if (!window.width_temp && document.body && document.body.offsetWidth) {
- window.onresize = rebuild;
- width_temp = frameWidth();
- height_temp = frameHeight();
- }
-}
-if (resize_option == 'auto'){
- window.setTimeout('control()', 3000);
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php (from rev 2181, branches/2.4.5/http/javascripts/mod_resize_mapsize.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_resize_mapsize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,127 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/ResizeMapsize
+# Created on 12.07.2006/07:32:08
+# Copyright (C) 2002 CCGIS
+# Projekt: mapbender
+# File: mod_resize_mapsize.php
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$e_id_css = "resizeMapsize";
+include("../include/dyn_js.php");
+
+$sqltarget = "SELECT e_target FROM gui_element WHERE e_id = 'resizeMapsize' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sqltarget, $v, $t);
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+}
+
+$sql = "SELECT e_left, e_top FROM gui_element WHERE e_id = '".$e_target."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+while($row = db_fetch_array($res)){
+ $e_left = $row["e_left"];
+ $e_top = $row["e_top"];
+}
+
+$sqllegend = "SELECT e_width FROM gui_element WHERE e_id = 'legend' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sqllegend, $v, $t);
+while($row = db_fetch_array($res)){
+ $leg_e_width = $row["e_width"];
+}
+
+?>
+try{
+ if (resize_option){}
+}
+catch(e){
+ resize_option = "auto";
+}
+
+try{
+ if (adjust_width){}
+}
+catch(e){
+ adjust_width = "-45";
+}
+
+try{
+ if (adjust_height){}
+}
+catch(e){
+ adjust_height = "-35";
+}
+var map_frame = "<?php echo $e_target ?>";
+var map_frame_left = "<?php echo $e_left ?>";
+var map_frame_top = "<?php echo $e_top ?>";
+var legend_width = "<?php echo $leg_e_width ?>";
+
+function frameWidth(){
+ if (window.innerWidth) return window.innerWidth;
+ else if (document.body && document.body.offsetWidth) return document.body.offsetWidth;
+ else return 0;
+}
+
+function frameHeight(){
+ if (window.innerHeight)return window.innerHeight;
+ else if (document.body && document.body.offsetHeight) return document.body.offsetHeight;
+ else return 0;
+}
+
+function adjustDimension(){
+ var ind = getMapObjIndexByName("<?php echo $e_target; ?>");
+ var mapheight = frameHeight() - <?php echo $e_top ?> + parseInt(adjust_height);
+ var mapwidth = frameWidth() - map_frame_left - legend_width + parseInt(adjust_width) ;
+ var coords = mb_mapObj[ind].extent.split(",");
+ midcoordx=parseFloat((parseFloat(coords[2])-parseFloat(coords[0]))/2)+parseFloat(coords[0]);
+ midcoordy=parseFloat((parseFloat(coords[3])-parseFloat(coords[1]))/2)+parseFloat(coords[1]);
+ mb_mapObj[ind].width = mapwidth;
+ mb_mapObj[ind].height = mapheight;
+ document.getElementById(map_frame).style.width = mb_mapObj[ind].width;
+ document.getElementById(map_frame).style.height = mb_mapObj[ind].height;
+ window.frames[map_frame].document.getElementById("maps").style.width = mb_mapObj[ind].width;
+ window.frames[map_frame].document.getElementById("maps").style.height = mb_mapObj[ind].height;
+ mb_repaintScale("<?php echo $e_target; ?>",midcoordx,midcoordy,mb_getScale("<?php echo $e_target; ?>"));
+}
+
+function rebuild() {
+ if (width_temp != frameWidth() || height_temp != frameHeight()) window.setTimeout('adjustDimension()', 500);
+}
+
+function control(){
+ adjustDimension();
+ if (!window.width_temp && window.innerWidth) {
+ window.onresize = rebuild;
+ width_temp = frameWidth();
+ height_temp = frameHeight();
+ }
+
+ if (!window.width_temp && document.body && document.body.offsetWidth) {
+ window.onresize = rebuild;
+ width_temp = frameWidth();
+ height_temp = frameHeight();
+ }
+}
+if (resize_option == 'auto'){
+ window.setTimeout('control()', 3000);
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_sandclock.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_sandclock.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_sandclock.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,64 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_sandclock.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'sandclock' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('sandclock: ID not unique!');";
-}
-echo "var mod_sandclock_target = '".$e_target."';";
-include '../include/dyn_js.php';
-?>
-try{
- if (mod_sandclock_image){}
-}
-catch(e){
- mod_sandclock_image = "../img/sandclock.gif";
-}
-
-var mod_sandclock_img = new Image();
-mod_sandclock_img.src = mod_sandclock_image;
-
-mb_registerSubFunctions("mod_sandclock(true,myMapId)");
-
-function mod_sandclock(start,myMapId){
- var ind = getMapObjIndexByName(mod_sandclock_target);
- if(start){
- var temp = "<img src='"+mod_sandclock_img.src+"'>";
- writeTag(mod_sandclock_target, "sandclock", temp);
- mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
- }
- aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
- if(window.frames[mod_sandclock_target].document.getElementById(myMapId) && window.frames[mod_sandclock_target].document.getElementById(myMapId).complete){
- clearTimeout(aktiv);
- writeTag(mod_sandclock_target, "sandclock", "");
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_sandclock.php (from rev 2181, branches/2.4.5/http/javascripts/mod_sandclock.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_sandclock.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_sandclock.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,61 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_sandclock.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'sandclock' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('sandclock: ID not unique!');";
+}
+echo "var mod_sandclock_target = '".$e_target."';";
+include '../include/dyn_js.php';
+?>
+try{
+ if (mod_sandclock_image){}
+}
+catch(e){
+ mod_sandclock_image = "../img/sandclock.gif";
+}
+
+var mod_sandclock_img = new Image();
+mod_sandclock_img.src = mod_sandclock_image;
+
+mb_registerSubFunctions("mod_sandclock(true,myMapId)");
+
+function mod_sandclock(start,myMapId){
+ var ind = getMapObjIndexByName(mod_sandclock_target);
+ if(start){
+ var temp = "<img src='"+mod_sandclock_img.src+"'>";
+ writeTag(mod_sandclock_target, "sandclock", temp);
+ mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
+ }
+ aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
+ if(window.frames[mod_sandclock_target].document.getElementById(myMapId) && window.frames[mod_sandclock_target].document.getElementById(myMapId).complete){
+ clearTimeout(aktiv);
+ writeTag(mod_sandclock_target, "sandclock", "");
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_sandclock2.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,88 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_sandclock2.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'sandclock2' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = db_result($res,0,"e_target");
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('sandclock2: ID not unique!');";
-}
-echo "var mod_sandclock_target = '".$e_target."';";
-?>
-var mod_sandclock_maxWait = 1000 * 60;
-var mod_sandclock_minWait = 1000 * 0;
-
-var mod_sandclock_count;
-var mod_sandclock_img = new Image();
-mod_sandclock_img.src = "../img/sandclock.gif";
-mb_registerSubFunctions("mod_sandclock(true,myMapId)");
-
-
-function mod_sandclock(start,myMapId){
- var ind = getMapObjIndexByName(mod_sandclock_target);
- if(start){
- mod_sandclock_count = mod_sandclock_maxWait;
- var temp = "<img src='"+mod_sandclock_img.src+"'>";
- writeTag(mod_sandclock_target, "sandclock", temp);
-
- mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
-
- var dim = mod_sandclock_getWSize();
- document.getElementById("sandclock2").style.width = dim[0];
- document.getElementById("sandclock2").style.height = dim[1];
- }
-
- // check images:
- aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
- mod_sandclock_count -= 1000;
-
- var allMaps = window.frames[mod_sandclock_target].document.getElementsByName("mapimage");
- var cnt = 1;
- for(var i=0; i<allMaps.length; i++){
- if(allMaps[i].complete == true){
- cnt++;
- }
- }
- if((mod_sandclock_count <= 0 || cnt >= allMaps.length) && mod_sandclock_count < (mod_sandclock_maxWait - mod_sandclock_minWait)){
- clearTimeout(aktiv);
- writeTag(mod_sandclock_target, "sandclock", "");
- document.getElementById("sandclock2").style.width = 1;
- document.getElementById("sandclock2").style.height = 1;
- }
-}
-function mod_sandclock_getWSize(){
- if(ie){
- var dim = new Array(window.document.body.offsetWidth, window.document.body.offsetHeight);
- }
- else{
- var dim = new Array(window.innerWidth, window.innerHeight);
- }
- return dim;
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php (from rev 2181, branches/2.4.5/http/javascripts/mod_sandclock2.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_sandclock2.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,85 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_sandclock2.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'sandclock2' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = db_result($res,0,"e_target");
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('sandclock2: ID not unique!');";
+}
+echo "var mod_sandclock_target = '".$e_target."';";
+?>
+var mod_sandclock_maxWait = 1000 * 60;
+var mod_sandclock_minWait = 1000 * 0;
+
+var mod_sandclock_count;
+var mod_sandclock_img = new Image();
+mod_sandclock_img.src = "../img/sandclock.gif";
+mb_registerSubFunctions("mod_sandclock(true,myMapId)");
+
+
+function mod_sandclock(start,myMapId){
+ var ind = getMapObjIndexByName(mod_sandclock_target);
+ if(start){
+ mod_sandclock_count = mod_sandclock_maxWait;
+ var temp = "<img src='"+mod_sandclock_img.src+"'>";
+ writeTag(mod_sandclock_target, "sandclock", temp);
+
+ mb_arrangeElement(mod_sandclock_target, "sandclock", (mb_mapObj[ind].width/2 - 16), (mb_mapObj[ind].height/2 - 16));
+
+ var dim = mod_sandclock_getWSize();
+ document.getElementById("sandclock2").style.width = dim[0];
+ document.getElementById("sandclock2").style.height = dim[1];
+ }
+
+ // check images:
+ aktiv = setTimeout("mod_sandclock('','"+myMapId+"')",100);
+ mod_sandclock_count -= 1000;
+
+ var allMaps = window.frames[mod_sandclock_target].document.getElementsByName("mapimage");
+ var cnt = 1;
+ for(var i=0; i<allMaps.length; i++){
+ if(allMaps[i].complete == true){
+ cnt++;
+ }
+ }
+ if((mod_sandclock_count <= 0 || cnt >= allMaps.length) && mod_sandclock_count < (mod_sandclock_maxWait - mod_sandclock_minWait)){
+ clearTimeout(aktiv);
+ writeTag(mod_sandclock_target, "sandclock", "");
+ document.getElementById("sandclock2").style.width = 1;
+ document.getElementById("sandclock2").style.height = 1;
+ }
+}
+function mod_sandclock_getWSize(){
+ if(ie){
+ var dim = new Array(window.document.body.offsetWidth, window.document.body.offsetHeight);
+ }
+ else{
+ var dim = new Array(window.innerWidth, window.innerHeight);
+ }
+ return dim;
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_saveLayerPreview.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,53 +0,0 @@
-<?php
-# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
-# http://www.mapbender.org/index.php/mod_savewmc.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once("../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('savewmc: ID not unique!');";
-}
-
-$e_id_css = "saveLayerPreview";
-include("../include/dyn_js.php");
-
-echo "mod_savewmc_target = '".$e_target."';";
-?>
-var mod_saveLayerPreview_img = new Image(); mod_saveLayerPreview_img.src = "<?php echo $e_src; ?>";
-
-function mod_saveLayerPreview(){
-// document.sendData.target = "_blank";
- document.sendData.action = "../javascripts/mod_insertLayerPreviewIntoDb.php";
- document.sendData.data.value = mb_mapObj[0].mapURL[0] + "____" + wms[0].wms_getlegendurl;
- document.sendData.submit();
-}
-
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php (from rev 2181, branches/2.4.5/http/javascripts/mod_saveLayerPreview.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_saveLayerPreview.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,50 @@
+<?php
+# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
+# http://www.mapbender.org/index.php/mod_savewmc.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('savewmc: ID not unique!');";
+}
+
+$e_id_css = "saveLayerPreview";
+include("../include/dyn_js.php");
+
+echo "mod_savewmc_target = '".$e_target."';";
+?>
+var mod_saveLayerPreview_img = new Image(); mod_saveLayerPreview_img.src = "<?php echo $e_src; ?>";
+
+function mod_saveLayerPreview(){
+// document.sendData.target = "_blank";
+ document.sendData.action = "../javascripts/mod_insertLayerPreviewIntoDb.php";
+ document.sendData.data.value = mb_mapObj[0].mapURL[0] + "____" + wms[0].wms_getlegendurl;
+ document.sendData.submit();
+}
+
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_saveWmcKml.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,127 +0,0 @@
-<?php
-# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
-# http://www.mapbender.org/index.php/mod_savewmc.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/mod_savewmc.php");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('savewmc: ID not unique!');";
-}
-
-echo "mod_savewmc_target = '".$e_target."';";
-?>
-
-var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php echo $e_src; ?>";
-//var mod_savewmc_img_over = new Image(); mod_savewmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function mod_saveWmcKml(obj){
- current_user = "<?php echo $_SESSION["mb_user_id"]; ?>";
- current_password = "<?php echo $_SESSION["mb_user_password"];?>";
- current_gui = "<?php echo $gui_id;?>";
-
- alert('Please set the meeting point by clicking the map.');
-
- var ind = getMapObjIndexByName(mod_savewmc_target);
-
- var el = frames[mod_savewmc_target].document;
- el.onmousedown = mod_getMousePos;
- el.onmouseup = null;
- el.onmousemove = null;
- el.onmouseover = null;
-}
-
-function mod_getMousePos(e) {
- mb_getMousePos(e,mod_savewmc_target);
- var q = new Point(clickX,clickY);
- var realWorldPos = mapToReal(mod_savewmc_target,q);
-
- var el = frames[mod_savewmc_target].document;
- el.onmousedown = null;
- //alert(realWorldPos);
- //document.sendData.target = "_blank";
- //document.sendData.action = "../javascripts/mod_insertWmcIntoDb.php";
- //document.sendData.data.value = user + "____" + generalTitle + "____" + wmc + "____" + id;
- //document.sendData.submit();
-
- saveWindow = open("", "save", "width=400, height=300, resizable, dependent=yes, scrollbars=yes");
- saveWindow.document.open("text/html");
-/*
- var cssLink = saveWindow.document.createElement("link");
- cssLink.setAttribute("href", wfsCssUrl);
- cssLink.setAttribute("type", "text/css");
- cssLink.setAttribute("rel", "stylesheet");
- var cssTmp = saveWindow.document.getElementsByTagName("head")[0];
- cssTmp.appendChild(cssLink);
-*/
- var wmc_title = "meetingpoint";
- var icon = "http://wms1.ccgis.de/mapbender_dev/img/pin.png";
-
- var str = "";
- var onclick = "wmcid=window.opener.mod_savewmc('"+wmc_title+"');";
- onclick += "document.sendData.action = '../javascripts/mod_insertKmlIntoDb.php?<?php echo SID;?>';";
- onclick += "document.sendData.data.value = wmcid + '____" + realWorldPos.x + "____" + realWorldPos.y + "____"+ icon + "____<?php echo $gui_id;?>';";
- onclick += "document.sendData.submit();"
- str += "<form name='sendData' method='post'>\n";
- str += "<table>\n";
- str += "<tr>\n";
- str += "<td>Name</td>\n";
- str += "<td><input type='text' name='name'></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td>Strasse</td>\n";
- str += "<td><input type='text' name='street'></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td>PLZ</td>\n";
- str += "<td><input type='text' name='postcode'></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td>Ort</td>\n";
- str += "<td><input type='text' name='city'></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td>Webseite</td>\n";
- str += "<td><input type='text' name='website'></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td>Beschreibung</td>\n";
- str += "<td><textarea name='description'></textarea></td>\n";
- str += "</tr>\n";
- str += "<tr>\n";
- str += "<td colspan=2><input type='button' value='URL generieren' name='generateUrl' onclick=\""+onclick+"\"></td>\n";
- str += "</tr>\n";
- str += "</table>\n";
- str += "<input type=hidden name=data>\n";
- str += "</form>";
- saveWindow.document.write(str);
- saveWindow.document.close();
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php (from rev 2181, branches/2.4.5/http/javascripts/mod_saveWmcKml.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_saveWmcKml.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,124 @@
+<?php
+# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
+# http://www.mapbender.org/index.php/mod_savewmc.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/mod_savewmc.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'savewmc' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('savewmc: ID not unique!');";
+}
+
+echo "mod_savewmc_target = '".$e_target."';";
+?>
+
+var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php echo $e_src; ?>";
+//var mod_savewmc_img_over = new Image(); mod_savewmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function mod_saveWmcKml(obj){
+ current_user = "<?php echo $_SESSION["mb_user_id"]; ?>";
+ current_password = "<?php echo $_SESSION["mb_user_password"];?>";
+ current_gui = "<?php echo $gui_id;?>";
+
+ alert('Please set the meeting point by clicking the map.');
+
+ var ind = getMapObjIndexByName(mod_savewmc_target);
+
+ var el = frames[mod_savewmc_target].document;
+ el.onmousedown = mod_getMousePos;
+ el.onmouseup = null;
+ el.onmousemove = null;
+ el.onmouseover = null;
+}
+
+function mod_getMousePos(e) {
+ mb_getMousePos(e,mod_savewmc_target);
+ var q = new Point(clickX,clickY);
+ var realWorldPos = mapToReal(mod_savewmc_target,q);
+
+ var el = frames[mod_savewmc_target].document;
+ el.onmousedown = null;
+ //alert(realWorldPos);
+ //document.sendData.target = "_blank";
+ //document.sendData.action = "../javascripts/mod_insertWmcIntoDb.php";
+ //document.sendData.data.value = user + "____" + generalTitle + "____" + wmc + "____" + id;
+ //document.sendData.submit();
+
+ saveWindow = open("", "save", "width=400, height=300, resizable, dependent=yes, scrollbars=yes");
+ saveWindow.document.open("text/html");
+/*
+ var cssLink = saveWindow.document.createElement("link");
+ cssLink.setAttribute("href", wfsCssUrl);
+ cssLink.setAttribute("type", "text/css");
+ cssLink.setAttribute("rel", "stylesheet");
+ var cssTmp = saveWindow.document.getElementsByTagName("head")[0];
+ cssTmp.appendChild(cssLink);
+*/
+ var wmc_title = "meetingpoint";
+ var icon = "http://wms1.ccgis.de/mapbender_dev/img/pin.png";
+
+ var str = "";
+ var onclick = "wmcid=window.opener.mod_savewmc('"+wmc_title+"');";
+ onclick += "document.sendData.action = '../javascripts/mod_insertKmlIntoDb.php?<?php echo SID;?>';";
+ onclick += "document.sendData.data.value = wmcid + '____" + realWorldPos.x + "____" + realWorldPos.y + "____"+ icon + "____<?php echo $gui_id;?>';";
+ onclick += "document.sendData.submit();"
+ str += "<form name='sendData' method='post'>\n";
+ str += "<table>\n";
+ str += "<tr>\n";
+ str += "<td>Name</td>\n";
+ str += "<td><input type='text' name='name'></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td>Strasse</td>\n";
+ str += "<td><input type='text' name='street'></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td>PLZ</td>\n";
+ str += "<td><input type='text' name='postcode'></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td>Ort</td>\n";
+ str += "<td><input type='text' name='city'></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td>Webseite</td>\n";
+ str += "<td><input type='text' name='website'></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td>Beschreibung</td>\n";
+ str += "<td><textarea name='description'></textarea></td>\n";
+ str += "</tr>\n";
+ str += "<tr>\n";
+ str += "<td colspan=2><input type='button' value='URL generieren' name='generateUrl' onclick=\""+onclick+"\"></td>\n";
+ str += "</tr>\n";
+ str += "</table>\n";
+ str += "<input type=hidden name=data>\n";
+ str += "</form>";
+ saveWindow.document.write(str);
+ saveWindow.document.close();
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_savewmc.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_savewmc.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_savewmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,59 +0,0 @@
-<?php
-# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
-# http://www.mapbender.org/index.php/mod_savewmc.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once("../../conf/mapbender.conf");
-
-$gui_id = $_REQUEST["gui_id"];
-
-include("../include/dyn_js.php");
-
-echo "mod_savewmc_target = '".$e_target."';";
-?>
-function setOnUnload() {
- document.getElementsByTagName('body')[0].setAttribute("onUnload", "mod_savewmc('session');");
-}
-
-try {if (saveInSession) {}}catch(e) {saveInSession = 0;}
-
-if (saveInSession == '1') {
- mb_registerInitFunctions('setOnUnload()');
-}
-
-var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php echo $e_src; ?>";
-//var mod_savewmc_img_over = new Image(); mod_savewmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-
-function mod_savewmc(title){
-
- var ind = getMapObjIndexByName(mod_savewmc_target);
- var session = 0;
- var generalTitle = title;
-
- if (generalTitle) {
- if (generalTitle == 'session') {
- session = 1;
- }
- }
- else {
- generalTitle = prompt("Save WMC as...");
- }
- mb_ajax_post("../php/mod_insertWmcIntoDb.php", {"saveInSession":session, "generalTitle":generalTitle, "mapObject":mb_mapObj[ind].toJSONString()}, function (result, status) {
- alert(result);
- });
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_savewmc.php (from rev 2208, branches/2.4.5/http/javascripts/mod_savewmc.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_savewmc.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_savewmc.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,57 @@
+<?php
+# $Id: mod_savewmc.php 264 2006-05-12 11:07:19Z vera_schulze
+# http://www.mapbender.org/index.php/mod_savewmc.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+include("../include/dyn_js.php");
+
+echo "mod_savewmc_target = '".$e_target."';";
+?>
+function setOnUnload() {
+ document.getElementsByTagName('body')[0].setAttribute("onUnload", "mod_savewmc('session');");
+}
+
+try {if (saveInSession) {}}catch(e) {saveInSession = 0;}
+
+if (saveInSession == '1') {
+ mb_registerInitFunctions('setOnUnload()');
+}
+
+var mod_savewmc_img = new Image(); mod_savewmc_img.src = "<?php echo $e_src; ?>";
+//var mod_savewmc_img_over = new Image(); mod_savewmc_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+
+function mod_savewmc(title){
+
+ var ind = getMapObjIndexByName(mod_savewmc_target);
+ var session = 0;
+ var generalTitle = title;
+
+ if (generalTitle) {
+ if (generalTitle == 'session') {
+ session = 1;
+ }
+ }
+ else {
+ generalTitle = prompt("Save WMC as...");
+ }
+ mb_ajax_post("../php/mod_insertWmcIntoDb.php?<?php echo $urlParameters;?>", {"saveInSession":session, "generalTitle":generalTitle, "mapObject":mb_mapObj[ind].toJSONString()}, function (result, status) {
+ alert(result);
+ });
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_scaleHint.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,68 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_scaleHint.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setScaleHint' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('mod_scaleHint: ID not unique!');";
-}
-$params = split(",",$e_target);
-
-echo "var mod_scaleHint_target = '".$params[0]."';";
-echo "var mod_scaleHint_min = '".$params[1]."';";
-echo "var mod_scaleHint_max = '".$params[2]."';";
-
-?>
-
-mb_registerPreFunctions("mod_scaleHint_init(frameName)");
-function mod_scaleHint_init(frameName){
- if(frameName == mod_scaleHint_target){
- var scale = mb_getScale(frameName);
- if(scale < mod_scaleHint_min || scale > mod_scaleHint_max){
- if(scale < mod_scaleHint_min){
- var newScale = mod_scaleHint_min;
- }
- if(scale > mod_scaleHint_max){
- var newScale = mod_scaleHint_max;
- }
- var ind = getMapObjIndexByName(frameName);
- var arrayBBox = mb_mapObj[ind].extent.split(",");
- var x = parseFloat(arrayBBox[0]) + ((parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]))/2);
- var y = parseFloat(arrayBBox[1]) + ((parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]))/2);
- var minx = parseFloat(x) - (mb_mapObj[ind].width / (mb_resolution * 100 *2) * newScale);
- var miny = parseFloat(y) - (mb_mapObj[ind].height / (mb_resolution * 100 *2) * newScale);
- var maxx = parseFloat(x) + (mb_mapObj[ind].width / (mb_resolution * 100 *2) * newScale);
- var maxy = parseFloat(y) + (mb_mapObj[ind].height / (mb_resolution * 100 *2) * newScale);
- mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
- }
- }
- return true;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php (from rev 2181, branches/2.4.5/http/javascripts/mod_scaleHint.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleHint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,65 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_scaleHint.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setScaleHint' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('mod_scaleHint: ID not unique!');";
+}
+$params = split(",",$e_target);
+
+echo "var mod_scaleHint_target = '".$params[0]."';";
+echo "var mod_scaleHint_min = '".$params[1]."';";
+echo "var mod_scaleHint_max = '".$params[2]."';";
+
+?>
+
+mb_registerPreFunctions("mod_scaleHint_init(frameName)");
+function mod_scaleHint_init(frameName){
+ if(frameName == mod_scaleHint_target){
+ var scale = mb_getScale(frameName);
+ if(scale < mod_scaleHint_min || scale > mod_scaleHint_max){
+ if(scale < mod_scaleHint_min){
+ var newScale = mod_scaleHint_min;
+ }
+ if(scale > mod_scaleHint_max){
+ var newScale = mod_scaleHint_max;
+ }
+ var ind = getMapObjIndexByName(frameName);
+ var arrayBBox = mb_mapObj[ind].extent.split(",");
+ var x = parseFloat(arrayBBox[0]) + ((parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]))/2);
+ var y = parseFloat(arrayBBox[1]) + ((parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]))/2);
+ var minx = parseFloat(x) - (mb_mapObj[ind].width / (mb_resolution * 100 *2) * newScale);
+ var miny = parseFloat(y) - (mb_mapObj[ind].height / (mb_resolution * 100 *2) * newScale);
+ var maxx = parseFloat(x) + (mb_mapObj[ind].width / (mb_resolution * 100 *2) * newScale);
+ var maxy = parseFloat(y) + (mb_mapObj[ind].height / (mb_resolution * 100 *2) * newScale);
+ mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
+ }
+ }
+ return true;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_scaleSel.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,49 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_scaleSel.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scaleSelect' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-echo "var mod_scaleSelect_target = '".$e_target."';";
-if($cnt > 1){
- echo "alert('scaleSelect: ID not unique!');";
-}
-?>
-mb_registerSubFunctions("mod_scaleSelect_val(frameName)");
-function mod_scaleSelect(obj){
- var ind = obj.selectedIndex;
- mb_repaintScale(mod_scaleSelect_target,null,null,obj.options[ind].value);
-}
-function mod_scaleSelect_val(frameName){
- if(frameName == mod_scaleSelect_target){
- var scale = mb_getScale(frameName);
- document.getElementById("scaleSelect").options[0].text = "1 : " + scale;
- document.getElementById("scaleSelect").options[0].selected = true;
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php (from rev 2181, branches/2.4.5/http/javascripts/mod_scaleSel.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleSel.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,47 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_scaleSel.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scaleSelect' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+echo "var mod_scaleSelect_target = '".$e_target."';";
+if($cnt > 1){
+ echo "alert('scaleSelect: ID not unique!');";
+}
+?>
+mb_registerSubFunctions("mod_scaleSelect_val(frameName)");
+function mod_scaleSelect(obj){
+ var ind = obj.selectedIndex;
+ mb_repaintScale(mod_scaleSelect_target,null,null,obj.options[ind].value);
+}
+function mod_scaleSelect_val(frameName){
+ if(frameName == mod_scaleSelect_target){
+ var scale = mb_getScale(frameName);
+ document.getElementById("scaleSelect").options[0].text = "1 : " + scale;
+ document.getElementById("scaleSelect").options[0].selected = true;
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_scaleText.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_scaleText.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleText.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,60 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_scaleText.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scaleText' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-echo "var mod_scaleText_target = '".$e_target."';";
-if($cnt > 1){
- echo "alert('scaleSelect: ID not unique!');";
-}
-?>
-function mod_scaleText(){
- mod_scaleText_val(mod_scaleText_target);
- return false;
-}
-function mod_scaleText_val(frameName){
- var scale = document.getElementById("scaleText").elements[0];
- if(scale.value.search(/\D/) != -1 || scale.value == ""){
- scale.value = "";
- return;
- }
- var ind = getMapObjIndexByName(frameName);
- var arrayBBox = mb_mapObj[ind].extent.split(",");
- var x = parseFloat(arrayBBox[0]) + ((parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]))/2);
- var y = parseFloat(arrayBBox[1]) + ((parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]))/2);
-
- var minx = parseFloat(x) - (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale.value);
- var miny = parseFloat(y) - (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale.value);
- var maxx = parseFloat(x) + (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale.value);
- var maxy = parseFloat(y) + (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale.value);
- mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
- setMapRequest(frameName);
- scale.value = "";
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_scaleText.php (from rev 2181, branches/2.4.5/http/javascripts/mod_scaleText.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_scaleText.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_scaleText.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,58 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_scaleText.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scaleText' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+echo "var mod_scaleText_target = '".$e_target."';";
+if($cnt > 1){
+ echo "alert('scaleSelect: ID not unique!');";
+}
+?>
+function mod_scaleText(){
+ mod_scaleText_val(mod_scaleText_target);
+ return false;
+}
+function mod_scaleText_val(frameName){
+ var scale = document.getElementById("scaleText").elements[0];
+ if(scale.value.search(/\D/) != -1 || scale.value == ""){
+ scale.value = "";
+ return;
+ }
+ var ind = getMapObjIndexByName(frameName);
+ var arrayBBox = mb_mapObj[ind].extent.split(",");
+ var x = parseFloat(arrayBBox[0]) + ((parseFloat(arrayBBox[2]) - parseFloat(arrayBBox[0]))/2);
+ var y = parseFloat(arrayBBox[1]) + ((parseFloat(arrayBBox[3]) - parseFloat(arrayBBox[1]))/2);
+
+ var minx = parseFloat(x) - (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale.value);
+ var miny = parseFloat(y) - (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale.value);
+ var maxx = parseFloat(x) + (mb_mapObj[ind].width / (mb_resolution * 100 *2) * scale.value);
+ var maxy = parseFloat(y) + (mb_mapObj[ind].height / (mb_resolution * 100 *2) * scale.value);
+ mb_mapObj[ind].extent = minx + "," + miny + "," + maxx + "," + maxy;
+ setMapRequest(frameName);
+ scale.value = "";
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_scalebar.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_scalebar.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_scalebar.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,103 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_scalebar.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scalebar' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('scalebar: ID not unique!');";
-}
-echo "var mod_scalebar_target = '".$e_target."';";
-?>
-
-var mod_scalebar_left = 5;
-var mod_scalebar_bottom = 17;
-
-var mod_scalebar_color1 = "white";
-var mod_scalebar_color2 = "black";
-var mod_scalebar_font = "Arial, Helvetica, sans-serif";
-var mod_scalebar_fontsize = "9px";
-
-mb_registerSubFunctions("mod_scalebar()");
-function mod_scalebar(){
- var scale = mb_getScale(mod_scalebar_target);
- var ind = getMapObjIndexByName(mod_scalebar_target);
- if(scale < 10){
- var unit = '10 cm';
- var factor = 10/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale >= 10 && scale < 100){
- var unit = '1 m';
- var factor = 100/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 1000 && scale >= 100){
- var unit = '10 m';
- var factor = 1000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 10000 && scale >= 1000){
- var unit = '100 m';
- var factor = 10000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 100000 && scale >= 10000){
- var unit = '1 km';
- var factor = 100000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 1000000 && scale >= 100000){
- var unit = '10 km';
- var factor = 1000000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 10000000 && scale >= 1000000){
- var unit = '100 km';
- var factor = 10000000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale < 100000000 && scale >= 10000000){
- var unit = '1000 km';
- var factor = 100000000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- if(scale >= 100000000){
- var unit = '1000 km';
- var factor = 100000000/scale;
- var img_width = Math.round(factor * mb_resolution);
- }
- var scalebarTag = "<img src='../img/scalebar_bw.gif' width='"+ img_width +"' height='6'> ";
- scalebarTag += "<div style='position:absolute;left:"+(img_width + 4)+"px;top:5px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
- scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:7px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
- scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:5px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
- scalebarTag += "<div style='position:absolute;left:"+(img_width + 3)+"px;top:6px;color:"+mod_scalebar_color2+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'>"+ unit+"</div>";
- mb_arrangeElement(mod_scalebar_target, "scalebar", mod_scalebar_left, (mb_mapObj[ind].height - mod_scalebar_bottom));
- writeTag(mod_scalebar_target, "scalebar", scalebarTag);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_scalebar.php (from rev 2181, branches/2.4.5/http/javascripts/mod_scalebar.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_scalebar.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_scalebar.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,100 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_scalebar.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'scalebar' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('scalebar: ID not unique!');";
+}
+echo "var mod_scalebar_target = '".$e_target."';";
+?>
+
+var mod_scalebar_left = 5;
+var mod_scalebar_bottom = 17;
+
+var mod_scalebar_color1 = "white";
+var mod_scalebar_color2 = "black";
+var mod_scalebar_font = "Arial, Helvetica, sans-serif";
+var mod_scalebar_fontsize = "9px";
+
+mb_registerSubFunctions("mod_scalebar()");
+function mod_scalebar(){
+ var scale = mb_getScale(mod_scalebar_target);
+ var ind = getMapObjIndexByName(mod_scalebar_target);
+ if(scale < 10){
+ var unit = '10 cm';
+ var factor = 10/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale >= 10 && scale < 100){
+ var unit = '1 m';
+ var factor = 100/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 1000 && scale >= 100){
+ var unit = '10 m';
+ var factor = 1000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 10000 && scale >= 1000){
+ var unit = '100 m';
+ var factor = 10000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 100000 && scale >= 10000){
+ var unit = '1 km';
+ var factor = 100000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 1000000 && scale >= 100000){
+ var unit = '10 km';
+ var factor = 1000000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 10000000 && scale >= 1000000){
+ var unit = '100 km';
+ var factor = 10000000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale < 100000000 && scale >= 10000000){
+ var unit = '1000 km';
+ var factor = 100000000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ if(scale >= 100000000){
+ var unit = '1000 km';
+ var factor = 100000000/scale;
+ var img_width = Math.round(factor * mb_resolution);
+ }
+ var scalebarTag = "<img src='../img/scalebar_bw.gif' width='"+ img_width +"' height='6'> ";
+ scalebarTag += "<div style='position:absolute;left:"+(img_width + 4)+"px;top:5px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
+ scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:7px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
+ scalebarTag += "<div style='position:absolute;left:"+(img_width + 2)+"px;top:5px;color:"+mod_scalebar_color1+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'><nobr>"+ unit+"</nobr></div>";
+ scalebarTag += "<div style='position:absolute;left:"+(img_width + 3)+"px;top:6px;color:"+mod_scalebar_color2+";font-family:"+mod_scalebar_font+";font-size:"+mod_scalebar_fontsize+";'>"+ unit+"</div>";
+ mb_arrangeElement(mod_scalebar_target, "scalebar", mod_scalebar_left, (mb_mapObj[ind].height - mod_scalebar_bottom));
+ writeTag(mod_scalebar_target, "scalebar", scalebarTag);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_selArea.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_selArea.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_selArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,73 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_selArea.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selArea1' AND fkey_gui_id = '".$gui_id."'";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('selArea1: ID not unique!');";
-}
-?>
-var mod_selArea_elName = "selArea1";
-var mod_selArea_frameName = "";
-var mod_selArea_target = "<?php echo $e_target; ?>";
-
-var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php echo $e_src; ?>";
-var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_selArea1(ind){
- mb_button[ind] = document.getElementById(mod_selArea_elName);
- mb_button[ind].img_over = mod_selArea_img_over.src;
- mb_button[ind].img_on = mod_selArea_img_on.src;
- mb_button[ind].img_off = mod_selArea_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_selArea_elName;
- mb_button[ind].fName = mod_selArea_frameName;
- mb_button[ind].go = new Function ("mod_selArea_click()");
- mb_button[ind].stop = new Function ("mod_selArea_disable()");
-}
-function mod_selArea_click(){
- var el = window.frames[mod_selArea_target].document;
- el.onmouseover = mod_selArea_init;
- el.onmousedown = mod_box_start;
- el.onmouseup = mod_box_stop;
- el.onmousemove = mod_box_run;
-}
-function mod_selArea_disable(){
- var el = window.frames[mod_selArea_target].document;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
-}
-function mod_selArea_init(e){
- mb_isBF = mod_selArea_target;
- mb_zF = mod_selArea_target;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_selArea.php (from rev 2181, branches/2.4.5/http/javascripts/mod_selArea.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_selArea.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_selArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,71 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_selArea.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selArea1' AND fkey_gui_id = '".$gui_id."'";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('selArea1: ID not unique!');";
+}
+?>
+var mod_selArea_elName = "selArea1";
+var mod_selArea_frameName = "";
+var mod_selArea_target = "<?php echo $e_target; ?>";
+
+var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php echo $e_src; ?>";
+var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_selArea1(ind){
+ mb_button[ind] = document.getElementById(mod_selArea_elName);
+ mb_button[ind].img_over = mod_selArea_img_over.src;
+ mb_button[ind].img_on = mod_selArea_img_on.src;
+ mb_button[ind].img_off = mod_selArea_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_selArea_elName;
+ mb_button[ind].fName = mod_selArea_frameName;
+ mb_button[ind].go = new Function ("mod_selArea_click()");
+ mb_button[ind].stop = new Function ("mod_selArea_disable()");
+}
+function mod_selArea_click(){
+ var el = window.frames[mod_selArea_target].document;
+ el.onmouseover = mod_selArea_init;
+ el.onmousedown = mod_box_start;
+ el.onmouseup = mod_box_stop;
+ el.onmousemove = mod_box_run;
+}
+function mod_selArea_disable(){
+ var el = window.frames[mod_selArea_target].document;
+ el.onmousedown = null;
+ el.onmouseup = null;
+ el.onmousemove = null;
+}
+function mod_selArea_init(e){
+ mb_isBF = mod_selArea_target;
+ mb_zF = mod_selArea_target;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_selArea1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_selArea1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_selArea1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,88 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_selArea1.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selArea1' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('selArea1: ID not unique!');";
-}
-?>
-var mod_selArea_elName = "selArea1";
-var mod_selArea_frameName = "";
-var mod_selArea_target = "<?php echo $e_target; ?>";
-
-var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
-var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php echo $e_src; ?>";
-var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function init_selArea1(ind){
- mb_button[ind] = document.getElementById(mod_selArea_elName);
- mb_button[ind].img_over = mod_selArea_img_over.src;
- mb_button[ind].img_on = mod_selArea_img_on.src;
- mb_button[ind].img_off = mod_selArea_img_off.src;
- mb_button[ind].status = 0;
- mb_button[ind].elName = mod_selArea_elName;
- mb_button[ind].fName = mod_selArea_frameName;
- mb_button[ind].go = new Function ("mod_selArea_click()");
- mb_button[ind].stop = new Function ("mod_selArea_disable()");
-}
-function mod_selArea_click(){
- var el = window.frames[mod_selArea_target].document;
- el.onmouseover = mod_selArea_init;
- el.onmousedown = mod_box_start;
- el.onmouseup = mod_selArea_get;
- el.onmousemove = mod_box_run;
-}
-function mod_selArea_disable(){
- var el = window.frames[mod_selArea_target].document;
- el.onmousedown = null;
- el.onmouseup = null;
- el.onmousemove = null;
-}
-function mod_selArea_init(e){
- mb_isBF = mod_selArea_target;
- mb_zF = mod_selArea_target;
-}
-function mod_selArea_get(e){
- mod_selArea_setValidClipping(mod_box_stop(e));
- mb_isBF = mod_selArea_target;
- mb_zF = mod_selArea_target;
-}
-function mod_selArea_setValidClipping(coords){
- if(coords.length > 2){
- mb_calculateExtent(mb_zF,coords[0],coords[1],coords[2],coords[3]);
- setMapRequest(mb_zF);
- }
- else{
- zoom(mb_zF,true,1.0,coords[0], coords[1]);
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_selArea1.php (from rev 2181, branches/2.4.5/http/javascripts/mod_selArea1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_selArea1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_selArea1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,85 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_selArea1.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selArea1' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('selArea1: ID not unique!');";
+}
+?>
+var mod_selArea_elName = "selArea1";
+var mod_selArea_frameName = "";
+var mod_selArea_target = "<?php echo $e_target; ?>";
+
+var mod_selArea_img_on = new Image(); mod_selArea_img_on.src = "<?php echo preg_replace("/_off/","_on",$e_src); ?>";
+var mod_selArea_img_off = new Image(); mod_selArea_img_off.src = "<?php echo $e_src; ?>";
+var mod_selArea_img_over = new Image(); mod_selArea_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function init_selArea1(ind){
+ mb_button[ind] = document.getElementById(mod_selArea_elName);
+ mb_button[ind].img_over = mod_selArea_img_over.src;
+ mb_button[ind].img_on = mod_selArea_img_on.src;
+ mb_button[ind].img_off = mod_selArea_img_off.src;
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = mod_selArea_elName;
+ mb_button[ind].fName = mod_selArea_frameName;
+ mb_button[ind].go = new Function ("mod_selArea_click()");
+ mb_button[ind].stop = new Function ("mod_selArea_disable()");
+}
+function mod_selArea_click(){
+ var el = window.frames[mod_selArea_target].document;
+ el.onmouseover = mod_selArea_init;
+ el.onmousedown = mod_box_start;
+ el.onmouseup = mod_selArea_get;
+ el.onmousemove = mod_box_run;
+}
+function mod_selArea_disable(){
+ var el = window.frames[mod_selArea_target].document;
+ el.onmousedown = null;
+ el.onmouseup = null;
+ el.onmousemove = null;
+}
+function mod_selArea_init(e){
+ mb_isBF = mod_selArea_target;
+ mb_zF = mod_selArea_target;
+}
+function mod_selArea_get(e){
+ mod_selArea_setValidClipping(mod_box_stop(e));
+ mb_isBF = mod_selArea_target;
+ mb_zF = mod_selArea_target;
+}
+function mod_selArea_setValidClipping(coords){
+ if(coords.length > 2){
+ mb_calculateExtent(mb_zF,coords[0],coords[1],coords[2],coords[3]);
+ setMapRequest(mb_zF);
+ }
+ else{
+ zoom(mb_zF,true,1.0,coords[0], coords[1]);
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_selectMapsize.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,54 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_selectMapsize.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selectMapsize' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('selectMapsize: ID not unique!');";
-}
-echo "var mod_selectMapsize_target = '".$e_target."';";
-?>
-
-function mod_selectMapsize(obj){
- var ind = getMapObjIndexByName(mod_selectMapsize_target);
- var p = obj.value.split(",");
- var w = parseInt(p[0]) ;
- var h = parseInt(p[1]);
- var pos = makeClickPos2RealWorldPos(mod_selectMapsize_target,w,h);
- var coords = mb_mapObj[ind].extent.split(",");
- mb_mapObj[ind].extent = coords[0] + "," + pos[1] + "," + pos[0] + "," + coords[3];
- mb_mapObj[ind].width = w;
- mb_mapObj[ind].height = h;
- document.getElementById(mod_selectMapsize_target).style.width = mb_mapObj[ind].width;
- document.getElementById(mod_selectMapsize_target).style.height = mb_mapObj[ind].height;
- window.frames[mod_selectMapsize_target].document.getElementById("maps").style.width = mb_mapObj[ind].width;
- window.frames[mod_selectMapsize_target].document.getElementById("maps").style.height = mb_mapObj[ind].height;
- setMapRequest(mod_selectMapsize_target);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php (from rev 2181, branches/2.4.5/http/javascripts/mod_selectMapsize.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_selectMapsize.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,52 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_selectMapsize.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'selectMapsize' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('selectMapsize: ID not unique!');";
+}
+echo "var mod_selectMapsize_target = '".$e_target."';";
+?>
+
+function mod_selectMapsize(obj){
+ var ind = getMapObjIndexByName(mod_selectMapsize_target);
+ var p = obj.value.split(",");
+ var w = parseInt(p[0]) ;
+ var h = parseInt(p[1]);
+ var pos = makeClickPos2RealWorldPos(mod_selectMapsize_target,w,h);
+ var coords = mb_mapObj[ind].extent.split(",");
+ mb_mapObj[ind].extent = coords[0] + "," + pos[1] + "," + pos[0] + "," + coords[3];
+ mb_mapObj[ind].width = w;
+ mb_mapObj[ind].height = h;
+ document.getElementById(mod_selectMapsize_target).style.width = mb_mapObj[ind].width;
+ document.getElementById(mod_selectMapsize_target).style.height = mb_mapObj[ind].height;
+ window.frames[mod_selectMapsize_target].document.getElementById("maps").style.width = mb_mapObj[ind].width;
+ window.frames[mod_selectMapsize_target].document.getElementById("maps").style.height = mb_mapObj[ind].height;
+ setMapRequest(mod_selectMapsize_target);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_setBBOX1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,48 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_setBBOX1.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setBBOX' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('setBBOX: ID not unique!');";
-}
-echo "var mod_setBBOX_target = '".$e_target."';";
-?>
-mb_registerInitFunctions("mod_setBBOX_init()");
-function mod_setBBOX_init(){
- var my_target = mod_setBBOX_target.split(",");
- var myBBOX = "<?php echo $_SESSION['mb_myBBOX'] ?>";
- for(var i=0; i<my_target.length; i++){
- if(myBBOX != ""){
- var coord = myBBOX.split(",");
- mb_calculateExtent(my_target[i],parseFloat(coord[0]),parseFloat(coord[1]),parseFloat(coord[2]),parseFloat(coord[3]));
- }
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php (from rev 2181, branches/2.4.5/http/javascripts/mod_setBBOX1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBBOX1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,46 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_setBBOX1.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setBBOX' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('setBBOX: ID not unique!');";
+}
+echo "var mod_setBBOX_target = '".$e_target."';";
+?>
+mb_registerInitFunctions("mod_setBBOX_init()");
+function mod_setBBOX_init(){
+ var my_target = mod_setBBOX_target.split(",");
+ var myBBOX = "<?php echo $_SESSION['mb_myBBOX'] ?>";
+ for(var i=0; i<my_target.length; i++){
+ if(myBBOX != ""){
+ var coord = myBBOX.split(",");
+ mb_calculateExtent(my_target[i],parseFloat(coord[0]),parseFloat(coord[1]),parseFloat(coord[2]),parseFloat(coord[3]));
+ }
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_setBackground.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_setBackground.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBackground.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,81 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_setBackground.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setBackground' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('setBackground: ID not unique!');";
-}
-
-if(isset($_REQUEST["wms"])){
- $wms = $_REQUEST["wms"];
-}
-else{
- $wms = 0;
-}
-echo "var mod_setBackground_wms = ".$wms.";";
-echo "var mod_setBackground_target = '".$e_target."';";
-?>
-mb_registerInitFunctions("mod_setBackground_init()");
-var mod_setBackground_active = false;
-function mod_setBackground_init(){
- var ind = document.setBackground.mod_setBackground_list.options[0].value;
- var cnt = 0;
- var selInd;
-
- document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length - 1] = null;
- for(var i=0; i<wms.length; i++){
- if(wms[i].gui_wms_visible == '0'){
- var title = decodeURIComponent(wms[i].wms_title);
- while (title.search(/\+/) != -1) {
- title = title.replace("\+", " ");
- }
- var newO = new Option(title, i, false,false);
-
- document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length] = newO;
- if (ind == i) {
- selInd = cnt;
- }
- cnt++;
- }
- }
- if (cnt >0){
- wms[ind].gui_wms_visible = 2;
- document.setBackground.mod_setBackground_list.selectedIndex = selInd;
- }
- mod_setBackground_active = ind;
-}
-
-function mod_setBackground_change(obj){
- wms[mod_setBackground_active].gui_wms_visible = 0;
- wms[obj.value].gui_wms_visible = 2;
- mod_setBackground_active = obj.value;
- zoom(mod_setBackground_target,true, 1.0);
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_setBackground.php (from rev 2181, branches/2.4.5/http/javascripts/mod_setBackground.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_setBackground.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBackground.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,79 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_setBackground.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setBackground' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('setBackground: ID not unique!');";
+}
+
+if(isset($_REQUEST["wms"])){
+ $wms = $_REQUEST["wms"];
+}
+else{
+ $wms = 0;
+}
+echo "var mod_setBackground_wms = ".$wms.";";
+echo "var mod_setBackground_target = '".$e_target."';";
+?>
+mb_registerInitFunctions("mod_setBackground_init()");
+var mod_setBackground_active = false;
+function mod_setBackground_init(){
+ var ind = document.setBackground.mod_setBackground_list.options[0].value;
+ var cnt = 0;
+ var selInd;
+
+ document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length - 1] = null;
+ for(var i=0; i<wms.length; i++){
+ if(wms[i].gui_wms_visible == '0'){
+ var title = decodeURIComponent(wms[i].wms_title);
+ while (title.search(/\+/) != -1) {
+ title = title.replace("\+", " ");
+ }
+ var newO = new Option(title, i, false,false);
+
+ document.setBackground.mod_setBackground_list.options[document.setBackground.mod_setBackground_list.length] = newO;
+ if (ind == i) {
+ selInd = cnt;
+ }
+ cnt++;
+ }
+ }
+ if (cnt >0){
+ wms[ind].gui_wms_visible = 2;
+ document.setBackground.mod_setBackground_list.selectedIndex = selInd;
+ }
+ mod_setBackground_active = ind;
+}
+
+function mod_setBackground_change(obj){
+ wms[mod_setBackground_active].gui_wms_visible = 0;
+ wms[obj.value].gui_wms_visible = 2;
+ mod_setBackground_active = obj.value;
+ zoom(mod_setBackground_target,true, 1.0);
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_setBackground_all.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,63 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_setBackground_all.php
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setBackground_all' AND fkey_gui_id = $1 ";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('setBackground_all: ID not unique!');";}
-
-echo "var mod_setBackground_all_target = '".$e_target."';";
-?>
-
-var mod_setBackground_all_wms = new Array();
-function mod_setBackground_all_init(obj){
- var ind = getMapObjIndexByName(mod_setBackground_all_target);
- var cnt = 0;
- if(obj.checked == true){
- for(var i=0; i<mb_mapObj[ind].wms.length; i++){
- if(wms[i].gui_wms_visible == '0'){
- mod_setBackground_all_wms[cnt] = mb_mapObj[ind].wms[i].wms_id;
- mb_mapObj[ind].wms[i].gui_wms_visible = "1";
- cnt++;
- }
- }
- }
- else{
- for(var i=0; i<mb_mapObj[ind].wms.length; i++){
- for(var ii = 0; ii<mod_setBackground_all_wms.length; ii++){
- if(mb_mapObj[ind].wms[i].wms_id == mod_setBackground_all_wms[ii]){
- mb_mapObj[ind].wms[i].gui_wms_visible = "0";
- }
- }
- }
- }
- zoom(mod_setBackground_all_target,true, 0.99);
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php (from rev 2181, branches/2.4.5/http/javascripts/mod_setBackground_all.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_setBackground_all.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,60 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_setBackground_all.php
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setBackground_all' AND fkey_gui_id = $1 ";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('setBackground_all: ID not unique!');";}
+
+echo "var mod_setBackground_all_target = '".$e_target."';";
+?>
+
+var mod_setBackground_all_wms = new Array();
+function mod_setBackground_all_init(obj){
+ var ind = getMapObjIndexByName(mod_setBackground_all_target);
+ var cnt = 0;
+ if(obj.checked == true){
+ for(var i=0; i<mb_mapObj[ind].wms.length; i++){
+ if(wms[i].gui_wms_visible == '0'){
+ mod_setBackground_all_wms[cnt] = mb_mapObj[ind].wms[i].wms_id;
+ mb_mapObj[ind].wms[i].gui_wms_visible = "1";
+ cnt++;
+ }
+ }
+ }
+ else{
+ for(var i=0; i<mb_mapObj[ind].wms.length; i++){
+ for(var ii = 0; ii<mod_setBackground_all_wms.length; ii++){
+ if(mb_mapObj[ind].wms[i].wms_id == mod_setBackground_all_wms[ii]){
+ mb_mapObj[ind].wms[i].gui_wms_visible = "0";
+ }
+ }
+ }
+ }
+ zoom(mod_setBackground_all_target,true, 0.99);
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_setPOI2Scale.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,66 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_setPOI2Scale.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$gui_id = $_REQUEST["gui_id"];
-include("../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setPOI2Scale' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('setPOI2SCale: ID not unique!');";
-}
-echo "var mod_setPOI2Scale_target = '".$e_target."';";
-$e_id_css = 'setPOI2Scale';
-include("../include/dyn_js.php");
-
-?>
-
-try{
- if (mod_setPOI2Scale_defScale){}
-}
-catch(e){
- mod_setPOI2Scale_defScale = 5000;
-}
-
-mb_registerInitFunctions("mod_setPOI2Scale()");
-
-function mod_setPOI2Scale(){
- var my_target = mod_setPOI2Scale_target.split(",");
- var myPOI = "<?php echo $_SESSION['mb_myPOI2SCALE'] ?>";
- if(myPOI && myPOI != ""){
- var coord = myPOI.split(",");
- if(coord.length == 2){
- coord[2] = mod_setPOI2Scale_defScale;
- }
- for(var i=0; i<my_target.length; i++){
- if(myPOI != ""){
- mb_repaintScale(my_target[i], coord[0], coord[1], coord[2]);
- }
- }
- }
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php (from rev 2181, branches/2.4.5/http/javascripts/mod_setPOI2Scale.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_setPOI2Scale.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,64 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_setPOI2Scale.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'setPOI2Scale' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('setPOI2SCale: ID not unique!');";
+}
+echo "var mod_setPOI2Scale_target = '".$e_target."';";
+$e_id_css = 'setPOI2Scale';
+include("../include/dyn_js.php");
+
+?>
+
+try{
+ if (mod_setPOI2Scale_defScale){}
+}
+catch(e){
+ mod_setPOI2Scale_defScale = 5000;
+}
+
+mb_registerInitFunctions("mod_setPOI2Scale()");
+
+function mod_setPOI2Scale(){
+ var my_target = mod_setPOI2Scale_target.split(",");
+ var myPOI = "<?php echo $_SESSION['mb_myPOI2SCALE'] ?>";
+ if(myPOI && myPOI != ""){
+ var coord = myPOI.split(",");
+ if(coord.length == 2){
+ coord[2] = mod_setPOI2Scale_defScale;
+ }
+ for(var i=0; i<my_target.length; i++){
+ if(myPOI != ""){
+ mb_repaintScale(my_target[i], coord[0], coord[1], coord[2]);
+ }
+ }
+ }
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_setTimeout.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,97 +0,0 @@
-<?php
-# $Id$
-# maintained by http://www.mapbender.org/index.php/User:Astrid Emde
-# http://www.mapbender.org/index.php/mod_setTimeout.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$e_id_css = 'timeout';
-$gui_id = $_REQUEST["gui_id"];
-include '../include/dyn_js.php';
-
-?>
-
-try{
- if (mod_timeout_text){}
-}
-catch(e){
- mod_timeout_text = "Your session may not be valid anymore!";
- //mod_timeout_text = "Bitte beachten Sie, dass Ihre Session abgelaufen sein kann!";
-}
-
-try{
- if (mod_timeout_ttl){}
-}
-catch(e){
- mod_timeout_ttl = '15';
-}
-
-/*
-* alert: a confirm - window to reload the application when timeout is reached
-* logout: request mod_logout after timeout
-*/
-try{
- if (mod_timeout_action){}
-}
-catch(e){
- mod_timeout_action = 'alert';
-}
-
-
-/*version 2.0.0*/
-mod_timeout_cnt = false;
-
-
-mb_registerSubFunctions("mod_setTimeout_set()"); // maprequest
-mb_registerInitFunctions("mod_setTimeout_interval()");
-
-function mod_setTimeout_interval(){
- var aktiv = window.setInterval("mod_setTimeout_check()",60000);
- mod_setTimeout_set();
- mod_setTimeout_check();
-}
-
-function mod_setTimeout_set(){
- mod_timeout_cnt = parseInt(mod_timeout_ttl);
- mod_setTimeout_check();
-}
-
-function mod_setTimeout_check(){
-
- var str = "<span style='font-family: Arial, Helvetica, sans-serif;font-size:10px;'>";
- str += "Logout in ";
-
- if(mod_timeout_cnt >= 0){
- str += mod_timeout_cnt;
- }
- else { str += "0"; }
-
- str += " min";
- str += "</span>";
- writeTag("", "timeout", str );
-
- if(mod_timeout_cnt == 0 && mod_timeout_action == 'alert'){
- var go = confirm(mod_timeout_text);
- if(go == true){
- // document.location.href = "./login.php";
- }
-
- }
- if(mod_timeout_cnt == 0 && mod_timeout_action == 'logout'){ document.location.href = "../php/mod_logout.php";}
- mod_timeout_cnt--;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php (from rev 2181, branches/2.4.5/http/javascripts/mod_setTimeout.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_setTimeout.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,95 @@
+<?php
+# $Id$
+# maintained by http://www.mapbender.org/index.php/User:Astrid Emde
+# http://www.mapbender.org/index.php/mod_setTimeout.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$e_id_css = 'timeout';
+include '../include/dyn_js.php';
+
+?>
+
+try{
+ if (mod_timeout_text){}
+}
+catch(e){
+ mod_timeout_text = "Your session may not be valid anymore!";
+ //mod_timeout_text = "Bitte beachten Sie, dass Ihre Session abgelaufen sein kann!";
+}
+
+try{
+ if (mod_timeout_ttl){}
+}
+catch(e){
+ mod_timeout_ttl = '15';
+}
+
+/*
+* alert: a confirm - window to reload the application when timeout is reached
+* logout: request mod_logout after timeout
+*/
+try{
+ if (mod_timeout_action){}
+}
+catch(e){
+ mod_timeout_action = 'alert';
+}
+
+
+/*version 2.0.0*/
+mod_timeout_cnt = false;
+
+
+mb_registerSubFunctions("mod_setTimeout_set()"); // maprequest
+mb_registerInitFunctions("mod_setTimeout_interval()");
+
+function mod_setTimeout_interval(){
+ var aktiv = window.setInterval("mod_setTimeout_check()",60000);
+ mod_setTimeout_set();
+ mod_setTimeout_check();
+}
+
+function mod_setTimeout_set(){
+ mod_timeout_cnt = parseInt(mod_timeout_ttl);
+ mod_setTimeout_check();
+}
+
+function mod_setTimeout_check(){
+
+ var str = "<span style='font-family: Arial, Helvetica, sans-serif;font-size:10px;'>";
+ str += "Logout in ";
+
+ if(mod_timeout_cnt >= 0){
+ str += mod_timeout_cnt;
+ }
+ else { str += "0"; }
+
+ str += " min";
+ str += "</span>";
+ writeTag("", "timeout", str );
+
+ if(mod_timeout_cnt == 0 && mod_timeout_action == 'alert'){
+ var go = confirm(mod_timeout_text);
+ if(go == true){
+ // document.location.href = "./login.php";
+ }
+
+ }
+ if(mod_timeout_cnt == 0 && mod_timeout_action == 'logout'){ document.location.href = "../php/mod_logout.php";}
+ mod_timeout_cnt--;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_state.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_state.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_state.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,60 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_state.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-//require(dirname(__FILE__)."/mb_validateSession.php");
-$gui_id = $_SESSION["mb_user_gui"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<HTML>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>image map generator</title>
-<STYLE TYPE="text/css">
-<!--
- body{
- background-color:#ffffff;
- text-decoration: none;
- font-family: Verdana, Arial, Helvetica, sans-serif;
- font-weight: bold;
- font-size:9pt;
- color: #003366;
- margin-left: 0px;
- margin-top: 0px;
- }
-
- table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- color: #0066cc;
- font-size:10pt
- }
-
- -->
-</STYLE>
-<BODY bgcolor='#ffffff'>
-<?php
-$sql = "SELECT stand FROM layer_metadata;";
-$res = db_prep_query($sql);
-
-echo "Daten der Vertriebsplattform sind vom Stand: ".db_result($res,0,"stand");
-?>
-</BODY>
-</HTML>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_state.php (from rev 2140, branches/2.4.5/http/javascripts/mod_state.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_state.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_state.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,59 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_state.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$gui_id = $_SESSION["mb_user_gui"];
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<HTML>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>image map generator</title>
+<STYLE TYPE="text/css">
+<!--
+ body{
+ background-color:#ffffff;
+ text-decoration: none;
+ font-family: Verdana, Arial, Helvetica, sans-serif;
+ font-weight: bold;
+ font-size:9pt;
+ color: #003366;
+ margin-left: 0px;
+ margin-top: 0px;
+ }
+
+ table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ color: #0066cc;
+ font-size:10pt
+ }
+
+ -->
+</STYLE>
+<BODY bgcolor='#ffffff'>
+<?php
+$sql = "SELECT stand FROM layer_metadata;";
+$res = db_prep_query($sql);
+
+echo "Daten der Vertriebsplattform sind vom Stand: ".db_result($res,0,"stand");
+?>
+</BODY>
+</HTML>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_tab.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_tab.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_tab.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,160 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_tab.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-/********** Configuration*************************************************/
-
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = 'tabs';
-include(dirname(__FILE__).'/../include/dyn_js.php');
-
-?>
-var tab_height = false;
-var tab_width = false;
-var tab_topOffset = false;
-var tab_leftOffset = false;
-var tab_active = -1;
-var tab_check = new Array();
-var tab_iv1 = false;
-var tab_wait = false;
-
-try{
- if (open_tab){}
-}
-catch(e){
- open_tab = false;
-}
-
-/********** Configuration*************************************************/
-mb_registerInitFunctions('tab_init()');
-function tab_init(){
- var obj = document.getElementById("tabs").style;
- tab_topOffset = parseInt(obj.top);
- tab_leftOffset = parseInt(obj.left);
- tab_width = parseInt(obj.width);
- tab_height = parseInt(obj.height);
- var str = "";
-
- for(var i = 0; i<tab_ids.length; i++){
- document.getElementById(tab_ids[i]).style.visibility = 'hidden';
- tab_titles[i] = tab_prefix + tab_titles[i];
- var newId = "tab_" + i;
- str += "<div id='"+newId+"' ";
- str += "style='";
- str += tab_style;
- str += "width:"+tab_width+"px;";
- str += "height:"+tab_height+"px;";
- str += "top:" + ((i * tab_height)) + "px;";
- str += "'";
- str += " onclick='tab_set("+i+")'>";
- str += tab_titles[i];
- str += "</div>";
- }
- document.getElementById("tabs").innerHTML = str;
-
- if (open_tab != 'false'){
- tab_set(open_tab);
- }
-}
-function tab_set(ind){
- if(tab_wait){
- return;
- }
- tab_unsetFrame();
- if(ind == tab_active){
- tab_wait = true;
- tab_active = -1;
- tab_check = new Array();
- tab_iv1 = setInterval("tab_move("+tab_active+")",1);
- return;
- }
- else{
- tab_wait = true;
- tab_active = ind;
- tab_check = new Array();
- tab_iv1 = setInterval("tab_move("+tab_active+")",1);
- return;
- }
-}
-function tab_setFrame(ind){
- for(var i = 0; i<tab_ids.length; i++){
- if(i == ind){
- var obj = document.getElementById(tab_ids[i]).style;
- var newpos = ((i+1) * tab_height) + parseInt(tab_topOffset);
- obj.top = (newpos + 1) + "px";
- obj.left = (tab_leftOffset) + "px";
- obj.width = tab_width;
- obj.height = (parseInt(tab_frameHeight[ind]) - 2);
- obj.visibility = 'visible';
- }
- }
-}
-function tab_unsetFrame(){
- for(var i = 0; i<tab_ids.length; i++){
- var obj = document.getElementById(tab_ids[i]).style;
- obj.visibility = 'hidden';
- }
-}
-function tab_open(tabid){
- var t = false;
- for(var i = 0; i<tab_ids.length; i++){
- if(tab_ids[i] == tabid){
- t = i;
- }
- }
- if(tab_active != t){
- tab_set(t);
- }
-}
-function tab_move(ind){
- for(var i = 0; i<tab_ids.length; i++){
- var newpos = (i * tab_height);
- if(i > ind && tab_active >= 0){
- newpos += parseInt(tab_frameHeight[ind]);
- }
- var myid = "tab_" + i;
- var pos = parseInt(document.getElementById(myid).style.top);
- if(pos == newpos){
- tab_check[i] = true;
- }
- else if(pos < newpos){
- document.getElementById(myid).style.top = (pos + 10) + "px";
- tab_check[i] = false;
- }
- else if(pos > newpos){
- document.getElementById(myid).style.top = (pos - 10) + "px";
- tab_check[i] = false;
- }
- }
-
- var check = true;
- for(var j=0; j<tab_check.length; j++){
- if(tab_check[j] == false){
- check = false;
- }
- }
- if(check == true){
- clearInterval(tab_iv1);
- tab_check = new Array();
- tab_wait = false;
- if(ind >= 0){
- tab_setFrame(ind);
- }
- return;
- }
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_tab.php (from rev 2181, branches/2.4.5/http/javascripts/mod_tab.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_tab.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_tab.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,160 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_tab.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+/********** Configuration*************************************************/
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$e_id_css = 'tabs';
+include(dirname(__FILE__).'/../include/dyn_js.php');
+
+?>
+var tab_height = false;
+var tab_width = false;
+var tab_topOffset = false;
+var tab_leftOffset = false;
+var tab_active = -1;
+var tab_check = new Array();
+var tab_iv1 = false;
+var tab_wait = false;
+
+try{
+ if (open_tab){}
+}
+catch(e){
+ open_tab = false;
+}
+
+/********** Configuration*************************************************/
+mb_registerInitFunctions('tab_init()');
+function tab_init(){
+ var obj = document.getElementById("tabs").style;
+ tab_topOffset = parseInt(obj.top);
+ tab_leftOffset = parseInt(obj.left);
+ tab_width = parseInt(obj.width);
+ tab_height = parseInt(obj.height);
+ var str = "";
+
+ for(var i = 0; i<tab_ids.length; i++){
+ document.getElementById(tab_ids[i]).style.visibility = 'hidden';
+ tab_titles[i] = tab_prefix + tab_titles[i];
+ var newId = "tab_" + i;
+ str += "<div id='"+newId+"' ";
+ str += "style='";
+ str += tab_style;
+ str += "width:"+tab_width+"px;";
+ str += "height:"+tab_height+"px;";
+ str += "top:" + ((i * tab_height)) + "px;";
+ str += "'";
+ str += " onclick='tab_set("+i+")'>";
+ str += tab_titles[i];
+ str += "</div>";
+ }
+ document.getElementById("tabs").innerHTML = str;
+
+ if (open_tab != 'false'){
+ tab_set(open_tab);
+ }
+}
+function tab_set(ind){
+ if(tab_wait){
+ return;
+ }
+ tab_unsetFrame();
+ if(ind == tab_active){
+ tab_wait = true;
+ tab_active = -1;
+ tab_check = new Array();
+ tab_iv1 = setInterval("tab_move("+tab_active+")",1);
+ return;
+ }
+ else{
+ tab_wait = true;
+ tab_active = ind;
+ tab_check = new Array();
+ tab_iv1 = setInterval("tab_move("+tab_active+")",1);
+ return;
+ }
+}
+function tab_setFrame(ind){
+ for(var i = 0; i<tab_ids.length; i++){
+ if(i == ind){
+ var obj = document.getElementById(tab_ids[i]).style;
+ var newpos = ((i+1) * tab_height) + parseInt(tab_topOffset);
+ obj.top = (newpos + 1) + "px";
+ obj.left = (tab_leftOffset) + "px";
+ obj.width = tab_width;
+ obj.height = (parseInt(tab_frameHeight[ind]) - 2);
+ obj.visibility = 'visible';
+ }
+ }
+}
+function tab_unsetFrame(){
+ for(var i = 0; i<tab_ids.length; i++){
+ var obj = document.getElementById(tab_ids[i]).style;
+ obj.visibility = 'hidden';
+ }
+}
+function tab_open(tabid){
+ var t = false;
+ for(var i = 0; i<tab_ids.length; i++){
+ if(tab_ids[i] == tabid){
+ t = i;
+ }
+ }
+ if(tab_active != t){
+ tab_set(t);
+ }
+}
+function tab_move(ind){
+ for(var i = 0; i<tab_ids.length; i++){
+ var newpos = (i * tab_height);
+ if(i > ind && tab_active >= 0){
+ newpos += parseInt(tab_frameHeight[ind]);
+ }
+ var myid = "tab_" + i;
+ var pos = parseInt(document.getElementById(myid).style.top);
+ if(pos == newpos){
+ tab_check[i] = true;
+ }
+ else if(pos < newpos){
+ document.getElementById(myid).style.top = (pos + 10) + "px";
+ tab_check[i] = false;
+ }
+ else if(pos > newpos){
+ document.getElementById(myid).style.top = (pos - 10) + "px";
+ tab_check[i] = false;
+ }
+ }
+
+ var check = true;
+ for(var j=0; j<tab_check.length; j++){
+ if(tab_check[j] == false){
+ check = false;
+ }
+ }
+ if(check == true){
+ clearInterval(tab_iv1);
+ tab_check = new Array();
+ tab_wait = false;
+ if(ind >= 0){
+ tab_setFrame(ind);
+ }
+ return;
+ }
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_toggleModule.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,43 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_toggleModule.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'toggleModule' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('toggleModule: ID not unique!');";
-}
-echo "var mod_toggleModule ='".$e_target."';";
-?>
-mb_registerInitFunctions('mod_toggleModule_init()');
-function mod_toggleModule_init(){
- mb_regButton(mod_toggleModule);
- mb_button_click(0);
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php (from rev 2181, branches/2.4.5/http/javascripts/mod_toggleModule.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_toggleModule.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,40 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_toggleModule.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'toggleModule' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('toggleModule: ID not unique!');";
+}
+echo "var mod_toggleModule ='".$e_target."';";
+?>
+mb_registerInitFunctions('mod_toggleModule_init()');
+function mod_toggleModule_init(){
+ mb_regButton(mod_toggleModule);
+ mb_button_click(0);
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_usemap.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_usemap.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_usemap.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,147 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/UseMap
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-?>
-var mod_usemap_target = 'mapframe1';
-var mod_usemap_wfs = "<url>";
-var mod_usemap_px = 10;
-var um_title;
-var um_draw;
-
-mb_registerSubFunctions('mod_usemap_init()');
-mb_registerInitFunctions("um_init()")
-
-function mod_usemap_init(){
- var ind = getMapObjIndexByName(mod_usemap_target);
- var extent = mb_mapObj[ind].extent;
- var url = "../php/mod_usemap.php?url="
- url += escape(mod_usemap_wfs + "&BBOX=" + extent);
- url += "&extent=" + extent;
- url += "&width=" + mb_mapObj[ind].width;
- url += "&height=" + mb_mapObj[ind].height;
- document.getElementById('usemap').src = url;
- var myImg = window.frames[mod_usemap_target].document.getElementById("um_img").style;
- myImg.width = mb_mapObj[ind].width;
- myImg.height = mb_mapObj[ind].height;
-}
-function mod_usemap_set(title,x,y){
- var str = "";
- for(var i=0; i<title.length; i++){
- var pos = makeRealWorld2mapPos(mod_usemap_target,x[i],y[i]);
- str += "<AREA onmouseover='parent.over(event, \"" + title[i] + "\", this)' ";
- str += "onmouseout=parent.out(this) shape='circle' coords='";
- str += Math.round(pos[0]) + "," + Math.round(pos[1]) + "," + mod_usemap_px + "'";
- str += " href='#'>";
- }
- writeTag(mod_usemap_target, 'um', str);
-}
-
-/* Opacity for hilighting */
- cw_opacity = 0.5;
-/* Color for polygon boundary */
- cw_bndcolor = "#ff0000";
-/* Color for polygon fill */
- cw_fillcolor = "#ffff00";
-
-function polyXcoords(coords){
- var Xcoords = '';
- for (var z = 0; z<coords.length; z=z+2){
- if (z > 0){
- Xcoords += ', ';
- }
- Xcoords += parseInt(coords[z]);
- }
- return Xcoords;
-}
-function polyYcoords(coords){
- var Ycoords = '';
- for (var z = 1; z<coords.length; z=z+2){
- if (z > 1){
- Ycoords += ', ';
- }
- Ycoords += parseInt(coords[z]);
- }
- return Ycoords;
-}
-function setFocus(objid){
- if (canvasHasDrawing == true) return true;
- var coords = objid.coords.split(',');
- if ((objid.shape.toUpperCase() == 'POLY') || (objid.shape.toUpperCase() == 'POLYGON')){
- var Xcoords = polyXcoords(coords);
- var Ycoords = polyYcoords(coords);
- var pgx = Xcoords.split(',');
- var pgy = Ycoords.split(',');
- for (var i=0 ; i<pgx.length ; i++ ){
- pgx[i] = parseInt(pgx[i]);
- pgy[i] = parseInt(pgy[i]);
- }
- canvas.setColor(cw_fillcolor);
- canvas.fillPolygon(pgx,pgy);
- canvas.paint();
- canvas.setColor(cw_bndcolor);
- canvas.drawPolygon(pgx,pgy);
- canvas.paint();
- }
- if ((objid.shape.toUpperCase() == 'CIRCLE')){
- var c = coords;
- canvas.setColor(cw_fillcolor);
- canvas.fillEllipse(parseInt(c[0])-mod_usemap_px/2,parseInt(c[1])-mod_usemap_px/2,parseInt(c[2]),parseInt(c[2]));
- canvas.paint();
- canvas.setColor(cw_bndcolor);
- canvas.drawEllipse(parseInt(c[0])-mod_usemap_px/2,parseInt(c[1])-mod_usemap_px/2,parseInt(c[2]),parseInt(c[2]));
- canvas.paint();
- }
- canvasHasDrawing = true;
- return true;
-}
-
-function clearFocus(objid){
- if (canvasHasDrawing) canvas.clear();
- canvasHasDrawing = false;
- return true;
-}
-
-function over(e, id, area){
- var coords = area.coords.split(',');
- area.setAttribute('title', "");
- if (!isOver){
- um_title.innerHTML = id;
- um_title.style.display = "block";
- isOver = area;
- setFocus(area);
- }
- mb_arrangeElement(mod_usemap_target, 'um_title', parseInt(coords[0])+mod_usemap_px, parseInt(coords[1])+mod_usemap_px);
- canvasHasDrawing = true;
-}
-
-function out(area){
- um_title.innerHTML = "";
- um_title.style.display = "none";
- clearFocus(area);
- isOver = false;
- canvasHasDrawing = false;
-}
-
-function um_init(){
- um_title = window.frames[mod_usemap_target].document.getElementById("um_title"); /* tooltip */
- um_draw = window.frames[mod_usemap_target].document.getElementById("um_draw"); /* tooltip */
- canvas = new jsGraphics('um_draw', window.frames['mapframe1']);
- canvas.setStroke(2);
- canvasHasDrawing = false;
- isOver = false;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_usemap.php (from rev 2140, branches/2.4.5/http/javascripts/mod_usemap.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_usemap.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_usemap.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,149 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/UseMap
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+var mod_usemap_target = 'mapframe1';
+var mod_usemap_wfs = "<url>";
+var mod_usemap_px = 10;
+var um_title;
+var um_draw;
+
+mb_registerSubFunctions('mod_usemap_init()');
+mb_registerInitFunctions("um_init()")
+
+function mod_usemap_init(){
+ var ind = getMapObjIndexByName(mod_usemap_target);
+ var extent = mb_mapObj[ind].extent;
+ var url = "../php/mod_usemap.php?url="
+ url += escape(mod_usemap_wfs + "&BBOX=" + extent);
+ url += "&extent=" + extent;
+ url += "&width=" + mb_mapObj[ind].width;
+ url += "&height=" + mb_mapObj[ind].height;
+ document.getElementById('usemap').src = url;
+ var myImg = window.frames[mod_usemap_target].document.getElementById("um_img").style;
+ myImg.width = mb_mapObj[ind].width;
+ myImg.height = mb_mapObj[ind].height;
+}
+function mod_usemap_set(title,x,y){
+ var str = "";
+ for(var i=0; i<title.length; i++){
+ var pos = makeRealWorld2mapPos(mod_usemap_target,x[i],y[i]);
+ str += "<AREA onmouseover='parent.over(event, \"" + title[i] + "\", this)' ";
+ str += "onmouseout=parent.out(this) shape='circle' coords='";
+ str += Math.round(pos[0]) + "," + Math.round(pos[1]) + "," + mod_usemap_px + "'";
+ str += " href='#'>";
+ }
+ writeTag(mod_usemap_target, 'um', str);
+}
+
+/* Opacity for hilighting */
+ cw_opacity = 0.5;
+/* Color for polygon boundary */
+ cw_bndcolor = "#ff0000";
+/* Color for polygon fill */
+ cw_fillcolor = "#ffff00";
+
+function polyXcoords(coords){
+ var Xcoords = '';
+ for (var z = 0; z<coords.length; z=z+2){
+ if (z > 0){
+ Xcoords += ', ';
+ }
+ Xcoords += parseInt(coords[z]);
+ }
+ return Xcoords;
+}
+function polyYcoords(coords){
+ var Ycoords = '';
+ for (var z = 1; z<coords.length; z=z+2){
+ if (z > 1){
+ Ycoords += ', ';
+ }
+ Ycoords += parseInt(coords[z]);
+ }
+ return Ycoords;
+}
+function setFocus(objid){
+ if (canvasHasDrawing == true) return true;
+ var coords = objid.coords.split(',');
+ if ((objid.shape.toUpperCase() == 'POLY') || (objid.shape.toUpperCase() == 'POLYGON')){
+ var Xcoords = polyXcoords(coords);
+ var Ycoords = polyYcoords(coords);
+ var pgx = Xcoords.split(',');
+ var pgy = Ycoords.split(',');
+ for (var i=0 ; i<pgx.length ; i++ ){
+ pgx[i] = parseInt(pgx[i]);
+ pgy[i] = parseInt(pgy[i]);
+ }
+ canvas.setColor(cw_fillcolor);
+ canvas.fillPolygon(pgx,pgy);
+ canvas.paint();
+ canvas.setColor(cw_bndcolor);
+ canvas.drawPolygon(pgx,pgy);
+ canvas.paint();
+ }
+ if ((objid.shape.toUpperCase() == 'CIRCLE')){
+ var c = coords;
+ canvas.setColor(cw_fillcolor);
+ canvas.fillEllipse(parseInt(c[0])-mod_usemap_px/2,parseInt(c[1])-mod_usemap_px/2,parseInt(c[2]),parseInt(c[2]));
+ canvas.paint();
+ canvas.setColor(cw_bndcolor);
+ canvas.drawEllipse(parseInt(c[0])-mod_usemap_px/2,parseInt(c[1])-mod_usemap_px/2,parseInt(c[2]),parseInt(c[2]));
+ canvas.paint();
+ }
+ canvasHasDrawing = true;
+ return true;
+}
+
+function clearFocus(objid){
+ if (canvasHasDrawing) canvas.clear();
+ canvasHasDrawing = false;
+ return true;
+}
+
+function over(e, id, area){
+ var coords = area.coords.split(',');
+ area.setAttribute('title', "");
+ if (!isOver){
+ um_title.innerHTML = id;
+ um_title.style.display = "block";
+ isOver = area;
+ setFocus(area);
+ }
+ mb_arrangeElement(mod_usemap_target, 'um_title', parseInt(coords[0])+mod_usemap_px, parseInt(coords[1])+mod_usemap_px);
+ canvasHasDrawing = true;
+}
+
+function out(area){
+ um_title.innerHTML = "";
+ um_title.style.display = "none";
+ clearFocus(area);
+ isOver = false;
+ canvasHasDrawing = false;
+}
+
+function um_init(){
+ um_title = window.frames[mod_usemap_target].document.getElementById("um_title"); /* tooltip */
+ um_draw = window.frames[mod_usemap_target].document.getElementById("um_draw"); /* tooltip */
+ canvas = new jsGraphics('um_draw', window.frames['mapframe1']);
+ canvas.setStroke(2);
+ canvasHasDrawing = false;
+ isOver = false;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_wfs_SpatialRequest.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,480 +0,0 @@
-<?php
-#$Id$
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_wfs_spatialRequest.php,v 1.4 2006/03/08 15:26:26 c_baudson Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once("../php/mb_validateSession.php");
-require_once("../../conf/mapbender.conf");
-require_once("../../conf/wfs_default.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = "setSpatialRequest";
-
-$wfs_conf_filename = "wfs_default.conf";
-include '../include/dyn_php.php';
-include("../../conf/" . $wfs_conf_filename);
-
-include '../include/dyn_js.php';
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setSpatialRequest' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('setExtRequest: ID not unique!');\n";}
-echo "var mod_wfs_spatialRequest_target = '".$e_target."';\n";
-?>
-
-var wfsAreaType_point = "point";
-var wfsAreaType_polygon = "polygon";
-var wfsAreaType_rectangle = "rectangle";
-var wfsAreaType_extent = "extent";
-var wfsAreaType_current = "";
-
-var mod_wfs_spatialRequest_frameName = "";
-var mod_wfs_spatialRequest_epsg;
-var mod_wfs_spatialRequest_width;
-var mod_wfs_spatialRequest_height;
-
-var mod_wfs_spatialRequest_bg = "";
-var mod_wfs_spatialRequest_pgsql = true;
-var mod_wfs_spatialRequest_win = null;
-var mod_wfs_spatialRequest_thema = false;
-
-var button_point = "point";
-var button_polygon = "polygon";
-var button_rectangle = "rectangle";
-var button_extent = "extent";
-var button_dialogue = "dialogue";
-var mb_wfs_tolerance = 8;
-
-var activeButton = null;
-var mod_wfs_spatialRequest_geometry = null;
-var mod_wfs_spatialRequestSubFunctions = [];
-
-
-// ------------------------------------------------------------------------------------------
-// ------------ button handling -------------------------------------------------------------
-
-function displayButtons() {
- for (var i = 0 ; i < buttonWfs_id.length ; i ++) {
- if (parseInt(buttonWfs_on[i])==1) {
- document.write("<div id='div_"+buttonWfs_id[i]+"' style='position:absolute; top:"+buttonWfs_y[i]+"; left:"+buttonWfs_x[i]+"; z-index:"+buttonWfs_zIndex+"'><img name=\""+buttonWfs_id[i]+"\" onmouseover=\"mb_regButton_frame('initWfsButton', null, "+i+");\" id=\""+buttonWfs_id[i]+"\" title=\""+buttonWfs_title_off[i]+"\" src=\""+buttonWfs_imgdir+buttonWfs_src[i]+"\"></div>");
- }
- }
-}
-
-function initWfsButton(ind, pos) {
- mb_button[ind] = document.getElementById(buttonWfs_id[pos]);
- mb_button[ind].img_over = buttonWfs_imgdir + buttonWfs_src[pos].replace(/_off/,"_over");
- mb_button[ind].img_on = buttonWfs_imgdir + buttonWfs_src[pos].replace(/_off/,"_on");
- mb_button[ind].img_off = buttonWfs_imgdir + buttonWfs_src[pos];
- mb_button[ind].status = 0;
- mb_button[ind].elName = buttonWfs_id[pos];
- mb_button[ind].fName = "";
- mb_button[ind].go = new Function ("wfsEnable(mb_button["+ind+"], " + pos + ")");
- mb_button[ind].stop = new Function ("wfsDisable(mb_button["+ind+"], " + pos + ")");
- var ind = getMapObjIndexByName(mod_wfs_spatialRequest_target);
- mod_wfs_spatialRequest_width = mb_mapObj[ind].width;
- mod_wfs_spatialRequest_height = mb_mapObj[ind].height;
- mod_wfs_spatialRequest_epsg = mb_mapObj[ind].epsg;
- mb_registerSubFunctions("drawDashedLineExt()");
- mb_registerPanSubElement("measuring");
-}
-
-function wfsEnable(obj) {
- if (obj.id == button_point) {
- if (activeButton == null) {
- activeButton = obj;
- }
- mod_wfs_spatialRequest_geometry = new Geometry(geomType.point);
- wfsAreaType_current = wfsAreaType_point;
- mod_wfs_spatialRequest_digitize_go(geomType.point);
- }
- if (obj.id == button_polygon) {
- if (activeButton == null) {
- activeButton = obj;
- }
- mod_wfs_spatialRequest_geometry = new Geometry(geomType.polygon);
- wfsAreaType_current = wfsAreaType_polygon;
- mod_wfs_spatialRequest_digitize_go(geomType.polygon);
- var measureSub = "";
- for(var i=0; i<mod_wfs_spatialRequestSubFunctions.length; i++){
- measureSub += eval(mod_wfs_spatialRequestSubFunctions[i]);
- }
- writeTag(mod_wfs_spatialRequest_target,"measure_sub",measureSub);
- }
- else if (obj.id == button_rectangle){
- if (activeButton == null) {
- activeButton = obj;
- }
- mod_wfs_spatialRequest_geometry = new Geometry(geomType.line);
- wfsAreaType_current = wfsAreaType_rectangle;
- mod_selAreaExt_click();
- }
- else if (obj.id == button_extent){
- if (activeButton == null) {
- activeButton = obj;
- }
- mod_wfs_spatialRequest_geometry = new Geometry(geomType.line);
- wfsAreaType_current = wfsAreaType_extent;
- var ind = getMapObjIndexByName(mod_wfs_spatialRequest_target);
- var p0 = mapToReal(mod_wfs_spatialRequest_target, new Point(0,0));
- var p1 = mapToReal(mod_wfs_spatialRequest_target, new Point(mb_mapObj[ind].width,mb_mapObj[ind].height));
- mod_wfs_spatialRequest_geometry.addPoint(p0);
- mod_wfs_spatialRequest_geometry.addPoint(p1);
- mod_getAreaExt_send();
- }
- else if (obj.id == button_dialogue) {
- activeButton = obj;
- mod_wfs_SpatialRequest_dialog();
- }
-}
-
-function wfsDisable(obj) {
- var el = window.frames[mod_wfs_spatialRequest_target].document;
- el.onmousedown = null;
- el.ondblclick = null;
- el.onmousemove = null;
- writeTag(mod_wfs_spatialRequest_target,"measure_display","");
- writeTag(mod_wfs_spatialRequest_target,"measure_sub","");
- activeButton = null;
-}
-
-// ------------------------------------------------------------------------------------------
-
-// ----------------------------------------------------------------------------------------------
-// -------------------- rectangle -----------------------------------------------------------------
-
-function mod_selAreaExt_click(){
- var el = window.frames[mod_wfs_spatialRequest_target].document;
- el.onmouseover = mod_selAreaExt_init;
- el.onmousedown = mod_box_start;
- el.onmouseup = mod_selAreaExt_get;
- el.onmousemove = mod_box_run;
-}
-function mod_selAreaExt_init(e){
- mb_isBF = mod_wfs_spatialRequest_target;
- mb_zF = mod_wfs_spatialRequest_target;
-}
-function mod_selAreaExt_get(e){
- mod_selAreaExt_setValidClipping(mod_box_stop(e));
- mb_isBF = mod_wfs_spatialRequest_target;
- mb_zF = mod_wfs_spatialRequest_target;
-}
-function mod_selAreaExt_setValidClipping(coords){
- if (mod_wfs_spatialRequest_geometry != null) {
- mod_wfs_spatialRequest_geometry.addPoint(new Point(coords[0],coords[1]));
- mod_wfs_spatialRequest_geometry.addPoint(new Point(coords[2],coords[3]));
-
- if(mod_wfs_spatialRequest_geometry.count() == 2){
- mod_getAreaExt_send();
- }
- else{
- alert(errorMessageInvalidExtent[selectedLanguage])
- mb_disableThisButton(activeButton.id);
- }
- }
-}
-// ----------------------------------------------------------------------------------------------
-
-
-// ----------------------------------------------------------------------------------------------
-// -------------------- polygon && point --------------------------------------------------------
-
-function mod_wfs_spatialRequest_digitize_go(geomType){
- if (geomType == geomType.polygon) {
- mod_wfs_spatialRequest_geometry = new Geometry(geomType.polygon);
- }
- s = new Snapping(mod_wfs_spatialRequest_target);
-
- var el = window.frames[mod_wfs_spatialRequest_target].document;
- el.onmousedown = mod_wfs_spatialRequest_start;
- el.onmousemove = mod_wfs_spatialRequest_run;
- var measureSub = "";
- for(var i=0; i<mod_wfs_spatialRequestSubFunctions.length; i++){
- measureSub += eval(mod_wfs_spatialRequestSubFunctions[i]);
- }
- writeTag(mod_wfs_spatialRequest_target,"measure_sub",measureSub);
-}
-
-// ---------------------------------------------------------------------------------------------
-
-function mod_wfs_spatialRequest_run(e) {
- if (mod_wfs_spatialRequest_geometry.count() >= 3) {
- mb_getMousePos(e,mod_wfs_spatialRequest_target);
- var pos = new Point(clickX,clickY).round(2);
- s.check(pos);
- }
-}
-
-function mod_wfs_spatialRequest_start(e){
- var realWorldPos;
- if (s.isSnapped() == true) {
- realWorldPos = s.getSnappedPoint();
- s.clean();
- }
- else {
- mb_getMousePos(e,mod_wfs_spatialRequest_target);
- realWorldPos = mapToReal(mod_wfs_spatialRequest_target,new Point(clickX,clickY)).round(2);
- }
-
- mod_wfs_spatialRequest_geometry.addPoint(realWorldPos);
-
- if (mod_wfs_spatialRequest_geometry.count() == 1) {
- s.add(mod_wfs_spatialRequest_geometry.get(0));
- }
- if (s.isSnapped() && mod_wfs_spatialRequest_geometry.count() >= 3 && mod_wfs_spatialRequest_geometry.get(-1).equals(mod_wfs_spatialRequest_geometry.get(0))) {
- mod_wfs_spatialRequest_geometry.close();
- mod_getAreaExt_send();
- return;
- }
-
- if(wfsAreaType_current == wfsAreaType_point){
- mod_getAreaExt_send();
- return;
- }
- drawDashedLineExt();
-}
-function drawDashedLineExt(){
- var str_mPoints = "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='"+mod_wfs_spatialRequest_width+"' height='0'></div>";
- str_mPoints += "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='0' height='"+mod_wfs_spatialRequest_height+"'></div>";
- if (mod_wfs_spatialRequest_geometry != null) {
- for(var i=0; i<mod_wfs_spatialRequest_geometry.count(); i++){
- var pos = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(i));
- str_mPoints += "<div style='font-size:1px;position:absolute;top:"+(pos.y-2)+"px;left:"+(pos.x-2)+"px;width:3px;height:3px;background-color:#ff0000'></div>";
- }
- if(mod_wfs_spatialRequest_geometry.count()>1){
- for(var k=1; k<mod_wfs_spatialRequest_geometry.count(); k++){
- var pos0 = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(k));
- var pos1 = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(k-1));
- str_mPoints += evaluateDashesExt(pos1,pos0,k);
- }
- }
- }
- writeTag(mod_wfs_spatialRequest_target,"measuring",str_mPoints);
-}
-function evaluateDashesExt(p1,p0,count){
- var str_dashedLine = "";
- var d = p0.dist(p1);
- var n = Math.round(d);
- var s = p0.minus(p1).dividedBy(n);
- for(var i=1; i<n; i++){
- var currPoint = p1.plus(s.times(i)).minus(new Point(2,2)).round(0);
- if(currPoint.x >= 0 && currPoint.x <= mod_wfs_spatialRequest_width && currPoint.y >= 0 && currPoint.y <= mod_wfs_spatialRequest_height){
- str_dashedLine += "<div style='font-size:1px;position:absolute;top:"+currPoint.y+"px;left:"+currPoint.x+"px;width:3px;height:3px;background-color:#ff0000'></div>";
- }
- }
- return str_dashedLine;
-}
-function mod_wfs_spatialRequest_close(){
- if(mod_wfs_spatialRequest_geometry.count() < 3){
- return;
- }
- mod_wfs_spatialRequest_geometry.closeGeometry();
- drawDashedLineExt();
- mod_getAreaExt_send();
-}
-
-function register_setExtRequestSubFunctions(stringFunction){
- mod_wfs_spatialRequestSubFunctions[mod_wfs_spatialRequestSubFunctions.length] = stringFunction;
-}
-
-function mod_getAreaExt_send(){
- mb_setwfsrequest(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry);
- mod_wfs_spatialRequest_delete();
- mb_disableThisButton(activeButton.id);
- mod_wfs_spatialRequest_geometry = null;
-}
-
-function mod_wfs_spatialRequest_delete(){
- writeTag(mod_wfs_spatialRequest_target,"measuring","");
- writeTag(mod_wfs_spatialRequest_target,"measure_display","");
-}
-
-function mod_wfs_spatialRequest_timeout(){
- var el = window.frames[mod_wfs_spatialRequest_target].document;
- el.onmousedown = null;
- el.ondblclick = null;
- el.onmousemove = null;
-}
-
-function mod_wfs_spatialRequest_disableTimeout(){
- var el = window.frames[mod_wfs_spatialRequest_target].document;
- el.onmousedown = mod_wfs_spatialRequest_start;
-}
-
-
-function isSetWfsResultToDigitize() {
- if (parseInt(buttonWfs_toDigitize_on)==1) return true;
- return false;
-}
-
-function mod_wfs_SpatialRequest_dialog(){
- if(!mod_wfs_spatialRequest_win || mod_wfs_spatialRequest_win == null || mod_wfs_spatialRequest_win.closed == true){
- mod_wfs_spatialRequest_win = window.open("","mod_wfs_spatialRequest_win","width=200,height=150,resizable=yes");
- mod_wfs_spatialRequest_win.document.open("text/html");
-
- mod_wfs_spatialRequest_win.document.writeln('<script language="JavaScript" type="text/javascript">');
- mod_wfs_spatialRequest_win.document.writeln('function set(obj){');
- mod_wfs_spatialRequest_win.document.writeln('for(var i=0; i< document.getElementsByName("geom").length; i++){');
- mod_wfs_spatialRequest_win.document.writeln('if(document.getElementsByName("geom")[i].checked){');
- mod_wfs_spatialRequest_win.document.writeln('window.opener.mod_setExtRequest_geom = document.getElementsByName("geom")[i].value;');
- mod_wfs_spatialRequest_win.document.writeln('}');
- mod_wfs_spatialRequest_win.document.writeln('}');
-// mod_wfs_spatialRequest_win.document.writeln('window.opener.mod_wfs_spatialRequest_geom = obj.value;');
- mod_wfs_spatialRequest_win.document.writeln('window.opener.wfsEnable(obj);');
- mod_wfs_spatialRequest_win.document.writeln('window.close();');
- mod_wfs_spatialRequest_win.document.writeln('return false; ');
- mod_wfs_spatialRequest_win.document.writeln('}');
- mod_wfs_spatialRequest_win.document.writeln('</script>');
-
- mod_wfs_spatialRequest_win.document.writeln("<form>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='point' name='geom' type='radio' value='"+button_point+"' onclick='set(this)'> Punkt<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='rectangle' name='geom' type='radio' value='"+button_rectangle+"' onclick='set(this)'> Rechteck<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='polygon' name='geom' type='radio' value='"+button_polygon+"'onclick='set(this)'> Polygon<br>");
- mod_wfs_spatialRequest_win.document.writeln("<input id='extent' name='geom' type='radio' value='"+button_extent+"'onclick='set(this)'> Extent<br>");
- var checked = "";
-// if (mod_wfs_spatialRequest_useExtent) {
-// checked = " checked";
-// }
- //mod_wfs_spatialRequest_win.document.writeln("<input id='extent' name='geom' type='radio' value='extent' onclick='set(this)' " + checked + "> Extent<br>");
- mod_wfs_spatialRequest_win.document.writeln("</form>");
- mod_wfs_spatialRequest_win.document.close();
- }
- else{
- mod_wfs_spatialRequest_win.focus();
- }
-}
-
-function mb_setwfsrequest(target,queryGeom){
- //mb_wfs_reset();
- var ind = getMapObjIndexByName(target);
- var w = [];
- w_ = [];
- wfs_config = window.frames["wfs_conf"].get_wfs_conf();
- for (var i=0; i<mb_mapObj[ind].wms.length; i++){
- for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
- var o = mb_mapObj[ind].wms[i].objLayer[ii];
- if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1'){
- w[w.length] = o.gui_layer_wfs_featuretype;
- }
- }
- }
- for(var i=0; i<w.length; i++){
- for(var ii=0; ii<wfs_config.length; ii++){
- if(wfs_config[ii]['wfs_conf_id'] == w[i]) w_[w_.length] = ii;
- }
- }
-
- if(queryGeom.geomType==geomType.polygon){
- for(var i=0; i<w_.length; i++){
- var url = wfs_config[w_[i]]['wfs_getfeature'];
- url += "service=wfs&request=getFeature&version=1.0.0";
- url += "&typename="+ wfs_config[w_[i]]['featuretype_name'];
- url += "&filter=";
- var filter = '<ogc:Filter xmlns:ogc="http://ogc.org" xmlns:gml="http://www.opengis.net/gml">';
- filter += "<Within><ogc:PropertyName>";
- for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
- if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
- filter += wfs_config[w_[i]]['element'][j]['element_name'];
- }
- }
- filter += "</ogc:PropertyName><gml:Polygon srsName=\"EPSG:4326\">";
- filter += '<gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
- for(var k=0; k<queryGeom.count(); k++){
- if(k>0) filter += " ";
- filter += queryGeom.get(k).x+","+queryGeom.get(k).y;
- }
- filter += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs>';
- filter += '</gml:Polygon></Within></ogc:Filter>';
- mb_get_geom(url, filter, i, w_[i]);
- }
- }
- else if(queryGeom.geomType==geomType.line){
- var rectangle = [];
- if(queryGeom.geomType == geomType.line){
- var rectangle = queryGeom.getBBox();
- }
- for(var i=0; i<w_.length; i++){
- var url = wfs_config[w_[i]]['wfs_getfeature'];
- param = "service=wfs&request=getFeature&version=1.0.0&typename="+ wfs_config[w_[i]]['featuretype_name']+"&filter=";
- var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>";
- filter += "<ogc:BBOX><ogc:PropertyName>";
- for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
- if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
- filter += wfs_config[w_[i]]['element'][j]['element_name'];
- }
- }
- filter += "</ogc:PropertyName><gml:Box srsName='4326'><gml:coordinates>";
- filter += rectangle[0].x+","+rectangle[0].y+ " " + rectangle[1].x+","+rectangle[1].y;
- filter += "</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>";
- url += param;
- mb_get_geom(url, filter, i, w_[i]);
- }
- }
- else if(queryGeom.geomType == geomType.point){
- var tmp = queryGeom.get(0);
- var buffer = mb_wfs_tolerance/2;
- for(var i=0; i<w_.length; i++){
- var url = wfs_config[w_[i]]['wfs_getfeature'];
- param = "service=wfs&request=getFeature&version=1.0.0&typename="+ wfs_config[w_[i]]['featuretype_name']+"&filter=";
- var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>";
- filter += "<Intersects><ogc:PropertyName>";
- for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
- if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
- filter += wfs_config[w_[i]]['element'][j]['element_name'];
- }
- }
- filter += "</ogc:PropertyName><gml:Polygon srsName='4326'><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>";
- filter += (tmp.x - buffer) + "," + (tmp.y - buffer) + " " + (tmp.x + buffer) + "," + (tmp.y - buffer) + " ";
- filter += (tmp.x + buffer) + "," + (tmp.y + buffer) + " " + (tmp.x - buffer) + "," + (tmp.y + buffer) + " " + (tmp.x - buffer) + "," + (tmp.y - buffer);
- filter += "</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></ogc:Filter>";
- url += param;
- mb_get_geom(url, filter, i, w_[i]);
- }
- }
-// highlight = new Highlight(mb_wfs_targets, highlight_tag_id, {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex}, generalHighlightLineWidth);
- return true;
-}
-
-function mb_get_geom(url, filter, index, wfs_conf_id) {
-
- mb_ajax_post("../" + wfsResultModulePath + wfsResultModuleFilename,{'url':url,'filter':filter,'typename':wfs_config[wfs_conf_id]['featuretype_name'],'wfs_conf_id':wfs_conf_id},function(js_code,status){
-// alert(js_code);
- eval(js_code);
- if (typeof(geom) == 'object') mb_execWfsReadSubFunctions(geom);
-// prompt('', js_code);
- });
-}
-
-//deprecated stuff
-function mod_wfs_spatialRequest_dialog(){
-}
-function useExtentIsSet () {
- return mod_wfs_spatialRequest_useExtent;
-}
-
-displayButtons();
Copied: branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php (from rev 2181, branches/2.4.5/http/javascripts/mod_wfs_SpatialRequest.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_wfs_SpatialRequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,474 @@
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_wfs_spatialRequest.php,v 1.4 2006/03/08 15:26:26 c_baudson Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+require_once("../../conf/wfs_default.conf");
+$e_id_css = "setSpatialRequest";
+
+$wfs_conf_filename = "wfs_default.conf";
+include '../include/dyn_php.php';
+include("../../conf/" . $wfs_conf_filename);
+
+include '../include/dyn_js.php';
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'setSpatialRequest' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('setExtRequest: ID not unique!');\n";}
+echo "var mod_wfs_spatialRequest_target = '".$e_target."';\n";
+?>
+
+var wfsAreaType_point = "point";
+var wfsAreaType_polygon = "polygon";
+var wfsAreaType_rectangle = "rectangle";
+var wfsAreaType_extent = "extent";
+var wfsAreaType_current = "";
+
+var mod_wfs_spatialRequest_frameName = "";
+var mod_wfs_spatialRequest_epsg;
+var mod_wfs_spatialRequest_width;
+var mod_wfs_spatialRequest_height;
+
+var mod_wfs_spatialRequest_bg = "";
+var mod_wfs_spatialRequest_pgsql = true;
+var mod_wfs_spatialRequest_win = null;
+var mod_wfs_spatialRequest_thema = false;
+
+var button_point = "point";
+var button_polygon = "polygon";
+var button_rectangle = "rectangle";
+var button_extent = "extent";
+var button_dialogue = "dialogue";
+var mb_wfs_tolerance = 8;
+
+var activeButton = null;
+var mod_wfs_spatialRequest_geometry = null;
+var mod_wfs_spatialRequestSubFunctions = [];
+
+
+// ------------------------------------------------------------------------------------------
+// ------------ button handling -------------------------------------------------------------
+
+function displayButtons() {
+ for (var i = 0 ; i < buttonWfs_id.length ; i ++) {
+ if (parseInt(buttonWfs_on[i])==1) {
+ document.write("<div id='div_"+buttonWfs_id[i]+"' style='position:absolute; top:"+buttonWfs_y[i]+"; left:"+buttonWfs_x[i]+"; z-index:"+buttonWfs_zIndex+"'><img name=\""+buttonWfs_id[i]+"\" onmouseover=\"mb_regButton_frame('initWfsButton', null, "+i+");\" id=\""+buttonWfs_id[i]+"\" title=\""+buttonWfs_title_off[i]+"\" src=\""+buttonWfs_imgdir+buttonWfs_src[i]+"\"></div>");
+ }
+ }
+}
+
+function initWfsButton(ind, pos) {
+ mb_button[ind] = document.getElementById(buttonWfs_id[pos]);
+ mb_button[ind].img_over = buttonWfs_imgdir + buttonWfs_src[pos].replace(/_off/,"_over");
+ mb_button[ind].img_on = buttonWfs_imgdir + buttonWfs_src[pos].replace(/_off/,"_on");
+ mb_button[ind].img_off = buttonWfs_imgdir + buttonWfs_src[pos];
+ mb_button[ind].status = 0;
+ mb_button[ind].elName = buttonWfs_id[pos];
+ mb_button[ind].fName = "";
+ mb_button[ind].go = new Function ("wfsEnable(mb_button["+ind+"], " + pos + ")");
+ mb_button[ind].stop = new Function ("wfsDisable(mb_button["+ind+"], " + pos + ")");
+ var ind = getMapObjIndexByName(mod_wfs_spatialRequest_target);
+ mod_wfs_spatialRequest_width = mb_mapObj[ind].width;
+ mod_wfs_spatialRequest_height = mb_mapObj[ind].height;
+ mod_wfs_spatialRequest_epsg = mb_mapObj[ind].epsg;
+ mb_registerSubFunctions("drawDashedLineExt()");
+ mb_registerPanSubElement("measuring");
+}
+
+function wfsEnable(obj) {
+ if (obj.id == button_point) {
+ if (activeButton == null) {
+ activeButton = obj;
+ }
+ mod_wfs_spatialRequest_geometry = new Geometry(geomType.point);
+ wfsAreaType_current = wfsAreaType_point;
+ mod_wfs_spatialRequest_digitize_go(geomType.point);
+ }
+ if (obj.id == button_polygon) {
+ if (activeButton == null) {
+ activeButton = obj;
+ }
+ mod_wfs_spatialRequest_geometry = new Geometry(geomType.polygon);
+ wfsAreaType_current = wfsAreaType_polygon;
+ mod_wfs_spatialRequest_digitize_go(geomType.polygon);
+ var measureSub = "";
+ for(var i=0; i<mod_wfs_spatialRequestSubFunctions.length; i++){
+ measureSub += eval(mod_wfs_spatialRequestSubFunctions[i]);
+ }
+ writeTag(mod_wfs_spatialRequest_target,"measure_sub",measureSub);
+ }
+ else if (obj.id == button_rectangle){
+ if (activeButton == null) {
+ activeButton = obj;
+ }
+ mod_wfs_spatialRequest_geometry = new Geometry(geomType.line);
+ wfsAreaType_current = wfsAreaType_rectangle;
+ mod_selAreaExt_click();
+ }
+ else if (obj.id == button_extent){
+ if (activeButton == null) {
+ activeButton = obj;
+ }
+ mod_wfs_spatialRequest_geometry = new Geometry(geomType.line);
+ wfsAreaType_current = wfsAreaType_extent;
+ var ind = getMapObjIndexByName(mod_wfs_spatialRequest_target);
+ var p0 = mapToReal(mod_wfs_spatialRequest_target, new Point(0,0));
+ var p1 = mapToReal(mod_wfs_spatialRequest_target, new Point(mb_mapObj[ind].width,mb_mapObj[ind].height));
+ mod_wfs_spatialRequest_geometry.addPoint(p0);
+ mod_wfs_spatialRequest_geometry.addPoint(p1);
+ mod_getAreaExt_send();
+ }
+ else if (obj.id == button_dialogue) {
+ activeButton = obj;
+ mod_wfs_SpatialRequest_dialog();
+ }
+}
+
+function wfsDisable(obj) {
+ var el = window.frames[mod_wfs_spatialRequest_target].document;
+ el.onmousedown = null;
+ el.ondblclick = null;
+ el.onmousemove = null;
+ writeTag(mod_wfs_spatialRequest_target,"measure_display","");
+ writeTag(mod_wfs_spatialRequest_target,"measure_sub","");
+ activeButton = null;
+}
+
+// ------------------------------------------------------------------------------------------
+
+// ----------------------------------------------------------------------------------------------
+// -------------------- rectangle -----------------------------------------------------------------
+
+function mod_selAreaExt_click(){
+ var el = window.frames[mod_wfs_spatialRequest_target].document;
+ el.onmouseover = mod_selAreaExt_init;
+ el.onmousedown = mod_box_start;
+ el.onmouseup = mod_selAreaExt_get;
+ el.onmousemove = mod_box_run;
+}
+function mod_selAreaExt_init(e){
+ mb_isBF = mod_wfs_spatialRequest_target;
+ mb_zF = mod_wfs_spatialRequest_target;
+}
+function mod_selAreaExt_get(e){
+ mod_selAreaExt_setValidClipping(mod_box_stop(e));
+ mb_isBF = mod_wfs_spatialRequest_target;
+ mb_zF = mod_wfs_spatialRequest_target;
+}
+function mod_selAreaExt_setValidClipping(coords){
+ if (mod_wfs_spatialRequest_geometry != null) {
+ mod_wfs_spatialRequest_geometry.addPoint(new Point(coords[0],coords[1]));
+ mod_wfs_spatialRequest_geometry.addPoint(new Point(coords[2],coords[3]));
+
+ if(mod_wfs_spatialRequest_geometry.count() == 2){
+ mod_getAreaExt_send();
+ }
+ else{
+ alert(errorMessageInvalidExtent[selectedLanguage])
+ mb_disableThisButton(activeButton.id);
+ }
+ }
+}
+// ----------------------------------------------------------------------------------------------
+
+
+// ----------------------------------------------------------------------------------------------
+// -------------------- polygon && point --------------------------------------------------------
+
+function mod_wfs_spatialRequest_digitize_go(geomType){
+ if (geomType == geomType.polygon) {
+ mod_wfs_spatialRequest_geometry = new Geometry(geomType.polygon);
+ }
+ s = new Snapping(mod_wfs_spatialRequest_target);
+
+ var el = window.frames[mod_wfs_spatialRequest_target].document;
+ el.onmousedown = mod_wfs_spatialRequest_start;
+ el.onmousemove = mod_wfs_spatialRequest_run;
+ var measureSub = "";
+ for(var i=0; i<mod_wfs_spatialRequestSubFunctions.length; i++){
+ measureSub += eval(mod_wfs_spatialRequestSubFunctions[i]);
+ }
+ writeTag(mod_wfs_spatialRequest_target,"measure_sub",measureSub);
+}
+
+// ---------------------------------------------------------------------------------------------
+
+function mod_wfs_spatialRequest_run(e) {
+ if (mod_wfs_spatialRequest_geometry.count() >= 3) {
+ mb_getMousePos(e,mod_wfs_spatialRequest_target);
+ var pos = new Point(clickX,clickY).round(2);
+ s.check(pos);
+ }
+}
+
+function mod_wfs_spatialRequest_start(e){
+ var realWorldPos;
+ if (s.isSnapped() == true) {
+ realWorldPos = s.getSnappedPoint();
+ s.clean();
+ }
+ else {
+ mb_getMousePos(e,mod_wfs_spatialRequest_target);
+ realWorldPos = mapToReal(mod_wfs_spatialRequest_target,new Point(clickX,clickY)).round(2);
+ }
+
+ mod_wfs_spatialRequest_geometry.addPoint(realWorldPos);
+
+ if (mod_wfs_spatialRequest_geometry.count() == 1) {
+ s.add(mod_wfs_spatialRequest_geometry.get(0));
+ }
+ if (s.isSnapped() && mod_wfs_spatialRequest_geometry.count() >= 3 && mod_wfs_spatialRequest_geometry.get(-1).equals(mod_wfs_spatialRequest_geometry.get(0))) {
+ mod_wfs_spatialRequest_geometry.close();
+ mod_getAreaExt_send();
+ return;
+ }
+
+ if(wfsAreaType_current == wfsAreaType_point){
+ mod_getAreaExt_send();
+ return;
+ }
+ drawDashedLineExt();
+}
+function drawDashedLineExt(){
+ var str_mPoints = "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='"+mod_wfs_spatialRequest_width+"' height='0'></div>";
+ str_mPoints += "<div style='position:absolute;left:0px;top:0px' ><img src='"+mb_trans.src+"' width='0' height='"+mod_wfs_spatialRequest_height+"'></div>";
+ if (mod_wfs_spatialRequest_geometry != null) {
+ for(var i=0; i<mod_wfs_spatialRequest_geometry.count(); i++){
+ var pos = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(i));
+ str_mPoints += "<div style='font-size:1px;position:absolute;top:"+(pos.y-2)+"px;left:"+(pos.x-2)+"px;width:3px;height:3px;background-color:#ff0000'></div>";
+ }
+ if(mod_wfs_spatialRequest_geometry.count()>1){
+ for(var k=1; k<mod_wfs_spatialRequest_geometry.count(); k++){
+ var pos0 = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(k));
+ var pos1 = realToMap(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry.get(k-1));
+ str_mPoints += evaluateDashesExt(pos1,pos0,k);
+ }
+ }
+ }
+ writeTag(mod_wfs_spatialRequest_target,"measuring",str_mPoints);
+}
+function evaluateDashesExt(p1,p0,count){
+ var str_dashedLine = "";
+ var d = p0.dist(p1);
+ var n = Math.round(d);
+ var s = p0.minus(p1).dividedBy(n);
+ for(var i=1; i<n; i++){
+ var currPoint = p1.plus(s.times(i)).minus(new Point(2,2)).round(0);
+ if(currPoint.x >= 0 && currPoint.x <= mod_wfs_spatialRequest_width && currPoint.y >= 0 && currPoint.y <= mod_wfs_spatialRequest_height){
+ str_dashedLine += "<div style='font-size:1px;position:absolute;top:"+currPoint.y+"px;left:"+currPoint.x+"px;width:3px;height:3px;background-color:#ff0000'></div>";
+ }
+ }
+ return str_dashedLine;
+}
+function mod_wfs_spatialRequest_close(){
+ if(mod_wfs_spatialRequest_geometry.count() < 3){
+ return;
+ }
+ mod_wfs_spatialRequest_geometry.closeGeometry();
+ drawDashedLineExt();
+ mod_getAreaExt_send();
+}
+
+function register_setExtRequestSubFunctions(stringFunction){
+ mod_wfs_spatialRequestSubFunctions[mod_wfs_spatialRequestSubFunctions.length] = stringFunction;
+}
+
+function mod_getAreaExt_send(){
+ mb_setwfsrequest(mod_wfs_spatialRequest_target,mod_wfs_spatialRequest_geometry);
+ mod_wfs_spatialRequest_delete();
+ mb_disableThisButton(activeButton.id);
+ mod_wfs_spatialRequest_geometry = null;
+}
+
+function mod_wfs_spatialRequest_delete(){
+ writeTag(mod_wfs_spatialRequest_target,"measuring","");
+ writeTag(mod_wfs_spatialRequest_target,"measure_display","");
+}
+
+function mod_wfs_spatialRequest_timeout(){
+ var el = window.frames[mod_wfs_spatialRequest_target].document;
+ el.onmousedown = null;
+ el.ondblclick = null;
+ el.onmousemove = null;
+}
+
+function mod_wfs_spatialRequest_disableTimeout(){
+ var el = window.frames[mod_wfs_spatialRequest_target].document;
+ el.onmousedown = mod_wfs_spatialRequest_start;
+}
+
+
+function isSetWfsResultToDigitize() {
+ if (parseInt(buttonWfs_toDigitize_on)==1) return true;
+ return false;
+}
+
+function mod_wfs_SpatialRequest_dialog(){
+ if(!mod_wfs_spatialRequest_win || mod_wfs_spatialRequest_win == null || mod_wfs_spatialRequest_win.closed == true){
+ mod_wfs_spatialRequest_win = window.open("","mod_wfs_spatialRequest_win","width=200,height=150,resizable=yes");
+ mod_wfs_spatialRequest_win.document.open("text/html");
+
+ mod_wfs_spatialRequest_win.document.writeln('<script language="JavaScript" type="text/javascript">');
+ mod_wfs_spatialRequest_win.document.writeln('function set(obj){');
+ mod_wfs_spatialRequest_win.document.writeln('for(var i=0; i< document.getElementsByName("geom").length; i++){');
+ mod_wfs_spatialRequest_win.document.writeln('if(document.getElementsByName("geom")[i].checked){');
+ mod_wfs_spatialRequest_win.document.writeln('window.opener.mod_setExtRequest_geom = document.getElementsByName("geom")[i].value;');
+ mod_wfs_spatialRequest_win.document.writeln('}');
+ mod_wfs_spatialRequest_win.document.writeln('}');
+// mod_wfs_spatialRequest_win.document.writeln('window.opener.mod_wfs_spatialRequest_geom = obj.value;');
+ mod_wfs_spatialRequest_win.document.writeln('window.opener.wfsEnable(obj);');
+ mod_wfs_spatialRequest_win.document.writeln('window.close();');
+ mod_wfs_spatialRequest_win.document.writeln('return false; ');
+ mod_wfs_spatialRequest_win.document.writeln('}');
+ mod_wfs_spatialRequest_win.document.writeln('</script>');
+
+ mod_wfs_spatialRequest_win.document.writeln("<form>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='point' name='geom' type='radio' value='"+button_point+"' onclick='set(this)'> Punkt<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='rectangle' name='geom' type='radio' value='"+button_rectangle+"' onclick='set(this)'> Rechteck<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='polygon' name='geom' type='radio' value='"+button_polygon+"'onclick='set(this)'> Polygon<br>");
+ mod_wfs_spatialRequest_win.document.writeln("<input id='extent' name='geom' type='radio' value='"+button_extent+"'onclick='set(this)'> Extent<br>");
+ var checked = "";
+// if (mod_wfs_spatialRequest_useExtent) {
+// checked = " checked";
+// }
+ //mod_wfs_spatialRequest_win.document.writeln("<input id='extent' name='geom' type='radio' value='extent' onclick='set(this)' " + checked + "> Extent<br>");
+ mod_wfs_spatialRequest_win.document.writeln("</form>");
+ mod_wfs_spatialRequest_win.document.close();
+ }
+ else{
+ mod_wfs_spatialRequest_win.focus();
+ }
+}
+
+function mb_setwfsrequest(target,queryGeom){
+ //mb_wfs_reset();
+ var ind = getMapObjIndexByName(target);
+ var w = [];
+ w_ = [];
+ wfs_config = window.frames["wfs_conf"].get_wfs_conf();
+ for (var i=0; i<mb_mapObj[ind].wms.length; i++){
+ for(var ii=0; ii<mb_mapObj[ind].wms[i].objLayer.length; ii++){
+ var o = mb_mapObj[ind].wms[i].objLayer[ii];
+ if(o.gui_layer_wfs_featuretype != '' && o.gui_layer_querylayer == '1'){
+ w[w.length] = o.gui_layer_wfs_featuretype;
+ }
+ }
+ }
+ for(var i=0; i<w.length; i++){
+ for(var ii=0; ii<wfs_config.length; ii++){
+ if(wfs_config[ii]['wfs_conf_id'] == w[i]) w_[w_.length] = ii;
+ }
+ }
+
+ if(queryGeom.geomType==geomType.polygon){
+ for(var i=0; i<w_.length; i++){
+ var url = wfs_config[w_[i]]['wfs_getfeature'];
+ url += "service=wfs&request=getFeature&version=1.0.0";
+ url += "&typename="+ wfs_config[w_[i]]['featuretype_name'];
+ url += "&filter=";
+ var filter = '<ogc:Filter xmlns:ogc="http://ogc.org" xmlns:gml="http://www.opengis.net/gml">';
+ filter += "<Within><ogc:PropertyName>";
+ for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
+ if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
+ filter += wfs_config[w_[i]]['element'][j]['element_name'];
+ }
+ }
+ filter += "</ogc:PropertyName><gml:Polygon srsName=\"EPSG:4326\">";
+ filter += '<gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
+ for(var k=0; k<queryGeom.count(); k++){
+ if(k>0) filter += " ";
+ filter += queryGeom.get(k).x+","+queryGeom.get(k).y;
+ }
+ filter += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs>';
+ filter += '</gml:Polygon></Within></ogc:Filter>';
+ mb_get_geom(url, filter, i, w_[i]);
+ }
+ }
+ else if(queryGeom.geomType==geomType.line){
+ var rectangle = [];
+ if(queryGeom.geomType == geomType.line){
+ var rectangle = queryGeom.getBBox();
+ }
+ for(var i=0; i<w_.length; i++){
+ var url = wfs_config[w_[i]]['wfs_getfeature'];
+ param = "service=wfs&request=getFeature&version=1.0.0&typename="+ wfs_config[w_[i]]['featuretype_name']+"&filter=";
+ var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>";
+ filter += "<ogc:BBOX><ogc:PropertyName>";
+ for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
+ if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
+ filter += wfs_config[w_[i]]['element'][j]['element_name'];
+ }
+ }
+ filter += "</ogc:PropertyName><gml:Box srsName='4326'><gml:coordinates>";
+ filter += rectangle[0].x+","+rectangle[0].y+ " " + rectangle[1].x+","+rectangle[1].y;
+ filter += "</gml:coordinates></gml:Box></ogc:BBOX></ogc:Filter>";
+ url += param;
+ mb_get_geom(url, filter, i, w_[i]);
+ }
+ }
+ else if(queryGeom.geomType == geomType.point){
+ var tmp = queryGeom.get(0);
+ var buffer = mb_wfs_tolerance/2;
+ for(var i=0; i<w_.length; i++){
+ var url = wfs_config[w_[i]]['wfs_getfeature'];
+ param = "service=wfs&request=getFeature&version=1.0.0&typename="+ wfs_config[w_[i]]['featuretype_name']+"&filter=";
+ var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>";
+ filter += "<Intersects><ogc:PropertyName>";
+ for(var j=0; j<wfs_config[w_[i]]['element'].length; j++){
+ if(wfs_config[w_[i]]['element'][j]['f_geom'] == 1){
+ filter += wfs_config[w_[i]]['element'][j]['element_name'];
+ }
+ }
+ filter += "</ogc:PropertyName><gml:Polygon srsName='4326'><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>";
+ filter += (tmp.x - buffer) + "," + (tmp.y - buffer) + " " + (tmp.x + buffer) + "," + (tmp.y - buffer) + " ";
+ filter += (tmp.x + buffer) + "," + (tmp.y + buffer) + " " + (tmp.x - buffer) + "," + (tmp.y + buffer) + " " + (tmp.x - buffer) + "," + (tmp.y - buffer);
+ filter += "</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></Intersects></ogc:Filter>";
+ url += param;
+ mb_get_geom(url, filter, i, w_[i]);
+ }
+ }
+// highlight = new Highlight(mb_wfs_targets, highlight_tag_id, {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex}, generalHighlightLineWidth);
+ return true;
+}
+
+function mb_get_geom(url, filter, index, wfs_conf_id) {
+
+ mb_ajax_post("../" + wfsResultModulePath + wfsResultModuleFilename,{'url':url,'filter':filter,'typename':wfs_config[wfs_conf_id]['featuretype_name'],'wfs_conf_id':wfs_conf_id},function(js_code,status){
+// alert(js_code);
+ eval(js_code);
+ if (typeof(geom) == 'object') mb_execWfsReadSubFunctions(geom);
+// prompt('', js_code);
+ });
+}
+
+//deprecated stuff
+function mod_wfs_spatialRequest_dialog(){
+}
+function useExtentIsSet () {
+ return mod_wfs_spatialRequest_useExtent;
+}
+
+displayButtons();
Deleted: branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_wfs_gazetteer_client.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,337 +0,0 @@
-<?php
-# $Id$
-# maintained by http://www.mapbender.org/index.php/User:Verena Diewald
-# http://www.mapbender.org/index.php/WFS_gazetteer
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-
-$target = $_REQUEST["target"];
-$e_id_css = $_REQUEST["e_id_css"];
-
-require_once("../../conf/mapbender.conf");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
-<title>mod_wfs_gazetteer</title>
-
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-<?php
- echo "var targetString = '" . $target . "';";
- echo "var wfsConfIdString = '" . $wfsConfIdString . "';";
-?>
-
-var targetArray = targetString.split(",");
-var global_wfsConfObj;
-var global_selectedWfsConfId;
-var point_px = 10;
-var resultGeom = null;
-var cw_fillcolor = "#cc33cc";
-
-
-parent.mb_registerInitFunctions("window.frames['"+this.name+"'].initModWfsGazetteer()");
-
-//----------------------------------------------------------------------------------
-
-function removeChildNodes(node) {
- while (node.childNodes.length > 0) {
- var childNode = node.firstChild;
- node.removeChild(childNode);
- }
-}
-/**
- * removes whitespaces and endlines before and after a string
- *
- */
-function trimString (str) {
- return str.replace(/^\s+|\s+|\n+$/g, '');
-}
-
-
-function appendStyles() {
- var styleObj;
- var rule = global_wfsConfObj[global_selectedWfsConfId].g_style + global_wfsConfObj[global_selectedWfsConfId].g_res_style;
- if (parent.ie) {
- var styleSheetObj=document.createStyleSheet();
- styleObj=styleSheetObj.owningElement || styleSheetObj.ownerNode;
- styleObj.setAttribute("type","text/css");
- ruleArray = rule.split("}");
- for (var i=0; i < ruleArray.length - 1; i++) {
- var currentRule = trimString(ruleArray[i]);
- var nameValueArray = currentRule.split("{");
- var name = nameValueArray[0];
- var value = nameValueArray[1];
- styleSheetObj.addRule(name,value);
- }
- }
- else {
- styleObj=document.createElement("style");
- styleObj.setAttribute("type","text/css");
- document.getElementsByTagName("head")[0].appendChild(styleObj);
- styleObj.appendChild(document.createTextNode(rule+"\n"));
- }
-}
-
-//----------------------------------------------------------------------------------
-
-
-function initModWfsGazetteer() {
- parent.mb_ajax_json("../php/mod_wfs_gazetteer_server.php", {command:"getWfsConf",wfsConfIdString:wfsConfIdString}, function(json, status) {
- global_wfsConfObj = json;
- var wfsCount = 0;
- for (var wfsConfId in global_wfsConfObj) {
- global_selectedWfsConfId = wfsConfId;
- if (typeof(global_wfsConfObj[wfsConfId] != 'function')) {
- wfsCount++;
- }
- }
- if (wfsCount === 0) {
- var e = parent.Mb_exception("no wfs conf id available.");
- }
- else if (wfsCount === 1) {
- appendStyles();
- appendWfsForm();
- }
- else {
- appendWfsConfSelectBox();
- }
- });
-}
-
-function appendWfsConfSelectBox() {
- var selectNode = document.createElement("select");
- selectNode.name = "wfs_conf_sel";
- selectNode.onchange = function () {
- global_selectedWfsConfId = this.value;
- appendStyles();
- appendWfsForm();
- };
-
- var isSelected = false;
- for (var wfsConfId in global_wfsConfObj) {
- var optionNode = document.createElement("option");
-
- optionNode.value = wfsConfId;
- optionNode.innerHTML = global_wfsConfObj[wfsConfId].g_label;
-
- if (!isSelected) {
- optionNode.selected = true;
- isSelected = true;
- global_selectedWfsConfId = wfsConfId;
- }
- selectNode.appendChild(optionNode);
- }
-
- var form = document.getElementById('selectWfsConfForm');
- form.appendChild(selectNode);
-
- appendStyles();
- appendWfsForm();
-}
-
-function appendWfsForm() {
- var form = document.getElementById("wfsForm");
- removeChildNodes(form);
- var resultDiv = document.getElementById("res");
- removeChildNodes(resultDiv);
-
- var divContainer = document.createElement("div");
- divContainer.className = global_wfsConfObj[global_selectedWfsConfId].g_label_id;
-
- divContainer.innerHTML = global_wfsConfObj[global_selectedWfsConfId].g_label;
-
- form.appendChild(divContainer);
-
- var wfsConfElementArray = global_wfsConfObj[global_selectedWfsConfId].element;
-
- for (var i = 0; i < wfsConfElementArray.length; i++){
- var spanNode = document.createElement("span");
- spanNode.setAttribute("id", "ttttt");
- spanNode.className = wfsConfElementArray[i].f_label_id;
- spanNode.innerHTML = wfsConfElementArray[i].f_label;
- var inputNode = document.createElement("input");
- inputNode.type = "text";
- inputNode.className = wfsConfElementArray[i].f_style_id;
- inputNode.id = wfsConfElementArray[i].element_name;
-
- form.appendChild(spanNode);
- form.appendChild(inputNode);
- form.appendChild(document.createElement("br"));
- }
- var submitButton = document.createElement("input");
- submitButton.type = "submit";
- submitButton.className = global_wfsConfObj[global_selectedWfsConfId].g_button_id;
- submitButton.value = global_wfsConfObj[global_selectedWfsConfId].g_button;
-
- form.appendChild(submitButton);
-}
-
-function validate(){
- global_resultHighlight = new parent.Highlight(targetArray, "wfs_gazetteer_highlight", {"position":"absolute", "top":"0px", "left":"0px", "z-index":100}, 2);
-
- var filterParameterCount = getNumberOfFilterParameters();
-
- if(filterParameterCount == 0){
- return false;
- }
- else{
- var andConditions = "";
-
- var el = global_wfsConfObj[global_selectedWfsConfId].element;
-
- for (var i = 0; i < el.length; i++) {
- if (el[i]['f_search'] == 1 && document.getElementById(el[i]['element_name']).value != '') {
-
- var a = new Array();
- a = document.getElementById(el[i]['element_name']).value.split(",");
- var orConditions = "";
- for (var j=0; j < a.length; j++) {
-
- orConditions += "<ogc:PropertyIsLike wildCard='*' singleChar='.' escape='!'>";
- orConditions += "<ogc:PropertyName>" + el[i]['element_name'] + "</ogc:PropertyName>";
- orConditions += "<ogc:Literal>*";
- if(el[i]['f_toupper'] == 1){
- orConditions += a[j].toUpperCase();
- }
- else{
- orConditions += a[j];
- }
- orConditions += "*</ogc:Literal>";
- orConditions += "</ogc:PropertyIsLike>";
- }
- if(a.length > 1){
- andConditions += "<Or>" + orConditions + "</Or>";
- }
- else {
- andConditions += orConditions;
- }
- }
- }
-
- var u = global_wfsConfObj[global_selectedWfsConfId].wfs_getfeature + parent.mb_getConjunctionCharacter(global_wfsConfObj[global_selectedWfsConfId].wfs_getfeature);
- u += "REQUEST=getFeature&Typename="+global_wfsConfObj[global_selectedWfsConfId].featuretype_name+"&Version=1.0.0&service=WFS";
- u += "&filter=";
-
- if (filterParameterCount > 1) {
- andConditions = "<And>" + andConditions + "</And>";
- }
-
- var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>"+andConditions+"</ogc:Filter>";
-
- document.getElementById("res").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
- var parameters = {command:"getSearchResults", "wfs_conf_id":global_selectedWfsConfId, "frame":this.name, "url":u, "filter":filter, "backlink":""};
- parent.mb_ajax_get("../php/mod_wfs_gazetteer_server.php", parameters, function (jsCode, status) {
- eval(jsCode);
-
- for (var i=0; i < parent.wms.length; i++) {
- for (var j=0; j < parent.wms[i].objLayer.length; j++) {
- var currentLayer = parent.wms[i].objLayer[j];
- var wms_id = parent.wms[i].wms_id;
- if (currentLayer.gui_layer_wfs_featuretype == global_selectedWfsConfId) {
- var layer_name = currentLayer.layer_name;
- parent.handleSelectedLayer_array(targetArray[0],[wms_id],[layer_name],'querylayer',1);
- parent.handleSelectedLayer_array(targetArray[0],[wms_id],[layer_name],'visible',1);
- }
- }
- }
-
- var body = "";
- if (typeof(geom) == 'object') {
- resultGeom = geom; // set the global variable
- for (var i=0; i < geom.count(); i++) {
- body += "<div id='geom"+i+"'style='cursor:pointer;' ";
- if ((i % 2) === 0) {
- body += "class='even'";
- }
- else {
- body += "class='uneven'";
- }
- body += " onmouseover=\"setResult('over', this.id)\" ";
- body += " onmouseout=\"setResult('out', this.id)\" ";
- body += " onclick=\"setResult('click', this.id)\">";
- for (var j=0; j < geom.get(i).e.count(); j++) {
- body += geom.get(i).e.getValue(j) + " ";
- }
- body += "</div>";
- }
- }
- else {
- body = "Kein Ergebnis.";
- }
- document.getElementById('res').innerHTML = body;
- });
- }
- return false;
-}
-
-function getNumberOfFilterParameters(){
- var cnt = 0;
- var el = global_wfsConfObj[global_selectedWfsConfId].element;
-
- for (var i = 0; i < el.length; i++){
- if( el[i]['f_search'] == 1){
- if (document.getElementById(el[i]['element_name']).value != '') {
- cnt++;
- }
- }
- }
- return cnt;
-}
-/*
-* event -> {over || out || click}
-* geom -> commaseparated coordinates x1,y1,x2,y2 ...
-*/
-function setResult(event, id){
- var index = parseInt(id.slice(4));
-
- if (event == "over") {
- global_resultHighlight.add(resultGeom.get(index), cw_fillcolor);
- }
- else if (event == "out"){
- global_resultHighlight.del(resultGeom.get(index), cw_fillcolor);
- }
- else if (event == "click"){
- global_resultHighlight.del(resultGeom.get(index), cw_fillcolor);
- var bbox = resultGeom.get(index).getBBox();
- var buffer = new parent.Point(1,1);
- bbox[0] = bbox[0].minus(buffer);
- bbox[1] = bbox[1].plus(buffer);
- parent.mb_calculateExtent(targetArray[0], bbox[0].x, bbox[0].y, bbox[1].x, bbox[1].y);
- parent.zoom(targetArray[0], 'true', 1.0);
- global_resultHighlight.add(resultGeom.get(index), cw_fillcolor);
- }
- return true;
-}
-
-
-</script>
-</head>
-<body leftmargin='0' topmargin='10' bgcolor='#ffffff'>
-<form name='selectWfsConfForm' id='selectWfsConfForm'></form>
-<form name='wfsForm' id='wfsForm' onsubmit='return validate()'></form>
-<div name='res' id='res' style='width:180px'></div>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php (from rev 2171, branches/2.4.5/http/javascripts/mod_wfs_gazetteer_client.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_wfs_gazetteer_client.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,336 @@
+<?php
+# $Id$
+# maintained by http://www.mapbender.org/index.php/User:Verena Diewald
+# http://www.mapbender.org/index.php/WFS_gazetteer
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$gui_id = $_SESSION["mb_user_gui"];
+
+$target = $_REQUEST["target"];
+$e_id_css = $_REQUEST["e_id_css"];
+
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db($DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
+<title>mod_wfs_gazetteer</title>
+
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+<?php
+ echo "var targetString = '" . $target . "';";
+ echo "var wfsConfIdString = '" . $wfsConfIdString . "';";
+?>
+
+var targetArray = targetString.split(",");
+var global_wfsConfObj;
+var global_selectedWfsConfId;
+var point_px = 10;
+var resultGeom = null;
+var cw_fillcolor = "#cc33cc";
+
+
+parent.mb_registerInitFunctions("window.frames['"+this.name+"'].initModWfsGazetteer()");
+
+//----------------------------------------------------------------------------------
+
+function removeChildNodes(node) {
+ while (node.childNodes.length > 0) {
+ var childNode = node.firstChild;
+ node.removeChild(childNode);
+ }
+}
+/**
+ * removes whitespaces and endlines before and after a string
+ *
+ */
+function trimString (str) {
+ return str.replace(/^\s+|\s+|\n+$/g, '');
+}
+
+
+function appendStyles() {
+ var styleObj;
+ var rule = global_wfsConfObj[global_selectedWfsConfId].g_style + global_wfsConfObj[global_selectedWfsConfId].g_res_style;
+ if (parent.ie) {
+ var styleSheetObj=document.createStyleSheet();
+ styleObj=styleSheetObj.owningElement || styleSheetObj.ownerNode;
+ styleObj.setAttribute("type","text/css");
+ ruleArray = rule.split("}");
+ for (var i=0; i < ruleArray.length - 1; i++) {
+ var currentRule = trimString(ruleArray[i]);
+ var nameValueArray = currentRule.split("{");
+ var name = nameValueArray[0];
+ var value = nameValueArray[1];
+ styleSheetObj.addRule(name,value);
+ }
+ }
+ else {
+ styleObj=document.createElement("style");
+ styleObj.setAttribute("type","text/css");
+ document.getElementsByTagName("head")[0].appendChild(styleObj);
+ styleObj.appendChild(document.createTextNode(rule+"\n"));
+ }
+}
+
+//----------------------------------------------------------------------------------
+
+
+function initModWfsGazetteer() {
+ parent.mb_ajax_json("../php/mod_wfs_gazetteer_server.php?<?php echo SID;?>", {command:"getWfsConf",wfsConfIdString:wfsConfIdString}, function(json, status) {
+ global_wfsConfObj = json;
+ var wfsCount = 0;
+ for (var wfsConfId in global_wfsConfObj) {
+ global_selectedWfsConfId = wfsConfId;
+ if (typeof(global_wfsConfObj[wfsConfId] != 'function')) {
+ wfsCount++;
+ }
+ }
+ if (wfsCount === 0) {
+ var e = parent.Mb_exception("no wfs conf id available.");
+ }
+ else if (wfsCount === 1) {
+ appendStyles();
+ appendWfsForm();
+ }
+ else {
+ appendWfsConfSelectBox();
+ }
+ });
+}
+
+function appendWfsConfSelectBox() {
+ var selectNode = document.createElement("select");
+ selectNode.name = "wfs_conf_sel";
+ selectNode.onchange = function () {
+ global_selectedWfsConfId = this.value;
+ appendStyles();
+ appendWfsForm();
+ };
+
+ var isSelected = false;
+ for (var wfsConfId in global_wfsConfObj) {
+ var optionNode = document.createElement("option");
+
+ optionNode.value = wfsConfId;
+ optionNode.innerHTML = global_wfsConfObj[wfsConfId].g_label;
+
+ if (!isSelected) {
+ optionNode.selected = true;
+ isSelected = true;
+ global_selectedWfsConfId = wfsConfId;
+ }
+ selectNode.appendChild(optionNode);
+ }
+
+ var form = document.getElementById('selectWfsConfForm');
+ form.appendChild(selectNode);
+
+ appendStyles();
+ appendWfsForm();
+}
+
+function appendWfsForm() {
+ var form = document.getElementById("wfsForm");
+ removeChildNodes(form);
+ var resultDiv = document.getElementById("res");
+ removeChildNodes(resultDiv);
+
+ var divContainer = document.createElement("div");
+ divContainer.className = global_wfsConfObj[global_selectedWfsConfId].g_label_id;
+
+ divContainer.innerHTML = global_wfsConfObj[global_selectedWfsConfId].g_label;
+
+ form.appendChild(divContainer);
+
+ var wfsConfElementArray = global_wfsConfObj[global_selectedWfsConfId].element;
+
+ for (var i = 0; i < wfsConfElementArray.length; i++){
+ var spanNode = document.createElement("span");
+ spanNode.setAttribute("id", "ttttt");
+ spanNode.className = wfsConfElementArray[i].f_label_id;
+ spanNode.innerHTML = wfsConfElementArray[i].f_label;
+ var inputNode = document.createElement("input");
+ inputNode.type = "text";
+ inputNode.className = wfsConfElementArray[i].f_style_id;
+ inputNode.id = wfsConfElementArray[i].element_name;
+
+ form.appendChild(spanNode);
+ form.appendChild(inputNode);
+ form.appendChild(document.createElement("br"));
+ }
+ var submitButton = document.createElement("input");
+ submitButton.type = "submit";
+ submitButton.className = global_wfsConfObj[global_selectedWfsConfId].g_button_id;
+ submitButton.value = global_wfsConfObj[global_selectedWfsConfId].g_button;
+
+ form.appendChild(submitButton);
+}
+
+function validate(){
+ global_resultHighlight = new parent.Highlight(targetArray, "wfs_gazetteer_highlight", {"position":"absolute", "top":"0px", "left":"0px", "z-index":100}, 2);
+
+ var filterParameterCount = getNumberOfFilterParameters();
+
+ if(filterParameterCount == 0){
+ return false;
+ }
+ else{
+ var andConditions = "";
+
+ var el = global_wfsConfObj[global_selectedWfsConfId].element;
+
+ for (var i = 0; i < el.length; i++) {
+ if (el[i]['f_search'] == 1 && document.getElementById(el[i]['element_name']).value != '') {
+
+ var a = new Array();
+ a = document.getElementById(el[i]['element_name']).value.split(",");
+ var orConditions = "";
+ for (var j=0; j < a.length; j++) {
+
+ orConditions += "<ogc:PropertyIsLike wildCard='*' singleChar='.' escape='!'>";
+ orConditions += "<ogc:PropertyName>" + el[i]['element_name'] + "</ogc:PropertyName>";
+ orConditions += "<ogc:Literal>*";
+ if(el[i]['f_toupper'] == 1){
+ orConditions += a[j].toUpperCase();
+ }
+ else{
+ orConditions += a[j];
+ }
+ orConditions += "*</ogc:Literal>";
+ orConditions += "</ogc:PropertyIsLike>";
+ }
+ if(a.length > 1){
+ andConditions += "<Or>" + orConditions + "</Or>";
+ }
+ else {
+ andConditions += orConditions;
+ }
+ }
+ }
+
+ var u = global_wfsConfObj[global_selectedWfsConfId].wfs_getfeature + parent.mb_getConjunctionCharacter(global_wfsConfObj[global_selectedWfsConfId].wfs_getfeature);
+ u += "REQUEST=getFeature&Typename="+global_wfsConfObj[global_selectedWfsConfId].featuretype_name+"&Version=1.0.0&service=WFS";
+ u += "&filter=";
+
+ if (filterParameterCount > 1) {
+ andConditions = "<And>" + andConditions + "</And>";
+ }
+
+ var filter = "<ogc:Filter xmlns:ogc='http://ogc.org' xmlns:gml='http://www.opengis.net/gml'>"+andConditions+"</ogc:Filter>";
+
+ document.getElementById("res").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
+ var parameters = {command:"getSearchResults", "wfs_conf_id":global_selectedWfsConfId, "frame":this.name, "url":u, "filter":filter, "backlink":""};
+ parent.mb_ajax_get("../php/mod_wfs_gazetteer_server.php", parameters, function (jsCode, status) {
+ eval(jsCode);
+
+ for (var i=0; i < parent.wms.length; i++) {
+ for (var j=0; j < parent.wms[i].objLayer.length; j++) {
+ var currentLayer = parent.wms[i].objLayer[j];
+ var wms_id = parent.wms[i].wms_id;
+ if (currentLayer.gui_layer_wfs_featuretype == global_selectedWfsConfId) {
+ var layer_name = currentLayer.layer_name;
+ parent.handleSelectedLayer_array(targetArray[0],[wms_id],[layer_name],'querylayer',1);
+ parent.handleSelectedLayer_array(targetArray[0],[wms_id],[layer_name],'visible',1);
+ }
+ }
+ }
+
+ var body = "";
+ if (typeof(geom) == 'object') {
+ resultGeom = geom; // set the global variable
+ for (var i=0; i < geom.count(); i++) {
+ body += "<div id='geom"+i+"'style='cursor:pointer;' ";
+ if ((i % 2) === 0) {
+ body += "class='even'";
+ }
+ else {
+ body += "class='uneven'";
+ }
+ body += " onmouseover=\"setResult('over', this.id)\" ";
+ body += " onmouseout=\"setResult('out', this.id)\" ";
+ body += " onclick=\"setResult('click', this.id)\">";
+ for (var j=0; j < geom.get(i).e.count(); j++) {
+ body += geom.get(i).e.getValue(j) + " ";
+ }
+ body += "</div>";
+ }
+ }
+ else {
+ body = "Kein Ergebnis.";
+ }
+ document.getElementById('res').innerHTML = body;
+ });
+ }
+ return false;
+}
+
+function getNumberOfFilterParameters(){
+ var cnt = 0;
+ var el = global_wfsConfObj[global_selectedWfsConfId].element;
+
+ for (var i = 0; i < el.length; i++){
+ if( el[i]['f_search'] == 1){
+ if (document.getElementById(el[i]['element_name']).value != '') {
+ cnt++;
+ }
+ }
+ }
+ return cnt;
+}
+/*
+* event -> {over || out || click}
+* geom -> commaseparated coordinates x1,y1,x2,y2 ...
+*/
+function setResult(event, id){
+ var index = parseInt(id.slice(4));
+
+ if (event == "over") {
+ global_resultHighlight.add(resultGeom.get(index), cw_fillcolor);
+ }
+ else if (event == "out"){
+ global_resultHighlight.del(resultGeom.get(index), cw_fillcolor);
+ }
+ else if (event == "click"){
+ global_resultHighlight.del(resultGeom.get(index), cw_fillcolor);
+ var bbox = resultGeom.get(index).getBBox();
+ var buffer = new parent.Point(1,1);
+ bbox[0] = bbox[0].minus(buffer);
+ bbox[1] = bbox[1].plus(buffer);
+ parent.mb_calculateExtent(targetArray[0], bbox[0].x, bbox[0].y, bbox[1].x, bbox[1].y);
+ parent.zoom(targetArray[0], 'true', 1.0);
+ global_resultHighlight.add(resultGeom.get(index), cw_fillcolor);
+ }
+ return true;
+}
+
+
+</script>
+</head>
+<body leftmargin='0' topmargin='10' bgcolor='#ffffff'>
+<form name='selectWfsConfForm' id='selectWfsConfForm'></form>
+<form name='wfsForm' id='wfsForm' onsubmit='return validate()'></form>
+<div name='res' id='res' style='width:180px'></div>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_zoomCoords.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,151 +0,0 @@
-<?php
-#$Id$
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomCoords.php,v 1.10 2006/03/09 08:57:13 uli_rothstein Exp $
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Zoom to Coordinate</title>
-<style type="text/css">
- <!--
-
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size: 11px;
- }
- .labelx{
- position: absolute;
- left: 5px;
- top:5px;
- color: Gray;
- }
- .labely{
- position: absolute;
- left: 80px;
- top:5px;
- color: Gray;
- }
- .textx{
- position: absolute;
- left:5px;
- top:20px;
- color: Gray;
- width:65px;
- border: solid thin;
- height:20px;
- }
- .texty{
- position: absolute;
- left:80px;
- top:20px;
- color: Gray;
- width:65px;
- border: solid thin;
- height:20px;
- }
- .send{
- position: absolute;
- left:150px;
- top:20px;
- color: Gray;
- border: solid thin;
- height:20px;
- }
- -->
-</style>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-
-echo '<script type="text/javascript">';
-if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
-
-echo "var mod_zoomCoords_target = '".$e_target."';";
-echo "var target = mod_zoomCoords_target.split(',')";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function zoomCoordinate(x,y){
- x=x.replace(",",".");
- y=y.replace(",",".");
-
- document.form1.X.value=x;
- document.form1.Y.value=y;
-
- if (isNaN(x)==true || isNaN(y)==true){
- alert ("Bitte geben Sie eine Zahl ein.");
- }else{
- parent.zoom(target[0],true, 1.0,x,y);
- }
-}
-
-function highlight(x, y){
-
- x=x.replace(",",".");
- y=y.replace(",",".");
-
- document.form1.X.value=x;
- document.form1.Y.value=y;
-
-
- if (isNaN(x)==true || isNaN(y)==true){
-
- }
- else{
- parent.mb_showHighlight(target[0],x,y);
- parent.mb_showHighlight(target[1],x,y);
- }
-}
-
-
-function hideHighlight(){
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
-}
-
-// -->
-</script>
-</head>
-<body bgcolor='#ffffff' onload=''>
-
-<?php
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-#coordinates
-
- # Deutsche Version
-
- # English Version
- echo "<span class='labelx'>Longitude:</span>";
- echo "<span class='labely'>Latitude:</span>";
- echo "<input class='textx' type='text' name='X'>";
- echo "<input class='texty' type='text' name='Y'>";
- echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate(document.form1.X.value, document.form1.Y.value); highlight(document.form1.X.value, document.form1.Y.value)' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
-
-?>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php (from rev 2171, branches/2.4.5/http/javascripts/mod_zoomCoords.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomCoords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,149 @@
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomCoords.php,v 1.10 2006/03/09 08:57:13 uli_rothstein Exp $
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Zoom to Coordinate</title>
+<style type="text/css">
+ <!--
+
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ }
+ .labelx{
+ position: absolute;
+ left: 5px;
+ top:5px;
+ color: Gray;
+ }
+ .labely{
+ position: absolute;
+ left: 80px;
+ top:5px;
+ color: Gray;
+ }
+ .textx{
+ position: absolute;
+ left:5px;
+ top:20px;
+ color: Gray;
+ width:65px;
+ border: solid thin;
+ height:20px;
+ }
+ .texty{
+ position: absolute;
+ left:80px;
+ top:20px;
+ color: Gray;
+ width:65px;
+ border: solid thin;
+ height:20px;
+ }
+ .send{
+ position: absolute;
+ left:150px;
+ top:20px;
+ color: Gray;
+ border: solid thin;
+ height:20px;
+ }
+ -->
+</style>
+<?php
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+
+echo '<script type="text/javascript">';
+if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
+
+echo "var mod_zoomCoords_target = '".$e_target."';";
+echo "var target = mod_zoomCoords_target.split(',')";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function zoomCoordinate(x,y){
+ x=x.replace(",",".");
+ y=y.replace(",",".");
+
+ document.form1.X.value=x;
+ document.form1.Y.value=y;
+
+ if (isNaN(x)==true || isNaN(y)==true){
+ alert ("Bitte geben Sie eine Zahl ein.");
+ }else{
+ parent.zoom(target[0],true, 1.0,x,y);
+ }
+}
+
+function highlight(x, y){
+
+ x=x.replace(",",".");
+ y=y.replace(",",".");
+
+ document.form1.X.value=x;
+ document.form1.Y.value=y;
+
+
+ if (isNaN(x)==true || isNaN(y)==true){
+
+ }
+ else{
+ parent.mb_showHighlight(target[0],x,y);
+ parent.mb_showHighlight(target[1],x,y);
+ }
+}
+
+
+function hideHighlight(){
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+}
+
+// -->
+</script>
+</head>
+<body bgcolor='#ffffff' onload=''>
+
+<?php
+echo "<form name='form1' action='" . $self."' method='post'>";
+#coordinates
+
+ # Deutsche Version
+
+ # English Version
+ echo "<span class='labelx'>Longitude:</span>";
+ echo "<span class='labely'>Latitude:</span>";
+ echo "<input class='textx' type='text' name='X'>";
+ echo "<input class='texty' type='text' name='Y'>";
+ echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate(document.form1.X.value, document.form1.Y.value); highlight(document.form1.X.value, document.form1.Y.value)' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
+
+?>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_zoomFull.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,55 +0,0 @@
-<?php
-#$Id$
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomFull.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomFull' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('zoomFull: ID not unique!');";}
-?>
- var mod_zoomFull_img = new Image(); mod_zoomFull_img.src = "<?php echo $e_src; ?>";
- var mod_zoomFull_img_over = new Image(); mod_zoomFull_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-function mod_zoomFull(){
- var ind = this.getMapObjIndexByName("<?php echo $e_target; ?>");
- var arrayThemen = new Array();
- var arrayThemen = mb_mapObj[ind].wms[0].objLayer[0].layer_name;
- this.Layer0 = arrayThemen;
- //alert(mb_mapObj[ind].width + " - " + mb_mapObj[ind].height);
- this.width = mb_mapObj[ind].width;
- this.height = mb_mapObj[ind].height;
- this.epsg = wms[0].gui_wms_epsg;
- //mb_mapObj[ind].epsg = "EPSG:31493";
- //alert(Layer0);
- var arrayExt = new Array();
- var frameName = "<?php echo $e_target; ?>"
- var exts = setExtent(width,height,epsg);
- arrayExt = exts.split(",");
-
- mb_repaint(frameName,arrayExt[0],arrayExt[1],arrayExt[2],arrayExt[3]);
-}
-
-function mod_zoomFull_init(obj){
- document.getElementById("zoomFull").src = mod_zoomFull_img_over.src;
- obj.onmouseover = new Function("mod_zoomFull_over()");
- obj.onmouseout = new Function("mod_zoomFull_out()");
-}
-function mod_zoomFull_over(){
- document.getElementById("zoomFull").src = mod_zoomFull_img_over.src;
-}
-function mod_zoomFull_out(){
- document.getElementById("zoomFull").src = mod_zoomFull_img.src;
-}
-
-
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php (from rev 2181, branches/2.4.5/http/javascripts/mod_zoomFull.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomFull.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,53 @@
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomFull.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomFull' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('zoomFull: ID not unique!');";}
+?>
+ var mod_zoomFull_img = new Image(); mod_zoomFull_img.src = "<?php echo $e_src; ?>";
+ var mod_zoomFull_img_over = new Image(); mod_zoomFull_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+function mod_zoomFull(){
+ var ind = this.getMapObjIndexByName("<?php echo $e_target; ?>");
+ var arrayThemen = new Array();
+ var arrayThemen = mb_mapObj[ind].wms[0].objLayer[0].layer_name;
+ this.Layer0 = arrayThemen;
+ //alert(mb_mapObj[ind].width + " - " + mb_mapObj[ind].height);
+ this.width = mb_mapObj[ind].width;
+ this.height = mb_mapObj[ind].height;
+ this.epsg = wms[0].gui_wms_epsg;
+ //mb_mapObj[ind].epsg = "EPSG:31493";
+ //alert(Layer0);
+ var arrayExt = new Array();
+ var frameName = "<?php echo $e_target; ?>"
+ var exts = setExtent(width,height,epsg);
+ arrayExt = exts.split(",");
+
+ mb_repaint(frameName,arrayExt[0],arrayExt[1],arrayExt[2],arrayExt[3]);
+}
+
+function mod_zoomFull_init(obj){
+ document.getElementById("zoomFull").src = mod_zoomFull_img_over.src;
+ obj.onmouseover = new Function("mod_zoomFull_over()");
+ obj.onmouseout = new Function("mod_zoomFull_out()");
+}
+function mod_zoomFull_over(){
+ document.getElementById("zoomFull").src = mod_zoomFull_img_over.src;
+}
+function mod_zoomFull_out(){
+ document.getElementById("zoomFull").src = mod_zoomFull_img.src;
+}
+
+
+
Deleted: branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_zoomIn1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,54 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_zoomIn1.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomIn1' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('zoomIn1: ID not unique!');";}
-?>
-var mod_zoom1_img = new Image(); mod_zoom1_img.src = "<?php echo $e_src; ?>";
-var mod_zoom1_img_over = new Image(); mod_zoom1_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-
-function mod_zoomIn1(){
- zoom("<?php echo $e_target; ?>", true,2.0);
-}
-function mod_zoomIn1_init(obj){
- document.getElementById("zoomIn1").src = mod_zoom1_img_over.src;
- obj.onmouseover = new Function("mod_zoomIn1_over()");
- obj.onmouseout = new Function("mod_zoomIn1_out()");
-}
-function mod_zoomIn1_over(){
- document.getElementById("zoomIn1").src = mod_zoom1_img_over.src;
-}
-function mod_zoomIn1_out(){
- document.getElementById("zoomIn1").src = mod_zoom1_img.src;
-}
Copied: branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php (from rev 2181, branches/2.4.5/http/javascripts/mod_zoomIn1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomIn1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,51 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_zoomIn1.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomIn1' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('zoomIn1: ID not unique!');";}
+?>
+var mod_zoom1_img = new Image(); mod_zoom1_img.src = "<?php echo $e_src; ?>";
+var mod_zoom1_img_over = new Image(); mod_zoom1_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+
+function mod_zoomIn1(){
+ zoom("<?php echo $e_target; ?>", true,2.0);
+}
+function mod_zoomIn1_init(obj){
+ document.getElementById("zoomIn1").src = mod_zoom1_img_over.src;
+ obj.onmouseover = new Function("mod_zoomIn1_over()");
+ obj.onmouseout = new Function("mod_zoomIn1_out()");
+}
+function mod_zoomIn1_over(){
+ document.getElementById("zoomIn1").src = mod_zoom1_img_over.src;
+}
+function mod_zoomIn1_out(){
+ document.getElementById("zoomIn1").src = mod_zoom1_img.src;
+}
Deleted: branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php
===================================================================
--- branches/2.4.5/http/javascripts/mod_zoomOut1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,39 +0,0 @@
-<?php
-#$Id$
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomOut1.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
-
-$gui_id = $_REQUEST["gui_id"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomOut1' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('zoomOut1: ID not unique!');";}
-?>
-var mod_zoomOut_img = new Image(); mod_zoomOut_img.src = "<?php echo $e_src; ?>";
-var mod_zoomOut_img_over = new Image(); mod_zoomOut_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
-
-
-function mod_zoomOut1(){
- zoom("<?php echo $e_target; ?>", false,2.0);
-}
-function mod_zoomOut1_init(obj){
- document.getElementById("zoomOut1").src = mod_zoomOut_img_over.src;
- obj.onmouseover = new Function("mod_zoomOut1_over()");
- obj.onmouseout = new Function("mod_zoomOut1_out()");
-}
-function mod_zoomOut1_over(){
- document.getElementById("zoomOut1").src = mod_zoomOut_img_over.src;
-}
-function mod_zoomOut1_out(){
- document.getElementById("zoomOut1").src = mod_zoomOut_img.src;
-}
-
Copied: branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php (from rev 2181, branches/2.4.5/http/javascripts/mod_zoomOut1.php)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/mod_zoomOut1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,36 @@
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_zoomOut1.php,v 1.8 2005/09/13 18:16:42 bjoern_heuser Exp $
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = 'zoomOut1' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('zoomOut1: ID not unique!');";}
+?>
+var mod_zoomOut_img = new Image(); mod_zoomOut_img.src = "<?php echo $e_src; ?>";
+var mod_zoomOut_img_over = new Image(); mod_zoomOut_img_over.src = "<?php echo preg_replace("/_off/","_over",$e_src); ?>";
+
+
+function mod_zoomOut1(){
+ zoom("<?php echo $e_target; ?>", false,2.0);
+}
+function mod_zoomOut1_init(obj){
+ document.getElementById("zoomOut1").src = mod_zoomOut_img_over.src;
+ obj.onmouseover = new Function("mod_zoomOut1_over()");
+ obj.onmouseout = new Function("mod_zoomOut1_out()");
+}
+function mod_zoomOut1_over(){
+ document.getElementById("zoomOut1").src = mod_zoomOut_img_over.src;
+}
+function mod_zoomOut1_out(){
+ document.getElementById("zoomOut1").src = mod_zoomOut_img.src;
+}
+
Deleted: branches/2.4.5_rc1/http/javascripts/wfs.js
===================================================================
--- branches/2.4.5/http/javascripts/wfs.js 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/javascripts/wfs.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,320 +0,0 @@
-<?php
-#$Id$
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_wfs_spatialRequest.php,v 1.4 2006/03/08 15:26:26 c_baudson Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once("../php/mb_validateSession.php");
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$gui_id = $_REQUEST["gui_id"];
-$e_id_css = "wfs";
-include '../include/dyn_js.php';
-require_once("wfs_usemap.js");
-?>
-var highlight_tag_id = "wfs_highlight_tag";
-var mb_wfs_fetched = [];
-
-
-var mb_wfs_target = "mapframe1";
-var mb_wfs_objwin = null;
-var mb_wfs_objwin_left = 800;
-var mb_wfs_objwin_top = 200;
-var mb_wfs_objwin_width = 200;
-var mb_wfs_objwin_height = 200;
-var mb_wfs_targets = new Array("mapframe1","overview");
-var mb_wfs_fillColor = "#ff0000";
-var usemap = "";
-var mod_usemap_radius = 10;
-var mod_usemap_line_tolerance = 5;
-var useCheckboxForHighlighting = true;
-
-var mb_wfs_fetch = new GeometryArray();
-
-var highlight;
-
-mb_registerInitFunctions('initHighlight()');
-
-function initHighlight() {
- var styleObj = {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex};
- highlight = new Highlight(mb_wfs_targets, highlight_tag_id, styleObj, generalHighlightLineWidth);
-}
-try {if(displayWfsResultList){}}catch(e) {displayWfsResultList = 0;}
-
-if (displayWfsResultList == 1) {
- //mb_registerWfsReadSubFunctions(function(geom){mb_wfs_listMember(geom)});
-}
-
-
-if (parseInt(useUsemap) == 1) {
- mb_registerSubFunctions('mod_usemap("")');
-}
-
-if (useCheckboxForHighlighting) {
- mb_registerSubFunctions('highlight.paint()');
-}
-
-/*
-if (useExtentIsSet()) {
- mb_registerSubFunctions("mb_setwfsrequest_extent()");
-}
-function mb_setwfsrequest_extent() {
-
- if (useExtentIsSet()) {
- var ind = getMapObjIndexByName(mb_wfs_targets[0]);
- var pos_a = makeClickPos2RealWorldPos(mb_wfs_targets[0],0,0);
- var pos_b = makeClickPos2RealWorldPos(mb_wfs_targets[0],mb_mapObj[ind].width,mb_mapObj[ind].height);
-
- var x = [];
- var y = [];
- x[0] = pos_a[0];
- x[1] = pos_b[0];
- y[0] = pos_a[1];
- y[1] = pos_b[1];
-
- mb_setwfsrequest(mb_wfs_targets[0],'rectangle',x,y);
- }
-}
-*/
-
-function mb_wfs_listMember(geomArray){
- mb_wfs_fetch.union(geomArray);
- var wfs_conf = get_complete_wfs_conf();
- var str = "<table>";
- for(var i=0; i<mb_wfs_fetch.count(); i++){
- var t = wfs_conf[mb_wfs_fetch.get(i).wfs_conf];
- for(var j=0; j<t['element'].length; j++){
- if(t['element'][j]['f_show'] > 0){
- var k = mb_wfs_fetch.get(i).e.getElementIndexByName(t['element'][j]['element_name']);
- //alert(k);
- if(k != -1){
- str += "<tr><td>";
- if (useCheckboxForHighlighting) {
- str += "<input type=checkbox id=highlightCheckbox" + i + " onChange='highlightGeometry(" + i + ")'></td><td>";
- }
- str += "<div";
- if (!useCheckboxForHighlighting) {
- str += " onmouseover='mb_wfs_perform(\"over\",mb_wfs_fetch.get("+i+"))' ";
- str += " onmouseout='mb_wfs_perform(\"out\",mb_wfs_fetch.get("+i+"))' ";
- }
- str += " onclick='mb_wfs_perform(\"click\",mb_wfs_fetch.get("+i+"))' ";
- str += ">" + mb_wfs_fetch.get(i).e.getValue(k)+ "</div></td></tr>";
- }
- }
- }
- }
- str += "</table>";
- mb_wfs_objwin.innerHTML = str;
-// if (parseInt(useUsemap) == 1) mod_usemap(wfs_name);
-}
-
-function mb_wfs_reset(){
- mb_wfs_fetch = new parent.GeometryArray();
- usemap = "";
-
- if(mb_wfs_objwin == null){
- var iframe=document.createElement('div');
- iframe.setAttribute("style","position:absolute;left:"+mb_wfs_objwin_left+"px;top:"+mb_wfs_objwin_top+"px;width:"+mb_wfs_objwin_width+"px;height:"+mb_wfs_objwin_height+"px");
- mb_wfs_objwin = document.body.appendChild(iframe);
- mb_wfs_objwin.id = "mb_wfs_objwin";
- mb_wfs_objwin.name = "mb_wfs_objwin";
- mb_wfs_objwin.style.position = 'absolute';
- mb_wfs_objwin.style.left = mb_wfs_objwin_left+"px";
- mb_wfs_objwin.style.top = mb_wfs_objwin_top+"px";
- mb_wfs_objwin.style.width = mb_wfs_objwin_width+"px";
- mb_wfs_objwin.style.height = mb_wfs_objwin_height+"px";
- }
- for(var i=0; i<mb_wfsreq; i++){
- if(document.getElementById("mb_wfs_win_"+mb_wfsreq)){
- document.removeChild("mb_wfs_win_"+mb_wfsreq);
- }
- }
- mb_wfsreq = 0;
- return true;
-}
-
-function get_complete_wfs_conf() {
- var wfs_conf = window.frames["wfs_conf"].get_wfs_conf();
- return wfs_conf;
-}
-
-function highlightGeometry(i) {
- var id = "highlightCheckbox"+i;
- if (document.getElementById(id).checked) highlight.add(mb_wfs_fetch.get(i), '#00ff00');
- else highlight.del(mb_wfs_fetch.get(i), '#00ff00');
-}
-
-function mb_wfs_perform(type,m){
-
- var wfs_conf = window.frames["wfs_conf"].get_wfs_conf();
- if(type=='over') highlight.add(m, '#0000ff');
- else if(type=='out') highlight.del(m, '#0000ff');
- else if(type=='click') {
- var tmp = m.getBBox();
- if (m.geomType == geomType.point) {
- var b = 1;
- }
- else {
- var b = 0;
- }
- if (typeof(m.wfs_conf) != "undefined") {
- b = parseFloat(wfs_conf[m.wfs_conf]['g_buffer']);
- }
- var buffer = new Point(b,b);
- var bbox_ll = tmp[0].minus(buffer);
- var bbox_ru = tmp[1].plus(buffer);
- mb_calcExtent(mb_wfs_targets[0],bbox_ll, bbox_ru);
- zoom(mb_wfs_targets[0], 'true', 1.0);
- }
-}
-
-function get_wfs_str(myconf, d, m, type, fid) {
- var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" ';
-
- var ns_gml = false; var ns_ogc = false; var ns_xsi = false; var ns_wfs = false; var ns_topp = false;
-
- for (var q = 0 ; q < myconf['namespaces'].length ; q++) {
- if (myconf['namespaces'][q]['name'] == "gml") ns_gml = true;
- else if (myconf['namespaces'][q]['name'] == "ogc") ns_ogc = true;
- else if (myconf['namespaces'][q]['name'] == "xsi") ns_xsi = true;
- else if (myconf['namespaces'][q]['name'] == "wfs") ns_wfs = true;
- else if (myconf['namespaces'][q]['name'] == "topp") ns_topp = true;
- str += 'xmlns:' + myconf['namespaces'][q]['name'] + '="' + myconf['namespaces'][q]['location'] + '" ';
- }
-
- if (ns_gml == false) str += 'xmlns:gml="http://www.opengis.net/gml" ';
- if (ns_ogc == false) str += 'xmlns:ogc="http://www.opengis.net/ogc" ';
- if (ns_xsi == false) str += 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
- if (ns_topp == false) str += 'xmlns:topp="http://www.someserver.com/topp" ';
- if (ns_wfs == false) str += 'xmlns:wfs="http://www.opengis.net/wfs" ';
-
- str += 'xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">';
-
-
- //
- // ---------------------------------------- SAVE -------------------------------------------------
- //
- if (type == "save") {
- str += '<wfs:Insert><'+ myconf['featuretype_name']+'>';
- for(var i=0; i<d.get(m).e.count(); i++){
- if(d.get(m).e.getValue(i) != "" && d.get(m).e.getName(i) != "fid"){
- var tmp = d.get(m).e.getName(i);
- str += '<' + tmp + '>' + d.get(m).e.getValue(i) + '</' + tmp + '>';
- }
- }
- for(var j=0; j<myconf['element'].length; j++){
- if(myconf['element'][j]['f_geom'] == 1){
- var el_geom = myconf['element'][j]['element_name'];
- }
- }
- str += '<' + el_geom + '>';
- if(d.get(m).geomType == geomType.point){
- str += '<gml:Point srsName="' + myconf['featuretype_srs'] + '">';
- str += '<gml:coordinates>';
- str += d.getPoint(m,0,0).x + "," + d.getPoint(m,0,0).y;
- str += '</gml:coordinates>';
- str += '</gml:Point>';
- }
- if(d.get(m).geomType == geomType.line){
- str += '<gml:MultiLineString srsName="' + myconf['featuretype_srs'] + '">';
- str += '<gml:lineStringMember><gml:LineString><gml:coordinates>';
- for(var k=0; k<d.getGeometry(m,0).count(); k++){
- if(k>0) str += " ";
- str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
- }
- str += '</gml:coordinates></gml:LineString></gml:lineStringMember>';
- str += '</gml:MultiLineString>';
- }
- if(d.get(m).geomType == geomType.polygon){
- str += '<gml:MultiPolygon srsName="' + myconf['featuretype_srs'] + '">';
- str += '<gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
-
- for(var k=0; k<d.getGeometry(m,0).count(); k++){
- if(k>0) str += " ";
- str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
- }
- str += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>';
- }
- str += '</' + el_geom + '></'+ myconf['featuretype_name']+'></wfs:Insert>';
- }
- //
- // --------------------------------------- UPDATE ------------------------------------------------
- //
- else if (type == "update") {
- str += '<wfs:Update typeName="'+ myconf['featuretype_name']+'">';
- for(var i=0; i<d.get(m).e.count(); i++){
- if(d.get(m).e.getValue(i) != "" && d.get(m).e.getName(i) != "fid"){
- str += '<wfs:Property>';
- str += '<wfs:Name>'+d.get(m).e.getName(i)+'</wfs:Name>';
- str += '<wfs:Value>'+d.get(m).e.getValue(i)+'</wfs:Value>';
- str += '</wfs:Property>';
- }
- }
- for(var j=0; j<myconf['element'].length; j++){
- if(myconf['element'][j]['f_geom'] == 1){
- var el_geom = myconf['element'][j]['element_name'];
- }
- }
- str += '<wfs:Property><wfs:Name>' + el_geom + '</wfs:Name><wfs:Value>';
- if(d.get(m).geomType == geomType.point){
- str += '<gml:Point srsName="' + myconf['featuretype_srs'] + '"><gml:coordinates>';
- str += d.getPoint(m,0,0).x + "," + d.getPoint(m,0,0).y;
- str += '</gml:coordinates></gml:Point>';
- }
- if(d.get(m).geomType == geomType.line){
- str += '<gml:MultiLineString srsName="' + myconf['featuretype_srs'] + '">';
- str += '<gml:lineStringMember><gml:LineString><gml:coordinates>';
- for(var k=0; k<d.getGeometry(m,0).count(); k++){
- if(k>0) str += " ";
- str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
- }
- str += '</gml:coordinates></gml:LineString></gml:lineStringMember>';
- str += '</gml:MultiLineString>';
- }
- if(d.get(m).geomType == geomType.polygon){
- str += '<gml:MultiPolygon srsName="' + myconf['featuretype_srs'] + '">';
- str += '<gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
- for(var k=0; k<d.getGeometry(m,0).count(); k++){
- if(k>0) str += " ";
- str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
- }
- str += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>';
- }
- str += '</wfs:Value></wfs:Property>';
- str += '<ogc:Filter><ogc:FeatureId fid="'+fid+'"/></ogc:Filter>';
- str += '</wfs:Update>';
- }
- //
- // --------------------------------------- DELETE ------------------------------------------------
- //
- else if (type == "delete") {
- str += '<wfs:Delete typeName="'+ myconf['featuretype_name']+'">';
- for(var j=0; j<myconf['element'].length; j++){
- if(myconf['element'][j]['f_geom'] == 1){
- var el_geom = myconf['element'][j]['element_name'];
- }
- }
- str += '<ogc:Filter><ogc:FeatureId fid="'+fid+'"/></ogc:Filter>';
- str += '</wfs:Delete>';
- }
-
- str += '</wfs:Transaction>';
- return str;
-}
Copied: branches/2.4.5_rc1/http/javascripts/wfs.js (from rev 2181, branches/2.4.5/http/javascripts/wfs.js)
===================================================================
--- branches/2.4.5_rc1/http/javascripts/wfs.js (rev 0)
+++ branches/2.4.5_rc1/http/javascripts/wfs.js 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,315 @@
+<?php
+#$Id$
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_wfs_spatialRequest.php,v 1.4 2006/03/08 15:26:26 c_baudson Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once("../php/mb_validateSession.php");
+
+$e_id_css = "wfs";
+include '../include/dyn_js.php';
+require_once("wfs_usemap.js");
+?>
+var highlight_tag_id = "wfs_highlight_tag";
+var mb_wfs_fetched = [];
+
+
+var mb_wfs_target = "mapframe1";
+var mb_wfs_objwin = null;
+var mb_wfs_objwin_left = 800;
+var mb_wfs_objwin_top = 200;
+var mb_wfs_objwin_width = 200;
+var mb_wfs_objwin_height = 200;
+var mb_wfs_targets = new Array("mapframe1","overview");
+var mb_wfs_fillColor = "#ff0000";
+var usemap = "";
+var mod_usemap_radius = 10;
+var mod_usemap_line_tolerance = 5;
+var useCheckboxForHighlighting = true;
+
+var mb_wfs_fetch = new GeometryArray();
+
+var highlight;
+
+mb_registerInitFunctions('initHighlight()');
+
+function initHighlight() {
+ var styleObj = {"position":"absolute", "top":"0px", "left":"0px", "z-index":generalHighlightZIndex};
+ highlight = new Highlight(mb_wfs_targets, highlight_tag_id, styleObj, generalHighlightLineWidth);
+}
+try {if(displayWfsResultList){}}catch(e) {displayWfsResultList = 0;}
+
+if (displayWfsResultList == 1) {
+ //mb_registerWfsReadSubFunctions(function(geom){mb_wfs_listMember(geom)});
+}
+
+
+if (parseInt(useUsemap) == 1) {
+ mb_registerSubFunctions('mod_usemap("")');
+}
+
+if (useCheckboxForHighlighting) {
+ mb_registerSubFunctions('highlight.paint()');
+}
+
+/*
+if (useExtentIsSet()) {
+ mb_registerSubFunctions("mb_setwfsrequest_extent()");
+}
+function mb_setwfsrequest_extent() {
+
+ if (useExtentIsSet()) {
+ var ind = getMapObjIndexByName(mb_wfs_targets[0]);
+ var pos_a = makeClickPos2RealWorldPos(mb_wfs_targets[0],0,0);
+ var pos_b = makeClickPos2RealWorldPos(mb_wfs_targets[0],mb_mapObj[ind].width,mb_mapObj[ind].height);
+
+ var x = [];
+ var y = [];
+ x[0] = pos_a[0];
+ x[1] = pos_b[0];
+ y[0] = pos_a[1];
+ y[1] = pos_b[1];
+
+ mb_setwfsrequest(mb_wfs_targets[0],'rectangle',x,y);
+ }
+}
+*/
+
+function mb_wfs_listMember(geomArray){
+ mb_wfs_fetch.union(geomArray);
+ var wfs_conf = get_complete_wfs_conf();
+ var str = "<table>";
+ for(var i=0; i<mb_wfs_fetch.count(); i++){
+ var t = wfs_conf[mb_wfs_fetch.get(i).wfs_conf];
+ for(var j=0; j<t['element'].length; j++){
+ if(t['element'][j]['f_show'] > 0){
+ var k = mb_wfs_fetch.get(i).e.getElementIndexByName(t['element'][j]['element_name']);
+ //alert(k);
+ if(k != -1){
+ str += "<tr><td>";
+ if (useCheckboxForHighlighting) {
+ str += "<input type=checkbox id=highlightCheckbox" + i + " onChange='highlightGeometry(" + i + ")'></td><td>";
+ }
+ str += "<div";
+ if (!useCheckboxForHighlighting) {
+ str += " onmouseover='mb_wfs_perform(\"over\",mb_wfs_fetch.get("+i+"))' ";
+ str += " onmouseout='mb_wfs_perform(\"out\",mb_wfs_fetch.get("+i+"))' ";
+ }
+ str += " onclick='mb_wfs_perform(\"click\",mb_wfs_fetch.get("+i+"))' ";
+ str += ">" + mb_wfs_fetch.get(i).e.getValue(k)+ "</div></td></tr>";
+ }
+ }
+ }
+ }
+ str += "</table>";
+ mb_wfs_objwin.innerHTML = str;
+// if (parseInt(useUsemap) == 1) mod_usemap(wfs_name);
+}
+
+function mb_wfs_reset(){
+ mb_wfs_fetch = new parent.GeometryArray();
+ usemap = "";
+
+ if(mb_wfs_objwin == null){
+ var iframe=document.createElement('div');
+ iframe.setAttribute("style","position:absolute;left:"+mb_wfs_objwin_left+"px;top:"+mb_wfs_objwin_top+"px;width:"+mb_wfs_objwin_width+"px;height:"+mb_wfs_objwin_height+"px");
+ mb_wfs_objwin = document.body.appendChild(iframe);
+ mb_wfs_objwin.id = "mb_wfs_objwin";
+ mb_wfs_objwin.name = "mb_wfs_objwin";
+ mb_wfs_objwin.style.position = 'absolute';
+ mb_wfs_objwin.style.left = mb_wfs_objwin_left+"px";
+ mb_wfs_objwin.style.top = mb_wfs_objwin_top+"px";
+ mb_wfs_objwin.style.width = mb_wfs_objwin_width+"px";
+ mb_wfs_objwin.style.height = mb_wfs_objwin_height+"px";
+ }
+ for(var i=0; i<mb_wfsreq; i++){
+ if(document.getElementById("mb_wfs_win_"+mb_wfsreq)){
+ document.removeChild("mb_wfs_win_"+mb_wfsreq);
+ }
+ }
+ mb_wfsreq = 0;
+ return true;
+}
+
+function get_complete_wfs_conf() {
+ var wfs_conf = window.frames["wfs_conf"].get_wfs_conf();
+ return wfs_conf;
+}
+
+function highlightGeometry(i) {
+ var id = "highlightCheckbox"+i;
+ if (document.getElementById(id).checked) highlight.add(mb_wfs_fetch.get(i), '#00ff00');
+ else highlight.del(mb_wfs_fetch.get(i), '#00ff00');
+}
+
+function mb_wfs_perform(type,m){
+
+ var wfs_conf = window.frames["wfs_conf"].get_wfs_conf();
+ if(type=='over') highlight.add(m, '#0000ff');
+ else if(type=='out') highlight.del(m, '#0000ff');
+ else if(type=='click') {
+ var tmp = m.getBBox();
+ if (m.geomType == geomType.point) {
+ var b = 1;
+ }
+ else {
+ var b = 0;
+ }
+ if (typeof(m.wfs_conf) != "undefined") {
+ b = parseFloat(wfs_conf[m.wfs_conf]['g_buffer']);
+ }
+ var buffer = new Point(b,b);
+ var bbox_ll = tmp[0].minus(buffer);
+ var bbox_ru = tmp[1].plus(buffer);
+ mb_calcExtent(mb_wfs_targets[0],bbox_ll, bbox_ru);
+ zoom(mb_wfs_targets[0], 'true', 1.0);
+ }
+}
+
+function get_wfs_str(myconf, d, m, type, fid) {
+ var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" ';
+
+ var ns_gml = false; var ns_ogc = false; var ns_xsi = false; var ns_wfs = false; var ns_topp = false;
+
+ for (var q = 0 ; q < myconf['namespaces'].length ; q++) {
+ if (myconf['namespaces'][q]['name'] == "gml") ns_gml = true;
+ else if (myconf['namespaces'][q]['name'] == "ogc") ns_ogc = true;
+ else if (myconf['namespaces'][q]['name'] == "xsi") ns_xsi = true;
+ else if (myconf['namespaces'][q]['name'] == "wfs") ns_wfs = true;
+ else if (myconf['namespaces'][q]['name'] == "topp") ns_topp = true;
+ str += 'xmlns:' + myconf['namespaces'][q]['name'] + '="' + myconf['namespaces'][q]['location'] + '" ';
+ }
+
+ if (ns_gml == false) str += 'xmlns:gml="http://www.opengis.net/gml" ';
+ if (ns_ogc == false) str += 'xmlns:ogc="http://www.opengis.net/ogc" ';
+ if (ns_xsi == false) str += 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ';
+ if (ns_topp == false) str += 'xmlns:topp="http://www.someserver.com/topp" ';
+ if (ns_wfs == false) str += 'xmlns:wfs="http://www.opengis.net/wfs" ';
+
+ str += 'xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">';
+
+
+ //
+ // ---------------------------------------- SAVE -------------------------------------------------
+ //
+ if (type == "save") {
+ str += '<wfs:Insert><'+ myconf['featuretype_name']+'>';
+ for(var i=0; i<d.get(m).e.count(); i++){
+ if(d.get(m).e.getValue(i) != "" && d.get(m).e.getName(i) != "fid"){
+ var tmp = d.get(m).e.getName(i);
+ str += '<' + tmp + '>' + d.get(m).e.getValue(i) + '</' + tmp + '>';
+ }
+ }
+ for(var j=0; j<myconf['element'].length; j++){
+ if(myconf['element'][j]['f_geom'] == 1){
+ var el_geom = myconf['element'][j]['element_name'];
+ }
+ }
+ str += '<' + el_geom + '>';
+ if(d.get(m).geomType == geomType.point){
+ str += '<gml:Point srsName="' + myconf['featuretype_srs'] + '">';
+ str += '<gml:coordinates>';
+ str += d.getPoint(m,0,0).x + "," + d.getPoint(m,0,0).y;
+ str += '</gml:coordinates>';
+ str += '</gml:Point>';
+ }
+ if(d.get(m).geomType == geomType.line){
+ str += '<gml:MultiLineString srsName="' + myconf['featuretype_srs'] + '">';
+ str += '<gml:lineStringMember><gml:LineString><gml:coordinates>';
+ for(var k=0; k<d.getGeometry(m,0).count(); k++){
+ if(k>0) str += " ";
+ str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
+ }
+ str += '</gml:coordinates></gml:LineString></gml:lineStringMember>';
+ str += '</gml:MultiLineString>';
+ }
+ if(d.get(m).geomType == geomType.polygon){
+ str += '<gml:MultiPolygon srsName="' + myconf['featuretype_srs'] + '">';
+ str += '<gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
+
+ for(var k=0; k<d.getGeometry(m,0).count(); k++){
+ if(k>0) str += " ";
+ str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
+ }
+ str += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>';
+ }
+ str += '</' + el_geom + '></'+ myconf['featuretype_name']+'></wfs:Insert>';
+ }
+ //
+ // --------------------------------------- UPDATE ------------------------------------------------
+ //
+ else if (type == "update") {
+ str += '<wfs:Update typeName="'+ myconf['featuretype_name']+'">';
+ for(var i=0; i<d.get(m).e.count(); i++){
+ if(d.get(m).e.getValue(i) != "" && d.get(m).e.getName(i) != "fid"){
+ str += '<wfs:Property>';
+ str += '<wfs:Name>'+d.get(m).e.getName(i)+'</wfs:Name>';
+ str += '<wfs:Value>'+d.get(m).e.getValue(i)+'</wfs:Value>';
+ str += '</wfs:Property>';
+ }
+ }
+ for(var j=0; j<myconf['element'].length; j++){
+ if(myconf['element'][j]['f_geom'] == 1){
+ var el_geom = myconf['element'][j]['element_name'];
+ }
+ }
+ str += '<wfs:Property><wfs:Name>' + el_geom + '</wfs:Name><wfs:Value>';
+ if(d.get(m).geomType == geomType.point){
+ str += '<gml:Point srsName="' + myconf['featuretype_srs'] + '"><gml:coordinates>';
+ str += d.getPoint(m,0,0).x + "," + d.getPoint(m,0,0).y;
+ str += '</gml:coordinates></gml:Point>';
+ }
+ if(d.get(m).geomType == geomType.line){
+ str += '<gml:MultiLineString srsName="' + myconf['featuretype_srs'] + '">';
+ str += '<gml:lineStringMember><gml:LineString><gml:coordinates>';
+ for(var k=0; k<d.getGeometry(m,0).count(); k++){
+ if(k>0) str += " ";
+ str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
+ }
+ str += '</gml:coordinates></gml:LineString></gml:lineStringMember>';
+ str += '</gml:MultiLineString>';
+ }
+ if(d.get(m).geomType == geomType.polygon){
+ str += '<gml:MultiPolygon srsName="' + myconf['featuretype_srs'] + '">';
+ str += '<gml:polygonMember><gml:Polygon><gml:outerBoundaryIs><gml:LinearRing><gml:coordinates>';
+ for(var k=0; k<d.getGeometry(m,0).count(); k++){
+ if(k>0) str += " ";
+ str += d.getPoint(m,0,k).x + "," + d.getPoint(m,0,k).y;
+ }
+ str += '</gml:coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon></gml:polygonMember></gml:MultiPolygon>';
+ }
+ str += '</wfs:Value></wfs:Property>';
+ str += '<ogc:Filter><ogc:FeatureId fid="'+fid+'"/></ogc:Filter>';
+ str += '</wfs:Update>';
+ }
+ //
+ // --------------------------------------- DELETE ------------------------------------------------
+ //
+ else if (type == "delete") {
+ str += '<wfs:Delete typeName="'+ myconf['featuretype_name']+'">';
+ for(var j=0; j<myconf['element'].length; j++){
+ if(myconf['element'][j]['f_geom'] == 1){
+ var el_geom = myconf['element'][j]['element_name'];
+ }
+ }
+ str += '<ogc:Filter><ogc:FeatureId fid="'+fid+'"/></ogc:Filter>';
+ str += '</wfs:Delete>';
+ }
+
+ str += '</wfs:Transaction>';
+ return str;
+}
Deleted: branches/2.4.5_rc1/http/php/mb_js_exception.php
===================================================================
--- branches/2.4.5/http/php/mb_js_exception.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mb_js_exception.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,20 +0,0 @@
-<?php
-$message = $_POST['text'];
-$level = $_POST['level'];
-
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-
-if ($level == "warning") {
- $e = new mb_warning($message);
-}
-else if ($level == "notice") {
- $e = new mb_notice($message);
-}
-else if ($level == "error") {
- $e = new mb_exception($message);
-}
-else {
- $e = new mb_exception($message);
-}
-echo $type . " '" . $message . "' thrown.";
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mb_js_exception.php (from rev 2138, branches/2.4.5/http/php/mb_js_exception.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mb_js_exception.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mb_js_exception.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,22 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$message = $_POST['text'];
+$level = $_POST['level'];
+
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+
+if ($level == "warning") {
+ $e = new mb_warning($message);
+}
+else if ($level == "notice") {
+ $e = new mb_notice($message);
+}
+else if ($level == "error") {
+ $e = new mb_exception($message);
+}
+else {
+ $e = new mb_exception($message);
+}
+echo $type . " '" . $message . "' thrown.";
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mb_listWMCs.php
===================================================================
--- branches/2.4.5/http/php/mb_listWMCs.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mb_listWMCs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,207 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mb_listWMCs.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-$user_id = $_SESSION["mb_user_id"];
-
-$action = $_GET["action"];
-$wmcId = $_GET["wmc_id"];
-
-$delWmcId = $_POST["del_wmc_id"];
-$clientFilename = $_FILES['local_wmc_filename']['tmp_name'];
-
-$form_target = $_SERVER["PHP_SELF"] . "?" . SID;
-
-require_once("../../conf/mapbender.conf");
-require_once("../classes/class_administration.php");
-require_once("../classes/class_mb_exception.php");
-require_once("../classes/class_wmc.php");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
- <head>
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
- <title>Select web map contect document from list</title>
- </head>
- <body>
- <form name='delete_wmc' action='<?php echo $form_target; ?>' method='POST'>
- <input type='hidden' id='delete_wmc' name='del_wmc_id' value ='' >
- </form>
-
-<?php
-function mb_listWMCs($wmcIdArray, $form_target){
- $display = "<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from list</font></h2>";
- $display .= "<table width='90%' style='font-family: Arial, Helvetica, sans-serif;font-size : 12px;color: #808080;' border='1' cellpadding='3' rules='rows'><tr style='background-color:#F0F0F0;' width='80px'><td ><b>WMC name</b></td><td><b>last update</b></td><td colspan=5></td></tr>";
-
- if (count($wmcIdArray) > 0) {
- $v = array();
- $t = array();
-
- $wmcIdList = "";
- for ($i = 0; $i < count($wmcIdArray); $i++){
- if ($i > 0){
- $wmcIdList .= ",";
- }
- $wmcIdList .= "$".($i+1);
- array_push($v, $wmcIdArray[$i]);
- array_push($t, 's');
- }
- $sql_list_wmcs = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp FROM mb_user_wmc ";
- $sql_list_wmcs .= "WHERE wmc_id IN (" . $wmcIdList . ") ";
- $sql_list_wmcs .= "ORDER BY wmc_timestamp DESC";
-
- $res_list_wmcs = db_prep_query($sql_list_wmcs, $v, $t);
- while($row = db_fetch_array($res_list_wmcs)){
- $this_id = $row["wmc_id"];
- $this_title = $row["wmc_title"];
- $this_timestamp = date("M d Y H:i:s", $row["wmc_timestamp"]);
-
- $display .= "<tr onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
- $display .= "<td>".$this_title."</td>";
- $display .= "<td>".$this_timestamp. "</td>";
- $display .= "<td><a href=\"" . $form_target . "&action=load&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_load.png\" title=\"load this WMC\" border=0></a></td>";
- $display .= "<td><a href=\"" . $form_target . "&action=merge&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_merge.png\" title=\"merge WMC\" border=0></a></td>";
- $display .= "<td><a href=\"" . $form_target . "&action=append&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_append.png\" title=\"append WMC\" border=0></a></td>";
- $display .= "<td><a href='../javascripts/mod_displayWmc.php?wmc_id=".$this_id."' target = '_blank'><img src=\"../img/button_gray/wmc_xml.png\" title=\"display WMC XML\" border=0></a></td>";
- $display .= "<td><a href=\"" . $form_target . "&action=delete&wmc_id=".$this_id."\"><img src=\"../img/button_gray/del.png\" title=\"delete this WMC\" border=0></a></td>";
- $display .= "</tr>";
- }
- }
- else{
- $display .= "<tr><td>There are no WMCs availiable</td></tr>";
- }
- $display .= "</table>";
-
- return $display;
-}
-
-function getTarget($gui_id) {
- $sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'loadwmc' AND fkey_gui_id = $1";
- $v = array($gui_id);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $e_require = $row["e_requires"];
- $cnt++;
- }
- if ($cnt > 1) {
- $e = new mb_exception("listWMCs: e_id 'loadwmc' not unique in GUI '" . $gui_id . "'!");
- }
-
- $targetArray = explode(",", $e_target);
- if (in_array('mapframe1', $targetArray)) {
- return 'mapframe1';
- }
- else {
- return trim($targetArray[0]);
- }
-}
-
-function loadFile($filename) {
- $handle = fopen($filename, "r");
- $cnt = 0;
- while (!feof($handle)) {
- $buffer .= fgets($handle, 4096);
- }
- fclose ($handle);
- return $buffer;
-}
-
-$admin = new administration();
-$wmcIdArray = $admin->getWmcByOwner($user_id);
-
-// wmc is being deleted
-if (!empty($delWmcId)) {
- $result = $admin->deleteWmc($delWmcId, $user_id);
- if (!$result) {
- echo "<script language='javascript'>";
- echo "alert('WMC could not be deleted!');";
- echo "</script>";
- }
-}
-// wmc is being loaded from file
-elseif ($clientFilename) {
- $serverFilename = "../tmp/wmc" . time() . ".xml";
- copy($clientFilename, $serverFilename);
-
- $wmc = new wmc();
- $wmc->createObjFromWMC_xml(loadFile($serverFilename));
-
- $mytarget = getTarget($gui_id);
- $js = $wmc->createJsObjFromWMC("window.opener.", $mytarget, "load");
- echo "<script language='javascript'>";
- echo $js;
- if ($wmc->getTitle()) {
- $title = "'" . $wmc->getTitle() . "' ";
- }
- echo "alert(\"WMC " . $title . ": load successful.\");\n";
- echo "window.close();";
- echo "</script>";
-}
-
-// load a WMC from file
-?>
-<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from file</font></h2>
-<form enctype="multipart/form-data" action="<?php echo $form_target;?>" method=POST target="_self">
-<input type='file' name='local_wmc_filename'>
-<input type='submit' value='load'>
-</form>
-<?php
-
-// load a WMC from list
-echo mb_listWMCs($wmcIdArray, $form_target);
-
-if ($wmcId && in_array($wmcId, $wmcIdArray)){
- if ($action == "delete") {
- echo "<script language='javascript'>";
- echo "value = confirm('Do you really want to delete this document?');";
- echo "if (value == true) {";
- echo "document.delete_wmc.del_wmc_id.value = '" . $wmcId . "';";
- echo "document.delete_wmc.submit();";
- echo "}";
- echo "</script>";
- }
- else if ($action == "append" || $action == "merge" || $action == "load") {
- $mytarget = getTarget($gui_id);
-
- $wmc = new wmc();
- $wmc->createObjFromWMC_id($wmcId);
- $js = $wmc->createJsObjFromWMC("window.opener.", $mytarget, $action);
-
- echo "<script language='javascript'>";
- echo $js;
- if ($wmc->getTitle()) {
- $title = "'" . $wmc->getTitle() . "' ";
- }
- echo "alert(\"WMC " . $title . ": " . $action . " successful.\");\n";
- echo "window.close();";
- echo "</script>";
- }
-}
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mb_listWMCs.php (from rev 2171, branches/2.4.5/http/php/mb_listWMCs.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mb_listWMCs.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mb_listWMCs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,206 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mb_listWMCs.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$gui_id = $_SESSION["mb_user_gui"];
+$user_id = $_SESSION["mb_user_id"];
+
+$action = $_GET["action"];
+$wmcId = $_GET["wmc_id"];
+
+$delWmcId = $_POST["del_wmc_id"];
+$clientFilename = $_FILES['local_wmc_filename']['tmp_name'];
+
+require_once("../../conf/mapbender.conf");
+require_once("../classes/class_administration.php");
+require_once("../classes/class_mb_exception.php");
+require_once("../classes/class_wmc.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+ <head>
+ <meta http-equiv="cache-control" content="no-cache">
+ <meta http-equiv="pragma" content="no-cache">
+ <meta http-equiv="expires" content="0">
+ <meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
+ <title>Select web map contect document from list</title>
+ </head>
+ <body>
+ <form name='delete_wmc' action='<?php echo $self; ?>' method='POST'>
+ <input type='hidden' id='delete_wmc' name='del_wmc_id' value ='' >
+ </form>
+
+<?php
+function mb_listWMCs($wmcIdArray, $form_target){
+ $display = "<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from list</font></h2>";
+ $display .= "<table width='90%' style='font-family: Arial, Helvetica, sans-serif;font-size : 12px;color: #808080;' border='1' cellpadding='3' rules='rows'><tr style='background-color:#F0F0F0;' width='80px'><td ><b>WMC name</b></td><td><b>last update</b></td><td colspan=5></td></tr>";
+
+ if (count($wmcIdArray) > 0) {
+ $v = array();
+ $t = array();
+
+ $wmcIdList = "";
+ for ($i = 0; $i < count($wmcIdArray); $i++){
+ if ($i > 0){
+ $wmcIdList .= ",";
+ }
+ $wmcIdList .= "$".($i+1);
+ array_push($v, $wmcIdArray[$i]);
+ array_push($t, 's');
+ }
+ $sql_list_wmcs = "SELECT DISTINCT wmc_id, wmc_title, wmc_timestamp FROM mb_user_wmc ";
+ $sql_list_wmcs .= "WHERE wmc_id IN (" . $wmcIdList . ") ";
+ $sql_list_wmcs .= "ORDER BY wmc_timestamp DESC";
+
+ $res_list_wmcs = db_prep_query($sql_list_wmcs, $v, $t);
+ while($row = db_fetch_array($res_list_wmcs)){
+ $this_id = $row["wmc_id"];
+ $this_title = $row["wmc_title"];
+ $this_timestamp = date("M d Y H:i:s", $row["wmc_timestamp"]);
+
+ $display .= "<tr onmouseover='this.style.backgroundColor = \"#F08080\"' onmouseout='this.style.backgroundColor = \"#ffffff\"'>";
+ $display .= "<td>".$this_title."</td>";
+ $display .= "<td>".$this_timestamp. "</td>";
+ $display .= "<td><a href=\"" . $form_target . "&action=load&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_load.png\" title=\"load this WMC\" border=0></a></td>";
+ $display .= "<td><a href=\"" . $form_target . "&action=merge&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_merge.png\" title=\"merge WMC\" border=0></a></td>";
+ $display .= "<td><a href=\"" . $form_target . "&action=append&wmc_id=".$this_id."\"><img src=\"../img/button_gray/wmc_append.png\" title=\"append WMC\" border=0></a></td>";
+ $display .= "<td><a href='../javascripts/mod_displayWmc.php?wmc_id=".$this_id."' target = '_blank'><img src=\"../img/button_gray/wmc_xml.png\" title=\"display WMC XML\" border=0></a></td>";
+ $display .= "<td><a href=\"" . $form_target . "&action=delete&wmc_id=".$this_id."\"><img src=\"../img/button_gray/del.png\" title=\"delete this WMC\" border=0></a></td>";
+ $display .= "</tr>";
+ }
+ }
+ else{
+ $display .= "<tr><td>There are no WMCs availiable</td></tr>";
+ }
+ $display .= "</table>";
+
+ return $display;
+}
+
+function getTarget($gui_id) {
+ $sql = "SELECT e_requires, e_target FROM gui_element WHERE e_id = 'loadwmc' AND fkey_gui_id = $1";
+ $v = array($gui_id);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $e_require = $row["e_requires"];
+ $cnt++;
+ }
+ if ($cnt > 1) {
+ $e = new mb_exception("listWMCs: e_id 'loadwmc' not unique in GUI '" . $gui_id . "'!");
+ }
+
+ $targetArray = explode(",", $e_target);
+ if (in_array('mapframe1', $targetArray)) {
+ return 'mapframe1';
+ }
+ else {
+ return trim($targetArray[0]);
+ }
+}
+
+function loadFile($filename) {
+ $handle = fopen($filename, "r");
+ $cnt = 0;
+ while (!feof($handle)) {
+ $buffer .= fgets($handle, 4096);
+ }
+ fclose ($handle);
+ return $buffer;
+}
+
+$admin = new administration();
+$wmcIdArray = $admin->getWmcByOwner($user_id);
+
+// wmc is being deleted
+if (!empty($delWmcId)) {
+ $result = $admin->deleteWmc($delWmcId, $user_id);
+ if (!$result) {
+ echo "<script language='javascript'>";
+ echo "alert('WMC could not be deleted!');";
+ echo "</script>";
+ }
+}
+// wmc is being loaded from file
+elseif ($clientFilename) {
+ $serverFilename = "../tmp/wmc" . time() . ".xml";
+ copy($clientFilename, $serverFilename);
+
+ $wmc = new wmc();
+ $wmc->createObjFromWMC_xml(loadFile($serverFilename));
+
+ $mytarget = getTarget($gui_id);
+ $js = $wmc->createJsObjFromWMC("window.opener.", $mytarget, "load");
+ echo "<script language='javascript'>";
+ echo $js;
+ if ($wmc->getTitle()) {
+ $title = "'" . $wmc->getTitle() . "' ";
+ }
+ echo "alert(\"WMC " . $title . ": load successful.\");\n";
+ echo "window.close();";
+ echo "</script>";
+}
+
+// load a WMC from file
+?>
+<h2 style='font-family: Arial, Helvetica, sans-serif; color: #808080;background-color: White;'><font align='left' color='#000000'>load WMC from file</font></h2>
+<form enctype="multipart/form-data" action="<?php echo $self;?>" method=POST target="_self">
+<input type='file' name='local_wmc_filename'>
+<input type='submit' value='load'>
+</form>
+<?php
+
+// load a WMC from list
+echo mb_listWMCs($wmcIdArray, $self);
+
+if ($wmcId && in_array($wmcId, $wmcIdArray)){
+ if ($action == "delete") {
+ echo "<script language='javascript'>";
+ echo "value = confirm('Do you really want to delete this document?');";
+ echo "if (value == true) {";
+ echo "document.delete_wmc.del_wmc_id.value = '" . $wmcId . "';";
+ echo "document.delete_wmc.submit();";
+ echo "}";
+ echo "</script>";
+ }
+ else if ($action == "append" || $action == "merge" || $action == "load") {
+ $mytarget = getTarget($gui_id);
+
+ $wmc = new wmc();
+ $wmc->createObjFromWMC_id($wmcId);
+ $js = $wmc->createJsObjFromWMC("window.opener.", $mytarget, $action);
+
+ echo "<script language='javascript'>";
+ echo $js;
+ if ($wmc->getTitle()) {
+ $title = "'" . $wmc->getTitle() . "' ";
+ }
+ echo "alert(\"WMC " . $title . ": " . $action . " successful.\");\n";
+ echo "window.close();";
+ echo "</script>";
+ }
+}
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mb_validatePermission.php
===================================================================
--- branches/2.4.5/http/php/mb_validatePermission.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mb_validatePermission.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,42 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mb_validatePermission.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include_once(dirname(__FILE__)."/../classes/class_administration.php");
-if(!isset($_SESSION["mb_user_id"]) || !isset($_SESSION["mb_user_ip"]) || $_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
- header("Location: ".LOGIN);
- exit;
- die();
-}
-if(isset($_REQUEST["gui_id"])){
- if( !in_array($_REQUEST["gui_id"],$_SESSION["mb_user_guis"])){
- header("Location: ".LOGIN);
- exit;
- die();
- }
-}
-$n = new administration();
-$m = $n->getModulPermission($_SESSION["mb_user_id"],$_REQUEST["guiID"],$_REQUEST["elementID"]);
-if($m == false){
- header("Location: ".LOGIN);
- exit;
- die();
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mb_validatePermission.php (from rev 2218, branches/2.4.5/http/php/mb_validatePermission.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mb_validatePermission.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mb_validatePermission.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,84 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mb_validatePermission.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$admin = new administration();
+
+//
+// check if GUI id and element id are set
+//
+$msg = "missing in " . $_SERVER["PHP_SELF"];
+if (!isset($gui_id)) {
+ $e = new mb_exception("GUI id " . $msg);
+ die();
+}
+if (!isset($e_id)) {
+ $e = new mb_exception("Element id " . $msg);
+ die();
+}
+
+//
+// check if the user is allowed to access this module
+//
+$isAllowed = $admin->getModulPermission($_SESSION["mb_user_id"], $gui_id, $e_id);
+
+//
+// if the module is an iframe, also check if the filename matches the
+// filename of the GUI element with the given e_id
+//
+// (if PHP_SELF is "map.php", we trust the script.)
+//
+if (!preg_match("/^.*\/javascripts\/map\.php$/", $_SERVER["PHP_SELF"])) {
+
+ $isCorrectScript = true;
+
+ $sql = "SELECT e_element FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+ $v = array($e_id, $gui_id);
+ $t = array("s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ while ($row = db_fetch_array($res)) {
+ if (!$admin->checkModulePermission_new($_SESSION["mb_user_id"], $_SERVER["PHP_SELF"], $row["e_element"])) {
+ $isCorrectScript = false;
+ break;
+ }
+ }
+// $e = new mb_notice($e_id . ": isAllowed: " . $isAllowed . ", isCorrectScript: " . $isCorrectScript);
+ $isAllowed = $isAllowed && $isCorrectScript;
+}
+
+//
+// If the user is not allowed to access the module, return to the login screen.
+//
+if (!$isAllowed) {
+ $msg = "mb_validatePermission.php: User " . $_SESSION["mb_user_id"] . " is not allowed to access ".
+ "module " . $e_id;
+ $e = new mb_exception($msg);
+ header("Location: ".LOGIN);
+ die();
+}
+
+$e = new mb_notice("mb_validatePermission.php: checking file " . $_SERVER["PHP_SELF"] . "...permission valid.");
+
+//
+// delete global variables
+//
+unset($admin, $isAllowed, $e, $isCorrectScript, $msg, $myGuisArray);
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mb_validateSession.php
===================================================================
--- branches/2.4.5/http/php/mb_validateSession.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mb_validateSession.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,34 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mb_validateSession.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-if(!isset($_SESSION["mb_user_id"]) || !isset($_SESSION["mb_user_ip"]) || $_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']){
- header("Location: ".LOGIN);
- exit;
- die();
-}
-if(isset($_REQUEST["gui_id"])){
- if( !in_array($_REQUEST["gui_id"],$_SESSION["mb_user_guis"])){
- header("Location: ".LOGIN);
- exit;
- die();
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mb_validateSession.php (from rev 2175, branches/2.4.5/http/php/mb_validateSession.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mb_validateSession.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mb_validateSession.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,90 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mb_validateSession.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+session_start();
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+
+//
+// establish database connection
+//
+$con = db_connect($DBSERVER, $OWNER, $PW);
+db_select_db(DB, $con);
+
+$e = new mb_notice("mb_validateSession.php: checking file " . $_SERVER["PHP_SELF"]);
+
+//
+// check if user data is valid; if not, return to login screen
+//
+if (!isset($_SESSION["mb_user_id"]) ||
+ !isset($_SESSION["mb_user_ip"]) ||
+ $_SESSION['mb_user_ip'] != $_SERVER['REMOTE_ADDR']) {
+
+ $e = new mb_exception("mb_validateSession.php: Invalid user: " . $_SESSION["mb_user_id"]);
+ header("Location: " . LOGIN);
+ die();
+}
+
+//
+// set the global var gui_id
+//
+if (!$gui_id) {
+ $e = new mb_notice("gui id not set");
+ if ($_REQUEST["guiID"]) {
+ $e = new mb_notice("gui id set to guiID");
+ $gui_id = $_REQUEST["guiID"];
+ }
+ elseif ($_REQUEST["gui_id"]) {
+ $e = new mb_notice("gui id set to gui_id");
+ $gui_id = $_REQUEST["gui_id"];
+ }
+ else {
+ $e = new mb_notice("mb_validateSession.php: gui_id not set in script: " . $_SERVER["PHP_SELF"]);
+ }
+}
+
+//
+// set the global var e_id
+//
+if (!$e_id) {
+ if (isset($_REQUEST["elementID"])) {
+ $e_id = $_REQUEST["elementID"];
+ }
+ elseif (isset($_REQUEST["e_id"])) {
+ $e_id = $_REQUEST["e_id"];
+ }
+ else {
+ $e = new mb_notice("mb_validateSession.php: e_id not set in script: " . $_SERVER["PHP_SELF"]);
+ }
+}
+
+//
+// set variables used for form targets or links
+//
+$urlParameters = SID;
+if (isset($gui_id)) {
+ $urlParameters .= "&guiID=" . $gui_id;
+}
+if (isset($e_id)) {
+ $urlParameters .= "&elementID=" . $e_id;
+}
+$self = $_SERVER["PHP_SELF"] . "?" . $urlParameters;
+
+$e = new mb_notice("mb_validateSession.php: GUI: " . $gui_id . ", checking file " . $_SERVER["PHP_SELF"] . "...session valid.");
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_SelectKeyword.php
===================================================================
--- branches/2.4.5/http/php/mod_SelectKeyword.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_SelectKeyword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,65 +0,0 @@
-<?php
-# $Id$
-# ttp://www.mapbender.org/index.php/mod_SelectKeyword
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-
-<html>
-<head>
-<title></title>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-
-<script language='JavaScript'>
-<!--
-function insertValue(val){
- window.opener.document.form1.search.value = val;
- window.close();
-}
--->
-</script>
-</head>
-
-<body onload='resizeTo(350,400);' >
-
-<?php
-$sql = "Select keyword_id, ltrim(keyword) as keyword from keyword order by upper(ltrim(keyword));";
-$res = db_query($sql);
-
-echo "<select size='20' name='keywordlist' ondblClick='insertValue(this.value)'>\n";
-
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo "<option value='". $row["keyword"]."' >";
- echo $row["keyword"];
- $cnt++;
- echo "</option>";
-}
-echo "</select>";
-
-?>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_SelectKeyword.php (from rev 2138, branches/2.4.5/http/php/mod_SelectKeyword.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_SelectKeyword.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_SelectKeyword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,65 @@
+<?php
+# $Id$
+# ttp://www.mapbender.org/index.php/mod_SelectKeyword
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+
+<html>
+<head>
+<title></title>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+
+<script language='JavaScript'>
+<!--
+function insertValue(val){
+ window.opener.document.form1.search.value = val;
+ window.close();
+}
+-->
+</script>
+</head>
+
+<body onload='resizeTo(350,400);' >
+
+<?php
+$sql = "Select keyword_id, ltrim(keyword) as keyword from keyword order by upper(ltrim(keyword));";
+$res = db_query($sql);
+
+echo "<select size='20' name='keywordlist' ondblClick='insertValue(this.value)'>\n";
+
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ echo "<option value='". $row["keyword"]."' >";
+ echo $row["keyword"];
+ $cnt++;
+ echo "</option>";
+}
+echo "</select>";
+
+?>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_WMSpreferences.php
===================================================================
--- branches/2.4.5/http/php/mod_WMSpreferences.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_WMSpreferences.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,280 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-session_start();
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>WMS Preferences</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<STYLE TYPE="text/css">
- <!--
- body{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- color:#0066cc;
- font-size:10pt
- }
-
- table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- color:#808080;;
- font-size:9pt
- }
-
- th{
- background-color:#F0F0F0;
- }
-
- select{
- width:240px;
- }
-
- -->
-</STYLE>
-<?php
-
-$sql = "SELECT * FROM gui_element WHERE e_id = 'WMS_preferences' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-$vis = "";
-$wmsid = "";
-
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('WMS_preferences: ID not unique!');";}
-echo '<script type="text/javascript">';
-$target = explode(",", $e_target);
-echo "var mod_WMSpreferences_target1 = '".trim($target[0])."';";
-echo "var mod_WMSpreferences_target2 = '".trim($target[1])."';";
-echo "</script>";
-
-$sql_visible = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res_visible = db_prep_query($sql_visible, $v, $t);
-$cnt_visible = 0;
-
-while($row = db_fetch_array($res_visible)){
- $gui_wms_visible[$cnt_visible] = $row["gui_wms_visible"];
- $fkey_wms_id_visible[$cnt_visible] = $row["fkey_wms_id"];
- if($cnt_visible>0){
- $vis .= ",";
- $wmsid .= ",";
- }
- $vis .= $gui_wms_visible[$cnt_visible];
- $wmsid .= $fkey_wms_id_visible[$cnt_visible];
- $cnt_visible++;
-}
-
-echo '<script type="text/javascript">';
-echo "var mod_gui_wms_visible = '".$vis."';";
-echo "var mod_fkey_wms_id_visible = '".$wmsid."';";
-echo "</script>";
-?>
-
-<script type="text/javascript">
-<!--
-var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
-var my = window.opener.mb_mapObj[ind];
-
-
-
-// Opacity version
-
-function setMapOpacity(val) {
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_mapopacity = tmp[1];
- loadWMS();
-}
-
-function cambia_opacity(id,incremento){
- objeto = opener.mapframe1.document.getElementById('div_'+id);
- opacity = objeto.style.opacity*100 - (-incremento);
- opacity = (opacity < 100)? ((opacity > 0)? opacity : 0) : 100;
- objeto.style.opacity = (opacity / 100);
- objeto.style.MozOpacity = (opacity / 100);
- objeto.style.KhtmlOpacity = (opacity / 100);
- objeto.style.filter = "alpha(opacity=" + opacity + ")";
- setMapOpacity(id+","+(opacity / 100));
-}
-
-
-
-
-function setMapformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_mapformat = tmp[1];
- loadWMS();
-}
-
-function setFeatureformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_featureinfoformat = tmp[1];
- loadWMS();
-}
-
-function setExceptionformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_exceptionformat = tmp[1];
- loadWMS();
-}
-
-function swap(index1, index2){
- if (window.opener.mb_swapWmsByIndex(ind, index1, index2) == true) {
- loadWMS();
- window.opener.zoom(mod_WMSpreferences_target1, true, 1.0);
- window.opener.mb_execloadWmsSubFunctions();
- }
-}
-
-function remove_wms(num){
- var cnt_vis=0;
- var wms_visible_down = mod_gui_wms_visible.split(",");
- var wms_vis_down = wms_visible_down.length;
-
- //check if there are more than two visible wms's
- for(var i=0; i < wms_visible_down.length; i++){
- var my_wms_visible = wms_visible_down[i];
- if(my_wms_visible == 0){
- var cnt_vis = cnt_vis+1;
- }
- }
-
- if(my.wms.length - cnt_vis>1){
- var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
- window.opener.mb_mapObjremoveWMS(ind,num)
- window.opener.mb_execloadWmsSubFunctions();
-// window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
- window.location.reload();
- }
- else{
- alert ("Last WMS can't be removed.\n(Der letzte WMS kann nicht entfernt werden.)");
- }
-}
-
-function loadWMS(){
- var str = "";
- var wms_visible = mod_gui_wms_visible.split(",");
- var wms_id_visible = mod_fkey_wms_id_visible.split(",");
- var visibleWmsIndexArray = new Array();
-
- for(var i=0; i < my.wms.length; i++){
- var found = false;
- for(var j=0; j < wms_id_visible.length; j++){
- if (wms_visible[j] == 1 && wms_id_visible[j] == my.wms[i].wms_id){
- visibleWmsIndexArray[visibleWmsIndexArray.length] = i;
- found = true;
- }
- }
- if (found == false && my.wms[i].gui_wms_visible == 1) {
- visibleWmsIndexArray[visibleWmsIndexArray.length] = i;
- }
- }
-
- for (var i = 0 ; i < visibleWmsIndexArray.length ; i++) {
- z = visibleWmsIndexArray[i];
- var mapString = "";
- var featureinfoString = "";
- var exceptionString = "";
-
- for(var j=0; j<my.wms[z].data_type.length; j++){
- if(my.wms[z].data_type[j] == 'map'){
- mapString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
- if(my.wms[z].data_format[j] == my.wms[z].gui_wms_mapformat){
- mapString += "selected";
- }
- mapString += ">"+my.wms[z].data_format[j]+"</option>";
- }
- else if(my.wms[z].data_type[j] == 'featureinfo'){
- featureinfoString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
- if(my.wms[z].data_format[j] == my.wms[z].gui_wms_featureinfoformat){
- featureinfoString += "selected";
- }
- featureinfoString += ">"+my.wms[z].data_format[j]+"</option>";
- }
- else if(my.wms[z].data_type[j] == 'exception'){
- exceptionString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
- if(my.wms[z].data_format[j] == my.wms[z].gui_wms_exceptionformat){
- exceptionString += "selected";
- }
- exceptionString += ">"+my.wms[z].data_format[j]+"</option>";
- }
- }
-
- str += "<table border='1' rules='rows'>";
- str += "<tr><th>";
- str += "<img src='../img/button_gray/up.png' style='filter:Chroma(color=#C2CBCF);' onclick='swap("+visibleWmsIndexArray[i-1]+","+z+")' value='up' title='move WMS up'> ";
- str += "<img src='../img/button_gray/down.png' style='filter:Chroma(color=#C2CBCF);' onclick='swap("+z+", "+visibleWmsIndexArray[i+1]+")'value='down'title='move WMS down'> </td>";
- str += "<img src='../img/button_gray/del.png' onclick='remove_wms("+z+")' value='remove' title='remove WMS from GUI'> ";
- str += "</th><th width='300'><div id ='id_"+my.wms[z].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+"id:"+my.wms[z].wms_id+" "+my.wms[z].wms_abstract+"\"'><b>"+my.wms[z].wms_title+"</b>";
- str += "</div></th></tr>";
- //str += "<tr><td>ID:</td><td>"+my.wms[z].wms_id+"</td></tr>";
- str += "<tr><td>MapImageFormat: </td><td>";
- str += "<select onchange='setMapformat(this.value)'>"
- str += mapString;
- str += "</select></td></tr>";
- str += "<tr><td>FeatureInfoFormat: </td><td>";
- str += "<select onchange='setFeatureformat(this.value)'>";
- str += featureinfoString;
- str += "</select></td></tr>";
- str += "<tr><td>ExceptionFormat: </td><td>";
- str += "<select onchange='setExceptionformat(this.value)'>"
- str += exceptionString;
- str += "</select></td></tr></table>";
- str += "<table><tr>";
-
- //opacity version
- str += "<tr><td>Opacity:</td><td><input type=\"button\" onclick=\"cambia_opacity('"+visibleWmsIndexArray[i]+"','-10')\" value=\"-\">";
- str += "<input id=\"valor_opacity_"+visibleWmsIndexArray[i]+"\" type=\"text\" disabled=\"disabled\" size=\"3\" value=\""+my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity*100+" %\">";
- str += "<input type=\"button\" onclick=\"cambia_opacity('"+visibleWmsIndexArray[i]+"','+10')\" value=\"+\">";
- str += "</td></tr>";
-
- str += "</tr></table><br>";
- }
-
- document.getElementById('data').innerHTML = str;
-}
-
-// -->
-</script>
-</head>
-<body onload='loadWMS()'>
-<div id='data'><div>
-<form>
-<input type='hidden' name='visibility' value=''>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_WMSpreferences.php (from rev 2138, branches/2.4.5/http/php/mod_WMSpreferences.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_WMSpreferences.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_WMSpreferences.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,280 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>WMS Preferences</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<STYLE TYPE="text/css">
+ <!--
+ body{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ color:#0066cc;
+ font-size:10pt
+ }
+
+ table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ color:#808080;;
+ font-size:9pt
+ }
+
+ th{
+ background-color:#F0F0F0;
+ }
+
+ select{
+ width:240px;
+ }
+
+ -->
+</STYLE>
+<?php
+
+$sql = "SELECT * FROM gui_element WHERE e_id = 'WMS_preferences' AND fkey_gui_id = $1";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+$vis = "";
+$wmsid = "";
+
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('WMS_preferences: ID not unique!');";}
+echo '<script type="text/javascript">';
+$target = explode(",", $e_target);
+echo "var mod_WMSpreferences_target1 = '".trim($target[0])."';";
+echo "var mod_WMSpreferences_target2 = '".trim($target[1])."';";
+echo "</script>";
+
+$sql_visible = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array("s");
+$res_visible = db_prep_query($sql_visible, $v, $t);
+$cnt_visible = 0;
+
+while($row = db_fetch_array($res_visible)){
+ $gui_wms_visible[$cnt_visible] = $row["gui_wms_visible"];
+ $fkey_wms_id_visible[$cnt_visible] = $row["fkey_wms_id"];
+ if($cnt_visible>0){
+ $vis .= ",";
+ $wmsid .= ",";
+ }
+ $vis .= $gui_wms_visible[$cnt_visible];
+ $wmsid .= $fkey_wms_id_visible[$cnt_visible];
+ $cnt_visible++;
+}
+
+echo '<script type="text/javascript">';
+echo "var mod_gui_wms_visible = '".$vis."';";
+echo "var mod_fkey_wms_id_visible = '".$wmsid."';";
+echo "</script>";
+?>
+
+<script type="text/javascript">
+<!--
+var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
+var my = window.opener.mb_mapObj[ind];
+
+
+
+// Opacity version
+
+function setMapOpacity(val) {
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_mapopacity = tmp[1];
+ loadWMS();
+}
+
+function cambia_opacity(id,incremento){
+ objeto = opener.mapframe1.document.getElementById('div_'+id);
+ opacity = objeto.style.opacity*100 - (-incremento);
+ opacity = (opacity < 100)? ((opacity > 0)? opacity : 0) : 100;
+ objeto.style.opacity = (opacity / 100);
+ objeto.style.MozOpacity = (opacity / 100);
+ objeto.style.KhtmlOpacity = (opacity / 100);
+ objeto.style.filter = "alpha(opacity=" + opacity + ")";
+ setMapOpacity(id+","+(opacity / 100));
+}
+
+
+
+
+function setMapformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_mapformat = tmp[1];
+ loadWMS();
+}
+
+function setFeatureformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_featureinfoformat = tmp[1];
+ loadWMS();
+}
+
+function setExceptionformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_exceptionformat = tmp[1];
+ loadWMS();
+}
+
+function swap(index1, index2){
+ if (window.opener.mb_swapWmsByIndex(ind, index1, index2) == true) {
+ loadWMS();
+ window.opener.zoom(mod_WMSpreferences_target1, true, 1.0);
+ window.opener.mb_execloadWmsSubFunctions();
+ }
+}
+
+function remove_wms(num){
+ var cnt_vis=0;
+ var wms_visible_down = mod_gui_wms_visible.split(",");
+ var wms_vis_down = wms_visible_down.length;
+
+ //check if there are more than two visible wms's
+ for(var i=0; i < wms_visible_down.length; i++){
+ var my_wms_visible = wms_visible_down[i];
+ if(my_wms_visible == 0){
+ var cnt_vis = cnt_vis+1;
+ }
+ }
+
+ if(my.wms.length - cnt_vis>1){
+ var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
+ window.opener.mb_mapObjremoveWMS(ind,num)
+ window.opener.mb_execloadWmsSubFunctions();
+// window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
+ window.location.reload();
+ }
+ else{
+ alert ("Last WMS can't be removed.\n(Der letzte WMS kann nicht entfernt werden.)");
+ }
+}
+
+function loadWMS(){
+ var str = "";
+ var wms_visible = mod_gui_wms_visible.split(",");
+ var wms_id_visible = mod_fkey_wms_id_visible.split(",");
+ var visibleWmsIndexArray = new Array();
+
+ for(var i=0; i < my.wms.length; i++){
+ var found = false;
+ for(var j=0; j < wms_id_visible.length; j++){
+ if (wms_visible[j] == 1 && wms_id_visible[j] == my.wms[i].wms_id){
+ visibleWmsIndexArray[visibleWmsIndexArray.length] = i;
+ found = true;
+ }
+ }
+ if (found == false && my.wms[i].gui_wms_visible == 1) {
+ visibleWmsIndexArray[visibleWmsIndexArray.length] = i;
+ }
+ }
+
+ for (var i = 0 ; i < visibleWmsIndexArray.length ; i++) {
+ z = visibleWmsIndexArray[i];
+ var mapString = "";
+ var featureinfoString = "";
+ var exceptionString = "";
+
+ for(var j=0; j<my.wms[z].data_type.length; j++){
+ if(my.wms[z].data_type[j] == 'map'){
+ mapString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
+ if(my.wms[z].data_format[j] == my.wms[z].gui_wms_mapformat){
+ mapString += "selected";
+ }
+ mapString += ">"+my.wms[z].data_format[j]+"</option>";
+ }
+ else if(my.wms[z].data_type[j] == 'featureinfo'){
+ featureinfoString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
+ if(my.wms[z].data_format[j] == my.wms[z].gui_wms_featureinfoformat){
+ featureinfoString += "selected";
+ }
+ featureinfoString += ">"+my.wms[z].data_format[j]+"</option>";
+ }
+ else if(my.wms[z].data_type[j] == 'exception'){
+ exceptionString += "<option value='"+z+","+my.wms[z].data_format[j]+"'";
+ if(my.wms[z].data_format[j] == my.wms[z].gui_wms_exceptionformat){
+ exceptionString += "selected";
+ }
+ exceptionString += ">"+my.wms[z].data_format[j]+"</option>";
+ }
+ }
+
+ str += "<table border='1' rules='rows'>";
+ str += "<tr><th>";
+ str += "<img src='../img/button_gray/up.png' style='filter:Chroma(color=#C2CBCF);' onclick='swap("+visibleWmsIndexArray[i-1]+","+z+")' value='up' title='move WMS up'> ";
+ str += "<img src='../img/button_gray/down.png' style='filter:Chroma(color=#C2CBCF);' onclick='swap("+z+", "+visibleWmsIndexArray[i+1]+")'value='down'title='move WMS down'> </td>";
+ str += "<img src='../img/button_gray/del.png' onclick='remove_wms("+z+")' value='remove' title='remove WMS from GUI'> ";
+ str += "</th><th width='300'><div id ='id_"+my.wms[z].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+"id:"+my.wms[z].wms_id+" "+my.wms[z].wms_abstract+"\"'><b>"+my.wms[z].wms_title+"</b>";
+ str += "</div></th></tr>";
+ //str += "<tr><td>ID:</td><td>"+my.wms[z].wms_id+"</td></tr>";
+ str += "<tr><td>MapImageFormat: </td><td>";
+ str += "<select onchange='setMapformat(this.value)'>"
+ str += mapString;
+ str += "</select></td></tr>";
+ str += "<tr><td>FeatureInfoFormat: </td><td>";
+ str += "<select onchange='setFeatureformat(this.value)'>";
+ str += featureinfoString;
+ str += "</select></td></tr>";
+ str += "<tr><td>ExceptionFormat: </td><td>";
+ str += "<select onchange='setExceptionformat(this.value)'>"
+ str += exceptionString;
+ str += "</select></td></tr></table>";
+ str += "<table><tr>";
+
+ //opacity version
+ str += "<tr><td>Opacity:</td><td><input type=\"button\" onclick=\"cambia_opacity('"+visibleWmsIndexArray[i]+"','-10')\" value=\"-\">";
+ str += "<input id=\"valor_opacity_"+visibleWmsIndexArray[i]+"\" type=\"text\" disabled=\"disabled\" size=\"3\" value=\""+my.wms[visibleWmsIndexArray[i]].gui_wms_mapopacity*100+" %\">";
+ str += "<input type=\"button\" onclick=\"cambia_opacity('"+visibleWmsIndexArray[i]+"','+10')\" value=\"+\">";
+ str += "</td></tr>";
+
+ str += "</tr></table><br>";
+ }
+
+ document.getElementById('data').innerHTML = str;
+}
+
+// -->
+</script>
+</head>
+<body onload='loadWMS()'>
+<div id='data'><div>
+<form>
+<input type='hidden' name='visibility' value=''>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php
===================================================================
--- branches/2.4.5/http/php/mod_addWMSfromfilteredList_server.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,141 +0,0 @@
-<?php
-# $Id: mod_addWMSfromfilteredList.php 830 2006-11-20 13:39:10Z christoph $
-# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../extensions/JSON.php");
-
-$userId = $_SESSION["mb_user_id"];
-$command = $_GET["command"];
-$guiId = $_GET["guiId"];
-$groupId = $_GET["groupId"];
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$admin = new administration();
-$guiIdArray = $admin->getGuisByPermission($userId, false);
-
-$resultObj = array();
-
-if ($command == "getGroups") {
- $resultObj["group"] = array();
-
- $sql = "SELECT mb_group_id, mb_group_name, mb_group_description ";
- $sql .= "FROM mb_group, mb_user_mb_group ";
- $sql .= "WHERE fkey_mb_group_id = mb_group_id AND fkey_mb_user_id = $1 ";
- $sql .= "ORDER BY mb_group_name";
- $v = array($userId);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- while($row = db_fetch_array($res)){
- $resultArray = array("description" => $row["mb_group_description"], "name" => $row["mb_group_name"], "id" => $row["mb_group_id"]);
- array_push($resultObj["group"], $resultArray);
- }
-}
-else if ($command == "getGUIs") {
-
- $resultObj["gui"] = array();
-
- $sql = "SELECT * FROM gui WHERE gui_id IN (";
- $v = array();
- $t = array();
-
- for ($i = 0; $i < count($guiIdArray); $i++) {
- if ($i > 0) {
- $sql .= ",";
- }
- $sql .= "$" . strval($i + 1);
- array_push($v, $guiIdArray[$i]);
- array_push($t, "s");
- }
- $sql .= ") ORDER BY gui_name";
-
- $res = db_prep_query($sql,$v,$t);
-
- while ($row = db_fetch_array($res)) {
- $resultArray = array("description" => $row["gui_description"], "name" => $row["gui_name"], "id" => $row["gui_id"]);
- array_push($resultObj["gui"], $resultArray);
- }
-}
-else if ($command == "getAllWMS") {
- $resultObj["wms"] = array();
-
- $sql = "SELECT DISTINCT wms.wms_id, wms.wms_title, wms.wms_abstract, wms.wms_getcapabilities, wms.wms_version ";
- $sql .= "FROM wms, gui_wms ";
- $sql .= "WHERE wms.wms_id = gui_wms.fkey_wms_id AND gui_wms.fkey_gui_id IN (";
- $v = array();
- $t = array();
-
- for ($i = 0; $i < count($guiIdArray); $i++) {
- if ($i > 0) {
- $sql .= ",";
- }
- $sql .= "$" . strval($i + 1);
- array_push($v, $guiIdArray[$i]);
- array_push($t, "s");
- }
- $sql .= ") ORDER BY wms_title";
-
- $res = db_prep_query($sql,$v,$t);
-
- while ($row = db_fetch_array($res)) {
- $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
- array_push($resultObj["wms"], $resultArray);
- }
-}
-else if ($command == "getWMSByGroup") {
- $resultObj["wms"] = array();
-
- $sql = "SELECT DISTINCT wms_id, wms_title, wms_abstract, wms_getcapabilities, wms_version ";
- $sql .= "FROM wms, gui_wms, gui_mb_group ";
- $sql .= "WHERE wms.wms_id = gui_wms.fkey_wms_id AND gui_wms.fkey_gui_id = gui_mb_group.fkey_gui_id AND gui_mb_group.fkey_mb_group_id = $1";
- $v = array($groupId);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- while ($row = db_fetch_array($res)) {
- $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
- array_push($resultObj["wms"], $resultArray);
- }
-}
-else if ($command == "getWMSByGUI") {
- $resultObj["wms"] = array();
-
- $sql = "SELECT DISTINCT wms_id, wms_title, wms_abstract, wms_getcapabilities, wms_version ";
- $sql .= "FROM wms, gui_wms WHERE wms.wms_id = gui_wms.fkey_wms_id AND fkey_gui_id = $1";
- $v = array($guiId);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
-
- while ($row = db_fetch_array($res)) {
- $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
- array_push($resultObj["wms"], $resultArray);
- }
-}
-
-$json = new Services_JSON();
-$output = $json->encode($resultObj);
-echo $output;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php (from rev 2138, branches/2.4.5/http/php/mod_addWMSfromfilteredList_server.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_addWMSfromfilteredList_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,139 @@
+<?php
+# $Id: mod_addWMSfromfilteredList.php 830 2006-11-20 13:39:10Z christoph $
+# http://www.mapbender.org/index.php/mod_addWMSfromfilteredList.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../extensions/JSON.php");
+
+$userId = $_SESSION["mb_user_id"];
+$command = $_GET["command"];
+$guiId = $_GET["guiId"];
+$groupId = $_GET["groupId"];
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$admin = new administration();
+$guiIdArray = $admin->getGuisByPermission($userId, false);
+
+$resultObj = array();
+
+if ($command == "getGroups") {
+ $resultObj["group"] = array();
+
+ $sql = "SELECT mb_group_id, mb_group_name, mb_group_description ";
+ $sql .= "FROM mb_group, mb_user_mb_group ";
+ $sql .= "WHERE fkey_mb_group_id = mb_group_id AND fkey_mb_user_id = $1 ";
+ $sql .= "ORDER BY mb_group_name";
+ $v = array($userId);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ while($row = db_fetch_array($res)){
+ $resultArray = array("description" => $row["mb_group_description"], "name" => $row["mb_group_name"], "id" => $row["mb_group_id"]);
+ array_push($resultObj["group"], $resultArray);
+ }
+}
+else if ($command == "getGUIs") {
+
+ $resultObj["gui"] = array();
+
+ $sql = "SELECT * FROM gui WHERE gui_id IN (";
+ $v = array();
+ $t = array();
+
+ for ($i = 0; $i < count($guiIdArray); $i++) {
+ if ($i > 0) {
+ $sql .= ",";
+ }
+ $sql .= "$" . strval($i + 1);
+ array_push($v, $guiIdArray[$i]);
+ array_push($t, "s");
+ }
+ $sql .= ") ORDER BY gui_name";
+
+ $res = db_prep_query($sql,$v,$t);
+
+ while ($row = db_fetch_array($res)) {
+ $resultArray = array("description" => $row["gui_description"], "name" => $row["gui_name"], "id" => $row["gui_id"]);
+ array_push($resultObj["gui"], $resultArray);
+ }
+}
+else if ($command == "getAllWMS") {
+ $resultObj["wms"] = array();
+
+ $sql = "SELECT DISTINCT wms.wms_id, wms.wms_title, wms.wms_abstract, wms.wms_getcapabilities, wms.wms_version ";
+ $sql .= "FROM wms, gui_wms ";
+ $sql .= "WHERE wms.wms_id = gui_wms.fkey_wms_id AND gui_wms.fkey_gui_id IN (";
+ $v = array();
+ $t = array();
+
+ for ($i = 0; $i < count($guiIdArray); $i++) {
+ if ($i > 0) {
+ $sql .= ",";
+ }
+ $sql .= "$" . strval($i + 1);
+ array_push($v, $guiIdArray[$i]);
+ array_push($t, "s");
+ }
+ $sql .= ") ORDER BY wms_title";
+
+ $res = db_prep_query($sql,$v,$t);
+
+ while ($row = db_fetch_array($res)) {
+ $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
+ array_push($resultObj["wms"], $resultArray);
+ }
+}
+else if ($command == "getWMSByGroup") {
+ $resultObj["wms"] = array();
+
+ $sql = "SELECT DISTINCT wms_id, wms_title, wms_abstract, wms_getcapabilities, wms_version ";
+ $sql .= "FROM wms, gui_wms, gui_mb_group ";
+ $sql .= "WHERE wms.wms_id = gui_wms.fkey_wms_id AND gui_wms.fkey_gui_id = gui_mb_group.fkey_gui_id AND gui_mb_group.fkey_mb_group_id = $1";
+ $v = array($groupId);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ while ($row = db_fetch_array($res)) {
+ $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
+ array_push($resultObj["wms"], $resultArray);
+ }
+}
+else if ($command == "getWMSByGUI") {
+ $resultObj["wms"] = array();
+
+ $sql = "SELECT DISTINCT wms_id, wms_title, wms_abstract, wms_getcapabilities, wms_version ";
+ $sql .= "FROM wms, gui_wms WHERE wms.wms_id = gui_wms.fkey_wms_id AND fkey_gui_id = $1";
+ $v = array($guiId);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+
+ while ($row = db_fetch_array($res)) {
+ $resultArray = array("id" => $row["wms_id"], "title" => $row["wms_title"], "abstract" => $row["wms_abstract"], "getCapabilitiesUrl" => $row["wms_getcapabilities"], "version" => $row["wms_version"]);
+ array_push($resultObj["wms"], $resultArray);
+ }
+}
+
+$json = new Services_JSON();
+$output = $json->encode($resultObj);
+echo $output;
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php
===================================================================
--- branches/2.4.5/http/php/mod_addWmsFromFeatureInfo.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,75 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/addWMSFromFeatureInfo.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-
-$e_id_css = 'addWmsFromFeatureInfo';
-include(dirname(__FILE__).'/../include/dyn_js.php');
-
-$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2 ";
-$v = array($e_id_css,$gui_id);
-$t = array('s','s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_src = $row["e_src"];
- $e_target = explode(",",$row["e_target"]);
- $cnt++;
-}
-if($cnt > 1){ echo "alert('digitize_button: ID not unique!');";}
-echo "var mod_target = '".$e_target[0]."';";
-?>
-function addWmsFromFeatureInfo(pointer_name, version) {
- mb_registerloadWmsSubFunctions("addWmsFromInfo_pos()");
- var mywms = pointer_name;
- if(mywms.indexOf("?") > -1){pointer_name += "&";}
- if(mywms.indexOf("?") == -1){pointer_name += "?";}
- if (version == '1.0.0'){
- var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
- var load = cap;
- }
- else if (version == '1.1.0'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
- var load = cap;
- }
- else if (version == '1.1.1'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
- var load = cap;
- }
- if(load){
- //if the mapfile WMS ONLINE RESOURCE is set relative, without any host
- if(load.charAt(0) == '/' && load.charAt(1) == 'c') {
- mod_addWMS_load('http://localhost' + load);
- }
- else{
- mod_addWMS_load(load);
- }
- }
-}
-function addWmsFromInfo_pos(){
- if (mod_addWmsFromFeatureInfo_position > 0 && mod_addWmsFromFeatureInfo_position < mb_mapObj[getMapObjIndexByName(mod_target)].wms.length-1) {
- mb_wmsMoveByIndex(getMapObjIndexByName(mod_target), mb_mapObj[getMapObjIndexByName(mod_target)].wms.length-1, mod_addWmsFromFeatureInfo_position-1);
- }
- mb_removeFunctionFromArray("mb_loadWmsSubFunctions", "addWmsFromInfo_pos()");
-}
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php (from rev 2138, branches/2.4.5/http/php/mod_addWmsFromFeatureInfo.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_addWmsFromFeatureInfo.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,74 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/addWMSFromFeatureInfo.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+
+$e_id_css = 'addWmsFromFeatureInfo';
+include(dirname(__FILE__).'/../include/dyn_js.php');
+
+$sql = "SELECT e_src, e_target FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2 ";
+$v = array($e_id_css,$gui_id);
+$t = array('s','s');
+$res = db_prep_query($sql,$v,$t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_src = $row["e_src"];
+ $e_target = explode(",",$row["e_target"]);
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('digitize_button: ID not unique!');";}
+echo "var mod_target = '".$e_target[0]."';";
+?>
+function addWmsFromFeatureInfo(pointer_name, version) {
+ mb_registerloadWmsSubFunctions("addWmsFromInfo_pos()");
+ var mywms = pointer_name;
+ if(mywms.indexOf("?") > -1){pointer_name += "&";}
+ if(mywms.indexOf("?") == -1){pointer_name += "?";}
+ if (version == '1.0.0'){
+ var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
+ var load = cap;
+ }
+ else if (version == '1.1.0'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
+ var load = cap;
+ }
+ else if (version == '1.1.1'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+ var load = cap;
+ }
+ if(load){
+ //if the mapfile WMS ONLINE RESOURCE is set relative, without any host
+ if(load.charAt(0) == '/' && load.charAt(1) == 'c') {
+ mod_addWMS_load('http://localhost' + load);
+ }
+ else{
+ mod_addWMS_load(load);
+ }
+ }
+}
+function addWmsFromInfo_pos(){
+ if (mod_addWmsFromFeatureInfo_position > 0 && mod_addWmsFromFeatureInfo_position < mb_mapObj[getMapObjIndexByName(mod_target)].wms.length-1) {
+ mb_wmsMoveByIndex(getMapObjIndexByName(mod_target), mb_mapObj[getMapObjIndexByName(mod_target)].wms.length-1, mod_addWmsFromFeatureInfo_position-1);
+ }
+ mb_removeFunctionFromArray("mb_loadWmsSubFunctions", "addWmsFromInfo_pos()");
+}
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_changeEPSG.php
===================================================================
--- branches/2.4.5/http/php/mod_changeEPSG.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_changeEPSG.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,215 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_changeEPSG.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require(dirname(__FILE__)."/mb_validateSession.php");
-$gui_id = $_SESSION["mb_user_gui"];
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Change Spatial Reference System EPSG Code</title>
-<?php
-$e_id_css = 'changeEPSG';
-echo "<script type='text/javascript'>";
-include(dirname(__FILE__)."/../include/dyn_js.php");
-echo "</script>";
-
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'changeEPSG' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-
-echo "<script type='text/javascript'>";
-echo "var myTarget = '".db_result($res,0,"e_target")."';";
-echo "</script>";
-
-# transform coordinates
-if(isset($_REQUEST["srs"])){
- require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
- $arraymapObj = split("###", $_REQUEST["srs"]);
- echo "<script type='text/javascript'>";
- echo "var newExtent = new Array();";
- for($i=0; $i < count($arraymapObj); $i++){
- $temp = split(",",$arraymapObj[$i]);
-
- // check if parameters are valid geometries to
- // avoid SQL injections
-
- $oldEPSG = preg_replace("/EPSG:/","",$temp[1]);
- $newEPSG = preg_replace("/EPSG:/","",$_REQUEST["newSRS"]);
-
- if (is_numeric($temp[2]) && is_numeric($temp[3]) && is_numeric($temp[4]) && is_numeric($temp[5]) && is_numeric($oldEPSG) && is_numeric($newEPSG)) {
-
- if(SYS_DBTYPE=='pgsql'){
- $con = db_connect($DBSERVER,$OWNER,$PW);
- $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as minx";
- $resMinx = db_query($sqlMinx);
- $minx = db_result($resMinx,0,"minx");
-
- $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as miny";
- $resMiny = db_query($sqlMiny);
- $miny = db_result($resMiny,0,"miny");
-
- $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxx";
- $resMaxx = db_query($sqlMaxx);
- $maxx = db_result($resMaxx,0,"maxx");
-
- $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxy";
- $resMaxy = db_query($sqlMaxy);
- $maxy = db_result($resMaxy,0,"maxy");
- }else{
- $con_string = "host=$GEOS_DBSERVER port=$GEOS_PORT dbname=$GEOS_DB user=$GEOS_OWNER password=$GEOS_PW";
- $con = pg_connect($con_string) or die ("Error while connecting database");
-
- $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as minx";
- $resMinx = pg_query($con,$sqlMinx);
- $minx = pg_fetch_result($resMinx,0,"minx");
-
- $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as miny";
- $resMiny = pg_query($con,$sqlMiny);
- $miny = pg_fetch_result($resMiny,0,"miny");
-
- $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxx";
- $resMaxx = pg_query($con,$sqlMaxx);
- $maxx = pg_fetch_result($resMaxx,0,"maxx");
-
- $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxy";
- $resMaxy = pg_query($con,$sqlMaxy);
- $maxy = pg_fetch_result($resMaxy,0,"maxy");
- }
- $extenty = $maxy - $miny;
- $extentx = $maxx - $minx;
- $relation_px_x = $temp[6] / $temp[7];
- $relation_px_y = $temp[7] / $temp[6];
- $relation_bbox_x = $extentx / $extenty;
-
- if($relation_bbox_x <= $relation_px_x){
- $centerx = $minx + ($extentx/2);
- $minx = $centerx - $relation_px_x * $extenty / 2;
- $maxx = $centerx + $relation_px_x * $extenty / 2;
- }
- if($relation_bbox_x > $relation_px_x){
- $centery = $miny + ($extenty/2);
- $miny = $centery - $relation_px_y * $extentx / 2;
- $maxy = $centery + $relation_px_y * $extentx / 2;
- }
- echo "newExtent[".$i."] = '".$temp[0].",".$_REQUEST["newSRS"].",".$minx.",".$miny.",".$maxx.",".$maxy."';";
- }
- else {
- echo "var e = new parent.Mb_exception('mod_changeEPSG.php: invalid input parameter (p1 = (" . $temp[2] . "," . $temp[3] . "), p2 = (" . $temp[4] . "," . $temp[5] . "), old EPSG: " . $oldEPSG . ", new EPSG: " . $newEPSG . ", ).');";
- }
- }
- echo "</script>";
-}
-else{
- echo "<script type='text/javascript'>var newExtent = false;</script>";
-}
-?>
-<script type='text/javascript'>
-<!--
-if(newExtent == false){
- parent.mb_registerSubFunctions("window.frames['changeEPSG'].mod_changeEPSG_setBox()");
-}
-
-function mod_changeEPSG_init(){
-//frameName, EPSG, minx, miny, maxx, maxy, width, height
- var exists = false;
- if(newExtent){
- for(var i=0; i<newExtent.length; i++){
- var temp = newExtent[i].split(",");
- if(temp[0] == myTarget){
- for(var ii=0; ii<parent.mb_MapHistoryObj[temp[0]].length; ii++){
- if(parent.mb_MapHistoryObj[temp[0]][ii].epsg == temp[1]){
- exists = ii;
- var goback = true;
- }
- }
- var ind = parent.getMapObjIndexByName(temp[0]);
- if(goback){
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parent.mb_MapHistoryObj[temp[0]][exists].extent;
- parent.setMapRequest(temp[0]);
- }
- else{
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
- parent.setMapRequest(temp[0]);
- }
- }
- if(temp[0] != myTarget){
- var ind = parent.getMapObjIndexByName(temp[0]);
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
- parent.setMapRequest(temp[0]);
- }
- }
- }
-}
-
-function mod_changeEPSG_setBox(){
- var myEPSG = parent.mb_mapObj[0].epsg;
- for(var i=0; i<document.forms[0].epsg.length; i++){
- if(document.forms[0].epsg.options[i].value == myEPSG){
- document.forms[0].epsg.selectedIndex = i;
- isEPSG = true;
- }
- }
-}
-
-function mod_changeEPSG(){
- str_srs = "";
- for(var i=0; i<parent.mb_mapObj.length; i++){
- if(i>0){str_srs += "###";}
- str_srs += parent.mb_mapObj[i].frameName + "," + parent.mb_mapObj[i].epsg + "," + parent.mb_mapObj[i].extent + ","+parent.mb_mapObj[i].width+","+parent.mb_mapObj[i].height;
- }
- document.forms[0].srs.value = str_srs;
- var ind = document.forms[0].epsg.selectedIndex;
- document.forms[0].newSRS.value = document.forms[0].epsg.options[ind].value;
- document.forms[0].submit();
-}
-// -->
-</script>
-</head>
-<body leftmargin="1" topmargin="1" onload="mod_changeEPSG_init()" bgcolor="red">
-<form action="<?php echo $PHP_SELF .'?'.SID ?>" method='POST'>
-<select class='epsg' name='epsg' onchange='mod_changeEPSG()'>
-<option value="">undefined</option>
-<option value="EPSG:4326">EPSG:4326</option>
-<option value="EPSG:31466">EPSG:31466</option>
-<option value="EPSG:31467">EPSG:31467</option>
-<option value="EPSG:31468">EPSG:31468</option>
-<option value="EPSG:31469">EPSG:31469</option>
-</select>
-<input type="hidden" name="srs" value="">
-<input type="hidden" name="newSRS" value="">
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_changeEPSG.php (from rev 2138, branches/2.4.5/http/php/mod_changeEPSG.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_changeEPSG.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_changeEPSG.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,217 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_changeEPSG.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require(dirname(__FILE__)."/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Change Spatial Reference System EPSG Code</title>
+<?php
+$e_id_css = 'changeEPSG';
+echo "<script type='text/javascript'>";
+include(dirname(__FILE__)."/../include/dyn_js.php");
+echo "</script>";
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'changeEPSG' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+
+echo "<script type='text/javascript'>";
+echo "var myTarget = '".db_result($res,0,"e_target")."';";
+echo "</script>";
+
+# transform coordinates
+if(isset($_REQUEST["srs"])){
+ require_once(dirname(__FILE__) . "/../../conf/mapbender.conf");
+ $arraymapObj = split("###", $_REQUEST["srs"]);
+ echo "<script type='text/javascript'>";
+ echo "var newExtent = new Array();";
+ for($i=0; $i < count($arraymapObj); $i++){
+ $temp = split(",",$arraymapObj[$i]);
+
+ // check if parameters are valid geometries to
+ // avoid SQL injections
+
+ $oldEPSG = preg_replace("/EPSG:/","",$temp[1]);
+ $newEPSG = preg_replace("/EPSG:/","",$_REQUEST["newSRS"]);
+
+ if (is_numeric($temp[2]) && is_numeric($temp[3]) && is_numeric($temp[4]) && is_numeric($temp[5]) && is_numeric($oldEPSG) && is_numeric($newEPSG)) {
+
+ if(SYS_DBTYPE=='pgsql'){
+ $con = db_connect($DBSERVER,$OWNER,$PW);
+ $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as minx";
+ $resMinx = db_query($sqlMinx);
+ $minx = db_result($resMinx,0,"minx");
+
+ $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as miny";
+ $resMiny = db_query($sqlMiny);
+ $miny = db_result($resMiny,0,"miny");
+
+ $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxx";
+ $resMaxx = db_query($sqlMaxx);
+ $maxx = db_result($resMaxx,0,"maxx");
+
+ $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxy";
+ $resMaxy = db_query($sqlMaxy);
+ $maxy = db_result($resMaxy,0,"maxy");
+ }else{
+ $con_string = "host=$GEOS_DBSERVER port=$GEOS_PORT dbname=$GEOS_DB user=$GEOS_OWNER password=$GEOS_PW";
+ $con = pg_connect($con_string) or die ("Error while connecting database");
+
+ $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as minx";
+ $resMinx = pg_query($con,$sqlMinx);
+ $minx = pg_fetch_result($resMinx,0,"minx");
+
+ $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".$oldEPSG."),".$newEPSG.")) as miny";
+ $resMiny = pg_query($con,$sqlMiny);
+ $miny = pg_fetch_result($resMiny,0,"miny");
+
+ $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxx";
+ $resMaxx = pg_query($con,$sqlMaxx);
+ $maxx = pg_fetch_result($resMaxx,0,"maxx");
+
+ $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".$oldEPSG."),".$newEPSG.")) as maxy";
+ $resMaxy = pg_query($con,$sqlMaxy);
+ $maxy = pg_fetch_result($resMaxy,0,"maxy");
+ }
+ $extenty = $maxy - $miny;
+ $extentx = $maxx - $minx;
+ $relation_px_x = $temp[6] / $temp[7];
+ $relation_px_y = $temp[7] / $temp[6];
+ $relation_bbox_x = $extentx / $extenty;
+
+ if($relation_bbox_x <= $relation_px_x){
+ $centerx = $minx + ($extentx/2);
+ $minx = $centerx - $relation_px_x * $extenty / 2;
+ $maxx = $centerx + $relation_px_x * $extenty / 2;
+ }
+ if($relation_bbox_x > $relation_px_x){
+ $centery = $miny + ($extenty/2);
+ $miny = $centery - $relation_px_y * $extentx / 2;
+ $maxy = $centery + $relation_px_y * $extentx / 2;
+ }
+ echo "newExtent[".$i."] = '".$temp[0].",".$_REQUEST["newSRS"].",".$minx.",".$miny.",".$maxx.",".$maxy."';";
+ }
+ else {
+ echo "var e = new parent.Mb_exception('mod_changeEPSG.php: invalid input parameter (p1 = (" . $temp[2] . "," . $temp[3] . "), p2 = (" . $temp[4] . "," . $temp[5] . "), old EPSG: " . $oldEPSG . ", new EPSG: " . $newEPSG . ", ).');";
+ }
+ }
+ echo "</script>";
+}
+else{
+ echo "<script type='text/javascript'>var newExtent = false;</script>";
+}
+?>
+<script type='text/javascript'>
+<!--
+if(newExtent == false){
+ parent.mb_registerSubFunctions("window.frames['changeEPSG'].mod_changeEPSG_setBox()");
+}
+
+function mod_changeEPSG_init(){
+//frameName, EPSG, minx, miny, maxx, maxy, width, height
+ var exists = false;
+ if(newExtent){
+ for(var i=0; i<newExtent.length; i++){
+ var temp = newExtent[i].split(",");
+ if(temp[0] == myTarget){
+ for(var ii=0; ii<parent.mb_MapHistoryObj[temp[0]].length; ii++){
+ if(parent.mb_MapHistoryObj[temp[0]][ii].epsg == temp[1]){
+ exists = ii;
+ var goback = true;
+ }
+ }
+ var ind = parent.getMapObjIndexByName(temp[0]);
+ if(goback){
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parent.mb_MapHistoryObj[temp[0]][exists].extent;
+ parent.setMapRequest(temp[0]);
+ }
+ else{
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
+ parent.setMapRequest(temp[0]);
+ }
+ }
+ if(temp[0] != myTarget){
+ var ind = parent.getMapObjIndexByName(temp[0]);
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
+ parent.setMapRequest(temp[0]);
+ }
+ }
+ }
+}
+
+function mod_changeEPSG_setBox(){
+ var myEPSG = parent.mb_mapObj[0].epsg;
+ for(var i=0; i<document.forms[0].epsg.length; i++){
+ if(document.forms[0].epsg.options[i].value == myEPSG){
+ document.forms[0].epsg.selectedIndex = i;
+ isEPSG = true;
+ }
+ }
+}
+
+function mod_changeEPSG(){
+ str_srs = "";
+ for(var i=0; i<parent.mb_mapObj.length; i++){
+ if(i>0){str_srs += "###";}
+ str_srs += parent.mb_mapObj[i].frameName + "," + parent.mb_mapObj[i].epsg + "," + parent.mb_mapObj[i].extent + ","+parent.mb_mapObj[i].width+","+parent.mb_mapObj[i].height;
+ }
+ document.forms[0].srs.value = str_srs;
+ var ind = document.forms[0].epsg.selectedIndex;
+ document.forms[0].newSRS.value = document.forms[0].epsg.options[ind].value;
+ document.forms[0].submit();
+}
+// -->
+</script>
+</head>
+<body leftmargin="1" topmargin="1" onload="mod_changeEPSG_init()" bgcolor="red">
+<form action="<?php echo $self; ?>" method='POST'>
+<select class='epsg' name='epsg' onchange='mod_changeEPSG()'>
+<option value="">undefined</option>
+<option value="EPSG:4326">EPSG:4326</option>
+<option value="EPSG:31466">EPSG:31466</option>
+<option value="EPSG:31467">EPSG:31467</option>
+<option value="EPSG:31468">EPSG:31468</option>
+<option value="EPSG:31469">EPSG:31469</option>
+</select>
+<input type="hidden" name="srs" value="">
+<input type="hidden" name="newSRS" value="">
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php
===================================================================
--- branches/2.4.5/http/php/mod_changeEPSG_dynamic.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,248 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_changeEPSG_dynamic.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require(dirname(__FILE__)."/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein, T. Wirkus">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>changeEPSG_dynamic</title>
-<style type="text/css">
-<!--
-
-.epsg{
- width:100px;
- border: solid;
-}
--->
-</style>
-<?php
-$gui_id = $_SESSION["mb_user_gui"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'changeEPSG' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt_gui_wms = 0;
-$cnt_epsg_wms = 0;
-$cnt_layer_wms = 0;
-
-/*get allocated wms from allocated gui ***********************************************************/
-$sql_gui_wms = "SELECT fkey_wms_id FROM gui_wms WHERE fkey_gui_id = $1 ORDER BY fkey_wms_id";
-$v = array($gui_id);
-$t = array('s');
-$res_gui_wms = db_prep_query($sql_gui_wms,$v,$t);
-while(db_fetch_row($res_gui_wms)){
- $fkey_gui_id[$cnt_gui_wms] = db_result($res_gui_wms,$cnt_gui_wms,"fkey_gui_id");
- $fkey_wms_id_1[$cnt_gui_wms] = db_result($res_gui_wms,$cnt_gui_wms,"fkey_wms_id");
- $cnt_gui_wms++;
-}
-/*get allocated wms from allocated gui ***********************************************************/
-/*get allocated layer_id from allocated gui ******************************************************/
-$v = array();
-$t = array();
-$sql_layer_wms = "SELECT layer_id FROM layer WHERE fkey_wms_id IN (";
-for($i=0; $i<count($fkey_wms_id_1); $i++){
- if($i>0){ $sql_layer_wms .= ",";}
- $sql_layer_wms .= "$".($i+1);
- array_push($v,$fkey_wms_id_1[$i]);
- array_push($t,'i');
-}
-$sql_layer_wms.= ") ORDER BY layer_id";
-
-$res_layer_wms = db_prep_query($sql_layer_wms,$v,$t);
-while($row = db_fetch_array($res_layer_wms)){
- $layer_id[$cnt_layer_wms] = $row["layer_id"];
- $fkey_wms_id[$cnt_layer_wms] = $row["fkey_wms_id"];
- $cnt_layer_wms++;
-}
-/*get allocated wms from allocated gui ***********************************************************/
-
-/*get allocated epsg-code from allocated wms *****************************************************/
-
-$v = array();
-$t = array();
-$sql_epsg_wms = "SELECT DISTINCT wms_srs FROM wms_srs WHERE fkey_wms_id IN (";
-for($i=0; $i<count($fkey_wms_id_1); $i++){
- if($i>0){ $sql_epsg_wms .= ",";}
- $sql_epsg_wms .= "$".($i+1);
- array_push($v,$fkey_wms_id_1[$i]);
- array_push($t,'i');
-}
-$sql_epsg_wms.= ") ORDER BY wms_srs";
-
-$res_epsg_wms = db_prep_query($sql_epsg_wms,$v,$t);
-while($row = db_fetch_array($res_epsg_wms)){
- $fkey_wms_id_2[$cnt_epsg_wms] = $row["fkey_wms_id"];
- $epsg_code[$cnt_epsg_wms] = $row["wms_srs"];
- $cnt_epsg_wms++; //possible error because increment before echo statement
- echo"$epsg_code[$cnt_epsg_wms]";
-}
-
-echo "<script type='text/javascript'>";
-echo "var myTarget = '".db_result($res,0,"e_target")."';";
-echo "</script>";
-# transform coordinates
-if(isset($_REQUEST["srs"])){
- require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
- $con = pg_connect ($con_string) or die ("Error while connecting database DBname");
-
- $arraymapObj = split("###", $_REQUEST["srs"]);
-
- echo "<script type='text/javascript'>";
- echo "var newExtent = new Array();";
-
- for($i=0; $i < count($arraymapObj); $i++){
- $temp = split(",",$arraymapObj[$i]);
-
- $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as minx";
- $resMinx = @pg_query($con,$sqlMinx);
- $minx = pg_result($resMinx,0,"minx");
-
- $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as miny";
- $resMiny = @pg_query($con,$sqlMiny);
- $miny = pg_result($resMiny,0,"miny");
-
- $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as maxx";
- $resMaxx = @pg_query($con,$sqlMaxx);
- $maxx = pg_result($resMaxx,0,"maxx");
-
- $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as maxy";
- $resMaxy = @pg_query($con,$sqlMaxy);
- $maxy = pg_result($resMaxy,0,"maxy");
-
- $extenty = $maxy - $miny;
- $extentx = $maxx - $minx;
- $relation_px_x = $temp[6] / $temp[7];
- $relation_px_y = $temp[7] / $temp[6];
- $relation_bbox_x = $extentx / $extenty;
-
- if($relation_bbox_x <= $relation_px_x){
- $centerx = $minx + ($extentx/2);
- $minx = $centerx - $relation_px_x * $extenty / 2;
- $maxx = $centerx + $relation_px_x * $extenty / 2;
- }
- if($relation_bbox_x > $relation_px_x){
- $centery = $miny + ($extenty/2);
- $miny = $centery - $relation_px_y * $extentx / 2;
- $maxy = $centery + $relation_px_y * $extentx / 2;
- }
- echo "newExtent[".$i."] = '".$temp[0].",".$_REQUEST["newSRS"].",".$minx.",".$miny.",".$maxx.",".$maxy."';";
-
- }
- echo "</script>";
-}
-else{
- echo "<script type='text/javascript'>var newExtent = false;</script>";
-}
-
-?>
-<script type='text/javascript'>
-<!--
-if(newExtent == false){
- parent.mb_registerSubFunctions("window.frames['changeEPSG_dynamic'].mod_changeEPSG_setBox()");
-}
-function mod_changeEPSG_init(){
-//frameName, EPSG, minx, miny, maxx, maxy, width, height
- var exists = false;
- if(newExtent){
- for(var i=0; i<newExtent.length; i++){
- var temp = newExtent[i].split(",");
- if(temp[0] == myTarget){
- for(var ii=0; ii<parent.mb_MapHistoryObj[temp[0]].length; ii++){
- if(parent.mb_MapHistoryObj[temp[0]][ii].epsg == temp[1]){
- exists = ii;
- var goback = true;
- }
- }
- var ind = parent.getMapObjIndexByName(temp[0]);
- if(goback){
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parent.mb_MapHistoryObj[temp[0]][exists].extent;
- parent.setMapRequest(temp[0]);
- }
- else{
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
- parent.setMapRequest(temp[0]);
- }
- }
- if(temp[0] != myTarget){
- var ind = parent.getMapObjIndexByName(temp[0]);
- parent.mb_mapObj[ind].epsg = temp[1];
- parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
- parent.setMapRequest(temp[0]);
- }
- }
- }
-}
-function mod_changeEPSG_setBox(){
- var myEPSG = parent.mb_mapObj[0].epsg;
- for(var i=0; i<document.forms[0].epsg.length; i++){
- if(document.forms[0].epsg.options[i].value == myEPSG){
- document.forms[0].epsg.selectedIndex = i;
- isEPSG = true;
- }
- }
-}
-
-function mod_changeEPSG(){
- str_srs = "";
- for(var i=0; i<parent.mb_mapObj.length; i++){
- if(i>0){str_srs += "###";}
- str_srs += parent.mb_mapObj[i].frameName + "," + parent.mb_mapObj[i].epsg + "," + parent.mb_mapObj[i].extent + ","+parent.mb_mapObj[i].width+","+parent.mb_mapObj[i].height;
- }
- document.forms[0].srs.value = str_srs;
- var ind = document.forms[0].epsg.selectedIndex;
- document.forms[0].newSRS.value = document.forms[0].epsg.options[ind].value;
- document.forms[0].submit();
-}
-// -->
-</script>
-</head>
-<body leftmargin="1" topmargin="1" onload="mod_changeEPSG_init()" bgcolor="#0066cc">
-
-<?php
-/*insert EPSG into selectbox************************************************************************************/
-echo "<form action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<select class='epsg' name='epsg' onChange='mod_changeEPSG()'>";
-for($i=0; $i<$cnt_epsg_wms; $i++){
- echo "<option value='" . $epsg_code[$i] . "' ";
- if($epsg && $epsg == $epsg_code[$i]){
- }
- echo ">" . $epsg_code[$i] . "</option>";
-}
-echo "</select>";
-/*insert EPSG in selectbox************************************************************************************/
-echo"<input type='hidden' name='srs' value=''>";
-echo"<input type='hidden' name='newSRS' value=''>";
-echo"</form>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php (from rev 2138, branches/2.4.5/http/php/mod_changeEPSG_dynamic.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_changeEPSG_dynamic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,248 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_changeEPSG_dynamic.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require(dirname(__FILE__)."/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein, T. Wirkus">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>changeEPSG_dynamic</title>
+<style type="text/css">
+<!--
+
+.epsg{
+ width:100px;
+ border: solid;
+}
+-->
+</style>
+<?php
+$gui_id = $_SESSION["mb_user_gui"];
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'changeEPSG' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$cnt_gui_wms = 0;
+$cnt_epsg_wms = 0;
+$cnt_layer_wms = 0;
+
+/*get allocated wms from allocated gui ***********************************************************/
+$sql_gui_wms = "SELECT fkey_wms_id FROM gui_wms WHERE fkey_gui_id = $1 ORDER BY fkey_wms_id";
+$v = array($gui_id);
+$t = array('s');
+$res_gui_wms = db_prep_query($sql_gui_wms,$v,$t);
+while(db_fetch_row($res_gui_wms)){
+ $fkey_gui_id[$cnt_gui_wms] = db_result($res_gui_wms,$cnt_gui_wms,"fkey_gui_id");
+ $fkey_wms_id_1[$cnt_gui_wms] = db_result($res_gui_wms,$cnt_gui_wms,"fkey_wms_id");
+ $cnt_gui_wms++;
+}
+/*get allocated wms from allocated gui ***********************************************************/
+/*get allocated layer_id from allocated gui ******************************************************/
+$v = array();
+$t = array();
+$sql_layer_wms = "SELECT layer_id FROM layer WHERE fkey_wms_id IN (";
+for($i=0; $i<count($fkey_wms_id_1); $i++){
+ if($i>0){ $sql_layer_wms .= ",";}
+ $sql_layer_wms .= "$".($i+1);
+ array_push($v,$fkey_wms_id_1[$i]);
+ array_push($t,'i');
+}
+$sql_layer_wms.= ") ORDER BY layer_id";
+
+$res_layer_wms = db_prep_query($sql_layer_wms,$v,$t);
+while($row = db_fetch_array($res_layer_wms)){
+ $layer_id[$cnt_layer_wms] = $row["layer_id"];
+ $fkey_wms_id[$cnt_layer_wms] = $row["fkey_wms_id"];
+ $cnt_layer_wms++;
+}
+/*get allocated wms from allocated gui ***********************************************************/
+
+/*get allocated epsg-code from allocated wms *****************************************************/
+
+$v = array();
+$t = array();
+$sql_epsg_wms = "SELECT DISTINCT wms_srs FROM wms_srs WHERE fkey_wms_id IN (";
+for($i=0; $i<count($fkey_wms_id_1); $i++){
+ if($i>0){ $sql_epsg_wms .= ",";}
+ $sql_epsg_wms .= "$".($i+1);
+ array_push($v,$fkey_wms_id_1[$i]);
+ array_push($t,'i');
+}
+$sql_epsg_wms.= ") ORDER BY wms_srs";
+
+$res_epsg_wms = db_prep_query($sql_epsg_wms,$v,$t);
+while($row = db_fetch_array($res_epsg_wms)){
+ $fkey_wms_id_2[$cnt_epsg_wms] = $row["fkey_wms_id"];
+ $epsg_code[$cnt_epsg_wms] = $row["wms_srs"];
+ $cnt_epsg_wms++; //possible error because increment before echo statement
+ echo"$epsg_code[$cnt_epsg_wms]";
+}
+
+echo "<script type='text/javascript'>";
+echo "var myTarget = '".db_result($res,0,"e_target")."';";
+echo "</script>";
+# transform coordinates
+if(isset($_REQUEST["srs"])){
+ require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+ $con = pg_connect ($con_string) or die ("Error while connecting database DBname");
+
+ $arraymapObj = split("###", $_REQUEST["srs"]);
+
+ echo "<script type='text/javascript'>";
+ echo "var newExtent = new Array();";
+
+ for($i=0; $i < count($arraymapObj); $i++){
+ $temp = split(",",$arraymapObj[$i]);
+
+ $sqlMinx = "SELECT X(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as minx";
+ $resMinx = @pg_query($con,$sqlMinx);
+ $minx = pg_result($resMinx,0,"minx");
+
+ $sqlMiny = "SELECT Y(transform(GeometryFromText('POINT(".$temp[2]." ".$temp[3].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as miny";
+ $resMiny = @pg_query($con,$sqlMiny);
+ $miny = pg_result($resMiny,0,"miny");
+
+ $sqlMaxx = "SELECT X(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as maxx";
+ $resMaxx = @pg_query($con,$sqlMaxx);
+ $maxx = pg_result($resMaxx,0,"maxx");
+
+ $sqlMaxy = "SELECT Y(transform(GeometryFromText('POINT(".$temp[4]." ".$temp[5].")',".str_replace("EPSG:","",$temp[1])."),".str_replace("EPSG:","",$_REQUEST["newSRS"]).")) as maxy";
+ $resMaxy = @pg_query($con,$sqlMaxy);
+ $maxy = pg_result($resMaxy,0,"maxy");
+
+ $extenty = $maxy - $miny;
+ $extentx = $maxx - $minx;
+ $relation_px_x = $temp[6] / $temp[7];
+ $relation_px_y = $temp[7] / $temp[6];
+ $relation_bbox_x = $extentx / $extenty;
+
+ if($relation_bbox_x <= $relation_px_x){
+ $centerx = $minx + ($extentx/2);
+ $minx = $centerx - $relation_px_x * $extenty / 2;
+ $maxx = $centerx + $relation_px_x * $extenty / 2;
+ }
+ if($relation_bbox_x > $relation_px_x){
+ $centery = $miny + ($extenty/2);
+ $miny = $centery - $relation_px_y * $extentx / 2;
+ $maxy = $centery + $relation_px_y * $extentx / 2;
+ }
+ echo "newExtent[".$i."] = '".$temp[0].",".$_REQUEST["newSRS"].",".$minx.",".$miny.",".$maxx.",".$maxy."';";
+
+ }
+ echo "</script>";
+}
+else{
+ echo "<script type='text/javascript'>var newExtent = false;</script>";
+}
+
+?>
+<script type='text/javascript'>
+<!--
+if(newExtent == false){
+ parent.mb_registerSubFunctions("window.frames['changeEPSG_dynamic'].mod_changeEPSG_setBox()");
+}
+function mod_changeEPSG_init(){
+//frameName, EPSG, minx, miny, maxx, maxy, width, height
+ var exists = false;
+ if(newExtent){
+ for(var i=0; i<newExtent.length; i++){
+ var temp = newExtent[i].split(",");
+ if(temp[0] == myTarget){
+ for(var ii=0; ii<parent.mb_MapHistoryObj[temp[0]].length; ii++){
+ if(parent.mb_MapHistoryObj[temp[0]][ii].epsg == temp[1]){
+ exists = ii;
+ var goback = true;
+ }
+ }
+ var ind = parent.getMapObjIndexByName(temp[0]);
+ if(goback){
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parent.mb_MapHistoryObj[temp[0]][exists].extent;
+ parent.setMapRequest(temp[0]);
+ }
+ else{
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
+ parent.setMapRequest(temp[0]);
+ }
+ }
+ if(temp[0] != myTarget){
+ var ind = parent.getMapObjIndexByName(temp[0]);
+ parent.mb_mapObj[ind].epsg = temp[1];
+ parent.mb_mapObj[ind].extent = parseFloat(temp[2]) + "," + parseFloat(temp[3]) + "," + parseFloat(temp[4]) + "," + parseFloat(temp[5]);
+ parent.setMapRequest(temp[0]);
+ }
+ }
+ }
+}
+function mod_changeEPSG_setBox(){
+ var myEPSG = parent.mb_mapObj[0].epsg;
+ for(var i=0; i<document.forms[0].epsg.length; i++){
+ if(document.forms[0].epsg.options[i].value == myEPSG){
+ document.forms[0].epsg.selectedIndex = i;
+ isEPSG = true;
+ }
+ }
+}
+
+function mod_changeEPSG(){
+ str_srs = "";
+ for(var i=0; i<parent.mb_mapObj.length; i++){
+ if(i>0){str_srs += "###";}
+ str_srs += parent.mb_mapObj[i].frameName + "," + parent.mb_mapObj[i].epsg + "," + parent.mb_mapObj[i].extent + ","+parent.mb_mapObj[i].width+","+parent.mb_mapObj[i].height;
+ }
+ document.forms[0].srs.value = str_srs;
+ var ind = document.forms[0].epsg.selectedIndex;
+ document.forms[0].newSRS.value = document.forms[0].epsg.options[ind].value;
+ document.forms[0].submit();
+}
+// -->
+</script>
+</head>
+<body leftmargin="1" topmargin="1" onload="mod_changeEPSG_init()" bgcolor="#0066cc">
+
+<?php
+/*insert EPSG into selectbox************************************************************************************/
+echo "<form action='" . $self ."' method='post'>";
+echo "<select class='epsg' name='epsg' onChange='mod_changeEPSG()'>";
+for($i=0; $i<$cnt_epsg_wms; $i++){
+ echo "<option value='" . $epsg_code[$i] . "' ";
+ if($epsg && $epsg == $epsg_code[$i]){
+ }
+ echo ">" . $epsg_code[$i] . "</option>";
+}
+echo "</select>";
+/*insert EPSG in selectbox************************************************************************************/
+echo"<input type='hidden' name='srs' value=''>";
+echo"<input type='hidden' name='newSRS' value=''>";
+echo"</form>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_changePassword.php
===================================================================
--- branches/2.4.5/http/php/mod_changePassword.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_changePassword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,191 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/ChangePassword
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-import_request_variables("PG");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Change Password</title>
-<style type="text/css">
-<!--
-body{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-.desc{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 9px;
-}
-.myButton{
- font-family: Arial, Helvetica, sans-serif;
- width : 150px;
-}
--->
-</style>
-<script language="JavaScript">
-function validate(wert){
- if(wert == 'newpassword'){
- if(document.form1.newpassword.value == ""){
- //alert("Bitte geben Sie ein neues Passwort an.");
- alert("Please enter a new password.");
- document.form1.newpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- if(document.form1.newpassword.value.length < 6 || document.form1.newpassword.value.search(/\d/) == -1 || document.form1.newpassword.value.search(/\D/) == -1 ){
- //alert("Bitte beachten Sie die unten\naufgeführten Passwortregeln!");
- alert("Please note the rules for choosing a password below!");
- document.form1.newpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- var letter = document.form1.newpassword.value.match(/\D/);
- if(eval("document.form1.newpassword.value.match(/" + letter + "/gi).length") > 4){
- //alert("Bitte beachten Sie die unten\naufgeführten Passwortregeln!");
- alert("Please note the rules for choosing a password below!");
- document.form1.newpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- var integer = document.form1.newpassword.value.match(/\d/);
- if(eval("document.form1.newpassword.value.match(/" + integer + "/gi).length") > 4){
- //alert("Bitte beachten Sie die unten\naufgeführten Passwortregeln!");
- alert("Please note the rules for choosing a password below!");
- document.form1.newpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- if(document.form1.confirmpassword.value == ""){
- //alert("Bitte bestätigen Sie das Passwort.");
- alert("Please confirm the password.");
- document.form1.confirmpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- if(document.form1.newpassword.value!=document.form1.confirmpassword.value) {
- //alert("Die Passwörter stimmen nicht überein.");
- alert("The password entries do not match.");
- document.form1.confirmpassword.value='';
- document.form1.confirmpassword.focus();
- document.form1.upd.value='false';
- return false;
- }
- else{
- document.form1.upd.value='true';
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-<?php
-//the database-params
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/* handle INSERT and DELETE */
-if($upd){
- $sql_user_id = "SELECT mb_user_id FROM mb_user WHERE mb_user_id = $1 ";
- $v = array($logged_user_id);
- $t = array('i');
- $res_user_id = db_prep_query($sql_user_id,$v,$t);
- $real_user_id = db_result($res_user_id,0,"mb_user_id");
- $sql_password = "SELECT mb_user_password, mb_user_password = $1 as new FROM mb_user where mb_user_id = $2";
- $v = array($newpassword,$real_user_id);
- $t = array('s','i');
- $res_password = db_prep_query($sql_password,$v,$t);
- if(db_result($res_password,0,"mb_user_password") != db_result($res_password,0,"new")){
- $sql_update = "UPDATE mb_user SET mb_user_password = $1";
- $v = array(md5($newpassword));
- $t = array('s');
- $sql_update .= " WHERE mb_user_id = $2 ";
- array_push($v,$real_user_id);
- array_push($t,'i');
- db_prep_query($sql_update,$v,$t);
- echo "<script language='javascript'>";
- //echo "alert('Passwort wurde geändert!');";
- echo "alert('Password has been updated!');";
- echo "</script>";
- }
- else{
- echo "<script language='javascript'>";
- //echo "alert('Bitte beachten Sie die unten aufgeführten Passwortregeln!');";
- echo "alert('Please note the rules for choosing a password below!');";
- echo "</script>";
- }
-}
-
-/* HTML */
-echo "<fieldset><legend>Change password:</legend>";
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<table cellpadding='5' cellspacing='0' border='0'>";
-echo "<td>";
-echo "new password:";
-echo "</td>";
-echo "<td>";
-echo "<input type='password' name='newpassword' value=''>";
-echo "</td>";
-echo"</tr>";
-echo"<tr>";
-echo "<td>";
-echo "confirm:";
-echo "</td>";
-echo "<td>";
-echo "<input type='password' name='confirmpassword' value=''>";
-echo "</td>";
-echo "</tr>";
-echo"<tr>";
-echo"<td>";
-echo "<input type='hidden' name='profile_id' value='";
-echo "$profile_id";
-echo "'>";
-echo "</td>";
-echo"<td></tr></table>";
-echo "<input type='hidden' name='upd' value=''>";
-echo "<center><input class='myButton' type='button' name='update' value='update' onClick='validate(\"newpassword\")'></center>";
-echo "</form>";
-
-?>
-</fieldset><br />
-
-<div class='desc'>
-Please note: <br />
-<ul>
-<li>the password has to be different from the old one</li>
-<li>the minimum length is six characters</li>
-<li>it must contain a number</li>
-<li>it must not be composed entirely of numbers</li>
-<li>no character may be used more than four times</li>
-</ul>
-</div>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_changePassword.php (from rev 2138, branches/2.4.5/http/php/mod_changePassword.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_changePassword.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_changePassword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,190 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/ChangePassword
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Change Password</title>
+<style type="text/css">
+<!--
+body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+.desc{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9px;
+}
+.myButton{
+ font-family: Arial, Helvetica, sans-serif;
+ width : 150px;
+}
+-->
+</style>
+<script language="JavaScript">
+function validate(wert){
+ if(wert == 'newpassword'){
+ if(document.form1.newpassword.value == ""){
+ //alert("Bitte geben Sie ein neues Passwort an.");
+ alert("Please enter a new password.");
+ document.form1.newpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ if(document.form1.newpassword.value.length < 6 || document.form1.newpassword.value.search(/\d/) == -1 || document.form1.newpassword.value.search(/\D/) == -1 ){
+ //alert("Bitte beachten Sie die unten\naufgef�hrten Passwortregeln!");
+ alert("Please note the rules for choosing a password below!");
+ document.form1.newpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ var letter = document.form1.newpassword.value.match(/\D/);
+ if(eval("document.form1.newpassword.value.match(/" + letter + "/gi).length") > 4){
+ //alert("Bitte beachten Sie die unten\naufgef�hrten Passwortregeln!");
+ alert("Please note the rules for choosing a password below!");
+ document.form1.newpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ var integer = document.form1.newpassword.value.match(/\d/);
+ if(eval("document.form1.newpassword.value.match(/" + integer + "/gi).length") > 4){
+ //alert("Bitte beachten Sie die unten\naufgef�hrten Passwortregeln!");
+ alert("Please note the rules for choosing a password below!");
+ document.form1.newpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ if(document.form1.confirmpassword.value == ""){
+ //alert("Bitte best�tigen Sie das Passwort.");
+ alert("Please confirm the password.");
+ document.form1.confirmpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ if(document.form1.newpassword.value!=document.form1.confirmpassword.value) {
+ //alert("Die Passw�rter stimmen nicht �berein.");
+ alert("The password entries do not match.");
+ document.form1.confirmpassword.value='';
+ document.form1.confirmpassword.focus();
+ document.form1.upd.value='false';
+ return false;
+ }
+ else{
+ document.form1.upd.value='true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+<?php
+//the database-params
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/* handle INSERT and DELETE */
+if($upd){
+ $sql_user_id = "SELECT mb_user_id FROM mb_user WHERE mb_user_id = $1 ";
+ $v = array($logged_user_id);
+ $t = array('i');
+ $res_user_id = db_prep_query($sql_user_id,$v,$t);
+ $real_user_id = db_result($res_user_id,0,"mb_user_id");
+ $sql_password = "SELECT mb_user_password, mb_user_password = $1 as new FROM mb_user where mb_user_id = $2";
+ $v = array($newpassword,$real_user_id);
+ $t = array('s','i');
+ $res_password = db_prep_query($sql_password,$v,$t);
+ if(db_result($res_password,0,"mb_user_password") != db_result($res_password,0,"new")){
+ $sql_update = "UPDATE mb_user SET mb_user_password = $1";
+ $v = array(md5($newpassword));
+ $t = array('s');
+ $sql_update .= " WHERE mb_user_id = $2 ";
+ array_push($v,$real_user_id);
+ array_push($t,'i');
+ db_prep_query($sql_update,$v,$t);
+ echo "<script language='javascript'>";
+ //echo "alert('Passwort wurde ge�ndert!');";
+ echo "alert('Password has been updated!');";
+ echo "</script>";
+ }
+ else{
+ echo "<script language='javascript'>";
+ //echo "alert('Bitte beachten Sie die unten aufgef�hrten Passwortregeln!');";
+ echo "alert('Please note the rules for choosing a password below!');";
+ echo "</script>";
+ }
+}
+
+/* HTML */
+echo "<fieldset><legend>Change password:</legend>";
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table cellpadding='5' cellspacing='0' border='0'>";
+echo "<td>";
+echo "new password:";
+echo "</td>";
+echo "<td>";
+echo "<input type='password' name='newpassword' value=''>";
+echo "</td>";
+echo"</tr>";
+echo"<tr>";
+echo "<td>";
+echo "confirm:";
+echo "</td>";
+echo "<td>";
+echo "<input type='password' name='confirmpassword' value=''>";
+echo "</td>";
+echo "</tr>";
+echo"<tr>";
+echo"<td>";
+echo "<input type='hidden' name='profile_id' value='";
+echo "$profile_id";
+echo "'>";
+echo "</td>";
+echo"<td></tr></table>";
+echo "<input type='hidden' name='upd' value=''>";
+echo "<center><input class='myButton' type='button' name='update' value='update' onClick='validate(\"newpassword\")'></center>";
+echo "</form>";
+
+?>
+</fieldset><br />
+
+<div class='desc'>
+Please note: <br />
+<ul>
+<li>the password has to be different from the old one</li>
+<li>the minimum length is six characters</li>
+<li>it must contain a number</li>
+<li>it must not be composed entirely of numbers</li>
+<li>no character may be used more than four times</li>
+</ul>
+</div>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php
===================================================================
--- branches/2.4.5/http/php/mod_createJSLayerObjFromXML.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,46 +0,0 @@
-<?php
-# $Id: mod_createJSLayerObjFromXML.php 868 2006-11-20 14:30:43Z verena $
-# http://www.mapbender.org/index.php/mod_createJSLayerObjFromXML.php
-# Copyright (C) 2006 WhereGroup
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Load WMS with one layer</title>
-<?php
-echo "<script type='text/javascript'>";
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-$mywms = new wms();
-$mywms->createObjFromXML(html_entity_decode($_REQUEST['caps']));
-if(!$mywms->wms_status){ echo "alert('Error: The Capabilities Document " . html_entity_decode($_REQUEST['caps']) . " could not be accessed. Please check whether the server is responding and accessible to Mapbender.'); </script>"; die; }
-$mywms->createJsLayerObjFromWMS("TRUE", $_REQUEST['layer_name']);
-echo "parent.mod_addWMS_refresh();";
-echo "</script>";
-?>
-</head>
-<body bgcolor='#ffffff'>
-
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php (from rev 2138, branches/2.4.5/http/php/mod_createJSLayerObjFromXML.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_createJSLayerObjFromXML.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,47 @@
+<?php
+# $Id: mod_createJSLayerObjFromXML.php 868 2006-11-20 14:30:43Z verena $
+# http://www.mapbender.org/index.php/mod_createJSLayerObjFromXML.php
+# Copyright (C) 2006 WhereGroup
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require(dirname(__FILE__)."/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Load WMS with one layer</title>
+<?php
+echo "<script type='text/javascript'>";
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+$mywms = new wms();
+$mywms->createObjFromXML(html_entity_decode($_REQUEST['caps']));
+if(!$mywms->wms_status){ echo "alert('Error: The Capabilities Document " . html_entity_decode($_REQUEST['caps']) . " could not be accessed. Please check whether the server is responding and accessible to Mapbender.'); </script>"; die; }
+$mywms->createJsLayerObjFromWMS("TRUE", $_REQUEST['layer_name']);
+echo "parent.mod_addWMS_refresh();";
+echo "</script>";
+?>
+</head>
+<body bgcolor='#ffffff'>
+
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php
===================================================================
--- branches/2.4.5/http/php/mod_createJSObjFromDBByWMS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,63 +0,0 @@
-<?php
-# $Id: mod_createJSObjFromDBByWMS.php 1199 2007-03-07 10:06:22Z christoph $
-# http://www.mapbender.org/index.php/mod_createJSObjectFromDBByWMS.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-
-$wms_id = $_GET["wms_id"];
-$gui_id = $_GET["gui_id"];
-$user_id = $_SESSION["mb_user_id"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
-<title>Load WMS with one layer</title>
-<script language="JavaScript" type="text/javascript">
-<?php
-// check if user is allowed to access this wms
-$admin = new administration();
-if ($admin->getWmsPermission($wms_id, $user_id)) {
- $mywms = new wms();
- $mywms->createObjFromDB($gui_id, $wms_id);
- $mywms->createJsObjFromWMS(true);
- echo "parent.mod_addWMS_refresh();";
-}
-else {
- $e = new mb_exception("You are not allowed to access this WMS (WMS ID " . $wms_id . ").");
-}
-?>
-</script>
-<!--
-<script language="JavaScript" type="text/javascript">
-alert("3/3 mod_createJSObjFromDBByWMS: WMS ID = <?php echo $wms_id;?>, GUI ID = <?php echo $gui_id;?>");
-</script>
--->
-</head>
-<body bgcolor='#ffffff'>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php (from rev 2138, branches/2.4.5/http/php/mod_createJSObjFromDBByWMS.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_createJSObjFromDBByWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,58 @@
+<?php
+# $Id: mod_createJSObjFromDBByWMS.php 1199 2007-03-07 10:06:22Z christoph $
+# http://www.mapbender.org/index.php/mod_createJSObjectFromDBByWMS.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require(dirname(__FILE__)."/mb_validateSession.php");
+
+$wms_id = $_GET["wms_id"];
+$gui_id = $_GET["gui_id"];
+$user_id = $_SESSION["mb_user_id"];
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
+<title>Load WMS with one layer</title>
+<script language="JavaScript" type="text/javascript">
+<?php
+// check if user is allowed to access this wms
+$admin = new administration();
+if ($admin->getWmsPermission($wms_id, $user_id)) {
+ $mywms = new wms();
+ $mywms->createObjFromDB($gui_id, $wms_id);
+ $mywms->createJsObjFromWMS(true);
+ echo "parent.mod_addWMS_refresh();";
+}
+else {
+ $e = new mb_exception("You are not allowed to access this WMS (WMS ID " . $wms_id . ").");
+}
+?>
+</script>
+
+</head>
+<body bgcolor='#ffffff'>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php
===================================================================
--- branches/2.4.5/http/php/mod_createJSObjFromXML.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,52 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_createJSObjFromXML.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-
-$capabilitiesURL = html_entity_decode($_REQUEST['caps']);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Load WMS</title>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
-<script type='text/javascript'>
-<?php
-
-$mywms = new wms();
-$mywms->createObjFromXML($capabilitiesURL);
-
-$errorMessage = "Error: The Capabilities Document could not be accessed. Please check whether the server is responding and accessible to Mapbender.";
-if (!$mywms->wms_status) {
- echo "prompt('" . $errorMessage . "', '" . $capabilitiesURL . "');";
- die;
-}
-$mywms->createJsObjFromWMS(true);
-?>
-
-parent.mod_addWMS_refresh();
-</script>
-</head>
-<body bgcolor='#ffffff'>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php (from rev 2138, branches/2.4.5/http/php/mod_createJSObjFromXML.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_createJSObjFromXML.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,53 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_createJSObjFromXML.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+require(dirname(__FILE__)."/mb_validateSession.php");
+
+$capabilitiesURL = html_entity_decode($_REQUEST['caps']);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Load WMS</title>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset='<?php echo CHARSET;?>'">
+<script type='text/javascript'>
+<?php
+
+$mywms = new wms();
+$mywms->createObjFromXML($capabilitiesURL);
+
+$errorMessage = "Error: The Capabilities Document could not be accessed. Please check whether the server is responding and accessible to Mapbender.";
+if (!$mywms->wms_status) {
+ echo "prompt('" . $errorMessage . "', '" . $capabilitiesURL . "');";
+ die;
+}
+$mywms->createJsObjFromWMS(true);
+?>
+
+parent.mod_addWMS_refresh();
+</script>
+</head>
+<body bgcolor='#ffffff'>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_createUser.php
===================================================================
--- branches/2.4.5/http/php/mod_createUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_createUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,288 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/CreateUser
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-if(PORTAL != true){
- echo "This module is disabled. Please check your mapbender.conf.";
- die;
-}
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../classes/class_gui.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Create New Mapbender User</title>
-<link rel="stylesheet" type="text/css" href="../css/login.css">
-<?php
-$myPW = "**********";
-echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(permission == true){
- if(document.forms[0].password.value == myPW){
- document.forms[0].password.value = '';
- }
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-
-function validateInput(){
- var str_alert = "Input incorrect!";
- if(document.forms[0].name.value == ''){
- var str_alert = "Please enter a name.";
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- if(document.forms[0].password.value == ''){
- var str_alert = "Please enter a password.";
- alert(str_alert);
- document.forms[0].password.focus();
- return 'false';
- }
- else if(document.forms[0].password.value != document.forms[0].v_password.value){
- alert("Password verification failed. Please enter the same password twice.");
- document.forms[0].password.focus();
- return 'false';
- }
- return 'true';
-}
-</script>
-</head>
-<body>
-
-<?php
-#save
-if($action == 'save'){
- $owner_id =1;
- $resolution = 72;
- $login_count = 0;
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
-
- $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, ";
- $sql .= "mb_user_description, mb_user_email, mb_user_phone, mb_user_department, ";
- $sql .= "mb_user_resolution) VALUES ";
- $sql.= "($1, $2, $3, $4, $5, $6, $7, $8)";
- $v = array($name,md5($password),$owner_id,$description,$email,$phone,$department,$resolution);
- $t = array('s','s','i','s','s','s','s','i');
- $res = db_prep_query($sql,$v,$t);
-
- $selected_user = db_insert_id('platzhalter','mb_user','mb_user_id');
- $sql_owner = "Update mb_user SET mb_user_owner = $1 ";
- $sql_owner.= " WHERE mb_user_name = $2 ";
- $v = array(1,$name); #$selected_user;
- $t = array('i','s');
- $res_owner = db_prep_query($sql_owner,$v,$t);
- # removed, because a new user may be inserted in a group with too many privileges
- $sql_group = "Insert INTO mb_user_mb_group (fkey_mb_user_id, fkey_mb_group_id) VALUES ";
- $sql_group.= "($1, $2) ";
- $v = array($selected_user,20);
- $t = array('i','i');
- $res_group = db_prep_query($sql_group,$v,$t);
- // CB (begin)
- // adding new GUIs for new user (copies of gui and gui1 with owner rights)
- $gui = new gui();
- $admin = new administration();
- //create new name for gui
- $gui_id1 = $admin->getGuiIdByGuiName("gui");
- $gui_id2 = $admin->getGuiIdByGuiName("gui1");
- $gui_id3 = $admin->getGuiIdByGuiName("gui2");
- $gui_id4 = $admin->getGuiIdByGuiName("gui_digitize");
- $gui_newName1 = $name . "_gui";
- $gui_newName2 = $name . "_gui1";
- $gui_newName3 = $name . "_gui2";
- $gui_newName4 = $name . "_gui_digitize";
- //check if new gui names are already taken
- while ($gui->guiExists($gui_newName1)) {
- $gui_newName1 .= "_1";
- }
- while ($gui->guiExists($gui_newName2)) {
- $gui_newName2 .= "_1";
- }
- while ($gui->guiExists($gui_newName3)) {
- $gui_newName3 .= "_1";
- }
- while ($gui->guiExists($gui_newName4)) {
- $gui_newName4 .= "_1";
- }
- //create gui_(name) and gui1_(name)
- $gui->copyGui($gui_id1[0], $gui_newName1,true);
- $gui->copyGui($gui_id2[0], $gui_newName2,true);
- $gui->copyGui($gui_id3[0], $gui_newName3,true);
- $gui->copyGui($gui_id4[0], $gui_newName4,true);
- $new_guiId1 = $admin->getGuiIdByGuiName($gui_newName1);
- $new_guiId2 = $admin->getGuiIdByGuiName($gui_newName2);
- $new_guiId3 = $admin->getGuiIdByGuiName($gui_newName3);
- $new_guiId4 = $admin->getGuiIdByGuiName($gui_newName4);
- //grant owner rights for new guis to this user only!
- $admin->delAllUsersOfGui($new_guiId1[0]);
- $admin->delAllUsersOfGui($new_guiId2[0]);
- $admin->delAllUsersOfGui($new_guiId3[0]);
- $admin->delAllUsersOfGui($new_guiId4[0]);
- $admin->insertUserAsGuiOwner($new_guiId1[0], $selected_user);
- $admin->insertUserAsGuiOwner($new_guiId2[0], $selected_user);
- $admin->insertUserAsGuiOwner($new_guiId3[0], $selected_user);
- $admin->insertUserAsGuiOwner($new_guiId4[0], $selected_user);
- // delete gui from groups
- // (gui and gui1 are associated with groups 20 and 21, new guis belong to mb_user only)
- $sql_del_from_group = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 OR fkey_gui_id = $2 OR fkey_gui_id = $3 OR fkey_gui_id = $4";
- $v = array($new_guiId1[0],$new_guiId2[0],$new_guiId3[0],$new_guiId4[0]);
- $t = array('s','s','s','s');
- $res_del_from_group = db_prep_query($sql_del_from_group,$v,$t);
- }
-}
-
-if (!isset($name) || $selected_user == 'new'){
- $name = "";
- $password = "";
- $description = "";
- $email = "";
- $phone = "";
- $department = "";
-}
-
-/* HTML */
-echo "<form name='form1' action='" . $PHP_SELF . "' method='post'>";
-echo "<table border='0'>";
-
-if(isset($selected_user) && $selected_user != 0){
- $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- $name = db_result($res,0,"mb_user_name");
- $password = db_result($res,0,"mb_user_password");
- $owner_id = db_result($res,0,"mb_user_owner");
- $description = db_result($res,0,"mb_user_description");
- $login_count = db_result($res,0,"mb_user_login_count");
- $email = db_result($res,0,"mb_user_email");
- $phone = db_result($res,0,"mb_user_phone");
- $department = db_result($res,0,"mb_user_department");
- $resolution = db_result($res,0,"mb_user_resolution");
- }
- $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1 ";
- $v = array($owner_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- $owner_name = db_result($res,0,"mb_user_name");
- }
-}
-#name
-echo "<tr>";
- echo "<td>Name*:</td>";
- echo "<td>";
- echo "<input type='text' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#password
-echo "<tr>";
- echo "<td>Password*: </td>";
- echo "<td>";
- echo "<input type='password' name='password' value='";
- if(isset($selected_user) && $selected_user != 'new'){
- echo $myPW;
- }
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-#password
-echo "<tr>";
- echo "<td>Confirm password*: </td>";
- echo "<td>";
- echo "<input type='password' name='v_password' value='";
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-#email
-echo "<tr>";
- echo "<td>Email <A HREF='http://wms1.ccgis.de/ewiki/index.php?id=CreateUser' target='_blank'><b>(Why?): </b></A><BR></td>";
- echo "<td>";
- echo "<input type='text' name='email' value='".$email."'>";
- echo "</td>";
-echo "</tr>";
-
-#phone
-echo "<tr>";
- echo "<td>Phone: </td>";
- echo "<td>";
- echo "<input type='text' name='phone' value='".$phone."'>";
- echo "</td>";
-echo "</tr>";
-
-#department
-echo "<tr>";
- echo "<td>Department: </td>";
- echo "<td>";
- echo "<input type='text' name='department' value='".$department."'>";
- echo "</td>";
-echo "</tr>";
-
-echo "<tr>";
- echo "<td></td>";
- echo "<td>";
-if($selected_user == 'new' || !isset($selected_user)){
- echo "<input type='button' class='myButton' value='save' onclick='validate(\"save\")'>";
-}
- echo "</td>";
-echo "</tr>";
-echo"</table>";
-?>
-<input type='hidden' name='action' value=''>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_createUser.php (from rev 2219, branches/2.4.5/http/php/mod_createUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_createUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_createUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,287 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/CreateUser
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+if(PORTAL != true){
+ echo "This module is disabled. Please check your mapbender.conf.";
+ die;
+}
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+require_once(dirname(__FILE__)."/../classes/class_gui.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Create New Mapbender User</title>
+<link rel="stylesheet" type="text/css" href="../css/login.css">
+<?php
+$myPW = "**********";
+echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(permission == true){
+ if(document.forms[0].password.value == myPW){
+ document.forms[0].password.value = '';
+ }
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+
+function validateInput(){
+ var str_alert = "Input incorrect!";
+ if(document.forms[0].name.value == ''){
+ var str_alert = "Please enter a name.";
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ if(document.forms[0].password.value == ''){
+ var str_alert = "Please enter a password.";
+ alert(str_alert);
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ else if(document.forms[0].password.value != document.forms[0].v_password.value){
+ alert("Password verification failed. Please enter the same password twice.");
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ return 'true';
+}
+</script>
+</head>
+<body>
+
+<?php
+#save
+if($action == 'save'){
+ $owner_id =1;
+ $resolution = 72;
+ $login_count = 0;
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+
+ $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, ";
+ $sql .= "mb_user_description, mb_user_email, mb_user_phone, mb_user_department, ";
+ $sql .= "mb_user_resolution) VALUES ";
+ $sql.= "($1, $2, $3, $4, $5, $6, $7, $8)";
+ $v = array($name,md5($password),$owner_id,$description,$email,$phone,$department,$resolution);
+ $t = array('s','s','i','s','s','s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+
+ $selected_user = db_insert_id('platzhalter','mb_user','mb_user_id');
+ $sql_owner = "Update mb_user SET mb_user_owner = $1 ";
+ $sql_owner.= " WHERE mb_user_name = $2 ";
+ $v = array(1,$name); #$selected_user;
+ $t = array('i','s');
+ $res_owner = db_prep_query($sql_owner,$v,$t);
+ # removed, because a new user may be inserted in a group with too many privileges
+ $sql_group = "Insert INTO mb_user_mb_group (fkey_mb_user_id, fkey_mb_group_id) VALUES ";
+ $sql_group.= "($1, $2) ";
+ $v = array($selected_user,20);
+ $t = array('i','i');
+ $res_group = db_prep_query($sql_group,$v,$t);
+ // CB (begin)
+ // adding new GUIs for new user (copies of gui and gui1 with owner rights)
+ $gui = new gui();
+ $admin = new administration();
+ //create new name for gui
+ $gui_id1 = $admin->getGuiIdByGuiName("gui");
+ $gui_id2 = $admin->getGuiIdByGuiName("gui1");
+ $gui_id3 = $admin->getGuiIdByGuiName("gui2");
+ $gui_id4 = $admin->getGuiIdByGuiName("gui_digitize");
+ $gui_newName1 = $name . "_gui";
+ $gui_newName2 = $name . "_gui1";
+ $gui_newName3 = $name . "_gui2";
+ $gui_newName4 = $name . "_gui_digitize";
+ //check if new gui names are already taken
+ while ($gui->guiExists($gui_newName1)) {
+ $gui_newName1 .= "_1";
+ }
+ while ($gui->guiExists($gui_newName2)) {
+ $gui_newName2 .= "_1";
+ }
+ while ($gui->guiExists($gui_newName3)) {
+ $gui_newName3 .= "_1";
+ }
+ while ($gui->guiExists($gui_newName4)) {
+ $gui_newName4 .= "_1";
+ }
+ //create gui_(name) and gui1_(name)
+ $gui->copyGui($gui_id1[0], $gui_newName1,true);
+ $gui->copyGui($gui_id2[0], $gui_newName2,true);
+ $gui->copyGui($gui_id3[0], $gui_newName3,true);
+ $gui->copyGui($gui_id4[0], $gui_newName4,true);
+ $new_guiId1 = $admin->getGuiIdByGuiName($gui_newName1);
+ $new_guiId2 = $admin->getGuiIdByGuiName($gui_newName2);
+ $new_guiId3 = $admin->getGuiIdByGuiName($gui_newName3);
+ $new_guiId4 = $admin->getGuiIdByGuiName($gui_newName4);
+ //grant owner rights for new guis to this user only!
+ $admin->delAllUsersOfGui($new_guiId1[0]);
+ $admin->delAllUsersOfGui($new_guiId2[0]);
+ $admin->delAllUsersOfGui($new_guiId3[0]);
+ $admin->delAllUsersOfGui($new_guiId4[0]);
+ $admin->insertUserAsGuiOwner($new_guiId1[0], $selected_user);
+ $admin->insertUserAsGuiOwner($new_guiId2[0], $selected_user);
+ $admin->insertUserAsGuiOwner($new_guiId3[0], $selected_user);
+ $admin->insertUserAsGuiOwner($new_guiId4[0], $selected_user);
+ // delete gui from groups
+ // (gui and gui1 are associated with groups 20 and 21, new guis belong to mb_user only)
+ $sql_del_from_group = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 OR fkey_gui_id = $2 OR fkey_gui_id = $3 OR fkey_gui_id = $4";
+ $v = array($new_guiId1[0],$new_guiId2[0],$new_guiId3[0],$new_guiId4[0]);
+ $t = array('s','s','s','s');
+ $res_del_from_group = db_prep_query($sql_del_from_group,$v,$t);
+ }
+}
+
+if (!isset($name) || $selected_user == 'new'){
+ $name = "";
+ $password = "";
+ $description = "";
+ $email = "";
+ $phone = "";
+ $department = "";
+}
+
+/* HTML */
+echo "<form name='form1' action='" . $self . "' method='post'>";
+echo "<table border='0'>";
+
+if(isset($selected_user) && $selected_user != 0){
+ $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ $name = db_result($res,0,"mb_user_name");
+ $password = db_result($res,0,"mb_user_password");
+ $owner_id = db_result($res,0,"mb_user_owner");
+ $description = db_result($res,0,"mb_user_description");
+ $login_count = db_result($res,0,"mb_user_login_count");
+ $email = db_result($res,0,"mb_user_email");
+ $phone = db_result($res,0,"mb_user_phone");
+ $department = db_result($res,0,"mb_user_department");
+ $resolution = db_result($res,0,"mb_user_resolution");
+ }
+ $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1 ";
+ $v = array($owner_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ $owner_name = db_result($res,0,"mb_user_name");
+ }
+}
+#name
+echo "<tr>";
+ echo "<td>Name*:</td>";
+ echo "<td>";
+ echo "<input type='text' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#password
+echo "<tr>";
+ echo "<td>Password*: </td>";
+ echo "<td>";
+ echo "<input type='password' name='password' value='";
+ if(isset($selected_user) && $selected_user != 'new'){
+ echo $myPW;
+ }
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+#password
+echo "<tr>";
+ echo "<td>Confirm password*: </td>";
+ echo "<td>";
+ echo "<input type='password' name='v_password' value='";
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+#email
+echo "<tr>";
+ echo "<td>Email <A HREF='http://wms1.ccgis.de/ewiki/index.php?id=CreateUser' target='_blank'><b>(Why?): </b></A><BR></td>";
+ echo "<td>";
+ echo "<input type='text' name='email' value='".$email."'>";
+ echo "</td>";
+echo "</tr>";
+
+#phone
+echo "<tr>";
+ echo "<td>Phone: </td>";
+ echo "<td>";
+ echo "<input type='text' name='phone' value='".$phone."'>";
+ echo "</td>";
+echo "</tr>";
+
+#department
+echo "<tr>";
+ echo "<td>Department: </td>";
+ echo "<td>";
+ echo "<input type='text' name='department' value='".$department."'>";
+ echo "</td>";
+echo "</tr>";
+
+echo "<tr>";
+ echo "<td></td>";
+ echo "<td>";
+if($selected_user == 'new' || !isset($selected_user)){
+ echo "<input type='button' class='myButton' value='save' onclick='validate(\"save\")'>";
+}
+ echo "</td>";
+echo "</tr>";
+echo"</table>";
+?>
+<input type='hidden' name='action' value=''>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteFilteredGUI.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,206 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/DeleteGUI
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Delete GUI</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-function validate(){
- var ind = document.form1.guiList.selectedIndex;
- if(ind > -1){
- var permission = confirm("delete: " + document.form1.guiList.options[ind].text + " ?");
- if(permission == true){
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-
-<?php
-###delete
-if($del){
-$sql = "DELETE FROM gui WHERE gui_id = $1";
-$v = array($guiList);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-}
-###
-if(count($ownguis)>0){
- $v = array();
- $t = array();
- $sql = "SELECT * from gui WHERE gui.gui_id IN(";
- for($i=0; $i<count($ownguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i+1);
- array_push($v,$ownguis[$i]);
- array_push($t,'s');
- }
- $sql .= ") order by gui_id";
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- echo "<form name='form1' action='" . $self ."' method='post'>";
- echo "<select class='guiList' size='20' name='guiList' class='guiList' onchange='document.form1.guiList.value = this.value;submit()'>";
- while($row = db_fetch_array($res)){
- $guivalue = $row["gui_id"];
- //mark previously selected GUI <==> text = " selected"
- if ($guivalue == $guiList) {
- $text = " selected";
- }
- else {
- $text = "";
- }
- echo "<option value='".$guivalue."'" . $text . ">".$row["gui_name"]."</option>";
- $cnt++;
- }
- echo "</select><br>";
-
- // If WMS is selected, show more info
- if($guiList)
- {
- echo "<p class = 'wmsList'>";
- // Show description
- $sql = "SELECT gui_description FROM gui WHERE gui_id = $1";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<b>Description:</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- $text = $row["gui_description"];
- if ($text){
- echo $text . "<br>";
- $cnt++;
- }
- }
- if ($cnt == 0) {
- echo "<i>- none -</i><br>";
- }
-
-
- // Show users
- $sql = "SELECT mb_user_name FROM mb_user, gui_mb_user WHERE fkey_mb_user_id = mb_user_id AND fkey_gui_id = $1";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<br><br><b>Users using this GUI</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo $row["mb_user_name"]."<br>";
- $cnt++;
- }
- if ($cnt == 0) {
- echo "<i>- none -</i><br>";
- }
-
-
- // Show groups
- $sql = "SELECT mb_group_name FROM mb_group, gui_mb_group WHERE fkey_mb_group_id = mb_group_id AND fkey_gui_id = $1";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<br><br><b>Groups using this GUI</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo $row["mb_group_name"]."<br>";
- $cnt++;
- }
- if ($cnt == 0) {
- echo "<i>- none -</i><br>";
- }
-
-
- // Show list of WMS exclusive to this GUI
- $sql = "SELECT wms_id, wms_title FROM wms, gui_wms WHERE fkey_wms_id = wms_id AND fkey_gui_id = $1";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<br><br><b>List of WMS exclusive to this GUI</b><br><br>";
-
- $cnt = 0;
- $count = 0;
- while($row = db_fetch_array($res))
- {
- $wmstitle = $row["wms_title"];
- $wmsid = $row["wms_id"];
-
- // Check how many GUIs use current WMS
- $sql2 = "SELECT COUNT(fkey_wms_id) FROM gui_wms WHERE fkey_wms_id = $1";
- $v = array($wmsid);
- $t = array('i');
- $res2 = db_prep_query($sql2,$v,$t);
-
- // Display if only selected GUI uses current WMS
- if (db_result($res2,0,0) == 1){
- //echo "<input type = checkbox name = wms" . $count . ">";
- echo $wmstitle . "<br>";
- $count++;
- }
- $cnt++;
- }
- if ($count == 0) {
- echo "<i>- none -</i><br>";
- }
- echo "</p>";
- }
-
- echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
- echo "<input type='hidden' name='del'>";
- echo "</form>";
-}else{
- echo "There are no guis available for this user. Please create a gui first.";
-}
-?>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php (from rev 2138, branches/2.4.5/http/php/mod_deleteFilteredGUI.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_deleteFilteredGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,206 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/DeleteGUI
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Delete GUI</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+function validate(){
+ var ind = document.form1.guiList.selectedIndex;
+ if(ind > -1){
+ var permission = confirm("delete: " + document.form1.guiList.options[ind].text + " ?");
+ if(permission == true){
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+
+<?php
+###delete
+if($del){
+$sql = "DELETE FROM gui WHERE gui_id = $1";
+$v = array($guiList);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+}
+###
+if(count($ownguis)>0){
+ $v = array();
+ $t = array();
+ $sql = "SELECT * from gui WHERE gui.gui_id IN(";
+ for($i=0; $i<count($ownguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i+1);
+ array_push($v,$ownguis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ") order by gui_id";
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+ echo "<select class='guiList' size='20' name='guiList' class='guiList' onchange='document.form1.guiList.value = this.value;submit()'>";
+ while($row = db_fetch_array($res)){
+ $guivalue = $row["gui_id"];
+ //mark previously selected GUI <==> text = " selected"
+ if ($guivalue == $guiList) {
+ $text = " selected";
+ }
+ else {
+ $text = "";
+ }
+ echo "<option value='".$guivalue."'" . $text . ">".$row["gui_name"]."</option>";
+ $cnt++;
+ }
+ echo "</select><br>";
+
+ // If WMS is selected, show more info
+ if($guiList)
+ {
+ echo "<p class = 'wmsList'>";
+ // Show description
+ $sql = "SELECT gui_description FROM gui WHERE gui_id = $1";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<b>Description:</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ $text = $row["gui_description"];
+ if ($text){
+ echo $text . "<br>";
+ $cnt++;
+ }
+ }
+ if ($cnt == 0) {
+ echo "<i>- none -</i><br>";
+ }
+
+
+ // Show users
+ $sql = "SELECT mb_user_name FROM mb_user, gui_mb_user WHERE fkey_mb_user_id = mb_user_id AND fkey_gui_id = $1";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<br><br><b>Users using this GUI</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo $row["mb_user_name"]."<br>";
+ $cnt++;
+ }
+ if ($cnt == 0) {
+ echo "<i>- none -</i><br>";
+ }
+
+
+ // Show groups
+ $sql = "SELECT mb_group_name FROM mb_group, gui_mb_group WHERE fkey_mb_group_id = mb_group_id AND fkey_gui_id = $1";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<br><br><b>Groups using this GUI</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo $row["mb_group_name"]."<br>";
+ $cnt++;
+ }
+ if ($cnt == 0) {
+ echo "<i>- none -</i><br>";
+ }
+
+
+ // Show list of WMS exclusive to this GUI
+ $sql = "SELECT wms_id, wms_title FROM wms, gui_wms WHERE fkey_wms_id = wms_id AND fkey_gui_id = $1";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<br><br><b>List of WMS exclusive to this GUI</b><br><br>";
+
+ $cnt = 0;
+ $count = 0;
+ while($row = db_fetch_array($res))
+ {
+ $wmstitle = $row["wms_title"];
+ $wmsid = $row["wms_id"];
+
+ // Check how many GUIs use current WMS
+ $sql2 = "SELECT COUNT(fkey_wms_id) FROM gui_wms WHERE fkey_wms_id = $1";
+ $v = array($wmsid);
+ $t = array('i');
+ $res2 = db_prep_query($sql2,$v,$t);
+
+ // Display if only selected GUI uses current WMS
+ if (db_result($res2,0,0) == 1){
+ //echo "<input type = checkbox name = wms" . $count . ">";
+ echo $wmstitle . "<br>";
+ $count++;
+ }
+ $cnt++;
+ }
+ if ($count == 0) {
+ echo "<i>- none -</i><br>";
+ }
+ echo "</p>";
+ }
+
+ echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
+ echo "<input type='hidden' name='del'>";
+ echo "</form>";
+}else{
+ echo "There are no guis available for this user. Please create a gui first.";
+}
+?>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_deleteGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteGUI.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_deleteGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,91 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/DeleteGUI
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-#$admin = new administration();
-#$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-$gui_id = $_SESSION["mb_user_gui"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Delete GUI - All Users</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-function validate(){
- var ind = document.form1.guiList.selectedIndex;
- if(ind > -1){
- var permission = confirm("delete: " + document.form1.guiList.options[ind].text + " ?");
- if(permission == true){
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-
-<?php
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-###delete
-if($guiList){
- $sql = "DELETE FROM gui WHERE gui_id = $1";
- $v = array($guiList);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
-}
-
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-$cnt_gui = 0;
-
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<select class='guiList' size='20' name='guiList' class='guiList'>";
-
-while($row = db_fetch_array($res_gui)){
- echo "<option value='".$row["gui_id"]."'>".$row["gui_name"]."</option>";
- $cnt_gui++;
-}
-echo "</select><br>";
-echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
-?>
-<input type='hidden' name='del'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_deleteGUI.php (from rev 2138, branches/2.4.5/http/php/mod_deleteGUI.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_deleteGUI.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_deleteGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,92 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/DeleteGUI
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+#$admin = new administration();
+#$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+$gui_id = $_SESSION["mb_user_gui"];
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Delete GUI - All Users</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+function validate(){
+ var ind = document.form1.guiList.selectedIndex;
+ if(ind > -1){
+ var permission = confirm("delete: " + document.form1.guiList.options[ind].text + " ?");
+ if(permission == true){
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+
+<?php
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+###delete
+if($guiList){
+ $sql = "DELETE FROM gui WHERE gui_id = $1";
+ $v = array($guiList);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+}
+
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+$cnt_gui = 0;
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<select class='guiList' size='20' name='guiList' class='guiList'>";
+
+while($row = db_fetch_array($res_gui)){
+ echo "<option value='".$row["gui_id"]."'>".$row["gui_name"]."</option>";
+ $cnt_gui++;
+}
+echo "</select><br>";
+echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
+?>
+<input type='hidden' name='del'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_deleteWFS.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteWFS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_deleteWFS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,103 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/DeleteWFS
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-#$admin = new administration();
-#$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-$gui_id = $_SESSION["mb_user_gui"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Delete WFS - All Users</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-function validate(){
- var ind = document.form1.wfsList.selectedIndex;
- if(ind > -1){
- var permission = confirm("delete: " + document.form1.wfsList.options[ind].text + " ?");
- if(permission == true){
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-</script>
-
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
-
- -->
-</style>
-</head>
-<body>
-
-<?php
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-###delete
-if($wfsList){
- $sql = "DELETE FROM wfs WHERE wfs_id = $1";
- $v = array($wfsList);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-}
-
-$sql_wfs = "SELECT * FROM wfs ORDER BY wfs_id";
-$res_wfs = db_query($sql_wfs);
-$cnt_wfs = 0;
-
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<br><b>WFS List: <b><br><br>";
-echo "<select class='wfsList' size='20' name='wfsList' >";
-
-while($row = db_fetch_array($res_wfs)){
- echo "<option value='".$row["wfs_id"]."'>".$row["wfs_id"]." ".$row["wfs_name"]." - ".$row["wfs_title"]."</option>";
- $cnt_wfs++;
-}
-echo "</select><br><br>";
-echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
-?>
-<input type='hidden' name='del'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_deleteWFS.php (from rev 2138, branches/2.4.5/http/php/mod_deleteWFS.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_deleteWFS.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_deleteWFS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,103 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/DeleteWFS
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+#$admin = new administration();
+#$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+$gui_id = $_SESSION["mb_user_gui"];
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Delete WFS - All Users</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+function validate(){
+ var ind = document.form1.wfsList.selectedIndex;
+ if(ind > -1){
+ var permission = confirm("delete: " + document.form1.wfsList.options[ind].text + " ?");
+ if(permission == true){
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+
+ -->
+</style>
+</head>
+<body>
+
+<?php
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+###delete
+if($wfsList){
+ $sql = "DELETE FROM wfs WHERE wfs_id = $1";
+ $v = array($wfsList);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+}
+
+$sql_wfs = "SELECT * FROM wfs ORDER BY wfs_id";
+$res_wfs = db_query($sql_wfs);
+$cnt_wfs = 0;
+
+echo "<form name='form1' action='" . $self."' method='post'>";
+echo "<br><b>WFS List: <b><br><br>";
+echo "<select class='wfsList' size='20' name='wfsList' >";
+
+while($row = db_fetch_array($res_wfs)){
+ echo "<option value='".$row["wfs_id"]."'>".$row["wfs_id"]." ".$row["wfs_name"]." - ".$row["wfs_title"]."</option>";
+ $cnt_wfs++;
+}
+echo "</select><br><br>";
+echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
+?>
+<input type='hidden' name='del'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_deleteWMS.php
===================================================================
--- branches/2.4.5/http/php/mod_deleteWMS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_deleteWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,341 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/DeleteWMS
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>deleteWMS</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-
-function validate()
-{
- var ind = document.form1.wmsList.selectedIndex;
- if(ind > -1) {
- var permission = confirm("delete: " + document.form1.wmsList.options[ind].text + " ?");
- if(permission == true) {
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-
-function suggest_deletion(email_str)
-{
- var ind = document.form1.wmsList.selectedIndex;
- if(ind > -1)
- {
- var permission = confirm("A mail will be sent to the owners of '" + document.form1.wmsList.options[ind].text + "', suggesting its deletion.");
- if(permission == true) {
- document.form2.suggest.value = 1;
- document.form2.wms_name.value = document.form1.wmsList.options[ind].text;
- document.form2.owners.value = email_str;
- document.form2.submit();
- }
- }
-}
--->
-</script>
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-
-$error_msg='';
-
-//if mail form has been filled in and sent
-if ($_POST["mail"]) {
- if (!$admin->isValidEmail($_POST["replyto"])) {
- $error_msg .= "The reply-to address is not valid! Please correct it.";
- }
- else {
- $toAddr = array();
- $toName = array();
- $namesAndAddresses = explode(":::" , $_POST["owners"]);
- for ($i=0; $i<count($namesAndAddresses)-1; $i++) {
- $nameAndAddress = explode(";;;", $namesAndAddresses[$i]);
- $toAddr[$i] = $nameAndAddress[0];
- $toName[$i] = $nameAndAddress[1];
- }
-
- $error = '';
- for ($i=0; $i<count($toAddr); $i++) {
- if (!$admin->sendEmail($_POST["replyto"], $_POST["from"], $toAddr[$i], $toName[$i], "[Mapbender] A user has suggested a WMS for deletion", $_POST["comment"], $error)) {
- if ($error) {
- $error_msg .= $error . " ";
- }
- }
- }
-
- if (!$error_msg) {
- echo "<script language='javascript'>";
- echo "alert('Other owners have been informed!');";
- echo "</script>";
- }
- }
-}
-
-
-// if deletion has been suggested, or there's an error in the form, display mail form (again)
-if ($_POST["suggest"] || $error_msg){
-
- if ($error_msg) {
- echo "<script language='javascript'>";
- echo "alert('$error_msg');";
- echo "</script>";
- }
-
- $wms = $_POST["wms_name"];
-
- if (!$_POST["from"])
- $fromName = $_SESSION["mb_user_name"];
- else
- $fromName = $_POST["from"];
-
- if (!$_POST["replyto"])
- $email = $admin->getEmailByUserId($_SESSION["mb_user_id"]);
- else
- $email = $_POST["replyto"];
-
- if (!$_POST["comment"])
- $text = "The WMS " . $wms . " has been suggested for deletion. If you agree, remove it from your GUIs. If not, you can contact the user who suggested the deletion and discuss it.";
- else
- $text = $_POST["comment"];
-
- echo "<form name='form3' action='" . $self ."' method='post'>";
- echo "<table><tr>";
- echo "<td>Your name:</td>";
- echo "<td><input type='text' name='from' size=50 value = '".$fromName."'></td>";
- echo "</tr><tr>";
- echo "<td>Reply-To:</td>";
- echo "<td><input type='text' name='replyto' size=50 value = '" . $email . "'></td>";
- echo "</tr><tr>";
- echo "<td valign=top>Comment:</td>";
- echo "<td><textarea name='comment' cols=38 rows=10>" . $text . "</textarea></td>";
- echo "</tr><tr>";
- echo "<td></td><td><input type='submit' name='mail' value='send email'></td>";
- echo "</tr></table>";
- echo "<input type='hidden' name='owners' value='" . $_POST["owners"] . "'>";
- echo "</form>";
-
-}
-else {
- // delete WMS
- if($del){
- $sql = "select * from gui_wms where fkey_wms_id = $1 ";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- $sql = "UPDATE gui_wms set gui_wms_position = (gui_wms_position -1) ";
- $sql .= "WHERE fkey_gui_id = $1 ";
- $sql .= " AND gui_wms_position > $2 ";
- $v = array($row["fkey_gui_id"],$row["gui_wms_position"]);
- $t = array('s','i');
- $res1 = db_prep_query($sql,$v,$t);
- $cnt++;
- }
- $sql = "DELETE FROM wms WHERE wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- }
- // display WMS List
-
- $wms_id_own = $admin->getWmsByOwner($_SESSION["mb_user_id"],true);
-
- if (count($wms_id_own)>0){
- $v = array();
- $t = array();
- $sql = "Select * from wms WHERE wms_id IN (";
- for($i=0; $i<count($wms_id_own); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i+1);
- array_push($v,$wms_id_own[$i]);
- array_push($t,'i');
- }
- $sql .= ") ORDER BY wms_title";
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
-
-
- echo "<form name='form1' action='" . $self ."' method='post'>";
- echo "<select class='wmsList' size='20' name='wmsList' onchange='document.form1.wmsList.value = this.value;submit()'>";
- while($row = db_fetch_array($res))
- {
- $wmsvalue = $row["wms_id"];
- //mark previously selected WMS <==> text = " selected"
- if ($wmsvalue == $wmsList) {
- $text = " selected";
- }
- else {
- $text = "";
- }
- echo "<option value='".$wmsvalue."'" . $text . ">".$row["wms_title"]."</option>";
- $cnt++;
- }
- echo "</select><br>";
-
-
- //
- //
- // If WMS is selected, show more info
- //
- //
- if($wmsList)
- {
- echo "<p class = 'guiList'>";
- // Show GUIs using chosen WMS
- $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<b>Used in the following GUIs:</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo "- " . $row["fkey_gui_id"]."<br>";
- $cnt++;
- }
- if ($cnt == 0) {
- echo "<i>- none -</i><br>";
- }
-
- // Show GetCapabilities of chosen WMS
- $sql = "SELECT wms_getcapabilities FROM wms WHERE wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<br><br><b>GetCapabilities</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo $row["wms_getcapabilities"]."<br>";
- $cnt++;
- }
-
- // Show Abstract of Chosen WMS
- $sql = "SELECT wms_abstract FROM wms WHERE wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- echo "<br><br><b>Abstract</b><br><br>";
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo $row["wms_abstract"]."<br>";
- $cnt++;
- }
- echo "<br><br><b>Owner:</b><br><br>";
- $owner = $admin->getOwnerByWms($wmsList);
- if ($owner && count($owner)>0) {
- for($i=0; $i<count($owner); $i++){
- echo "- ".$owner[$i]."<br>";
- }
- }
- else echo "<i>- none -</i>";
-
-
- echo "</p>";
-
- //previously, a WMS could only be deleted if it was owned by a single owner
- //if(count($owner)==1 && $owner[0] == $_SESSION["mb_user_name"]){
-
- //now, any owner can delete, any non-owner can suggest deletions
- //if a wms has no owner, anyone can delete
- if($owner && in_array($_SESSION["mb_user_name"], $owner) && count($owner) == 1) {
- echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
- }
- elseif ($owner && in_array($_SESSION["mb_user_name"], $owner) && count($owner) > 1) {
-
- // delete suggestion button only appears when mailing is enabled in mapbender.conf
- if ($use_php_mailing) {
-
- // prepare email-addresses and usernames of all owners
- $owner_ids = array();
- $owner_mail_addresses = array();
- $email_str = '';
- for ($i=0; $i<count($owner); $i++) {
- $tmp_array = $admin->getUserIdByUserName($owner[$i]);
- $owner_ids[$i] = $tmp_array[0];
- }
- $j=0;
- for ($i=0; $i<count($owner_ids); $i++) {
- $adr_tmp = $admin->getEmailByUserId($owner_ids[$i]);
- if (!in_array($adr_tmp, $owner_mail_addresses) && $adr_tmp) {
- $owner_mail_addresses[$j] = $adr_tmp;
- $email_str .= $owner_mail_addresses[$j] . ";;;" . $owner[$i] . ":::";
- $j++;
- }
- }
- print_r($owner_ids);
- print_r($owner_mail_addresses);
- echo "<input class='button_del' type='button' value='suggest deletion' onclick='suggest_deletion(\"" . $email_str . "\")'>";
- }
- else {
- echo "<script language='javascript'>";
- echo "alert('You are not allowed to delete this WMS!');";
- echo "</script>";
- }
- }
-
- }
- }else{
- echo "There are no wms available for this user.<br>";
- }
-}
-?>
-<input type='hidden' name='del'>
-</form>
-<?php
-echo "<form name='form2' action='" . $self ."' method='post'>";
-?>
-<input type='hidden' name='suggest' value='0'>
-<input type='hidden' name='wms_name' value=''>
-<input type='hidden' name='owners' value=''>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_deleteWMS.php (from rev 2138, branches/2.4.5/http/php/mod_deleteWMS.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_deleteWMS.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_deleteWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,339 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/DeleteWMS
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>deleteWMS</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+
+function validate()
+{
+ var ind = document.form1.wmsList.selectedIndex;
+ if(ind > -1) {
+ var permission = confirm("delete: " + document.form1.wmsList.options[ind].text + " ?");
+ if(permission == true) {
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+
+function suggest_deletion(email_str)
+{
+ var ind = document.form1.wmsList.selectedIndex;
+ if(ind > -1)
+ {
+ var permission = confirm("A mail will be sent to the owners of '" + document.form1.wmsList.options[ind].text + "', suggesting its deletion.");
+ if(permission == true) {
+ document.form2.suggest.value = 1;
+ document.form2.wms_name.value = document.form1.wmsList.options[ind].text;
+ document.form2.owners.value = email_str;
+ document.form2.submit();
+ }
+ }
+}
+-->
+</script>
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
+$error_msg='';
+
+//if mail form has been filled in and sent
+if ($_POST["mail"]) {
+ if (!$admin->isValidEmail($_POST["replyto"])) {
+ $error_msg .= "The reply-to address is not valid! Please correct it.";
+ }
+ else {
+ $toAddr = array();
+ $toName = array();
+ $namesAndAddresses = explode(":::" , $_POST["owners"]);
+ for ($i=0; $i<count($namesAndAddresses)-1; $i++) {
+ $nameAndAddress = explode(";;;", $namesAndAddresses[$i]);
+ $toAddr[$i] = $nameAndAddress[0];
+ $toName[$i] = $nameAndAddress[1];
+ }
+
+ $error = '';
+ for ($i=0; $i<count($toAddr); $i++) {
+ if (!$admin->sendEmail($_POST["replyto"], $_POST["from"], $toAddr[$i], $toName[$i], "[Mapbender] A user has suggested a WMS for deletion", $_POST["comment"], $error)) {
+ if ($error) {
+ $error_msg .= $error . " ";
+ }
+ }
+ }
+
+ if (!$error_msg) {
+ echo "<script language='javascript'>";
+ echo "alert('Other owners have been informed!');";
+ echo "</script>";
+ }
+ }
+}
+
+
+// if deletion has been suggested, or there's an error in the form, display mail form (again)
+if ($_POST["suggest"] || $error_msg){
+
+ if ($error_msg) {
+ echo "<script language='javascript'>";
+ echo "alert('$error_msg');";
+ echo "</script>";
+ }
+
+ $wms = $_POST["wms_name"];
+
+ if (!$_POST["from"])
+ $fromName = $_SESSION["mb_user_name"];
+ else
+ $fromName = $_POST["from"];
+
+ if (!$_POST["replyto"])
+ $email = $admin->getEmailByUserId($_SESSION["mb_user_id"]);
+ else
+ $email = $_POST["replyto"];
+
+ if (!$_POST["comment"])
+ $text = "The WMS " . $wms . " has been suggested for deletion. If you agree, remove it from your GUIs. If not, you can contact the user who suggested the deletion and discuss it.";
+ else
+ $text = $_POST["comment"];
+
+ echo "<form name='form3' action='" . $self ."' method='post'>";
+ echo "<table><tr>";
+ echo "<td>Your name:</td>";
+ echo "<td><input type='text' name='from' size=50 value = '".$fromName."'></td>";
+ echo "</tr><tr>";
+ echo "<td>Reply-To:</td>";
+ echo "<td><input type='text' name='replyto' size=50 value = '" . $email . "'></td>";
+ echo "</tr><tr>";
+ echo "<td valign=top>Comment:</td>";
+ echo "<td><textarea name='comment' cols=38 rows=10>" . $text . "</textarea></td>";
+ echo "</tr><tr>";
+ echo "<td></td><td><input type='submit' name='mail' value='send email'></td>";
+ echo "</tr></table>";
+ echo "<input type='hidden' name='owners' value='" . $_POST["owners"] . "'>";
+ echo "</form>";
+
+}
+else {
+ // delete WMS
+ if($del){
+ $sql = "select * from gui_wms where fkey_wms_id = $1 ";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ $sql = "UPDATE gui_wms set gui_wms_position = (gui_wms_position -1) ";
+ $sql .= "WHERE fkey_gui_id = $1 ";
+ $sql .= " AND gui_wms_position > $2 ";
+ $v = array($row["fkey_gui_id"],$row["gui_wms_position"]);
+ $t = array('s','i');
+ $res1 = db_prep_query($sql,$v,$t);
+ $cnt++;
+ }
+ $sql = "DELETE FROM wms WHERE wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+ // display WMS List
+
+ $wms_id_own = $admin->getWmsByOwner($_SESSION["mb_user_id"],true);
+
+ if (count($wms_id_own)>0){
+ $v = array();
+ $t = array();
+ $sql = "Select * from wms WHERE wms_id IN (";
+ for($i=0; $i<count($wms_id_own); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i+1);
+ array_push($v,$wms_id_own[$i]);
+ array_push($t,'i');
+ }
+ $sql .= ") ORDER BY wms_title";
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+
+
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+ echo "<select class='wmsList' size='20' name='wmsList' onchange='document.form1.wmsList.value = this.value;submit()'>";
+ while($row = db_fetch_array($res))
+ {
+ $wmsvalue = $row["wms_id"];
+ //mark previously selected WMS <==> text = " selected"
+ if ($wmsvalue == $wmsList) {
+ $text = " selected";
+ }
+ else {
+ $text = "";
+ }
+ echo "<option value='".$wmsvalue."'" . $text . ">".$row["wms_title"]."</option>";
+ $cnt++;
+ }
+ echo "</select><br>";
+
+
+ //
+ //
+ // If WMS is selected, show more info
+ //
+ //
+ if($wmsList)
+ {
+ echo "<p class = 'guiList'>";
+ // Show GUIs using chosen WMS
+ $sql = "SELECT fkey_gui_id FROM gui_wms WHERE fkey_wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<b>Used in the following GUIs:</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo "- " . $row["fkey_gui_id"]."<br>";
+ $cnt++;
+ }
+ if ($cnt == 0) {
+ echo "<i>- none -</i><br>";
+ }
+
+ // Show GetCapabilities of chosen WMS
+ $sql = "SELECT wms_getcapabilities FROM wms WHERE wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<br><br><b>GetCapabilities</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo $row["wms_getcapabilities"]."<br>";
+ $cnt++;
+ }
+
+ // Show Abstract of Chosen WMS
+ $sql = "SELECT wms_abstract FROM wms WHERE wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "<br><br><b>Abstract</b><br><br>";
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo $row["wms_abstract"]."<br>";
+ $cnt++;
+ }
+ echo "<br><br><b>Owner:</b><br><br>";
+ $owner = $admin->getOwnerByWms($wmsList);
+ if ($owner && count($owner)>0) {
+ for($i=0; $i<count($owner); $i++){
+ echo "- ".$owner[$i]."<br>";
+ }
+ }
+ else echo "<i>- none -</i>";
+
+
+ echo "</p>";
+
+ //previously, a WMS could only be deleted if it was owned by a single owner
+ //if(count($owner)==1 && $owner[0] == $_SESSION["mb_user_name"]){
+
+ //now, any owner can delete, any non-owner can suggest deletions
+ //if a wms has no owner, anyone can delete
+ if($owner && in_array($_SESSION["mb_user_name"], $owner) && count($owner) == 1) {
+ echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
+ }
+ elseif ($owner && in_array($_SESSION["mb_user_name"], $owner) && count($owner) > 1) {
+
+ // delete suggestion button only appears when mailing is enabled in mapbender.conf
+ if ($use_php_mailing) {
+
+ // prepare email-addresses and usernames of all owners
+ $owner_ids = array();
+ $owner_mail_addresses = array();
+ $email_str = '';
+ for ($i=0; $i<count($owner); $i++) {
+ $tmp_array = $admin->getUserIdByUserName($owner[$i]);
+ $owner_ids[$i] = $tmp_array[0];
+ }
+ $j=0;
+ for ($i=0; $i<count($owner_ids); $i++) {
+ $adr_tmp = $admin->getEmailByUserId($owner_ids[$i]);
+ if (!in_array($adr_tmp, $owner_mail_addresses) && $adr_tmp) {
+ $owner_mail_addresses[$j] = $adr_tmp;
+ $email_str .= $owner_mail_addresses[$j] . ";;;" . $owner[$i] . ":::";
+ $j++;
+ }
+ }
+ print_r($owner_ids);
+ print_r($owner_mail_addresses);
+ echo "<input class='button_del' type='button' value='suggest deletion' onclick='suggest_deletion(\"" . $email_str . "\")'>";
+ }
+ else {
+ echo "<script language='javascript'>";
+ echo "alert('You are not allowed to delete this WMS!');";
+ echo "</script>";
+ }
+ }
+
+ }
+ }else{
+ echo "There are no wms available for this user.<br>";
+ }
+}
+?>
+<input type='hidden' name='del'>
+</form>
+<?php
+echo "<form name='form2' action='" . $self ."' method='post'>";
+?>
+<input type='hidden' name='suggest' value='0'>
+<input type='hidden' name='wms_name' value=''>
+<input type='hidden' name='owners' value=''>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_editElementVars.php
===================================================================
--- branches/2.4.5/http/php/mod_editElementVars.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editElementVars.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,244 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_editElementVars.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-session_start();
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Element Vars</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .guiList1{
- position:absolute;
- top:30px;
- left:10px;
- width:200px
- }
- .buttonbar{
- position:absolute;
- top:40px;
- left:10px;
- }
- .guiList1_text{
- position:absolute;
- top:10px;
- left:10px;
- font-size:16px;
- color: #0066cc;
- }
- .guiList2{
- position:absolute;
- top:40px;
- left:400px;
- width:200px
- }
- .all{
- position:absolute;
- top:38px;
- left:610px;
- }
- .guiList2_header{
- position:absolute;
- top:10px;
- left:400px;
- font-size:16px;
- color: #0066cc;
- }
- .myElements{
- position:absolute;
- top:70px;
- left:400px;
- }
- .myTable{
- border: 1px solid;
- font-size: 11px;
- }
- .myForm{
- position:absolute;
- top:70px;
- left:10px;
- }
- .textfield{
- width:277px
- }
- .textfield_small{
- width:150px
- }
- .on{
- color: #0066cc;
- }
- -->
-</style>
-
-<?php
-
-# handle database updates etc.....
-
-if(isset($mySave) && ($mySave == '1')){
- $sql = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
- $v = array($fkey_gui_id,$fkey_e_id,$var_name);
- $t = array('s','s','s');
- $res = db_prep_query($sql,$v,$t);
- $sql = "INSERT INTO gui_element_vars(fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
- $sql .= "VALUES ($1, $2, $3, $4, $5, $6)";
- //db_escape_string($var_value)?,db_escape_string($context)?
- $v = array($fkey_gui_id,$fkey_e_id,$var_name,$var_value,$context,$var_type);
- $t = array('s','s','s','s','s','s');
- $res = db_prep_query($sql,$v,$t);
- $mySave = 0;
-}
-
-if(isset($myDelete) && ($myDelete == '1')){
- $sql = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
- $v = array($fkey_gui_id,$fkey_e_id,$var_name);
- $t = array('s','s','s');
- $res = db_prep_query($sql,$v,$t);
- $myDelete = 0;
-}
-?>
-
-<script type="text/javascript">
-<!--
-function thisSave(){
- if(document.form1.var_name.value != ""){
- var permission = confirm("save: " + document.form1.var_name.value + " ?");
- if(permission == true){
- document.form1.mySave.value = 1;
- document.form1.submit();
- }
- }
-}
-
-function thisDelete(){
- if(document.form1.var_name.value != ""){
- var permission = confirm("delete: " + document.form1.var_name.value + " ?");
- if(permission == true){
- document.form1.myDelete.value = 1;
- document.form1.submit();
- }
- }
-}
-// -->
-</script>
-</head>
-<body>
-
-<?php
- echo "<form name='form1' action='" . $PHP_SELF . "?".$sParams."' method='POST'>\n";
-
- $fkey_gui_id = $_REQUEST["fkey_gui_id"];
- $fkey_e_id = $_REQUEST["fkey_e_id"];
- if(isset($_REQUEST["myElement"])){
- $myElement = $_REQUEST["myElement"];
- }
-
- echo "<div class= 'guiList1_text'>";
- echo "Edit Element Vars: ".$fkey_gui_id." / ".$fkey_e_id;
-
- echo "</div>\n";
- echo "<div class='buttonbar'>\n";
- echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
- echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
-
- $href = "self.location.href='mod_editElements.php?".$sParams."&guiList1=".$fkey_gui_id."&guiList2=".$fkey_gui_id."'";
-
- echo "<input type='button' class='' name='' value='return' onclick=\"".$href."\"> \n";
- echo "</div>\n";
-
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 ORDER BY var_name";
- $v = array($fkey_gui_id,$fkey_e_id);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
-
- echo "<div class='myElements'>\n<table>\n";
-
- while(db_fetch_row($res)){
- echo "<tr>\n";
- echo "<td class='myTable'>";
- echo "<input type='radio' name='myElement' value='".db_result($res, $cnt, "var_name")."' onclick='submit()'>";
- echo "</td>\n";
- echo "<td class='myTable'>".db_result($res, $cnt, "var_name")."</td>\n";
- echo "</tr>\n";
- $cnt++;
- }
- echo "</table>\n</div>\n";
-
- echo "<table class='myForm'>\n";
- $formOk = 0;
- if(isset($myElement)){
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
- $v = array($fkey_gui_id,$fkey_e_id,$myElement);
- $t = array('s','s','s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value='".db_result($res,0,"var_name")."'></td></tr>\n";
- echo "<tr><td>Value:</td><td><textarea cols='32' rows='5' name='var_value' >".stripslashes(db_result($res,0,"var_value"))."</textarea></td></tr>\n";
- echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value='".db_result($res,0,"context")."'></td></tr>\n";
- echo "<tr><td>Type:</td><td><input type='text' class='textfield' name='var_type' value='".db_result($res,0,"var_type")."'></td></tr>\n";
- $formOk = 1;
- }
- }
- if($formOk == 0){
- echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value=''></td></tr>\n";
- echo "<tr><td>Value:</td><td><textarea cols='32' rows='5' name='var_value' ></textarea></td></tr>\n";
- echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value=''></td></tr>\n";
- echo "<tr><td>Type:</td><td>";
- echo "<select class='textfield' name='var_type'>";
- echo "<option value='text/css'>text/css</option>";
- echo "<option value='file/css'>file/css</option>";
- echo "<option value='var'>JavaScript Variable</option>";
- echo "<option value='php_var'>PHP Variable</option>";
- echo "</select>";
- echo "</td></tr>\n";
- }
- echo "</table>\n";
-
- echo "<input type=\"hidden\" name=\"fkey_gui_id\" value=\"".$fkey_gui_id."\">\n";
- echo "<input type=\"hidden\" name=\"fkey_e_id\" value=\"".$fkey_e_id."\">\n";
-?>
-<input type="hidden" name="myDelete">
-<input type="hidden" name="mySave">
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editElementVars.php (from rev 2138, branches/2.4.5/http/php/mod_editElementVars.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editElementVars.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editElementVars.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,245 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_editElementVars.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Element Vars</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .guiList1{
+ position:absolute;
+ top:30px;
+ left:10px;
+ width:200px
+ }
+ .buttonbar{
+ position:absolute;
+ top:40px;
+ left:10px;
+ }
+ .guiList1_text{
+ position:absolute;
+ top:10px;
+ left:10px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .guiList2{
+ position:absolute;
+ top:40px;
+ left:400px;
+ width:200px
+ }
+ .all{
+ position:absolute;
+ top:38px;
+ left:610px;
+ }
+ .guiList2_header{
+ position:absolute;
+ top:10px;
+ left:400px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .myElements{
+ position:absolute;
+ top:70px;
+ left:400px;
+ }
+ .myTable{
+ border: 1px solid;
+ font-size: 11px;
+ }
+ .myForm{
+ position:absolute;
+ top:70px;
+ left:10px;
+ }
+ .textfield{
+ width:277px
+ }
+ .textfield_small{
+ width:150px
+ }
+ .on{
+ color: #0066cc;
+ }
+ -->
+</style>
+
+<?php
+
+# handle database updates etc.....
+
+if(isset($mySave) && ($mySave == '1')){
+ $sql = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
+ $v = array($fkey_gui_id,$fkey_e_id,$var_name);
+ $t = array('s','s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $sql = "INSERT INTO gui_element_vars(fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
+ $sql .= "VALUES ($1, $2, $3, $4, $5, $6)";
+ //db_escape_string($var_value)?,db_escape_string($context)?
+ $v = array($fkey_gui_id,$fkey_e_id,$var_name,$var_value,$context,$var_type);
+ $t = array('s','s','s','s','s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $mySave = 0;
+}
+
+if(isset($myDelete) && ($myDelete == '1')){
+ $sql = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
+ $v = array($fkey_gui_id,$fkey_e_id,$var_name);
+ $t = array('s','s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $myDelete = 0;
+}
+?>
+
+<script type="text/javascript">
+<!--
+function thisSave(){
+ if(document.form1.var_name.value != ""){
+ var permission = confirm("save: " + document.form1.var_name.value + " ?");
+ if(permission == true){
+ document.form1.mySave.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+
+function thisDelete(){
+ if(document.form1.var_name.value != ""){
+ var permission = confirm("delete: " + document.form1.var_name.value + " ?");
+ if(permission == true){
+ document.form1.myDelete.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+// -->
+</script>
+</head>
+<body>
+
+<?php
+ echo "<form name='form1' action='" . $self ."' method='POST'>\n";
+
+ $fkey_gui_id = $_REQUEST["fkey_gui_id"];
+ $fkey_e_id = $_REQUEST["fkey_e_id"];
+ if(isset($_REQUEST["myElement"])){
+ $myElement = $_REQUEST["myElement"];
+ }
+
+ echo "<div class= 'guiList1_text'>";
+ echo "Edit Element Vars: ".$fkey_gui_id." / ".$fkey_e_id;
+
+ echo "</div>\n";
+ echo "<div class='buttonbar'>\n";
+ echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
+ echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
+
+ $href = "self.location.href='mod_editElements.php?".$sParams."&guiList1=".$fkey_gui_id."&guiList2=".$fkey_gui_id."'";
+
+ echo "<input type='button' class='' name='' value='return' onclick=\"".$href."\"> \n";
+ echo "</div>\n";
+
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 ORDER BY var_name";
+ $v = array($fkey_gui_id,$fkey_e_id);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+
+ echo "<div class='myElements'>\n<table>\n";
+
+ while(db_fetch_row($res)){
+ echo "<tr>\n";
+ echo "<td class='myTable'>";
+ echo "<input type='radio' name='myElement' value='".db_result($res, $cnt, "var_name")."' onclick='submit()'>";
+ echo "</td>\n";
+ echo "<td class='myTable'>".db_result($res, $cnt, "var_name")."</td>\n";
+ echo "</tr>\n";
+ $cnt++;
+ }
+ echo "</table>\n</div>\n";
+
+ echo "<table class='myForm'>\n";
+ $formOk = 0;
+ if(isset($myElement)){
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 AND var_name = $3";
+ $v = array($fkey_gui_id,$fkey_e_id,$myElement);
+ $t = array('s','s','s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value='".db_result($res,0,"var_name")."'></td></tr>\n";
+ echo "<tr><td>Value:</td><td><textarea cols='32' rows='5' name='var_value' >".stripslashes(db_result($res,0,"var_value"))."</textarea></td></tr>\n";
+ echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value='".db_result($res,0,"context")."'></td></tr>\n";
+ echo "<tr><td>Type:</td><td><input type='text' class='textfield' name='var_type' value='".db_result($res,0,"var_type")."'></td></tr>\n";
+ $formOk = 1;
+ }
+ }
+ if($formOk == 0){
+ echo "<tr><td>Name:</td><td><input type='text' class='textfield' name='var_name' value=''></td></tr>\n";
+ echo "<tr><td>Value:</td><td><textarea cols='32' rows='5' name='var_value' ></textarea></td></tr>\n";
+ echo "<tr><td>Context:</td><td><input type='text' class='textfield' name='context' value=''></td></tr>\n";
+ echo "<tr><td>Type:</td><td>";
+ echo "<select class='textfield' name='var_type'>";
+ echo "<option value='text/css'>text/css</option>";
+ echo "<option value='file/css'>file/css</option>";
+ echo "<option value='var'>JavaScript Variable</option>";
+ echo "<option value='php_var'>PHP Variable</option>";
+ echo "</select>";
+ echo "</td></tr>\n";
+ }
+ echo "</table>\n";
+
+ echo "<input type=\"hidden\" name=\"fkey_gui_id\" value=\"".$fkey_gui_id."\">\n";
+ echo "<input type=\"hidden\" name=\"fkey_e_id\" value=\"".$fkey_e_id."\">\n";
+?>
+<input type="hidden" name="myDelete">
+<input type="hidden" name="mySave">
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editElements.php
===================================================================
--- branches/2.4.5/http/php/mod_editElements.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editElements.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,608 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_editElements.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-include(dirname(__FILE__)."/../php/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-$self = $PHP_SELF . "?".$sParams;
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Elements</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .guiList1{
- position:absolute;
- top:30px;
- left:10px;
- width:200px
- }
- .buttonbar{
- position:absolute;
- top:40px;
- left:10px;
- }
- .guiList1_text{
- position:absolute;
- top:10px;
- left:10px;
- font-size:16px;
- color: #0066cc;
- }
- .guiList2{
- position:absolute;
- top:40px;
- left:400px;
- width:200px
- }
- .all{
- position:absolute;
- top:38px;
- left:610px;
- }
- .guiList2_header{
- position:absolute;
- top:10px;
- left:400px;
- font-size:16px;
- color: #0066cc;
- }
- .myElements{
- position:absolute;
- top:70px;
- left:400px;
- }
- .myTable{
- border: 1px solid;
- font-size: 11px;
- }
- .myForm{
- position:absolute;
- top:70px;
- left:10px;
- }
- .textfield{
- width:277px
- }
- .textfield_small{
- width:150px
- }
- .on{
- color: #0066cc;
- }
- .templateTable{
- background-color:lightgrey;
- }
- -->
-</style>
-<?php
-# handle database updates etc.....
-if(isset($mySave) && ($mySave == '1' || $mySave == '2')) {
- # check module-permission ---------------------------------------------------------
- # e_attributes
- # e_js_file
- # e_mb_mod
- # e_src
- $check = CHECK;
- $alert = "Security alert: You do not have the permission to use the specified ";
- $alert .= "module-path. Please contact your mapbender system administrator.";
-
- $mod = new administration();
- $aGuis = $mod->getGuisByPermission($_SESSION["mb_user_id"],true);
- $modPermAlert = false;
-
- if($check == true){
- if(isset($e_attributes) && preg_match("/((\w+|\/)+.php)/i", $e_attributes, $matches)){
- $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_attributes");
- if($modPerm == false){
- $modPermAlert = true;
- }
- }
- if(isset($e_js_file) && preg_match("/((\w+|\/)+.php)/i", $e_js_file, $matches)){
- $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_js_file");
- if($modPerm == false){
- $modPermAlert = true;
- }
- }
- if(isset($e_mb_mod) && preg_match("/((\w+|\/)+.php)/i", $e_mb_mod, $matches)){
- $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_mb_mod");
- if($modPerm == false){
- $modPermAlert = true;
- }
- }
- if(isset($e_src) && preg_match("/((\w+|\/)+.php)/i", $e_src, $matches)){
- $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_src");
-
- if($modPerm == false){
- $modPermAlert = true;
- }
- }
- if($modPermAlert == true){
- unset($mySave);
- echo "<script language='JavaScript'>";
- echo "alert('".$alert."');";
- echo "</script>";
-
- }
- }
-
- # end permission-check -------------------------------------------------------------
-
- if ($mySave == '1'){
- //copy element vars
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id,$_POST["originGuiOfSelectedElement"]);
- $t = array('s','s');
- $c = 0;
- $res_vars = db_prep_query($sql,$v,$t);
-
- db_begin();
-
- $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2 ";
- $v = array($e_id,$guiList1);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
-
- if($e_left == ''){$e_left = NULL;}
- if($e_top == ''){$e_top = NULL;}
- if($e_width < 1){$e_width = NULL;}
- if($e_height < 1){$e_height = NULL;}
- if($e_z_index < 1){$e_z_index = NULL;}
-
- $sql = "INSERT INTO gui_element(fkey_gui_id,e_id,e_pos,e_public,e_comment,e_element,e_src,";
- $sql .= "e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,e_content,";
- $sql .= "e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url) ";
- $sql .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)";
- $v = array($guiList1,$e_id,$e_pos,$e_public,$e_comment,$e_element,$e_src,$e_attributes,$e_left,
- $e_top,$e_width,$e_height,$e_z_index,$e_more_styles,$e_content,$e_closetag,$e_js_file,
- $e_mb_mod,$e_target,$e_requires,$e_url);
- $t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s');
- $res = db_prep_query($sql,$v,$t);
- if(!$res){
- db_rollback();
- }
-
- //copy element vars
-
- while($row = db_fetch_array($res_vars)){
- $sql = array();
- $v = array();
- $t = array();
- $r = array();
- $sql[$c] = "INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
- $sql[$c] .= "VALUES ($1,$2,$3,$4,$5,$6)";
- $v[$c] = array($guiList1,$e_id,$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
- $t[$c] = array('s','s','s','s','s','s');
- $r[$c] = db_prep_query($sql[$c],$v[$c],$t[$c]);
- if(!$r){
- db_rollback();
- }
- $c++;
- }
- db_commit();
- }
- # mySave == 2 <=> just save GUI description
- elseif ($mySave == '2') {
- $sql = "UPDATE gui SET gui_description = $1 WHERE gui_id = $2";
- $v = array($guiDesc,$guiId);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- }
-
-}
-if(isset($myDelete) && $myDelete == '1'){
- $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id,$guiList1);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
- $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
- $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = "";
- $e_target = ""; $e_requires = ""; $e_url = "";
-}
-if(isset($myShow) && $myShow == '1'){
- $_SESSION["mb_user_myGui"] = $guiList1;
- echo "<script language='javascript'>";
- echo "window.open('../frames/login.php?".strip_tags (SID)."&name=".$_SESSION["mb_user_name"]."&password=".urlencode($_SESSION["mb_user_password"])."&mb_user_myGui=".$guiList1."','','');";
- echo "</script>";
-}
-if(isset($all) && $all == '1'){
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1";
- $v = array($guiList2);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- db_begin();
- while($row = db_fetch_array($res)){
- $sql_del = "DELETE FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
- $v = array($guiList1,$row["e_id"]);
- $t = array('s','s');
- $res_del = db_prep_query($sql_del,$v,$t);
- if($row["e_left"] == ""){$myleft = NULL;} else{$myleft = $row["e_left"];}
- if($row["e_top"] == ""){$mytop = NULL;} else{$mytop = $row["e_top"];}
- if($row["e_width"] == ""){$mywidth = NULL;} else{$mywidth = $row["e_width"];}
- if($row["e_height"] == ""){$myheight = NULL;} else{$myheight = $row["e_height"];}
- if($row["e_z_index"] == ""){$my_z_index = NULL;} else{$my_z_index = $row["e_z_index"];}
-
- $sql_ins = "INSERT INTO gui_element(fkey_gui_id,e_id,e_pos,e_public,e_comment,e_element,";
- $sql_ins .= "e_src,e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,";
- $sql_ins .= "e_content,e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url) ";
- $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)";
- $v = array($guiList1,$row["e_id"],$row["e_pos"],$row["e_public"],$row["e_comment"],$row["e_element"],
- $row["e_src"],$row["e_attributes"],$myleft,$mytop,$mywidth,$myheight,$my_z_index,
- $row["e_more_styles"],$row["e_content"],$row["e_closetag"],$row["e_js_file"],$row["e_mb_mod"],
- $row["e_target"],$row["e_requires"],$row["e_url"]);
- $t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s');
- $res_ins = db_prep_query($sql_ins,$v,$t);
- if(!$res_ins){db_rollback(); }
- $cnt++;
- }
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1";
- $v = array($guiList2);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $sql_ins2 = "INSERT INTO gui_element_vars(fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
- $sql_ins2 .= "VALUES ($1,$2,$3,$4,$5,$6)";
- $v = array($guiList1,$row["fkey_e_id"],$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
- $t = array('s','s','s','s','s','s');
- $res_ins2 = db_prep_query($sql_ins2,$v,$t);
- if(!$res_ins2){db_rollback(); }
- $cnt++;
- }
- db_commit();
-}
-# end
-echo "<script language='javascript'>";
-echo "var guiIDs = new Array();";
-if(isset($guiList1)){
- $sql = "SELECT e_id FROM gui_element WHERE fkey_gui_id = $1";
- $v = array($guiList1);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "guiIDs[".$cnt."] = '".$row["e_id"]."'; ";
- $cnt++;
- }
-}
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function setOriginGui(){
- document.form1.originGuiOfSelectedElement.value = document.form1.guiList2.value;
-}
-
-function setGui(val){
- document.form1.guiList2.value = val;
- document.form1.submit();
-}
-function clearRadio(){
- for(var i=0; i< document.form1.elements.length; i++){
- if(document.form1.elements[i].type == "radio"){
- document.form1.elements[i].checked = false;
- }
- }
-}
-function thisSave(){
- if(document.form1.e_id.value == ""){
- alert("ID ? ");
- document.form1.e_id.focus();
- return;
- }
- var permission = false;
- var isElement = false;
- for(var i=0; i<guiIDs.length; i++){
- clearRadio();
- if(document.form1.e_id.value == guiIDs[i]){
- permission = confirm("update: " + document.form1.e_id.value + " ?");
- isElement = true;
- break;
- }
- }
- if(permission == true || isElement == false){
- document.form1.mySave.value = 1;
- document.form1.submit();
- }
-}
-
-function thisDelete(){
- clearRadio();
- var permission = confirm("delete: " + document.form1.e_id.value + " ?");
- if(permission == true){
- document.form1.myDelete.value = 1;
- document.form1.submit();
- }
-}
-function thisShow(){
- document.form1.myShow.value = 1;
- document.form1.submit();
-}
-function addAll(){
- var permission = confirm("add all elements ?");
- if(permission == true){
- clearRadio();
- document.form1.all.value = 1;
- document.form1.submit();
- }
-}
-function thisExport(){
-
- window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
-}
-function editDesc(){
- var newDesc = prompt("Enter new GUI description", document.form1.guiDesc.value);
- if (newDesc != null) {
- document.form1.guiDesc.value = newDesc;
- document.form1.mySave.value = 2;
- document.form1.submit();
- }
-}
-
-// -->
-</script>
-</head>
-<body>
-
-<?php
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
-echo "<form name='form1' action='" . $self ."' method='post'>\n";
-if(count($ownguis)>0){
- $v = array();
- $t = array();
- $c = 1;
- $sql = "SELECT * from gui WHERE gui.gui_id IN(";
- for($i=0; $i<count($ownguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- array_push($v,$ownguis[$i]);
- array_push($t,'s');
- $c++;
- }
- $sql .= ") order by UPPER(gui_id);";
- $res = db_prep_query($sql,$v,$t);
- $count=0;
- while($row = db_fetch_array($res)){
- $gui_id_own[$count]=$row["gui_id"];
- $gui_name_own[$count]=$row["gui_name"];
- $gui_description_own[$count]=$row["gui_description"];
- $count++;
- }
-
- $v = array();
- $t = array();
- $c = 1;
- $sql = "SELECT * from gui WHERE gui.gui_id IN(";
- for($i=0; $i<count($permguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- array_push($v,$permguis[$i]);
- array_push($t,'s');
- $c++;
- }
- $sql .= ") order by UPPER(gui_id);";
- $res = db_prep_query($sql,$v,$t);
- $count=0;
- while($row = db_fetch_array($res)){
- $gui_id_perm[$count]= $row["gui_id"];
- $gui_name_perm[$count]=$row["gui_name"];
- $gui_description_perm[$count]=$row["gui_description"];
- $count++;
- }
-
- #Gui to edit
- if(!isset($guiList1)){
- echo "<div class= 'guiList1_text'>GUI:</div>\n";
- echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>\n";
- for ($i=0; $i<count($gui_id_own);$i++){
- echo "<option value='".$gui_id_own[$i]."' ";
- if($guiList1 && $guiList1 == $gui_id_own[$i]){
- echo "selected";
- }
- echo ">".$gui_name_own[$i]."</option>\n";
- }
- echo "</select>\n";
-
- for ($i=0; $i<count($gui_id_own);$i++){
- echo "<input type='hidden' name='guiDesc_" . $gui_name_own[$i] . "' value='" . $gui_description_own[$i] . "' >\n";
- echo "<input type='hidden' name='guiId_" . $gui_name_own[$i] . "' value='" . $gui_id_own[$i] . "' >\n";
- }
- echo "<input type='hidden' name='guiList2' value='' >\n";
- }
- else{
- echo "<div class= 'guiList1_text'>";
- echo "Edit Elements: ".$guiList1;
-
- // set guiDesc and guiId if guiList1 has just been selected
- if (!$guiDesc) {
- $Desc = "guiDesc_" . $guiList1;
- $guiDesc = $$Desc;
- }
- if (!$guiId) {
- $Id = "guiId_" . $guiList1;
- $guiId = $$Id;
- }
-
- echo " (" . $guiDesc;
- echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) \n";
- echo "</div>\n";
- echo "<div class='buttonbar'>\n";
- echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
- echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
- echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> \n";
- echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> \n";
- echo "</div>\n";
- echo "<input type='hidden' name='guiList1' value='".$guiList1."' >\n";
- echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
- echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
- }
- #Depot
- if(isset($guiList1)){
- echo "<select name='guiList2' class='guiList2' onchange='clearRadio();submit()'>\n";
- echo "<option>GUI...</option>\n";
- for ($i=0; $i<count($gui_id_perm);$i++){
- echo "<option value='".$gui_id_perm[$i]."' ";
- if($guiList2 && $guiList2 == $gui_id_perm[$i]){
- echo "selected";
- }
- echo ">".$gui_name_perm[$i]."</option>\n";
- }
- echo "</select>\n";
- if($guiList1 != $guiList2){echo "<input class='all' type='button' value='add all elements' onclick='addAll()'>\n";}
- }
- #Elements
- if(isset($guiList2)){
- if($guiList1 == $guiList2){
- echo "<div class='guiList2_header'>Edit Element: </div>\n";
- $isTemplate = false;
- }
- else{
- echo "<div class='guiList2_header'>Templates</div>\n";
- $isTemplate = true;
- }
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
- $v = array($guiList2);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
-
- echo "<div class='myElements'>\n<table ";
- if($isTemplate){ echo "class='templateTable'";}
- echo ">\n";
-
- while($row = db_fetch_array($res)){
- echo "<tr>\n";
- echo "<td class='myTable'><input type='radio' name='myElement' value='".$row["e_id"]."' onclick='setOriginGui();submit()' ";
- if($row["e_id"] == $myElement){echo "checked";}
- echo "></td>\n";
- echo "<td>";
- if(is_file($row["e_src"]) && getimagesize($row["e_src"])){
- echo "<img src='".$row["e_src"]."' width='24' height='24'>";
- }
- echo "</td>";
- echo "<td class='myTable'>";
- if($row["e_public"] == 1){echo "<div class='on'>on</div>";}
- //echo "</td>\n<td class='myTable'>". $row["e_id"]. "</td><td class='myTable'>" .$row["e_comment"]."</td>";
- echo "</td>\n";
- echo "<td class='myTable'>";
- echo "<a href=\"mod_editElementVars.php?".$sParams."&fkey_gui_id=".$guiList2."&fkey_e_id=".$row["e_id"]."\">";
- echo $row["e_id"];
- echo "</a>\n</td>\n";
- echo "<td class='myTable'>".$row["e_comment"]."</td>";
- echo "</tr>\n";
- $cnt++;
- }
- echo "</table>\n</div>\n";
- }
- #Formular:
- echo "<table class='myForm'>\n";
- //echo "<tr><td>" . $_POST["originGuiOfSelectedElement"] . "</td></tr>";
-if(isset($myElement)){
-
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = '".$guiList2."' AND e_id = '".$myElement."'";
- $v = array();
- $t = array();
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$row["e_id"]."'></td></tr>\n";
- echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$row["e_pos"]."'></td></tr>\n";
- echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$row["e_public"]."'></td></tr>\n";
- echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($row["e_comment"])."</textarea></td></tr>\n";
- echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$row["e_element"]."'></td></tr>\n";
- echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$row["e_src"]."'></td></tr>\n";
- echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($row["e_attributes"])."</textarea></td></tr>\n";
- echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$row["e_left"]."'></td></tr>\n";
- echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$row["e_top"]."'></td></tr>\n";
- echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$row["e_width"]."'></td></tr>\n";
- echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$row["e_height"]."'></td></tr>\n";
- echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$row["e_z_index"]."'></td></tr>\n";
- echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$row["e_more_styles"]."'></td></tr>\n";
- echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($row["e_content"])."</textarea></td></tr>\n";
- echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$row["e_closetag"]."'></td></tr>\n";
- echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$row["e_js_file"]."'></td></tr>\n";
- echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$row["e_mb_mod"]."'></td></tr>\n";
- echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$row["e_target"]."'></td></tr>\n";
- echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$row["e_requires"]."'></td></tr>\n";
- echo "<tr><td>URL: </td><td><input type='text' class='textfield' name='e_url' value='".$row["e_url"]."'></td></tr>\n";
- }
- echo "</table>";
-}
-else if(isset($guiList1)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$e_id."'></td></tr>\n";
- echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$e_pos."'></td></tr>\n";
- echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$e_public."'></td></tr>\n";
- echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($e_comment)."</textarea></td></tr>\n";
- echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$e_element."'></td></tr>\n";
- echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$e_src."'></td></tr>\n";
- echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($e_attributes)."</textarea></td></tr>\n";
- echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$e_left."'></td></tr>\n";
- echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$e_top."'></td></tr>\n";
- echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$e_width."'></td></tr>\n";
- echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$e_height."'></td></tr>\n";
- echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$e_z_index."'></td></tr>\n";
- echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$e_more_styles."'></td></tr>\n";
- echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($e_content)."</textarea></td></tr>\n";
- echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$e_closetag."'></td></tr>\n";
- echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$e_js_file."'></td></tr>\n";
- echo "<tr><td>Module: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$e_mb_mod."'></td></tr>\n";
- echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$e_target."'></td></tr>\n";
- echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$e_requires."'></td></tr>\n";
- echo "<tr><td>URL: </td><td><input type='text' class='textfield' name='e_url' value='".$e_url."'></td></tr>\n";
-}
-echo "</table>\n";
-echo "<input type='hidden' name='originGuiOfSelectedElement' value='" . $_POST["originGuiOfSelectedElement"] . "'>";
-
-echo "<input type='hidden' name='myDelete'>";
-echo "<input type='hidden' name='mySave'>";
-echo "<input type='hidden' name='myShow'>";
-echo "<input type='hidden' name='all'>";
-echo "</form>";
-}
-else{
- echo "There are no guis available for this user. Please create a gui first.";
-}
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editElements.php (from rev 2184, branches/2.4.5/http/php/mod_editElements.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editElements.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editElements.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,604 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_editElements.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Elements</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .guiList1{
+ position:absolute;
+ top:30px;
+ left:10px;
+ width:200px
+ }
+ .buttonbar{
+ position:absolute;
+ top:40px;
+ left:10px;
+ }
+ .guiList1_text{
+ position:absolute;
+ top:10px;
+ left:10px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .guiList2{
+ position:absolute;
+ top:40px;
+ left:400px;
+ width:200px
+ }
+ .all{
+ position:absolute;
+ top:38px;
+ left:610px;
+ }
+ .guiList2_header{
+ position:absolute;
+ top:10px;
+ left:400px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .myElements{
+ position:absolute;
+ top:70px;
+ left:400px;
+ }
+ .myTable{
+ border: 1px solid;
+ font-size: 11px;
+ }
+ .myForm{
+ position:absolute;
+ top:70px;
+ left:10px;
+ }
+ .textfield{
+ width:277px
+ }
+ .textfield_small{
+ width:150px
+ }
+ .on{
+ color: #0066cc;
+ }
+ .templateTable{
+ background-color:lightgrey;
+ }
+ -->
+</style>
+<?php
+# handle database updates etc.....
+if(isset($mySave) && ($mySave == '1' || $mySave == '2')) {
+ # check module-permission ---------------------------------------------------------
+ # e_attributes
+ # e_js_file
+ # e_mb_mod
+ # e_src
+ $check = CHECK;
+ $alert = "Security alert: You do not have the permission to use the specified ";
+ $alert .= "module-path. Please contact your mapbender system administrator.";
+
+ $mod = new administration();
+ $aGuis = $mod->getGuisByPermission($_SESSION["mb_user_id"],true);
+ $modPermAlert = false;
+
+ if($check == true){
+ if(isset($e_attributes) && preg_match("/((\w+|\/)+.php)/i", $e_attributes, $matches)){
+ $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_attributes");
+ if($modPerm == false){
+ $modPermAlert = true;
+ }
+ }
+ if(isset($e_js_file) && preg_match("/((\w+|\/)+.php)/i", $e_js_file, $matches)){
+ $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_js_file");
+ if($modPerm == false){
+ $modPermAlert = true;
+ }
+ }
+ if(isset($e_mb_mod) && preg_match("/((\w+|\/)+.php)/i", $e_mb_mod, $matches)){
+ $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_mb_mod");
+ if($modPerm == false){
+ $modPermAlert = true;
+ }
+ }
+ if(isset($e_src) && preg_match("/((\w+|\/)+.php)/i", $e_src, $matches)){
+ $modPerm = $mod->checkModulePermission($aGuis, $matches[1], "e_src");
+
+ if($modPerm == false){
+ $modPermAlert = true;
+ }
+ }
+ if($modPermAlert == true){
+ unset($mySave);
+ echo "<script language='JavaScript'>";
+ echo "alert('".$alert."');";
+ echo "</script>";
+
+ }
+ }
+
+ # end permission-check -------------------------------------------------------------
+
+ if ($mySave == '1'){
+ //copy element vars
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
+ $v = array($e_id_,$_POST["originGuiOfSelectedElement"]);
+ $t = array('s','s');
+ $c = 0;
+ $res_vars = db_prep_query($sql,$v,$t);
+
+ db_begin();
+
+ $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2 ";
+ $v = array($e_id_,$guiList1);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+
+ if($e_left == ''){$e_left = NULL;}
+ if($e_top == ''){$e_top = NULL;}
+ if($e_width < 1){$e_width = NULL;}
+ if($e_height < 1){$e_height = NULL;}
+ if($e_z_index < 1){$e_z_index = NULL;}
+
+ $sql = "INSERT INTO gui_element(fkey_gui_id,e_id,e_pos,e_public,e_comment,e_element,e_src,";
+ $sql .= "e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,e_content,";
+ $sql .= "e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url) ";
+ $sql .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)";
+ $v = array($guiList1,$e_id_,$e_pos,$e_public,$e_comment,$e_element,$e_src,$e_attributes,$e_left,
+ $e_top,$e_width,$e_height,$e_z_index,$e_more_styles,$e_content,$e_closetag,$e_js_file,
+ $e_mb_mod,$e_target,$e_requires,$e_url);
+ $t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s');
+ $res = db_prep_query($sql,$v,$t);
+ if(!$res){
+ db_rollback();
+ }
+
+ //copy element vars
+
+ while($row = db_fetch_array($res_vars)){
+ $sql = array();
+ $v = array();
+ $t = array();
+ $r = array();
+ $sql[$c] = "INSERT INTO gui_element_vars (fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
+ $sql[$c] .= "VALUES ($1,$2,$3,$4,$5,$6)";
+ $v[$c] = array($guiList1,$e_id_,$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
+ $t[$c] = array('s','s','s','s','s','s');
+ $r[$c] = db_prep_query($sql[$c],$v[$c],$t[$c]);
+ if(!$r){
+ db_rollback();
+ }
+ $c++;
+ }
+ db_commit();
+ }
+ # mySave == 2 <=> just save GUI description
+ elseif ($mySave == '2') {
+ $sql = "UPDATE gui SET gui_description = $1 WHERE gui_id = $2";
+ $v = array($guiDesc,$guiId);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ }
+
+}
+if(isset($myDelete) && $myDelete == '1'){
+ $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+ $v = array($e_id_,$guiList1);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $e_id_ = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
+ $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
+ $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = "";
+ $e_target = ""; $e_requires = ""; $e_url = "";
+}
+if(isset($myShow) && $myShow == '1'){
+ $_SESSION["mb_user_myGui"] = $guiList1;
+ echo "<script language='javascript'>";
+ echo "window.open('../frames/login.php?".strip_tags (SID)."&name=".$_SESSION["mb_user_name"]."&password=".urlencode($_SESSION["mb_user_password"])."&mb_user_myGui=".$guiList1."','','');";
+ echo "</script>";
+}
+if(isset($all) && $all == '1'){
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1";
+ $v = array($guiList2);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ db_begin();
+ while($row = db_fetch_array($res)){
+ $sql_del = "DELETE FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
+ $v = array($guiList1,$row["e_id"]);
+ $t = array('s','s');
+ $res_del = db_prep_query($sql_del,$v,$t);
+ if($row["e_left"] == ""){$myleft = NULL;} else{$myleft = $row["e_left"];}
+ if($row["e_top"] == ""){$mytop = NULL;} else{$mytop = $row["e_top"];}
+ if($row["e_width"] == ""){$mywidth = NULL;} else{$mywidth = $row["e_width"];}
+ if($row["e_height"] == ""){$myheight = NULL;} else{$myheight = $row["e_height"];}
+ if($row["e_z_index"] == ""){$my_z_index = NULL;} else{$my_z_index = $row["e_z_index"];}
+
+ $sql_ins = "INSERT INTO gui_element(fkey_gui_id,e_id,e_pos,e_public,e_comment,e_element,";
+ $sql_ins .= "e_src,e_attributes,e_left,e_top,e_width,e_height,e_z_index,e_more_styles,";
+ $sql_ins .= "e_content,e_closetag,e_js_file,e_mb_mod,e_target,e_requires,e_url) ";
+ $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21)";
+ $v = array($guiList1,$row["e_id"],$row["e_pos"],$row["e_public"],$row["e_comment"],$row["e_element"],
+ $row["e_src"],$row["e_attributes"],$myleft,$mytop,$mywidth,$myheight,$my_z_index,
+ $row["e_more_styles"],$row["e_content"],$row["e_closetag"],$row["e_js_file"],$row["e_mb_mod"],
+ $row["e_target"],$row["e_requires"],$row["e_url"]);
+ $t = array('s','s','i','i','s','s','s','s','i','i','i','i','i','s','s','s','s','s','s','s','s');
+ $res_ins = db_prep_query($sql_ins,$v,$t);
+ if(!$res_ins){db_rollback(); }
+ $cnt++;
+ }
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1";
+ $v = array($guiList2);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $sql_ins2 = "INSERT INTO gui_element_vars(fkey_gui_id,fkey_e_id,var_name,var_value,context,var_type) ";
+ $sql_ins2 .= "VALUES ($1,$2,$3,$4,$5,$6)";
+ $v = array($guiList1,$row["fkey_e_id"],$row["var_name"],$row["var_value"],$row["context"],$row["var_type"]);
+ $t = array('s','s','s','s','s','s');
+ $res_ins2 = db_prep_query($sql_ins2,$v,$t);
+ if(!$res_ins2){db_rollback(); }
+ $cnt++;
+ }
+ db_commit();
+}
+# end
+echo "<script language='javascript'>";
+echo "var guiIDs = new Array();";
+if(isset($guiList1)){
+ $sql = "SELECT e_id FROM gui_element WHERE fkey_gui_id = $1";
+ $v = array($guiList1);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "guiIDs[".$cnt."] = '".$row["e_id"]."'; ";
+ $cnt++;
+ }
+}
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function setOriginGui(){
+ document.form1.originGuiOfSelectedElement.value = document.form1.guiList2.value;
+}
+
+function setGui(val){
+ document.form1.guiList2.value = val;
+ document.form1.submit();
+}
+function clearRadio(){
+ for(var i=0; i< document.form1.elements.length; i++){
+ if(document.form1.elements[i].type == "radio"){
+ document.form1.elements[i].checked = false;
+ }
+ }
+}
+function thisSave(){
+ if(document.form1.e_id_.value == ""){
+ alert("ID ? ");
+ document.form1.e_id_.focus();
+ return;
+ }
+ var permission = false;
+ var isElement = false;
+ for(var i=0; i<guiIDs.length; i++){
+ clearRadio();
+ if(document.form1.e_id_.value == guiIDs[i]){
+ permission = confirm("update: " + document.form1.e_id_.value + " ?");
+ isElement = true;
+ break;
+ }
+ }
+ if(permission == true || isElement == false){
+ document.form1.mySave.value = 1;
+ document.form1.submit();
+ }
+}
+
+function thisDelete(){
+ clearRadio();
+ var permission = confirm("delete: " + document.form1.e_id_.value + " ?");
+ if(permission == true){
+ document.form1.myDelete.value = 1;
+ document.form1.submit();
+ }
+}
+function thisShow(){
+ document.form1.myShow.value = 1;
+ document.form1.submit();
+}
+function addAll(){
+ var permission = confirm("add all elements ?");
+ if(permission == true){
+ clearRadio();
+ document.form1.all.value = 1;
+ document.form1.submit();
+ }
+}
+function thisExport(){
+
+ window.open("mod_exportElement.php?element=" + document.forms[0].e_id_.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
+}
+function editDesc(){
+ var newDesc = prompt("Enter new GUI description", document.form1.guiDesc.value);
+ if (newDesc != null) {
+ document.form1.guiDesc.value = newDesc;
+ document.form1.mySave.value = 2;
+ document.form1.submit();
+ }
+}
+
+// -->
+</script>
+</head>
+<body>
+
+<?php
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
+echo "<form name='form1' action='" . $self ."' method='post'>\n";
+if(count($ownguis)>0){
+ $v = array();
+ $t = array();
+ $c = 1;
+ $sql = "SELECT * from gui WHERE gui.gui_id IN(";
+ for($i=0; $i<count($ownguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ array_push($v,$ownguis[$i]);
+ array_push($t,'s');
+ $c++;
+ }
+ $sql .= ") order by UPPER(gui_id);";
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ $gui_id_own[$count]=$row["gui_id"];
+ $gui_name_own[$count]=$row["gui_name"];
+ $gui_description_own[$count]=$row["gui_description"];
+ $count++;
+ }
+
+ $v = array();
+ $t = array();
+ $c = 1;
+ $sql = "SELECT * from gui WHERE gui.gui_id IN(";
+ for($i=0; $i<count($permguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ array_push($v,$permguis[$i]);
+ array_push($t,'s');
+ $c++;
+ }
+ $sql .= ") order by UPPER(gui_id);";
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ $gui_id_perm[$count]= $row["gui_id"];
+ $gui_name_perm[$count]=$row["gui_name"];
+ $gui_description_perm[$count]=$row["gui_description"];
+ $count++;
+ }
+
+ #Gui to edit
+ if(!isset($guiList1)){
+ echo "<div class= 'guiList1_text'>GUI:</div>\n";
+ echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>\n";
+ for ($i=0; $i<count($gui_id_own);$i++){
+ echo "<option value='".$gui_id_own[$i]."' ";
+ if($guiList1 && $guiList1 == $gui_id_own[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_name_own[$i]."</option>\n";
+ }
+ echo "</select>\n";
+
+ for ($i=0; $i<count($gui_id_own);$i++){
+ echo "<input type='hidden' name='guiDesc_" . $gui_name_own[$i] . "' value='" . $gui_description_own[$i] . "' >\n";
+ echo "<input type='hidden' name='guiId_" . $gui_name_own[$i] . "' value='" . $gui_id_own[$i] . "' >\n";
+ }
+ echo "<input type='hidden' name='guiList2' value='' >\n";
+ }
+ else{
+ echo "<div class= 'guiList1_text'>";
+ echo "Edit Elements: ".$guiList1;
+
+ // set guiDesc and guiId if guiList1 has just been selected
+ if (!$guiDesc) {
+ $Desc = "guiDesc_" . $guiList1;
+ $guiDesc = $$Desc;
+ }
+ if (!$guiId) {
+ $Id = "guiId_" . $guiList1;
+ $guiId = $$Id;
+ }
+
+ echo " (" . $guiDesc;
+ echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) \n";
+ echo "</div>\n";
+ echo "<div class='buttonbar'>\n";
+ echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
+ echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
+ echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> \n";
+ echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> \n";
+ echo "</div>\n";
+ echo "<input type='hidden' name='guiList1' value='".$guiList1."' >\n";
+ echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
+ echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
+ }
+ #Depot
+ if(isset($guiList1)){
+ echo "<select name='guiList2' class='guiList2' onchange='clearRadio();submit()'>\n";
+ echo "<option>GUI...</option>\n";
+ for ($i=0; $i<count($gui_id_perm);$i++){
+ echo "<option value='".$gui_id_perm[$i]."' ";
+ if($guiList2 && $guiList2 == $gui_id_perm[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_name_perm[$i]."</option>\n";
+ }
+ echo "</select>\n";
+ if($guiList1 != $guiList2){echo "<input class='all' type='button' value='add all elements' onclick='addAll()'>\n";}
+ }
+ #Elements
+ if(isset($guiList2)){
+ if($guiList1 == $guiList2){
+ echo "<div class='guiList2_header'>Edit Element: </div>\n";
+ $isTemplate = false;
+ }
+ else{
+ echo "<div class='guiList2_header'>Templates</div>\n";
+ $isTemplate = true;
+ }
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
+ $v = array($guiList2);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+
+ echo "<div class='myElements'>\n<table ";
+ if($isTemplate){ echo "class='templateTable'";}
+ echo ">\n";
+
+ while($row = db_fetch_array($res)){
+ echo "<tr>\n";
+ echo "<td class='myTable'><input type='radio' name='myElement' value='".$row["e_id"]."' onclick='setOriginGui();submit()' ";
+ if($row["e_id"] == $myElement){echo "checked";}
+ echo "></td>\n";
+ echo "<td>";
+ if(is_file($row["e_src"]) && getimagesize($row["e_src"])){
+ echo "<img src='".$row["e_src"]."' width='24' height='24'>";
+ }
+ echo "</td>";
+ echo "<td class='myTable'>";
+ if($row["e_public"] == 1){echo "<div class='on'>on</div>";}
+ //echo "</td>\n<td class='myTable'>". $row["e_id"]. "</td><td class='myTable'>" .$row["e_comment"]."</td>";
+ echo "</td>\n";
+ echo "<td class='myTable'>";
+ echo "<a href=\"mod_editElementVars.php?".$sParams."&fkey_gui_id=".$guiList2."&fkey_e_id=".$row["e_id"]."\">";
+ echo $row["e_id"];
+ echo "</a>\n</td>\n";
+ echo "<td class='myTable'>".$row["e_comment"]."</td>";
+ echo "</tr>\n";
+ $cnt++;
+ }
+ echo "</table>\n</div>\n";
+ }
+ #Formular:
+ echo "<table class='myForm'>\n";
+ //echo "<tr><td>" . $_POST["originGuiOfSelectedElement"] . "</td></tr>";
+if(isset($myElement)){
+
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = '".$guiList2."' AND e_id = '".$myElement."'";
+ $v = array();
+ $t = array();
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id_' value='".$row["e_id"]."'></td></tr>\n";
+ echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$row["e_pos"]."'></td></tr>\n";
+ echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$row["e_public"]."'></td></tr>\n";
+ echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($row["e_comment"])."</textarea></td></tr>\n";
+ echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$row["e_element"]."'></td></tr>\n";
+ echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$row["e_src"]."'></td></tr>\n";
+ echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($row["e_attributes"])."</textarea></td></tr>\n";
+ echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$row["e_left"]."'></td></tr>\n";
+ echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$row["e_top"]."'></td></tr>\n";
+ echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$row["e_width"]."'></td></tr>\n";
+ echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$row["e_height"]."'></td></tr>\n";
+ echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$row["e_z_index"]."'></td></tr>\n";
+ echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$row["e_more_styles"]."'></td></tr>\n";
+ echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($row["e_content"])."</textarea></td></tr>\n";
+ echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$row["e_closetag"]."'></td></tr>\n";
+ echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$row["e_js_file"]."'></td></tr>\n";
+ echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$row["e_mb_mod"]."'></td></tr>\n";
+ echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$row["e_target"]."'></td></tr>\n";
+ echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$row["e_requires"]."'></td></tr>\n";
+ echo "<tr><td>URL: </td><td><input type='text' class='textfield' name='e_url' value='".$row["e_url"]."'></td></tr>\n";
+ }
+ echo "</table>";
+}
+else if(isset($guiList1)){
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id_' value='".$e_id_."'></td></tr>\n";
+ echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$e_pos."'></td></tr>\n";
+ echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".$e_public."'></td></tr>\n";
+ echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($e_comment)."</textarea></td></tr>\n";
+ echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$e_element."'></td></tr>\n";
+ echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$e_src."'></td></tr>\n";
+ echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($e_attributes)."</textarea></td></tr>\n";
+ echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$e_left."'></td></tr>\n";
+ echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$e_top."'></td></tr>\n";
+ echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$e_width."'></td></tr>\n";
+ echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$e_height."'></td></tr>\n";
+ echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$e_z_index."'></td></tr>\n";
+ echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$e_more_styles."'></td></tr>\n";
+ echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($e_content)."</textarea></td></tr>\n";
+ echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$e_closetag."'></td></tr>\n";
+ echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$e_js_file."'></td></tr>\n";
+ echo "<tr><td>Module: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$e_mb_mod."'></td></tr>\n";
+ echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$e_target."'></td></tr>\n";
+ echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$e_requires."'></td></tr>\n";
+ echo "<tr><td>URL: </td><td><input type='text' class='textfield' name='e_url' value='".$e_url."'></td></tr>\n";
+}
+echo "</table>\n";
+echo "<input type='hidden' name='originGuiOfSelectedElement' value='" . $_POST["originGuiOfSelectedElement"] . "'>";
+
+echo "<input type='hidden' name='myDelete'>";
+echo "<input type='hidden' name='mySave'>";
+echo "<input type='hidden' name='myShow'>";
+echo "<input type='hidden' name='all'>";
+echo "</form>";
+}
+else{
+ echo "There are no guis available for this user. Please create a gui first.";
+}
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_editFilteredGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,219 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Filtered Group</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(val == 'update'){
- permission = confirm("Save changes?");
- }
- if(val == 'delete'){
- permission = confirm("Delete Group?");
- }
- if(permission == true){
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-function validateInput(){
- var str_alert = "Input incorrect !";
- if(document.forms[0].name.value == ''){
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- return 'true';
-}
-</script>
-
-</head>
-<body>
-<?php
-
-#delete
-if($action == 'delete'){
- $sql = "DELETE FROM mb_group WHERE mb_group_id = $1";
- $v = array($selected_group);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $selected_group = 'new';
-}
-
-#save
-if($action == 'save'){
- $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('groupname must be unique!');</script>";
- }
- else{
- $sql = "Insert INTO mb_group (mb_group_name, mb_group_owner, mb_group_description) VALUES ";
- $sql.= "($1, $2, $3);";
- $v = array($name,$owner_id,$description);
- $t = array('s','i','s');
- $res = db_prep_query($sql,$v,$t);
- $selected_group = db_insert_id($res,"mb_group","mb_group_id");
- }
-}
-
-#update
-if($action == 'update'){
- $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 AND mb_group_id <> $2";
- $v = array($name,$selected_group);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Groupname must be unique!');</script>";
- }
- else{
- $sql = "UPDATE mb_group SET mb_group_name = $1";
- $sql.=", mb_group_description = $2";
- $sql.=" where mb_group_id = $3";
- $v = array($name,$description,$selected_group);
- $t = array('s','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
-}
-if (!isset($name) || $selected_group == 'new'){
- $name = "";
- $owner_id = $_SESSION["mb_user_id"];
- $owner_name = $_SESSION["mb_user_name"];
- $description = "";
-}
-$myGroup = true;
-
-/*HTML*****************************************************************************************************/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table border='0'>";
-#User
-echo "<tr>";
- echo "<td>";
- echo "Group: ";
- echo "</td>";
-echo "<td>";
-echo "<select name='selected_group' onchange='submit()'>";
- echo "<option value='new'>NEW...</option>";
- $sql = "SELECT mb_group_name,mb_group_id FROM mb_group ";
- $v = array();
- $t = array();
- if(isset($myGroup)){
- $sql .= "WHERE mb_group_owner = $1";
- array_push($v, $_SESSION["mb_user_id"]);
- array_push($t, "i");
- }
- $sql .= " ORDER BY mb_group_name ";
- $res = db_prep_query($sql, $v, $t);
- $count=0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["mb_group_id"]."' ";
- if($selected_group && $selected_group == $row["mb_group_id"]){
- echo "selected";
- }
- echo ">".$row["mb_group_name"]."</option>";
- $count++;
- }
- echo "</select>";
- echo "</td>";
-echo "</tr>";
-
-
-if(isset($selected_group) && $selected_group != 0){
- $sql = "SELECT * FROM mb_group WHERE mb_group_id = $1 ORDER BY mb_group_name ";
- $v = array($selected_group);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $name = $row["mb_group_name"];
- $owner_id = $row["mb_group_owner"];
- $description = $row["mb_group_description"];
- }
- $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
- $v = array($owner_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $owner_name = $row["mb_user_name"];
- }
-}
-#name
-echo "<tr>";
- echo "<td>Name:</td>";
- echo "<td>";
- echo "<input type='text' size='30' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#owner
-echo "<tr>";
- echo "<td>Owner: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
- echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-echo"</table>";
-if($selected_group == 'new' || !isset($selected_group)){
- echo "<input type='button' value='save' onclick='validate(\"save\")'>";
-}
-if($_SESSION["mb_user_id"] == $owner_id && $selected_group != 'new' && $selected_group != '' ){
- echo "<input type='button' value='save' onclick='validate(\"update\")'>";
- echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
-}
-?>
-<input type='hidden' name='action' value=''>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php (from rev 2171, branches/2.4.5/http/php/mod_editFilteredGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editFilteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,220 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Filtered Group</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'update'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'delete'){
+ permission = confirm("Delete Group?");
+ }
+ if(permission == true){
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+function validateInput(){
+ var str_alert = "Input incorrect !";
+ if(document.forms[0].name.value == ''){
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ return 'true';
+}
+</script>
+
+</head>
+<body>
+<?php
+
+#delete
+if($action == 'delete'){
+ $sql = "DELETE FROM mb_group WHERE mb_group_id = $1";
+ $v = array($selected_group);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_group = 'new';
+}
+
+#save
+if($action == 'save'){
+ $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('groupname must be unique!');</script>";
+ }
+ else{
+ $sql = "Insert INTO mb_group (mb_group_name, mb_group_owner, mb_group_description) VALUES ";
+ $sql.= "($1, $2, $3);";
+ $v = array($name,$owner_id,$description);
+ $t = array('s','i','s');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_group = db_insert_id($res,"mb_group","mb_group_id");
+ }
+}
+
+#update
+if($action == 'update'){
+ $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 AND mb_group_id <> $2";
+ $v = array($name,$selected_group);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Groupname must be unique!');</script>";
+ }
+ else{
+ $sql = "UPDATE mb_group SET mb_group_name = $1";
+ $sql.=", mb_group_description = $2";
+ $sql.=" where mb_group_id = $3";
+ $v = array($name,$description,$selected_group);
+ $t = array('s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+}
+if (!isset($name) || $selected_group == 'new'){
+ $name = "";
+ $owner_id = $_SESSION["mb_user_id"];
+ $owner_name = $_SESSION["mb_user_name"];
+ $description = "";
+}
+$myGroup = true;
+
+/*HTML*****************************************************************************************************/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table border='0'>";
+#User
+echo "<tr>";
+ echo "<td>";
+ echo "Group: ";
+ echo "</td>";
+echo "<td>";
+echo "<select name='selected_group' onchange='submit()'>";
+ echo "<option value='new'>NEW...</option>";
+ $sql = "SELECT mb_group_name,mb_group_id FROM mb_group ";
+ $v = array();
+ $t = array();
+ if(isset($myGroup)){
+ $sql .= "WHERE mb_group_owner = $1";
+ array_push($v, $_SESSION["mb_user_id"]);
+ array_push($t, "i");
+ }
+ $sql .= " ORDER BY mb_group_name ";
+ $res = db_prep_query($sql, $v, $t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["mb_group_id"]."' ";
+ if($selected_group && $selected_group == $row["mb_group_id"]){
+ echo "selected";
+ }
+ echo ">".$row["mb_group_name"]."</option>";
+ $count++;
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr>";
+
+
+if(isset($selected_group) && $selected_group != 0){
+ $sql = "SELECT * FROM mb_group WHERE mb_group_id = $1 ORDER BY mb_group_name ";
+ $v = array($selected_group);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $name = $row["mb_group_name"];
+ $owner_id = $row["mb_group_owner"];
+ $description = $row["mb_group_description"];
+ }
+ $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
+ $v = array($owner_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $owner_name = $row["mb_user_name"];
+ }
+}
+#name
+echo "<tr>";
+ echo "<td>Name:</td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#owner
+echo "<tr>";
+ echo "<td>Owner: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
+ echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+echo"</table>";
+if($selected_group == 'new' || !isset($selected_group)){
+ echo "<input type='button' value='save' onclick='validate(\"save\")'>";
+}
+if($_SESSION["mb_user_id"] == $owner_id && $selected_group != 'new' && $selected_group != '' ){
+ echo "<input type='button' value='save' onclick='validate(\"update\")'>";
+ echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
+}
+?>
+<input type='hidden' name='action' value=''>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editFilteredUser.php
===================================================================
--- branches/2.4.5/http/php/mod_editFilteredUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editFilteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,334 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-$myUser = true;
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Filtered User</title>
-<?php
-include '../include/dyn_css.php';
-$myPW = "**********";
-echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(val == 'update'){
- permission = confirm("Save changes?");
- }
- if(val == 'delete'){
- permission = confirm("Delete User?");
- }
- if(permission == true){
- if(document.forms[0].password.value == myPW){
- document.forms[0].password.value = '';
- }
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-function validateInput(){
- var str_alert = "Input incorrect !";
- if(document.forms[0].name.value == ''){
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- if(document.forms[0].password.value == ''){
- alert(str_alert);
- document.forms[0].password.focus();
- return 'false';
- }
- if((document.forms[0].password.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].password.value != document.forms[0].v_password.value){
- alert("Password verification failed. You have to enter the same password twice!");
- document.forms[0].password.value = myPW;
- document.forms[0].password.focus();
- return 'false';
- }
- if(document.forms[0].resolution.value == ''){
- document.forms[0].resolution.value = 72;
- return 'true';
- }
- if(document.forms[0].login_count.value == ''){
- document.forms[0].login_count.value = 0;
- return 'true';
- }
- return 'true';
-}
-
-</script>
-
-</head>
-<body>
-<?php
-#delete
-if($action == 'delete'){
- $sql = "DELETE FROM mb_user WHERE mb_user_id = $1";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $selected_user = 'new';
-}
-
-#save
-if($action == 'save'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- $sql = "Insert INTO mb_user (mb_user_name, mb_user_password, mb_user_owner, mb_user_description, ";
- $sql .= "mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
- $sql.= "($1,$2,$3,$4,$5,$6,$7,$8)";
- $tmpPW = md5($password);
- $v = array($name,$tmpPW,$owner_id,$description,$email,$phone,$department,$resolution);
- $t = array('s','s','i','s','s','s','s','i');
- $res = db_prep_query($sql,$v,$t);
- $selected_user = db_insert_id($res,"mb_user","mb_user_id");
- }
-}
-
-#update
-if($action == 'update'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
- $v = array($name,$selected_user);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- $sql = "UPDATE mb_user SET mb_user_name = $1";
- $sql.=", mb_user_description = $2";
- $sql.=", mb_user_login_count = $3";
- $sql.=", mb_user_email = $4";
- $sql.=", mb_user_phone = $5";
- $sql.=", mb_user_department = $6";
- $sql.=", mb_user_resolution = $7";
- $sql.=" where mb_user_id = $8";
- $v = array($name,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
- $t = array('s','s','i','s','s','s','i','i');
- $res = db_prep_query($sql,$v,$t);
- if($password != ''){
- $sql = "UPDATE mb_user SET mb_user_password = $1 WHERE mb_user_name = $2";
- $v = array(md5($password), $name);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- if($password && $res){
- echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
- }
- }
- }
-}
-if (!isset($name) || $selected_user == 'new'){
- $name = "";
- $password = "";
- $owner_id = $_SESSION["mb_user_id"];
- $owner_name = $_SESSION["mb_user_name"];
- $description = "";
- $login_count = 0;
- $email = "";
- $phone = "";
- $department = "";
- $resolution = 72;
-}
-
-
-/*HTML*****************************************************************************************************/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table border='0'>";
-#User
-echo "<tr>";
- echo "<td>";
- echo "User: ";
- echo "</td>";
-echo "<td>";
- echo "<select name='selected_user' onchange='submit()'>";
- echo "<option value='new'>NEW...</option>";
- $sql = "SELECT mb_user_name,mb_user_id FROM mb_user ";
- $v = array();
- $t = array();
- if (isset($myUser)) {
- $sql .= "WHERE mb_user_owner = $1";
- array_push($v, $_SESSION["mb_user_id"]);
- array_push($t, "i");
- }
- $sql .= " ORDER BY mb_user_name ";
- $res = db_prep_query($sql, $v, $t);
- $count=0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["mb_user_id"]."' ";
- if($selected_user && $selected_user == $row["mb_user_id"]){
- echo "selected";
- }
- echo ">".$row["mb_user_name"]."</option>";
- $count++;
- }
- echo "</select>";
- echo "</td>";
-echo "</tr>";
-
-
-if(isset($selected_user) && $selected_user != 0){
- $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $name = $row["mb_user_name"];
- $password = $row["mb_user_password"];
- $owner_id = $row["mb_user_owner"];
- $description = $row["mb_user_description"];
- $login_count = $row["mb_user_login_count"];
- $email = $row["mb_user_email"];
- $phone = $row["mb_user_phone"];
- $department = $row["mb_user_department"];
- $resolution = $row["mb_user_resolution"];
- }
- $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
- $v = array($owner_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $owner_name = $row["mb_user_name"];
- }
-}
-#name
-echo "<tr>";
- echo "<td>Name:</td>";
- echo "<td>";
- echo "<input type='text' size='30' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#password
-echo "<tr>";
- echo "<td>Password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='password' value='";
- if(isset($selected_user) && $selected_user != 'new'){
- echo $myPW;
- }
- echo "' >";
- echo "</td>";
-echo "</tr>";
-
-#confirm password
-echo "<tr>";
- echo "<td>Confirm password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='v_password' value='";
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-
-#owner
-echo "<tr>";
- echo "<td>Owner: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
- echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-
-#login_count
-echo "<tr>";
- echo "<td>Login_count: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
- echo "</td>";
-echo "</tr>";
-
-#email
-echo "<tr>";
- echo "<td>Email: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='email' value='".$email."'>";
- echo "</td>";
-echo "</tr>";
-
-#phone
-echo "<tr>";
- echo "<td>Phone: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='phone' value='".$phone."'>";
- echo "</td>";
-echo "</tr>";
-
-#department
-echo "<tr>";
- echo "<td>Department: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='department' value='".$department."'>";
- echo "</td>";
-echo "</tr>";
-
-#resolution
-echo "<tr>";
- echo "<td>Resolution: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
- echo "</td>";
-echo "</tr>";
-echo"</table>";
-if($selected_user == 'new' || !isset($selected_user)){
- echo "<input type='button' value='save' onclick='validate(\"save\")'>";
-}
-if($_SESSION["mb_user_id"] == $owner_id && $selected_user != 'new' && $selected_user != '' ){
- echo "<input type='button' value='save' onclick='validate(\"update\")'>";
- echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
-}
-?>
-<input type='hidden' name='action' value=''>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editFilteredUser.php (from rev 2138, branches/2.4.5/http/php/mod_editFilteredUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editFilteredUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editFilteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,335 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$myUser = true;
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Filtered User</title>
+<?php
+include '../include/dyn_css.php';
+$myPW = "**********";
+echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'update'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'delete'){
+ permission = confirm("Delete User?");
+ }
+ if(permission == true){
+ if(document.forms[0].password.value == myPW){
+ document.forms[0].password.value = '';
+ }
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+function validateInput(){
+ var str_alert = "Input incorrect !";
+ if(document.forms[0].name.value == ''){
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ if(document.forms[0].password.value == ''){
+ alert(str_alert);
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ if((document.forms[0].password.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].password.value != document.forms[0].v_password.value){
+ alert("Password verification failed. You have to enter the same password twice!");
+ document.forms[0].password.value = myPW;
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ if(document.forms[0].resolution.value == ''){
+ document.forms[0].resolution.value = 72;
+ return 'true';
+ }
+ if(document.forms[0].login_count.value == ''){
+ document.forms[0].login_count.value = 0;
+ return 'true';
+ }
+ return 'true';
+}
+
+</script>
+
+</head>
+<body>
+<?php
+#delete
+if($action == 'delete'){
+ $sql = "DELETE FROM mb_user WHERE mb_user_id = $1";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_user = 'new';
+}
+
+#save
+if($action == 'save'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ $sql = "Insert INTO mb_user (mb_user_name, mb_user_password, mb_user_owner, mb_user_description, ";
+ $sql .= "mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
+ $sql.= "($1,$2,$3,$4,$5,$6,$7,$8)";
+ $tmpPW = md5($password);
+ $v = array($name,$tmpPW,$owner_id,$description,$email,$phone,$department,$resolution);
+ $t = array('s','s','i','s','s','s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_user = db_insert_id($res,"mb_user","mb_user_id");
+ }
+}
+
+#update
+if($action == 'update'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
+ $v = array($name,$selected_user);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ $sql = "UPDATE mb_user SET mb_user_name = $1";
+ $sql.=", mb_user_description = $2";
+ $sql.=", mb_user_login_count = $3";
+ $sql.=", mb_user_email = $4";
+ $sql.=", mb_user_phone = $5";
+ $sql.=", mb_user_department = $6";
+ $sql.=", mb_user_resolution = $7";
+ $sql.=" where mb_user_id = $8";
+ $v = array($name,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
+ $t = array('s','s','i','s','s','s','i','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($password != ''){
+ $sql = "UPDATE mb_user SET mb_user_password = $1 WHERE mb_user_name = $2";
+ $v = array(md5($password), $name);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ if($password && $res){
+ echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
+ }
+ }
+ }
+}
+if (!isset($name) || $selected_user == 'new'){
+ $name = "";
+ $password = "";
+ $owner_id = $_SESSION["mb_user_id"];
+ $owner_name = $_SESSION["mb_user_name"];
+ $description = "";
+ $login_count = 0;
+ $email = "";
+ $phone = "";
+ $department = "";
+ $resolution = 72;
+}
+
+
+/*HTML*****************************************************************************************************/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table border='0'>";
+#User
+echo "<tr>";
+ echo "<td>";
+ echo "User: ";
+ echo "</td>";
+echo "<td>";
+ echo "<select name='selected_user' onchange='submit()'>";
+ echo "<option value='new'>NEW...</option>";
+ $sql = "SELECT mb_user_name,mb_user_id FROM mb_user ";
+ $v = array();
+ $t = array();
+ if (isset($myUser)) {
+ $sql .= "WHERE mb_user_owner = $1";
+ array_push($v, $_SESSION["mb_user_id"]);
+ array_push($t, "i");
+ }
+ $sql .= " ORDER BY mb_user_name ";
+ $res = db_prep_query($sql, $v, $t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["mb_user_id"]."' ";
+ if($selected_user && $selected_user == $row["mb_user_id"]){
+ echo "selected";
+ }
+ echo ">".$row["mb_user_name"]."</option>";
+ $count++;
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr>";
+
+
+if(isset($selected_user) && $selected_user != 0){
+ $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $name = $row["mb_user_name"];
+ $password = $row["mb_user_password"];
+ $owner_id = $row["mb_user_owner"];
+ $description = $row["mb_user_description"];
+ $login_count = $row["mb_user_login_count"];
+ $email = $row["mb_user_email"];
+ $phone = $row["mb_user_phone"];
+ $department = $row["mb_user_department"];
+ $resolution = $row["mb_user_resolution"];
+ }
+ $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
+ $v = array($owner_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $owner_name = $row["mb_user_name"];
+ }
+}
+#name
+echo "<tr>";
+ echo "<td>Name:</td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#password
+echo "<tr>";
+ echo "<td>Password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='password' value='";
+ if(isset($selected_user) && $selected_user != 'new'){
+ echo $myPW;
+ }
+ echo "' >";
+ echo "</td>";
+echo "</tr>";
+
+#confirm password
+echo "<tr>";
+ echo "<td>Confirm password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='v_password' value='";
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+
+#owner
+echo "<tr>";
+ echo "<td>Owner: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
+ echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+
+#login_count
+echo "<tr>";
+ echo "<td>Login_count: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
+ echo "</td>";
+echo "</tr>";
+
+#email
+echo "<tr>";
+ echo "<td>Email: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='email' value='".$email."'>";
+ echo "</td>";
+echo "</tr>";
+
+#phone
+echo "<tr>";
+ echo "<td>Phone: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='phone' value='".$phone."'>";
+ echo "</td>";
+echo "</tr>";
+
+#department
+echo "<tr>";
+ echo "<td>Department: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='department' value='".$department."'>";
+ echo "</td>";
+echo "</tr>";
+
+#resolution
+echo "<tr>";
+ echo "<td>Resolution: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
+ echo "</td>";
+echo "</tr>";
+echo"</table>";
+if($selected_user == 'new' || !isset($selected_user)){
+ echo "<input type='button' value='save' onclick='validate(\"save\")'>";
+}
+if($_SESSION["mb_user_id"] == $owner_id && $selected_user != 'new' && $selected_user != '' ){
+ echo "<input type='button' value='save' onclick='validate(\"update\")'>";
+ echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
+}
+?>
+<input type='hidden' name='action' value=''>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_editGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,217 +0,0 @@
-<?php
-# $Id: mod_editGroup.php
-# http://www.mapbender.org/index.php/mod_editGroup.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<head>
-<title>Edit Group</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(val == 'update'){
- permission = confirm("Save changes?");
- }
- if(val == 'delete'){
- permission = confirm("Delete Group?");
- }
- if(permission == true){
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-function validateInput(){
- var str_alert = "Input incorrect !";
- if(document.forms[0].name.value == ''){
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- return 'true';
-}
-</script>
-
-</head>
-<body>
-<?php
-#delete
-if($action == 'delete'){
- $sql = "DELETE FROM mb_group WHERE mb_group_id = $1";
- $v = array( $selected_group);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $selected_group = 'new';
-}
-
-#save
-if($action == 'save'){
- $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('groupname must be unique!');</script>";
- }
- else{
- $sql = "Insert INTO mb_group (mb_group_name, mb_group_owner, mb_group_description) VALUES ";
- $sql.= "($1, $2,$3);";
- $v = array($name,$owner_id,$description);
- $t = array('s','i','s');
- $res = db_prep_query($sql,$v,$t);
- $selected_group = db_insert_id($res,"mb_group","mb_group_id");
- }
-}
-
-#update
-if($action == 'update'){
- $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 AND mb_group_id <> $2";
- $v = array($name,$selected_group);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Groupname must be unique!');</script>";
- }
- else{
- $sql = "UPDATE mb_group SET mb_group_name = $1";
- $sql.=", mb_group_description = $2";
- $sql.=" where mb_group_id = $3";
- $v = array($name,$description,$selected_group);
- $t = array('s','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
-}
-if (!isset($name) || $selected_group == 'new'){
- $name = "";
- $owner_id = $_SESSION["mb_user_id"];
- $owner_name = $_SESSION["mb_user_name"];
- $description = "";
-}
-
-/*HTML*****************************************************************************************************/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table border='0'>";
-#User
-echo "<tr>";
- echo "<td>";
- echo "Group: ";
- echo "</td>";
-echo "<td>";
- echo "<select name='selected_group' onchange='submit()'>";
- echo "<option value='new'>NEW...</option>";
- $sql = "SELECT mb_group_name,mb_group_id FROM mb_group ";
- $v = array();
- $t = array();
- if (isset($myGroup)) {
- $sql .= "WHERE mb_group_owner = $1";
- array_push($v, $_SESSION["mb_user_id"]);
- array_push($t, "i");
- }
- $sql .= " ORDER BY mb_group_name ";
- $res = db_prep_query($sql, $v, $t);
- $count=0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["mb_group_id"]."' ";
- if($selected_group && $selected_group == $row["mb_group_id"]){
- echo "selected";
- }
- echo ">".$row["mb_group_name"]."</option>";
- $count++;
- }
- echo "</select>";
- echo "</td>";
-echo "</tr>";
-
-
-if(isset($selected_group) && $selected_group != 0){
- $sql = "SELECT * FROM mb_group WHERE mb_group_id = $1 ORDER BY mb_group_name ";
- $v = array($selected_group);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $name = $row["mb_group_name"];
- $owner_id = $row["mb_group_owner"];
- $description = $row["mb_group_description"];
- }
- $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
- $v = array($owner_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $owner_name = $row["mb_user_name"];
- }
-}
-#name
-echo "<tr>";
- echo "<td>Name:</td>";
- echo "<td>";
- echo "<input type='text' size='30' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#owner
-echo "<tr>";
- echo "<td>Owner: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
- echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-echo"</table>";
-if($selected_group == 'new' || !isset($selected_group)){
- echo "<input type='button' value='save' onclick='validate(\"save\")'>";
-}
-if($_SESSION["mb_user_id"] == $owner_id && $selected_group != 'new' && $selected_group != '' ){
- echo "<input type='button' value='save' onclick='validate(\"update\")'>";
- echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
-}
-?>
-<input type='hidden' name='action' value=''>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editGroup.php (from rev 2138, branches/2.4.5/http/php/mod_editGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,216 @@
+<?php
+# $Id: mod_editGroup.php
+# http://www.mapbender.org/index.php/mod_editGroup.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<head>
+<title>Edit Group</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'update'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'delete'){
+ permission = confirm("Delete Group?");
+ }
+ if(permission == true){
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+function validateInput(){
+ var str_alert = "Input incorrect !";
+ if(document.forms[0].name.value == ''){
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ return 'true';
+}
+</script>
+
+</head>
+<body>
+<?php
+#delete
+if($action == 'delete'){
+ $sql = "DELETE FROM mb_group WHERE mb_group_id = $1";
+ $v = array( $selected_group);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_group = 'new';
+}
+
+#save
+if($action == 'save'){
+ $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('groupname must be unique!');</script>";
+ }
+ else{
+ $sql = "Insert INTO mb_group (mb_group_name, mb_group_owner, mb_group_description) VALUES ";
+ $sql.= "($1, $2,$3);";
+ $v = array($name,$owner_id,$description);
+ $t = array('s','i','s');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_group = db_insert_id($res,"mb_group","mb_group_id");
+ }
+}
+
+#update
+if($action == 'update'){
+ $sql = "SELECT mb_group_id FROM mb_group WHERE mb_group_name = $1 AND mb_group_id <> $2";
+ $v = array($name,$selected_group);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Groupname must be unique!');</script>";
+ }
+ else{
+ $sql = "UPDATE mb_group SET mb_group_name = $1";
+ $sql.=", mb_group_description = $2";
+ $sql.=" where mb_group_id = $3";
+ $v = array($name,$description,$selected_group);
+ $t = array('s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+}
+if (!isset($name) || $selected_group == 'new'){
+ $name = "";
+ $owner_id = $_SESSION["mb_user_id"];
+ $owner_name = $_SESSION["mb_user_name"];
+ $description = "";
+}
+
+/*HTML*****************************************************************************************************/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table border='0'>";
+#User
+echo "<tr>";
+ echo "<td>";
+ echo "Group: ";
+ echo "</td>";
+echo "<td>";
+ echo "<select name='selected_group' onchange='submit()'>";
+ echo "<option value='new'>NEW...</option>";
+ $sql = "SELECT mb_group_name,mb_group_id FROM mb_group ";
+ $v = array();
+ $t = array();
+ if (isset($myGroup)) {
+ $sql .= "WHERE mb_group_owner = $1";
+ array_push($v, $_SESSION["mb_user_id"]);
+ array_push($t, "i");
+ }
+ $sql .= " ORDER BY mb_group_name ";
+ $res = db_prep_query($sql, $v, $t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["mb_group_id"]."' ";
+ if($selected_group && $selected_group == $row["mb_group_id"]){
+ echo "selected";
+ }
+ echo ">".$row["mb_group_name"]."</option>";
+ $count++;
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr>";
+
+
+if(isset($selected_group) && $selected_group != 0){
+ $sql = "SELECT * FROM mb_group WHERE mb_group_id = $1 ORDER BY mb_group_name ";
+ $v = array($selected_group);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $name = $row["mb_group_name"];
+ $owner_id = $row["mb_group_owner"];
+ $description = $row["mb_group_description"];
+ }
+ $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
+ $v = array($owner_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $owner_name = $row["mb_user_name"];
+ }
+}
+#name
+echo "<tr>";
+ echo "<td>Name:</td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#owner
+echo "<tr>";
+ echo "<td>Owner: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
+ echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+echo"</table>";
+if($selected_group == 'new' || !isset($selected_group)){
+ echo "<input type='button' value='save' onclick='validate(\"save\")'>";
+}
+if($_SESSION["mb_user_id"] == $owner_id && $selected_group != 'new' && $selected_group != '' ){
+ echo "<input type='button' value='save' onclick='validate(\"update\")'>";
+ echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
+}
+?>
+<input type='hidden' name='action' value=''>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editGuiWms.php
===================================================================
--- branches/2.4.5/http/php/mod_editGuiWms.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editGuiWms.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,655 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_editGuiWms.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI WMS</title>
-<?php
-include_once '../include/dyn_css.php';
-
-
-function toImage($text) {
- $angle = 90;
- if (extension_loaded("gd2")) {
- return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
- }
- return $text;
-}
-?>
-
-<script language="JavaScript">
-
-
-function edit_gaz(gui,wms,layer){
- window.open("../php/mod_wfsLayerObj_conf.php?gui="+gui+"&wms="+wms+"&layer="+layer);
-}
-function validate(wert){
- if(wert == 'delete_wms'){
- if(document.form1.wmsList.selectedIndex == -1){
- document.form1.wmsList.style.background = '#ff0000';
- }else{
-
- var secure = confirm("Remove WMS in this GUI ?");
- if(secure == true){
- document.form1.del.value='true';
- document.form1.submit();
- }
- }
- }
-
- if(wert == 'up_wms'){
- if(document.form1.wmsList.selectedIndex == -1){
- document.form1.wmsList.style.background = '#ff0000';
- }else{
- if (document.form1.wmsList.selectedIndex>0){
- document.form1.up.value='true';
- document.form1.submit();
- }
- }
- }
-
- if(wert == 'down_wms'){
- if(document.form1.wmsList.selectedIndex == -1){
- document.form1.wmsList.style.background = '#ff0000';
- }else{
- if (document.form1.wmsList.selectedIndex<document.form1.wmsList.length-1){
- document.form1.down.value='true';
- document.form1.submit();
- }
- }
- }
-
-}
-function checkBoxValue(){
- for(var i=0; i<document.forms[0].elements.length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked == true){
- document.forms[0].elements[i].value = '1';
- }
- else{
- document.forms[0].elements[i].value = '0';
- document.forms[0].elements[i].checked = true;
- }
- }
- if(document.forms[0].elements[i].type == 'text' && ( document.forms[0].elements[i].name.indexOf("minscale") > -1 || document.forms[0].elements[i].name.indexOf("maxscale") > -1 )){
- var nr = parseInt(document.forms[0].elements[i].value);
- if(isNaN(nr) == true){document.forms[0].elements[i].value = 0;}
- else{document.forms[0].elements[i].value = nr;}
- }
- }
- document.forms[0].update_content.value=1;
- document.forms[0].submit();
-}
-function getAllLayer(){
- var arrayLayer = new Array();
- var cntLayer = 0;
- for(var i=0; i<document.forms[0].elements.length; i++){
- if(document.forms[0].elements[i].name.indexOf("layer_id") > -1){
- arrayLayer[cntLayer] = document.forms[0].elements[i].value;
- cntLayer++;
- }
- }
- return arrayLayer;
-}
-function setSubs(){
- var arrayLayer = getAllLayer();
- for(var i=0; i<arrayLayer.length; i++){
- if(parseInt(eval("document.forms[0].L_" + arrayLayer[i] + "___layer_parent.value")) > 0){
- eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_status.checked = false");
- }
- }
-}
-function setLayer(def,status){
- var arrayLayer = getAllLayer();
- if(def == 'querylayer'){
- for(var i=1; i<arrayLayer.length; i++){
- if(eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_querylayer.disabled == false")){
- eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_querylayer.checked = " + status);
- }
- }
- }
- if(def == 'visible'){
- for(var i=1; i<arrayLayer.length; i++){
- eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_visible.checked = " + status);
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$mb_user_id=$_SESSION["mb_user_id"];
-
-#delete gui_wms from gui
-if($del && $del == 'true'){
- $sql="SELECT DISTINCT gui_wms_position from gui_wms WHERE fkey_gui_id = $1 and fkey_wms_id = $2";
- $v = array($guiList,$wmsList);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $wms_position = $row["gui_wms_position"];
- $cnt++;
- }
- #if($cnt > 1){die("Error: WMS (ID) not unique!");}
-
- $sql = "Delete from gui_wms where fkey_gui_id = $1 and fkey_wms_id = $2 ";
- $v = array($guiList,$wmsList);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
-
- $sql = "Delete from gui_layer where fkey_gui_id = $1 and gui_layer_wms_id = $2";
- $v = array($guiList,$wmsList);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
-
- $del='false';
-
- $sql = "UPDATE gui_wms SET gui_wms_position = (gui_wms_position - 1) WHERE gui_wms_position > $1";
- $sql .= " AND fkey_gui_id = $2 ";
- $v = array($wms_position,$guiList);
- $t = array('i','s');
- $res = db_prep_query($sql,$v,$t);
-
- unset($wmsList);
-}
-
-#update gui_wms_position
-if($up && $up == 'true'){
- if ($wmsList!=""){
- $sql = "SELECT gui_wms_position ";
- $sql .= "FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
- $v = array($guiList,$wmsList);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $wms_position = $row["gui_wms_position"];
- }
- }
- if($wms_position > 0){
- $sql = "UPDATE gui_wms SET ";
- $sql .= "gui_wms_position = $1";
- $sql .= " WHERE fkey_gui_id = $2 AND fkey_wms_id = $3";
- $v = array(($wms_position - 1),$guiList,$wmsList);
- $t = array('i','s','i');
- $res = db_prep_query($sql,$v,$t);
- $sql = "UPDATE gui_wms SET ";
- $sql .= "gui_wms_position = $1";
- $sql .= " WHERE gui_wms_position = $2 AND fkey_gui_id = $3 AND fkey_wms_id <> $4 ";
- $v = array($wms_position,($wms_position - 1),$guiList,$wmsList);
- $t = array('i','i','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
-}
-
-if($down && $down == 'true'){
- $max = 0;
- if ($wmsList!=""){
- $sql = "SELECT gui_wms_position ";
- $sql .= "FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
- $v = array($guiList,$wmsList);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $wms_position = $row["gui_wms_position"];
- }
- $sql = "SELECT MAX(gui_wms_position) as max FROM gui_wms WHERE fkey_gui_id = $1 ";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $max = $row["max"];
- }
- }
- if($wms_position < $max){
- $sql = "UPDATE gui_wms SET ";
- $sql .= "gui_wms_position = $1";
- $sql .= " WHERE fkey_gui_id = $2 AND fkey_wms_id = $3";
- $v = array(($wms_position + 1),$guiList,$wmsList);
- $t = array('i','s','i');
- $res = db_prep_query($sql,$v,$t);
- $sql = "UPDATE gui_wms SET ";
- $sql .= "gui_wms_position = $1";
- $sql .= " WHERE gui_wms_position = $2 AND fkey_gui_id = $3 AND fkey_wms_id <> $4";
- $v = array($wms_position,($wms_position + 1),$guiList,$wmsList);
- $t = array('i','i','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
-}
-
-/*handle Updates*/
-if(isset($update_content) && $update_content == "1"){
- if(isset($this_gui_wms_epsg)){
- $sql = "UPDATE gui_wms set gui_wms_epsg = $1, gui_wms_mapformat = $2, ";
- $sql .= "gui_wms_featureinfoformat = $3, gui_wms_exceptionformat = $4, ";
- $sql .= "gui_wms_visible = $5 ";
- $sql .= "WHERE fkey_gui_id = $6 AND fkey_wms_id = $7";
- $v = array($this_gui_wms_epsg,$this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
- $t = array('s','s','s','s','i','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
- else{
- $sql = "UPDATE gui_wms set gui_wms_mapformat = $1, ";
- $sql .= "gui_wms_featureinfoformat = $2, gui_wms_exceptionformat = $3, ";
- $sql .= "gui_wms_visible = $4 ";
- $sql .= "WHERE fkey_gui_id = $5 AND fkey_wms_id = $6";
- $v = array($this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
- $t = array('s','s','s','i','s','i');
- $res = db_prep_query($sql,$v,$t);
- }
-
- /**/
-
- $cnt = 0;
- while(list($key,$val) = each($_REQUEST)){
- if(preg_match("/___/", $key)){
- $myKey = explode("___", $key);
- if($myKey[1]!="layer_parent" && $myKey[1]!='layer_id' ){
- $sql = "UPDATE gui_layer SET ".$myKey[1]." = $1 WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
- $v = array($val,$this_gui,preg_replace("/L_/","",$myKey[0]));
- $t = array('i','s','i');
- if(!$res = db_prep_query($sql,$v,$t)){
- echo "FEHLER in ZEILE 249";
- }
- }
- }
- }
-}
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table cellpadding='3' cellspacing='3' border='0' class='table_top'>";
-
-echo "<tr>";
-echo "<td>";
-echo "GUI";
-echo "</td>";
-echo "<td>";
-echo "WMS-TITLE";
-echo "</td>";
-echo "<td>";
-echo "</td>";
-echo "<tr>";
-
-echo "<td>";
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-
-$gui_id =array();
-if (count($ownguis)>0){
- for($i=0; $i<count($ownguis); $i++){
- $gui_id[$i]=$ownguis[$i];
- }
-}
-
-echo"<select size='8' name='guiList' onchange='document.form1.wmsList.selectedIndex = -1;submit()'>";
-$selected_gui_id="";
-
-for ($i=0; $i<count($ownguis);$i++){
- echo "<option value='".$gui_id[$i]."' ";
- if($guiList && $guiList == $gui_id[$i]){
- echo "selected";
- $selected_gui_id=$gui_id[$i];
- }
- else{
- if ($i==0){
- echo "selected";
- $selected_gui_id=$gui_id[$i];
- }
- }
- echo ">".$gui_id[$i]."</option>";
-}
-
-echo "</select>";
-echo "</td>";
-echo "<td>";
-
-$sql = "SELECT * from gui_wms JOIN gui ON gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON ";
-$sql .= "gui_wms.fkey_wms_id = wms.wms_id AND gui_wms.fkey_gui_id=gui.gui_id WHERE gui.gui_id = $1 ORDER BY gui_wms_position";
-$v = array($selected_gui_id);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$count_wms = 0;
-echo "<select size='8' name='wmsList' style='width:200px' onchange='submit()'>";
-
-while($row = db_fetch_array($res)){
- echo "<option value='".$row["wms_id"]."' ";
- if(isset($wmsList) && $wmsList == $row["wms_id"]){
- echo "selected";
- }
- echo ">".$row["gui_wms_position"]." - ".$row["wms_title"]."</option>";
- $count_wms++;
-}
-echo "</select>";
-echo "</td><td>";
-echo "<input class='myButton' type='button' name='up_wms' value=' up ' onClick='validate(\"up_wms\")'>";
-echo "<input type='hidden' name='up' value=''><br><br>";
-
-echo "<input class='myButton' type='button' name='down_wms' value='down' onClick='validate(\"down_wms\")'>";
-echo "<input type='hidden' name='down' value=''><br><br>";
-
-echo "<input class='myButton' type='button' name='delete_wms' value='remove' onClick='validate(\"delete_wms\")'>";
-echo "<input type='hidden' name='del' value=''>";
-
-echo "</td>";
-echo "</tr>";
-echo "</table>";
-
-
-if(isset($wmsList)){
-#gui_wms
-$sql_gw = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
-$v = array($guiList,$wmsList);
-$t = array('s','i');
-$res_gw = db_prep_query($sql_gw,$v,$t);
-$cnt_gw = 0;
-while($row = db_fetch_array($res_gw)){
- $gui_wms_position[$cnt_gw] = $row["gui_wms_position"];
- $gui_wms_mapformat[$cnt_gw] = $row["gui_wms_mapformat"];
- $gui_wms_featureinfoformat[$cnt_gw] = $row["gui_wms_featureinfoformat"];
- $gui_wms_exceptionformat[$cnt_gw] = $row["gui_wms_exceptionformat"];
- $gui_wms_epsg[$cnt_gw] = $row["gui_wms_epsg"];
- $gui_wms_visible[$cnt_gw] = $row["gui_wms_visible"];
- $cnt_gw++;
-}
-#wms
-$sql_w = "SELECT * FROM wms WHERE wms_id = $1";
-$v = array($wmsList);
-$t = array('i');
-$res_w = db_prep_query($sql_w,$v,$t);
-$cnt_w = 0;
-while($row = db_fetch_array($res_w)){
- $wms_id[$cnt_w] = $row["wms_id"];
- $wms_version[$cnt_w] = $row["wms_version"];
- $wms_title[$cnt_w] = $row["wms_title"];
- $wms_abstract[$cnt_w] = $row["wms_abstract"];
- $wms_getcapabilities[$cnt_w] = $row["wms_getcapabilities"];
- $cnt_w++;
- }
-#wms_format
-$sql_wf = "SELECT * FROM wms_format WHERE fkey_wms_id = $1";
-$v = array($wmsList);
-$t = array('i');
-$res_wf = db_prep_query($sql_wf,$v,$t);
-$cnt_wf = 0;
-while($row = db_fetch_array($res_wf)){
- $data_type[$cnt_wf] = $row["data_type"];
- $data_format[$cnt_wf] = $row["data_format"];
- $cnt_wf++;
- }
-#gui_layer
-$sql_gl = "SELECT * FROM layer AS l, gui_layer AS gl WHERE l.layer_id = gl.fkey_layer_id AND gl.gui_layer_wms_id = $1 AND gl.fkey_gui_id = $2 ORDER BY l.layer_pos";
-$v = array($wmsList,$guiList);
-$t = array('i','s');
-$res_gl = db_prep_query($sql_gl,$v,$t);
-$gui_layer_status = array();
-$gui_layer_selectable = array();
-$gui_layer_visible = array();
-$gui_layer_queryable = array();
-$gui_layer_querylayer = array();
-$gui_layer_minscale = array();
-$gui_layer_maxscale = array();
-$gui_layer_priority = array();
-$gui_layer_wfs_featuretype = array();
-$layer_id = array();
-$layer_parent = array();
-$layer_name = array();
-$layer_title = array();
-$layer_queryable = array();
-$layer_minscale = array();
-$layer_maxscale = array();
-while($row = db_fetch_array($res_gl)){
- array_push($gui_layer_status, $row["gui_layer_status"]);
- array_push($gui_layer_selectable, $row["gui_layer_selectable"]);
- array_push($gui_layer_visible, $row["gui_layer_visible"]);
- array_push($gui_layer_queryable, $row["gui_layer_queryable"]);
- array_push($gui_layer_querylayer, $row["gui_layer_querylayer"]);
- array_push($gui_layer_minscale, $row["gui_layer_minscale"]);
- array_push($gui_layer_maxscale, $row["gui_layer_maxscale"]);
- array_push($gui_layer_priority, $row["gui_layer_priority"]);
- array_push($gui_layer_wfs_featuretype, $row["gui_layer_wfs_featuretype"]);
- array_push($layer_id, $row["layer_id"]);
- array_push($layer_parent, $row["layer_parent"]);
- array_push($layer_name, $row["layer_name"]);
- array_push($layer_title, $row["layer_title"]);
- array_push($layer_queryable, $row["layer_queryable"]);
- array_push($layer_minscale, $row["layer_minscale"]);
- array_push($layer_maxscale, $row["layer_maxscale"]);
-}
-
-#layer_epsg
-$sql_le = "SELECT * FROM layer_epsg WHERE fkey_layer_id = $1";
-$v = array($layer_id[0]);
-$t = array('i');
-$res_le = db_prep_query($sql_le,$v,$t);
-$cnt_le = 0;
-while($row = db_fetch_array($res_le)){
- $epsg[$cnt_le] = $row["epsg"];
- $cnt_le++;
- }
-
-echo "<div style='position:absolute;left:590px; top:180px;' ><input type='button' style='width:100px;height:100px;background-color:#0066cc' value='save' onclick='checkBoxValue()'></div>";
-echo "<table class='table_top'>";
-echo "<tr>";
-echo "<td colspan='2'>";
-echo "<a href='".$wms_getcapabilities[0];
-if( $wms_version[0] == "1.0.0"){ echo "&WMTVER=". $wms_version[0]."&REQUEST=capabilities";}
-else{echo "&VERSION=". $wms_version[0]."&REQUEST=GetCapabilities&SERVICE=WMS";}
-echo "' style='font-size:14px' target='_blank'>LINK: Capabilites</a>";
-echo "</td>";
-echo "<td align = right>WMS ID: " . $wms_id[0] . "</td>";
-echo "<tr>";
-#epsg
-if($gui_wms_position[0] == 0){
- echo "<tr>";
- echo "<td>EPSG: </td><td>";
- echo "<select class='mySelect' name='this_gui_wms_epsg'>";
- for($i=0; $i<count($epsg); $i++){
- echo "<option value='".$epsg[$i]."' ";
- if($epsg[$i] == $gui_wms_epsg[0]){ echo "selected";}
- echo ">".$epsg[$i]."</option>";
- }
- echo "</select>";
- echo "</td>";
- echo "</tr>";
-}
-#format
-echo "<tr>";
- echo "<td>Mapformat: </td><td>";
- echo "<select class='mySelect' name='this_gui_wms_mapformat'>";
- for($i=0; $i<count($data_format); $i++){
- if($data_type[$i] == 'map'){
- echo "<option value='".$data_format[$i]."' ";
- if($data_format[$i] == $gui_wms_mapformat[0]){ echo "selected";}
- echo ">".$data_format[$i]."</option>";
- }
- }
- echo "</select>";
- echo "</td>";
-
-echo "</tr>";
-
-echo "<tr>";
- echo "<td>Infoformat: </td><td>";
- echo "<select class='mySelect' name='this_gui_wms_featureinfoformat'>";
- echo "<option value='text/html'>text/html</option>";
- for($i=0; $i<count($data_format); $i++){
- if($data_type[$i] == 'featureinfo'){
- echo "<option value='".$data_format[$i]."' ";
- if($data_format[$i] == $gui_wms_featureinfoformat[0]){ echo "selected";}
- echo ">".$data_format[$i]."</option>";
- }
- }
- echo "</select>";
- echo "</td>";
-echo "</tr>";
-
-echo "<tr>";
- echo "<td>Exceptionformat: </td><td>";
- echo "<select class='mySelect' name='this_gui_wms_exceptionformat'>";
- for($i=0; $i<count($data_format); $i++){
- if($data_type[$i] == 'exception'){
- echo "<option value='".$data_format[$i]."' ";
- if($data_format[$i] == $gui_wms_exceptionformat[0]){ echo "selected";}
- echo ">".$data_format[$i]."</option>";
- }
- }
- echo "</select>";
- echo "</td>";
-echo "</tr><br>";
-
-# visibility
-echo "<tr>";
- echo "<td>Visibility: </td><td>";
- echo "<select class='mySelect' name='this_gui_wms_visible'>";
- for($i=0; $i<3; $i++){
- echo "<option value='".$i."' ";
- if($i == $gui_wms_visible[0]){ echo "selected";}
- echo ">";
- if($i == '0'){
- echo "hidden";
- }
- if($i == '1'){
- echo "visible";
- }
- echo "</option>";
- }
- echo "</select>";
- echo "</td>";
-
-echo "</tr>";
-
-echo "</table><br>";
-
-echo "<table border='1' cellpadding='1'>";
-
- echo "<tr>";
- echo "<td>Nr.</td>";
- echo "<td>ID</td>";
- echo "<td>" . toImage('Parent') . "</td>";
- echo "<td>Name</td>";
- echo "<td>Title</td>";
- echo "<td>" . toImage('on/off') . "</td>";
- echo "<td>" . toImage('sel') . "</td>";
- echo "<td>" . toImage('sel_default') . "</td>";
- echo "<td>" . toImage('info') . "</td>";
- echo "<td>" . toImage('info_default') . "</td>";
- echo "<td>" . toImage('minScale 1:') . "</td>";
- echo "<td>" . toImage('maxScale 1:') . "</td>";
- echo "<td>" . toImage('Prio') . "</td>";
- echo "<td>" . toImage('setWFS') . "</td>";
- echo "</tr>";
-
-#echo "<tr><td>Nr.</td><td>ID</td><td>Parent</td><td>Name</td><td>Title</td><td>on/off</td><td>sel</td><td>sel_default</td><td>info</td><td>info_default</td><td>minScale 1:</td><td>maxScale 1:</td><td>Prio</td><td>setWFS</td></tr>";
-echo "<tr><td></td><td></td><td></td><td></td><td></td><td>";
-echo "<input type='button' class='LButton' value='Sublayer\noff' onclick='setSubs()'>";
-echo "</td><td></td><td>";
-echo "<nobr><input type='button' class='button_on_off' value='off' onclick='setLayer(\"visible\",false)'> ";
-echo "<input type='button' class='button_on_off' value='on' onclick='setLayer(\"visible\",true)'></nobr>";
-echo"</td><td></td><td>";
-echo "<nobr><input type='button' class='button_on_off' value='off' onclick='setLayer(\"querylayer\",false)'> ";
-echo "<input type='button' class='button_on_off' value='on' onclick='setLayer(\"querylayer\",true)'></nobr>";
-echo "</td><td></td><td></td><td></td></tr>";
-for($i=0; $i<count($layer_id); $i++){
- echo "<tr align='center'>";
- echo "<td><input type='text' size='1' name='L_".$layer_id[$i]."___layer_nr' disabled value='".$i."'></td>";
- echo "<td style='background:lightgrey'><input type='text' size='2' name='L_".$layer_id[$i]."___layer_id' value='".$layer_id[$i]."' readonly></td>";
- echo "<td><input type='text' size='1' name='L_".$layer_id[$i]."___layer_parent' value='".$layer_parent[$i]."' readonly></td>";
- echo "<td style='background:lightgrey'><input type='text' size='7' value='".$layer_name[$i]."' readonly></td>";
- echo "<td><input type='text' name='".$layer_title[$i]."' size='12' value='".$layer_title[$i]."' readonly></td>";
-
- echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_status' type='checkbox' ";
- if($gui_layer_status[$i] == 1){ echo "checked";}
- echo "></td>";
-
- echo "<td><input name='L_".$layer_id[$i]."___gui_layer_selectable' type='checkbox' ";
- if($gui_layer_selectable[$i] == 1){ echo "checked";}
- echo "></td>";
-
- echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_visible' type='checkbox' ";
- if($gui_layer_visible[$i] == 1){ echo "checked";}
- echo "></td>";
-
- echo "<td><input name='L_".$layer_id[$i]."___gui_layer_queryable' type='checkbox' ";
- if($gui_layer_queryable[$i] == 1){ echo "checked";}
- if($layer_queryable[$i] == 0){ echo "disabled";}
- echo "></td>";
-
- echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_querylayer' type='checkbox' ";
- if($gui_layer_querylayer[$i] == 1){ echo "checked";}
- if($layer_queryable[$i] == 0){ echo "disabled";}
- echo "></td>";
-
- echo "<td><input name='L_".$layer_id[$i]."___gui_layer_minscale' type='text' size='5' value='".$gui_layer_minscale[$i]."'></td>";
- echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_maxscale' type='text' size='5' value='".$gui_layer_maxscale[$i]."'></td>";
- /**/
- echo "<td><select class='select_short' name='L_".$layer_id[$i]."___gui_layer_priority'>";
- for($j=0; $j<count($gui_layer_priority); $j++){
- echo "<option value='".$j."'";
- if($j == $gui_layer_priority[$i]){echo "selected";}
- echo ">".$j;
- echo "</option>";
- }
- echo "</select></td>\n";
- /* wfs configuration */
- echo "<td>";
- if ($i > 0) {
- echo "<input class='button_wfs'name='gui_layer_gaz' type='button' onclick='edit_gaz(\"".$guiList."\",".$wmsList.",".$layer_id[$i].")' value='";
- if($gui_layer_wfs_featuretype[$i] == ""){
- echo "setWFS";
- }
- else{
- echo "wfs ".$gui_layer_wfs_featuretype[$i];
- }
- echo "'>";
- }
- echo "</td>";
- echo "</tr>\n";
- if($i == 0){ echo "<tr><td colspan='14'><hr></td></tr>";}
-}
-echo "</table>\n";
-echo "<input type='hidden' name='this_gui' value='".$guiList."'>\n";
-echo "<input type='hidden' name='this_wms' value='".$wmsList."'>\n";
-echo "<input type='hidden' name='this_layer_count' value='".$cnt_l."'>\n";
-echo "<input type='hidden' name='update_content' value=''>\n";
-echo "</form>\n";
-}
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editGuiWms.php (from rev 2138, branches/2.4.5/http/php/mod_editGuiWms.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editGuiWms.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editGuiWms.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,654 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_editGuiWms.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI WMS</title>
+<?php
+include_once '../include/dyn_css.php';
+
+
+function toImage($text) {
+ $angle = 90;
+ if (extension_loaded("gd2")) {
+ return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+ }
+ return $text;
+}
+?>
+
+<script language="JavaScript">
+
+
+function edit_gaz(gui,wms,layer){
+ window.open("../php/mod_wfsLayerObj_conf.php?gui="+gui+"&wms="+wms+"&layer="+layer);
+}
+function validate(wert){
+ if(wert == 'delete_wms'){
+ if(document.form1.wmsList.selectedIndex == -1){
+ document.form1.wmsList.style.background = '#ff0000';
+ }else{
+
+ var secure = confirm("Remove WMS in this GUI ?");
+ if(secure == true){
+ document.form1.del.value='true';
+ document.form1.submit();
+ }
+ }
+ }
+
+ if(wert == 'up_wms'){
+ if(document.form1.wmsList.selectedIndex == -1){
+ document.form1.wmsList.style.background = '#ff0000';
+ }else{
+ if (document.form1.wmsList.selectedIndex>0){
+ document.form1.up.value='true';
+ document.form1.submit();
+ }
+ }
+ }
+
+ if(wert == 'down_wms'){
+ if(document.form1.wmsList.selectedIndex == -1){
+ document.form1.wmsList.style.background = '#ff0000';
+ }else{
+ if (document.form1.wmsList.selectedIndex<document.form1.wmsList.length-1){
+ document.form1.down.value='true';
+ document.form1.submit();
+ }
+ }
+ }
+
+}
+function checkBoxValue(){
+ for(var i=0; i<document.forms[0].elements.length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked == true){
+ document.forms[0].elements[i].value = '1';
+ }
+ else{
+ document.forms[0].elements[i].value = '0';
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ if(document.forms[0].elements[i].type == 'text' && ( document.forms[0].elements[i].name.indexOf("minscale") > -1 || document.forms[0].elements[i].name.indexOf("maxscale") > -1 )){
+ var nr = parseInt(document.forms[0].elements[i].value);
+ if(isNaN(nr) == true){document.forms[0].elements[i].value = 0;}
+ else{document.forms[0].elements[i].value = nr;}
+ }
+ }
+ document.forms[0].update_content.value=1;
+ document.forms[0].submit();
+}
+function getAllLayer(){
+ var arrayLayer = new Array();
+ var cntLayer = 0;
+ for(var i=0; i<document.forms[0].elements.length; i++){
+ if(document.forms[0].elements[i].name.indexOf("layer_id") > -1){
+ arrayLayer[cntLayer] = document.forms[0].elements[i].value;
+ cntLayer++;
+ }
+ }
+ return arrayLayer;
+}
+function setSubs(){
+ var arrayLayer = getAllLayer();
+ for(var i=0; i<arrayLayer.length; i++){
+ if(parseInt(eval("document.forms[0].L_" + arrayLayer[i] + "___layer_parent.value")) > 0){
+ eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_status.checked = false");
+ }
+ }
+}
+function setLayer(def,status){
+ var arrayLayer = getAllLayer();
+ if(def == 'querylayer'){
+ for(var i=1; i<arrayLayer.length; i++){
+ if(eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_querylayer.disabled == false")){
+ eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_querylayer.checked = " + status);
+ }
+ }
+ }
+ if(def == 'visible'){
+ for(var i=1; i<arrayLayer.length; i++){
+ eval("document.forms[0].L_" + arrayLayer[i] + "___gui_layer_visible.checked = " + status);
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$mb_user_id=$_SESSION["mb_user_id"];
+
+#delete gui_wms from gui
+if($del && $del == 'true'){
+ $sql="SELECT DISTINCT gui_wms_position from gui_wms WHERE fkey_gui_id = $1 and fkey_wms_id = $2";
+ $v = array($guiList,$wmsList);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $wms_position = $row["gui_wms_position"];
+ $cnt++;
+ }
+ #if($cnt > 1){die("Error: WMS (ID) not unique!");}
+
+ $sql = "Delete from gui_wms where fkey_gui_id = $1 and fkey_wms_id = $2 ";
+ $v = array($guiList,$wmsList);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+
+ $sql = "Delete from gui_layer where fkey_gui_id = $1 and gui_layer_wms_id = $2";
+ $v = array($guiList,$wmsList);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+
+ $del='false';
+
+ $sql = "UPDATE gui_wms SET gui_wms_position = (gui_wms_position - 1) WHERE gui_wms_position > $1";
+ $sql .= " AND fkey_gui_id = $2 ";
+ $v = array($wms_position,$guiList);
+ $t = array('i','s');
+ $res = db_prep_query($sql,$v,$t);
+
+ unset($wmsList);
+}
+
+#update gui_wms_position
+if($up && $up == 'true'){
+ if ($wmsList!=""){
+ $sql = "SELECT gui_wms_position ";
+ $sql .= "FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
+ $v = array($guiList,$wmsList);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $wms_position = $row["gui_wms_position"];
+ }
+ }
+ if($wms_position > 0){
+ $sql = "UPDATE gui_wms SET ";
+ $sql .= "gui_wms_position = $1";
+ $sql .= " WHERE fkey_gui_id = $2 AND fkey_wms_id = $3";
+ $v = array(($wms_position - 1),$guiList,$wmsList);
+ $t = array('i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $sql = "UPDATE gui_wms SET ";
+ $sql .= "gui_wms_position = $1";
+ $sql .= " WHERE gui_wms_position = $2 AND fkey_gui_id = $3 AND fkey_wms_id <> $4 ";
+ $v = array($wms_position,($wms_position - 1),$guiList,$wmsList);
+ $t = array('i','i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+}
+
+if($down && $down == 'true'){
+ $max = 0;
+ if ($wmsList!=""){
+ $sql = "SELECT gui_wms_position ";
+ $sql .= "FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
+ $v = array($guiList,$wmsList);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $wms_position = $row["gui_wms_position"];
+ }
+ $sql = "SELECT MAX(gui_wms_position) as max FROM gui_wms WHERE fkey_gui_id = $1 ";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $max = $row["max"];
+ }
+ }
+ if($wms_position < $max){
+ $sql = "UPDATE gui_wms SET ";
+ $sql .= "gui_wms_position = $1";
+ $sql .= " WHERE fkey_gui_id = $2 AND fkey_wms_id = $3";
+ $v = array(($wms_position + 1),$guiList,$wmsList);
+ $t = array('i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $sql = "UPDATE gui_wms SET ";
+ $sql .= "gui_wms_position = $1";
+ $sql .= " WHERE gui_wms_position = $2 AND fkey_gui_id = $3 AND fkey_wms_id <> $4";
+ $v = array($wms_position,($wms_position + 1),$guiList,$wmsList);
+ $t = array('i','i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+}
+
+/*handle Updates*/
+if(isset($update_content) && $update_content == "1"){
+ if(isset($this_gui_wms_epsg)){
+ $sql = "UPDATE gui_wms set gui_wms_epsg = $1, gui_wms_mapformat = $2, ";
+ $sql .= "gui_wms_featureinfoformat = $3, gui_wms_exceptionformat = $4, ";
+ $sql .= "gui_wms_visible = $5 ";
+ $sql .= "WHERE fkey_gui_id = $6 AND fkey_wms_id = $7";
+ $v = array($this_gui_wms_epsg,$this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
+ $t = array('s','s','s','s','i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+ else{
+ $sql = "UPDATE gui_wms set gui_wms_mapformat = $1, ";
+ $sql .= "gui_wms_featureinfoformat = $2, gui_wms_exceptionformat = $3, ";
+ $sql .= "gui_wms_visible = $4 ";
+ $sql .= "WHERE fkey_gui_id = $5 AND fkey_wms_id = $6";
+ $v = array($this_gui_wms_mapformat,$this_gui_wms_featureinfoformat,$this_gui_wms_exceptionformat,$this_gui_wms_visible,$this_gui,$this_wms);
+ $t = array('s','s','s','i','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+
+ /**/
+
+ $cnt = 0;
+ while(list($key,$val) = each($_REQUEST)){
+ if(preg_match("/___/", $key)){
+ $myKey = explode("___", $key);
+ if($myKey[1]!="layer_parent" && $myKey[1]!='layer_id' ){
+ $sql = "UPDATE gui_layer SET ".$myKey[1]." = $1 WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
+ $v = array($val,$this_gui,preg_replace("/L_/","",$myKey[0]));
+ $t = array('i','s','i');
+ if(!$res = db_prep_query($sql,$v,$t)){
+ echo "FEHLER in ZEILE 249";
+ }
+ }
+ }
+ }
+}
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table cellpadding='3' cellspacing='3' border='0' class='table_top'>";
+
+echo "<tr>";
+echo "<td>";
+echo "GUI";
+echo "</td>";
+echo "<td>";
+echo "WMS-TITLE";
+echo "</td>";
+echo "<td>";
+echo "</td>";
+echo "<tr>";
+
+echo "<td>";
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+
+$gui_id =array();
+if (count($ownguis)>0){
+ for($i=0; $i<count($ownguis); $i++){
+ $gui_id[$i]=$ownguis[$i];
+ }
+}
+
+echo"<select size='8' name='guiList' onchange='document.form1.wmsList.selectedIndex = -1;submit()'>";
+$selected_gui_id="";
+
+for ($i=0; $i<count($ownguis);$i++){
+ echo "<option value='".$gui_id[$i]."' ";
+ if($guiList && $guiList == $gui_id[$i]){
+ echo "selected";
+ $selected_gui_id=$gui_id[$i];
+ }
+ else{
+ if ($i==0){
+ echo "selected";
+ $selected_gui_id=$gui_id[$i];
+ }
+ }
+ echo ">".$gui_id[$i]."</option>";
+}
+
+echo "</select>";
+echo "</td>";
+echo "<td>";
+
+$sql = "SELECT * from gui_wms JOIN gui ON gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON ";
+$sql .= "gui_wms.fkey_wms_id = wms.wms_id AND gui_wms.fkey_gui_id=gui.gui_id WHERE gui.gui_id = $1 ORDER BY gui_wms_position";
+$v = array($selected_gui_id);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$count_wms = 0;
+echo "<select size='8' name='wmsList' style='width:200px' onchange='submit()'>";
+
+while($row = db_fetch_array($res)){
+ echo "<option value='".$row["wms_id"]."' ";
+ if(isset($wmsList) && $wmsList == $row["wms_id"]){
+ echo "selected";
+ }
+ echo ">".$row["gui_wms_position"]." - ".$row["wms_title"]."</option>";
+ $count_wms++;
+}
+echo "</select>";
+echo "</td><td>";
+echo "<input class='myButton' type='button' name='up_wms' value=' up ' onClick='validate(\"up_wms\")'>";
+echo "<input type='hidden' name='up' value=''><br><br>";
+
+echo "<input class='myButton' type='button' name='down_wms' value='down' onClick='validate(\"down_wms\")'>";
+echo "<input type='hidden' name='down' value=''><br><br>";
+
+echo "<input class='myButton' type='button' name='delete_wms' value='remove' onClick='validate(\"delete_wms\")'>";
+echo "<input type='hidden' name='del' value=''>";
+
+echo "</td>";
+echo "</tr>";
+echo "</table>";
+
+
+if(isset($wmsList)){
+#gui_wms
+$sql_gw = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
+$v = array($guiList,$wmsList);
+$t = array('s','i');
+$res_gw = db_prep_query($sql_gw,$v,$t);
+$cnt_gw = 0;
+while($row = db_fetch_array($res_gw)){
+ $gui_wms_position[$cnt_gw] = $row["gui_wms_position"];
+ $gui_wms_mapformat[$cnt_gw] = $row["gui_wms_mapformat"];
+ $gui_wms_featureinfoformat[$cnt_gw] = $row["gui_wms_featureinfoformat"];
+ $gui_wms_exceptionformat[$cnt_gw] = $row["gui_wms_exceptionformat"];
+ $gui_wms_epsg[$cnt_gw] = $row["gui_wms_epsg"];
+ $gui_wms_visible[$cnt_gw] = $row["gui_wms_visible"];
+ $cnt_gw++;
+}
+#wms
+$sql_w = "SELECT * FROM wms WHERE wms_id = $1";
+$v = array($wmsList);
+$t = array('i');
+$res_w = db_prep_query($sql_w,$v,$t);
+$cnt_w = 0;
+while($row = db_fetch_array($res_w)){
+ $wms_id[$cnt_w] = $row["wms_id"];
+ $wms_version[$cnt_w] = $row["wms_version"];
+ $wms_title[$cnt_w] = $row["wms_title"];
+ $wms_abstract[$cnt_w] = $row["wms_abstract"];
+ $wms_getcapabilities[$cnt_w] = $row["wms_getcapabilities"];
+ $cnt_w++;
+ }
+#wms_format
+$sql_wf = "SELECT * FROM wms_format WHERE fkey_wms_id = $1";
+$v = array($wmsList);
+$t = array('i');
+$res_wf = db_prep_query($sql_wf,$v,$t);
+$cnt_wf = 0;
+while($row = db_fetch_array($res_wf)){
+ $data_type[$cnt_wf] = $row["data_type"];
+ $data_format[$cnt_wf] = $row["data_format"];
+ $cnt_wf++;
+ }
+#gui_layer
+$sql_gl = "SELECT * FROM layer AS l, gui_layer AS gl WHERE l.layer_id = gl.fkey_layer_id AND gl.gui_layer_wms_id = $1 AND gl.fkey_gui_id = $2 ORDER BY l.layer_pos";
+$v = array($wmsList,$guiList);
+$t = array('i','s');
+$res_gl = db_prep_query($sql_gl,$v,$t);
+$gui_layer_status = array();
+$gui_layer_selectable = array();
+$gui_layer_visible = array();
+$gui_layer_queryable = array();
+$gui_layer_querylayer = array();
+$gui_layer_minscale = array();
+$gui_layer_maxscale = array();
+$gui_layer_priority = array();
+$gui_layer_wfs_featuretype = array();
+$layer_id = array();
+$layer_parent = array();
+$layer_name = array();
+$layer_title = array();
+$layer_queryable = array();
+$layer_minscale = array();
+$layer_maxscale = array();
+while($row = db_fetch_array($res_gl)){
+ array_push($gui_layer_status, $row["gui_layer_status"]);
+ array_push($gui_layer_selectable, $row["gui_layer_selectable"]);
+ array_push($gui_layer_visible, $row["gui_layer_visible"]);
+ array_push($gui_layer_queryable, $row["gui_layer_queryable"]);
+ array_push($gui_layer_querylayer, $row["gui_layer_querylayer"]);
+ array_push($gui_layer_minscale, $row["gui_layer_minscale"]);
+ array_push($gui_layer_maxscale, $row["gui_layer_maxscale"]);
+ array_push($gui_layer_priority, $row["gui_layer_priority"]);
+ array_push($gui_layer_wfs_featuretype, $row["gui_layer_wfs_featuretype"]);
+ array_push($layer_id, $row["layer_id"]);
+ array_push($layer_parent, $row["layer_parent"]);
+ array_push($layer_name, $row["layer_name"]);
+ array_push($layer_title, $row["layer_title"]);
+ array_push($layer_queryable, $row["layer_queryable"]);
+ array_push($layer_minscale, $row["layer_minscale"]);
+ array_push($layer_maxscale, $row["layer_maxscale"]);
+}
+
+#layer_epsg
+$sql_le = "SELECT * FROM layer_epsg WHERE fkey_layer_id = $1";
+$v = array($layer_id[0]);
+$t = array('i');
+$res_le = db_prep_query($sql_le,$v,$t);
+$cnt_le = 0;
+while($row = db_fetch_array($res_le)){
+ $epsg[$cnt_le] = $row["epsg"];
+ $cnt_le++;
+ }
+
+echo "<div style='position:absolute;left:590px; top:180px;' ><input type='button' style='width:100px;height:100px;background-color:#0066cc' value='save' onclick='checkBoxValue()'></div>";
+echo "<table class='table_top'>";
+echo "<tr>";
+echo "<td colspan='2'>";
+echo "<a href='".$wms_getcapabilities[0];
+if( $wms_version[0] == "1.0.0"){ echo "&WMTVER=". $wms_version[0]."&REQUEST=capabilities";}
+else{echo "&VERSION=". $wms_version[0]."&REQUEST=GetCapabilities&SERVICE=WMS";}
+echo "' style='font-size:14px' target='_blank'>LINK: Capabilites</a>";
+echo "</td>";
+echo "<td align = right>WMS ID: " . $wms_id[0] . "</td>";
+echo "<tr>";
+#epsg
+if($gui_wms_position[0] == 0){
+ echo "<tr>";
+ echo "<td>EPSG: </td><td>";
+ echo "<select class='mySelect' name='this_gui_wms_epsg'>";
+ for($i=0; $i<count($epsg); $i++){
+ echo "<option value='".$epsg[$i]."' ";
+ if($epsg[$i] == $gui_wms_epsg[0]){ echo "selected";}
+ echo ">".$epsg[$i]."</option>";
+ }
+ echo "</select>";
+ echo "</td>";
+ echo "</tr>";
+}
+#format
+echo "<tr>";
+ echo "<td>Mapformat: </td><td>";
+ echo "<select class='mySelect' name='this_gui_wms_mapformat'>";
+ for($i=0; $i<count($data_format); $i++){
+ if($data_type[$i] == 'map'){
+ echo "<option value='".$data_format[$i]."' ";
+ if($data_format[$i] == $gui_wms_mapformat[0]){ echo "selected";}
+ echo ">".$data_format[$i]."</option>";
+ }
+ }
+ echo "</select>";
+ echo "</td>";
+
+echo "</tr>";
+
+echo "<tr>";
+ echo "<td>Infoformat: </td><td>";
+ echo "<select class='mySelect' name='this_gui_wms_featureinfoformat'>";
+ echo "<option value='text/html'>text/html</option>";
+ for($i=0; $i<count($data_format); $i++){
+ if($data_type[$i] == 'featureinfo'){
+ echo "<option value='".$data_format[$i]."' ";
+ if($data_format[$i] == $gui_wms_featureinfoformat[0]){ echo "selected";}
+ echo ">".$data_format[$i]."</option>";
+ }
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr>";
+
+echo "<tr>";
+ echo "<td>Exceptionformat: </td><td>";
+ echo "<select class='mySelect' name='this_gui_wms_exceptionformat'>";
+ for($i=0; $i<count($data_format); $i++){
+ if($data_type[$i] == 'exception'){
+ echo "<option value='".$data_format[$i]."' ";
+ if($data_format[$i] == $gui_wms_exceptionformat[0]){ echo "selected";}
+ echo ">".$data_format[$i]."</option>";
+ }
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr><br>";
+
+# visibility
+echo "<tr>";
+ echo "<td>Visibility: </td><td>";
+ echo "<select class='mySelect' name='this_gui_wms_visible'>";
+ for($i=0; $i<3; $i++){
+ echo "<option value='".$i."' ";
+ if($i == $gui_wms_visible[0]){ echo "selected";}
+ echo ">";
+ if($i == '0'){
+ echo "hidden";
+ }
+ if($i == '1'){
+ echo "visible";
+ }
+ echo "</option>";
+ }
+ echo "</select>";
+ echo "</td>";
+
+echo "</tr>";
+
+echo "</table><br>";
+
+echo "<table border='1' cellpadding='1'>";
+
+ echo "<tr>";
+ echo "<td>Nr.</td>";
+ echo "<td>ID</td>";
+ echo "<td>" . toImage('Parent') . "</td>";
+ echo "<td>Name</td>";
+ echo "<td>Title</td>";
+ echo "<td>" . toImage('on/off') . "</td>";
+ echo "<td>" . toImage('sel') . "</td>";
+ echo "<td>" . toImage('sel_default') . "</td>";
+ echo "<td>" . toImage('info') . "</td>";
+ echo "<td>" . toImage('info_default') . "</td>";
+ echo "<td>" . toImage('minScale 1:') . "</td>";
+ echo "<td>" . toImage('maxScale 1:') . "</td>";
+ echo "<td>" . toImage('Prio') . "</td>";
+ echo "<td>" . toImage('setWFS') . "</td>";
+ echo "</tr>";
+
+#echo "<tr><td>Nr.</td><td>ID</td><td>Parent</td><td>Name</td><td>Title</td><td>on/off</td><td>sel</td><td>sel_default</td><td>info</td><td>info_default</td><td>minScale 1:</td><td>maxScale 1:</td><td>Prio</td><td>setWFS</td></tr>";
+echo "<tr><td></td><td></td><td></td><td></td><td></td><td>";
+echo "<input type='button' class='LButton' value='Sublayer\noff' onclick='setSubs()'>";
+echo "</td><td></td><td>";
+echo "<nobr><input type='button' class='button_on_off' value='off' onclick='setLayer(\"visible\",false)'> ";
+echo "<input type='button' class='button_on_off' value='on' onclick='setLayer(\"visible\",true)'></nobr>";
+echo"</td><td></td><td>";
+echo "<nobr><input type='button' class='button_on_off' value='off' onclick='setLayer(\"querylayer\",false)'> ";
+echo "<input type='button' class='button_on_off' value='on' onclick='setLayer(\"querylayer\",true)'></nobr>";
+echo "</td><td></td><td></td><td></td></tr>";
+for($i=0; $i<count($layer_id); $i++){
+ echo "<tr align='center'>";
+ echo "<td><input type='text' size='1' name='L_".$layer_id[$i]."___layer_nr' disabled value='".$i."'></td>";
+ echo "<td style='background:lightgrey'><input type='text' size='2' name='L_".$layer_id[$i]."___layer_id' value='".$layer_id[$i]."' readonly></td>";
+ echo "<td><input type='text' size='1' name='L_".$layer_id[$i]."___layer_parent' value='".$layer_parent[$i]."' readonly></td>";
+ echo "<td style='background:lightgrey'><input type='text' size='7' value='".$layer_name[$i]."' readonly></td>";
+ echo "<td><input type='text' name='".$layer_title[$i]."' size='12' value='".$layer_title[$i]."' readonly></td>";
+
+ echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_status' type='checkbox' ";
+ if($gui_layer_status[$i] == 1){ echo "checked";}
+ echo "></td>";
+
+ echo "<td><input name='L_".$layer_id[$i]."___gui_layer_selectable' type='checkbox' ";
+ if($gui_layer_selectable[$i] == 1){ echo "checked";}
+ echo "></td>";
+
+ echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_visible' type='checkbox' ";
+ if($gui_layer_visible[$i] == 1){ echo "checked";}
+ echo "></td>";
+
+ echo "<td><input name='L_".$layer_id[$i]."___gui_layer_queryable' type='checkbox' ";
+ if($gui_layer_queryable[$i] == 1){ echo "checked";}
+ if($layer_queryable[$i] == 0){ echo "disabled";}
+ echo "></td>";
+
+ echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_querylayer' type='checkbox' ";
+ if($gui_layer_querylayer[$i] == 1){ echo "checked";}
+ if($layer_queryable[$i] == 0){ echo "disabled";}
+ echo "></td>";
+
+ echo "<td><input name='L_".$layer_id[$i]."___gui_layer_minscale' type='text' size='5' value='".$gui_layer_minscale[$i]."'></td>";
+ echo "<td style='background:lightgrey'><input name='L_".$layer_id[$i]."___gui_layer_maxscale' type='text' size='5' value='".$gui_layer_maxscale[$i]."'></td>";
+ /**/
+ echo "<td><select class='select_short' name='L_".$layer_id[$i]."___gui_layer_priority'>";
+ for($j=0; $j<count($gui_layer_priority); $j++){
+ echo "<option value='".$j."'";
+ if($j == $gui_layer_priority[$i]){echo "selected";}
+ echo ">".$j;
+ echo "</option>";
+ }
+ echo "</select></td>\n";
+ /* wfs configuration */
+ echo "<td>";
+ if ($i > 0) {
+ echo "<input class='button_wfs'name='gui_layer_gaz' type='button' onclick='edit_gaz(\"".$guiList."\",".$wmsList.",".$layer_id[$i].")' value='";
+ if($gui_layer_wfs_featuretype[$i] == ""){
+ echo "setWFS";
+ }
+ else{
+ echo "wfs ".$gui_layer_wfs_featuretype[$i];
+ }
+ echo "'>";
+ }
+ echo "</td>";
+ echo "</tr>\n";
+ if($i == 0){ echo "<tr><td colspan='14'><hr></td></tr>";}
+}
+echo "</table>\n";
+echo "<input type='hidden' name='this_gui' value='".$guiList."'>\n";
+echo "<input type='hidden' name='this_wms' value='".$wmsList."'>\n";
+echo "<input type='hidden' name='this_layer_count' value='".$cnt_l."'>\n";
+echo "<input type='hidden' name='update_content' value=''>\n";
+echo "</form>\n";
+}
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php
===================================================================
--- branches/2.4.5/http/php/mod_editGuiWmsMeta.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,191 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_editGuiWmsMeta.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit WMS Meta Data</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .guiList1{
- position:absolute;
- top:30px;
- left:10px;
- width:200px
- }
- .buttonbar{
- position:absolute;
- top:40px;
- left:10px;
- }
- .guiList1_text{
- position:absolute;
- top:10px;
- left:10px;
- font-size:16px;
- color: #0066cc;
- }
- .guiList2{
- position:absolute;
- top:40px;
- left:400px;
- width:200px
- }
- .all{
- position:absolute;
- top:38px;
- left:610px;
- }
- .guiList2_header{
- position:absolute;
- top:10px;
- left:400px;
- font-size:16px;
- color: #0066cc;
- }
- .myElements{
- position:absolute;
- top:70px;
- left:400px;
- }
- .myTable{
- border: 1px solid;
- font-size: 11px;
- }
- .myForm{
- position:absolute;
- top:70px;
- left:10px;
- }
- .textfield{
- width:277px
- }
- .textfield_small{
- width:150px
- }
- .on{
- color: #0066cc;
- }
- -->
-</style>
-
-<script type="text/javascript">
-<!--
- function windowSize() {
- window.resizeTo(800,500)
- window.moveTo(130,200)
- }
-
- function windowQuit() {
- window.close()
- }
-// -->
-</script>
-
- </head>
- <body onload='windowSize()'>
-
-<?php
- echo " <form name='editMetaData' action='".$PHP_SELF."?".SID."' method='get'>\n";
-
- $layer_id = $_REQUEST["layer_id"];
-
- if ( isset($_REQUEST["function"] ) ) {
- $function = $_REQUEST["function"];
-
- if ( $function = "update" ) {
- $sql = "UPDATE layer SET layer_meta_datum = $1, ";
- $sql.= "layer_meta_lieferant = $2, ";
- $sql.= "layer_meta_quelle = $3, ";
- $sql.= "layer_meta_ansprechpartner = $4, ";
- $sql.= "layer_meta_lieferant_basis = $5, ";
- $sql.= "layer_meta_copyright = $6 ";
- $sql.= " WHERE layer_id = $7;";
- $v = array($_REQUEST["layer_meta_datum"], $_REQUEST["layer_meta_lieferant"], $_REQUEST["layer_meta_quelle"], $_REQUEST["layer_meta_ansprechpartner"], $_REQUEST["layer_meta_lieferant_basis"], $_REQUEST["layer_meta_copyright"], $layer_id);
- $t = array("s", "s", "s", "s", "s", "s", "i");
- $res = db_prep_query($sql, $v, $t);
- }
- }
-
- $sql = "SELECT * FROM layer WHERE layer_id = $1;";
- $v = array($layer_id);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- if ( db_fetch_row($res, 0) ) {
- echo " <h3>Editieren von Metadaten</h3>\n";
- echo " <table class='myTable' border='1' cellpadding='2'>\n";
- echo " <tr>\n";
- echo " <td >Aktualisierungsdatum</td>\n";
- echo " <td><input name='layer_meta_datum' type='text' size='100' value='".db_result($res, 0, "layer_meta_datum")."'></td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td>Datenlieferant</td>\n";
- echo " <td><input name='layer_meta_lieferant' type='text' size='100' value='".db_result($res, 0, "layer_meta_lieferant")."'></td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td>Datenquelle</td>\n";
- echo " <td><input name='layer_meta_quelle' type='text' size='100' value='".db_result($res, 0, "layer_meta_quelle")."'></td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td>Ansprechpartner</td>\n";
- echo " <td><input name='layer_meta_ansprechpartner' type='text' size='100' value='".db_result($res, 0, "layer_meta_ansprechpartner")."'></td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td>Datenlieferant (Basisdaten)</td>\n";
- echo " <td><input name='layer_meta_lieferant_basis' type='text' size='100' value='".db_result($res, 0, "layer_meta_lieferant_basis")."'></td>\n";
- echo " </tr>\n";
- echo " <tr>\n";
- echo " <td>Copyright</td>\n";
- echo " <td><input name='layer_meta_copyright' type='text' size='100' value='".db_result($res, 0, "layer_meta_copyright")."'></td>\n";
- echo " </tr>\n";
- echo " </table>\n";
- }
- echo " <p></p>\n";
- echo " <input type='submit' name='function' value='update'>\n";
- echo " <input type='button' onclick='windowQuit()' value=' exit '>\n";
- echo " <input type='hidden' name='layer_id' value='".$layer_id."'>\n";
-?>
- </form>
- </body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php (from rev 2138, branches/2.4.5/http/php/mod_editGuiWmsMeta.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editGuiWmsMeta.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,191 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_editGuiWmsMeta.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit WMS Meta Data</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .guiList1{
+ position:absolute;
+ top:30px;
+ left:10px;
+ width:200px
+ }
+ .buttonbar{
+ position:absolute;
+ top:40px;
+ left:10px;
+ }
+ .guiList1_text{
+ position:absolute;
+ top:10px;
+ left:10px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .guiList2{
+ position:absolute;
+ top:40px;
+ left:400px;
+ width:200px
+ }
+ .all{
+ position:absolute;
+ top:38px;
+ left:610px;
+ }
+ .guiList2_header{
+ position:absolute;
+ top:10px;
+ left:400px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .myElements{
+ position:absolute;
+ top:70px;
+ left:400px;
+ }
+ .myTable{
+ border: 1px solid;
+ font-size: 11px;
+ }
+ .myForm{
+ position:absolute;
+ top:70px;
+ left:10px;
+ }
+ .textfield{
+ width:277px
+ }
+ .textfield_small{
+ width:150px
+ }
+ .on{
+ color: #0066cc;
+ }
+ -->
+</style>
+
+<script type="text/javascript">
+<!--
+ function windowSize() {
+ window.resizeTo(800,500)
+ window.moveTo(130,200)
+ }
+
+ function windowQuit() {
+ window.close()
+ }
+// -->
+</script>
+
+ </head>
+ <body onload='windowSize()'>
+
+<?php
+ echo " <form name='editMetaData' action='".$self."' method='get'>\n";
+
+ $layer_id = $_REQUEST["layer_id"];
+
+ if ( isset($_REQUEST["function"] ) ) {
+ $function = $_REQUEST["function"];
+
+ if ( $function = "update" ) {
+ $sql = "UPDATE layer SET layer_meta_datum = $1, ";
+ $sql.= "layer_meta_lieferant = $2, ";
+ $sql.= "layer_meta_quelle = $3, ";
+ $sql.= "layer_meta_ansprechpartner = $4, ";
+ $sql.= "layer_meta_lieferant_basis = $5, ";
+ $sql.= "layer_meta_copyright = $6 ";
+ $sql.= " WHERE layer_id = $7;";
+ $v = array($_REQUEST["layer_meta_datum"], $_REQUEST["layer_meta_lieferant"], $_REQUEST["layer_meta_quelle"], $_REQUEST["layer_meta_ansprechpartner"], $_REQUEST["layer_meta_lieferant_basis"], $_REQUEST["layer_meta_copyright"], $layer_id);
+ $t = array("s", "s", "s", "s", "s", "s", "i");
+ $res = db_prep_query($sql, $v, $t);
+ }
+ }
+
+ $sql = "SELECT * FROM layer WHERE layer_id = $1;";
+ $v = array($layer_id);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ if ( db_fetch_row($res, 0) ) {
+ echo " <h3>Editieren von Metadaten</h3>\n";
+ echo " <table class='myTable' border='1' cellpadding='2'>\n";
+ echo " <tr>\n";
+ echo " <td >Aktualisierungsdatum</td>\n";
+ echo " <td><input name='layer_meta_datum' type='text' size='100' value='".db_result($res, 0, "layer_meta_datum")."'></td>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>Datenlieferant</td>\n";
+ echo " <td><input name='layer_meta_lieferant' type='text' size='100' value='".db_result($res, 0, "layer_meta_lieferant")."'></td>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>Datenquelle</td>\n";
+ echo " <td><input name='layer_meta_quelle' type='text' size='100' value='".db_result($res, 0, "layer_meta_quelle")."'></td>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>Ansprechpartner</td>\n";
+ echo " <td><input name='layer_meta_ansprechpartner' type='text' size='100' value='".db_result($res, 0, "layer_meta_ansprechpartner")."'></td>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>Datenlieferant (Basisdaten)</td>\n";
+ echo " <td><input name='layer_meta_lieferant_basis' type='text' size='100' value='".db_result($res, 0, "layer_meta_lieferant_basis")."'></td>\n";
+ echo " </tr>\n";
+ echo " <tr>\n";
+ echo " <td>Copyright</td>\n";
+ echo " <td><input name='layer_meta_copyright' type='text' size='100' value='".db_result($res, 0, "layer_meta_copyright")."'></td>\n";
+ echo " </tr>\n";
+ echo " </table>\n";
+ }
+ echo " <p></p>\n";
+ echo " <input type='submit' name='function' value='update'>\n";
+ echo " <input type='button' onclick='windowQuit()' value=' exit '>\n";
+ echo " <input type='hidden' name='layer_id' value='".$layer_id."'>\n";
+?>
+ </form>
+ </body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editSelf.php
===================================================================
--- branches/2.4.5/http/php/mod_editSelf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editSelf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,345 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_editSelf.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit User Settings</title>
-<style type="text/css">
- <!--
- body{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .list_guis{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080;
- }
- a:link{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- text-decoration : none;
- color: #808080;
- }
- a:visited {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- a:active {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- -->
-</style>
-<?php
-$myPW = "**********";
-echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(val == 'update'){
- permission = confirm("Save changes?");
- }
- if(val == 'delete'){
- permission = confirm("Delete User?");
- }
- if(permission == true){
- if(document.forms[0].passw.value == myPW){
- document.forms[0].passw.value = '';
- }
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-function validateInput(){
- var str_alert = "Input incorrect !";
- if(document.forms[0].name.value == ''){
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- if(document.forms[0].passw.value == ''){
- alert(str_alert);
- document.forms[0].passw.focus();
- return 'false';
- }
- if((document.forms[0].passw.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].passw.value != document.forms[0].v_password.value){
- alert("Password verification failed. You have to enter the same password twice!");
- document.forms[0].passw.value = myPW;
- document.forms[0].passw.focus();
- return 'false';
- }
- if(document.forms[0].resolution.value == ''){
- document.forms[0].resolution.value = 72;
- return 'true';
- }
- if(document.forms[0].login_count.value == ''){
- document.forms[0].login_count.value = 0;
- return 'true';
- }
- return 'true';
-}
-
-</script>
-
-</head>
-<body>
-<?php
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-#delete
-if($action == 'delete'){
- $sql = "DELETE FROM mb_user WHERE mb_user_id = $1 ";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- session_destroy();
- echo "You have deleted your account.<br><br>";
- die();
-
-}
-
-#save
-if($action == 'save'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, mb_user_description,";
- $sql .= " mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
- $sql.= "($1, $2, $3, $4, $5, $6, $7, $8)";
- $v = array($name,md5($passw),$owner_id,$description,$email,$phone,$department,$resolution);
- $t = array('s','s','i','s','s','s','s','i');
- $res = db_prep_query($sql,$t,$v);
- $selected_user = db_insert_id();
- }
-}
-
-#update
-if($action == 'update'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
- $v = array($name,$selected_user);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- if($passw == ""){
- $sql = "SELECT mb_user_password FROM mb_user WHERE mb_user_name = $1 AND mb_user_id = $2";
- $v = array($name,$selected_user);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_row($res)){
- $p = $row["mb_user_password"];
- }
- }
- else{
- $p = md5($passw);
- $password = true;
- }
- $sql = "UPDATE mb_user SET mb_user_name = $1";
- $sql .= ", mb_user_password = $2";
- $sql .=", mb_user_description = $3";
- $sql .=", mb_user_login_count = $4";
- $sql .=", mb_user_email = $5";
- $sql .=", mb_user_phone = $6";
- $sql .=", mb_user_department = $7";
- $sql .=", mb_user_resolution = $8";
- $sql .=" where mb_user_id = $9";
- $v = array($name,$p,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
- $t = array('s','s','s','i','s','s','s','i','i');
- $res = db_prep_query($sql,$v,$t);
- if($password && $res){
- echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
- }
- }
-}
-if (!isset($name) || $selected_user == 'new'){
- $name = "";
- $password = "";
- $owner_id = $_SESSION["mb_user_id"];
- $owner_name = $_SESSION["mb_user_name"];
- $description = "";
- $login_count = 0;
- $email = "";
- $phone = "";
- $department = "";
- $resolution = 72;
-}
-
-$selected_user = $_SESSION["mb_user_id"];
-
-/*HTML*****************************************************************************************************/
-
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<input type='hidden' name='selected_user' value='" . $_SESSION["mb_user_id"] . "'>";
-echo "<table border='0'>";
-
-if(isset($selected_user) && $selected_user != 0){
- $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1";
- $v = array($_SESSION["mb_user_id"]);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $name = $row["mb_user_name"];
- $password = $row["mb_user_password"];
- $owner_id = $row["mb_user_owner"];
- $description = $row["mb_user_description"];
- $login_count = $row["mb_user_login_count"];
- $email = $row["mb_user_email"];
- $phone = $row["mb_user_phone"];
- $department = $row["mb_user_department"];
- $resolution = $row["mb_user_resolution"];
- $owner_id = $_SESSION["mb_user_id"];
- $edit = true;
- }
- else {
- $edit = false;
- echo "You're not allowed to change the settings!";
- }
-}
-
-if ($edit) {
-#name
-echo "<tr>";
- echo "<td>Name:</td>";
- echo "<td>";
- echo "<input type='text' size='30' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#password
-echo "<tr>";
- echo "<td>Password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='passw' value='";
- if(isset($selected_user) && $selected_user != 'new'){
- echo $myPW;
- }
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-#confirm password
-echo "<tr>";
- echo "<td>Confirm password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='v_password' value='";
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-#owner
-echo "<tr>";
- echo "<td>Owner: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
- echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-
-#login_count
-echo "<tr>";
- echo "<td>Login_count: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
- echo "</td>";
-echo "</tr>";
-
-#email
-echo "<tr>";
- echo "<td>Email: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='email' value='".$email."'>";
- echo "</td>";
-echo "</tr>";
-
-#phone
-echo "<tr>";
- echo "<td>Phone: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='phone' value='".$phone."'>";
- echo "</td>";
-echo "</tr>";
-
-#department
-echo "<tr>";
- echo "<td>Department: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='department' value='".$department."'>";
- echo "</td>";
-echo "</tr>";
-
-#resolution
-echo "<tr>";
- echo "<td>Resolution: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
- echo "</td>";
-echo "</tr>";
-echo"</table>";
-if($selected_user == 'new' || !isset($selected_user)){
- echo "<input type='button' value='save' onclick='validate(\"save\")'>";
-}
-if($_SESSION["mb_user_id"] == $owner_id && $selected_user != '' ){
- echo "<input type='button' value='save' onclick='validate(\"update\")'>";
- echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
-}
-}
-?>
-<input type='hidden' name='action' value=''>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editSelf.php (from rev 2138, branches/2.4.5/http/php/mod_editSelf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editSelf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editSelf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,345 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_editSelf.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit User Settings</title>
+<style type="text/css">
+ <!--
+ body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .list_guis{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080;
+ }
+ a:link{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ text-decoration : none;
+ color: #808080;
+ }
+ a:visited {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ a:active {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ -->
+</style>
+<?php
+$myPW = "**********";
+echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'update'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'delete'){
+ permission = confirm("Delete User?");
+ }
+ if(permission == true){
+ if(document.forms[0].passw.value == myPW){
+ document.forms[0].passw.value = '';
+ }
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+function validateInput(){
+ var str_alert = "Input incorrect !";
+ if(document.forms[0].name.value == ''){
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ if(document.forms[0].passw.value == ''){
+ alert(str_alert);
+ document.forms[0].passw.focus();
+ return 'false';
+ }
+ if((document.forms[0].passw.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].passw.value != document.forms[0].v_password.value){
+ alert("Password verification failed. You have to enter the same password twice!");
+ document.forms[0].passw.value = myPW;
+ document.forms[0].passw.focus();
+ return 'false';
+ }
+ if(document.forms[0].resolution.value == ''){
+ document.forms[0].resolution.value = 72;
+ return 'true';
+ }
+ if(document.forms[0].login_count.value == ''){
+ document.forms[0].login_count.value = 0;
+ return 'true';
+ }
+ return 'true';
+}
+
+</script>
+
+</head>
+<body>
+<?php
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+#delete
+if($action == 'delete'){
+ $sql = "DELETE FROM mb_user WHERE mb_user_id = $1 ";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ session_destroy();
+ echo "You have deleted your account.<br><br>";
+ die();
+
+}
+
+#save
+if($action == 'save'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, mb_user_description,";
+ $sql .= " mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
+ $sql.= "($1, $2, $3, $4, $5, $6, $7, $8)";
+ $v = array($name,md5($passw),$owner_id,$description,$email,$phone,$department,$resolution);
+ $t = array('s','s','i','s','s','s','s','i');
+ $res = db_prep_query($sql,$t,$v);
+ $selected_user = db_insert_id();
+ }
+}
+
+#update
+if($action == 'update'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
+ $v = array($name,$selected_user);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ if($passw == ""){
+ $sql = "SELECT mb_user_password FROM mb_user WHERE mb_user_name = $1 AND mb_user_id = $2";
+ $v = array($name,$selected_user);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_row($res)){
+ $p = $row["mb_user_password"];
+ }
+ }
+ else{
+ $p = md5($passw);
+ $password = true;
+ }
+ $sql = "UPDATE mb_user SET mb_user_name = $1";
+ $sql .= ", mb_user_password = $2";
+ $sql .=", mb_user_description = $3";
+ $sql .=", mb_user_login_count = $4";
+ $sql .=", mb_user_email = $5";
+ $sql .=", mb_user_phone = $6";
+ $sql .=", mb_user_department = $7";
+ $sql .=", mb_user_resolution = $8";
+ $sql .=" where mb_user_id = $9";
+ $v = array($name,$p,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
+ $t = array('s','s','s','i','s','s','s','i','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($password && $res){
+ echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
+ }
+ }
+}
+if (!isset($name) || $selected_user == 'new'){
+ $name = "";
+ $password = "";
+ $owner_id = $_SESSION["mb_user_id"];
+ $owner_name = $_SESSION["mb_user_name"];
+ $description = "";
+ $login_count = 0;
+ $email = "";
+ $phone = "";
+ $department = "";
+ $resolution = 72;
+}
+
+$selected_user = $_SESSION["mb_user_id"];
+
+/*HTML*****************************************************************************************************/
+
+echo "<form name='form1' action='" . $self."' method='post'>";
+echo "<input type='hidden' name='selected_user' value='" . $_SESSION["mb_user_id"] . "'>";
+echo "<table border='0'>";
+
+if(isset($selected_user) && $selected_user != 0){
+ $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1";
+ $v = array($_SESSION["mb_user_id"]);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $name = $row["mb_user_name"];
+ $password = $row["mb_user_password"];
+ $owner_id = $row["mb_user_owner"];
+ $description = $row["mb_user_description"];
+ $login_count = $row["mb_user_login_count"];
+ $email = $row["mb_user_email"];
+ $phone = $row["mb_user_phone"];
+ $department = $row["mb_user_department"];
+ $resolution = $row["mb_user_resolution"];
+ $owner_id = $_SESSION["mb_user_id"];
+ $edit = true;
+ }
+ else {
+ $edit = false;
+ echo "You're not allowed to change the settings!";
+ }
+}
+
+if ($edit) {
+#name
+echo "<tr>";
+ echo "<td>Name:</td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#password
+echo "<tr>";
+ echo "<td>Password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='passw' value='";
+ if(isset($selected_user) && $selected_user != 'new'){
+ echo $myPW;
+ }
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+#confirm password
+echo "<tr>";
+ echo "<td>Confirm password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='v_password' value='";
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+#owner
+echo "<tr>";
+ echo "<td>Owner: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
+ echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+
+#login_count
+echo "<tr>";
+ echo "<td>Login_count: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
+ echo "</td>";
+echo "</tr>";
+
+#email
+echo "<tr>";
+ echo "<td>Email: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='email' value='".$email."'>";
+ echo "</td>";
+echo "</tr>";
+
+#phone
+echo "<tr>";
+ echo "<td>Phone: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='phone' value='".$phone."'>";
+ echo "</td>";
+echo "</tr>";
+
+#department
+echo "<tr>";
+ echo "<td>Department: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='department' value='".$department."'>";
+ echo "</td>";
+echo "</tr>";
+
+#resolution
+echo "<tr>";
+ echo "<td>Resolution: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
+ echo "</td>";
+echo "</tr>";
+echo"</table>";
+if($selected_user == 'new' || !isset($selected_user)){
+ echo "<input type='button' value='save' onclick='validate(\"save\")'>";
+}
+if($_SESSION["mb_user_id"] == $owner_id && $selected_user != '' ){
+ echo "<input type='button' value='save' onclick='validate(\"update\")'>";
+ echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
+}
+}
+?>
+<input type='hidden' name='action' value=''>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editUser.php
===================================================================
--- branches/2.4.5/http/php/mod_editUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,362 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Filtered User</title>
-<?php
-include '../include/dyn_css.php';
-$myPW = "**********";
-echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
-?>
-<script language="JavaScript">
-
-function validate(val){
- var ok = validateInput();
- if(ok == 'true'){
- var permission = false;
- if(val == 'save'){
- permission = confirm("Save changes?");
- }
- if(val == 'update'){
- permission = confirm("Save changes?");
- }
- if(val == 'delete'){
- permission = confirm("Delete User?");
- }
- if(permission == true){
- if(document.forms[0].password.value == myPW){
- document.forms[0].password.value = '';
- }
- document.forms[0].action.value = val;
- document.forms[0].submit();
- }
- }
-}
-function validateInput(){
- var str_alert = "Input incorrect !";
- if(document.forms[0].name.value == ''){
- alert(str_alert);
- document.forms[0].name.focus();
- return 'false';
- }
- if(document.forms[0].password.value == ''){
- alert(str_alert);
- document.forms[0].password.focus();
- return 'false';
- }
- if((document.forms[0].password.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].password.value != document.forms[0].v_password.value){
- alert("Password verification failed. You have to enter the same password twice!");
- document.forms[0].password.value = myPW;
- document.forms[0].password.focus();
- return 'false';
- }
- if(document.forms[0].resolution.value == ''){
- document.forms[0].resolution.value = 72;
- return 'true';
- }
- if(document.forms[0].login_count.value == ''){
- document.forms[0].login_count.value = 0;
- return 'true';
- }
- return 'true';
-}
-
-</script>
-
-</head>
-<body>
-<?php
-function setPassword($password){
- if($password != ""){
- if (SYS_DBTYPE=="mysql"){
- $pw = "password('".$password."')";
- }else{
- if (MD5 == 'false'){
- $pw = $password;
- }else{
- $pw = md5($password);
- }
- }
- return $pw;
- }
- else{
- return false;
- }
-}
-#delete
-if($action == 'delete'){
- $sql = "DELETE FROM mb_user WHERE mb_user_id = $1";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $selected_user = 'new';
-}
-
-#save
-if($action == 'save'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
- $v = array($name);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, mb_user_description, ";
- $sql .= "mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
- $sql.= "($1,$2,$3,$4,$5,$6,$7,$8)";
- $v = array($name,md5($password),$owner_id,$description,$email,$phone,$department,$resolution);
- $t = array('s','s','i','s','s','s','s','i');
- $res = db_prep_query($sql,$v,$t);
- $selected_user = db_insert_id($res,"mb_user","mb_user_id");
- }
-}
-
-#update
-if($action == 'update'){
- $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
- $v = array($name,$selected_user);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
- }
- else{
- $sql = "UPDATE mb_user SET mb_user_name = $1";
- $sql.=", mb_user_description = $2";
- $sql.=", mb_user_login_count = $3";
- $sql.=", mb_user_email = $4";
- $sql.=", mb_user_phone = $5";
- $sql.=", mb_user_department = $6";
- $sql.=", mb_user_resolution = $7";
- $sql.=" where mb_user_id = $8";
- $v = array($name,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
- $t = array('s','s','i','s','s','s','i','i');
- $res = db_prep_query($sql,$v,$t);
- if($password != ''){
- $sql = "UPDATE mb_user SET mb_user_password = $1 WHERE mb_user_name = $2 AND mb_user_id = $3";
- $v = array(setPassword($password), $name, $selected_user);
- $t = array('s','s','i');
- $res = db_prep_query($sql,$v,$t);
- if($password && $res){
- echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
- }
- }
- }
-}
-if (!isset($name) || $selected_user == 'new'){
- $name = "";
- $password = "";
- $owner_id = $_SESSION["mb_user_id"];
- $owner_name = $_SESSION["mb_user_name"];
- $description = "";
- $login_count = 0;
- $email = "";
- $phone = "";
- $department = "";
- $resolution = 72;
-}
-
-
-/*HTML*****************************************************************************************************/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table border='0'>";
-#User
-echo "<tr>";
- echo "<td>";
- echo "User: ";
- echo "</td>";
-echo "<td>";
- echo "<select name='selected_user' onchange='submit()'>";
- echo "<option value='new'>NEW...</option>";
- $sql = "SELECT mb_user_name,mb_user_id FROM mb_user ";
- $v = array();
- $t = array();
- if (isset($myUser)) {
- $sql .= "WHERE mb_user_owner = $1";
- array_push($v, $_SESSION["mb_user_id"]);
- array_push($t, "i");
- }
- $sql .= " ORDER BY mb_user_name ";
- $res = db_prep_query($sql, $v, $t);
- $count=0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["mb_user_id"]."' ";
- if($selected_user && $selected_user == $row["mb_user_id"]){
- echo "selected";
- }
- echo ">".$row["mb_user_name"]."</option>";
- $count++;
- }
- echo "</select>";
- echo "</td>";
-echo "</tr>";
-
-
-if(isset($selected_user) && $selected_user != 0){
- $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
- $v = array($selected_user);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $name = $row["mb_user_name"];
- $password = $row["mb_user_password"];
- $owner_id = $row["mb_user_owner"];
- $description = $row["mb_user_description"];
- $login_count = $row["mb_user_login_count"];
- $email = $row["mb_user_email"];
- $phone = $row["mb_user_phone"];
- $department = $row["mb_user_department"];
- $resolution = $row["mb_user_resolution"];
- }
- $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
- $v = array($owner_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- $owner_name = $row["mb_user_name"];
- }
-}
-#name
-echo "<tr>";
- echo "<td>Name:</td>";
- echo "<td>";
- echo "<input type='text' size='30' name='name' value='".$name."'>";
- echo "</td>";
-echo "</tr>";
-
-#password
-echo "<tr>";
- echo "<td>Password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='password' value='";
- if(isset($selected_user) && $selected_user != 'new'){
- echo $myPW;
- }
- echo "' >";
- echo "</td>";
-echo "</tr>";
-
-#confirm password
-echo "<tr>";
- echo "<td>Confirm password: </td>";
- echo "<td>";
- echo "<input type='password' size='30' name='v_password' value='";
- echo "'>";
- echo "</td>";
-echo "</tr>";
-
-
-#owner
-echo "<tr>";
- echo "<td>Owner: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
- echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
- echo "</td>";
-echo "</tr>";
-
-#description
-echo "<tr>";
- echo "<td>Description: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='description' value='".$description."'>";
- echo "</td>";
-echo "</tr>";
-
-
-#login_count
-echo "<tr>";
- echo "<td>Login_count: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
- echo "</td>";
-echo "</tr>";
-
-#email
-echo "<tr>";
- echo "<td>Email: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='email' value='".$email."'>";
- echo "</td>";
-echo "</tr>";
-
-#phone
-echo "<tr>";
- echo "<td>Phone: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='phone' value='".$phone."'>";
- echo "</td>";
-echo "</tr>";
-
-#department
-echo "<tr>";
- echo "<td>Department: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='department' value='".$department."'>";
- echo "</td>";
-echo "</tr>";
-
-#resolution
-echo "<tr>";
- echo "<td>Resolution: </td>";
- echo "<td>";
- echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
- echo "</td>";
-echo "</tr>";
-echo"</table>";
-if($selected_user == 'new' || !isset($selected_user)){
- echo "<input type='button' value='save' onclick='validate(\"save\")'>";
-}
-if($_SESSION["mb_user_id"] == $owner_id && $selected_user != 'new' && $selected_user != '' ){
- echo "<input type='button' value='save' onclick='validate(\"update\")'>";
- echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
-}
-?>
-<input type='hidden' name='action' value=''>
-</form>
-<script type="text/javascript">
-<!--
-var user=[];
-<?php
-for($i=0; $i<$cnt_user; $i++){
- echo "user[".($i)."]=[];\n";
- echo "user[".($i)."]['id']='" . $user_id[$i] . "';\n";
- echo "user[".($i)."]['name']='" . $user_name[$i] . "';\n";
- echo "user[".($i)."]['email']='" . $user_email[$i] . "';\n";
-}
-?>
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_editUser.php (from rev 2138, branches/2.4.5/http/php/mod_editUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,362 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Filtered User</title>
+<?php
+include '../include/dyn_css.php';
+$myPW = "**********";
+echo "<script language='JavaScript'>var myPW = '".$myPW."';</script>";
+?>
+<script language="JavaScript">
+
+function validate(val){
+ var ok = validateInput();
+ if(ok == 'true'){
+ var permission = false;
+ if(val == 'save'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'update'){
+ permission = confirm("Save changes?");
+ }
+ if(val == 'delete'){
+ permission = confirm("Delete User?");
+ }
+ if(permission == true){
+ if(document.forms[0].password.value == myPW){
+ document.forms[0].password.value = '';
+ }
+ document.forms[0].action.value = val;
+ document.forms[0].submit();
+ }
+ }
+}
+function validateInput(){
+ var str_alert = "Input incorrect !";
+ if(document.forms[0].name.value == ''){
+ alert(str_alert);
+ document.forms[0].name.focus();
+ return 'false';
+ }
+ if(document.forms[0].password.value == ''){
+ alert(str_alert);
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ if((document.forms[0].password.value != myPW || document.forms[0].v_password.value != '' )&& document.forms[0].password.value != document.forms[0].v_password.value){
+ alert("Password verification failed. You have to enter the same password twice!");
+ document.forms[0].password.value = myPW;
+ document.forms[0].password.focus();
+ return 'false';
+ }
+ if(document.forms[0].resolution.value == ''){
+ document.forms[0].resolution.value = 72;
+ return 'true';
+ }
+ if(document.forms[0].login_count.value == ''){
+ document.forms[0].login_count.value = 0;
+ return 'true';
+ }
+ return 'true';
+}
+
+</script>
+
+</head>
+<body>
+<?php
+function setPassword($password){
+ if($password != ""){
+ if (SYS_DBTYPE=="mysql"){
+ $pw = "password('".$password."')";
+ }else{
+ if (MD5 == 'false'){
+ $pw = $password;
+ }else{
+ $pw = md5($password);
+ }
+ }
+ return $pw;
+ }
+ else{
+ return false;
+ }
+}
+#delete
+if($action == 'delete'){
+ $sql = "DELETE FROM mb_user WHERE mb_user_id = $1";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_user = 'new';
+}
+
+#save
+if($action == 'save'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 ";
+ $v = array($name);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ $sql = "Insert INTO mb_user (mb_user_name, mb_user_password,mb_user_owner, mb_user_description, ";
+ $sql .= "mb_user_email, mb_user_phone, mb_user_department, mb_user_resolution) VALUES ";
+ $sql.= "($1,$2,$3,$4,$5,$6,$7,$8)";
+ $v = array($name,md5($password),$owner_id,$description,$email,$phone,$department,$resolution);
+ $t = array('s','s','i','s','s','s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $selected_user = db_insert_id($res,"mb_user","mb_user_id");
+ }
+}
+
+#update
+if($action == 'update'){
+ $sql = "SELECT mb_user_id FROM mb_user WHERE mb_user_name = $1 AND mb_user_id <> $2";
+ $v = array($name,$selected_user);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script language='JavaScript'>alert('Username must be unique!');</script>";
+ }
+ else{
+ $sql = "UPDATE mb_user SET mb_user_name = $1";
+ $sql.=", mb_user_description = $2";
+ $sql.=", mb_user_login_count = $3";
+ $sql.=", mb_user_email = $4";
+ $sql.=", mb_user_phone = $5";
+ $sql.=", mb_user_department = $6";
+ $sql.=", mb_user_resolution = $7";
+ $sql.=" where mb_user_id = $8";
+ $v = array($name,$description,$login_count,$email,$phone,$department,$resolution,$selected_user);
+ $t = array('s','s','i','s','s','s','i','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($password != ''){
+ $sql = "UPDATE mb_user SET mb_user_password = $1 WHERE mb_user_name = $2 AND mb_user_id = $3";
+ $v = array(setPassword($password), $name, $selected_user);
+ $t = array('s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($password && $res){
+ echo "<script language='JavaScript'>alert('Password has been updated successfully!');</script>";
+ }
+ }
+ }
+}
+if (!isset($name) || $selected_user == 'new'){
+ $name = "";
+ $password = "";
+ $owner_id = $_SESSION["mb_user_id"];
+ $owner_name = $_SESSION["mb_user_name"];
+ $description = "";
+ $login_count = 0;
+ $email = "";
+ $phone = "";
+ $department = "";
+ $resolution = 72;
+}
+
+
+/*HTML*****************************************************************************************************/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table border='0'>";
+#User
+echo "<tr>";
+ echo "<td>";
+ echo "User: ";
+ echo "</td>";
+echo "<td>";
+ echo "<select name='selected_user' onchange='submit()'>";
+ echo "<option value='new'>NEW...</option>";
+ $sql = "SELECT mb_user_name,mb_user_id FROM mb_user ";
+ $v = array();
+ $t = array();
+ if (isset($myUser)) {
+ $sql .= "WHERE mb_user_owner = $1";
+ array_push($v, $_SESSION["mb_user_id"]);
+ array_push($t, "i");
+ }
+ $sql .= " ORDER BY mb_user_name ";
+ $res = db_prep_query($sql, $v, $t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["mb_user_id"]."' ";
+ if($selected_user && $selected_user == $row["mb_user_id"]){
+ echo "selected";
+ }
+ echo ">".$row["mb_user_name"]."</option>";
+ $count++;
+ }
+ echo "</select>";
+ echo "</td>";
+echo "</tr>";
+
+
+if(isset($selected_user) && $selected_user != 0){
+ $sql = "SELECT * FROM mb_user WHERE mb_user_id = $1 ORDER BY mb_user_name ";
+ $v = array($selected_user);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $name = $row["mb_user_name"];
+ $password = $row["mb_user_password"];
+ $owner_id = $row["mb_user_owner"];
+ $description = $row["mb_user_description"];
+ $login_count = $row["mb_user_login_count"];
+ $email = $row["mb_user_email"];
+ $phone = $row["mb_user_phone"];
+ $department = $row["mb_user_department"];
+ $resolution = $row["mb_user_resolution"];
+ }
+ $sql = "SELECT mb_user_name FROM mb_user WHERE mb_user_id = $1";
+ $v = array($owner_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ $owner_name = $row["mb_user_name"];
+ }
+}
+#name
+echo "<tr>";
+ echo "<td>Name:</td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='name' value='".$name."'>";
+ echo "</td>";
+echo "</tr>";
+
+#password
+echo "<tr>";
+ echo "<td>Password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='password' value='";
+ if(isset($selected_user) && $selected_user != 'new'){
+ echo $myPW;
+ }
+ echo "' >";
+ echo "</td>";
+echo "</tr>";
+
+#confirm password
+echo "<tr>";
+ echo "<td>Confirm password: </td>";
+ echo "<td>";
+ echo "<input type='password' size='30' name='v_password' value='";
+ echo "'>";
+ echo "</td>";
+echo "</tr>";
+
+
+#owner
+echo "<tr>";
+ echo "<td>Owner: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='owner_name' value='".$owner_name."' readonly>";
+ echo "<input type='hidden' size='30' name='owner_id' value='".$owner_id."' readonly>";
+ echo "</td>";
+echo "</tr>";
+
+#description
+echo "<tr>";
+ echo "<td>Description: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='description' value='".$description."'>";
+ echo "</td>";
+echo "</tr>";
+
+
+#login_count
+echo "<tr>";
+ echo "<td>Login_count: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='login_count' value='".$login_count."'>";
+ echo "</td>";
+echo "</tr>";
+
+#email
+echo "<tr>";
+ echo "<td>Email: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='email' value='".$email."'>";
+ echo "</td>";
+echo "</tr>";
+
+#phone
+echo "<tr>";
+ echo "<td>Phone: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='phone' value='".$phone."'>";
+ echo "</td>";
+echo "</tr>";
+
+#department
+echo "<tr>";
+ echo "<td>Department: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='department' value='".$department."'>";
+ echo "</td>";
+echo "</tr>";
+
+#resolution
+echo "<tr>";
+ echo "<td>Resolution: </td>";
+ echo "<td>";
+ echo "<input type='text' size='30' name='resolution' value='".$resolution."'>";
+ echo "</td>";
+echo "</tr>";
+echo"</table>";
+if($selected_user == 'new' || !isset($selected_user)){
+ echo "<input type='button' value='save' onclick='validate(\"save\")'>";
+}
+if($_SESSION["mb_user_id"] == $owner_id && $selected_user != 'new' && $selected_user != '' ){
+ echo "<input type='button' value='save' onclick='validate(\"update\")'>";
+ echo "<input type='button' value='delete' onclick='validate(\"delete\")'>";
+}
+?>
+<input type='hidden' name='action' value=''>
+</form>
+<script type="text/javascript">
+<!--
+var user=[];
+<?php
+for($i=0; $i<$cnt_user; $i++){
+ echo "user[".($i)."]=[];\n";
+ echo "user[".($i)."]['id']='" . $user_id[$i] . "';\n";
+ echo "user[".($i)."]['name']='" . $user_name[$i] . "';\n";
+ echo "user[".($i)."]['email']='" . $user_email[$i] . "';\n";
+}
+?>
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php
===================================================================
--- branches/2.4.5/http/php/mod_editWMS_Metadata.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,528 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php?title=Edit_WMS_Metadata
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-session_start();
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$secParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-$self = $PHP_SELF."?".$secParams;
-
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>Edit WMS Metadata</title>
-
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-include_once '../include/dyn_css.php';
-#Error reporting
-error_reporting(E_ALL);
-ini_set('display_errors', TRUE);
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$adm = new administration();
-
-?>
-
-<script language="JavaScript">
-var dTarget;
-function save()
-{
- document.forms[0].update_content.value=1;
- document.forms[0].submit();
-}
-
-function deletepreview(layer_id)
-{
- var url = String(document.location);
- url = url.substr(0, url.indexOf('?'));
- window.open(url+"?<?php echo strip_tags(SID);?>&guiID=<?php echo $_REQUEST["guiID"]?>&elementID=<?php echo $_REQUEST["elementID"];?>&delete_preview=1&layer_id="+layer_id,'delete preview', 'height=50, width=150, dependent=yes');
- document.getElementById(layer_id+"_dp").style.display="none";
-}
-
-function pick_the_date(obj)
-{
- dTarget = obj;
- var dp =
-window.open('../tools/datepicker/datepicker.php?m=Jan_Feb_Mrz_Apr_Mai_Jun_Jul_Aug_Sep_Okt_Nov_Dez&d=Mo_Di_Mi_Do_Fr_Sa_So&t=heute','dp','left=200,top=200,width=230,height=210,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0');
- dp.focus();
- return false
-}
-</script>
-</head>
-<body>
-<?php
-
-function guessTimestamp($timestr)
-{
-
- if (strpos($timestr, '.'))
- {
- list($day, $month, $year) = explode(".", $timestr);
- }
- elseif (strpos($timestr, '/'))
- {
- list($month, $day, $year) = explode("/", $timestr);
- }
- elseif (strpos($timestr, '-'))
- {
- list($year, $month, $day) = explode("-", $timestr);
- }
- else
- {
- $year = 0;
- $month = 0;
- $day = 0;
- }
- return mktime(0, 0, 0, $month, $day, intval($year));
-
-}
-
-#Update handling
-
-if (isset($_REQUEST['update_content']) && $_REQUEST['update_content'] == true) {
-
- $update_wms_sql = "UPDATE wms SET ";
- $update_wms_sql .= "wms_title = $1, wms_abstract = $2, fees = $3, ";
- $update_wms_sql .= "accessconstraints = $4, contactperson = $5, ";
- $update_wms_sql .= "contactposition = $6, contactorganization = $7, ";
- $update_wms_sql .= "address = $8, city = $9, stateorprovince = $10, ";
- $update_wms_sql .= "postcode = $11, country = $12, ";
- $update_wms_sql .= "contactvoicetelephone = $13, ";
- $update_wms_sql .= "contactfacsimiletelephone = $14, ";
- $update_wms_sql .= "contactelectronicmailaddress = $15 ";
-
- $v = array();
- array_push($v, $_REQUEST['wms_title_box']);
- array_push($v, $_REQUEST['wms_abstract_box']);
- array_push($v, $_REQUEST['fees_box']);
- array_push($v, $_REQUEST['accessconstraints_box']);
- array_push($v, $_REQUEST['contactperson_box']);
- array_push($v, $_REQUEST['contactposition_box']);
- array_push($v, $_REQUEST['contactorganization_box']);
- array_push($v, $_REQUEST['address_box']);
- array_push($v, $_REQUEST['city_box']);
- array_push($v, $_REQUEST['stateorprovince_box']);
- array_push($v, $_REQUEST['postcode_box']);
- array_push($v, $_REQUEST['country_box']);
- array_push($v, $_REQUEST['contactvoicetelephone_box']);
- array_push($v, $_REQUEST['contactfacsimiletelephone_box']);
- array_push($v, $_REQUEST['contactelectronicmailaddress_box']);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
-
- if (isset($_REQUEST['wms_timestamp_box']) && $_REQUEST['wms_timestamp_box'] <> "") {
- $update_wms_sql .= ", wms_timestamp = $16 ";
- array_push($v, guessTimestamp($_REQUEST['wms_timestamp_box']));
- array_push($t, "s");
-
- $update_wms_sql .= "WHERE wms_id = $17";
- }
- else {
- $update_wms_sql .= "WHERE wms_id = $16";
- }
- array_push($v, $_REQUEST['wms_id']);
- array_push($t, "s");
-
- $res_update_wms_sql = db_prep_query($update_wms_sql, $v, $t);
-
- while(list($key,$val) = each($_REQUEST))
- {
- if(preg_match("/___/", $key))
- {
- $myKey = explode("___", $key);
- $layer_id = preg_replace("/L_/","",$myKey[0]);
- if($myKey[1]=="layer_abstract") {
- $layer_sql = "UPDATE layer SET layer_abstract = $1 ";
- $layer_sql .= "WHERE layer_id = $2 AND fkey_wms_id = $3";
- $v = array($val, $layer_id, $_REQUEST['wms_id']);
- $t = array("s", "i", "s");
- $res_keyword_sql = db_prep_query($layer_sql, $v, $t);
- }
- if($myKey[1]=="layer_keywords") {
- #Get all keywords depending on the given layer after user modification
- $keywords = explode(",",$val);
- #delete all blanks from the keywords list
- for ($j = 0; $j < count($keywords); $j++) {
- $word = $keywords[$j];
- $word = trim($word);
- $keywords[$j] = $word;
- }
- #echo "1: Keywords eines Layers: id des Layers: ", $layer_id, ", �bergebener String: ", $val, ";<br>";
- #Get all keywords depending on this layer from database
- $keyword_sql = "SELECT keyword_id, keyword FROM keyword, layer_keyword, layer " .
- "WHERE keyword.keyword_id = layer_keyword.fkey_keyword_id " .
- "AND layer_keyword.fkey_layer_id = layer.layer_id " .
- "AND layer.fkey_wms_id = $1 " .
- "AND layer.layer_id = $2";
-
- $v = array($_REQUEST['wms_id'], $layer_id);
- $t = array("s", "i");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
- while($keyword_row = db_fetch_array($res_keyword_sql))
- {
- $keyword = $keyword_row['keyword'];
- $keyword_id = $keyword_row['keyword_id'];
- #keyword has been deleted or has been modified
- #keyword exists in database but not in user data
- $index = -1;
- #echo "1a: Abfrage ob DB Keywords in User Liste: Keyword: ", $keyword, ";<br>";
- if(in_array($keyword, $keywords) == false)
- {
- #echo "1c: Keyword nicht in User Liste: Keyword: ", $keyword, ";<br>";
- #Deleting reference to the keyword from the layer_keyword table.
- $keyword_sql = "DELETE FROM layer_keyword " .
- "WHERE fkey_layer_id = $1 " .
- "AND fkey_keyword_id = $2";
- $v = array($layer_id, $keyword_id);
- $t = array("i", "i");
- db_prep_query($keyword_sql, $v, $t);
- #Checking, if the keyword is in use by any layer
- $layer_sql = "SELECT * FROM layer_keyword " .
- "WHERE fkey_keyword_id = $1";
- $v = array($keyword_id);
- $t = array("i");
- $res_layer_sql = db_prep_query($layer_sql, $v, $t);
- if(!($row = db_fetch_array($res_layer_sql)))
- {
- #If keyword will not longer be in use, delete it from keyword table
- $keyword_sql = "DELETE FROM keyword " .
- "WHERE keyword_id = $1";
- $v = array($keyword_id);
- $t = array("i");
- db_prep_query($keyword_sql, $v, $t);
- }
- }
- #Keyword exists in the database and in the user data
- else
- {
- #echo "1d: Keyword ist in User Liste: Keyword: ", $keyword, ";<br>";
- for($i = 0; $i < count($keywords); $i++)
- {
- #Delete keyword from the user data list, because the data
- #have not to be updated within the database
- if($keywords[$i] == $keyword)
- {
- $keywords[$i] = null;
- }
- }
- }
- }
- #Inserting keyword, that are not existing in the database
- for($i = 0; $i < count($keywords); $i++)
- {
- #echo "2: Alle Eintr�ge des Keyword arrays: Keyword: ", $keywords[$i], "; Index: ", $i, ";<br>";
- if($keywords[$i] != null)
- {
- #echo "3: Eintr�ge ungleich null: Keyword: ", $keywords[$i], "; Index: ", $i, ";<nr>";
- $keyword = trim($keywords[$i]);
- #Check, if the keyword is exsiting in the database
- $keyword_sql = "SELECT keyword_id FROM keyword " .
- "WHERE UPPER(keyword) = UPPER($1)";
- $v = array($keyword);
- $t = array("s");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
- $keyword_row = db_fetch_array($res_keyword_sql);
- #Keyword exists in the database
- if($keyword_row != null)
- {
- $keyword_id = $keyword_row[0];
- #echo "4: Keyword in Datenbank vorhanden: id des Keywords: ", $keyword_id, ";<br>";
- }
- #Keyword does not exist in the database
- else
- {
- $keyword_sql = "INSERT INTO keyword (keyword) VALUES ($1)";
- $v = array($keyword);
- $t = array("s");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
-
- $keyword_sql = "SELECT keyword_id FROM keyword WHERE keyword = $1";
- $v = array($keyword);
- $t = array("s");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
- $keyword_row = db_fetch_array($res_keyword_sql);
- if($keyword_row != null)
- {
- $keyword_id = $keyword_row[0];
- #echo "4: Keyword in der Datenbank nicht vorhanden: id des Keywords: ", $keyword_id, ";<br>";
- }
- }
- #Inserting the reference between layer and keyword in the layer_keyword table
- $keyword_sql = "INSERT INTO layer_keyword (fkey_layer_id, fkey_keyword_id) " .
- "VALUES ($1, $2)";
- $v = array($layer_id, $keyword_id);
- $t = array("s", "s");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
- }
- }
- #Delete all elements from array
- unset($keywords);
- }
- }
- }
-}
-unset($update_content);
-
-#delete preview
-
-if(isset($_REQUEST['delete_preview']) && $_REQUEST['delete_preview']=='1'
- && isset($_REQUEST['layer_id']))
-{
- $preview_sql = "DELETE FROM layer_preview WHERE fkey_layer_id = $1";
- $v = array($_REQUEST['layer_id']);
- $t = array("s");
- $res_preview_sql = db_prep_query($preview_sql, $v, $t);
- die("Preview has been deleted!</body></html>");
-}
-?>
-<form name='form1' action='<?php $self ?>' method='post'>
-
-<table border='0'>
-<tr>
-<td WIDTH="300" align="left">
-<B>WMS Metadaten<B/>
-<td/>
-<td WIDTH="160">
-<td/>
-</tr>
-
-<?php
-
-#Use select box to select a wms
-
-if (isset($_REQUEST['show_wms_list']) && $_REQUEST['show_wms_list'] == true)
-{
-
- #Querying information from wms data table
- $wms_sql = "SELECT wms_id, wms_title FROM wms WHERE wms_owner = $1 ORDER BY wms_title";
- $v = array($_SESSION["mb_user_id"]);
- $t = array("i");
- $res_wms_sql = db_prep_query($wms_sql, $v, $t);
- #wms-selection
-
- $selectBox = "";
- while($row = db_fetch_array($res_wms_sql)) {
- if ($adm->getWmsPermission($row["wms_id"], $_SESSION['mb_user_id'])) {
- $selectBox .= "<option value='".$row["wms_id"]."' ";
- if(isset($_REQUEST['wmsList']) && $_REQUEST['wmsList'] == $row["wms_id"]) {
- $selectBox .= "selected";
- }
- $selectBox .= "> ".$row["wms_title"]."</option>";
- }
- }
-
- if ($selectBox != "") {
- echo "<tr><td>";
- echo "<select size=6 name='wmsList' onchange='submit()'>".$selectBox."</select>";
- echo "</td><td width='160px' align='right'>";
- echo "<input type='button' class='sbutton' value='save' onclick='save()'>";
- echo "</td></tr>";
- }
- else {
- echo "<div>no wms owner.</div>";
- die;
- }
-
- if(isset($_REQUEST['wmsList']) == true && $_REQUEST['wmsList'] <>0)
- editWMSByWMSID ($_REQUEST['wmsList']);
-}
-
-echo "</table>";
-
-//$wms_id;
-function editWMSByWMSID($param_wms_id)
-{
- global $wms_id;
- $wms_id = $param_wms_id;
-
-}
-
-
-if(isset($wms_id) == true && $wms_id <>0)
-{
- $selected_wms_sql = "SELECT * FROM wms WHERE wms_id = $1";
- $v = array($wms_id);
- $t = array("s");
- $res_selected_wms_sql = db_prep_query($selected_wms_sql, $v, $t);
- $selected_row = db_fetch_array($res_selected_wms_sql);
-
-?>
-
- <table border='0' class='table_top' >
- <tr>
- <td>WMS-Titel:<td><td/>
- <input type='text' name='wms_title_box' value='<?php echo $selected_row["wms_title"];?>' /><td/>
-
- <td>WMS- Abstract:<td><td/>
- <input type='text' name='wms_abstract_box' value='<?php echo $selected_row["wms_abstract"];?>' /><td/>
-
- <td >Fees:<td><td/>
- <input type='text' name='fees_box' value='<?php echo $selected_row["fees"]?>'/><td/>
- <tr/>
-
- <tr>
- <td>Access Constraints:<td><td/>
- <input type='text' name='accessconstraints_box' value='<?php echo $selected_row["accessconstraints"]?>'/><td/>
-
- <td>Contact Person:<td><td/>
- <input type='text' name='contactperson_box' value='<?php echo $selected_row["contactperson"]?>'/><td/>
-
- <td>Contact Position:<td><td/>
- <input type='text' name='contactposition_box' value='<?php echo $selected_row["contactposition"]?>'/><td/>
- <tr/>
-
- <tr>
- <td>Contact Organization:<td><td/>
- <input type='text' name='contactorganization_box' value='<?php echo $selected_row["contactorganization"]?>'/><td/>
-
- <td>Address:<td><td/>
- <input type='text' name='address_box' value='<?php echo $selected_row["address"]?>'/><td/>
-
- <td style="width:">City:<td><td/>
- <input type='text' name='city_box' value='<?php echo $selected_row["city"]?>'/><td/>
- <tr/>
-
- <tr>
- <td>State or Province:<td><td/>
- <input type='text' name='stateorprovince_box' value='<?php echo $selected_row["stateorprovince"]?>'/><td/>
-
- <td>Postcode:<td><td/>
- <input type='text' name='postcode_box' value='<?php echo $selected_row["postcode"]?>'/><td/>
-
- <td>Country:<td><td/>
- <input type='text' name='country_box' value='<?php echo $selected_row["country"]?>'/><td/>
- <tr/>
-
- <tr>
- <td>Telephone:<td><td/>
- <input type='text' name='contactvoicetelephone_box'
- value='<?php echo $selected_row["contactvoicetelephone"]?>'/><td/>
-
- <td>Fax:<td><td/>
- <input type='text' name='contactfacsimiletelephone_box' value='<?php echo $selected_row["contactfacsimiletelephone"]?>'/><td/>
-
- <td>E-Mail:<td><td/>
- <input type='text' name='contactelectronicmailaddress_box' value='<?php echo $selected_row["contactelectronicmailaddress"]?>'/><td/>
- <tr/>
- <tr>
- <?php
- if (isset($selected_row["wms_timestamp"]) && $selected_row["wms_timestamp"] <> "") {
- $datum = date("d.m.Y",$selected_row["wms_timestamp"]);
- }
- else $datum = ""
-?>
- <td>Date:<td><td/>
- <input type='text' name='wms_timestamp_box' value='<?php echo $datum?>' onClick='pick_the_date(document.form1.wms_timestamp_box)'/><td/>
- <tr/>
-
- <table class="table_layer">
- <tr><td>Nr.</td><td>Title</td><td>Abstract</td><td>Keywords</td><td></td></tr>
-
-
-<?php
-
- $layer_sql = "SELECT * FROM layer WHERE layer.fkey_wms_id = $1" .
- " ORDER BY layer_pos";
- $v = array($wms_id);
- $t = array("s");
- $res_layer_sql = db_prep_query($layer_sql, $v, $t);
-
- while($layer_row = db_fetch_array($res_layer_sql))
- {
- ?>
- <tr align='center'>
- <td><input type='text' size='1' name='L_<?php echo $layer_row['layer_id']?>___layer_nr'
- value='<?php echo $layer_row['layer_pos']?>' readonly></td>
- <td><input type='text' size='15' name='L_<?php echo $layer_row['layer_id']?>___layer_title'
- value='<?php echo $layer_row['layer_title']?>' readonly></td>
- <td><input type='text' size='42' name='L_<?php echo $layer_row['layer_id']?>___layer_abstract'
- value='<?php echo $layer_row['layer_abstract']?>'>
-
- <?php
- $keyword_sql = "SELECT keyword FROM keyword, layer_keyword, layer " .
- "WHERE keyword.keyword_id = layer_keyword.fkey_keyword_id " .
- "AND layer_keyword.fkey_layer_id = layer.layer_id " .
- "AND layer.fkey_wms_id = $1 " .
- "AND layer.layer_id = $2";
- $v = array($wms_id, $layer_row['layer_id']);
- $t = array("s", "i");
- $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
- $keywordList = "";
- $seperator = "";
- while($keyword_row = db_fetch_array($res_keyword_sql))
- {
- if($keywordList != "")
- {
- $seperator = ",";
- }
- $keywordList .= $seperator.$keyword_row["keyword"];
- }
- ?>
- <td><input type='text' size='42' name='L_<?php echo $layer_row['layer_id']?>___layer_keywords'
- value='<?php echo $keywordList?>'>
- </td>
- <td>
- <!--
- <input type="button" value='preview' onclick="window.open('../frames/index.php?&gui_id=layer_preview&layer_preview=1&portal_services=<?php echo $layer_row['layer_id'];?>', 'mini_mapbender', 'height=370, width=370, dependent=yes');">
- -->
- </td>
- <td>
-<?php
-/*
- $preview_sql = "SELECT * FROM layer_preview " .
- "WHERE fkey_layer_id = ".$layer_row['layer_id']."";
- $res_preview_sql = db_query($preview_sql);
- if(db_numrows($res_preview_sql)>0){?>
- <!--
- <input id="<?php echo $layer_row['layer_id'];?>_dp" type="button" value='delete preview' onclick="deletepreview('<?php echo $layer_row['layer_id'];?>');">
- -->
-<?php }else{?>
- <!--
- <input id="<?php echo $layer_row['layer_id'];?>_dp" type="button" value='delete preview' style="display:none;" onclick="deletepreview('<?php echo $layer_row['layer_id'];?>');">
- -->
-<?php }*/?>
- </td>
- </tr>
-
-
- <?php
- }
-
-
- #editWMSByWMSID(961);
- ?>
-
- </table>
- <input type='hidden' name='update_content' value=''/>
- <input type='hidden' name='wms_id' value='<?php echo $wms_id ?>'/>
- <!--
- <input type="hidden" value='' name='delete_preview'>
- -->
- <input type="hidden" value='' name='layer_id'>
- </form>
- </body>
- </html>
-<?php
-}
-?>
Copied: branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php (from rev 2209, branches/2.4.5/http/php/mod_editWMS_Metadata.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_editWMS_Metadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,514 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php?title=Edit_WMS_Metadata
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Edit WMS Metadata</title>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+include_once '../include/dyn_css.php';
+
+$adm = new administration();
+?>
+<script language="JavaScript">
+var dTarget;
+function save()
+{
+ document.forms[0].update_content.value=1;
+ document.forms[0].submit();
+}
+
+function deletepreview(layer_id)
+{
+ var url = String(document.location);
+ url = url.substr(0, url.indexOf('?'));
+ window.open(url+"?<?php echo strip_tags(SID);?>&guiID=<?php echo $gui_id;?>&elementID=<?php echo $e_id;?>&delete_preview=1&layer_id="+layer_id,'delete preview', 'height=50, width=150, dependent=yes');
+ document.getElementById(layer_id+"_dp").style.display="none";
+}
+
+function pick_the_date(obj)
+{
+ dTarget = obj;
+ var dp =
+window.open('../tools/datepicker/datepicker.php?m=Jan_Feb_Mrz_Apr_Mai_Jun_Jul_Aug_Sep_Okt_Nov_Dez&d=Mo_Di_Mi_Do_Fr_Sa_So&t=heute','dp','left=200,top=200,width=230,height=210,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0');
+ dp.focus();
+ return false;
+}
+</script>
+</head>
+<body>
+<?php
+
+function guessTimestamp($timestr)
+{
+
+ if (strpos($timestr, '.'))
+ {
+ list($day, $month, $year) = explode(".", $timestr);
+ }
+ elseif (strpos($timestr, '/'))
+ {
+ list($month, $day, $year) = explode("/", $timestr);
+ }
+ elseif (strpos($timestr, '-'))
+ {
+ list($year, $month, $day) = explode("-", $timestr);
+ }
+ else
+ {
+ $year = 0;
+ $month = 0;
+ $day = 0;
+ }
+ return mktime(0, 0, 0, $month, $day, intval($year));
+
+}
+
+#Update handling
+
+if (isset($_REQUEST['update_content']) && $_REQUEST['update_content'] == true) {
+
+ $update_wms_sql = "UPDATE wms SET ";
+ $update_wms_sql .= "wms_title = $1, wms_abstract = $2, fees = $3, ";
+ $update_wms_sql .= "accessconstraints = $4, contactperson = $5, ";
+ $update_wms_sql .= "contactposition = $6, contactorganization = $7, ";
+ $update_wms_sql .= "address = $8, city = $9, stateorprovince = $10, ";
+ $update_wms_sql .= "postcode = $11, country = $12, ";
+ $update_wms_sql .= "contactvoicetelephone = $13, ";
+ $update_wms_sql .= "contactfacsimiletelephone = $14, ";
+ $update_wms_sql .= "contactelectronicmailaddress = $15 ";
+
+ $v = array();
+ array_push($v, $_REQUEST['wms_title_box']);
+ array_push($v, $_REQUEST['wms_abstract_box']);
+ array_push($v, $_REQUEST['fees_box']);
+ array_push($v, $_REQUEST['accessconstraints_box']);
+ array_push($v, $_REQUEST['contactperson_box']);
+ array_push($v, $_REQUEST['contactposition_box']);
+ array_push($v, $_REQUEST['contactorganization_box']);
+ array_push($v, $_REQUEST['address_box']);
+ array_push($v, $_REQUEST['city_box']);
+ array_push($v, $_REQUEST['stateorprovince_box']);
+ array_push($v, $_REQUEST['postcode_box']);
+ array_push($v, $_REQUEST['country_box']);
+ array_push($v, $_REQUEST['contactvoicetelephone_box']);
+ array_push($v, $_REQUEST['contactfacsimiletelephone_box']);
+ array_push($v, $_REQUEST['contactelectronicmailaddress_box']);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
+
+ if (isset($_REQUEST['wms_timestamp_box']) && $_REQUEST['wms_timestamp_box'] <> "") {
+ $update_wms_sql .= ", wms_timestamp = $16 ";
+ array_push($v, guessTimestamp($_REQUEST['wms_timestamp_box']));
+ array_push($t, "s");
+
+ $update_wms_sql .= "WHERE wms_id = $17";
+ }
+ else {
+ $update_wms_sql .= "WHERE wms_id = $16";
+ }
+ array_push($v, $_REQUEST['wms_id']);
+ array_push($t, "s");
+
+ $res_update_wms_sql = db_prep_query($update_wms_sql, $v, $t);
+
+ while(list($key,$val) = each($_REQUEST))
+ {
+ if(preg_match("/___/", $key))
+ {
+ $myKey = explode("___", $key);
+ $layer_id = preg_replace("/L_/","",$myKey[0]);
+ if($myKey[1]=="layer_abstract") {
+ $layer_sql = "UPDATE layer SET layer_abstract = $1 ";
+ $layer_sql .= "WHERE layer_id = $2 AND fkey_wms_id = $3";
+ $v = array($val, $layer_id, $_REQUEST['wms_id']);
+ $t = array("s", "i", "s");
+ $res_keyword_sql = db_prep_query($layer_sql, $v, $t);
+ }
+ if($myKey[1]=="layer_keywords") {
+ #Get all keywords depending on the given layer after user modification
+ $keywords = explode(",",$val);
+ #delete all blanks from the keywords list
+ for ($j = 0; $j < count($keywords); $j++) {
+ $word = $keywords[$j];
+ $word = trim($word);
+ $keywords[$j] = $word;
+ }
+ #echo "1: Keywords eines Layers: id des Layers: ", $layer_id, ", �bergebener String: ", $val, ";<br>";
+ #Get all keywords depending on this layer from database
+ $keyword_sql = "SELECT keyword_id, keyword FROM keyword, layer_keyword, layer " .
+ "WHERE keyword.keyword_id = layer_keyword.fkey_keyword_id " .
+ "AND layer_keyword.fkey_layer_id = layer.layer_id " .
+ "AND layer.fkey_wms_id = $1 " .
+ "AND layer.layer_id = $2";
+
+ $v = array($_REQUEST['wms_id'], $layer_id);
+ $t = array("s", "i");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+ while($keyword_row = db_fetch_array($res_keyword_sql))
+ {
+ $keyword = $keyword_row['keyword'];
+ $keyword_id = $keyword_row['keyword_id'];
+ #keyword has been deleted or has been modified
+ #keyword exists in database but not in user data
+ $index = -1;
+ #echo "1a: Abfrage ob DB Keywords in User Liste: Keyword: ", $keyword, ";<br>";
+ if(in_array($keyword, $keywords) == false)
+ {
+ #echo "1c: Keyword nicht in User Liste: Keyword: ", $keyword, ";<br>";
+ #Deleting reference to the keyword from the layer_keyword table.
+ $keyword_sql = "DELETE FROM layer_keyword " .
+ "WHERE fkey_layer_id = $1 " .
+ "AND fkey_keyword_id = $2";
+ $v = array($layer_id, $keyword_id);
+ $t = array("i", "i");
+ db_prep_query($keyword_sql, $v, $t);
+ #Checking, if the keyword is in use by any layer
+ $layer_sql = "SELECT * FROM layer_keyword " .
+ "WHERE fkey_keyword_id = $1";
+ $v = array($keyword_id);
+ $t = array("i");
+ $res_layer_sql = db_prep_query($layer_sql, $v, $t);
+ if(!($row = db_fetch_array($res_layer_sql)))
+ {
+ #If keyword will not longer be in use, delete it from keyword table
+ $keyword_sql = "DELETE FROM keyword " .
+ "WHERE keyword_id = $1";
+ $v = array($keyword_id);
+ $t = array("i");
+ db_prep_query($keyword_sql, $v, $t);
+ }
+ }
+ #Keyword exists in the database and in the user data
+ else
+ {
+ #echo "1d: Keyword ist in User Liste: Keyword: ", $keyword, ";<br>";
+ for($i = 0; $i < count($keywords); $i++)
+ {
+ #Delete keyword from the user data list, because the data
+ #have not to be updated within the database
+ if($keywords[$i] == $keyword)
+ {
+ $keywords[$i] = null;
+ }
+ }
+ }
+ }
+ #Inserting keyword, that are not existing in the database
+ for($i = 0; $i < count($keywords); $i++)
+ {
+ #echo "2: Alle Eintr�ge des Keyword arrays: Keyword: ", $keywords[$i], "; Index: ", $i, ";<br>";
+ if($keywords[$i] != null)
+ {
+ #echo "3: Eintr�ge ungleich null: Keyword: ", $keywords[$i], "; Index: ", $i, ";<nr>";
+ $keyword = trim($keywords[$i]);
+ #Check, if the keyword is exsiting in the database
+ $keyword_sql = "SELECT keyword_id FROM keyword " .
+ "WHERE UPPER(keyword) = UPPER($1)";
+ $v = array($keyword);
+ $t = array("s");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+ $keyword_row = db_fetch_array($res_keyword_sql);
+ #Keyword exists in the database
+ if($keyword_row != null)
+ {
+ $keyword_id = $keyword_row[0];
+ #echo "4: Keyword in Datenbank vorhanden: id des Keywords: ", $keyword_id, ";<br>";
+ }
+ #Keyword does not exist in the database
+ else
+ {
+ $keyword_sql = "INSERT INTO keyword (keyword) VALUES ($1)";
+ $v = array($keyword);
+ $t = array("s");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+
+ $keyword_sql = "SELECT keyword_id FROM keyword WHERE keyword = $1";
+ $v = array($keyword);
+ $t = array("s");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+ $keyword_row = db_fetch_array($res_keyword_sql);
+ if($keyword_row != null)
+ {
+ $keyword_id = $keyword_row[0];
+ #echo "4: Keyword in der Datenbank nicht vorhanden: id des Keywords: ", $keyword_id, ";<br>";
+ }
+ }
+ #Inserting the reference between layer and keyword in the layer_keyword table
+ $keyword_sql = "INSERT INTO layer_keyword (fkey_layer_id, fkey_keyword_id) " .
+ "VALUES ($1, $2)";
+ $v = array($layer_id, $keyword_id);
+ $t = array("s", "s");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+ }
+ }
+ #Delete all elements from array
+ unset($keywords);
+ }
+ }
+ }
+}
+unset($update_content);
+
+#delete preview
+
+if(isset($_REQUEST['delete_preview']) && $_REQUEST['delete_preview']=='1'
+ && isset($_REQUEST['layer_id']))
+{
+ $preview_sql = "DELETE FROM layer_preview WHERE fkey_layer_id = $1";
+ $v = array($_REQUEST['layer_id']);
+ $t = array("s");
+ $res_preview_sql = db_prep_query($preview_sql, $v, $t);
+ die("Preview has been deleted!</body></html>");
+}
+?>
+<form name='form1' action='<?php echo $self; ?>' method='post'>
+
+<table border='0'>
+<tr>
+<td WIDTH="300" align="left">
+<B>WMS Metadaten<B/>
+<td/>
+<td WIDTH="160">
+<td/>
+</tr>
+
+<?php
+
+#Use select box to select a wms
+
+//if (isset($_REQUEST['show_wms_list']) && $_REQUEST['show_wms_list'] == true){
+
+ #Querying information from wms data table
+ $wms_sql = "SELECT wms_id, wms_title FROM wms WHERE wms_owner = $1 ORDER BY wms_title";
+ $v = array($_SESSION["mb_user_id"]);
+ $t = array("i");
+ $res_wms_sql = db_prep_query($wms_sql, $v, $t);
+ #wms-selection
+
+ $selectBox = "";
+ while($row = db_fetch_array($res_wms_sql)) {
+ if ($adm->getWmsPermission($row["wms_id"], $_SESSION['mb_user_id'])) {
+ $selectBox .= "<option value='".$row["wms_id"]."' ";
+ if(isset($_REQUEST['wmsList']) && $_REQUEST['wmsList'] == $row["wms_id"]) {
+ $selectBox .= "selected";
+ }
+ $selectBox .= "> ".$row["wms_title"]."</option>";
+ }
+ }
+
+ if ($selectBox != "") {
+ echo "<tr><td>";
+ echo "<select size=6 name='wmsList' onchange='submit()'>".$selectBox."</select>";
+ echo "</td><td width='160px' align='right'>";
+ echo "<input type='button' class='sbutton' value='save' onclick='save()'>";
+ echo "</td></tr>";
+ }
+ else {
+ echo "<div>no wms owner.</div>";
+ die;
+ }
+
+ if(isset($_REQUEST['wmsList']) == true && $_REQUEST['wmsList'] <>0)
+ editWMSByWMSID ($_REQUEST['wmsList']);
+//}
+
+echo "</table>";
+
+//$wms_id;
+function editWMSByWMSID($param_wms_id)
+{
+ global $wms_id;
+ $wms_id = $param_wms_id;
+
+}
+
+
+if(isset($wms_id) == true && $wms_id <>0)
+{
+ $selected_wms_sql = "SELECT * FROM wms WHERE wms_id = $1";
+ $v = array($wms_id);
+ $t = array("s");
+ $res_selected_wms_sql = db_prep_query($selected_wms_sql, $v, $t);
+ $selected_row = db_fetch_array($res_selected_wms_sql);
+
+?>
+
+ <table border='0' class='table_top' >
+ <tr>
+ <td>WMS-Titel:<td><td/>
+ <input type='text' name='wms_title_box' value='<?php echo $selected_row["wms_title"];?>' /><td/>
+
+ <td>WMS- Abstract:<td><td/>
+ <input type='text' name='wms_abstract_box' value='<?php echo $selected_row["wms_abstract"];?>' /><td/>
+
+ <td >Fees:<td><td/>
+ <input type='text' name='fees_box' value='<?php echo $selected_row["fees"]?>'/><td/>
+ <tr/>
+
+ <tr>
+ <td>Access Constraints:<td><td/>
+ <input type='text' name='accessconstraints_box' value='<?php echo $selected_row["accessconstraints"]?>'/><td/>
+
+ <td>Contact Person:<td><td/>
+ <input type='text' name='contactperson_box' value='<?php echo $selected_row["contactperson"]?>'/><td/>
+
+ <td>Contact Position:<td><td/>
+ <input type='text' name='contactposition_box' value='<?php echo $selected_row["contactposition"]?>'/><td/>
+ <tr/>
+
+ <tr>
+ <td>Contact Organization:<td><td/>
+ <input type='text' name='contactorganization_box' value='<?php echo $selected_row["contactorganization"]?>'/><td/>
+
+ <td>Address:<td><td/>
+ <input type='text' name='address_box' value='<?php echo $selected_row["address"]?>'/><td/>
+
+ <td style="width:">City:<td><td/>
+ <input type='text' name='city_box' value='<?php echo $selected_row["city"]?>'/><td/>
+ <tr/>
+
+ <tr>
+ <td>State or Province:<td><td/>
+ <input type='text' name='stateorprovince_box' value='<?php echo $selected_row["stateorprovince"]?>'/><td/>
+
+ <td>Postcode:<td><td/>
+ <input type='text' name='postcode_box' value='<?php echo $selected_row["postcode"]?>'/><td/>
+
+ <td>Country:<td><td/>
+ <input type='text' name='country_box' value='<?php echo $selected_row["country"]?>'/><td/>
+ <tr/>
+
+ <tr>
+ <td>Telephone:<td><td/>
+ <input type='text' name='contactvoicetelephone_box'
+ value='<?php echo $selected_row["contactvoicetelephone"]?>'/><td/>
+
+ <td>Fax:<td><td/>
+ <input type='text' name='contactfacsimiletelephone_box' value='<?php echo $selected_row["contactfacsimiletelephone"]?>'/><td/>
+
+ <td>E-Mail:<td><td/>
+ <input type='text' name='contactelectronicmailaddress_box' value='<?php echo $selected_row["contactelectronicmailaddress"]?>'/><td/>
+ <tr/>
+ <tr>
+ <?php
+ if (isset($selected_row["wms_timestamp"]) && $selected_row["wms_timestamp"] <> "") {
+ $datum = date("d.m.Y",$selected_row["wms_timestamp"]);
+ }
+ else $datum = ""
+?>
+ <td>Date:<td><td/>
+ <input type='text' name='wms_timestamp_box' value='<?php echo $datum?>' onClick='pick_the_date(document.form1.wms_timestamp_box)'/><td/>
+ <tr/>
+
+ <table class="table_layer">
+ <tr><td>Nr.</td><td>Title</td><td>Abstract</td><td>Keywords</td><td></td></tr>
+
+
+<?php
+
+ $layer_sql = "SELECT * FROM layer WHERE layer.fkey_wms_id = $1" .
+ " ORDER BY layer_pos";
+ $v = array($wms_id);
+ $t = array("s");
+ $res_layer_sql = db_prep_query($layer_sql, $v, $t);
+
+ while($layer_row = db_fetch_array($res_layer_sql))
+ {
+ ?>
+ <tr align='center'>
+ <td><input type='text' size='1' name='L_<?php echo $layer_row['layer_id']?>___layer_nr'
+ value='<?php echo $layer_row['layer_pos']?>' readonly></td>
+ <td><input type='text' size='15' name='L_<?php echo $layer_row['layer_id']?>___layer_title'
+ value='<?php echo $layer_row['layer_title']?>' readonly></td>
+ <td><input type='text' size='42' name='L_<?php echo $layer_row['layer_id']?>___layer_abstract'
+ value='<?php echo $layer_row['layer_abstract']?>'>
+
+ <?php
+ $keyword_sql = "SELECT keyword FROM keyword, layer_keyword, layer " .
+ "WHERE keyword.keyword_id = layer_keyword.fkey_keyword_id " .
+ "AND layer_keyword.fkey_layer_id = layer.layer_id " .
+ "AND layer.fkey_wms_id = $1 " .
+ "AND layer.layer_id = $2";
+ $v = array($wms_id, $layer_row['layer_id']);
+ $t = array("s", "i");
+ $res_keyword_sql = db_prep_query($keyword_sql, $v, $t);
+ $keywordList = "";
+ $seperator = "";
+ while($keyword_row = db_fetch_array($res_keyword_sql))
+ {
+ if($keywordList != "")
+ {
+ $seperator = ",";
+ }
+ $keywordList .= $seperator.$keyword_row["keyword"];
+ }
+ ?>
+ <td><input type='text' size='42' name='L_<?php echo $layer_row['layer_id']?>___layer_keywords'
+ value='<?php echo $keywordList?>'>
+ </td>
+ <td>
+ <!--
+ <input type="button" value='preview' onclick="window.open('../frames/index.php?&gui_id=layer_preview&layer_preview=1&portal_services=<?php echo $layer_row['layer_id'];?>', 'mini_mapbender', 'height=370, width=370, dependent=yes');">
+ -->
+ </td>
+ <td>
+<?php
+/*
+ $preview_sql = "SELECT * FROM layer_preview " .
+ "WHERE fkey_layer_id = ".$layer_row['layer_id']."";
+ $res_preview_sql = db_query($preview_sql);
+ if(db_numrows($res_preview_sql)>0){?>
+ <!--
+ <input id="<?php echo $layer_row['layer_id'];?>_dp" type="button" value='delete preview' onclick="deletepreview('<?php echo $layer_row['layer_id'];?>');">
+ -->
+<?php }else{?>
+ <!--
+ <input id="<?php echo $layer_row['layer_id'];?>_dp" type="button" value='delete preview' style="display:none;" onclick="deletepreview('<?php echo $layer_row['layer_id'];?>');">
+ -->
+<?php }*/?>
+ </td>
+ </tr>
+
+
+ <?php
+ }
+
+
+ #editWMSByWMSID(961);
+ ?>
+
+ </table>
+ <input type='hidden' name='update_content' value=''/>
+ <input type='hidden' name='wms_id' value='<?php echo $wms_id ?>'/>
+ <!--
+ <input type="hidden" value='' name='delete_preview'>
+ -->
+ <input type="hidden" value='' name='layer_id'>
+ </form>
+ </body>
+ </html>
+<?php
+}
+?>
Deleted: branches/2.4.5_rc1/http/php/mod_edit_element_vars.php
===================================================================
--- branches/2.4.5/http/php/mod_edit_element_vars.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_edit_element_vars.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,360 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_edit_element_vars.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Element Vars</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .guiList1{
- position:absolute;
- top:30px;
- left:10px;
- width:200px
- }
- .buttonbar{
- position:absolute;
- top:40px;
- left:10px;
- }
- .guiList1_text{
- position:absolute;
- top:10px;
- left:10px;
- font-size:16px;
- color: #0066cc;
- }
- .guiList2{
- position:absolute;
- top:40px;
- left:400px;
- width:200px
- }
- .all{
- position:absolute;
- top:38px;
- left:610px;
- }
- .guiList2_header{
- position:absolute;
- top:10px;
- left:400px;
- font-size:16px;
- color: #0066cc;
- }
- .myElements{
- position:absolute;
- top:70px;
- left:400px;
- }
- .myTable{
- border: 1px solid;
- font-size: 11px;
- }
- .myForm{
- position:absolute;
- top:70px;
- left:10px;
- }
- .textfield{
- width:277px
- }
- .on{
- color: #0066cc;
- }
- -->
-</style>
-<?php
-# handle database updates etc.....
-if(isset($mySave) && $mySave == '1'){
- if ($SYS_DBTYPE=='pgsql') {
- $sql[0] = "SET AUTOCOMMIT=1;";
- }
- else {
- $sql[0] = "SET AUTOCOMMIT=0;shit happens";
- }
- $v[0] = array();
- $t[0] = array();
- $sql[1] = "BEGIN;";
- $v[1] = array();
- $t[1] = array();
- $sql[2] = "DELETE FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
- $v[2] = array($e_id, $guiList1);
- $t[2] = array("s", "s");
-
-
- if($e_left < 1){$e_left = "NULL";}
- if($e_top < 1){$e_top = "NULL";}
- if($e_width < 1){$e_width = "NULL";}
- if($e_height < 1){$e_height = "NULL";}
- if($e_z_index < 1){$e_z_index = "NULL";}
- $sql[3] = "INSERT INTO gui_element_vars ";
- $sql[3] .= "(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element, e_src, ";
- $sql[3] .= "e_attributes, e_left, e_top, e_width, e_height, e_z_index, ";
- $sql[3] .= "e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, ";
- $sql[3] .= "e_requires) ";
- $sql[3] .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)";
- $v[3] = array($guiList1, $e_id, $e_pos, $e_public, db_escape_string($e_comment), $e_element, $e_src, db_escape_string($e_attributes), $e_left, $e_top, $e_width, $e_height, $e_z_index, $e_more_styles, $e_content, $e_closetag, $e_js_file, $e_mb_mod, $e_target, $e_requires);
- $t[3] = array("s", "s", "i", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
- #echo $sql[3];
- for ($i = 0; $i < count($sql); $i++) {
- $res = db_prep_query($sql[$i], $v[$i], $t[$i]);
- }
- if($res){
- $res = db_query( "COMMIT");
- $res = db_query( "SET AUTOCOMMIT=1");
- }
- else{
- $res = db_query( "ROLLBACK");
- $res = db_query( "SET AUTOCOMMIT=1");
- }
-}
-if(isset($myDelete) && $myDelete == '1'){
- $sql = "DELETE FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 AND var_name= $3";
- $v = array($e_id, $guiList1, $var_name);
- $t = array("s", "s", "s");
- $res = db_prep_query($sql, $v, $t);
- $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
- $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
- $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = ""; $e_target = ""; $e_requires = "";
-}
-if(isset($myShow) && $myShow == '1'){
- $_SESSION["mb_user_myGui"] = $guiList1;
- echo "<script language='javascript'>";
- echo "window.open('../frames/login.php?".strip_tags (SID)."&mb_user_myGui=".$guiList1."','','');";
- echo "</script>";
-}
-if(isset($all) && $all == '1'){
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 and var_name= $3;";
- $v = array($guiList2, $e_id, $var_name);
- $t = array("s", "s", "s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while(db_fetch_row($res)){
- $sql_del = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 and var_name= $3";
- $v = array($guiList1, db_result($res,$cnt,"fkey_e_id"), $var_name);
- $t = array("s", "s", "s");
- $res_del = db_prep_query($sql_del, $v, $t);
- if(db_result($res,$cnt,"e_left") == ""){$myleft = 'NULL';} else{$myleft = db_result($res,$cnt,"e_left");}
- if(db_result($res,$cnt,"e_top") == ""){$mytop = 'NULL';} else{$mytop = db_result($res,$cnt,"e_top");}
- if(db_result($res,$cnt,"e_width") == ""){$mywidth = 'NULL';} else{$mywidth = db_result($res,$cnt,"e_width");}
- if(db_result($res,$cnt,"e_height") == ""){$myheight = 'NULL';} else{$myheight = db_result($res,$cnt,"e_height");}
- if(db_result($res,$cnt,"e_z_index") == ""){$my_z_index = 'NULL';} else{$my_z_index = db_result($res,$cnt,"e_z_index");}
-
- $sql_ins = "INSERT INTO gui_element_vars ";
- $sql_ins .= "(fkey_gui_id, e_id, e_pos,e_public, e_comment, e_element, ";
- $sql_ins .= "e_src, e_attributes, e_left, e_top, e_width, e_height, ";
- $sql_ins .= "e_z_index, e_more_styles, e_content, e_closetag, e_js_file, ";
- $sql_ins .= "e_mb_mod, e_target, e_requires) ";
- $sql_ins .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, ";
- $sql_ins .= "$10, $11, $12, $13, $14, $15, $16, $17, $18, ";
- $sql_ins .= "$19, $20)";
- $v = array($guiList1, db_result($res,$cnt,"e_id"), db_result($res,$cnt,"e_pos"), db_result($res,$cnt,"e_public"), db_escape_string(db_result($res,$cnt,"e_comment")), db_result($res,$cnt,"e_element"), db_result($res,$cnt,"e_src"), db_escape_string(db_result($res,$cnt,"e_attributes")), $myleft, $mytop, $mywidth, $myheight, $my_z_index, db_result($res,$cnt,"e_more_styles"), db_escape_string(db_result($res,$cnt,"e_content")), db_result($res,$cnt,"e_closetag"), db_result($res,$cnt,"e_js_file"), db_result($res,$cnt,"e_mb_mod"), db_result($res,$cnt,"e_target"), db_result($res,$cnt,"e_requires"));
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
-
- $res_ins = db_prep_query($sql_ins, $v, $t);
- if (!$res_ins) {
- echo db_error($connect);
- }
- $cnt++;
- }
-}
-# end
-echo "<script language='javascript'>";
-echo "var varIDs = new Array();";
-if(isset($guiList1)){
- $sql = "SELECT var_name FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
- $v = array($guiList1, $e_id);
- $t = array("s", "s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while(db_fetch_row($res)){
- echo "varIDs[".$cnt."] = '".db_result($res,$cnt,"var_name")."'; ";
- $cnt++;
- }
-}
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function setGui(val){
- document.form1.guiList1.value = val;
- document.form1.submit();
-}
-function clearRadio(){
- for(var i=0; i< document.form1.elements.length; i++){
- if(document.form1.elements[i].type == "radio"){
- document.form1.elements[i].checked = false;
- }
- }
-}
-function thisSave(){
- if(document.form1.e_id.value == ""){
- alert("ID ? ");
- document.form1.e_id.focus();
- return;
- }
- var permission = false;
- var isElement = false;
- for(var i=0; i<varIDs.length; i++){
- clearRadio();
- if(document.form1.var_name.value == varIDs[i]){
- permission = confirm("update: " + document.form1.var_name.value + " ?");
- isElement = true;
- break;
- }
- }
- if(permission == true || isElement == false){
- document.form1.mySave.value = 1;
- document.form1.submit();
- }
-}
-function thisDelete(){
- clearRadio();
- var permission = confirm("delete: " + document.form1.e_id.value + " ?");
- if(permission == true){
- document.form1.myDelete.value = 1;
- document.form1.submit();
- }
-}
-function thisShow(){
- document.form1.myShow.value = 1;
- document.form1.submit();
-}
-function addAll(){
- var permission = confirm("add all elements ?");
- if(permission == true){
- clearRadio();
- document.form1.all.value = 1;
- document.form1.submit();
- }
-}
-function thisExport(){
-
- window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
-}
-// -->
-</script>
-</head>
-<body>
-
-<?php
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='get'>";
-
-#Gui to edit
-if(!isset($guiList1)){
- echo "<div class= 'guiList1_text'>GUI:</div>";
- echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>";
- for ($i=0; $i<$count;$i++){
- echo "<option value='".$gui_id[$i]."' ";
- if($guiList1 && $guiList1 == $gui_id[$i]){
- echo "selected";
- }
- echo ">".$gui_name[$i]."</option>";
- }
- echo "</select>";
- // echo "<input type='hidden' name='guiList2' value='' >";
-}
-else{
- echo "<div class= 'guiList1_text'>Edit Elements: ".$guiList1."</div>";
- echo "<div class='buttonbar'>";
- echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> ";
- echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> ";
- echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> ";
- echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> ";
- echo "</div>";
- echo "<input type='hidden' name='guiList1' value='".$guiList1."' >";
- echo "<input type='hidden' name='e_id' value='".$e_id."' >";
-}
-#Elements
-if(isset($guiList1)){
- echo "<div class='guiList2_header'>Templates</div>";
-
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
- $v = array($guiList1, $e_id);
- $t = array("s", "s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- echo "<div class='myElements'><table>";
- while($row = db_fetch_array($res)){
- echo "<tr>";
- echo "<td class='myTable'><input type='radio' name='var_name' value='".$row["var_name"]."' onclick='submit()' ";
- if($row["var_name"] == $var_name){echo "checked";}
- echo "></td><td class='myTable'>";
- //if(db_result($res,$cnt,"e_public") == 1){echo "<div class='on'>on</div>";}
- echo "</td><td class='myTable'>". $row["var_name"]. "</td><td class='myTable'>" .$row["context"]."</td>";
- echo "</tr>";
- $cnt++;
- }
- echo "</table></div>";
-}
-#Formular:
-echo "<table class='myForm'>";
-if(isset($guiList1) && isset($var_name)){
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = '".$e_id."' AND var_name = $2";
- $v = array($guiList1, $var_name);
- $t = array("s", "s");
- //echo $sql;
- $res = db_prep_query($sql, $v, $t);
- if($row = db_fetch_array($res)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' readonly name='e_id' value='".$e_id."'></td></tr>";
- echo "<tr><td>Var Type: </td><td><input type='text' class='textfield' name='type' value='".$row["type"]."'></td></tr>";
- echo "<tr><td>Var Name: </td><td><input type='text' class='textfield' name='var_name_edit' value='".$row["var_name"]."'></td></tr>";
- echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($row["var_value"])."</textarea></td></tr>";
-
- }
- echo "</table>";
-}
-
-?>
-<input type='hidden' name='myDelete'>
-<input type='hidden' name='mySave'>
-<input type='hidden' name='myShow'>
-<input type='hidden' name='all'>
-
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_edit_element_vars.php (from rev 2138, branches/2.4.5/http/php/mod_edit_element_vars.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_edit_element_vars.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_edit_element_vars.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,360 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_edit_element_vars.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Element Vars</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .guiList1{
+ position:absolute;
+ top:30px;
+ left:10px;
+ width:200px
+ }
+ .buttonbar{
+ position:absolute;
+ top:40px;
+ left:10px;
+ }
+ .guiList1_text{
+ position:absolute;
+ top:10px;
+ left:10px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .guiList2{
+ position:absolute;
+ top:40px;
+ left:400px;
+ width:200px
+ }
+ .all{
+ position:absolute;
+ top:38px;
+ left:610px;
+ }
+ .guiList2_header{
+ position:absolute;
+ top:10px;
+ left:400px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .myElements{
+ position:absolute;
+ top:70px;
+ left:400px;
+ }
+ .myTable{
+ border: 1px solid;
+ font-size: 11px;
+ }
+ .myForm{
+ position:absolute;
+ top:70px;
+ left:10px;
+ }
+ .textfield{
+ width:277px
+ }
+ .on{
+ color: #0066cc;
+ }
+ -->
+</style>
+<?php
+# handle database updates etc.....
+if(isset($mySave) && $mySave == '1'){
+ if ($SYS_DBTYPE=='pgsql') {
+ $sql[0] = "SET AUTOCOMMIT=1;";
+ }
+ else {
+ $sql[0] = "SET AUTOCOMMIT=0;shit happens";
+ }
+ $v[0] = array();
+ $t[0] = array();
+ $sql[1] = "BEGIN;";
+ $v[1] = array();
+ $t[1] = array();
+ $sql[2] = "DELETE FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
+ $v[2] = array($e_id, $guiList1);
+ $t[2] = array("s", "s");
+
+
+ if($e_left < 1){$e_left = "NULL";}
+ if($e_top < 1){$e_top = "NULL";}
+ if($e_width < 1){$e_width = "NULL";}
+ if($e_height < 1){$e_height = "NULL";}
+ if($e_z_index < 1){$e_z_index = "NULL";}
+ $sql[3] = "INSERT INTO gui_element_vars ";
+ $sql[3] .= "(fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element, e_src, ";
+ $sql[3] .= "e_attributes, e_left, e_top, e_width, e_height, e_z_index, ";
+ $sql[3] .= "e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, ";
+ $sql[3] .= "e_requires) ";
+ $sql[3] .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17, $18, $19, $20)";
+ $v[3] = array($guiList1, $e_id, $e_pos, $e_public, db_escape_string($e_comment), $e_element, $e_src, db_escape_string($e_attributes), $e_left, $e_top, $e_width, $e_height, $e_z_index, $e_more_styles, $e_content, $e_closetag, $e_js_file, $e_mb_mod, $e_target, $e_requires);
+ $t[3] = array("s", "s", "i", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
+ #echo $sql[3];
+ for ($i = 0; $i < count($sql); $i++) {
+ $res = db_prep_query($sql[$i], $v[$i], $t[$i]);
+ }
+ if($res){
+ $res = db_query( "COMMIT");
+ $res = db_query( "SET AUTOCOMMIT=1");
+ }
+ else{
+ $res = db_query( "ROLLBACK");
+ $res = db_query( "SET AUTOCOMMIT=1");
+ }
+}
+if(isset($myDelete) && $myDelete == '1'){
+ $sql = "DELETE FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2 AND var_name= $3";
+ $v = array($e_id, $guiList1, $var_name);
+ $t = array("s", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
+ $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
+ $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = ""; $e_target = ""; $e_requires = "";
+}
+if(isset($myShow) && $myShow == '1'){
+ $_SESSION["mb_user_myGui"] = $guiList1;
+ echo "<script language='javascript'>";
+ echo "window.open('../frames/login.php?".strip_tags (SID)."&mb_user_myGui=".$guiList1."','','');";
+ echo "</script>";
+}
+if(isset($all) && $all == '1'){
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 and var_name= $3;";
+ $v = array($guiList2, $e_id, $var_name);
+ $t = array("s", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while(db_fetch_row($res)){
+ $sql_del = "DELETE FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2 and var_name= $3";
+ $v = array($guiList1, db_result($res,$cnt,"fkey_e_id"), $var_name);
+ $t = array("s", "s", "s");
+ $res_del = db_prep_query($sql_del, $v, $t);
+ if(db_result($res,$cnt,"e_left") == ""){$myleft = 'NULL';} else{$myleft = db_result($res,$cnt,"e_left");}
+ if(db_result($res,$cnt,"e_top") == ""){$mytop = 'NULL';} else{$mytop = db_result($res,$cnt,"e_top");}
+ if(db_result($res,$cnt,"e_width") == ""){$mywidth = 'NULL';} else{$mywidth = db_result($res,$cnt,"e_width");}
+ if(db_result($res,$cnt,"e_height") == ""){$myheight = 'NULL';} else{$myheight = db_result($res,$cnt,"e_height");}
+ if(db_result($res,$cnt,"e_z_index") == ""){$my_z_index = 'NULL';} else{$my_z_index = db_result($res,$cnt,"e_z_index");}
+
+ $sql_ins = "INSERT INTO gui_element_vars ";
+ $sql_ins .= "(fkey_gui_id, e_id, e_pos,e_public, e_comment, e_element, ";
+ $sql_ins .= "e_src, e_attributes, e_left, e_top, e_width, e_height, ";
+ $sql_ins .= "e_z_index, e_more_styles, e_content, e_closetag, e_js_file, ";
+ $sql_ins .= "e_mb_mod, e_target, e_requires) ";
+ $sql_ins .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, ";
+ $sql_ins .= "$10, $11, $12, $13, $14, $15, $16, $17, $18, ";
+ $sql_ins .= "$19, $20)";
+ $v = array($guiList1, db_result($res,$cnt,"e_id"), db_result($res,$cnt,"e_pos"), db_result($res,$cnt,"e_public"), db_escape_string(db_result($res,$cnt,"e_comment")), db_result($res,$cnt,"e_element"), db_result($res,$cnt,"e_src"), db_escape_string(db_result($res,$cnt,"e_attributes")), $myleft, $mytop, $mywidth, $myheight, $my_z_index, db_result($res,$cnt,"e_more_styles"), db_escape_string(db_result($res,$cnt,"e_content")), db_result($res,$cnt,"e_closetag"), db_result($res,$cnt,"e_js_file"), db_result($res,$cnt,"e_mb_mod"), db_result($res,$cnt,"e_target"), db_result($res,$cnt,"e_requires"));
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
+
+ $res_ins = db_prep_query($sql_ins, $v, $t);
+ if (!$res_ins) {
+ echo db_error($connect);
+ }
+ $cnt++;
+ }
+}
+# end
+echo "<script language='javascript'>";
+echo "var varIDs = new Array();";
+if(isset($guiList1)){
+ $sql = "SELECT var_name FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
+ $v = array($guiList1, $e_id);
+ $t = array("s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while(db_fetch_row($res)){
+ echo "varIDs[".$cnt."] = '".db_result($res,$cnt,"var_name")."'; ";
+ $cnt++;
+ }
+}
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function setGui(val){
+ document.form1.guiList1.value = val;
+ document.form1.submit();
+}
+function clearRadio(){
+ for(var i=0; i< document.form1.elements.length; i++){
+ if(document.form1.elements[i].type == "radio"){
+ document.form1.elements[i].checked = false;
+ }
+ }
+}
+function thisSave(){
+ if(document.form1.e_id.value == ""){
+ alert("ID ? ");
+ document.form1.e_id.focus();
+ return;
+ }
+ var permission = false;
+ var isElement = false;
+ for(var i=0; i<varIDs.length; i++){
+ clearRadio();
+ if(document.form1.var_name.value == varIDs[i]){
+ permission = confirm("update: " + document.form1.var_name.value + " ?");
+ isElement = true;
+ break;
+ }
+ }
+ if(permission == true || isElement == false){
+ document.form1.mySave.value = 1;
+ document.form1.submit();
+ }
+}
+function thisDelete(){
+ clearRadio();
+ var permission = confirm("delete: " + document.form1.e_id.value + " ?");
+ if(permission == true){
+ document.form1.myDelete.value = 1;
+ document.form1.submit();
+ }
+}
+function thisShow(){
+ document.form1.myShow.value = 1;
+ document.form1.submit();
+}
+function addAll(){
+ var permission = confirm("add all elements ?");
+ if(permission == true){
+ clearRadio();
+ document.form1.all.value = 1;
+ document.form1.submit();
+ }
+}
+function thisExport(){
+
+ window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
+}
+// -->
+</script>
+</head>
+<body>
+
+<?php
+echo "<form name='form1' action='" . $self."' method='get'>";
+
+#Gui to edit
+if(!isset($guiList1)){
+ echo "<div class= 'guiList1_text'>GUI:</div>";
+ echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>";
+ for ($i=0; $i<$count;$i++){
+ echo "<option value='".$gui_id[$i]."' ";
+ if($guiList1 && $guiList1 == $gui_id[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_name[$i]."</option>";
+ }
+ echo "</select>";
+ // echo "<input type='hidden' name='guiList2' value='' >";
+}
+else{
+ echo "<div class= 'guiList1_text'>Edit Elements: ".$guiList1."</div>";
+ echo "<div class='buttonbar'>";
+ echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> ";
+ echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> ";
+ echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> ";
+ echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> ";
+ echo "</div>";
+ echo "<input type='hidden' name='guiList1' value='".$guiList1."' >";
+ echo "<input type='hidden' name='e_id' value='".$e_id."' >";
+}
+#Elements
+if(isset($guiList1)){
+ echo "<div class='guiList2_header'>Templates</div>";
+
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
+ $v = array($guiList1, $e_id);
+ $t = array("s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ echo "<div class='myElements'><table>";
+ while($row = db_fetch_array($res)){
+ echo "<tr>";
+ echo "<td class='myTable'><input type='radio' name='var_name' value='".$row["var_name"]."' onclick='submit()' ";
+ if($row["var_name"] == $var_name){echo "checked";}
+ echo "></td><td class='myTable'>";
+ //if(db_result($res,$cnt,"e_public") == 1){echo "<div class='on'>on</div>";}
+ echo "</td><td class='myTable'>". $row["var_name"]. "</td><td class='myTable'>" .$row["context"]."</td>";
+ echo "</tr>";
+ $cnt++;
+ }
+ echo "</table></div>";
+}
+#Formular:
+echo "<table class='myForm'>";
+if(isset($guiList1) && isset($var_name)){
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = '".$e_id."' AND var_name = $2";
+ $v = array($guiList1, $var_name);
+ $t = array("s", "s");
+ //echo $sql;
+ $res = db_prep_query($sql, $v, $t);
+ if($row = db_fetch_array($res)){
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' readonly name='e_id' value='".$e_id."'></td></tr>";
+ echo "<tr><td>Var Type: </td><td><input type='text' class='textfield' name='type' value='".$row["type"]."'></td></tr>";
+ echo "<tr><td>Var Name: </td><td><input type='text' class='textfield' name='var_name_edit' value='".$row["var_name"]."'></td></tr>";
+ echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($row["var_value"])."</textarea></td></tr>";
+
+ }
+ echo "</table>";
+}
+
+?>
+<input type='hidden' name='myDelete'>
+<input type='hidden' name='mySave'>
+<input type='hidden' name='myShow'>
+<input type='hidden' name='all'>
+
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_edit_metadata.php
===================================================================
--- branches/2.4.5/http/php/mod_edit_metadata.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_edit_metadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,561 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_edit_metadata.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Metadata</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .guiList1{
- position:absolute;
- top:30px;
- left:10px;
- width:200px
- }
- .buttonbar{
- position:absolute;
- top:40px;
- left:10px;
- }
- .guiList1_text{
- position:absolute;
- top:10px;
- left:10px;
- font-size:16px;
- color: #0066cc;
- }
- .guiList2{
- position:absolute;
- top:40px;
- left:400px;
- width:200px
- }
- .all{
- position:absolute;
- top:38px;
- left:610px;
- }
- .guiList2_header{
- position:absolute;
- top:10px;
- left:400px;
- font-size:16px;
- color: #0066cc;
- }
- .myElements{
- position:absolute;
- top:70px;
- left:400px;
- }
- .myTable{
- border: 1px solid;
- font-size: 11px;
- }
- .myForm{
- position:absolute;
- top:70px;
- left:10px;
- }
- .textfield{
- width:277px
- }
- .textfield_small{
- width:150px
- }
- .on{
- color: #0066cc;
- }
- -->
-</style>
-<?php
-# handle database updates etc.....
-if(isset($mySave) && ($mySave == '1' || $mySave == '2')) {
- if ($mySave == '1'){
- $sql_vars = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id, $guiList1);
- $t = array("s", "s");
- $res_vars = db_prep_query($sql_vars, $v, $t);
- //$rows = db_fetch_array($res_vars);
- $sql = array();
- $v = array();
- $t = array();
- if ($SYS_DBTYPE == "pgsql") {
- $sql[0] = "SET AUTOCOMMIT=1";
- $v[0] = array();
- $t[0] = array();
- }
- else {
- $sql[0] = "SET AUTOCOMMIT=0";
- $v[0] = array();
- $t[0] = array();
- }
- $sql[1] = "BEGIN";
- $v[1] = array();
- $t[1] = array();
-
- $sql[2] = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
- $v[2] = array($e_id, $guiList1);
- $t[2] = array("s", "s");
-
- if($e_left < 1){$e_left = "NULL";}
- if($e_top < 1){$e_top = "NULL";}
- if($e_width < 1){$e_width = "NULL";}
- if($e_height < 1){$e_height = "NULL";}
- if($e_z_index < 1){$e_z_index = "NULL";}
- $sql[3] = "INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, ";
- $sql[3] .= "e_comment, e_element, e_src, e_attributes, e_left, e_top, ";
- $sql[3] .= "e_width, e_height, e_z_index, e_more_styles, e_content, ";
- $sql[3] .= "e_closetag, e_js_file, e_mb_mod, e_target, e_requires) ";
- $sql[3] .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, ";
- $sql[3] .= "$13, $14, $15, $16, $17, $18, $19, $20)";
- $v[3] = array($guiList1, $e_id, $e_pos, $e_public, db_escape_string($e_comment), $e_element, $e_src, db_escape_string($e_attributes), $e_left, $e_top, $e_width, $e_height, $e_z_index, $e_more_styles, db_escape_string($e_content), $e_closetag, $e_js_file, $e_mb_mod, $e_target, $e_requires);
- $t[3] = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
- }
- # mySave == 2 <=> just save GUI description
- elseif ($mySave == '2') {
- $sql = array();
- $v = array();
- $t = array();
- if ($SYS_DBTYPE == "pgsql") {
- $sql[0] = "SET AUTOCOMMIT=1";
- $v[0] = array();
- $t[0] = array();
- }
- else {
- $sql[0] = "SET AUTOCOMMIT=0";
- $v[0] = array();
- $t[0] = array();
- }
- $sql[1] = "BEGIN";
- $v[1] = array();
- $t[1] = array();
-
- $sql[2] = "UPDATE gui SET gui_description = $1 WHERE gui_id = $2";
- $v[2] = array($guiDesc, $guiId);
- $t[2] = array("s", "s");
- }
- for ($i = 0; $i < count($sql); $i++) {
- $res = db_prep_query($sql[$i], $v[$i], $t[$i]);
- if(!$res){break;}
- }
- if($res){
- $res = db_query( "COMMIT");
- $res = db_query( "SET AUTOCOMMIT=1");
- }
- else{
- $res = db_query( "ROLLBACK");
- $res = db_query( "SET AUTOCOMMIT=1");
- }
- if(isset($sql_vars)){//sicherstellen das keine Element_Vars gel�scht wurden
- while($row = db_fetch_array($res_vars)){
- $securesql = "INSERT INTO gui_element_vars (fkey_gui_id, ";
- $securesql .= "fkey_e_id, var_name, var_value, context,type) ";
- $securesql .= "VALUES ($1, $2, $3, $4, $5, $6)";
- $v = array($guiList1, $e_id, $row["var_name"], $row["var_value"], $row["context"], $row["type"]);
- $t = array("s", "s", "s", "s", "s", "s");
- //echo $securesql."<BR>";
- $secureinsert = db_prep_query($securesql, $v, $t);
- }
- }
- if(!$res){break;}
-
-}
-if(isset($myDelete) && $myDelete == '1'){
- $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
- $v = array($e_id, $guiList1);
- $t = array("s", "s");
- $res = db_prep_query($sql, $v, $t);
- $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
- $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
- $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = ""; $e_target = ""; $e_requires = "";
-}
-if(isset($myShow) && $myShow == '1'){
- $_SESSION["mb_user_myGui"] = $guiList1;
- echo "<script language='javascript'>";
- echo "window.open('../frames/login.php?".strip_tags (SID)."&mb_user_myGui=".$guiList1."','','');";
- echo "</script>";
-}
-if(isset($all) && $all == '1'){
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1";
- $v = array($guiList2);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while(db_fetch_row($res)){
- $sql_del = "DELETE FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
- $v = array($guiList1, db_result($res,$cnt,"e_id"));
- $t = array("s", "s");
- $res_del = db_prep_query($sql_del, $v, $t);
- if(db_result($res,$cnt,"e_left") == ""){$myleft = 'NULL';} else{$myleft = db_result($res,$cnt,"e_left");}
- if(db_result($res,$cnt,"e_top") == ""){$mytop = 'NULL';} else{$mytop = db_result($res,$cnt,"e_top");}
- if(db_result($res,$cnt,"e_width") == ""){$mywidth = 'NULL';} else{$mywidth = db_result($res,$cnt,"e_width");}
- if(db_result($res,$cnt,"e_height") == ""){$myheight = 'NULL';} else{$myheight = db_result($res,$cnt,"e_height");}
- if(db_result($res,$cnt,"e_z_index") == ""){$my_z_index = 'NULL';} else{$my_z_index = db_result($res,$cnt,"e_z_index");}
-
- $sql_ins = "INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, ";
- $sql_ins .= "e_comment, e_element, e_src, e_attributes, e_left, e_top, ";
- $sql_ins .= "e_width, e_height, e_z_index, e_more_styles, e_content, ";
- $sql_ins .= "e_closetag, e_js_file, e_mb_mod, e_target, e_requires) ";
- $sql_ins .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, ";
- $sql_ins .= "$10, $11, $12, $13, $14, $15, $16, $17, $18, $19);";
- $v = array($guiList1, db_result($res,$cnt,"e_id"), db_result($res,$cnt,"e_pos"), db_result($res,$cnt,"e_public"), db_escape_string(db_result($res,$cnt,"e_comment")), db_result($res,$cnt,"e_element"), db_result($res,$cnt,"e_src"), db_escape_string(db_result($res,$cnt,"e_attributes")), $myleft, $mytop, $mywidth, $myheight, $my_z_index, db_result($res,$cnt,"e_more_styles"), db_escape_string(db_result($res,$cnt,"e_content")), db_result($res,$cnt,"e_closetag"), db_result($res,$cnt,"e_js_file"), db_result($res,$cnt,"e_mb_mod"), db_result($res,$cnt,"e_target"), db_result($res,$cnt,"e_requires"));
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
-
- $res_ins = db_prep_query($sql_ins, $v, $t);
- if(!$res_ins){echo db_error($con); }
- $cnt++;
- }
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1";
- $v = array($guiList2);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while(db_fetch_row($res)){
- $sql_ins2 = "INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, ";
- $sql_ins2 .= "var_name, var_value, context, type) VALUES (";
- $sql_ins2 .= "$1, $2, $3, $4, $5, $6);";
- $v = array($guiList1, db_result($res,$cnt,"fkey_e_id"), db_result($res,$cnt,"var_name"), db_escape_string(db_result($res,$cnt,"var_value")), db_escape_string(db_result($res,$cnt,"context")), db_result($res,$cnt,"type"));
- $t = array("s", "s", "s", "s", "s", "s");
- $res_ins2 = db_prep_query($sql_ins2, $v, $t);
- if(!$res_ins2){echo db_error($connect); }
-
- $cnt++;
- }
-
-
-}
-# end
-echo "<script language='javascript'>";
-echo "var guiIDs = new Array();";
-if(isset($guiList1)){
- $sql = "SELECT e_id FROM gui_element WHERE fkey_gui_id = $1";
- $v = array($guiList1);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while(db_fetch_row($res)){
- echo "guiIDs[".$cnt."] = '".db_result($res,$cnt,"e_id")."'; ";
- $cnt++;
- }
-}
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function setGui(val){
- document.form1.guiList2.value = val;
- document.form1.submit();
-}
-function clearRadio(){
- for(var i=0; i< document.form1.elements.length; i++){
- if(document.form1.elements[i].type == "radio"){
- document.form1.elements[i].checked = false;
- }
- }
-}
-function thisSave(){
- if(document.form1.e_id.value == ""){
- alert("ID ? ");
- document.form1.e_id.focus();
- return;
- }
- var permission = false;
- var isElement = false;
- for(var i=0; i<guiIDs.length; i++){
- clearRadio();
- if(document.form1.e_id.value == guiIDs[i]){
- permission = confirm("update: " + document.form1.e_id.value + " ?");
- isElement = true;
- break;
- }
- }
- if(permission == true || isElement == false){
- document.form1.mySave.value = 1;
- document.form1.submit();
- }
-}
-
-function thisDelete(){
- clearRadio();
- var permission = confirm("delete: " + document.form1.e_id.value + " ?");
- if(permission == true){
- document.form1.myDelete.value = 1;
- document.form1.submit();
- }
-}
-function thisShow(){
- document.form1.myShow.value = 1;
- document.form1.submit();
-}
-function addAll(){
- var permission = confirm("add all elements ?");
- if(permission == true){
- clearRadio();
- document.form1.all.value = 1;
- document.form1.submit();
- }
-}
-function thisExport(){
-
- window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
-}
-function editDesc(){
- var newDesc = prompt("Enter new GUI description", document.form1.guiDesc.value);
- if (newDesc != null) {
- document.form1.guiDesc.value = newDesc;
- document.form1.mySave.value = 2;
- document.form1.submit();
- }
-}
-
-// -->
-</script>
-</head>
-<body>
-
-<?php
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>\n";
-
-$sql = "SELECT * from gui WHERE gui.gui_id IN (";
-$v = $ownguis;
-$t = array();
-
-for ($i = 1; $i <= count($ownguis); $i++) {
- if ($i > 1) {
- $sql .= ",";
- }
- $sql .= "$" . $i;
- array_push($t, "s");
-}
-$sql .= ")";
-//echo $sql;
-$res = db_prep_query($sql, $v, $t);
-$count=0;
-while(db_fetch_row($res)){
- $gui_id_own[$count]=db_result($res,$count,"gui_id");
- $gui_name_own[$count]=db_result($res,$count,"gui_name");
- $gui_description_own[$count]=db_result($res,$count,"gui_description");
- $count++;
-}
-
-
-$sql = "SELECT * from gui WHERE gui.gui_id IN (";
-$v = $permguis;
-$t = array();
-
-for ($i = 1; $i <= count($permguis); $i++){
- if ($i > 1) {
- $sql .= ",";
- }
- $sql .= "$" . $i;
- array_push($t, "s");
-}
-$sql .= ")";
-$res = db_prep_query($sql, $v, $t);
-$count=0;
-while($row = db_fetch_array($res)){
- $gui_id_perm[$count]= $row["gui_id"];
- $gui_name_perm[$count]=$row["gui_name"];
- $gui_description_perm[$count]=$row["gui_description"];
- $count++;
-}
-
-#Gui to edit
-if(!isset($guiList1)){
- echo "<div class= 'guiList1_text'>GUI:</div>\n";
- echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>\n";
- for ($i=0; $i<count($gui_id_own);$i++){
- echo "<option value='".$gui_id_own[$i]."' ";
- if($guiList1 && $guiList1 == $gui_id_own[$i]){
- echo "selected";
- }
- echo ">".$gui_name_own[$i]."</option>\n";
- }
- echo "</select>\n";
-
- for ($i=0; $i<count($gui_id_own);$i++){
- echo "<input type='hidden' name='guiDesc_" . $gui_name_own[$i] . "' value='" . $gui_description_own[$i] . "' >\n";
- echo "<input type='hidden' name='guiId_" . $gui_name_own[$i] . "' value='" . $gui_id_own[$i] . "' >\n";
- }
- echo "<input type='hidden' name='guiList2' value='' >\n";
-}
-else{
- echo "<div class= 'guiList1_text'>";
- echo "Edit Elements: ".$guiList1;
-
- // set guiDesc and guiId if guiList1 has just been selected
- if (!$guiDesc) {
- $Desc = "guiDesc_" . $guiList1;
- $guiDesc = $$Desc;
- }
- if (!$guiId) {
- $Id = "guiId_" . $guiList1;
- $guiId = $$Id;
- }
-
- echo " (" . $guiDesc;
- echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) \n";
- echo "</div>\n";
- echo "<div class='buttonbar'>\n";
- echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
- echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
- echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> \n";
- echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> \n";
- echo "</div>\n";
- echo "<input type='hidden' name='guiList1' value='".$guiList1."' >\n";
- echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
- echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
-}
-#Depot
-if(isset($guiList1)){
- echo "<select name='guiList2' class='guiList2' onchange='clearRadio();submit()'>\n";
- echo "<option>GUI...</option>\n";
- for ($i=0; $i<count($gui_id_perm);$i++){
- echo "<option value='".$gui_id_perm[$i]."' ";
- if($guiList2 && $guiList2 == $gui_id_perm[$i]){
- echo "selected";
- }
- echo ">".$gui_name_perm[$i]."</option>\n";
- }
- echo "</select>\n";
- if($guiList1 != $guiList2){echo "<input class='all' type='button' value='add all elements' onclick='addAll()'>\n";}
-}
-#Elements
-if(isset($guiList2)){
- if($guiList1 == $guiList2){
- echo "<div class='guiList2_header'>Edit Element: </div>\n";
- }
- else{
- echo "<div class='guiList2_header'>Templates</div>\n";
- }
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
- $v = array($guiList2);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
-
- echo "<div class='myElements'>\n<table>\n";
-
- while(db_fetch_row($res)){
- echo "<tr>\n";
- echo "<td class='myTable'><input type='radio' name='myElement' value='".db_result($res,$cnt,"e_id")."' onclick='submit()' ";
- if(db_result($res,$cnt,"e_id") == $myElement){echo "checked";}
- echo "></td>\n";
- echo "<td class='myTable'>";
- if(db_result($res,$cnt,"e_public") == 1){echo "<div class='on'>on</div>";}
- echo "</td>\n";
- echo "<td class='myTable'>";
- echo "<a href=\"mod_EditElementVars.php?fkey_gui_id=".$guiList2."&fkey_e_id=".db_result($res,$cnt,"e_id")."\">";
- echo db_result($res,$cnt,"e_id");
- echo "</a>\n</td>\n";
- echo "<td class='myTable'>".db_result($res,$cnt,"e_comment")."</td>";
- echo "</tr>\n";
- $cnt++;
- }
- echo "</table>\n</div>\n";
-}
-#Formular:
-echo "<table class='myForm'>\n";
-if(isset($myElement)){
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
- $v = array($guiList2, $myElement);
- $t = array("s", "s");
- $res = db_prep_query($sql, $v, $t);
- if(db_fetch_row($res)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".db_result($res,0,"e_id")."'></td></tr>\n";
- echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".db_result($res,0,"e_pos")."'></td></tr>\n";
- echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".db_result($res,0,"e_public")."'></td></tr>\n";
- echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes(db_result($res,0,"e_comment"))."</textarea></td></tr>\n";
- echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".db_result($res,0,"e_element")."'></td></tr>\n";
- echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".db_result($res,0,"e_src")."'></td></tr>\n";
- echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes(db_result($res,0,"e_attributes"))."</textarea></td></tr>\n";
- echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".db_result($res,0,"e_left")."'></td></tr>\n";
- echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".db_result($res,0,"e_top")."'></td></tr>\n";
- echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".db_result($res,0,"e_width")."'></td></tr>\n";
- echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".db_result($res,0,"e_height")."'></td></tr>\n";
- echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".db_result($res,0,"e_z_index")."'></td></tr>\n";
- echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".db_result($res,0,"e_more_styles")."'></td></tr>\n";
- echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes(db_result($res,0,"e_content"))."</textarea></td></tr>\n";
- echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".db_result($res,0,"e_closetag")."'></td></tr>\n";
- echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".db_result($res,0,"e_js_file")."'></td></tr>\n";
- echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".db_result($res,0,"e_mb_mod")."'></td></tr>\n";
- echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".db_result($res,0,"e_target")."'></td></tr>\n";
- echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".db_result($res,0,"e_requires")."'></td></tr>\n";
- }
- echo "</table>";
-}
-else if(isset($guiList1)){
- echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$e_id."'></td></tr>\n";
- echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$e_pos."'></td></tr>\n";
- echo "<tr><td>Public: </td><td><input type='text' class='textfield' name='e_public' value='".$e_public."'></td></tr>\n";
- echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($e_comment)."</textarea></td></tr>\n";
- echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$e_element."'></td></tr>\n";
- echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$e_src."'></td></tr>\n";
- echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($e_attributes)."</textarea></td></tr>\n";
- echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$e_left."'></td></tr>\n";
- echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$e_top."'></td></tr>\n";
- echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$e_width."'></td></tr>\n";
- echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$e_height."'></td></tr>\n";
- echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$e_z_index."'></td></tr>\n";
- echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$e_more_styles."'></td></tr>\n";
- echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($e_content)."</textarea></td></tr>\n";
- echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$e_closetag."'></td></tr>\n";
- echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$e_js_file."'></td></tr>\n";
- echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$e_mb_mod."'></td></tr>\n";
- echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$e_target."'></td></tr>\n";
- echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$e_requires."'></td></tr>\n";
-}
-echo "</table>\n";
-?>
-<input type='hidden' name='myDelete'>
-<input type='hidden' name='mySave'>
-<input type='hidden' name='myShow'>
-<input type='hidden' name='all'>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_edit_metadata.php (from rev 2138, branches/2.4.5/http/php/mod_edit_metadata.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_edit_metadata.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_edit_metadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,560 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_edit_metadata.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Metadata</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .guiList1{
+ position:absolute;
+ top:30px;
+ left:10px;
+ width:200px
+ }
+ .buttonbar{
+ position:absolute;
+ top:40px;
+ left:10px;
+ }
+ .guiList1_text{
+ position:absolute;
+ top:10px;
+ left:10px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .guiList2{
+ position:absolute;
+ top:40px;
+ left:400px;
+ width:200px
+ }
+ .all{
+ position:absolute;
+ top:38px;
+ left:610px;
+ }
+ .guiList2_header{
+ position:absolute;
+ top:10px;
+ left:400px;
+ font-size:16px;
+ color: #0066cc;
+ }
+ .myElements{
+ position:absolute;
+ top:70px;
+ left:400px;
+ }
+ .myTable{
+ border: 1px solid;
+ font-size: 11px;
+ }
+ .myForm{
+ position:absolute;
+ top:70px;
+ left:10px;
+ }
+ .textfield{
+ width:277px
+ }
+ .textfield_small{
+ width:150px
+ }
+ .on{
+ color: #0066cc;
+ }
+ -->
+</style>
+<?php
+# handle database updates etc.....
+if(isset($mySave) && ($mySave == '1' || $mySave == '2')) {
+ if ($mySave == '1'){
+ $sql_vars = "SELECT * FROM gui_element_vars WHERE fkey_e_id = $1 AND fkey_gui_id = $2";
+ $v = array($e_id, $guiList1);
+ $t = array("s", "s");
+ $res_vars = db_prep_query($sql_vars, $v, $t);
+ //$rows = db_fetch_array($res_vars);
+ $sql = array();
+ $v = array();
+ $t = array();
+ if ($SYS_DBTYPE == "pgsql") {
+ $sql[0] = "SET AUTOCOMMIT=1";
+ $v[0] = array();
+ $t[0] = array();
+ }
+ else {
+ $sql[0] = "SET AUTOCOMMIT=0";
+ $v[0] = array();
+ $t[0] = array();
+ }
+ $sql[1] = "BEGIN";
+ $v[1] = array();
+ $t[1] = array();
+
+ $sql[2] = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+ $v[2] = array($e_id, $guiList1);
+ $t[2] = array("s", "s");
+
+ if($e_left < 1){$e_left = "NULL";}
+ if($e_top < 1){$e_top = "NULL";}
+ if($e_width < 1){$e_width = "NULL";}
+ if($e_height < 1){$e_height = "NULL";}
+ if($e_z_index < 1){$e_z_index = "NULL";}
+ $sql[3] = "INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, ";
+ $sql[3] .= "e_comment, e_element, e_src, e_attributes, e_left, e_top, ";
+ $sql[3] .= "e_width, e_height, e_z_index, e_more_styles, e_content, ";
+ $sql[3] .= "e_closetag, e_js_file, e_mb_mod, e_target, e_requires) ";
+ $sql[3] .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, ";
+ $sql[3] .= "$13, $14, $15, $16, $17, $18, $19, $20)";
+ $v[3] = array($guiList1, $e_id, $e_pos, $e_public, db_escape_string($e_comment), $e_element, $e_src, db_escape_string($e_attributes), $e_left, $e_top, $e_width, $e_height, $e_z_index, $e_more_styles, db_escape_string($e_content), $e_closetag, $e_js_file, $e_mb_mod, $e_target, $e_requires);
+ $t[3] = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
+ }
+ # mySave == 2 <=> just save GUI description
+ elseif ($mySave == '2') {
+ $sql = array();
+ $v = array();
+ $t = array();
+ if ($SYS_DBTYPE == "pgsql") {
+ $sql[0] = "SET AUTOCOMMIT=1";
+ $v[0] = array();
+ $t[0] = array();
+ }
+ else {
+ $sql[0] = "SET AUTOCOMMIT=0";
+ $v[0] = array();
+ $t[0] = array();
+ }
+ $sql[1] = "BEGIN";
+ $v[1] = array();
+ $t[1] = array();
+
+ $sql[2] = "UPDATE gui SET gui_description = $1 WHERE gui_id = $2";
+ $v[2] = array($guiDesc, $guiId);
+ $t[2] = array("s", "s");
+ }
+ for ($i = 0; $i < count($sql); $i++) {
+ $res = db_prep_query($sql[$i], $v[$i], $t[$i]);
+ if(!$res){break;}
+ }
+ if($res){
+ $res = db_query( "COMMIT");
+ $res = db_query( "SET AUTOCOMMIT=1");
+ }
+ else{
+ $res = db_query( "ROLLBACK");
+ $res = db_query( "SET AUTOCOMMIT=1");
+ }
+ if(isset($sql_vars)){//sicherstellen das keine Element_Vars gel�scht wurden
+ while($row = db_fetch_array($res_vars)){
+ $securesql = "INSERT INTO gui_element_vars (fkey_gui_id, ";
+ $securesql .= "fkey_e_id, var_name, var_value, context,type) ";
+ $securesql .= "VALUES ($1, $2, $3, $4, $5, $6)";
+ $v = array($guiList1, $e_id, $row["var_name"], $row["var_value"], $row["context"], $row["type"]);
+ $t = array("s", "s", "s", "s", "s", "s");
+ //echo $securesql."<BR>";
+ $secureinsert = db_prep_query($securesql, $v, $t);
+ }
+ }
+ if(!$res){break;}
+
+}
+if(isset($myDelete) && $myDelete == '1'){
+ $sql = "DELETE FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+ $v = array($e_id, $guiList1);
+ $t = array("s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $e_id = ""; $e_pos = ""; $e_public = ""; $e_comment = ""; $e_element = "";
+ $e_src = ""; $e_attributes = ""; $e_left = ""; $e_top = ""; $e_width = ""; $e_height = ""; $e_z_index = "";
+ $e_more_styles = ""; $e_content = ""; $e_closetag = ""; $e_js_file = ""; $e_mb_mod = ""; $e_target = ""; $e_requires = "";
+}
+if(isset($myShow) && $myShow == '1'){
+ $_SESSION["mb_user_myGui"] = $guiList1;
+ echo "<script language='javascript'>";
+ echo "window.open('../frames/login.php?".strip_tags (SID)."&mb_user_myGui=".$guiList1."','','');";
+ echo "</script>";
+}
+if(isset($all) && $all == '1'){
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1";
+ $v = array($guiList2);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while(db_fetch_row($res)){
+ $sql_del = "DELETE FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
+ $v = array($guiList1, db_result($res,$cnt,"e_id"));
+ $t = array("s", "s");
+ $res_del = db_prep_query($sql_del, $v, $t);
+ if(db_result($res,$cnt,"e_left") == ""){$myleft = 'NULL';} else{$myleft = db_result($res,$cnt,"e_left");}
+ if(db_result($res,$cnt,"e_top") == ""){$mytop = 'NULL';} else{$mytop = db_result($res,$cnt,"e_top");}
+ if(db_result($res,$cnt,"e_width") == ""){$mywidth = 'NULL';} else{$mywidth = db_result($res,$cnt,"e_width");}
+ if(db_result($res,$cnt,"e_height") == ""){$myheight = 'NULL';} else{$myheight = db_result($res,$cnt,"e_height");}
+ if(db_result($res,$cnt,"e_z_index") == ""){$my_z_index = 'NULL';} else{$my_z_index = db_result($res,$cnt,"e_z_index");}
+
+ $sql_ins = "INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, ";
+ $sql_ins .= "e_comment, e_element, e_src, e_attributes, e_left, e_top, ";
+ $sql_ins .= "e_width, e_height, e_z_index, e_more_styles, e_content, ";
+ $sql_ins .= "e_closetag, e_js_file, e_mb_mod, e_target, e_requires) ";
+ $sql_ins .= "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, ";
+ $sql_ins .= "$10, $11, $12, $13, $14, $15, $16, $17, $18, $19);";
+ $v = array($guiList1, db_result($res,$cnt,"e_id"), db_result($res,$cnt,"e_pos"), db_result($res,$cnt,"e_public"), db_escape_string(db_result($res,$cnt,"e_comment")), db_result($res,$cnt,"e_element"), db_result($res,$cnt,"e_src"), db_escape_string(db_result($res,$cnt,"e_attributes")), $myleft, $mytop, $mywidth, $myheight, $my_z_index, db_result($res,$cnt,"e_more_styles"), db_escape_string(db_result($res,$cnt,"e_content")), db_result($res,$cnt,"e_closetag"), db_result($res,$cnt,"e_js_file"), db_result($res,$cnt,"e_mb_mod"), db_result($res,$cnt,"e_target"), db_result($res,$cnt,"e_requires"));
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i", "i", "i", "i", "s", "s", "s", "s", "s", "s", "s");
+
+ $res_ins = db_prep_query($sql_ins, $v, $t);
+ if(!$res_ins){echo db_error($con); }
+ $cnt++;
+ }
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1";
+ $v = array($guiList2);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while(db_fetch_row($res)){
+ $sql_ins2 = "INSERT INTO gui_element_vars (fkey_gui_id, fkey_e_id, ";
+ $sql_ins2 .= "var_name, var_value, context, type) VALUES (";
+ $sql_ins2 .= "$1, $2, $3, $4, $5, $6);";
+ $v = array($guiList1, db_result($res,$cnt,"fkey_e_id"), db_result($res,$cnt,"var_name"), db_escape_string(db_result($res,$cnt,"var_value")), db_escape_string(db_result($res,$cnt,"context")), db_result($res,$cnt,"type"));
+ $t = array("s", "s", "s", "s", "s", "s");
+ $res_ins2 = db_prep_query($sql_ins2, $v, $t);
+ if(!$res_ins2){echo db_error($connect); }
+
+ $cnt++;
+ }
+
+
+}
+# end
+echo "<script language='javascript'>";
+echo "var guiIDs = new Array();";
+if(isset($guiList1)){
+ $sql = "SELECT e_id FROM gui_element WHERE fkey_gui_id = $1";
+ $v = array($guiList1);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while(db_fetch_row($res)){
+ echo "guiIDs[".$cnt."] = '".db_result($res,$cnt,"e_id")."'; ";
+ $cnt++;
+ }
+}
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function setGui(val){
+ document.form1.guiList2.value = val;
+ document.form1.submit();
+}
+function clearRadio(){
+ for(var i=0; i< document.form1.elements.length; i++){
+ if(document.form1.elements[i].type == "radio"){
+ document.form1.elements[i].checked = false;
+ }
+ }
+}
+function thisSave(){
+ if(document.form1.e_id.value == ""){
+ alert("ID ? ");
+ document.form1.e_id.focus();
+ return;
+ }
+ var permission = false;
+ var isElement = false;
+ for(var i=0; i<guiIDs.length; i++){
+ clearRadio();
+ if(document.form1.e_id.value == guiIDs[i]){
+ permission = confirm("update: " + document.form1.e_id.value + " ?");
+ isElement = true;
+ break;
+ }
+ }
+ if(permission == true || isElement == false){
+ document.form1.mySave.value = 1;
+ document.form1.submit();
+ }
+}
+
+function thisDelete(){
+ clearRadio();
+ var permission = confirm("delete: " + document.form1.e_id.value + " ?");
+ if(permission == true){
+ document.form1.myDelete.value = 1;
+ document.form1.submit();
+ }
+}
+function thisShow(){
+ document.form1.myShow.value = 1;
+ document.form1.submit();
+}
+function addAll(){
+ var permission = confirm("add all elements ?");
+ if(permission == true){
+ clearRadio();
+ document.form1.all.value = 1;
+ document.form1.submit();
+ }
+}
+function thisExport(){
+
+ window.open("mod_exportElement.php?element=" + document.forms[0].e_id.value+ "&gui=" +document.forms[0].guiList1.value ,"","");
+}
+function editDesc(){
+ var newDesc = prompt("Enter new GUI description", document.form1.guiDesc.value);
+ if (newDesc != null) {
+ document.form1.guiDesc.value = newDesc;
+ document.form1.mySave.value = 2;
+ document.form1.submit();
+ }
+}
+
+// -->
+</script>
+</head>
+<body>
+
+<?php
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
+echo "<form name='form1' action='" . $self."' method='post'>\n";
+
+$sql = "SELECT * from gui WHERE gui.gui_id IN (";
+$v = $ownguis;
+$t = array();
+
+for ($i = 1; $i <= count($ownguis); $i++) {
+ if ($i > 1) {
+ $sql .= ",";
+ }
+ $sql .= "$" . $i;
+ array_push($t, "s");
+}
+$sql .= ")";
+//echo $sql;
+$res = db_prep_query($sql, $v, $t);
+$count=0;
+while(db_fetch_row($res)){
+ $gui_id_own[$count]=db_result($res,$count,"gui_id");
+ $gui_name_own[$count]=db_result($res,$count,"gui_name");
+ $gui_description_own[$count]=db_result($res,$count,"gui_description");
+ $count++;
+}
+
+
+$sql = "SELECT * from gui WHERE gui.gui_id IN (";
+$v = $permguis;
+$t = array();
+
+for ($i = 1; $i <= count($permguis); $i++){
+ if ($i > 1) {
+ $sql .= ",";
+ }
+ $sql .= "$" . $i;
+ array_push($t, "s");
+}
+$sql .= ")";
+$res = db_prep_query($sql, $v, $t);
+$count=0;
+while($row = db_fetch_array($res)){
+ $gui_id_perm[$count]= $row["gui_id"];
+ $gui_name_perm[$count]=$row["gui_name"];
+ $gui_description_perm[$count]=$row["gui_description"];
+ $count++;
+}
+
+#Gui to edit
+if(!isset($guiList1)){
+ echo "<div class= 'guiList1_text'>GUI:</div>\n";
+ echo "<select class='guiList1' size='20' name='guiList1' onchange='setGui(this.value)'>\n";
+ for ($i=0; $i<count($gui_id_own);$i++){
+ echo "<option value='".$gui_id_own[$i]."' ";
+ if($guiList1 && $guiList1 == $gui_id_own[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_name_own[$i]."</option>\n";
+ }
+ echo "</select>\n";
+
+ for ($i=0; $i<count($gui_id_own);$i++){
+ echo "<input type='hidden' name='guiDesc_" . $gui_name_own[$i] . "' value='" . $gui_description_own[$i] . "' >\n";
+ echo "<input type='hidden' name='guiId_" . $gui_name_own[$i] . "' value='" . $gui_id_own[$i] . "' >\n";
+ }
+ echo "<input type='hidden' name='guiList2' value='' >\n";
+}
+else{
+ echo "<div class= 'guiList1_text'>";
+ echo "Edit Elements: ".$guiList1;
+
+ // set guiDesc and guiId if guiList1 has just been selected
+ if (!$guiDesc) {
+ $Desc = "guiDesc_" . $guiList1;
+ $guiDesc = $$Desc;
+ }
+ if (!$guiId) {
+ $Id = "guiId_" . $guiList1;
+ $guiId = $$Id;
+ }
+
+ echo " (" . $guiDesc;
+ echo " <input type='button' class='' name='' value='edit' onclick='editDesc()'> ) \n";
+ echo "</div>\n";
+ echo "<div class='buttonbar'>\n";
+ echo "<input type='button' class='' name='' value='save' onclick='thisSave()'> \n";
+ echo "<input type='button' class='' name='' value='delete' onclick='thisDelete()'> \n";
+ echo "<input type='button' class='' name='' value='show' onclick='thisShow()'> \n";
+ echo "<input type='button' class='' name='' value='sql' onclick='thisExport()'> \n";
+ echo "</div>\n";
+ echo "<input type='hidden' name='guiList1' value='".$guiList1."' >\n";
+ echo "<input type='hidden' name='guiId' value='".$guiId."' >\n";
+ echo "<input type='hidden' name='guiDesc' value='".$guiDesc."' >\n";
+}
+#Depot
+if(isset($guiList1)){
+ echo "<select name='guiList2' class='guiList2' onchange='clearRadio();submit()'>\n";
+ echo "<option>GUI...</option>\n";
+ for ($i=0; $i<count($gui_id_perm);$i++){
+ echo "<option value='".$gui_id_perm[$i]."' ";
+ if($guiList2 && $guiList2 == $gui_id_perm[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_name_perm[$i]."</option>\n";
+ }
+ echo "</select>\n";
+ if($guiList1 != $guiList2){echo "<input class='all' type='button' value='add all elements' onclick='addAll()'>\n";}
+}
+#Elements
+if(isset($guiList2)){
+ if($guiList1 == $guiList2){
+ echo "<div class='guiList2_header'>Edit Element: </div>\n";
+ }
+ else{
+ echo "<div class='guiList2_header'>Templates</div>\n";
+ }
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
+ $v = array($guiList2);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+
+ echo "<div class='myElements'>\n<table>\n";
+
+ while(db_fetch_row($res)){
+ echo "<tr>\n";
+ echo "<td class='myTable'><input type='radio' name='myElement' value='".db_result($res,$cnt,"e_id")."' onclick='submit()' ";
+ if(db_result($res,$cnt,"e_id") == $myElement){echo "checked";}
+ echo "></td>\n";
+ echo "<td class='myTable'>";
+ if(db_result($res,$cnt,"e_public") == 1){echo "<div class='on'>on</div>";}
+ echo "</td>\n";
+ echo "<td class='myTable'>";
+ echo "<a href=\"mod_EditElementVars.php?fkey_gui_id=".$guiList2."&fkey_e_id=".db_result($res,$cnt,"e_id")."\">";
+ echo db_result($res,$cnt,"e_id");
+ echo "</a>\n</td>\n";
+ echo "<td class='myTable'>".db_result($res,$cnt,"e_comment")."</td>";
+ echo "</tr>\n";
+ $cnt++;
+ }
+ echo "</table>\n</div>\n";
+}
+#Formular:
+echo "<table class='myForm'>\n";
+if(isset($myElement)){
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id = $2";
+ $v = array($guiList2, $myElement);
+ $t = array("s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ if(db_fetch_row($res)){
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".db_result($res,0,"e_id")."'></td></tr>\n";
+ echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".db_result($res,0,"e_pos")."'></td></tr>\n";
+ echo "<tr><td>ON/OFF: </td><td><input type='text' class='textfield' name='e_public' value='".db_result($res,0,"e_public")."'></td></tr>\n";
+ echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes(db_result($res,0,"e_comment"))."</textarea></td></tr>\n";
+ echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".db_result($res,0,"e_element")."'></td></tr>\n";
+ echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".db_result($res,0,"e_src")."'></td></tr>\n";
+ echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes(db_result($res,0,"e_attributes"))."</textarea></td></tr>\n";
+ echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".db_result($res,0,"e_left")."'></td></tr>\n";
+ echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".db_result($res,0,"e_top")."'></td></tr>\n";
+ echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".db_result($res,0,"e_width")."'></td></tr>\n";
+ echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".db_result($res,0,"e_height")."'></td></tr>\n";
+ echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".db_result($res,0,"e_z_index")."'></td></tr>\n";
+ echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".db_result($res,0,"e_more_styles")."'></td></tr>\n";
+ echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes(db_result($res,0,"e_content"))."</textarea></td></tr>\n";
+ echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".db_result($res,0,"e_closetag")."'></td></tr>\n";
+ echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".db_result($res,0,"e_js_file")."'></td></tr>\n";
+ echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".db_result($res,0,"e_mb_mod")."'></td></tr>\n";
+ echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".db_result($res,0,"e_target")."'></td></tr>\n";
+ echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".db_result($res,0,"e_requires")."'></td></tr>\n";
+ }
+ echo "</table>";
+}
+else if(isset($guiList1)){
+ echo "<tr><td>ID: </td><td><input type='text' class='textfield' name='e_id' value='".$e_id."'></td></tr>\n";
+ echo "<tr><td>Position: </td><td><input type='text' class='textfield' name='e_pos' value='".$e_pos."'></td></tr>\n";
+ echo "<tr><td>Public: </td><td><input type='text' class='textfield' name='e_public' value='".$e_public."'></td></tr>\n";
+ echo "<tr><td>Comment: </td><td><textarea cols='32' rows='5' name='e_comment' >".stripslashes($e_comment)."</textarea></td></tr>\n";
+ echo "<tr><td>HTML-TAG: </td><td><input type='text' class='textfield' name='e_element' value='".$e_element."'></td></tr>\n";
+ echo "<tr><td>SRC: </td><td><input type='text' class='textfield' name='e_src' value='".$e_src."'></td></tr>\n";
+ echo "<tr><td>Attributes: </td><td><textarea cols='32' rows='5' name='e_attributes' >".stripslashes($e_attributes)."</textarea></td></tr>\n";
+ echo "<tr><td>Left: </td><td><input type='text' class='textfield' name='e_left' value='".$e_left."'></td></tr>\n";
+ echo "<tr><td>Top: </td><td><input type='text' class='textfield' name='e_top' value='".$e_top."'></td></tr>\n";
+ echo "<tr><td>Width: </td><td><input type='text' class='textfield' name='e_width' value='".$e_width."'></td></tr>\n";
+ echo "<tr><td>Height: </td><td><input type='text' class='textfield' name='e_height' value='".$e_height."'></td></tr>\n";
+ echo "<tr><td>Z-INDEX: </td><td><input type='text' class='textfield' name='e_z_index' value='".$e_z_index."'></td></tr>\n";
+ echo "<tr><td>Styles: </td><td><input type='text' class='textfield' name='e_more_styles' value='".$e_more_styles."'></td></tr>\n";
+ echo "<tr><td>Content: </td><td><textarea cols='32' rows='4' name='e_content' >".stripslashes($e_content)."</textarea></td></tr>\n";
+ echo "<tr><td>Close-TAG: </td><td><input type='text' class='textfield' name='e_closetag' value='".$e_closetag."'></td></tr>\n";
+ echo "<tr><td>JavaScript: </td><td><input type='text' class='textfield' name='e_js_file' value='".$e_js_file."'></td></tr>\n";
+ echo "<tr><td>Modul: </td><td><input type='text' class='textfield' name='e_mb_mod' value='".$e_mb_mod."'></td></tr>\n";
+ echo "<tr><td>Target: </td><td><input type='text' class='textfield' name='e_target' value='".$e_target."'></td></tr>\n";
+ echo "<tr><td>Requires: </td><td><input type='text' class='textfield' name='e_requires' value='".$e_requires."'></td></tr>\n";
+}
+echo "</table>\n";
+?>
+<input type='hidden' name='myDelete'>
+<input type='hidden' name='mySave'>
+<input type='hidden' name='myShow'>
+<input type='hidden' name='all'>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_evalArea.php
===================================================================
--- branches/2.4.5/http/php/mod_evalArea.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_evalArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,159 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_evalArea.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import_request_variables("PG");
-include '../include/dyn_css.php';
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Resultset</title>
-<?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-?>
-<style type="text/css">
- <!--
-
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- }
- .h{
- font-style : oblique;
- }
- -->
-</style>
-</head>
-<body>
-<?php
-import_request_variables("PG");
-$x = $_REQUEST["x"];
-$y = $_REQUEST["y"];
-$epsg = $_REQUEST["srs"];
-$length = $_REQUEST["length"];
-$posX = explode (",", $x);
-$posY = explode (",", $y);
-
-
-// check if parameters are valid geometries to
-// avoid SQL injections
-$regExp = "/\d(,\d)*/";
-if (preg_match($regExp, $x) && preg_match($regExp, $y)) {
-
- if(SYS_DBTYPE=='pgsql'){
- if (count($posX) > 3) {
- $sql = "SELECT area2d(GeometryFromText('MULTIPOLYGON(((";
- for ($i = 0; $i < count($posX); $i++) {
- if ($i > 0) {
- $sql .= ",";
- }
- $sql .= $posX[$i] . " " . $posY[$i];
- }
- $sql .= ")))',".rawurldecode($epsg).")) as myArea";
-
- // the input parameters are valid
- $res = db_query($sql);
- if($row = db_fetch_array($res)){
- echo "Fläche: ".round($row[0]*100)/100 . " m<sup>2</sup>";
- }
- }
- else{
- echo "Fläche: 0 m<sup>2</sup>";
- }
- }else{
- #echo "Fl�chenberechnung f�r MySQL liegt derzeit nicht vor<br></sup>";
- #$con = db_connect($GEOS_DBSERVER,$GEOS_PORT,$GEOS_OWNER,$GEOS_PW);
- #db_select_db($GEOS_DBSERVER,$con);
- $con_string = "host=$GEOS_DBSERVER port=$GEOS_PORT dbname=$GEOS_DB user=$GEOS_OWNER password=$GEOS_PW";
-
- $con = pg_connect($con_string) or die ("Error while connecting database");
-
-
- if(count($posX) > 3){
- $sql = "SELECT area2d(GeometryFromText('MULTIPOLYGON(((";
- $i==0;
- for($i=0; $i<count($posX); $i++){
- if($i>0){$sql .= ",";}
- $sql .= $posX[$i] . " " . $posY[$i];
- }
- $sql .= ")))',".rawurldecode($epsg).")) as myArea";
- $res = pg_query($con,$sql);
-
- $cnt = 0;
- while(pg_fetch_row($res)){
- $area = pg_fetch_result($res,$cnt,0);
- echo "Fläche: ".round($area*100)/100 . " m<sup>2</sup>";
- $cnt++;
- }
- }
- else{
- echo "Fläche: 0 m<sup>2</sup>";
- }
- }
-
- echo "<br>";
- echo "Umfang: ". $length . " m";
-}
-else {
- $e = new mb_exception("mod_evalArea.php: invalid input geometry; coordinates not float values.");
- echo "Fläche: 0 m<sup>2</sup>";
-}
-
-
-#Centroid(geometry)
-/*
-$sql = "SELECT Centroid(GeometryFromText('MULTIPOLYGON(((";
-for($i=0; $i<count($posX); $i++){
- if($i>0){$sql .= ",";}
- $sql .= $posX[$i] . " " . $posY[$i];
-}
-$sql .= ")))',".rawurldecode($epsg).")) as myCentroid";
-$res = db_query($con,$sql);
-if(db_fetch_row($res)){
- echo "Zentrum: ".db_result($res,0,"myCentroid");
-}
-*/
-
-#box3d(geometry)
-/*
-$sql = "SELECT box3d(GeometryFromText('MULTIPOLYGON(((";
-for($i=0; $i<count($posX); $i++){
- if($i>0){$sql .= ",";}
- $sql .= $posX[$i] . " " . $posY[$i];
-}
-$sql .= ")))',".rawurldecode($epsg).")) as myBox";
-$res = db_query($sql);
-if(db_fetch_row($res)){
- echo "Aussen: ".db_result($res,0,"myBox");
-}
-*/
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_evalArea.php (from rev 2219, branches/2.4.5/http/php/mod_evalArea.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_evalArea.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_evalArea.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,154 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_evalArea.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+include '../include/dyn_css.php';
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Resultset</title>
+<style type="text/css">
+ <!--
+
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ }
+ .h{
+ font-style : oblique;
+ }
+ -->
+</style>
+</head>
+<body>
+<?php
+import_request_variables("PG");
+$x = $_REQUEST["x"];
+$y = $_REQUEST["y"];
+$epsg = $_REQUEST["srs"];
+$length = $_REQUEST["length"];
+$posX = explode (",", $x);
+$posY = explode (",", $y);
+
+
+// check if parameters are valid geometries to
+// avoid SQL injections
+$regExp = "/\d(,\d)*/";
+if (preg_match($regExp, $x) && preg_match($regExp, $y)) {
+
+ if(SYS_DBTYPE=='pgsql'){
+ if (count($posX) > 3) {
+ $sql = "SELECT area2d(GeometryFromText('MULTIPOLYGON(((";
+ for ($i = 0; $i < count($posX); $i++) {
+ if ($i > 0) {
+ $sql .= ",";
+ }
+ $sql .= $posX[$i] . " " . $posY[$i];
+ }
+ $sql .= ")))',".rawurldecode($epsg).")) as myArea";
+
+ // the input parameters are valid
+ $res = db_query($sql);
+ if($row = db_fetch_array($res)){
+ echo "Fläche: ".round($row[0]*100)/100 . " m<sup>2</sup>";
+ }
+ }
+ else{
+ echo "Fläche: 0 m<sup>2</sup>";
+ }
+ }else{
+ #echo "Fl�chenberechnung f�r MySQL liegt derzeit nicht vor<br></sup>";
+ #$con = db_connect($GEOS_DBSERVER,$GEOS_PORT,$GEOS_OWNER,$GEOS_PW);
+ #db_select_db($GEOS_DBSERVER,$con);
+ $con_string = "host=$GEOS_DBSERVER port=$GEOS_PORT dbname=$GEOS_DB user=$GEOS_OWNER password=$GEOS_PW";
+
+ $con = pg_connect($con_string) or die ("Error while connecting database");
+
+
+ if(count($posX) > 3){
+ $sql = "SELECT area2d(GeometryFromText('MULTIPOLYGON(((";
+ $i==0;
+ for($i=0; $i<count($posX); $i++){
+ if($i>0){$sql .= ",";}
+ $sql .= $posX[$i] . " " . $posY[$i];
+ }
+ $sql .= ")))',".rawurldecode($epsg).")) as myArea";
+ $res = pg_query($con,$sql);
+
+ $cnt = 0;
+ while(pg_fetch_row($res)){
+ $area = pg_fetch_result($res,$cnt,0);
+ echo "Fläche: ".round($area*100)/100 . " m<sup>2</sup>";
+ $cnt++;
+ }
+ }
+ else{
+ echo "Fläche: 0 m<sup>2</sup>";
+ }
+ }
+
+ echo "<br>";
+ echo "Umfang: ". $length . " m";
+}
+else {
+ $e = new mb_exception("mod_evalArea.php: invalid input geometry; coordinates not float values.");
+ echo "Fläche: 0 m<sup>2</sup>";
+}
+
+
+#Centroid(geometry)
+/*
+$sql = "SELECT Centroid(GeometryFromText('MULTIPOLYGON(((";
+for($i=0; $i<count($posX); $i++){
+ if($i>0){$sql .= ",";}
+ $sql .= $posX[$i] . " " . $posY[$i];
+}
+$sql .= ")))',".rawurldecode($epsg).")) as myCentroid";
+$res = db_query($con,$sql);
+if(db_fetch_row($res)){
+ echo "Zentrum: ".db_result($res,0,"myCentroid");
+}
+*/
+
+#box3d(geometry)
+/*
+$sql = "SELECT box3d(GeometryFromText('MULTIPOLYGON(((";
+for($i=0; $i<count($posX); $i++){
+ if($i>0){$sql .= ",";}
+ $sql .= $posX[$i] . " " . $posY[$i];
+}
+$sql .= ")))',".rawurldecode($epsg).")) as myBox";
+$res = db_query($sql);
+if(db_fetch_row($res)){
+ echo "Aussen: ".db_result($res,0,"myBox");
+}
+*/
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_exportElement.php
===================================================================
--- branches/2.4.5/http/php/mod_exportElement.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_exportElement.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,128 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_exportElement.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>exportElement</title>
-<?php
- include '../include/dyn_css.php';
-?>
-</head>
-<body>
-<?php
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$insert = "";
-$sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id= $2";
-$v = array($_REQUEST["gui"],$_REQUEST["element"]);
-$t = array('s','s');
-$res = db_prep_query($sql,$v,$t);
-if($row = db_fetch_array($res)) {
- $insert .= "INSERT INTO gui_element(";
- $insert .= "fkey_gui_id, ";
- $insert .= "e_id, ";
- $insert .= "e_pos, ";
- $insert .= "e_public, ";
- $insert .= "e_comment, ";
- $insert .= "e_element, ";
- $insert .= "e_src, ";
- $insert .= "e_attributes, ";
- $insert .= "e_left, ";
- $insert .= "e_top, ";
- $insert .= "e_width, ";
- $insert .= "e_height, ";
- $insert .= "e_z_index, ";
- $insert .= "e_more_styles, ";
- $insert .= "e_content, ";
- $insert .= "e_closetag, ";
- $insert .= "e_js_file, ";
- $insert .= "e_mb_mod, ";
- $insert .= "e_target, ";
- $insert .= "e_requires, ";
- $insert .= "e_url";
- $insert .= ") VALUES(";
- $insert .= "'".$row["fkey_gui_id"]."',";
- $insert .= "'".$row["e_id"]."',";
- $insert .= "".$row["e_pos"]. ",";
- $insert .= "".$row["e_public"]. ",";
- $insert .= "'".db_escape_string($row["e_comment"])."',";
- $insert .= "'".$row["e_element"]."',";
- $insert .= "'".$row["e_src"]."',";
- $insert .= "'".db_escape_string($row["e_attributes"])."',";
- $insert .= "".$row["e_left"]. ",";
- $insert .= "".$row["e_top"]. ",";
- $insert .= "".$row["e_width"]. ",";
- $insert .= "".$row["e_height"]. ",";
- $insert .= "".$row["e_z_index"]. ",";
- $insert .= "'".$row["e_more_styles"]."',";
- $insert .= "'".db_escape_string($row["e_content"])."',";
- $insert .= "'".$row["e_closetag"]."',";
- $insert .= "'".$row["e_js_file"]."',";
- $insert .= "'".$row["e_mb_mod"]."',";
- $insert .= "'".$row["e_target"]."',";
- $insert .= "'".$row["e_requires"]."',";
- $insert .= "'".$row["e_url"]."'";
- $insert .= ");\n";
- $insert = str_replace(",,", ",NULL ,", $insert);
-}
-
- # export element vars
- $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
- $v = array($_REQUEST["gui"],$_REQUEST["element"]);
- $t = array('s','s');
- $res = db_prep_query($sql,$v,$t);
- $cnt_res = 0;
- while ($row = db_fetch_array($res)){
- $insert .= "INSERT INTO gui_element_vars(";
- $insert .= "fkey_gui_id, ";
- $insert .= "fkey_e_id, ";
- $insert .= "var_name, ";
- $insert .= "var_value, ";
- $insert .= "context, ";
- $insert .= "var_type";
- $insert .= ") VALUES(";
- $insert .= "'".$row["fkey_gui_id"]."', ";
- $insert .= "'".$row["fkey_e_id"]."', ";
- $insert .= "'".$row["var_name"]. "', ";
- $insert .= "'".db_escape_string($row["var_value"]). "', ";
- $insert .= "'".db_escape_string($row["context"])."' ,";
- $insert .= "'".db_escape_string($row["var_type"])."'";
- $insert .= ");\n";
- $insert = str_replace(",,", ",NULL ,", $insert);
- $cnt_res++;
- }
- #------------------
-
- echo "<textarea rows=30 cols=100>";
- echo str_replace(", ,", ",NULL ,", $insert);
- echo "</textarea>";
-
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_exportElement.php (from rev 2138, branches/2.4.5/http/php/mod_exportElement.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_exportElement.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_exportElement.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,129 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_exportElement.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>exportElement</title>
+<?php
+ include '../include/dyn_css.php';
+?>
+</head>
+<body>
+<?php
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$insert = "";
+$sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_id= $2";
+$v = array($_REQUEST["gui"],$_REQUEST["element"]);
+$t = array('s','s');
+$res = db_prep_query($sql,$v,$t);
+if($row = db_fetch_array($res)) {
+ $insert .= "INSERT INTO gui_element(";
+ $insert .= "fkey_gui_id, ";
+ $insert .= "e_id, ";
+ $insert .= "e_pos, ";
+ $insert .= "e_public, ";
+ $insert .= "e_comment, ";
+ $insert .= "e_element, ";
+ $insert .= "e_src, ";
+ $insert .= "e_attributes, ";
+ $insert .= "e_left, ";
+ $insert .= "e_top, ";
+ $insert .= "e_width, ";
+ $insert .= "e_height, ";
+ $insert .= "e_z_index, ";
+ $insert .= "e_more_styles, ";
+ $insert .= "e_content, ";
+ $insert .= "e_closetag, ";
+ $insert .= "e_js_file, ";
+ $insert .= "e_mb_mod, ";
+ $insert .= "e_target, ";
+ $insert .= "e_requires, ";
+ $insert .= "e_url";
+ $insert .= ") VALUES(";
+ $insert .= "'".$row["fkey_gui_id"]."',";
+ $insert .= "'".$row["e_id"]."',";
+ $insert .= "".$row["e_pos"]. ",";
+ $insert .= "".$row["e_public"]. ",";
+ $insert .= "'".db_escape_string($row["e_comment"])."',";
+ $insert .= "'".$row["e_element"]."',";
+ $insert .= "'".$row["e_src"]."',";
+ $insert .= "'".db_escape_string($row["e_attributes"])."',";
+ $insert .= "".$row["e_left"]. ",";
+ $insert .= "".$row["e_top"]. ",";
+ $insert .= "".$row["e_width"]. ",";
+ $insert .= "".$row["e_height"]. ",";
+ $insert .= "".$row["e_z_index"]. ",";
+ $insert .= "'".$row["e_more_styles"]."',";
+ $insert .= "'".db_escape_string($row["e_content"])."',";
+ $insert .= "'".$row["e_closetag"]."',";
+ $insert .= "'".$row["e_js_file"]."',";
+ $insert .= "'".$row["e_mb_mod"]."',";
+ $insert .= "'".$row["e_target"]."',";
+ $insert .= "'".$row["e_requires"]."',";
+ $insert .= "'".$row["e_url"]."'";
+ $insert .= ");\n";
+ $insert = str_replace(",,", ",NULL ,", $insert);
+}
+
+ # export element vars
+ $sql = "SELECT * FROM gui_element_vars WHERE fkey_gui_id = $1 AND fkey_e_id = $2";
+ $v = array($_REQUEST["gui"],$_REQUEST["element"]);
+ $t = array('s','s');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt_res = 0;
+ while ($row = db_fetch_array($res)){
+ $insert .= "INSERT INTO gui_element_vars(";
+ $insert .= "fkey_gui_id, ";
+ $insert .= "fkey_e_id, ";
+ $insert .= "var_name, ";
+ $insert .= "var_value, ";
+ $insert .= "context, ";
+ $insert .= "var_type";
+ $insert .= ") VALUES(";
+ $insert .= "'".$row["fkey_gui_id"]."', ";
+ $insert .= "'".$row["fkey_e_id"]."', ";
+ $insert .= "'".$row["var_name"]. "', ";
+ $insert .= "'".db_escape_string($row["var_value"]). "', ";
+ $insert .= "'".db_escape_string($row["context"])."' ,";
+ $insert .= "'".db_escape_string($row["var_type"])."'";
+ $insert .= ");\n";
+ $insert = str_replace(",,", ",NULL ,", $insert);
+ $cnt_res++;
+ }
+ #------------------
+
+ echo "<textarea rows=30 cols=100>";
+ echo str_replace(", ,", ",NULL ,", $insert);
+ echo "</textarea>";
+
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_exportGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_exportGUI.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_exportGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,192 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_exportGUI.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Export GUI</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-<!--
-function validate(){
- var ind = document.form1.guiList.selectedIndex;
- if(ind > -1){
- //alert (ind);
- var permission = confirm("export: " + document.form1.guiList.options[ind].text + " ?");
- if(permission == true){
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-// -->
-</script>
-</head>
-<body>
-
-<?php
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
-
- ###export
-
-if($guiList){
- $insert = "";
- //gui
- $sql_gui = "SELECT * FROM gui WHERE gui_name = $1 ";
- $v = array($guiList);
- $t = array('s');
- $res_gui = db_prep_query($sql_gui,$v,$t);
-
- $i = 0;
- while ($row = db_fetch_row($res_gui)){
- $insert = "INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ";
- $insert.= "('".db_result($res_gui, 0, 0)."','".db_result($res_gui, 0, 1)."','".db_result($res_gui, 0, 2)."',".db_result($res_gui, 0, 3).");\n";
- }
-
- //gui_element
- $sql_gel = "SELECT * from gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
- $v = array($guiList);
- $t = array('s');
- $res_gel = db_prep_query($sql_gel,$v,$t);
- $cnt_gel = 0;
-
- while ($row = db_fetch_array($res_gel)){
- $insert.="INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,";
- $insert.="e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles,";
- $insert.=" e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES (";
-
- $insert.="'".$row["fkey_gui_id"]."',";
- $insert.="'".$row["e_id"]."',";
- $insert.="".$row["e_pos"].",";
- $insert.="".$row["e_public"].",";
- $insert.="'".db_escape_string($row["e_comment"])."',";
- $insert.="'".$row["e_element"]."',";
- $insert.="'".$row["e_src"]."',";
- $insert.="'".db_escape_string($row["e_attributes"])."',";
- $insert.="".$row["e_left"].",";
- $insert.="".$row["e_top"].",";
- $insert.="".$row["e_width"].",";
- $insert.="".$row["e_height"].",";
- $insert.="".$row["e_z_index"].",";
- $insert.="'".$row["e_more_styles"]."',";
- $insert.="'".db_escape_string($row["e_content"])."',";
- $insert.="'".$row["e_closetag"]."',";
- $insert.="'".$row["e_js_file"]."',";
- $insert.="'".$row["e_mb_mod"]."',";
- $insert.="'".$row["e_target"]."',";
- $insert.="'".$row["e_requires"]."',";
- $insert.="'".$row["e_url"]."'";
- $insert.= ");\n";
- $insert = str_replace(",,", ",NULL ,", $insert);
- }
-
-
- $sql_gelvars = "SELECT * from gui_element_vars WHERE fkey_gui_id = $1 ORDER BY fkey_e_id, var_name";
- $v = array($guiList);
- $t = array('s');
- $res_gelvars = db_prep_query($sql_gelvars,$v,$t);
- $cnt_gelvars = 0;
-
- while ($row = db_fetch_row($res_gelvars)){
-
- $insert.="INSERT INTO gui_element_vars(";
- $i=0;
- while($i < db_numfields($res_gelvars)){
- if($i > 0){
- $insert.=", ";
- }
- $insert.=db_fieldname($res_gelvars, $i);
- $i++;
- }
- $insert.=") VALUES (";
- $i = 0;
- while($i < db_numfields($res_gelvars)){
- if($i > 0){
- $insert.=", ";
- }
- $temp = db_escape_string($row[$i]);
- $temp = str_replace(">",">",$temp);
- $temp = str_replace("<","<",$temp);
- $insert.="'" . $temp . "'";
- $i++;
- }
- $insert.=");\n";
-
- $cnt_gelvars++;
-
- }
-
- $insert = str_replace(",,",",NULL,",$insert);
- $insert = str_replace(", ,", ",NULL,",$insert);
-
- echo "<textarea rows=40 cols=80>";
- echo $insert;
- echo "</textarea>";
-}
-
-###
-if(!$guiList){
- $v = array();
- $t = array();
- $sql = "SELECT * FROM gui WHERE gui_id IN (";
- for($i=0; $i<count($permguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i + 1);
- array_push($v,$permguis[$i]);
- array_push($t,'s');
- }
- $sql .= ") ORDER BY gui_name";
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- echo "<form name='form1' action='" . $self ."' method='post'>";
- echo "<select class='guiList' size='20' name='guiList' class='guiList' onchange='document.forms[0].submit()'>";
- while($row = db_fetch_array($res)){
- print_r($row);
- echo "<option value='".$row["gui_id"]."'>".$row["gui_name"]."</option>";
- $cnt++;
- }
- echo "</select><br>";
-}
-
-?>
-<input type='hidden' name='del'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_exportGUI.php (from rev 2138, branches/2.4.5/http/php/mod_exportGUI.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_exportGUI.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_exportGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,191 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_exportGUI.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Export GUI</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+<!--
+function validate(){
+ var ind = document.form1.guiList.selectedIndex;
+ if(ind > -1){
+ //alert (ind);
+ var permission = confirm("export: " + document.form1.guiList.options[ind].text + " ?");
+ if(permission == true){
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+// -->
+</script>
+</head>
+<body>
+
+<?php
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$permguis = $admin->getGuisByPermission($_SESSION["mb_user_id"],true);
+
+ ###export
+
+if($guiList){
+ $insert = "";
+ //gui
+ $sql_gui = "SELECT * FROM gui WHERE gui_name = $1 ";
+ $v = array($guiList);
+ $t = array('s');
+ $res_gui = db_prep_query($sql_gui,$v,$t);
+
+ $i = 0;
+ while ($row = db_fetch_row($res_gui)){
+ $insert = "INSERT INTO gui (gui_id, gui_name, gui_description, gui_public) VALUES ";
+ $insert.= "('".db_result($res_gui, 0, 0)."','".db_result($res_gui, 0, 1)."','".db_result($res_gui, 0, 2)."',".db_result($res_gui, 0, 3).");\n";
+ }
+
+ //gui_element
+ $sql_gel = "SELECT * from gui_element WHERE fkey_gui_id = $1 ORDER BY e_id";
+ $v = array($guiList);
+ $t = array('s');
+ $res_gel = db_prep_query($sql_gel,$v,$t);
+ $cnt_gel = 0;
+
+ while ($row = db_fetch_array($res_gel)){
+ $insert.="INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,";
+ $insert.="e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles,";
+ $insert.=" e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES (";
+
+ $insert.="'".$row["fkey_gui_id"]."',";
+ $insert.="'".$row["e_id"]."',";
+ $insert.="".$row["e_pos"].",";
+ $insert.="".$row["e_public"].",";
+ $insert.="'".db_escape_string($row["e_comment"])."',";
+ $insert.="'".$row["e_element"]."',";
+ $insert.="'".$row["e_src"]."',";
+ $insert.="'".db_escape_string($row["e_attributes"])."',";
+ $insert.="".$row["e_left"].",";
+ $insert.="".$row["e_top"].",";
+ $insert.="".$row["e_width"].",";
+ $insert.="".$row["e_height"].",";
+ $insert.="".$row["e_z_index"].",";
+ $insert.="'".$row["e_more_styles"]."',";
+ $insert.="'".db_escape_string($row["e_content"])."',";
+ $insert.="'".$row["e_closetag"]."',";
+ $insert.="'".$row["e_js_file"]."',";
+ $insert.="'".$row["e_mb_mod"]."',";
+ $insert.="'".$row["e_target"]."',";
+ $insert.="'".$row["e_requires"]."',";
+ $insert.="'".$row["e_url"]."'";
+ $insert.= ");\n";
+ $insert = str_replace(",,", ",NULL ,", $insert);
+ }
+
+
+ $sql_gelvars = "SELECT * from gui_element_vars WHERE fkey_gui_id = $1 ORDER BY fkey_e_id, var_name";
+ $v = array($guiList);
+ $t = array('s');
+ $res_gelvars = db_prep_query($sql_gelvars,$v,$t);
+ $cnt_gelvars = 0;
+
+ while ($row = db_fetch_row($res_gelvars)){
+
+ $insert.="INSERT INTO gui_element_vars(";
+ $i=0;
+ while($i < db_numfields($res_gelvars)){
+ if($i > 0){
+ $insert.=", ";
+ }
+ $insert.=db_fieldname($res_gelvars, $i);
+ $i++;
+ }
+ $insert.=") VALUES (";
+ $i = 0;
+ while($i < db_numfields($res_gelvars)){
+ if($i > 0){
+ $insert.=", ";
+ }
+ $temp = db_escape_string($row[$i]);
+ $temp = str_replace(">",">",$temp);
+ $temp = str_replace("<","<",$temp);
+ $insert.="'" . $temp . "'";
+ $i++;
+ }
+ $insert.=");\n";
+
+ $cnt_gelvars++;
+
+ }
+
+ $insert = str_replace(",,",",NULL,",$insert);
+ $insert = str_replace(", ,", ",NULL,",$insert);
+
+ echo "<textarea rows=40 cols=80>";
+ echo $insert;
+ echo "</textarea>";
+}
+
+###
+if(!$guiList){
+ $v = array();
+ $t = array();
+ $sql = "SELECT * FROM gui WHERE gui_id IN (";
+ for($i=0; $i<count($permguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i + 1);
+ array_push($v,$permguis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ") ORDER BY gui_name";
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+ echo "<select class='guiList' size='20' name='guiList' class='guiList' onchange='document.forms[0].submit()'>";
+ while($row = db_fetch_array($res)){
+ print_r($row);
+ echo "<option value='".$row["gui_id"]."'>".$row["gui_name"]."</option>";
+ $cnt++;
+ }
+ echo "</select><br>";
+}
+
+?>
+<input type='hidden' name='del'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_export_image.php
===================================================================
--- branches/2.4.5/http/php/mod_export_image.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_export_image.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,38 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_export_image.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-session_start();
-import_request_variables("PG");
-$_SESSION["mb_print_url"] = $map_url;
-$_SESSION["mb_print_resolution"] = $quality;
-header("Content-type: application/png"); // mark the following content as PNG file
-$date = date("d.m.y");
-header("Content-Disposition: attachment; filename=export".$date.".png");
-header("Pragma: no-cache");
-header("Expires: 0");
-include(dirname(__FILE__)."/../../conf/print.conf");
-$header_height = intval($_REQUEST["header_height"]) * $deformation;
-$map_width = intval($_REQUEST["map_width"]) * $deformation;
-$map_height = intval($_REQUEST["map_height"]) * $deformation;
-$date = date("d.m.y");
-#map
-//include "../classes/class_weldMaps2PNG.php";
-include "../extensions/exp_weldMaps.php";
-//$i = new weldMaps($map_urls, $_SESSION["mb_print_resolution"]);
-//print $i;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_export_image.php (from rev 2138, branches/2.4.5/http/php/mod_export_image.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_export_image.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_export_image.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,42 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_export_image.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+import_request_variables("PG");
+
+$_SESSION["mb_print_url"] = $map_url;
+$_SESSION["mb_print_resolution"] = $quality;
+
+header("Content-type: application/png"); // mark the following content as PNG file
+$date = date("d.m.y");
+header("Content-Disposition: attachment; filename=export".$date.".png");
+header("Pragma: no-cache");
+header("Expires: 0");
+include(dirname(__FILE__)."/../../conf/print.conf");
+$header_height = intval($_REQUEST["header_height"]) * $deformation;
+$map_width = intval($_REQUEST["map_width"]) * $deformation;
+$map_height = intval($_REQUEST["map_height"]) * $deformation;
+$date = date("d.m.y");
+#map
+//include "../classes/class_weldMaps2PNG.php";
+include "../extensions/exp_weldMaps.php";
+//$i = new weldMaps($map_urls, $_SESSION["mb_print_resolution"]);
+//print $i;
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGroup_Gui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,215 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add Permission for Filtered Group to GUI</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- if($selected_group == NULL || $selected_group == '' || $selected_group < 0){
- $selected_group == "NULL";
- }
- $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2 ";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2)";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($remove_gui[$i],$selected_group);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all gui ********************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get owner group **********************************************************************************************/
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all gui from selected_group******************************************************************************/
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
-$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
-$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
-$sql_group_mb_gui .= " ORDER BY gui.gui_name";
-
-if(!$selected_group){
- if($group_id[0] > 0)
- $v = array($group_id[0]);
- else
- $v = array("NULL");
-}
-if($selected_group){
- if($selected_group >= 0)
- $v = array($selected_group);
- else
- $v = array("NULL");
-}
-$t = array('i');
-
-$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
-while($row = db_fetch_array($res_group_mb_gui)){
- $gui_id_group[$cnt_gui_group] = $row["gui_id"];
- $gui_name_group[$cnt_gui_group] = $row["gui_name"];
- $cnt_gui_group++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all group in selectbox********************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all gui in selectbox**********************************************************************/
-echo "<div class='text2'>GUI:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert group_gui_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGroup_Gui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_Gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,214 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add Permission for Filtered Group to GUI</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ if($selected_group == NULL || $selected_group == '' || $selected_group < 0){
+ $selected_group == "NULL";
+ }
+ $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2 ";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2)";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($remove_gui[$i],$selected_group);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all gui ********************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get owner group **********************************************************************************************/
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all gui from selected_group******************************************************************************/
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
+$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
+$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
+$sql_group_mb_gui .= " ORDER BY gui.gui_name";
+
+if(!$selected_group){
+ if($group_id[0] > 0)
+ $v = array($group_id[0]);
+ else
+ $v = array("NULL");
+}
+if($selected_group){
+ if($selected_group >= 0)
+ $v = array($selected_group);
+ else
+ $v = array("NULL");
+}
+$t = array('i');
+
+$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
+while($row = db_fetch_array($res_group_mb_gui)){
+ $gui_id_group[$cnt_gui_group] = $row["gui_id"];
+ $gui_name_group[$cnt_gui_group] = $row["gui_name"];
+ $cnt_gui_group++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all group in selectbox********************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all gui in selectbox**********************************************************************/
+echo "<div class='text2'>GUI:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert group_gui_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGroup_User.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,201 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add User to Filtered Group</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2 ";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
- $v = array($remove_user[$i],$selected_group);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get owner groups *******************************************************************************/
-
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all user ************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get only owner user from selected group**********************************************************/
-if(count($group_id)>0){
- $sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
- $sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
- $sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
- $sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
-
- if(!$selected_group){$v = array($group_id[0]);}
- if($selected_group){$v = array($selected_group);}
- $t = array('i');
-
- $res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
- while($row = db_fetch_array($res_mb_user_mb_group)){
- $user_id_group[$cnt_group_user] = $row["mb_user_id"];
- $user_name_group[$cnt_group_user] = $row["mb_user_name"];
- $cnt_group_user++;
- }
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert projects in selectbox*********************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all profiles in selectbox*****************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox******************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-}else{
- echo "There is no group owned by this user." ;
-}
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGroup_User.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_User.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,200 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add User to Filtered Group</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2 ";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
+ $v = array($remove_user[$i],$selected_group);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get owner groups *******************************************************************************/
+
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all user ************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get only owner user from selected group**********************************************************/
+if(count($group_id)>0){
+ $sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
+ $sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
+ $sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
+ $sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
+
+ if(!$selected_group){$v = array($group_id[0]);}
+ if($selected_group){$v = array($selected_group);}
+ $t = array('i');
+
+ $res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
+ while($row = db_fetch_array($res_mb_user_mb_group)){
+ $user_id_group[$cnt_group_user] = $row["mb_user_id"];
+ $user_name_group[$cnt_group_user] = $row["mb_user_name"];
+ $cnt_group_user++;
+ }
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert projects in selectbox*********************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all profiles in selectbox*****************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox******************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+}else{
+ echo "There is no group owned by this user." ;
+}
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGroup_filteredGui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,239 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add Permission for Filtered GUI to Filtered Group</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2 ";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2)";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($remove_gui[$i],$selected_group);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get owner group *********************************************************************************/
-
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-if ($cnt_group > 0) {
-
- /*get allocated gui from selected_group******************************************************************************/
- $arrayGuis=mb_getGUIs($logged_user_id);
- $v = array();
- $t = array();
- $sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
- $sql_group_mb_gui .= " JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
- $sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
- if(!$selected_group){
- if($group_id[0] > 0){
- array_push($v,$group_id[0]);
- array_push($t,'i');
- }
- else{
- array_push($v, "NULL");
- array_push($t,'i');
- }
- }
- else if($selected_group){
- array_push($v,$selected_group);
- array_push($t,'i');
- }
- $sql_group_mb_gui .= " AND gui.gui_id IN (";
- $c = 2;
- for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_group_mb_gui .= ",";}
- $sql_group_mb_gui .= "$".$c;
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
- $c++;
- }
- $sql_group_mb_gui .= ") ORDER BY gui.gui_name";
-
- $res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
- while($row = db_fetch_array($res_group_mb_gui)){
- $gui_id_group[$cnt_gui_group] = $row["gui_id"];
- $gui_name_group[$cnt_gui_group] = $row["gui_name"];
- $cnt_gui_group++;
- }
-
- /*INSERT HTML*/
- echo "<form name='form1' action='" . $self ."' method='post'>";
-
- /*insert all group in selectbox********************************************************************/
- echo "<div class='text1'>GROUP: </div>";
- echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
- for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
- }
- echo "</select>";
-
- /*insert all gui in selectbox**********************************************************************/
- echo "<div class='text2'>GUI:</div>";
- echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
- }
- echo "</select>";
-
- /*Button*******************************************************************************************/
-
- echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
- echo "<input type='hidden' name='insert'>";
-
- echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
- echo "<input type='hidden' name='remove'>";
-
- /*insert group_gui_dependence in selectbox*********************************************************/
- echo "<div class='text3'>SELECTED GUI:</div>";
- echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
- }
- echo "</select>";
-
- echo "</form>";
-}
-else {
- echo "<div class = 'text3'>There are no groups available for this user.</div>";
-}
-
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGroup_filteredGui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,239 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add Permission for Filtered GUI to Filtered Group</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2 ";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2)";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($remove_gui[$i],$selected_group);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get owner group *********************************************************************************/
+
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+if ($cnt_group > 0) {
+
+ /*get allocated gui from selected_group******************************************************************************/
+ $arrayGuis=mb_getGUIs($logged_user_id);
+ $v = array();
+ $t = array();
+ $sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
+ $sql_group_mb_gui .= " JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
+ $sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
+ if(!$selected_group){
+ if($group_id[0] > 0){
+ array_push($v,$group_id[0]);
+ array_push($t,'i');
+ }
+ else{
+ array_push($v, "NULL");
+ array_push($t,'i');
+ }
+ }
+ else if($selected_group){
+ array_push($v,$selected_group);
+ array_push($t,'i');
+ }
+ $sql_group_mb_gui .= " AND gui.gui_id IN (";
+ $c = 2;
+ for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_group_mb_gui .= ",";}
+ $sql_group_mb_gui .= "$".$c;
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ $c++;
+ }
+ $sql_group_mb_gui .= ") ORDER BY gui.gui_name";
+
+ $res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
+ while($row = db_fetch_array($res_group_mb_gui)){
+ $gui_id_group[$cnt_gui_group] = $row["gui_id"];
+ $gui_name_group[$cnt_gui_group] = $row["gui_name"];
+ $cnt_gui_group++;
+ }
+
+ /*INSERT HTML*/
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+
+ /*insert all group in selectbox********************************************************************/
+ echo "<div class='text1'>GROUP: </div>";
+ echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+ for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+ }
+ echo "</select>";
+
+ /*insert all gui in selectbox**********************************************************************/
+ echo "<div class='text2'>GUI:</div>";
+ echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+ }
+ echo "</select>";
+
+ /*Button*******************************************************************************************/
+
+ echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+ echo "<input type='hidden' name='insert'>";
+
+ echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+ echo "<input type='hidden' name='remove'>";
+
+ /*insert group_gui_dependence in selectbox*********************************************************/
+ echo "<div class='text3'>SELECTED GUI:</div>";
+ echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
+ }
+ echo "</select>";
+
+ echo "</form>";
+}
+else {
+ echo "<div class = 'text3'>There are no groups available for this user.</div>";
+}
+
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGroup_filteredUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,207 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add Filtered User to Filtered Group</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2 ";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
- $v = array($remove_user[$i],$selected_group);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get owner groups *******************************************************************************/
-
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get only owner user from selected group**********************************************************/
-if (count($group_id)>0){
- $v = array();
- $t = array();
- $sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
- $sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
- $sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
- if(!$selected_group){array_push($v,$group_id[0]); array_push($t,'i');}
- if($selected_group){array_push($v,$selected_group); array_push($t,'i');}
- $sql_mb_user_mb_group .= " AND mb_user.mb_user_owner = $2 ";
- array_push($v,$logged_user_id);
- array_push($t,'i');
- $sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
- $res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
- while($row = db_fetch_array($res_mb_user_mb_group)){
- $user_id_group[$cnt_group_user] = $row["mb_user_id"];
- $user_name_group[$cnt_group_user] = $row["mb_user_name"];
- $cnt_group_user++;
- }
-
-
- /*INSERT HTML*/
- echo "<form name='form1' action='" . $self ."' method='post'>";
-
- /*insert projects in selectbox*****************************************************************/
- echo "<div class='text1'>GROUP: </div>";
- echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
- for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
- }
- echo "</select>";
-
- /*insert all profiles in selectbox*************************************************************/
- echo "<div class='text2'>USER:</div>";
- echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
- }
- echo "</select>";
-
- /*Button***************************************************************************************/
-
- echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
- echo "<input type='hidden' name='insert'>";
-
- echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
- echo "<input type='hidden' name='remove'>";
-
- /*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
- echo "<div class='text3'>SELECTED USER:</div>";
- echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
- }
- echo "</select>";
-
- echo "</form>";
-}else{
- echo "There is no group available for this user.";
-}
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGroup_filteredUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGroup_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,206 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add Filtered User to Filtered Group</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2 ";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
+ $v = array($remove_user[$i],$selected_group);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get owner groups *******************************************************************************/
+
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get only owner user from selected group**********************************************************/
+if (count($group_id)>0){
+ $v = array();
+ $t = array();
+ $sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
+ $sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
+ $sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
+ if(!$selected_group){array_push($v,$group_id[0]); array_push($t,'i');}
+ if($selected_group){array_push($v,$selected_group); array_push($t,'i');}
+ $sql_mb_user_mb_group .= " AND mb_user.mb_user_owner = $2 ";
+ array_push($v,$logged_user_id);
+ array_push($t,'i');
+ $sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
+ $res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
+ while($row = db_fetch_array($res_mb_user_mb_group)){
+ $user_id_group[$cnt_group_user] = $row["mb_user_id"];
+ $user_name_group[$cnt_group_user] = $row["mb_user_name"];
+ $cnt_group_user++;
+ }
+
+
+ /*INSERT HTML*/
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+
+ /*insert projects in selectbox*****************************************************************/
+ echo "<div class='text1'>GROUP: </div>";
+ echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+ for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+ }
+ echo "</select>";
+
+ /*insert all profiles in selectbox*************************************************************/
+ echo "<div class='text2'>USER:</div>";
+ echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+ }
+ echo "</select>";
+
+ /*Button***************************************************************************************/
+
+ echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+ echo "<input type='hidden' name='insert'>";
+
+ echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+ echo "<input type='hidden' name='remove'>";
+
+ /*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
+ echo "<div class='text3'>SELECTED USER:</div>";
+ echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
+ }
+ echo "</select>";
+
+ echo "</form>";
+}else{
+ echo "There is no group available for this user.";
+}
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGui_User.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGui_User.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_User.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,209 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$gui_id_array = array();
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-#echo $_SESSION["mb_user_name"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($remove_user[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all user ************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all user from selected gui*******************************************************************/
-$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
-$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1 ";
-$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
-
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
-while($row = db_fetch_array($res_gui_mb_user)){
- $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
- $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
- $cnt_gui_user++;
-}
-
-
-/*INSERT HTML*/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert projects in selectbox********************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' size='10' onchange='submit()'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>"; }
-echo "</select>";
-
-/*insert all profiles in selectbox*****************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox******************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGui_User.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGui_User.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGui_User.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_User.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,207 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$gui_id_array = array();
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+#echo $_SESSION["mb_user_name"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_user[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all user ************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all user from selected gui*******************************************************************/
+$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
+$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1 ";
+$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
+
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
+while($row = db_fetch_array($res_gui_mb_user)){
+ $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
+ $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
+ $cnt_gui_user++;
+}
+
+
+/*INSERT HTML*/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert projects in selectbox********************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' size='10' onchange='submit()'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>"; }
+echo "</select>";
+
+/*insert all profiles in selectbox*****************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox******************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGui_filteredGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,210 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add Permission for Filtered Group to GUI</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2);";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
- $v = array($remove_group[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get owner groups ********************************************************************************/
-
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner groups from selected gui***************************************************************/
-$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
-$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
-
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$sql_gui_group .= " AND mb_group.mb_group_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_gui_group .= " ORDER BY mb_group.mb_group_name";
-$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
-while($row = db_fetch_array($res_gui_group)){
- $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
- $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
- $cnt_gui_group++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert guis in selectbox*************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox**************************************************************************/
-echo "<div class='text2'>GROUP:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGui_filteredGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,209 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add Permission for Filtered Group to GUI</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2);";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_group[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get owner groups ********************************************************************************/
+
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner groups from selected gui***************************************************************/
+$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
+$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
+
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$sql_gui_group .= " AND mb_group.mb_group_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_gui_group .= " ORDER BY mb_group.mb_group_name";
+$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
+while($row = db_fetch_array($res_gui_group)){
+ $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
+ $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
+ $cnt_gui_group++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert guis in selectbox*************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all groups in selectbox**************************************************************************/
+echo "<div class='text2'>GROUP:</div><br>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGui_filteredUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,215 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-#
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.background = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$gui_id_array=array();
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2 ";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($remove_user[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get only owner user *****************************************************************************/
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get only owner user from selected gui************************************************************/
-$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
-$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1 ";
-
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-
-$sql_gui_mb_user .= " AND mb_user.mb_user_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
-$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
-while($row = db_fetch_array($res_gui_mb_user)){
- $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
- $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
- $cnt_gui_user++;
-}
-
-
-/*INSERT HTML*/
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-/*insert guis in selectbox*************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_user_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGui_filteredUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,214 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+#
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.background = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$gui_id_array=array();
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2 ";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_user[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get only owner user *****************************************************************************/
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get only owner user from selected gui************************************************************/
+$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
+$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1 ";
+
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+
+$sql_gui_mb_user .= " AND mb_user.mb_user_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
+$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
+while($row = db_fetch_array($res_gui_mb_user)){
+ $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
+ $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
+ $cnt_gui_user++;
+}
+
+
+/*INSERT HTML*/
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+/*insert guis in selectbox*************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_user_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredGui_group.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredGui_group.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,203 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
- $v = array($remove_group[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i + 1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all groups **********************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all groups from selected gui*****************************************************************/
-$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
-$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
-$sql_gui_group .= "ORDER BY mb_group.mb_group_name";
-
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
-while($row = db_fetch_array($res_gui_group)){
- $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
- $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
- $cnt_gui_group++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert guis in selectbox*************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox*******************************************************************/
-echo "<div class='text2'>GROUP:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredGui_group.php (from rev 2138, branches/2.4.5/http/php/mod_filteredGui_group.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredGui_group.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredGui_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,202 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_group[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i + 1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all groups **********************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all groups from selected gui*****************************************************************/
+$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
+$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
+$sql_gui_group .= "ORDER BY mb_group.mb_group_name";
+
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
+while($row = db_fetch_array($res_gui_group)){
+ $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
+ $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
+ $cnt_gui_group++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert guis in selectbox*************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all groups in selectbox*******************************************************************/
+echo "<div class='text2'>GROUP:</div><br>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredUser_Group.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,197 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_group[$i],$selected_user);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all groups *********************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner user **********************************************************************************/
-
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get owner group from selected_user***************************************************************/
-
-if(count($user_id)>0){
- $sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
- $sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
- $sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
- $sql_user_mb_group .= "ORDER BY mb_group.mb_group_name";
- if(!$selected_user){$v = array($user_id[0]);}
- if($selected_user){$v = array($selected_user);}
- $t = array('i');
- $res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
- while($row = db_fetch_array($res_user_mb_group)){
- $group_id_user[$cnt_group_user] = $row["mb_group_id"];
- $group_name_user[$cnt_group_user] = $row["mb_group_name"];
- $cnt_group_user++;
- }
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all group in selectbox********************************************************************/
-echo "<div class='text2'>GROUP:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-}else{
- echo "There are no other users owned by this user." ;
-}
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php (from rev 2138, branches/2.4.5/http/php/mod_filteredUser_Group.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_Group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,196 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_group[$i],$selected_user);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all groups *********************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner user **********************************************************************************/
+
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get owner group from selected_user***************************************************************/
+
+if(count($user_id)>0){
+ $sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
+ $sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+ $sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
+ $sql_user_mb_group .= "ORDER BY mb_group.mb_group_name";
+ if(!$selected_user){$v = array($user_id[0]);}
+ if($selected_user){$v = array($selected_user);}
+ $t = array('i');
+ $res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
+ while($row = db_fetch_array($res_user_mb_group)){
+ $group_id_user[$cnt_group_user] = $row["mb_group_id"];
+ $group_name_user[$cnt_group_user] = $row["mb_group_name"];
+ $cnt_group_user++;
+ }
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all group in selectbox********************************************************************/
+echo "<div class='text2'>GROUP:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+}else{
+ echo "There are no other users owned by this user." ;
+}
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredUser_Gui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,199 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$cnt_gui_user = 0;
-$cnt_gui_logged_user = 0;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2);";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_gui[$i],$selected_user);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get owner user **********************************************************************************/
-
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all gui ************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all gui from selected_user*******************************************************************/
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
-$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
-$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ";
-$sql_user_mb_gui .= " ORDER BY gui.gui_name";
-
-if(!$selected_user){$v = array($user_id[0]);}
-if($selected_user){$v = array($selected_user);}
-$t = array('i');
-
-$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
-while($row = db_fetch_array($res_user_mb_gui)){
- $gui_id_user[$cnt_gui_user] = $row["gui_id"];
- $gui_name_user[$cnt_gui_user] = $row["gui_name"];
- $cnt_gui_user++;
-}
-
-
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-/*insert allocated gui in selectbox****************************************************************/
-echo "<div class='text2'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-/*Button*******************************************************************************************/
-echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_gui_dependence in selectbox**********************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php (from rev 2138, branches/2.4.5/http/php/mod_filteredUser_Gui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_Gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,198 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$cnt_gui_user = 0;
+$cnt_gui_logged_user = 0;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2);";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_gui[$i],$selected_user);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get owner user **********************************************************************************/
+
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all gui ************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all gui from selected_user*******************************************************************/
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ";
+$sql_user_mb_gui .= " ORDER BY gui.gui_name";
+
+if(!$selected_user){$v = array($user_id[0]);}
+if($selected_user){$v = array($selected_user);}
+$t = array('i');
+
+$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
+while($row = db_fetch_array($res_user_mb_gui)){
+ $gui_id_user[$cnt_gui_user] = $row["gui_id"];
+ $gui_name_user[$cnt_gui_user] = $row["gui_name"];
+ $cnt_gui_user++;
+}
+
+
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+/*insert allocated gui in selectbox****************************************************************/
+echo "<div class='text2'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+/*Button*******************************************************************************************/
+echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_gui_dependence in selectbox**********************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredUser_filteredGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,201 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_group[$i],$selected_user);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get owner groups *******************************************************************************/
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner user **********************************************************************************/
-
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get owner group from selected_user***************************************************************/
-if (count($user_id) == 0 AND count($group_id) == 0){ die("There is no group or user available for this user");}
-$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
-$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
-if(!$selected_user){$v = array($user_id[0]);}
-if($selected_user){$v = array($selected_user);}
-$t = array('i');
-$sql_user_mb_group .= " AND mb_group.mb_group_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
-
-
-$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
-
-while($row = db_fetch_array($res_user_mb_group)){
- $group_id_user[$cnt_group_user] = $row["mb_group_id"];
- $group_name_user[$cnt_group_user] = $row["mb_group_name"];
- $cnt_group_user++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
-echo ">" . $user_name[$i] . "</option>";
- }
-echo "</select>";
-
-/*insert all group in selectbox********************************************************************/
-echo "<div class='text2'>GROUP:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php (from rev 2138, branches/2.4.5/http/php/mod_filteredUser_filteredGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,200 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_group[$i],$selected_user);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get owner groups *******************************************************************************/
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner user **********************************************************************************/
+
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get owner group from selected_user***************************************************************/
+if (count($user_id) == 0 AND count($group_id) == 0){ die("There is no group or user available for this user");}
+$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
+$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
+if(!$selected_user){$v = array($user_id[0]);}
+if($selected_user){$v = array($selected_user);}
+$t = array('i');
+$sql_user_mb_group .= " AND mb_group.mb_group_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
+
+
+$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
+
+while($row = db_fetch_array($res_user_mb_group)){
+ $group_id_user[$cnt_group_user] = $row["mb_group_id"];
+ $group_name_user[$cnt_group_user] = $row["mb_group_name"];
+ $cnt_group_user++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+echo ">" . $user_name[$i] . "</option>";
+ }
+echo "</select>";
+
+/*insert all group in selectbox********************************************************************/
+echo "<div class='text2'>GROUP:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredUser_filteredGui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,246 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.background = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.background = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$cnt_gui_user = 0;
-$cnt_gui_logged_user = 0;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_gui[$i],$selected_user);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-
-/*get owner user **********************************************************************************/
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-
-
-/*get allocated gui ******************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i + 1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get allocated gui from logged_user***************************************************************/
-
-$sql_logged_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
-$sql_logged_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
-$sql_logged_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
-$sql_logged_user_mb_gui .= " ORDER BY gui.gui_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_logged_user_mb_all_gui = db_prep_query($sql_logged_user_mb_gui,$v,$t);
-while($row = db_fetch_array($res_logged_user_mb_all_gui)){
- $gui_id_logged_user[$cnt_gui_logged_user] = $row["gui_id"];
- $gui_name_logged_user[$cnt_gui_logged_user] = $row["gui_name"];
- $cnt_gui_logged_user++;
-}
-
-/*get allocated gui from selected_user*************************************************************/
-$arrayGuis=mb_getGUIs($logged_user_id);
-$v = array();
-$t = array();
-if(count($user_id)>0){
- $sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
- $sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
- $sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ";
- if(!$selected_user){array_push($v,$user_id[0]);}
- if($selected_user){array_push($v,$selected_user);}
- array_push($t,'i');
- $sql_user_mb_gui .= " AND gui.gui_id IN(";
- $c = 2;
- for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_user_mb_gui .= ",";}
- $sql_user_mb_gui .= "$".$c;
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
- $c++;
- }
- $sql_user_mb_gui .= ") ORDER BY gui.gui_name";
-
- $res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
- while($row = db_fetch_array($res_user_mb_gui)){
- $gui_id_user[$cnt_gui_user] = $row["gui_id"];
- $gui_name_user[$cnt_gui_user] = $row["gui_name"];
- $cnt_gui_user++;
- }
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-/*insert allocated gui in selectbox****************************************************************/
-echo "<div class='text2'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-/*Button*******************************************************************************************/
-echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_gui_dependence in selectbox**********************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-}else{
- echo "This user doesn't own other guis or other users.";
-}
-
-?>
-
-
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php (from rev 2138, branches/2.4.5/http/php/mod_filteredUser_filteredGui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredUser_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,244 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.background = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.background = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$cnt_gui_user = 0;
+$cnt_gui_logged_user = 0;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_gui[$i],$selected_user);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+
+/*get owner user **********************************************************************************/
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+
+
+/*get allocated gui ******************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i + 1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get allocated gui from logged_user***************************************************************/
+
+$sql_logged_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+$sql_logged_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+$sql_logged_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
+$sql_logged_user_mb_gui .= " ORDER BY gui.gui_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_logged_user_mb_all_gui = db_prep_query($sql_logged_user_mb_gui,$v,$t);
+while($row = db_fetch_array($res_logged_user_mb_all_gui)){
+ $gui_id_logged_user[$cnt_gui_logged_user] = $row["gui_id"];
+ $gui_name_logged_user[$cnt_gui_logged_user] = $row["gui_name"];
+ $cnt_gui_logged_user++;
+}
+
+/*get allocated gui from selected_user*************************************************************/
+$arrayGuis=mb_getGUIs($logged_user_id);
+$v = array();
+$t = array();
+if(count($user_id)>0){
+ $sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+ $sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+ $sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ";
+ if(!$selected_user){array_push($v,$user_id[0]);}
+ if($selected_user){array_push($v,$selected_user);}
+ array_push($t,'i');
+ $sql_user_mb_gui .= " AND gui.gui_id IN(";
+ $c = 2;
+ for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_user_mb_gui .= ",";}
+ $sql_user_mb_gui .= "$".$c;
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ $c++;
+ }
+ $sql_user_mb_gui .= ") ORDER BY gui.gui_name";
+
+ $res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
+ while($row = db_fetch_array($res_user_mb_gui)){
+ $gui_id_user[$cnt_gui_user] = $row["gui_id"];
+ $gui_name_user[$cnt_gui_user] = $row["gui_name"];
+ $cnt_gui_user++;
+ }
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+/*insert allocated gui in selectbox****************************************************************/
+echo "<div class='text2'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+/*Button*******************************************************************************************/
+echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_gui_dependence in selectbox**********************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+}else{
+ echo "This user doesn't own other guis or other users.";
+}
+
+?>
+
+
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredWms_layer_topic.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,229 +0,0 @@
-<?php
-# $Id: mod_filteredGui_group.php 235 2006-05-11 08:34:48Z uli $
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/mb_validatePermission.php");
-require_once("../classes/class_administration.php");
-
-$logged_user_name = $_SESSION["mb_user_name"];
-$logged_user_id = $_SESSION["mb_user_id"];
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_wms"].selectedIndex == -1){
- document.getElementsByName("selected_wms")[0].style.backgroundColor = '#ff0000';
- return;
- }else if(document.forms[0]["selected_layer"].selectedIndex == -1){
- document.getElementsByName("selected_layer")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_topic[]"].selectedIndex == -1){
- document.getElementsByName("remove_topic[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_topic[]"].selectedIndex == -1){
- document.getElementsByName("selected_topic[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-$language_suffix = "en";
-
-//FIXME: there seems to be an error in dyn_css.php concerning php vars.
-if ($language == "'de'") {
- $language_suffix = "de";
-}
-
-$admin = new administration();
-$own_gui_id_array = $admin->getGuisByOwner($logged_user_id,true);
-$own_wms_id_array = array();
-
-$sql = "SELECT wms_id FROM wms WHERE wms_owner = $1";
-$v = array($logged_user_id);
-$t = array('i');
-$res = db_prep_query($sql,$v,$t);
-
-while($row = db_fetch_array($res)){
- array_push($own_wms_id_array,$row['wms_id']);
-}
-$own_layer_id_array = $admin->getLayerByWms($selected_wms);
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_topic) > 0){
- for($i=0; $i<count($selected_topic); $i++){
- $exists = false;
- $sql_insert = "SELECT * FROM layer_md_topic_category WHERE fkey_layer_id = $1 and fkey_md_topic_category_id = $2";
- $v = array($selected_layer,$selected_topic[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO layer_md_topic_category (fkey_layer_id, fkey_md_topic_category_id) VALUES($1, $2)";
- $v = array($selected_layer,$selected_topic[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_topic)>0){
- for($i=0; $i<count($remove_topic); $i++){
- $sql_remove = "DELETE FROM layer_md_topic_category WHERE fkey_md_topic_category_id = $1 and fkey_layer_id = $2";
- $v = array($remove_topic[$i],$selected_layer);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-if (!isset($selected_layer)) {
- if (count($own_layer_id_array) > 0) {
- $selected_layer = $own_layer_id_array[0];
- }
-}
-
-$topic_id_layer = array();
-
-if (isset($selected_layer)) {
- /*get all topics from selected layer*****************************************************************/
- if ($language_suffix == "de") {
- $sql_layer_topic = "SELECT t.md_topic_category_id, t.md_topic_category_code_de ";
- $sql_layer_topic .= "FROM layer_md_topic_category as w, md_topic_category as t WHERE w.fkey_layer_id = $1 AND w.fkey_md_topic_category_id = t.md_topic_category_id ";
- $sql_layer_topic .= "ORDER BY t.md_topic_category_code_de";
- }
- else {
- $sql_layer_topic = "SELECT t.md_topic_category_id, t.md_topic_category_code_en ";
- $sql_layer_topic .= "FROM layer_md_topic_category as w, md_topic_category as t WHERE w.fkey_layer_id = $1 AND w.fkey_md_topic_category_id = t.md_topic_category_id ";
- $sql_layer_topic .= "ORDER BY t.md_topic_category_code_en";
- }
-
- $v = array($selected_layer);
- $t = array('s');
- $res_layer_topic = db_prep_query($sql_layer_topic,$v,$t);
-
- while($row = db_fetch_array($res_layer_topic)){
- array_push($topic_id_layer, $row["md_topic_category_id"]);
- array_push($topic_name_layer, $row["md_topic_category_code_".$language_suffix]);
- }
-}
-/*get all topics **********************************************************************************/
-if ($language_suffix == "de") {
- $sql_topic = "SELECT * FROM md_topic_category ORDER BY md_topic_category_code_de";
-}
-else {
- $sql_topic = "SELECT * FROM md_topic_category ORDER BY md_topic_category_code_en";
-}
-$res_topic = db_query($sql_topic);
-$topic_id = array();
-$topic_name = array();
-while($row = db_fetch_array($res_topic)){
- if (!in_array($row["md_topic_category_id"], $topic_id_layer)) {
- array_push($topic_id, $row["md_topic_category_id"]);
- array_push($topic_name, $row["md_topic_category_code_".$language_suffix]);
- }
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert wms in selectbox*************************************************************************/
-echo "<div class='text1'>WMS: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_wms' onChange='submit()' size='10'>";
-for($i=0; $i<count($own_wms_id_array); $i++){
- echo "<option value='" . $own_wms_id_array[$i] . "' ";
- if($selected_wms && $selected_wms == $own_wms_id_array[$i]){
- echo "selected";
- }
- echo ">" . $admin->getWmsTitleByWmsId($own_wms_id_array[$i]) . "</option>";
-}
-echo "</select>";
-
-/*insert wms in selectbox*************************************************************************/
-echo "<div class='text2'>Layer: </div>";
-echo "<select style='background:#ffffff' class='select2' name='selected_layer' onChange='submit()' size='10'>";
-for($i=0; $i<count($own_layer_id_array); $i++){
- echo "<option value='" . $own_layer_id_array[$i] . "' ";
- if($selected_layer && $selected_layer == $own_layer_id_array[$i]){
- echo "selected";
- }
- echo ">" . $admin->getLayerTitleByLayerId($own_layer_id_array[$i]) . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox*******************************************************************/
-echo "<div class='text3'>TOPICS:</div><br>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='selected_topic[]' size='$fieldHeight' >";
-for($i=0; $i<count($topic_id); $i++){
- echo "<option value='" . $topic_id[$i] . "'>" . $topic_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert wms_topic_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text4'>SELECTED TOPICS:</div>";
-echo "<select style='background:#ffffff' class='select4' multiple='multiple' name='remove_topic[]' size='$fieldHeight' >";
-for ($i=0; $i < count($topic_id_layer); $i++) {
- echo "<option value='" . $topic_id_layer[$i] . "'>" . $topic_name_layer[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_wms.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php (from rev 2218, branches/2.4.5/http/php/mod_filteredWms_layer_topic.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredWms_layer_topic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,29 @@
+<?php
+# $Id: mod_filteredGui_group.php 235 2006-05-11 08:34:48Z uli $
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET;?>">
+<title>Administration</title>
+</head>
+<body>
+This module is still under construction, see <a href='http://www.mapbender.org/Topic_/_Category'>Mapbender Wiki</a>.
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php
===================================================================
--- branches/2.4.5/http/php/mod_filteredWms_topic.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,189 +0,0 @@
-<?php
-# $Id: mod_filteredGui_group.php 235 2006-05-11 08:34:48Z uli $
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once("../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Administration</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_wms"].selectedIndex == -1){
- document.getElementsByName("selected_wms")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_topic[]"].selectedIndex == -1){
- document.getElementsByName("remove_topic[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_topic[]"].selectedIndex == -1){
- document.getElementsByName("selected_topic[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once("../classes/class_administration.php");
-
-$fieldHeight = 20;
-
-$language_suffix = "en";
-//FIXME: there seems to be an error in dyn_css.php concerning php vars.
-if ($language == "'de'") {
- $language_suffix = "de";
-}
-
-$logged_user_name = $_SESSION["mb_user_name"];
-$logged_user_id = $_SESSION["mb_user_id"];
-
-$admin = new administration();
-$own_gui_id_array = $admin->getGuisByOwner($logged_user_id,true);
-$own_wms_id_array = $admin->getWmsByOwnGuis($own_gui_id_array);
-$cnt_wms = count($own_wms_id_array);
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_topic) > 0){
- for($i=0; $i<count($selected_topic); $i++){
- $exists = false;
- $sql_insert = "SELECT * FROM wms_md_topic_category WHERE fkey_wms_id = $1 and fkey_md_topic_category_id = $2";
- $v = array($selected_wms,$selected_topic[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO wms_md_topic_category (fkey_wms_id, fkey_md_topic_category_id) VALUES($1, $2)";
- $v = array($selected_wms,$selected_topic[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_topic)>0){
- for($i=0; $i<count($remove_topic); $i++){
- $sql_remove = "DELETE FROM wms_md_topic_category WHERE fkey_md_topic_category_id = $1 and fkey_wms_id = $2";
- $v = array($remove_topic[$i],$selected_wms);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all topics from selected wms*****************************************************************/
-$sql_wms_topic = "SELECT t.md_topic_category_id, t.md_topic_category_code_".$language_suffix." ";
-$sql_wms_topic .= "FROM wms_md_topic_category as w, md_topic_category as t WHERE w.fkey_wms_id = $1 AND w.fkey_md_topic_category_id = t.md_topic_category_id ";
-$sql_wms_topic .= "ORDER BY t.md_topic_category_code_".$language_suffix;
-
-if(!$selected_wms){$v = array($own_wms_id_array[0]);}
-if($selected_wms){$v = array($selected_wms);}
-$t = array('s');
-$res_wms_topic = db_prep_query($sql_wms_topic,$v,$t);
-$cnt_wms_topic=0;;
-while($row = db_fetch_array($res_wms_topic)){
- $topic_id_wms[$cnt_wms_topic] = $row["md_topic_category_id"];
- $topic_name_wms[$cnt_wms_topic] = $row["md_topic_category_code_".$language_suffix];
- $cnt_wms_topic++;
-}
-
-/*get all topics **********************************************************************************/
-$sql_topic = "SELECT * FROM md_topic_category ORDER BY md_topic_category_code_" . $language_suffix;
-$res_topic = db_query($sql_topic);
-$cnt_topic = 0;
-while($row = db_fetch_array($res_topic)){
- if (!in_array($row["md_topic_category_id"], $topic_id_wms)) {
- $topic_id[$cnt_topic] = $row["md_topic_category_id"];
- $topic_name[$cnt_topic] = $row["md_topic_category_code_".$language_suffix];
- $cnt_topic++;
- }
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert wms in selectbox*************************************************************************/
-echo "<div class='text1'>WMS: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_wms' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_wms; $i++){
- echo "<option value='" . $own_wms_id_array[$i] . "' ";
- if($selected_wms && $selected_wms == $own_wms_id_array[$i]){
- echo "selected";
- }
- echo ">" . $admin->getWmsTitleByWmsId($own_wms_id_array[$i]) . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox*******************************************************************/
-echo "<div class='text2'>TOPICS:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_topic[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_topic; $i++){
- echo "<option value='" . $topic_id[$i] . "'>" . $topic_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert wms_topic_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED TOPICS:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_topic[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_wms_topic; $i++){
- echo "<option value='" . $topic_id_wms[$i] . "'>" . $topic_name_wms[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_wms.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php (from rev 2218, branches/2.4.5/http/php/mod_filteredWms_topic.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_filteredWms_topic.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,30 @@
+<?php
+# $Id: mod_filteredGui_group.php 235 2006-05-11 08:34:48Z uli $
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Administration</title>
+</head>
+<body>
+This module is still under construction, see <a href='http://www.mapbender.org/Topic_/_Category'>Mapbender Wiki</a>.
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_forgottenPassword.php
===================================================================
--- branches/2.4.5/http/php/mod_forgottenPassword.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_forgottenPassword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,159 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Generate New Password</title>
-<style type="text/css">
-<!--
-
-body{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 10px;
-}
-.desc{
- font-family: Arial, Helvetica, sans-serif;
- font-size: 9px;
-}
-.myButton{
- font-family: Arial, Helvetica, sans-serif;
- width : 150px;
-}
--->
-</style>
-</head>
-<body>
-<?php
-//the database-params
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-//$con = db_connect($DBSERVER,$OWNER,$PW);
-//db_select_db(DB,$con);
-
-
-if (!USE_PHP_MAILING) {
- echo "<script language='javascript'>";
- echo "alert('PHP mailing is currently disabled. Please adjust the settings in mapbender.conf.');";
- echo "window.close();";
- echo "</script>";
-}
-else {
- $logged_user_name=$_SESSION["mb_user_name"];
- $logged_user_id=$_SESSION["mb_user_id"];
-
- $admin = new administration();
- $upd = false;
-
- if ($_POST["sendnew"]) {
- if ($_POST["username"]) {
- $id = $admin->getUserIdByUserName($_POST["username"]);
- $user_id = $id[0];
-
- if ($user_id) {
- $upd=true;
- }
- else {
- echo "Your username could not be found. Please try again!<br><br>";
- }
- }
- else {
- echo "Please fill in your username.<br><br>";
- }
- }
-
-
- /*handle INSERT and DELETE************************************************************************************/
- if($upd){
-
- $sql_password = $admin->getRandomPassword();
- $mailToAddr = $admin->getEmailByUserId($user_id);
- $mailToName = $admin->getUsernameByUserId($user_id);
-
- if (!$mailToAddr) {
- echo "<script language='javascript'>";
- echo "alert('You didn\'t enter an email address when registering with Mapbender. Unfortunately there is no way to send you a new password.');";
- echo "window.back();";
- echo "</script>";
- }
- elseif ($user_id) {
- if ($admin->sendEmail("", "", $mailToAddr, $mailToName, "Your new Mapbender password", "login: " . $mailToName . "\npassword: " . $sql_password, $error_msg)) {
- //set new password in db
- $sql_update = "UPDATE mb_user SET mb_user_password = $1";
- $sql_update .= " WHERE mb_user_id = $2";
- #echo $sql_update;
- $v = array(md5($sql_password),$user_id);
- $t = array('s','i');
- db_prep_query($sql_update,$v,$t);
-
- //reset login count
- $admin->resetLoginCount($user_id);
-
- echo "<script language='javascript'>";
- echo "alert('A new password will be sent to your e-mail-address!');";
- echo "window.close();";
- echo "</script>";
- }
- else {
- echo "<script language='javascript'>";
- echo "alert('An error occured while sending the new password to your e-mail-address! " . $error_msg . " Please try again later.');";
- echo "window.back();";
- echo "</script>";
- }
- }
- $upd = false;
- }
- else {
-
-
- /*HTML*****************************************************************************************************/
-
- echo "<fieldset><legend>Forgot your Passwort ?</legend>";
- #echo "<fieldset><legend>Passwort vergessen ?</legend>";
- #echo "<form name='form1' action='" . $PHP_SELF . "' method='post'>";
- echo "<form name='form1' method='post'>";
- echo "<table cellpadding='5' cellspacing='0' border='0'><tr>";
- echo "<td>";
- echo "Username:";
- echo "</td>";
- echo "<td>";
- echo "<input type='text' name='username' value=''>";
- echo "</td>";
- echo"</tr>";
- echo"<tr><td>";
- echo "<input type='hidden' name='upd' value=''>";
- echo "<center><br><input type='submit' name='sendnew' value='Order a new Password'></center>";
- #echo "<center><br><input type='submit' name='sendnew' value='Neues Passwort anfordern'></center>";
- echo"<td></tr></table>";
- echo "</form>";
- echo"</fieldset><br />";
- /*********************************************************************/
- }
-}
-?>
-
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_forgottenPassword.php (from rev 2138, branches/2.4.5/http/php/mod_forgottenPassword.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_forgottenPassword.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_forgottenPassword.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,157 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+import_request_variables("PG");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Generate New Password</title>
+<style type="text/css">
+<!--
+
+body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 10px;
+}
+.desc{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size: 9px;
+}
+.myButton{
+ font-family: Arial, Helvetica, sans-serif;
+ width : 150px;
+}
+-->
+</style>
+</head>
+<body>
+<?php
+//the database-params
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+//$con = db_connect($DBSERVER,$OWNER,$PW);
+//db_select_db(DB,$con);
+
+
+if (!USE_PHP_MAILING) {
+ echo "<script language='javascript'>";
+ echo "alert('PHP mailing is currently disabled. Please adjust the settings in mapbender.conf.');";
+ echo "window.close();";
+ echo "</script>";
+}
+else {
+ $logged_user_name=$_SESSION["mb_user_name"];
+ $logged_user_id=$_SESSION["mb_user_id"];
+
+ $admin = new administration();
+ $upd = false;
+
+ if ($_POST["sendnew"]) {
+ if ($_POST["username"]) {
+ $id = $admin->getUserIdByUserName($_POST["username"]);
+ $user_id = $id[0];
+
+ if ($user_id) {
+ $upd=true;
+ }
+ else {
+ echo "Your username could not be found. Please try again!<br><br>";
+ }
+ }
+ else {
+ echo "Please fill in your username.<br><br>";
+ }
+ }
+
+
+ /*handle INSERT and DELETE************************************************************************************/
+ if($upd){
+
+ $sql_password = $admin->getRandomPassword();
+ $mailToAddr = $admin->getEmailByUserId($user_id);
+ $mailToName = $admin->getUsernameByUserId($user_id);
+
+ if (!$mailToAddr) {
+ echo "<script language='javascript'>";
+ echo "alert('You didn\'t enter an email address when registering with Mapbender. Unfortunately there is no way to send you a new password.');";
+ echo "window.back();";
+ echo "</script>";
+ }
+ elseif ($user_id) {
+ if ($admin->sendEmail("", "", $mailToAddr, $mailToName, "Your new Mapbender password", "login: " . $mailToName . "\npassword: " . $sql_password, $error_msg)) {
+ //set new password in db
+ $sql_update = "UPDATE mb_user SET mb_user_password = $1";
+ $sql_update .= " WHERE mb_user_id = $2";
+ #echo $sql_update;
+ $v = array(md5($sql_password),$user_id);
+ $t = array('s','i');
+ db_prep_query($sql_update,$v,$t);
+
+ //reset login count
+ $admin->resetLoginCount($user_id);
+
+ echo "<script language='javascript'>";
+ echo "alert('A new password will be sent to your e-mail-address!');";
+ echo "window.close();";
+ echo "</script>";
+ }
+ else {
+ echo "<script language='javascript'>";
+ echo "alert('An error occured while sending the new password to your e-mail-address! " . $error_msg . " Please try again later.');";
+ echo "window.back();";
+ echo "</script>";
+ }
+ }
+ $upd = false;
+ }
+ else {
+
+
+ /*HTML*****************************************************************************************************/
+
+ echo "<fieldset><legend>Forgot your Passwort ?</legend>";
+ #echo "<fieldset><legend>Passwort vergessen ?</legend>";
+ echo "<form name='form1' action='" . $self . "' method='post'>";
+ echo "<table cellpadding='5' cellspacing='0' border='0'><tr>";
+ echo "<td>";
+ echo "Username:";
+ echo "</td>";
+ echo "<td>";
+ echo "<input type='text' name='username' value=''>";
+ echo "</td>";
+ echo"</tr>";
+ echo"<tr><td>";
+ echo "<input type='hidden' name='upd' value=''>";
+ echo "<center><br><input type='submit' name='sendnew' value='Order a new Password'></center>";
+ #echo "<center><br><input type='submit' name='sendnew' value='Neues Passwort anfordern'></center>";
+ echo"<td></tr></table>";
+ echo "</form>";
+ echo"</fieldset><br />";
+ /*********************************************************************/
+ }
+}
+?>
+
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_gazLayerObj_conf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,160 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>gazetteer</title>
-<script language="JavaScript" type="text/javascript">
- function selectWFS(){
- if(document.forms[0].featuretype){
- if(document.forms[0].featuretype.length){
- for(var i=0; i<document.forms[0].featuretype.length;i++){
- document.forms[0].featuretype[i].checked = false;
- }
- }
- else{
- document.forms[0].featuretype.checked = false;
- }
- }
- document.forms[0].submit();
- }
- function validate(){
- for(var i=0; i<document.forms[0].length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked){
- document.forms[0].elements[i].value = 1;
- }
- else{
- document.forms[0].elements[i].value = 0;
- }
- document.forms[0].elements[i].checked = true;
- }
- }
- return true;
- }
-</script>
-
-</head>
-<body>
-Gazetteer Configuration<br>
-<form method='POST' onsubmit='return validate()'>
-
-<?php
-echo "<input type='hidden' name='gui' value='".$_REQUEST["gui"]."'>";
-echo "<input type='hidden' name='wms' value='".$_REQUEST["wms"]."'>";
-echo "<input type='hidden' name='layer' value='".$_REQUEST["layer"]."'>";
-
-
-$aWFS = new wfs_conf();
-$aWFS->getallwfs();
-
-/* save gazetteer properties */
-
-if(isset($_REQUEST["save"])){
- $con = db_connect($DBSERVER,$OWNER,$PW);
- db_select_db(DB,$con);
-
- $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = $1 ";
- $sql .= "WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
- $v = array($_REQUEST["myWFS"], $_REQUEST["gui"], $_REQUEST["layer"]);
- $t = array("s", "s", "i");
- $res = db_prep_query($sql, $v, $t);
- echo "layer is connected with: ".$_REQUEST["myWFS"];
- die();
-}
-
-/* end save gazetteer properties */
-
-/* select wfs */
-
-if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
- unset($_REQUEST["wfs"]);
- unset($_REQUEST["featuretype"]);
-}
-
-echo "<select name='wfs' onchange='selectWFS()'>";
-echo "<option value=''>...</option>";
-for($i=0; $i<count($aWFS->wfs_id);$i++){
- echo "<option value='".$aWFS->wfs_id[$i]."' ";
- if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "selected";
- }
- echo ">".$aWFS->wfs_title[$i]."</option>";
-}
-echo "</select>";
-echo "";
-
-/* end select wfs */
-
-
-/* select featuretype */
-
-if(isset($_REQUEST["wfs"])){
-
- for($i=0; $i<count($aWFS->wfs_id);$i++){
- if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "<table>";
- echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
- echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
- echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
- echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
- echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
- echo "<tr><td>FeaturTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
- echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
- echo "</table>";
- $str_request = $aWFS->wfs_getfeature[$i]."&REQUEST=getFeature&VERSION=".$aWFS->wfs_version[$i]."&SERVICE=WFS";
- }
- }
-
- $aWFS->getfeatures($_REQUEST["wfs"]);
- echo "<table>";
- for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
- echo "<tr>";
- echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
- if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
- echo "checked ";
- $str_request = $str_request . "&Typename=".$aWFS->features->featuretype_name[$i];
- }
- echo "/></td>";
- echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
- echo "</tr>";
- }
- echo "</table>";
-}
-
-/* end select featuretype */
-
-/* configure elements */
-if(isset($_REQUEST["featuretype"])){
-echo "<input type='hidden' name='myWFS' value='".$str_request."'>";
-echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
Copied: branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php (from rev 2138, branches/2.4.5/http/php/mod_gazLayerObj_conf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazLayerObj_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,159 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>gazetteer</title>
+<script language="JavaScript" type="text/javascript">
+ function selectWFS(){
+ if(document.forms[0].featuretype){
+ if(document.forms[0].featuretype.length){
+ for(var i=0; i<document.forms[0].featuretype.length;i++){
+ document.forms[0].featuretype[i].checked = false;
+ }
+ }
+ else{
+ document.forms[0].featuretype.checked = false;
+ }
+ }
+ document.forms[0].submit();
+ }
+ function validate(){
+ for(var i=0; i<document.forms[0].length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked){
+ document.forms[0].elements[i].value = 1;
+ }
+ else{
+ document.forms[0].elements[i].value = 0;
+ }
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ return true;
+ }
+</script>
+
+</head>
+<body>
+Gazetteer Configuration<br>
+<form method='POST' onsubmit='return validate()'>
+
+<?php
+echo "<input type='hidden' name='gui' value='".$_REQUEST["gui"]."'>";
+echo "<input type='hidden' name='wms' value='".$_REQUEST["wms"]."'>";
+echo "<input type='hidden' name='layer' value='".$_REQUEST["layer"]."'>";
+
+
+$aWFS = new wfs_conf();
+$aWFS->getallwfs();
+
+/* save gazetteer properties */
+
+if(isset($_REQUEST["save"])){
+ $con = db_connect($DBSERVER,$OWNER,$PW);
+ db_select_db(DB,$con);
+
+ $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = $1 ";
+ $sql .= "WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
+ $v = array($_REQUEST["myWFS"], $_REQUEST["gui"], $_REQUEST["layer"]);
+ $t = array("s", "s", "i");
+ $res = db_prep_query($sql, $v, $t);
+ echo "layer is connected with: ".$_REQUEST["myWFS"];
+ die();
+}
+
+/* end save gazetteer properties */
+
+/* select wfs */
+
+if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
+ unset($_REQUEST["wfs"]);
+ unset($_REQUEST["featuretype"]);
+}
+
+echo "<select name='wfs' onchange='selectWFS()'>";
+echo "<option value=''>...</option>";
+for($i=0; $i<count($aWFS->wfs_id);$i++){
+ echo "<option value='".$aWFS->wfs_id[$i]."' ";
+ if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "selected";
+ }
+ echo ">".$aWFS->wfs_title[$i]."</option>";
+}
+echo "</select>";
+echo "";
+
+/* end select wfs */
+
+
+/* select featuretype */
+
+if(isset($_REQUEST["wfs"])){
+
+ for($i=0; $i<count($aWFS->wfs_id);$i++){
+ if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "<table>";
+ echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
+ echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
+ echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
+ echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
+ echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
+ echo "<tr><td>FeaturTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
+ echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
+ echo "</table>";
+ $str_request = $aWFS->wfs_getfeature[$i]."&REQUEST=getFeature&VERSION=".$aWFS->wfs_version[$i]."&SERVICE=WFS";
+ }
+ }
+
+ $aWFS->getfeatures($_REQUEST["wfs"]);
+ echo "<table>";
+ for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
+ echo "<tr>";
+ echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
+ if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
+ echo "checked ";
+ $str_request = $str_request . "&Typename=".$aWFS->features->featuretype_name[$i];
+ }
+ echo "/></td>";
+ echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
+ echo "</tr>";
+ }
+ echo "</table>";
+}
+
+/* end select featuretype */
+
+/* configure elements */
+if(isset($_REQUEST["featuretype"])){
+echo "<input type='hidden' name='myWFS' value='".$str_request."'>";
+echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
Deleted: branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_gazLayerObj_edit.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,167 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Gazetteer</title>
-<script language="JavaScript" type="text/javascript">
- function validate(){
- for(var i=0; i<document.forms[0].length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked){
- document.forms[0].elements[i].value = 1;
- }
- else{
- document.forms[0].elements[i].value = 0;
- }
- document.forms[0].elements[i].checked = true;
- }
- }
- return true;
- }
-</script>
-
-</head>
-<body>
-Gazetteer Configuration<br>
-<form method='POST' onsubmit='return validate()'>
-
-<?php
-/* save gazetteer properties */
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-if(isset($_REQUEST["save"])){
-
- $sql = "UPDATE gazetteer SET ";
- $sql .= "gazetteer_abstract = $1, ";
- $sql .= "g_label = $2, ";
- $sql .= "g_label_id = $3, ";
- $sql .= "g_button = $4, ";
- $sql .= "g_button_id = $5, ";
- $sql .= "g_style = $6, ";
- $sql .= "g_buffer = $7 ";
- $sql .= "WHERE gazetteer_id = $8;";
-
- $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["fkey_gazetteer_id"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "i");
- $res = db_prep_query($sql, $v, $t);
-
- for ($i = 0; $i < count($_REQUEST["f_id"]); $i++){
- $sql = "UPDATE gazetteer_element SET ";
- $sql .= "f_search = $1, ";
- $sql .= "f_pos = $2, ";
- $sql .= "f_style_id = $3, ";
- $sql .= "f_label = $4, ";
- $sql .= "f_label_id = $5, ";
- $sql .= "f_show = $6, ";
- $sql .= "f_respos = $7 ";
- $sql .= "WHERE fkey_gazetteer_id = $8 AND f_id = $9;";
-
- $v = array($_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i], $_REQUEST["fkey_gazetteer_id"], $_REQUEST["f_id"][$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "i", "i");
-
- $res = db_prep_query($sql, $v, $t);
- }
-}
-
-/* end save gazetteer properties */
-
-/* select wfs */
-
-
-
-/* end select wfs */
-
-
-
-/* configure elements */
-if(isset($_REQUEST["fkey_gazetteer_id"])){
- $sql = "SELECT * FROM gazetteer WHERE gazetteer_id = $1";
- $v = array($_REQUEST["fkey_gazetteer_id"]);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
- if($row = db_fetch_array($res)){
- echo "<table>";
- echo "<tr><td>ID:</td><td>".$row["gazetteer_id"]."</td></tr>" ;
- echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract' value='".$row["gazetteer_abstract"]."'></td></tr>" ;
- echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
- echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
- echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
- echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
- echo "<tr><td>Style:</td><td><textarea cols=30 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
- echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
- echo "</table>";
- }
-
- /* set element options */
- $sql = "SELECT * FROM gazetteer_element ";
- $sql .= "JOIN wfs_element ON gazetteer_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE fkey_gazetteer_id = $1";
- $v = array($_REQUEST["fkey_gazetteer_id"]);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- echo "<table border='1'>";
- echo "<tr>";
- echo "<td>ID</td>";
- echo "<td>name</td>";
- echo "<td>type</td>";
- echo "<td>search</td>";
- echo "<td>pos</td>";
- echo "<td>style_id</td>";
- echo "<td>label</td>";
- echo "<td>label_id</td>";
- echo "<td>show</td>";
- echo "<td>position</td>";
- echo "</tr>";
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<tr>";
- echo "<td><input type='text' size='4' name='f_id[]' value='".$row["gazetteer_element.f_id"]."' readonly></td>";
- echo "<td>".$row["wfs_element.element_name"]."</td>";
- echo "<td>".$row["wfs_element.element_type"]."</td>";
- echo "<td><input name='f_search[]' type='checkbox'";
- if($row["gazetteer_element.f_search"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_pos[]' type='text' size='2' value='".$row["gazetteer_element.f_pos"]."'></td>";
- echo "<td><input name='f_style_id[]' type='text' size='2' value='".$row["gazetteer_element.f_style_id"]."'></td>";
- echo "<td><input name='f_label[]' type='text' size='10' value='".$row["gazetteer_element.f_label"]."'></td>";
- echo "<td><input name='f_label_id[]' type='text' size='2' value='".$row["gazetteer_element.f_label_id"]."'></td>";
- echo "<td><input name='f_show[]' type='checkbox'";
- if($row["gazetteer_element.f_show"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_respos[]' type='text' size='4' value='".$row["gazetteer_element.f_respos"]."'></td>";
- echo "</tr>";
- $cnt++;
- }
- echo "</table>";
- echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
Copied: branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php (from rev 2138, branches/2.4.5/http/php/mod_gazLayerObj_edit.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazLayerObj_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,166 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Gazetteer</title>
+<script language="JavaScript" type="text/javascript">
+ function validate(){
+ for(var i=0; i<document.forms[0].length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked){
+ document.forms[0].elements[i].value = 1;
+ }
+ else{
+ document.forms[0].elements[i].value = 0;
+ }
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ return true;
+ }
+</script>
+
+</head>
+<body>
+Gazetteer Configuration<br>
+<form method='POST' onsubmit='return validate()'>
+
+<?php
+/* save gazetteer properties */
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+if(isset($_REQUEST["save"])){
+
+ $sql = "UPDATE gazetteer SET ";
+ $sql .= "gazetteer_abstract = $1, ";
+ $sql .= "g_label = $2, ";
+ $sql .= "g_label_id = $3, ";
+ $sql .= "g_button = $4, ";
+ $sql .= "g_button_id = $5, ";
+ $sql .= "g_style = $6, ";
+ $sql .= "g_buffer = $7 ";
+ $sql .= "WHERE gazetteer_id = $8;";
+
+ $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["fkey_gazetteer_id"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i");
+ $res = db_prep_query($sql, $v, $t);
+
+ for ($i = 0; $i < count($_REQUEST["f_id"]); $i++){
+ $sql = "UPDATE gazetteer_element SET ";
+ $sql .= "f_search = $1, ";
+ $sql .= "f_pos = $2, ";
+ $sql .= "f_style_id = $3, ";
+ $sql .= "f_label = $4, ";
+ $sql .= "f_label_id = $5, ";
+ $sql .= "f_show = $6, ";
+ $sql .= "f_respos = $7 ";
+ $sql .= "WHERE fkey_gazetteer_id = $8 AND f_id = $9;";
+
+ $v = array($_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i], $_REQUEST["fkey_gazetteer_id"], $_REQUEST["f_id"][$i]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i", "i");
+
+ $res = db_prep_query($sql, $v, $t);
+ }
+}
+
+/* end save gazetteer properties */
+
+/* select wfs */
+
+
+
+/* end select wfs */
+
+
+
+/* configure elements */
+if(isset($_REQUEST["fkey_gazetteer_id"])){
+ $sql = "SELECT * FROM gazetteer WHERE gazetteer_id = $1";
+ $v = array($_REQUEST["fkey_gazetteer_id"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+ if($row = db_fetch_array($res)){
+ echo "<table>";
+ echo "<tr><td>ID:</td><td>".$row["gazetteer_id"]."</td></tr>" ;
+ echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract' value='".$row["gazetteer_abstract"]."'></td></tr>" ;
+ echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
+ echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
+ echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
+ echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
+ echo "<tr><td>Style:</td><td><textarea cols=30 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
+ echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
+ echo "</table>";
+ }
+
+ /* set element options */
+ $sql = "SELECT * FROM gazetteer_element ";
+ $sql .= "JOIN wfs_element ON gazetteer_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE fkey_gazetteer_id = $1";
+ $v = array($_REQUEST["fkey_gazetteer_id"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ echo "<table border='1'>";
+ echo "<tr>";
+ echo "<td>ID</td>";
+ echo "<td>name</td>";
+ echo "<td>type</td>";
+ echo "<td>search</td>";
+ echo "<td>pos</td>";
+ echo "<td>style_id</td>";
+ echo "<td>label</td>";
+ echo "<td>label_id</td>";
+ echo "<td>show</td>";
+ echo "<td>position</td>";
+ echo "</tr>";
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<tr>";
+ echo "<td><input type='text' size='4' name='f_id[]' value='".$row["gazetteer_element.f_id"]."' readonly></td>";
+ echo "<td>".$row["wfs_element.element_name"]."</td>";
+ echo "<td>".$row["wfs_element.element_type"]."</td>";
+ echo "<td><input name='f_search[]' type='checkbox'";
+ if($row["gazetteer_element.f_search"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_pos[]' type='text' size='2' value='".$row["gazetteer_element.f_pos"]."'></td>";
+ echo "<td><input name='f_style_id[]' type='text' size='2' value='".$row["gazetteer_element.f_style_id"]."'></td>";
+ echo "<td><input name='f_label[]' type='text' size='10' value='".$row["gazetteer_element.f_label"]."'></td>";
+ echo "<td><input name='f_label_id[]' type='text' size='2' value='".$row["gazetteer_element.f_label_id"]."'></td>";
+ echo "<td><input name='f_show[]' type='checkbox'";
+ if($row["gazetteer_element.f_show"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_respos[]' type='text' size='4' value='".$row["gazetteer_element.f_respos"]."'></td>";
+ echo "</tr>";
+ $cnt++;
+ }
+ echo "</table>";
+ echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
Deleted: branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteerMetadata.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,245 +0,0 @@
-<?php
-# $Id:$
-# http://www.mapbender.org/index.php/gazetteerMetadata
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-$user_id = $_SESSION["mb_user_id"];
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta name="author" content="V. Diewald">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
-<meta name="DC.Rights" content="WhereGroup GmbH & Co.KG, Bonn">
-<title>Metadata search</title>
-<?
-$e_id_css = 'poi';
-include_once("../include/dyn_css.php");
-?>
-<style type="text/css">
-<!--
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- }
-
- a:link{
- font-family : Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- font-weight : normal;
- }
- a:visited{
- font-family : Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- font-weight : normal;
- }
- a:hover{
- font-family : Arial, Helvetica, sans-serif;
- color: #808080;
- text-decoration : none;
- font-weight : normal;
- }
- a:active{
- font-family : Arial, Helvetica, sans-serif;
- color: #808080;
- text-decoration : none;
- font-weight : normal;
- }
-
- .textfield{
- border : 2 solid #D3D3D3;
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : normal;
- color: #000000;
- width: 120px;
- }
-
- .result{
- position: absolute;
- top: 40px;
- left: 0px;
- }
--->
-</style>
-<script type="text/javascript">
-<!--
-
-function validate(){
-
- if(document.form1.search.value.length < 1){
- alert("Please insert a keyword!");
- document.form1.search.focus();
- return false;
- }
- else{
- document.getElementById("resultDivTag").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
- parent.mb_ajax_json("mod_gazetteerMetadata_search.php", {"search":document.form1.search.value}, function(jsonObj, status){
- document.getElementById("resultDivTag").innerHTML = displayTable(jsonObj);
- });
- return false;
- }
-}
-
-function displayTable(obj) {
- var text = "<table>";
- for (var attr in obj) {
- var resultObj = obj[attr];
- if (typeof(resultObj) != 'function') {
- text += "<tr><td valign='top'>";
- if (typeof(resultObj.layer_name) !== "undefined") {
- text += "<a href='#' onClick='mod_addWMSLayerfromfilteredList(\""+resultObj.wms_getcapabilities+"\",\""+resultObj.wms_version+"\", \""+resultObj.layer_name+"\");'>";
- text += "<img name='add_wms' src='../img/button_gray/metadata_layer.gif' border='0' title='Load'></a>";
- text += "</td><td>";
- text += "<a href='#' ";
- text += "onClick='javascript:window.open(\"mod_layerMetadata.php?id="+resultObj.layer_id+"\", \"metadata\", \"width=450, height=600\");' title='Info'>";
- text += resultObj.title+"</a>";
- }
- else {
- text += "<a href='#' onClick='mod_addWMSfromfilteredList(\""+resultObj.wms_getcapabilities+"\",\""+resultObj.wms_version+"\")'>";
- text += "<img name='add_wms' src='../img/button_gray/metadata_wms.gif' border='0' title='Load'></a>";
- text += "</td><td>";
- text += "<a href='#' onClick='javascript:window.open(\"mod_layerMetadata.php?id="+resultObj.layer_id+"\", \"metadata\", \"width=450, height=600\");' title='Info'>";
- text += resultObj.title+"</a>"
- }
- text += "</td></tr>";
- }
- }
- text += "</table>";
- return text;
-}
-
-
-function handleLayer(sel_lay, wms_title){
-
- //var wms_title = document.forms[0].wmsTitle.value
-
- var x = new Array();
-
- x[0] = sel_lay;
-
- var y = new Array();
-
- if (backlink =='parent'){
- var wms_ID = parent.parent.getWMSIDByTitle('mapframe1',wms_title);
- }
- else{
- var wms_ID = parent.getWMSIDByTitle('mapframe1',wms_title);
- }
-
- y[0] = wms_ID;
-
- //alert(wms_title + " -- X "+ x + "wms_id" + wms_ID);
-
- if (backlink =='parent'){
- parent.parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
- parent.parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
- }
- else{
- parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
- parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
- }
-
-}
-
-function mod_addWMSfromfilteredList(pointer_name,version){
-
- pointer_name=pointer_name + parent.parent.mb_getConjunctionCharacter(pointer_name);
- if (version == '1.0.0'){
- var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
- var load = cap;
- }
- else if (version == '1.1.0'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
- var load = cap;
- }
- else if (version == '1.1.1'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
- var load = cap;
- }
- //alert (load);
-
- if(load){
- if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
- parent.parent.mod_addWMS_load('http://localhost' + load);
- }
- else{
- parent.parent.mod_addWMS_load(load);
- }
- }
-}
-
-function mod_addWMSLayerfromfilteredList(pointer_name,version,layer_name){
-
- pointer_name=pointer_name + parent.parent.mb_getConjunctionCharacter(pointer_name);
- if (version == '1.0.0'){
- var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
- var load = cap;
- var layer_name = layer_name;
- }
- else if (version == '1.1.0'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
- var load = cap;
- var layer_name = layer_name;
- }
- else if (version == '1.1.1'){
- var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
- var load = cap;
- var layer_name = layer_name;
- }
- //alert (load);
-
- if(load){
- if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
- parent.parent.mod_addLayer_load('http://localhost' + load, layer_name);
- }
- else{
- parent.parent.mod_addLayer_load(load, layer_name);
- }
- }
-}
-// -->
-</script>
-</head>
-<body leftmargin="2" topmargin="0" bgcolor="#ffffff">
-<form name='form1' target='result' onsubmit='return validate();'>
-<p>
-<input class='textfield' name='search' type='text' style='width:110px'>
-<img src="../img/add.png" title="keywords" onclick="window.open('mod_SelectKeyword.php', toolbar='no', status='no');">
-<input type='submit' name='send' value='ok'>
-</p>
-</form>
-<div id='resultDivTag' class='result'></div>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php (from rev 2138, branches/2.4.5/http/php/mod_gazetteerMetadata.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerMetadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,246 @@
+<?php
+# $Id:$
+# http://www.mapbender.org/index.php/gazetteerMetadata
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$gui_id = $_SESSION["mb_user_gui"];
+$user_id = $_SESSION["mb_user_id"];
+
+$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="author" content="V. Diewald">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
+<meta name="DC.Rights" content="WhereGroup GmbH & Co.KG, Bonn">
+<title>Metadata search</title>
+<?
+$e_id_css = 'poi';
+include_once("../include/dyn_css.php");
+?>
+<style type="text/css">
+<!--
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ }
+
+ a:link{
+ font-family : Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ font-weight : normal;
+ }
+ a:visited{
+ font-family : Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ font-weight : normal;
+ }
+ a:hover{
+ font-family : Arial, Helvetica, sans-serif;
+ color: #808080;
+ text-decoration : none;
+ font-weight : normal;
+ }
+ a:active{
+ font-family : Arial, Helvetica, sans-serif;
+ color: #808080;
+ text-decoration : none;
+ font-weight : normal;
+ }
+
+ .textfield{
+ border : 2 solid #D3D3D3;
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : normal;
+ color: #000000;
+ width: 120px;
+ }
+
+ .result{
+ position: absolute;
+ top: 40px;
+ left: 0px;
+ }
+-->
+</style>
+<script type="text/javascript">
+<!--
+
+function validate(){
+
+ if(document.form1.search.value.length < 1){
+ alert("Please insert a keyword!");
+ document.form1.search.focus();
+ return false;
+ }
+ else{
+ document.getElementById("resultDivTag").innerHTML = "<table><tr><td><img src='../img/indicator_wheel.gif'></td><td>Searching...</td></tr></table>";
+ parent.mb_ajax_json("mod_gazetteerMetadata_search.php", {"search":document.form1.search.value}, function(jsonObj, status){
+ document.getElementById("resultDivTag").innerHTML = displayTable(jsonObj);
+ });
+ return false;
+ }
+}
+
+function displayTable(obj) {
+ var text = "<table>";
+ for (var attr in obj) {
+ var resultObj = obj[attr];
+ if (typeof(resultObj) != 'function') {
+ text += "<tr><td valign='top'>";
+ if (typeof(resultObj.layer_name) !== "undefined") {
+ text += "<a href='#' onClick='mod_addWMSLayerfromfilteredList(\""+resultObj.wms_getcapabilities+"\",\""+resultObj.wms_version+"\", \""+resultObj.layer_name+"\");'>";
+ text += "<img name='add_wms' src='../img/button_gray/metadata_layer.gif' border='0' title='Load'></a>";
+ text += "</td><td>";
+ text += "<a href='#' ";
+ text += "onClick='javascript:window.open(\"mod_layerMetadata.php?id="+resultObj.layer_id+"\", \"metadata\", \"width=450, height=600\");' title='Info'>";
+ text += resultObj.title+"</a>";
+ }
+ else {
+ text += "<a href='#' onClick='mod_addWMSfromfilteredList(\""+resultObj.wms_getcapabilities+"\",\""+resultObj.wms_version+"\")'>";
+ text += "<img name='add_wms' src='../img/button_gray/metadata_wms.gif' border='0' title='Load'></a>";
+ text += "</td><td>";
+ text += "<a href='#' onClick='javascript:window.open(\"mod_layerMetadata.php?id="+resultObj.layer_id+"\", \"metadata\", \"width=450, height=600\");' title='Info'>";
+ text += resultObj.title+"</a>"
+ }
+ text += "</td></tr>";
+ }
+ }
+ text += "</table>";
+ return text;
+}
+
+
+function handleLayer(sel_lay, wms_title){
+
+ //var wms_title = document.forms[0].wmsTitle.value
+
+ var x = new Array();
+
+ x[0] = sel_lay;
+
+ var y = new Array();
+
+ if (backlink =='parent'){
+ var wms_ID = parent.parent.getWMSIDByTitle('mapframe1',wms_title);
+ }
+ else{
+ var wms_ID = parent.getWMSIDByTitle('mapframe1',wms_title);
+ }
+
+ y[0] = wms_ID;
+
+ //alert(wms_title + " -- X "+ x + "wms_id" + wms_ID);
+
+ if (backlink =='parent'){
+ parent.parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
+ parent.parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
+ }
+ else{
+ parent.handleSelectedLayer_array('mapframe1',y,x,'querylayer',1);
+ parent.handleSelectedLayer_array('mapframe1',y,x,'visible',1);
+ }
+
+}
+
+function mod_addWMSfromfilteredList(pointer_name,version){
+
+ pointer_name=pointer_name + parent.parent.mb_getConjunctionCharacter(pointer_name);
+ if (version == '1.0.0'){
+ var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
+ var load = cap;
+ }
+ else if (version == '1.1.0'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
+ var load = cap;
+ }
+ else if (version == '1.1.1'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+ var load = cap;
+ }
+ //alert (load);
+
+ if(load){
+ if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
+ parent.parent.mod_addWMS_load('http://localhost' + load);
+ }
+ else{
+ parent.parent.mod_addWMS_load(load);
+ }
+ }
+}
+
+function mod_addWMSLayerfromfilteredList(pointer_name,version,layer_name){
+
+ pointer_name=pointer_name + parent.parent.mb_getConjunctionCharacter(pointer_name);
+ if (version == '1.0.0'){
+ var cap = pointer_name + "REQUEST=capabilities&WMTVER=1.0.0";
+ var load = cap;
+ var layer_name = layer_name;
+ }
+ else if (version == '1.1.0'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0";
+ var load = cap;
+ var layer_name = layer_name;
+ }
+ else if (version == '1.1.1'){
+ var cap = pointer_name + "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1";
+ var load = cap;
+ var layer_name = layer_name;
+ }
+ //alert (load);
+
+ if(load){
+ if(load.charAt(0) == '/' && load.charAt(1) == 'c'){
+ parent.parent.mod_addLayer_load('http://localhost' + load, layer_name);
+ }
+ else{
+ parent.parent.mod_addLayer_load(load, layer_name);
+ }
+ }
+}
+// -->
+</script>
+</head>
+<body leftmargin="2" topmargin="0" bgcolor="#ffffff">
+<form name='form1' target='result' onsubmit='return validate();'>
+<p>
+<input class='textfield' name='search' type='text' style='width:110px'>
+<img src="../img/add.png" title="keywords" onclick="window.open('mod_SelectKeyword.php?<?php echo $sParams;?>', toolbar='no', status='no');">
+<input type='submit' name='send' value='ok'>
+</p>
+</form>
+<div id='resultDivTag' class='result'></div>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteerMetadata_search.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,77 +0,0 @@
-<?php
-session_start();
-
-$user_id = $_SESSION["mb_user_id"];
-$query = $_REQUEST["search"];
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../extensions/JSON.php");
-
-$n = new administration();
-$myguis = $n->getGuisByPermission($user_id, true);
-$mywms = $n->getWmsByOwnGuis($myguis);
-
-if($mywms == false){
- $mywms = array();
-}
-$mylayer = array();
-
-for($i = 0; $i < count($mywms); $i++){
- $mylayer = array_merge($mylayer,$n->getLayerByWms($mywms[$i]));
-}
-
-$res_container_wms = array();
-$res_container_layer = array();
-$obj = array();
-
-if(preg_match("/\*/",$_REQUEST["search"])){
- $search = trim(preg_replace("/\*/i","", $_REQUEST["search"]));
-}
-
-if (count($mywms) > 0) {
- $v = array();
- $t = array();
-
- $sql_wms = "SELECT layer.layer_id, wms.wms_title, wms.wms_getcapabilities, wms.wms_version ";
- $sql_wms .= "FROM wms LEFT JOIN layer ON wms.wms_id = layer.fkey_wms_id ";
- $sql_wms .= "WHERE layer.layer_pos = 0 AND wms.wms_id IN (";
- for($i=0; $i<count($mywms); $i++){
- if ($i > 0) {$sql_wms .= ",";}
- $sql_wms .= "$".($i+1);
- array_push($v, $mywms[$i]);
- array_push($t, 'i');
- }
- $sql_wms .= ") AND (wms_title ILIKE '%".$query."%' OR wms_abstract ILIKE '%".$query."%') ORDER BY wms_title";
- $res_wms = db_prep_query($sql_wms,$v,$t);
-
- while ($row = db_fetch_array($res_wms)) {
- array_push($obj, array('wms_getcapabilities' => $row['wms_getcapabilities'], 'wms_version' => $row['wms_version'], 'layer_id' => $row['layer_id'], 'title' => $row['wms_title']));
- }
-}
-
-if (count($mylayer) > 0) {
- $v = array();
- $t = array();
- $sql_layer = "SELECT l.layer_id, l.fkey_wms_id, l.layer_title, l.layer_name ,";
- $sql_layer .= "w.wms_getcapabilities, w.wms_version ";
- $sql_layer .= "FROM layer l LEFT JOIN layer_keyword lkw LEFT JOIN keyword kw ON kw.keyword_id = lkw.fkey_keyword_id ";
- $sql_layer .= "ON l.layer_id = lkw.fkey_layer_id LEFT JOIN wms w ON l.fkey_wms_id = w.wms_id WHERE l.layer_id IN (";
- for($i = 0; $i < count($mylayer); $i++){
- if ($i > 0) {$sql_layer .= ",";}
- $sql_layer .= "$".($i+1);
- array_push($v, $mylayer[$i]);
- array_push($t, 'i');
- }
- $sql_layer .= ") AND (layer_title ILIKE '%".$query."%' OR layer_name ILIKE '%".$query."%' OR layer_abstract ILIKE '%".$query."%' OR kw.keyword ILIKE '%".$query."%') ";
- $sql_layer .= "ORDER BY l.layer_title;";
- $res_layer = db_prep_query($sql_layer,$v,$t);
-
- while ($row = db_fetch_array($res_layer)) {
- array_push($obj, array('wms_getcapabilities' => $row['wms_getcapabilities'], 'wms_version' => $row['wms_version'], 'layer_name' => $row['layer_name'], 'layer_id' => $row['layer_id'], 'title' => $row['layer_title']));
- }
-}
-$json = new Services_JSON();
-$output = $json->encode($obj);
-echo $output;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php (from rev 2138, branches/2.4.5/http/php/mod_gazetteerMetadata_search.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerMetadata_search.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,75 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../extensions/JSON.php");
+
+$user_id = $_SESSION["mb_user_id"];
+$query = $_REQUEST["search"];
+
+$n = new administration();
+$myguis = $n->getGuisByPermission($user_id, true);
+$mywms = $n->getWmsByOwnGuis($myguis);
+
+if($mywms == false){
+ $mywms = array();
+}
+$mylayer = array();
+
+for($i = 0; $i < count($mywms); $i++){
+ $mylayer = array_merge($mylayer,$n->getLayerByWms($mywms[$i]));
+}
+
+$res_container_wms = array();
+$res_container_layer = array();
+$obj = array();
+
+if(preg_match("/\*/",$_REQUEST["search"])){
+ $search = trim(preg_replace("/\*/i","", $_REQUEST["search"]));
+}
+
+if (count($mywms) > 0) {
+ $v = array();
+ $t = array();
+
+ $sql_wms = "SELECT layer.layer_id, wms.wms_title, wms.wms_getcapabilities, wms.wms_version ";
+ $sql_wms .= "FROM wms LEFT JOIN layer ON wms.wms_id = layer.fkey_wms_id ";
+ $sql_wms .= "WHERE layer.layer_pos = 0 AND wms.wms_id IN (";
+ for($i=0; $i<count($mywms); $i++){
+ if ($i > 0) {$sql_wms .= ",";}
+ $sql_wms .= "$".($i+1);
+ array_push($v, $mywms[$i]);
+ array_push($t, 'i');
+ }
+ $sql_wms .= ") AND (wms_title ILIKE '%".$query."%' OR wms_abstract ILIKE '%".$query."%') ORDER BY wms_title";
+ $res_wms = db_prep_query($sql_wms,$v,$t);
+
+ while ($row = db_fetch_array($res_wms)) {
+ array_push($obj, array('wms_getcapabilities' => $row['wms_getcapabilities'], 'wms_version' => $row['wms_version'], 'layer_id' => $row['layer_id'], 'title' => $row['wms_title']));
+ }
+}
+
+if (count($mylayer) > 0) {
+ $v = array();
+ $t = array();
+ $sql_layer = "SELECT l.layer_id, l.fkey_wms_id, l.layer_title, l.layer_name ,";
+ $sql_layer .= "w.wms_getcapabilities, w.wms_version ";
+ $sql_layer .= "FROM layer l LEFT JOIN layer_keyword lkw LEFT JOIN keyword kw ON kw.keyword_id = lkw.fkey_keyword_id ";
+ $sql_layer .= "ON l.layer_id = lkw.fkey_layer_id LEFT JOIN wms w ON l.fkey_wms_id = w.wms_id WHERE l.layer_id IN (";
+ for($i = 0; $i < count($mylayer); $i++){
+ if ($i > 0) {$sql_layer .= ",";}
+ $sql_layer .= "$".($i+1);
+ array_push($v, $mylayer[$i]);
+ array_push($t, 'i');
+ }
+ $sql_layer .= ") AND (layer_title ILIKE '%".$query."%' OR layer_name ILIKE '%".$query."%' OR layer_abstract ILIKE '%".$query."%' OR kw.keyword ILIKE '%".$query."%') ";
+ $sql_layer .= "ORDER BY l.layer_title;";
+ $res_layer = db_prep_query($sql_layer,$v,$t);
+
+ while ($row = db_fetch_array($res_layer)) {
+ array_push($obj, array('wms_getcapabilities' => $row['wms_getcapabilities'], 'wms_version' => $row['wms_version'], 'layer_name' => $row['layer_name'], 'layer_id' => $row['layer_id'], 'title' => $row['layer_title']));
+ }
+}
+$json = new Services_JSON();
+$output = $json->encode($obj);
+echo $output;
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteerSQL_server.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,202 +0,0 @@
-<?php
-session_start();
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../extensions/JSON.php");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../../conf/gazetteerSQL.conf");
-
-$con = pg_connect($connstring);
-
-$command = $_GET["command"];
-$communeId = $_GET["communeId"];
-$streetName = $_GET["streetName"];
-$districtId = $_GET["districtId"];
-$parcelNumber1 = $_GET["parcelNumber1"];
-$parcelNumber2 = $_GET["parcelNumber2"];
-$ownerQueryString = $_GET["ownerQueryString"];
-$numberOfResults = $_GET["numberOfResults"];
-
-if (isLimited($numberOfResults)) {
- $limit = $numberOfResults + 1;
-}
-else {
- $limit = 0;
-}
-
-$obj = array();
-
-function isLimited($numberOfResults) {
- if (isset($numberOfResults) && $numberOfResults > 0) {
- return true;
- }
- return false;
-}
-
-function isUnderLimit($counter, $numberOfResults, $max) {
- return (!isLimited($numberOfResults) || $counter <= $max);
-}
-
-function isOverLimit($counter, $numberOfResults, $max) {
- return (isLimited($numberOfResults) && $counter > $max);
-}
-
-if ($command == "getCommunes") {
- $obj["communes"] = array();
-
- $sql = "SELECT DISTINCT gkz, name FROM public.gemeinden ORDER BY name";
- $v = array();
- $t = array();
- $res = db_prep_query($sql, $v, $t);
- while($row = db_fetch_array($res)){
- $communeId = trim($row["gkz"]);
- $communeName = trim($row["name"]);
- $obj["communes"][$communeId] = $communeName;
- }
- $obj["limited"] = false;
-}
-else if ($command == "getStreets") {
- $obj["streets"] = array();
-
- if (!empty($communeId)) {
- $sql = "SELECT DISTINCT strk_schl, str_name FROM alb.navigation WHERE gkz = $1 ORDER BY str_name";
- $v = array($communeId);
- $t = array("i");
- }
- else {
- $sql = "SELECT DISTINCT strk_schl, str_name FROM alb.navigation ORDER BY str_name";
- $v = array();
- $t = array();
- }
- $res = db_prep_query($sql, $v, $t);
- while($row = db_fetch_array($res)){
- $streetId = trim($row["strk_schl"]);
- $streetName = trim($row["str_name"]);
- $obj["streets"][$streetId] = $streetName;
- }
- $obj["limited"] = false;
-}
-else if ($command == "getNumbers") {
- $obj["houseNumbers"] = array();
- $paramCounter = 0;
-
- if (!empty($communeId)) {
- $sql = "SELECT DISTINCT hnr, hnrzu, rw, hw FROM alb.navigation WHERE gkz = $". ++$paramCount ." AND str_name ILIKE $". ++$paramCount ." ORDER BY hnr, hnrzu";
- $v = array($communeId, $streetName."%");
- $t = array("i", "s");
- }
- else {
- $sql = "SELECT DISTINCT hnr, hnrzu, rw, hw FROM alb.navigation WHERE str_name ILIKE $". ++$paramCount ." ORDER BY hnr, hnrzu";
- $v = array($streetName."%");
- $t = array("s");
- }
-
- if (isLimited($numberOfResults)) {
- $sql .= " LIMIT $". ++$paramCount;
- array_push($v, $limit);
- array_push($t, "i");
- }
-
- $res = db_prep_query($sql, $v, $t);
-
- $counter = 0;
- while($row = db_fetch_array($res)){
- $counter++;
- if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
- $houseNumber = trim($row["hnr"] . $row["hnrzu"]);
- $x = trim(floatval($row["rw"]));
- $y = trim(floatval($row["hw"]));
- $obj["houseNumbers"][$houseNumber] = array("x" => $x, "y" => $y);
- }
- }
- $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
-}
-else if ($command == "getLandparcelsByOwner") {
- $obj["landparcels"] = array();
-
- $sql = "SELECT DISTINCT eig.e_name, flst.flst_kennz, flst.rechtsw, flst.hochw FROM alb.albflst AS flst JOIN alb.albeig AS eig ON (flst.gemschl = eig.gemschl AND flst.flur = eig.flur AND flst.flstz = eig.flstz AND flst.flstn = eig.flstn) JOIN public.gemarkungen AS gem ON (flst.gemschl = gem.gemschl) WHERE gem.gkz = $1 AND eig.e_name ILIKE $2 ORDER BY flst.flst_kennz";
- $v = array($communeId, "%".$ownerQueryString."%");
- $t = array("i", "s");
-
- if (isLimited($numberOfResults)) {
- $sql .= " LIMIT $3";
- array_push($v, $limit);
- array_push($t, "i");
- }
- $res = db_prep_query($sql, $v, $t);
-
- $counter = 0;
- while($row = db_fetch_array($res)){
- $counter++;
- if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
- $landparcelId = $row["flst_kennz"];
- $x = trim(floatval($row["rechtsw"]));
- $y = trim(floatval($row["hochw"]));
- $owner = trim($row["e_name"]);
- array_push($obj["landparcels"], array("landparcelId" => $landparcelId, "owner" => $owner, "x" => $x, "y" => $y));
- }
- }
- $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
-}
-else if ($command == "getLandparcelsByDistrict") {
- $obj["landparcels"] = array();
- $paramCounter = 0;
-
- $sql = "SELECT DISTINCT flst_kennz, rechtsw, hochw FROM alb.albflst WHERE gemschl = $" . ++$paramCounter;
- $v = array($districtId);
- $t = array("i");
- if (!empty($parcelNumber1)) {
- $sql .= " AND flur = $" . ++$paramCounter;
- array_push($v, $parcelNumber1);
- array_push($t, "i");
- }
- if (!empty($parcelNumber2)) {
- $sql .= " AND flstz = $" . ++$paramCounter;
- array_push($v, $parcelNumber2);
- array_push($t, "i");
- }
- $sql .= " ORDER BY flst_kennz";
- if (isLimited($numberOfResults)) {
- $sql .= " LIMIT $" . ++$paramCounter;
- array_push($v, $limit);
- array_push($t, "i");
- }
- $res = db_prep_query($sql, $v, $t);
-
- $counter = 0;
- while($row = db_fetch_array($res)){
- $counter++;
- if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
- $landparcelId = $row["flst_kennz"];
- $x = trim(floatval($row["rechtsw"]));
- $y = trim(floatval($row["hochw"]));
-
- $obj["landparcels"][$landparcelId] = array("x" => $x, "y" => $y);
- }
- }
- $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
-}
-else if ($command == "getDistricts") {
- $obj["districts"] = array();
-
- $sql = "SELECT DISTINCT gemschl, name FROM public.gemarkungen WHERE gkz = $1 ORDER BY name";
- $v = array($communeId);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- while($row = db_fetch_array($res)){
- $districtID = trim($row["gemschl"]);
- $districtName = trim($row["name"]);
- $obj["districts"][$districtID] = $districtName;
- }
- $obj["limited"] = false;
-}
-else {
- // unknown command
- $e = new mb_exception("unknown command: " . $command);
-}
-
-$json = new Services_JSON();
-$output = $json->encode($obj);
-echo $output;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php (from rev 2138, branches/2.4.5/http/php/mod_gazetteerSQL_server.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazetteerSQL_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,200 @@
+<?php
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../extensions/JSON.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../../conf/gazetteerSQL.conf");
+
+$con = pg_connect($connstring);
+
+$command = $_GET["command"];
+$communeId = $_GET["communeId"];
+$streetName = $_GET["streetName"];
+$districtId = $_GET["districtId"];
+$parcelNumber1 = $_GET["parcelNumber1"];
+$parcelNumber2 = $_GET["parcelNumber2"];
+$ownerQueryString = $_GET["ownerQueryString"];
+$numberOfResults = $_GET["numberOfResults"];
+
+if (isLimited($numberOfResults)) {
+ $limit = $numberOfResults + 1;
+}
+else {
+ $limit = 0;
+}
+
+$obj = array();
+
+function isLimited($numberOfResults) {
+ if (isset($numberOfResults) && $numberOfResults > 0) {
+ return true;
+ }
+ return false;
+}
+
+function isUnderLimit($counter, $numberOfResults, $max) {
+ return (!isLimited($numberOfResults) || $counter <= $max);
+}
+
+function isOverLimit($counter, $numberOfResults, $max) {
+ return (isLimited($numberOfResults) && $counter > $max);
+}
+
+if ($command == "getCommunes") {
+ $obj["communes"] = array();
+
+ $sql = "SELECT DISTINCT gkz, name FROM public.gemeinden ORDER BY name";
+ $v = array();
+ $t = array();
+ $res = db_prep_query($sql, $v, $t);
+ while($row = db_fetch_array($res)){
+ $communeId = trim($row["gkz"]);
+ $communeName = trim($row["name"]);
+ $obj["communes"][$communeId] = $communeName;
+ }
+ $obj["limited"] = false;
+}
+else if ($command == "getStreets") {
+ $obj["streets"] = array();
+
+ if (!empty($communeId)) {
+ $sql = "SELECT DISTINCT strk_schl, str_name FROM alb.navigation WHERE gkz = $1 ORDER BY str_name";
+ $v = array($communeId);
+ $t = array("i");
+ }
+ else {
+ $sql = "SELECT DISTINCT strk_schl, str_name FROM alb.navigation ORDER BY str_name";
+ $v = array();
+ $t = array();
+ }
+ $res = db_prep_query($sql, $v, $t);
+ while($row = db_fetch_array($res)){
+ $streetId = trim($row["strk_schl"]);
+ $streetName = trim($row["str_name"]);
+ $obj["streets"][$streetId] = $streetName;
+ }
+ $obj["limited"] = false;
+}
+else if ($command == "getNumbers") {
+ $obj["houseNumbers"] = array();
+ $paramCounter = 0;
+
+ if (!empty($communeId)) {
+ $sql = "SELECT DISTINCT hnr, hnrzu, rw, hw FROM alb.navigation WHERE gkz = $". ++$paramCount ." AND str_name ILIKE $". ++$paramCount ." ORDER BY hnr, hnrzu";
+ $v = array($communeId, $streetName."%");
+ $t = array("i", "s");
+ }
+ else {
+ $sql = "SELECT DISTINCT hnr, hnrzu, rw, hw FROM alb.navigation WHERE str_name ILIKE $". ++$paramCount ." ORDER BY hnr, hnrzu";
+ $v = array($streetName."%");
+ $t = array("s");
+ }
+
+ if (isLimited($numberOfResults)) {
+ $sql .= " LIMIT $". ++$paramCount;
+ array_push($v, $limit);
+ array_push($t, "i");
+ }
+
+ $res = db_prep_query($sql, $v, $t);
+
+ $counter = 0;
+ while($row = db_fetch_array($res)){
+ $counter++;
+ if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
+ $houseNumber = trim($row["hnr"] . $row["hnrzu"]);
+ $x = trim(floatval($row["rw"]));
+ $y = trim(floatval($row["hw"]));
+ $obj["houseNumbers"][$houseNumber] = array("x" => $x, "y" => $y);
+ }
+ }
+ $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
+}
+else if ($command == "getLandparcelsByOwner") {
+ $obj["landparcels"] = array();
+
+ $sql = "SELECT DISTINCT eig.e_name, flst.flst_kennz, flst.rechtsw, flst.hochw FROM alb.albflst AS flst JOIN alb.albeig AS eig ON (flst.gemschl = eig.gemschl AND flst.flur = eig.flur AND flst.flstz = eig.flstz AND flst.flstn = eig.flstn) JOIN public.gemarkungen AS gem ON (flst.gemschl = gem.gemschl) WHERE gem.gkz = $1 AND eig.e_name ILIKE $2 ORDER BY flst.flst_kennz";
+ $v = array($communeId, "%".$ownerQueryString."%");
+ $t = array("i", "s");
+
+ if (isLimited($numberOfResults)) {
+ $sql .= " LIMIT $3";
+ array_push($v, $limit);
+ array_push($t, "i");
+ }
+ $res = db_prep_query($sql, $v, $t);
+
+ $counter = 0;
+ while($row = db_fetch_array($res)){
+ $counter++;
+ if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
+ $landparcelId = $row["flst_kennz"];
+ $x = trim(floatval($row["rechtsw"]));
+ $y = trim(floatval($row["hochw"]));
+ $owner = trim($row["e_name"]);
+ array_push($obj["landparcels"], array("landparcelId" => $landparcelId, "owner" => $owner, "x" => $x, "y" => $y));
+ }
+ }
+ $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
+}
+else if ($command == "getLandparcelsByDistrict") {
+ $obj["landparcels"] = array();
+ $paramCounter = 0;
+
+ $sql = "SELECT DISTINCT flst_kennz, rechtsw, hochw FROM alb.albflst WHERE gemschl = $" . ++$paramCounter;
+ $v = array($districtId);
+ $t = array("i");
+ if (!empty($parcelNumber1)) {
+ $sql .= " AND flur = $" . ++$paramCounter;
+ array_push($v, $parcelNumber1);
+ array_push($t, "i");
+ }
+ if (!empty($parcelNumber2)) {
+ $sql .= " AND flstz = $" . ++$paramCounter;
+ array_push($v, $parcelNumber2);
+ array_push($t, "i");
+ }
+ $sql .= " ORDER BY flst_kennz";
+ if (isLimited($numberOfResults)) {
+ $sql .= " LIMIT $" . ++$paramCounter;
+ array_push($v, $limit);
+ array_push($t, "i");
+ }
+ $res = db_prep_query($sql, $v, $t);
+
+ $counter = 0;
+ while($row = db_fetch_array($res)){
+ $counter++;
+ if (isUnderLimit($counter, $numberOfResults, $numberOfResults)) {
+ $landparcelId = $row["flst_kennz"];
+ $x = trim(floatval($row["rechtsw"]));
+ $y = trim(floatval($row["hochw"]));
+
+ $obj["landparcels"][$landparcelId] = array("x" => $x, "y" => $y);
+ }
+ }
+ $obj["limited"] = isOverLimit($counter, $numberOfResults, $numberOfResults);
+}
+else if ($command == "getDistricts") {
+ $obj["districts"] = array();
+
+ $sql = "SELECT DISTINCT gemschl, name FROM public.gemarkungen WHERE gkz = $1 ORDER BY name";
+ $v = array($communeId);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ while($row = db_fetch_array($res)){
+ $districtID = trim($row["gemschl"]);
+ $districtName = trim($row["name"]);
+ $obj["districts"][$districtID] = $districtName;
+ }
+ $obj["limited"] = false;
+}
+else {
+ // unknown command
+ $e = new mb_exception("unknown command: " . $command);
+}
+
+$json = new Services_JSON();
+$output = $json->encode($obj);
+echo $output;
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteer_conf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,218 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>gazetteer</title>
-<script language="JavaScript" type="text/javascript">
- function selectWFS(){
- if(document.forms[0].featuretype){
- if(document.forms[0].featuretype.length){
- for(var i=0; i<document.forms[0].featuretype.length;i++){
- document.forms[0].featuretype[i].checked = false;
- }
- }
- else{
- document.forms[0].featuretype.checked = false;
- }
- }
- document.forms[0].submit();
- }
- function validate(){
- for(var i=0; i<document.forms[0].length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked){
- document.forms[0].elements[i].value = 1;
- }
- else{
- document.forms[0].elements[i].value = 0;
- }
- document.forms[0].elements[i].checked = true;
- }
- }
- return true;
- }
-</script>
-
-</head>
-<body>
-Gazetteer Configuration<br>
-<form method='POST' onsubmit='return validate()'>
-<a href="mod_gazetteer_edit.php">edit</a><br>
-<?php
-$aWFS = new wfs_conf();
-$aWFS->getallwfs();
-
-/* save gazetteer properties */
-
-if(isset($_REQUEST["save"])){
- global $DBSERVER,$DB,$OWNER,$PW;
- $con = db_connect($DBSERVER,$OWNER,$PW);
- db_select_db($DB,$con);
-
- $sql = "INSERT INTO gazetteer (gazetteer_abstract, fkey_wfs_id, ";
- $sql .= "fkey_featuretype_id, g_label, g_label_id, g_button, ";
- $sql .= "g_button_id, g_style, g_buffer, g_res_style, g_use_wzgraphics) ";
- $sql .= "VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);";
- $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["wfs"], $_REQUEST["featuretype"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["g_use_wzgraphics"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "i");
- $res = db_prep_query($sql, $v, $t);
- $wfsID = db_insert_id($con);
- for($i=0; $i<count($_REQUEST["f_id"]); $i++){
- $sql = "INSERT INTO gazetteer_element (fkey_gazetteer_id, ";
- $sql .= "f_id, f_search, f_pos, f_style_id, f_toupper, f_label, ";
- $sql .= "f_label_id, f_show, f_respos) VALUES (";
- $sql .= "$1, $2, $3, $4, $5, $6, $7, $8, $9, $10);";
- $v = array($wfsID, $_REQUEST["f_id"][$i], $_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_toupper"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
- $res = db_prep_query($sql, $v, $t);
- }
-}
-
-/* end save gazetteer properties */
-
-/* select wfs */
-
-if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
- unset($_REQUEST["wfs"]);
- unset($_REQUEST["featuretype"]);
-}
-
-echo "<select name='wfs' onchange='selectWFS()'>";
-echo "<option value=''>...</option>";
-for($i=0; $i<count($aWFS->wfs_id);$i++){
- echo "<option value='".$aWFS->wfs_id[$i]."' ";
- if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "selected";
- }
- echo ">".$aWFS->wfs_title[$i]."</option>";
-}
-echo "</select>";
-echo "";
-
-/* end select wfs */
-
-
-/* select featuretype */
-
-if(isset($_REQUEST["wfs"])){
-
- for($i=0; $i<count($aWFS->wfs_id);$i++){
- if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "<table>";
- echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
- echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
- echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
- echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
- echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
- echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
- echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
- echo "</table>";
- }
- }
-
- $aWFS->getfeatures($_REQUEST["wfs"]);
- echo "<table>";
- for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
- echo "<tr>";
- echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
- if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
- echo "checked ";
- }
- echo "/></td>";
- echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
- echo "</tr>";
- }
- echo "</table>";
-}
-
-/* end select featuretype */
-
-/* configure elements */
-if(isset($_REQUEST["featuretype"])){
-
-
- for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
- if($_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
- echo "<hr>SRS: ".$aWFS->features->featuretype_srs[$i];
- }
- }
-
- /* set featuretype options */
- echo "<table>";
- echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract'></td></tr>" ;
- echo "<tr><td>Label:</td><td><input type='text' name='g_label'></td></tr>" ;
- echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id'></td></tr>" ;
- echo "<tr><td>Button:</td><td><input type='text' name='g_button'></td></tr>" ;
- echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id'></td></tr>" ;
- echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'></textarea></td></tr>" ;
- echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer'></td></tr>" ;
- echo "<tr><td>ResultStye:</td><td><textarea cols=50 rows=5 name='g_res_style'></textarea></td></tr>" ;
- echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
- echo "</table>";
-
-
- /* set element options */
- $aWFS->getelements($_REQUEST["featuretype"]);
- echo "<table border='1'>";
- echo "<tr>";
- echo "<td>ID</td>";
- echo "<td>name</td>";
- echo "<td>type</td>";
- echo "<td>search</td>";
- echo "<td>pos</td>";
- echo "<td>style_id</td>";
- echo "<td>to_upper</td>";
- echo "<td>label</td>";
- echo "<td>label_id</td>";
- echo "<td>show</td>";
- echo "<td>position</td>";
- echo "</tr>";
-
- for($i=0; $i<count($aWFS->elements->element_id); $i++){
- echo "<tr>";
- echo "<td>".$aWFS->elements->element_id[$i]."<input type='hidden' name='f_id[]' value='".$aWFS->elements->element_id[$i]."'></td>";
- echo "<td>".$aWFS->elements->element_name[$i]."</td>";
- echo "<td>".$aWFS->elements->element_type[$i]."</td>";
- echo "<td><input name='f_search[]' type='checkbox'></td>";
- echo "<td><input name='f_pos[]' type='text' size='2'></td>";
- echo "<td><input name='f_style_id[]' type='text' size='2'></td>";
- echo "<td><input name='f_toupper[]' type='checkbox'></td>";
- echo "<td><input name='f_label[]' type='text' size='10'></td>";
- echo "<td><input name='f_label_id[]' type='text' size='2'></td>";
- echo "<td><input name='f_show[]' type='checkbox'></td>";
- echo "<td><input name='f_respos[]' type='text' size='4'></td>";
- echo "</tr>";
- }
- echo "</table>";
- echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
Copied: branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php (from rev 2138, branches/2.4.5/http/php/mod_gazetteer_conf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazetteer_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,219 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+
+$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>gazetteer</title>
+<script language="JavaScript" type="text/javascript">
+ function selectWFS(){
+ if(document.forms[0].featuretype){
+ if(document.forms[0].featuretype.length){
+ for(var i=0; i<document.forms[0].featuretype.length;i++){
+ document.forms[0].featuretype[i].checked = false;
+ }
+ }
+ else{
+ document.forms[0].featuretype.checked = false;
+ }
+ }
+ document.forms[0].submit();
+ }
+ function validate(){
+ for(var i=0; i<document.forms[0].length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked){
+ document.forms[0].elements[i].value = 1;
+ }
+ else{
+ document.forms[0].elements[i].value = 0;
+ }
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ return true;
+ }
+</script>
+
+</head>
+<body>
+Gazetteer Configuration<br>
+<form method='POST' onsubmit='return validate()'>
+<a href="mod_gazetteer_edit.php?<?php echo $sParams;?>">edit</a><br>
+<?php
+$aWFS = new wfs_conf();
+$aWFS->getallwfs();
+
+/* save gazetteer properties */
+
+if(isset($_REQUEST["save"])){
+ global $DBSERVER,$DB,$OWNER,$PW;
+ $con = db_connect($DBSERVER,$OWNER,$PW);
+ db_select_db($DB,$con);
+
+ $sql = "INSERT INTO gazetteer (gazetteer_abstract, fkey_wfs_id, ";
+ $sql .= "fkey_featuretype_id, g_label, g_label_id, g_button, ";
+ $sql .= "g_button_id, g_style, g_buffer, g_res_style, g_use_wzgraphics) ";
+ $sql .= "VALUES($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11);";
+ $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["wfs"], $_REQUEST["featuretype"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["g_use_wzgraphics"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s", "i");
+ $res = db_prep_query($sql, $v, $t);
+ $wfsID = db_insert_id($con);
+ for($i=0; $i<count($_REQUEST["f_id"]); $i++){
+ $sql = "INSERT INTO gazetteer_element (fkey_gazetteer_id, ";
+ $sql .= "f_id, f_search, f_pos, f_style_id, f_toupper, f_label, ";
+ $sql .= "f_label_id, f_show, f_respos) VALUES (";
+ $sql .= "$1, $2, $3, $4, $5, $6, $7, $8, $9, $10);";
+ $v = array($wfsID, $_REQUEST["f_id"][$i], $_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_toupper"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ }
+}
+
+/* end save gazetteer properties */
+
+/* select wfs */
+
+if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
+ unset($_REQUEST["wfs"]);
+ unset($_REQUEST["featuretype"]);
+}
+
+echo "<select name='wfs' onchange='selectWFS()'>";
+echo "<option value=''>...</option>";
+for($i=0; $i<count($aWFS->wfs_id);$i++){
+ echo "<option value='".$aWFS->wfs_id[$i]."' ";
+ if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "selected";
+ }
+ echo ">".$aWFS->wfs_title[$i]."</option>";
+}
+echo "</select>";
+echo "";
+
+/* end select wfs */
+
+
+/* select featuretype */
+
+if(isset($_REQUEST["wfs"])){
+
+ for($i=0; $i<count($aWFS->wfs_id);$i++){
+ if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "<table>";
+ echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
+ echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
+ echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
+ echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
+ echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
+ echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
+ echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
+ echo "</table>";
+ }
+ }
+
+ $aWFS->getfeatures($_REQUEST["wfs"]);
+ echo "<table>";
+ for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
+ echo "<tr>";
+ echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
+ if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
+ echo "checked ";
+ }
+ echo "/></td>";
+ echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
+ echo "</tr>";
+ }
+ echo "</table>";
+}
+
+/* end select featuretype */
+
+/* configure elements */
+if(isset($_REQUEST["featuretype"])){
+
+
+ for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
+ if($_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
+ echo "<hr>SRS: ".$aWFS->features->featuretype_srs[$i];
+ }
+ }
+
+ /* set featuretype options */
+ echo "<table>";
+ echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract'></td></tr>" ;
+ echo "<tr><td>Label:</td><td><input type='text' name='g_label'></td></tr>" ;
+ echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id'></td></tr>" ;
+ echo "<tr><td>Button:</td><td><input type='text' name='g_button'></td></tr>" ;
+ echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id'></td></tr>" ;
+ echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'></textarea></td></tr>" ;
+ echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer'></td></tr>" ;
+ echo "<tr><td>ResultStye:</td><td><textarea cols=50 rows=5 name='g_res_style'></textarea></td></tr>" ;
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
+ echo "</table>";
+
+
+ /* set element options */
+ $aWFS->getelements($_REQUEST["featuretype"]);
+ echo "<table border='1'>";
+ echo "<tr>";
+ echo "<td>ID</td>";
+ echo "<td>name</td>";
+ echo "<td>type</td>";
+ echo "<td>search</td>";
+ echo "<td>pos</td>";
+ echo "<td>style_id</td>";
+ echo "<td>to_upper</td>";
+ echo "<td>label</td>";
+ echo "<td>label_id</td>";
+ echo "<td>show</td>";
+ echo "<td>position</td>";
+ echo "</tr>";
+
+ for($i=0; $i<count($aWFS->elements->element_id); $i++){
+ echo "<tr>";
+ echo "<td>".$aWFS->elements->element_id[$i]."<input type='hidden' name='f_id[]' value='".$aWFS->elements->element_id[$i]."'></td>";
+ echo "<td>".$aWFS->elements->element_name[$i]."</td>";
+ echo "<td>".$aWFS->elements->element_type[$i]."</td>";
+ echo "<td><input name='f_search[]' type='checkbox'></td>";
+ echo "<td><input name='f_pos[]' type='text' size='2'></td>";
+ echo "<td><input name='f_style_id[]' type='text' size='2'></td>";
+ echo "<td><input name='f_toupper[]' type='checkbox'></td>";
+ echo "<td><input name='f_label[]' type='text' size='10'></td>";
+ echo "<td><input name='f_label_id[]' type='text' size='2'></td>";
+ echo "<td><input name='f_show[]' type='checkbox'></td>";
+ echo "<td><input name='f_respos[]' type='text' size='4'></td>";
+ echo "</tr>";
+ }
+ echo "</table>";
+ echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
Deleted: branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_gazetteer_edit.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,192 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>gazetteer</title>
-<script language="JavaScript" type="text/javascript">
- function validate(){
- for(var i=0; i<document.forms[0].length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked){
- document.forms[0].elements[i].value = 1;
- }
- else{
- document.forms[0].elements[i].value = 0;
- }
- document.forms[0].elements[i].checked = true;
- }
- }
- return true;
- }
-</script>
-
-</head>
-<body>
-Gazetteer Configuration<br>
-<form method='POST' onsubmit='return validate()'>
-<a href="mod_gazetteer_conf.php">new</a><br>
-
-<?php
-/* save gazetteer properties */
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-
-if(isset($_REQUEST["save"])){
-
- $sql = "UPDATE gazetteer SET ";
- $sql .= "gazetteer_abstract = $1, ";
- $sql .= "g_label = $2, ";
- $sql .= "g_label_id = $3, ";
- $sql .= "g_button = $4, ";
- $sql .= "g_button_id = $5, ";
- $sql .= "g_style = $6, ";
- $sql .= "g_buffer = $7, ";
- $sql .= "g_res_style = $8, ";
- $sql .= "g_use_wzgraphics = $9 ";
- $sql .= "WHERE gazetteer_id = $10;";
- $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["g_use_wzgraphics"], $_REQUEST["gaz"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i");
- $res = db_prep_query($sql, $v, $t);
-
- for($i=0; $i<count($_REQUEST["f_id"]); $i++){
- $sql = "UPDATE gazetteer_element SET ";
- $sql .= "f_search = $1, ";
- $sql .= "f_pos = $2, ";
- $sql .= "f_style_id = $3, ";
- $sql .= "f_toupper = $4, ";
- $sql .= "f_label = $5, ";
- $sql .= "f_label_id = $6, ";
- $sql .= "f_show = $7, ";
- $sql .= "f_respos = $8 ";
- $sql .= "WHERE fkey_gazetteer_id = $9 AND f_id = $10;";
- $v = array($_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_toupper"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i], $_REQUEST["gaz"], $_REQUEST["f_id"][$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i");
- $res = db_prep_query($sql, $v, $t);
- }
-}
-
-/* end save gazetteer properties */
-
-/* select wfs */
-
-$sql = "SELECT * FROM gazetteer";
-$res = db_query($sql);
-echo "<select size='10' name='gaz' onchange='submit()'>";
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo "<option value='".$row["gazetteer_id"]."' ";
- if(isset($_REQUEST["gaz"]) && $row["gazetteer_id"] == $_REQUEST["gaz"]){
- echo "selected";
- }
- echo ">".$row["gazetteer_abstract"]."</option>";
- $cnt++;
-}
-echo "</select>";
-
-
-
-/* end select wfs */
-
-
-
-/* configure elements */
-if(isset($_REQUEST["gaz"])){
- $sql = "SELECT * FROM gazetteer WHERE gazetteer_id = $1";
- $v = array($_REQUEST["gaz"]);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
- if($row = db_fetch_array($res)){
- echo "<table>";
- echo "<tr><td>GazetterID:</td><td>".$row["gazetteer_id"]."</td></tr>" ;
- echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract' value='".$row["gazetteer_abstract"]."'></td></tr>" ;
- echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
- echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
- echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
- echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
- echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
- echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
- echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'>".$row["g_res_style"]."</textarea></td></tr>" ;
- echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
- if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
- echo "></td></tr>";
- echo "</table>";
- }
-
- /* set element options */
- $sql = "SELECT * FROM gazetteer_element ";
- $sql .= "JOIN wfs_element ON gazetteer_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE fkey_gazetteer_id = $1";
- $v = array($_REQUEST["gaz"]);
- $t = array("i");
- echo $sql;
- $res = db_prep_query($sql, $v, $t);
-
- echo "<table border='1'>";
- echo "<tr>";
- echo "<td>ID</td>";
- echo "<td>name</td>";
- echo "<td>type</td>";
- echo "<td>search</td>";
- echo "<td>pos</td>";
- echo "<td>style_id</td>";
- echo "<td>to_upper</td>";
- echo "<td>label</td>";
- echo "<td>label_id</td>";
- echo "<td>show</td>";
- echo "<td>position</td>";
- echo "</tr>";
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<tr>";
- echo "<td><input type='text' size='4' name='f_id[]' value='".$row["f_id"]."' readonly></td>";
- echo "<td>".$row["element_name"]."</td>";
- echo "<td>".$row["element_type"]."</td>";
- echo "<td><input name='f_search[]' type='checkbox'";
- if($row["f_search"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_pos[]' type='text' size='2' value='".$row["f_pos"]."'></td>";
- echo "<td><input name='f_style_id[]' type='text' size='2' value='".$row["f_style_id"]."'></td>";
- echo "<td><input name='f_toupper[]' type='checkbox'";
- if($row["f_toupper"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_label[]' type='text' size='10' value='".$row["f_label"]."'></td>";
- echo "<td><input name='f_label_id[]' type='text' size='2' value='".$row["f_label_id"]."'></td>";
- echo "<td><input name='f_show[]' type='checkbox'";
- if($row["f_show"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_respos[]' type='text' size='4' value='".$row["f_respos"]."'></td>";
- echo "</tr>";
- $cnt++;
- }
- echo "</table>";
- echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
Copied: branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php (from rev 2138, branches/2.4.5/http/php/mod_gazetteer_edit.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gazetteer_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,193 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$sParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>gazetteer</title>
+<script language="JavaScript" type="text/javascript">
+ function validate(){
+ for(var i=0; i<document.forms[0].length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked){
+ document.forms[0].elements[i].value = 1;
+ }
+ else{
+ document.forms[0].elements[i].value = 0;
+ }
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ return true;
+ }
+</script>
+
+</head>
+<body>
+Gazetteer Configuration<br>
+<form method='POST' onsubmit='return validate()'>
+<a href="mod_gazetteer_conf.php?<?php echo $sParams;?>">new</a><br>
+
+<?php
+/* save gazetteer properties */
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db($DB,$con);
+
+if(isset($_REQUEST["save"])){
+
+ $sql = "UPDATE gazetteer SET ";
+ $sql .= "gazetteer_abstract = $1, ";
+ $sql .= "g_label = $2, ";
+ $sql .= "g_label_id = $3, ";
+ $sql .= "g_button = $4, ";
+ $sql .= "g_button_id = $5, ";
+ $sql .= "g_style = $6, ";
+ $sql .= "g_buffer = $7, ";
+ $sql .= "g_res_style = $8, ";
+ $sql .= "g_use_wzgraphics = $9 ";
+ $sql .= "WHERE gazetteer_id = $10;";
+ $v = array($_REQUEST["gazetteer_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["g_use_wzgraphics"], $_REQUEST["gaz"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i");
+ $res = db_prep_query($sql, $v, $t);
+
+ for($i=0; $i<count($_REQUEST["f_id"]); $i++){
+ $sql = "UPDATE gazetteer_element SET ";
+ $sql .= "f_search = $1, ";
+ $sql .= "f_pos = $2, ";
+ $sql .= "f_style_id = $3, ";
+ $sql .= "f_toupper = $4, ";
+ $sql .= "f_label = $5, ";
+ $sql .= "f_label_id = $6, ";
+ $sql .= "f_show = $7, ";
+ $sql .= "f_respos = $8 ";
+ $sql .= "WHERE fkey_gazetteer_id = $9 AND f_id = $10;";
+ $v = array($_REQUEST["f_search"][$i], $_REQUEST["f_pos"][$i], $_REQUEST["f_style_id"][$i], $_REQUEST["f_toupper"][$i], $_REQUEST["f_label"][$i], $_REQUEST["f_label_id"][$i], $_REQUEST["f_show"][$i], $_REQUEST["f_respos"][$i], $_REQUEST["gaz"], $_REQUEST["f_id"][$i]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "i", "i");
+ $res = db_prep_query($sql, $v, $t);
+ }
+}
+
+/* end save gazetteer properties */
+
+/* select wfs */
+
+$sql = "SELECT * FROM gazetteer";
+$res = db_query($sql);
+echo "<select size='10' name='gaz' onchange='submit()'>";
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ echo "<option value='".$row["gazetteer_id"]."' ";
+ if(isset($_REQUEST["gaz"]) && $row["gazetteer_id"] == $_REQUEST["gaz"]){
+ echo "selected";
+ }
+ echo ">".$row["gazetteer_abstract"]."</option>";
+ $cnt++;
+}
+echo "</select>";
+
+
+
+/* end select wfs */
+
+
+
+/* configure elements */
+if(isset($_REQUEST["gaz"])){
+ $sql = "SELECT * FROM gazetteer WHERE gazetteer_id = $1";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+ if($row = db_fetch_array($res)){
+ echo "<table>";
+ echo "<tr><td>GazetterID:</td><td>".$row["gazetteer_id"]."</td></tr>" ;
+ echo "<tr><td>Abstract:</td><td><input type='text' name='gazetteer_abstract' value='".$row["gazetteer_abstract"]."'></td></tr>" ;
+ echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
+ echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
+ echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
+ echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
+ echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
+ echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
+ echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'>".$row["g_res_style"]."</textarea></td></tr>" ;
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
+ if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
+ echo "></td></tr>";
+ echo "</table>";
+ }
+
+ /* set element options */
+ $sql = "SELECT * FROM gazetteer_element ";
+ $sql .= "JOIN wfs_element ON gazetteer_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE fkey_gazetteer_id = $1";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ echo $sql;
+ $res = db_prep_query($sql, $v, $t);
+
+ echo "<table border='1'>";
+ echo "<tr>";
+ echo "<td>ID</td>";
+ echo "<td>name</td>";
+ echo "<td>type</td>";
+ echo "<td>search</td>";
+ echo "<td>pos</td>";
+ echo "<td>style_id</td>";
+ echo "<td>to_upper</td>";
+ echo "<td>label</td>";
+ echo "<td>label_id</td>";
+ echo "<td>show</td>";
+ echo "<td>position</td>";
+ echo "</tr>";
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<tr>";
+ echo "<td><input type='text' size='4' name='f_id[]' value='".$row["f_id"]."' readonly></td>";
+ echo "<td>".$row["element_name"]."</td>";
+ echo "<td>".$row["element_type"]."</td>";
+ echo "<td><input name='f_search[]' type='checkbox'";
+ if($row["f_search"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_pos[]' type='text' size='2' value='".$row["f_pos"]."'></td>";
+ echo "<td><input name='f_style_id[]' type='text' size='2' value='".$row["f_style_id"]."'></td>";
+ echo "<td><input name='f_toupper[]' type='checkbox'";
+ if($row["f_toupper"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_label[]' type='text' size='10' value='".$row["f_label"]."'></td>";
+ echo "<td><input name='f_label_id[]' type='text' size='2' value='".$row["f_label_id"]."'></td>";
+ echo "<td><input name='f_show[]' type='checkbox'";
+ if($row["f_show"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_respos[]' type='text' size='4' value='".$row["f_respos"]."'></td>";
+ echo "</tr>";
+ $cnt++;
+ }
+ echo "</table>";
+ echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
Deleted: branches/2.4.5_rc1/http/php/mod_getStyles.php
===================================================================
--- branches/2.4.5/http/php/mod_getStyles.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_getStyles.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,185 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-$pattern = "admin_name";
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>SLD Get Styles</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
-<!--
-body{
- background-color: #ffffff;
-}
-.button_del{
- color: red;
-
-}
-.textfield{
-
-}
-.wmsList{
-
- width:200px
-}
--->
-</style>
-<script type="text/javascript">
-<!--
-function validate(){
- var ind = document.form1.wmsList.selectedIndex;
-
- document.form1.getstyle.value = 1;
- document.form1.submit();
-}
-// -->
-</script>
-</head>
-<body>
-<?php
-###delete
-if($wmsList && $getstyle == '1'){
-
-function proxy_url($proxy_url)
-{
- global $proxy_name,$proxy_port,$proxy_cont,$proxy_user,$proxy_pass;
-//echo $proxy_user;
- $proxy_fp = fsockopen($proxy_name, $proxy_port) or die ("Fehler beim �ffnen der Verbindung zum Proxy");
- if (!$proxy_fp) {return false;}
- $headers = "GET $proxy_url HTTP/1.0\r\nHost: $proxy_name\r\n";
- $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($proxy_user . ':' . $proxy_pass)."\r\nConnection: Keep-Alive\r\n\r\n";
- fputs($proxy_fp, $headers);
- while(!feof($proxy_fp))
- {$proxy_cont .= fread($proxy_fp,4096);
- }
- fclose($proxy_fp);
- $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4);
- return $proxy_cont;
-}
-
-
-/* Sends an http request to www.example.com
- with additional headers shown above */
-//$fp = fopen('http://www.example.com', 'r', false, $context);
-
- $style_xml = proxy_url($url) or die("Error: ". $ur . " .. no valid resource");
- #echo "<pre>";
- #echo $style_xml;
- #echo "</pre>";
- #$style_content = fread($style_xml);
- #<ogc:PropertyName>admin_name</ogc:PropertyName><ogc:Literal>Brandenburg</ogc:Literal>
-
- $style_filename = "../getstyles/wms_".$wmsList.".php";
- $style_file = fopen($style_filename,"w") or die ($style_filename." not writable!");
- if(!is_writable($style_filename)){
- echo $style_filename."not writable!!!<br>";
- }
- $cnt_line = 0;
- fwrite($style_file, "<".chr(63)."php echo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\" ?>'; ".chr(63).">\r\n");
- //while(!feof($style_xml)){
- //$line = str_replace("md5userid", "<".chr(63)."php echo ".chr(36)."_REQUEST['id']; ".chr(63).">",fgets($style_xml));
-
- fwrite($style_file, $style_xml);
- #echo fgets($style_xml);
- //$cnt_line++;
- //}
- #fputs($style_file, $style_content) or die ($style_filename." not writable");
-
-
- @fclose($style_xml);
- fclose($style_file);
- #include(dirname(__FILE__)."/../../conf/www.conf");
- $pattern = "/" . basename($login) . "/";
- $sql = "UPDATE wms SET wms_filter = $1 WHERE wms_id = $2";
- $v = array(preg_replace($pattern,$style_filename,$login), $wmsList);
- $t = array("s", "i");
- echo $sql;
- db_prep_query($sql, $v, $t) or die("unable to change filter!");
-}
-###
-
-$sql = "SELECT * FROM wms ORDER BY wms_title";
-$res = db_query($sql);
-$cnt = 0;
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-echo "<select class='wmsList' size='20' name='wmsList' class='wmsList' onchange='submit()'>";
-while($row = db_fetch_array($res)){
- # getStyle - Request:
- if($wmsList && $row["wms_id"] == $wmsList){
- $getStyle = $row["wms_getmap"]."&VERSION=1.1.1&REQUEST=getStyles&SERVICE=WMS&LAYERS=";
- $sql_style = "SELECT layer_name FROM layer WHERE fkey_wms_id = $1";
- $v = array($wmsList);
- $t = array("i");
- $res_style = db_prep_query($sql_style, $v, $t);
-
- $cnt_style = 0;
- while($row2 = db_fetch_array($res_style)){
- if($cnt_style > 0){
- if($cnt_style > 1){
- $getStyle .= ",";
- }
- $getStyle .= $row2["layer_name"];
- }
- $cnt_style++;
- }
- }
- echo "<option value='".$row["wms_id"]."' ";
- if($row["wms_id"] == $wmsList){
- echo "selected";
- }
- echo ">".$row["wms_title"]."</option>";
- $cnt++;
-}
-echo "</select><br>";
-echo "<textarea class='textfield' name='url' cols='70' rows='3' wrap='virtual'>".$getStyle."</textarea><br>";
-echo "<input class='button_del' type='button' value='getStyle' onclick='validate()'><br>";
-if($style_filename){
- $style_file = fopen($style_filename,"r");
- while(!feof($style_file)){
- $content = str_replace("<","<",fgets($style_file));
- echo str_replace(">",">",$content)."<br>";
- }
- fclose($style_file);
-}
-?>
-<input type='hidden' name='getstyle'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_getStyles.php (from rev 2138, branches/2.4.5/http/php/mod_getStyles.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_getStyles.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_getStyles.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,183 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+$pattern = "admin_name";
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>SLD Get Styles</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+<!--
+body{
+ background-color: #ffffff;
+}
+.button_del{
+ color: red;
+
+}
+.textfield{
+
+}
+.wmsList{
+
+ width:200px
+}
+-->
+</style>
+<script type="text/javascript">
+<!--
+function validate(){
+ var ind = document.form1.wmsList.selectedIndex;
+
+ document.form1.getstyle.value = 1;
+ document.form1.submit();
+}
+// -->
+</script>
+</head>
+<body>
+<?php
+###delete
+if($wmsList && $getstyle == '1'){
+
+function proxy_url($proxy_url)
+{
+ global $proxy_name,$proxy_port,$proxy_cont,$proxy_user,$proxy_pass;
+//echo $proxy_user;
+ $proxy_fp = fsockopen($proxy_name, $proxy_port) or die ("Fehler beim �ffnen der Verbindung zum Proxy");
+ if (!$proxy_fp) {return false;}
+ $headers = "GET $proxy_url HTTP/1.0\r\nHost: $proxy_name\r\n";
+ $headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($proxy_user . ':' . $proxy_pass)."\r\nConnection: Keep-Alive\r\n\r\n";
+ fputs($proxy_fp, $headers);
+ while(!feof($proxy_fp))
+ {$proxy_cont .= fread($proxy_fp,4096);
+ }
+ fclose($proxy_fp);
+ $proxy_cont = substr($proxy_cont, strpos($proxy_cont,"\r\n\r\n")+4);
+ return $proxy_cont;
+}
+
+
+/* Sends an http request to www.example.com
+ with additional headers shown above */
+//$fp = fopen('http://www.example.com', 'r', false, $context);
+
+ $style_xml = proxy_url($url) or die("Error: ". $ur . " .. no valid resource");
+ #echo "<pre>";
+ #echo $style_xml;
+ #echo "</pre>";
+ #$style_content = fread($style_xml);
+ #<ogc:PropertyName>admin_name</ogc:PropertyName><ogc:Literal>Brandenburg</ogc:Literal>
+
+ $style_filename = "../getstyles/wms_".$wmsList.".php";
+ $style_file = fopen($style_filename,"w") or die ($style_filename." not writable!");
+ if(!is_writable($style_filename)){
+ echo $style_filename."not writable!!!<br>";
+ }
+ $cnt_line = 0;
+ fwrite($style_file, "<".chr(63)."php echo '<?xml version=\"1.0\" encoding=\"ISO-8859-1\" standalone=\"yes\" ?>'; ".chr(63).">\r\n");
+ //while(!feof($style_xml)){
+ //$line = str_replace("md5userid", "<".chr(63)."php echo ".chr(36)."_REQUEST['id']; ".chr(63).">",fgets($style_xml));
+
+ fwrite($style_file, $style_xml);
+ #echo fgets($style_xml);
+ //$cnt_line++;
+ //}
+ #fputs($style_file, $style_content) or die ($style_filename." not writable");
+
+
+ @fclose($style_xml);
+ fclose($style_file);
+ #include(dirname(__FILE__)."/../../conf/www.conf");
+ $pattern = "/" . basename($login) . "/";
+ $sql = "UPDATE wms SET wms_filter = $1 WHERE wms_id = $2";
+ $v = array(preg_replace($pattern,$style_filename,$login), $wmsList);
+ $t = array("s", "i");
+ echo $sql;
+ db_prep_query($sql, $v, $t) or die("unable to change filter!");
+}
+###
+
+$sql = "SELECT * FROM wms ORDER BY wms_title";
+$res = db_query($sql);
+$cnt = 0;
+echo "<form name='form1' action='" . $self."' method='post'>";
+echo "<select class='wmsList' size='20' name='wmsList' class='wmsList' onchange='submit()'>";
+while($row = db_fetch_array($res)){
+ # getStyle - Request:
+ if($wmsList && $row["wms_id"] == $wmsList){
+ $getStyle = $row["wms_getmap"]."&VERSION=1.1.1&REQUEST=getStyles&SERVICE=WMS&LAYERS=";
+ $sql_style = "SELECT layer_name FROM layer WHERE fkey_wms_id = $1";
+ $v = array($wmsList);
+ $t = array("i");
+ $res_style = db_prep_query($sql_style, $v, $t);
+
+ $cnt_style = 0;
+ while($row2 = db_fetch_array($res_style)){
+ if($cnt_style > 0){
+ if($cnt_style > 1){
+ $getStyle .= ",";
+ }
+ $getStyle .= $row2["layer_name"];
+ }
+ $cnt_style++;
+ }
+ }
+ echo "<option value='".$row["wms_id"]."' ";
+ if($row["wms_id"] == $wmsList){
+ echo "selected";
+ }
+ echo ">".$row["wms_title"]."</option>";
+ $cnt++;
+}
+echo "</select><br>";
+echo "<textarea class='textfield' name='url' cols='70' rows='3' wrap='virtual'>".$getStyle."</textarea><br>";
+echo "<input class='button_del' type='button' value='getStyle' onclick='validate()'><br>";
+if($style_filename){
+ $style_file = fopen($style_filename,"r");
+ while(!feof($style_file)){
+ $content = str_replace("<","<",fgets($style_file));
+ echo str_replace(">",">",$content)."<br>";
+ }
+ fclose($style_file);
+}
+?>
+<input type='hidden' name='getstyle'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_group_filteredGui.php
===================================================================
--- branches/2.4.5/http/php/mod_group_filteredGui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_group_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,226 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert**************************************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2);";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($remove_gui[$i],$selected_group);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get allocated gui ********************************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$v = array();
-$t = array();
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i + 1);
- array_push($v, $arrayGuis[$i]);
- array_push($t, 's');
-}
-$sql_gui.= ") ORDER BY gui_name";
-$res_gui = db_prep_query($sql_gui,$v,$t);
-
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all group **********************************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get allocated gui from selected_group******************************************************************************/
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$v = array();
-$t = array();
-$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
-$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
-$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
-if(!$selected_group){array_push($v,$group_id[0]);}
-if($selected_group){array_push($v,$selected_group);}
-array_push($t,'i');
-$sql_group_mb_gui .= " AND gui.gui_id IN (";
-$c = 2;
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_group_mb_gui .= ",";}
- $sql_group_mb_gui .= "$".$c;
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
- $c++;
-}
-$sql_group_mb_gui .= ") ORDER BY gui.gui_name";
-
-$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
-while($row = db_fetch_array($res_group_mb_gui)){
- $gui_id_group[$cnt_gui_group] = $row["gui_id"];
- $gui_name_group[$cnt_gui_group] = $row["gui_name"];
- $cnt_gui_group++;
-}
-
-
-
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all group in selectbox*************************************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all gui in selectbox**************************************************************************/
-echo "<div class='text2'>GUI:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert group_gui_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_group_filteredGui.php (from rev 2138, branches/2.4.5/http/php/mod_group_filteredGui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_group_filteredGui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_group_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,224 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_mb_group_id = $1 and fkey_gui_id = $2";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) VALUES($1, $2);";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($remove_gui[$i],$selected_group);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get allocated gui ********************************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$v = array();
+$t = array();
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i + 1);
+ array_push($v, $arrayGuis[$i]);
+ array_push($t, 's');
+}
+$sql_gui.= ") ORDER BY gui_name";
+$res_gui = db_prep_query($sql_gui,$v,$t);
+
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all group **********************************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get allocated gui from selected_group******************************************************************************/
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$v = array();
+$t = array();
+$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
+$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
+$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
+if(!$selected_group){array_push($v,$group_id[0]);}
+if($selected_group){array_push($v,$selected_group);}
+array_push($t,'i');
+$sql_group_mb_gui .= " AND gui.gui_id IN (";
+$c = 2;
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_group_mb_gui .= ",";}
+ $sql_group_mb_gui .= "$".$c;
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ $c++;
+}
+$sql_group_mb_gui .= ") ORDER BY gui.gui_name";
+
+$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
+while($row = db_fetch_array($res_group_mb_gui)){
+ $gui_id_group[$cnt_gui_group] = $row["gui_id"];
+ $gui_name_group[$cnt_gui_group] = $row["gui_name"];
+ $cnt_gui_group++;
+}
+
+
+
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all group in selectbox*************************************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all gui in selectbox**************************************************************************/
+echo "<div class='text2'>GUI:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert group_gui_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_group_filteredUser.php
===================================================================
--- branches/2.4.5/http/php/mod_group_filteredUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_group_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,192 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Group Members</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2);";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
- $v = array($remove_user[$i],$selected_group);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get all group **********************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner user **********************************************************************************/
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get only owner user from selected group**********************************************************/
-$sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
-$sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
-if(!$selected_group){$v = array($group_id[0]);}
-if($selected_group){$v = array($selected_group);}
-$t = array('i');
-$sql_mb_user_mb_group .= " AND mb_user.mb_user_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
-$res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
-while($row = db_fetch_array($res_mb_user_mb_group)){
- $user_id_group[$cnt_group_user] = $row["mb_user_id"];
- $user_name_group[$cnt_group_user] = $row["mb_user_name"];
- $cnt_group_user++;
-}
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert projects in selectbox*********************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all profiles in selectbox*****************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
- }
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox******************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_group_filteredUser.php (from rev 2138, branches/2.4.5/http/php/mod_group_filteredUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_group_filteredUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_group_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,190 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Group Members</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) VALUES($1, $2);";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
+ $v = array($remove_user[$i],$selected_group);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get all group **********************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner user **********************************************************************************/
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get only owner user from selected group**********************************************************/
+$sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
+$sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id = $1 ";
+if(!$selected_group){$v = array($group_id[0]);}
+if($selected_group){$v = array($selected_group);}
+$t = array('i');
+$sql_mb_user_mb_group .= " AND mb_user.mb_user_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
+$res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
+while($row = db_fetch_array($res_mb_user_mb_group)){
+ $user_id_group[$cnt_group_user] = $row["mb_user_id"];
+ $user_name_group[$cnt_group_user] = $row["mb_user_name"];
+ $cnt_group_user++;
+}
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert projects in selectbox*********************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all profiles in selectbox*****************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+ }
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox******************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_group_gui.php
===================================================================
--- branches/2.4.5/http/php/mod_group_gui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_group_gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,191 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }
- else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-
-$gui_id_array = array();
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * FROM gui_mb_group WHERE fkey_mb_group_id = $1 ";
- $sql_insert .= " and fkey_gui_id = $2 ";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) ";
- $sql_insert .= "VALUES($1, $2);";
- $v = array($selected_group,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1";
- $sql_remove .= " and fkey_mb_group_id = $2";
- $v = array($remove_gui[$i],$selected_group);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all gui *************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all group ***********************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all gui from selected_group******************************************************************/
-$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
-$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
-$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
-$sql_group_mb_gui .= " ORDER BY gui.gui_name";
-if(!$selected_group){$v = array($group_id[0]);}
-if($selected_group){$v = array($selected_group);}
-$t = array('i');
-
-$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
-while($row = db_fetch_array($res_group_mb_gui)){
- $gui_id_group[$cnt_gui_group] = $row["gui_id"];
- $gui_name_group[$cnt_gui_group] = $row["gui_name"];
- $cnt_gui_group++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" .$self."' method='post'>";
-
-/*insert all group in selectbox********************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all gui in selectbox***********************************************************************/
-echo "<div class='text2'>GUI:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert group_gui_dependence in selectbox*********************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_group_gui.php (from rev 2138, branches/2.4.5/http/php/mod_group_gui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_group_gui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_group_gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,188 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+
+$gui_id_array = array();
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * FROM gui_mb_group WHERE fkey_mb_group_id = $1 ";
+ $sql_insert .= " and fkey_gui_id = $2 ";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_mb_group_id, fkey_gui_id) ";
+ $sql_insert .= "VALUES($1, $2);";
+ $v = array($selected_group,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_gui_id = $1";
+ $sql_remove .= " and fkey_mb_group_id = $2";
+ $v = array($remove_gui[$i],$selected_group);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all gui *************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all group ***********************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all gui from selected_group******************************************************************/
+$sql_group_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_group.fkey_mb_group_id FROM gui_mb_group ";
+$sql_group_mb_gui .= "INNER JOIN gui ON gui_mb_group.fkey_gui_id = gui.gui_id ";
+$sql_group_mb_gui .= "WHERE gui_mb_group.fkey_mb_group_id = $1 ";
+$sql_group_mb_gui .= " ORDER BY gui.gui_name";
+if(!$selected_group){$v = array($group_id[0]);}
+if($selected_group){$v = array($selected_group);}
+$t = array('i');
+
+$res_group_mb_gui = db_prep_query($sql_group_mb_gui,$v,$t);
+while($row = db_fetch_array($res_group_mb_gui)){
+ $gui_id_group[$cnt_gui_group] = $row["gui_id"];
+ $gui_name_group[$cnt_gui_group] = $row["gui_name"];
+ $cnt_gui_group++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" .$self."' method='post'>";
+
+/*insert all group in selectbox********************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all gui in selectbox***********************************************************************/
+echo "<div class='text2'>GUI:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert group_gui_dependence in selectbox*********************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $gui_id_group[$i] . "'>" . $gui_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_group_user.php
===================================================================
--- branches/2.4.5/http/php/mod_group_user.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_group_user.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,190 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit Group Members</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_group"].selectedIndex == -1){
- document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-
-/*handle remove, update and insert**************************************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) ";
- $sql .= "VALUES($1, $2);";
- $v = array($selected_group,$selected_user[$i]);
- $t = array('i','i');
- $res = db_prep_query($sql,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE ";
- $sql_remove .= "fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
- $v = array($remove_user[$i],$selected_group);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get all group ********************************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all user from selected group******************************************************************************/
-$sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
-$sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id= $1 ";
-$sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
-
-if(!$selected_group){$v = array($group_id[0]);}
-if($selected_group){$v = array($selected_group);}
-$t = array('i');
-
-$res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
-while($row = db_fetch_array($res_mb_user_mb_group)){
- $user_id_group[$cnt_group_user] = $row["mb_user_id"];
- $user_name_group[$cnt_group_user] = $row["mb_user_name"];
- $cnt_group_user++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self . "' method='post'>";
-
-/*insert projects in selectbox*************************************************************************************/
-echo "<div class='text1'>GROUP: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "' ";
- if($selected_group && $selected_group == $group_id[$i]){
- echo "selected";
- }
- echo ">" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all profiles in selectbox**************************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_group.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_group_user.php (from rev 2138, branches/2.4.5/http/php/mod_group_user.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_group_user.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_group_user.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,188 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit Group Members</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_group"].selectedIndex == -1){
+ document.getElementsByName("selected_group")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql = "SELECT * from mb_user_mb_group where fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql = "INSERT INTO mb_user_mb_group(fkey_mb_group_id, fkey_mb_user_id) ";
+ $sql .= "VALUES($1, $2);";
+ $v = array($selected_group,$selected_user[$i]);
+ $t = array('i','i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE ";
+ $sql_remove .= "fkey_mb_user_id = $1 and fkey_mb_group_id = $2";
+ $v = array($remove_user[$i],$selected_group);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get all group ********************************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all user from selected group******************************************************************************/
+$sql_mb_user_mb_group = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, mb_user_mb_group.fkey_mb_group_id FROM mb_user_mb_group ";
+$sql_mb_user_mb_group .= "INNER JOIN mb_user ON mb_user_mb_group.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_mb_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_group_id= $1 ";
+$sql_mb_user_mb_group .= " ORDER BY mb_user.mb_user_name";
+
+if(!$selected_group){$v = array($group_id[0]);}
+if($selected_group){$v = array($selected_group);}
+$t = array('i');
+
+$res_mb_user_mb_group = db_prep_query($sql_mb_user_mb_group,$v,$t);
+while($row = db_fetch_array($res_mb_user_mb_group)){
+ $user_id_group[$cnt_group_user] = $row["mb_user_id"];
+ $user_name_group[$cnt_group_user] = $row["mb_user_name"];
+ $cnt_group_user++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self . "' method='post'>";
+
+/*insert projects in selectbox*************************************************************************************/
+echo "<div class='text1'>GROUP: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_group' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "' ";
+ if($selected_group && $selected_group == $group_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all profiles in selectbox**************************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $user_id_group[$i] . "'>" . $user_name_group[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_group.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_gui_filteredGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,199 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
- $v = array($remove_group[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get all gui ************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get owner groups ********************************************************************************/
-
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get owner groups from selected gui***************************************************************/
-$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
-$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$sql_gui_group .= " AND mb_group.mb_group_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_gui_group .= " ORDER BY mb_group.mb_group_name";
-$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
-while($row = db_fetch_array($res_gui_group)){
- $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
- $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
- $cnt_gui_group++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert guis in selectbox*************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox******************************************************************/
-echo "<div class='text2'>GROUP:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php (from rev 2138, branches/2.4.5/http/php/mod_gui_filteredGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gui_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,197 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_group[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get all gui ************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get owner groups ********************************************************************************/
+
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get owner groups from selected gui***************************************************************/
+$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
+$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$sql_gui_group .= " AND mb_group.mb_group_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_gui_group .= " ORDER BY mb_group.mb_group_name";
+$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
+while($row = db_fetch_array($res_gui_group)){
+ $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
+ $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
+ $cnt_gui_group++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert guis in selectbox*************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all groups in selectbox******************************************************************/
+echo "<div class='text2'>GROUP:</div><br>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php
===================================================================
--- branches/2.4.5/http/php/mod_gui_filteredUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,198 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2);";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($remove_user[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get all gui ************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get only owner user *****************************************************************************/
-$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_user = db_prep_query($sql_user,$v,$t);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get only owner user from selected gui************************************************************/
-$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
-$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1";
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$sql_gui_mb_user .= " AND mb_user.mb_user_owner = $2";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
-$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
-while($row = db_fetch_array($res_gui_mb_user)){
- $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
- $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
- $cnt_gui_user++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert guis in selectbox*************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
- }
-echo "</select>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_user_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php (from rev 2138, branches/2.4.5/http/php/mod_gui_filteredUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gui_filteredUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,196 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2);";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_user[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get all gui ************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get only owner user *****************************************************************************/
+$sql_user = "SELECT * FROM mb_user WHERE mb_user_owner = $1 ORDER BY mb_user_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_user = db_prep_query($sql_user,$v,$t);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get only owner user from selected gui************************************************************/
+$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
+$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1";
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$sql_gui_mb_user .= " AND mb_user.mb_user_owner = $2";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
+$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
+while($row = db_fetch_array($res_gui_mb_user)){
+ $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
+ $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
+ $cnt_gui_user++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert guis in selectbox*************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+ }
+echo "</select>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_user_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gui_group.php
===================================================================
--- branches/2.4.5/http/php/mod_gui_group.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gui_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,191 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_group = 0;
-$cnt_group = 0;
-$cnt_gui_group = 0;
-$cnt_gui_group = 0;
-$gui_id_array=array();
-$exists = false;
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_group[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
- $v = array($remove_group[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all gui ************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all groups **********************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all groups from selected gui*****************************************************************/
-$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
-$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
-$sql_gui_group .= "ORDER BY mb_group.mb_group_name";
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-
-$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
-while($row = db_fetch_array($res_gui_group)){
- $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
- $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
- $cnt_gui_group++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert guis in selectbox*************************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all groups in selectbox**************************************************************************/
-echo "<div class='text2'>GROUP:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_group; $i++){
- echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gui_group.php (from rev 2138, branches/2.4.5/http/php/mod_gui_group.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gui_group.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gui_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,189 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_group = 0;
+$cnt_group = 0;
+$cnt_gui_group = 0;
+$cnt_gui_group = 0;
+$gui_id_array=array();
+$exists = false;
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_group where fkey_gui_id = $1 and fkey_mb_group_id = $2";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_group(fkey_gui_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_group[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM gui_mb_group WHERE fkey_mb_group_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_group[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all gui ************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all groups **********************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all groups from selected gui*****************************************************************/
+$sql_gui_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, gui_mb_group.fkey_gui_id FROM gui_mb_group ";
+$sql_gui_group .= "INNER JOIN mb_group ON gui_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_gui_group .= "WHERE gui_mb_group.fkey_gui_id = $1 ";
+$sql_gui_group .= "ORDER BY mb_group.mb_group_name";
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+
+$res_gui_group = db_prep_query($sql_gui_group,$v,$t);
+while($row = db_fetch_array($res_gui_group)){
+ $group_id_gui[$cnt_gui_group] = $row["mb_group_id"];
+ $group_name_gui[$cnt_gui_group] = $row["mb_group_name"];
+ $cnt_gui_group++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert guis in selectbox*************************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all groups in selectbox**************************************************************************/
+echo "<div class='text2'>GROUP:</div><br>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert gui_group_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_group; $i++){
+ echo "<option value='" . $group_id_gui[$i] . "'>" . $group_name_gui[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gui_owner.php
===================================================================
--- branches/2.4.5/http/php/mod_gui_owner.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gui_owner.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,211 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-import_request_variables("PG");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit User Owner</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.background = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.background = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$gui_id_array = array();
-
-/*handle remove, update and insert**************************************************************************************/
-if($insert){
- if(count($selected_user)>0 && count($selected_gui)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- $sql_set_owner = "UPDATE gui_mb_user SET mb_user_type = 'owner' WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_set_owner = db_prep_query($sql_set_owner,$v,$t);
- }
- }
-
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "UPDATE gui_mb_user SET mb_user_type = '' WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2";
- $v = array($selected_gui,$remove_user[$i]);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get own guis ********************************************************************************************/
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-if (count($ownguis)>0){
- $v = array();
- $t = array();
- $sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
- for($i=0; $i<count($ownguis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$ownguis[$i]);
- array_push($t,'s');
- }
- $sql_gui .= ") ORDER BY gui_name";
- $res_gui = db_prep_query($sql_gui,$v,$t);
- while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
- }
-
- /*get all user **********************************************************************************************/
- $sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
- $res_user = db_query($sql_user);
- while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
- }
-
-/*get all user from selected gui******************************************************************************/
-$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
-$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1";
-$sql_gui_mb_user .= " AND gui_mb_user.mb_user_type = 'owner' ORDER BY mb_user.mb_user_name";
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
-while($row = db_fetch_array($res_gui_mb_user)){
- $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
- $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
- $cnt_gui_user++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self."' method='post'>";
-
-/*insert projects in selectbox*************************************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onchange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all profiles in selectbox**************************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
- for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
- }
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>OWNER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-}else{
- echo "There are no guis available for this user.<br>";
-}
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gui_owner.php (from rev 2138, branches/2.4.5/http/php/mod_gui_owner.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gui_owner.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gui_owner.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,209 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+import_request_variables("PG");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit User Owner</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<link rel="stylesheet" type="text/css" href="../css/administration_alloc.css">
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.background = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.background = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$gui_id_array = array();
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+ if(count($selected_user)>0 && count($selected_gui)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ $sql_set_owner = "UPDATE gui_mb_user SET mb_user_type = 'owner' WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_set_owner = db_prep_query($sql_set_owner,$v,$t);
+ }
+ }
+
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "UPDATE gui_mb_user SET mb_user_type = '' WHERE fkey_gui_id = $1 AND fkey_mb_user_id = $2";
+ $v = array($selected_gui,$remove_user[$i]);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get own guis ********************************************************************************************/
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+if (count($ownguis)>0){
+ $v = array();
+ $t = array();
+ $sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+ for($i=0; $i<count($ownguis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$ownguis[$i]);
+ array_push($t,'s');
+ }
+ $sql_gui .= ") ORDER BY gui_name";
+ $res_gui = db_prep_query($sql_gui,$v,$t);
+ while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+ }
+
+ /*get all user **********************************************************************************************/
+ $sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+ $res_user = db_query($sql_user);
+ while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+ }
+
+/*get all user from selected gui******************************************************************************/
+$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
+$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id = $1";
+$sql_gui_mb_user .= " AND gui_mb_user.mb_user_type = 'owner' ORDER BY mb_user.mb_user_name";
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
+while($row = db_fetch_array($res_gui_mb_user)){
+ $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
+ $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
+ $cnt_gui_user++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self."' method='post'>";
+
+/*insert projects in selectbox*************************************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onchange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all profiles in selectbox**************************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+ for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+ }
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>OWNER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+}else{
+ echo "There are no guis available for this user.<br>";
+}
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_gui_user.php
===================================================================
--- branches/2.4.5/http/php/mod_gui_user.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_gui_user.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,188 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit GUI Permissions</title>
-
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_gui"].selectedIndex == -1){
- document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_user[]"].selectedIndex == -1){
- document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_user[]"].selectedIndex == -1){
- document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$gui_id_array = array();
-$exists = false;
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_user)>0){
- for($i=0; $i<count($selected_user); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
- $v = array($selected_gui,$selected_user[$i]);
- $t = array('s','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_user)>0){
- for($i=0; $i<count($remove_user); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($remove_user[$i],$selected_gui);
- $t = array('i','s');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-/*get all gui ********************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all user from selected gui*******************************************************************/
-$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
-$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
-$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id= $1 ";
-$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
-if(!$selected_gui){$v = array($gui_id_array[0]);}
-if($selected_gui){$v = array($selected_gui);}
-$t = array('s');
-$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
-while($row = db_fetch_array($res_gui_mb_user)){
- $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
- $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
- $cnt_gui_user++;
-}
-
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert projects in selectbox*********************************************************************/
-echo "<div class='text1'>GUI: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_gui' onchange='submit()' size='10'>";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "' ";
- if($selected_gui && $selected_gui == $gui_id_array[$i]){
- echo "selected";
- }
- echo ">" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all profiles in selectbox*****************************************************************/
-echo "<div class='text2'>USER:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert container_profile_dependence and container_group_dependence in selectbox******************/
-echo "<div class='text3'>SELECTED USER:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_gui.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_gui_user.php (from rev 2138, branches/2.4.5/http/php/mod_gui_user.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_gui_user.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_gui_user.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,186 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit GUI Permissions</title>
+
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_gui"].selectedIndex == -1){
+ document.getElementsByName("selected_gui")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_user[]"].selectedIndex == -1){
+ document.getElementsByName("remove_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_user[]"].selectedIndex == -1){
+ document.getElementsByName("selected_user[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$gui_id_array = array();
+$exists = false;
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_user)>0){
+ for($i=0; $i<count($selected_user); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_gui_id, fkey_mb_user_id) VALUES($1, $2)";
+ $v = array($selected_gui,$selected_user[$i]);
+ $t = array('s','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_user)>0){
+ for($i=0; $i<count($remove_user); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($remove_user[$i],$selected_gui);
+ $t = array('i','s');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+/*get all gui ********************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all user from selected gui*******************************************************************/
+$sql_gui_mb_user = "SELECT mb_user.mb_user_id, mb_user.mb_user_name, gui_mb_user.fkey_gui_id FROM gui_mb_user ";
+$sql_gui_mb_user .= "INNER JOIN mb_user ON gui_mb_user.fkey_mb_user_id = mb_user.mb_user_id ";
+$sql_gui_mb_user .= "WHERE gui_mb_user.fkey_gui_id= $1 ";
+$sql_gui_mb_user .= " ORDER BY mb_user.mb_user_name";
+if(!$selected_gui){$v = array($gui_id_array[0]);}
+if($selected_gui){$v = array($selected_gui);}
+$t = array('s');
+$res_gui_mb_user = db_prep_query($sql_gui_mb_user,$v,$t);
+while($row = db_fetch_array($res_gui_mb_user)){
+ $user_id_gui[$cnt_gui_user] = $row["mb_user_id"];
+ $user_name_gui[$cnt_gui_user] = $row["mb_user_name"];
+ $cnt_gui_user++;
+}
+
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert projects in selectbox*********************************************************************/
+echo "<div class='text1'>GUI: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_gui' onchange='submit()' size='10'>";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "' ";
+ if($selected_gui && $selected_gui == $gui_id_array[$i]){
+ echo "selected";
+ }
+ echo ">" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all profiles in selectbox*****************************************************************/
+echo "<div class='text2'>USER:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "'>" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert container_profile_dependence and container_group_dependence in selectbox******************/
+echo "<div class='text3'>SELECTED USER:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_user[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $user_id_gui[$i] . "'>" . $user_name_gui[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_gui.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_help.php
===================================================================
--- branches/2.4.5/http/php/mod_help.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_help.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,76 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_help
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-?>
-<html>
-<head><title></title></head>
-<script language="JavaScript" type="text/javascript">
-<?php
-$e_id_css = 'help';
-$gui_id = $_REQUEST["gui_id"];
-include(dirname(__FILE__)."/../include/dyn_php.php");
-if(!isset($mod_help_width)){
- $mod_help_width = 1000;
-}
-if(!isset($mod_help_height)){
- $mod_help_height = 1000;
-}
-?>
-function init(){
- var str = "<img src='../img/transparent.gif' style='cursor:help' width='<?php echo $mod_help_width ?>' height='<?php echo $mod_help_height ?>' usemap='#mod_help_imagemap' border='0'>";
- str += "<map name='mod_help_imagemap'>";
- <?php
- $gui_id = $_REQUEST["gui_id"];
- $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_url <> '' AND e_public = 1";
- $v = array($gui_id);
- $t = array('s');
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "str += '<area onclick=\"mod_help_disable();";
- if($row["e_id"] != 'help'){
- echo "window.open(\'".$row["e_url"]."\');";
- }
- echo "\"";
- echo "shape=\"rect\" coords=\"".$row['e_left'].",".$row['e_top'].",";
- echo ($row['e_left']+$row['e_width']).",".($row['e_top']+$row['e_height'])."\" ";
-// echo "href=\"".$row["e_url"]."\" ";
- echo "href=\"javascript:\" ";
- if($row["e_id"] != 'help'){
- echo "alt=\"HELP: ".$row["e_url"]."\" title=\"HELP: ".$row["e_url"]."\" ";
- #echo "target=\"_blank\"";
- }
- else{
- echo "alt=\"HELP: ".$mod_help_text."\" title=\"HELP: ".$mod_help_text."\" ";
- }
- echo " nohref>';";
- $cnt++;
- }
- ?>
- str += "</map>";
- parent.mod_help_set_str(str);
-}
-</script>
-
-<body onload='init();'>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_help.php (from rev 2181, branches/2.4.5/http/php/mod_help.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_help.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_help.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,75 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_help
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<html>
+<head><title></title></head>
+<script language="JavaScript" type="text/javascript">
+<?php
+$e_id_css = 'help';
+include(dirname(__FILE__)."/../include/dyn_php.php");
+if(!isset($mod_help_width)){
+ $mod_help_width = 1000;
+}
+if(!isset($mod_help_height)){
+ $mod_help_height = 1000;
+}
+?>
+function init(){
+ var str = "<img src='../img/transparent.gif' style='cursor:help' width='<?php echo $mod_help_width ?>' height='<?php echo $mod_help_height ?>' usemap='#mod_help_imagemap' border='0'>";
+ str += "<map name='mod_help_imagemap'>";
+ <?php
+ $gui_id = $_REQUEST["gui_id"];
+ $sql = "SELECT * FROM gui_element WHERE fkey_gui_id = $1 AND e_url <> '' AND e_public = 1";
+ $v = array($gui_id);
+ $t = array('s');
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "str += '<area onclick=\"mod_help_disable();";
+ if($row["e_id"] != 'help'){
+ echo "window.open(\'".$row["e_url"]."\');";
+ }
+ echo "\"";
+ echo "shape=\"rect\" coords=\"".$row['e_left'].",".$row['e_top'].",";
+ echo ($row['e_left']+$row['e_width']).",".($row['e_top']+$row['e_height'])."\" ";
+// echo "href=\"".$row["e_url"]."\" ";
+ echo "href=\"javascript:\" ";
+ if($row["e_id"] != 'help'){
+ echo "alt=\"HELP: ".$row["e_url"]."\" title=\"HELP: ".$row["e_url"]."\" ";
+ #echo "target=\"_blank\"";
+ }
+ else{
+ echo "alt=\"HELP: ".$mod_help_text."\" title=\"HELP: ".$mod_help_text."\" ";
+ }
+ echo " nohref>';";
+ $cnt++;
+ }
+ ?>
+ str += "</map>";
+ parent.mod_help_set_str(str);
+}
+</script>
+
+<body onload='init();'>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php
===================================================================
--- branches/2.4.5/http/php/mod_insertWmcIntoDb.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,481 +0,0 @@
-<?php
-#$Id: mod_insertWmcIntoDb.php 507 2006-11-20 10:55:57Z christoph $
-#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../extensions/JSON.php");
-
-session_start();
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-
-$json = new Services_JSON();
-$mapObject = $json->decode($_REQUEST["mapObject"]);
-$user_id = $_SESSION["mb_user_id"];
-$save_in_session = $_POST["saveInSession"];
-$generalTitle = $_POST["generalTitle"];
-
-$wmc_id = $user_id . '_' . time();
-
-$generalWidth = $mapObject->width;
-$generalHeight = $mapObject->height;
-$generalBboxSrs = $mapObject->epsg;
-
-$arrayBBox = explode(",", $mapObject->extent);
-$generalBboxMinx = floatval($arrayBBox[0]);
-$generalBboxMiny = floatval($arrayBBox[1]);
-$generalBboxMaxx = floatval($arrayBBox[2]);
-$generalBboxMaxy = floatval($arrayBBox[3]);
-
-$generalName = "Mapbender WMC"; // TO do : insert proper data
-$generalKeywords = array("Mapbender", "WMC"); // TO do : insert proper data
-$generalAbstract = ""; // TO do : insert proper data
-$generalLogoUrl = ""; // TO do : insert proper data
-$generalLogoUrlWidth = ""; // TO do : insert proper data
-$generalLogoUrlHeight = ""; // TO do : insert proper data
-$generalLogoUrlFormat = ""; // TO do : insert proper data
-$generalDescriptionUrl = ""; // TO do : insert proper data
-$generalContactPerson = "";
-$generalContactOrganization = "";
-$generalContactPosition = "";
-$generalContactAddressType = "";
-$generalContactAddress = "";
-$generalContactCity = "";
-$generalContactStateOrProvince = "";
-$generalContactPostCode = "";
-$generalContactCountry = "";
-$generalContactVoiceTelephone = "";
-$generalContactFacsimileTelephone = "";
-$generalContactElectronicMailAddress = "";
-
-$extension_namespace = "mapbender";
-
-// LayerList variables
-$layerHidden = "";
-$layerQueryable = "";
-$layerAbstract = "";
-$layerName = "";
-$layerSrs = "";
-$layerDataUrl = "";
-$layerMetadataUrl = "";
-$layerFormat = "";
-$layerFormat_current = "";
-$layerStyle_current = "";
-$layerStyle_name = "";
-$layerStyle_title = "";
-$layerStyle_legendURL = "";
-$layerStyle_legendURL_width = "";
-$layerStyle_legendURL_height = "";
-$layerStyle_legendURL_format = "";
-
-// generate XML
-$doc = new DOMDocument("1.0", CHARSET);
-$doc->preserveWhiteSpace = false;
-
-// ViewContext
-$e_view_context = $doc->createElementNS("http://www.opengis.net/context", "ViewContext");
-
-
-$e_view_context->setAttribute("version", "1.0.0");
-$e_view_context->setAttribute("id", $wmc_id);
-$e_view_context->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
-$e_view_context->setAttribute("xmlns:mapbender", "http://www.mapbender.org");
-$e_view_context->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
-$e_view_context->setAttribute("xsi:SchemaLocation", "http://schemas.opengis.net/context/1.0.0/context.xsd");
-
- // General
- $e_general = $doc->createElement("General");
-
- $e_window = $doc->createElement("Window");
- if (!empty($generalWidth) && !empty($generalHeight)) {
- $e_window->setAttribute("width", $generalWidth);
- $e_window->setAttribute("height", $generalHeight);
- }
- $e_general->appendChild($e_window);
-
- $e_bbox = $doc->createElement("BoundingBox");
- $e_bbox->setAttribute("SRS", $generalBboxSrs);
- $e_bbox->setAttribute("minx", $generalBboxMinx);
- $e_bbox->setAttribute("miny", $generalBboxMiny);
- $e_bbox->setAttribute("maxx", $generalBboxMaxx);
- $e_bbox->setAttribute("maxy", $generalBboxMaxy);
- $e_general->appendChild($e_bbox);
-
- $e_name = $doc->createElement("Name", $generalName);
- $e_general->appendChild($e_name);
-
- $e_title = $doc->createElement("Title", $generalTitle);
- $e_general->appendChild($e_title);
-
- $e_keyword_list = $doc->createElement("KeywordList");
- for ($i=0; $i < count($generalKeywords); $i++) {
- $e_keyword = $doc->createElement("Keyword", $generalKeywords[$i]);
- $e_keyword_list->appendChild($e_keyword);
- }
- $e_general->appendChild($e_keyword_list);
-
- if ($generalAbstract){
- $e_abstract = $doc->createElement("Abstract", $generalAbstract);
- $e_general->appendChild($e_abstract);
- }
-
- if ($generalLogoUrlWidth && $generalLogoUrlHeight && $generalLogoUrlFormat && $generalLogoUrl){
- $e_logo_url = $doc->createElement("LogoURL");
- $e_logo_url->setAttribute("width", $generalLogoUrlWidth);
- $e_logo_url->setAttribute("height", $generalLogoUrlHeight);
- $e_logo_url->setAttribute("format", $generalLogoUrlFormat);
-
- $e_logo_url_or = $doc->createElement("OnlineResource");
- $e_logo_url_or->setAttributeNS("http://www.opengis.net/context", "xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_logo_url_or->setAttribute("xlink:type", "simple");
- $e_logo_url_or->setAttribute("xlink:href", $generalLogoUrl);
- $e_logo_url->appendChild($e_logo_url_or);
-
- $e_general->appendChild($e_logo_url);
- }
-
- if ($generalDescriptionUrl){
- $e_description_url = $doc->createElement("DescriptionURL");
-
- $e_description_url_or = $doc->createElement("OnlineResource");
- $e_description_url_or->setAttributeNS("http://www.opengis.net/context", "xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_description_url_or->setAttribute("xlink:type", "simple");
- $e_description_url_or->setAttribute("xlink:href", $generalDescriptionUrl);
- $e_description_url->appendChild($e_description_url_or);
-
- $e_general->appendChild($e_description_url);
- }
-
- if ($generalContactElectronicMailAddress || $generalContactOrganization ||
- $generalContactPerson || $generalContactPosition || $generalContactAddressType ||
- $generalContactAddress || $generalContactCity || $generalContactStateOrProvince ||
- $generalContactPostCode || $generalContactCountry || $generalContactVoiceTelephone ||
- $generalContactFacsimileTelephone || $generalContactElectronicMailAddress) {
-
- $e_contact = $doc->createElement("ContactInformation");
-
- if ($generalContactPerson || $generalContactOrganization){
- $e_contact_person_primary = $doc->createElement("ContactPersonPrimary");
-
- if ($generalContactPerson){
- $e_contact_person = $doc->createElement("ContactPerson", $generalContactPerson);
- $e_contact_person_primary->appendChild($e_contact_person);
- }
- if ($generalContactOrganization){
- $e_contact_organization = $doc->createElement("ContactOrganization", $generalContactOrganization);
- $e_contact_person_primary->appendChild($e_contact_organization);
- }
- $e_contact->appendChild($e_contact_person_primary);
- }
-
- if ($generalContactPosition){
- $e_contact_position = $doc->createElement("ContactPosition", $generalContactPosition);
- $e_contact->appendChild($e_contact_position);
- }
-
- if ($generalContactAddressType || $arrayBBoxgeneralContactAddress ||
- $generalContactCity || $generalContactStateOrProvince ||
- $generalContactPostCode || $generalContactCountry) {
-
- $e_contact_address = $doc->createElement("ContactAddress");
-
- if ($generalContactAddressType){
- $e_address_type = $doc->createElement("AddressType", $generalContactAddressType);
- $e_contact_address->appendChild($e_address_type);
- }
- if ($generalContactAddress){
- $e_address = $doc->createElement("Address", $generalContactAddress);
- $e_contact_address->appendChild($e_address);
- }
- if ($generalContactCity){
- $e_city = $doc->createElement("City", $generalContactCity);
- $e_contact_address->appendChild($e_city);
- }
- if ($generalContactStateOrProvince){
- $e_state = $doc->createElement("StateOrProvince", $generalContactStateOrProvince);
- $e_contact_address->appendChild($e_state);
- }
- if ($generalContactPostCode){
- $e_postcode = $doc->createElement("PostCode", $generalContactPostCode);
- $e_contact_address->appendChild($e_postcode);
- }
- if ($generalContactCountry){
- $e_country = $doc->createElement("Country", $generalContactCountry);
- $e_contact_address->appendChild($e_country);
- }
- $e_contact->appendChild($e_contact_address);
- }
-
- if ($generalContactVoiceTelephone){
- $e_voice_telephone = $doc->createElement("ContactVoiceTelephone", $generalContactVoiceTelephone);
- $e_contact->appendChild($e_voice_telephone);
- }
- if ($generalContactFacsimileTelephone){
- $e_facsimile_telephone = $doc->createElement("ContactFacsimileTelephone", $generalContactFacsimileTelephone);
- $e_contact->appendChild($e_facsimile_telephone);
- }
- if ($generalContactElectronicMailAddress){
- $e_email = $doc->createElement("ContactElectronicMailAddress", $generalContactElectronicMailAddress);
- $e_contact->appendChild($e_email);
- }
- $e_general->appendChild($e_contact);
- }
- $e_view_context->appendChild($e_general);
-
-
- // LayerList
- $e_layer_list = $doc->createElement("LayerList");
-
- for ($i=0; $i < count($mapObject->wms); $i++){
- $wmsId = $mapObject->wms[$i]->wms_id;
- $wms_epsg = array();
- $wms_epsg[0] = $mapObject->epsg;
-
- if ($mapObject->wms[$i]->gui_wms_epsg != $mapObject->epsg){
- $wms_epsg[1] = $mapObject->wms[$i]->gui_wms_epsg;
- }
-
- for ($q = 0; $q < count($mapObject->wms[$i]->gui_epsg); $q++){
- $isInArray = false;
-
- for ($r=0 ; $r < count($wms_epsg); $r++){
- if ($wms_epsg[$r] == $mapObject->wms[$i]->gui_epsg[$q]){
- $isInArray = true;
- }
- }
- if ($isInArray == false){
- array_push($wms_epsg, $mapObject->wms[$i]->gui_epsg[$q]);
- }
- }
- for ($j = 0; $j < count($mapObject->wms[$i]->objLayer); $j++){
- if ($mapObject->wms[$i]->objLayer[$j]->layer_parent != ''){
- if ($mapObject->wms[$i]->objLayer[$j]->gui_layer_visible == "1"){
- $layerHidden = 0;
- }
- else{
- $layerHidden = 1;
- }
- $layerQueryable = $mapObject->wms[$i]->objLayer[$j]->layer_queryable;
- $layerQuerylayer = $mapObject->wms[$i]->objLayer[$j]->gui_layer_querylayer;
- $layerId = $mapObject->wms[$i]->objLayer[$j]->layer_uid;
- $layerName = $mapObject->wms[$i]->objLayer[$j]->layer_name;
- $layerTitle = $mapObject->wms[$i]->objLayer[$j]->layer_title;
- $layerAbstract = $mapObject->wms[$i]->wms_abstract; //To Do: insert actual abstract
- $layerDataUrl = $mapObject->wms[$i]->objLayer[$j]->layer_dataurl_href;
- $layerMetadataUrl = $mapObject->wms[$i]->objLayer[$j]->layer_metadataurl;
- $layerMinscale = $mapObject->wms[$i]->objLayer[$j]->layer_minscale;
- $layerMaxscale = $mapObject->wms[$i]->objLayer[$j]->layer_maxscale;
- $wmsVersion = $mapObject->wms[$i]->wms_version;
- $wmsTitle = $mapObject->wms[$i]->wms_title;
- $wmsOnlineResource = $mapObject->wms[$i]->wms_getmap;
-
- $e_layer = $doc->createElement("Layer");
- $e_layer->setAttribute("queryable", $layerQueryable);
- $e_layer->setAttribute("hidden", $layerHidden);
-
- $e_service = $doc->createElement("Server");
- $e_service->setAttribute("service", "OGC:WMS");
- $e_service->setAttribute("version", $wmsVersion);
- $e_service->setAttribute("title", $wmsTitle);
-
- $e_service_or = $doc->createElement("OnlineResource");
- $e_service_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_service_or->setAttribute("xlink:type", "simple");
- $e_service_or->setAttribute("xlink:href", $wmsOnlineResource);
-
- $e_service->appendChild($e_service_or);
- $e_layer->appendChild($e_service);
-
- $e_layer_name = $doc->createElement("Name", $layerName);
- $e_layer->appendChild($e_layer_name);
-
- $e_layer_title = $doc->createElement("Title", $layerTitle);
- $e_layer->appendChild($e_layer_title);
-
- if ($layerAbstract){
- $e_layer_abstract = $doc->createElement("Abstract", $layerAbstract);
- $e_layer->appendChild($e_layer_abstract);
- }
-
- $e_layer_srs = $doc->createElement("SRS", implode(" ", $wms_epsg));
- $e_layer->appendChild($e_layer_name);
-
- if ($layerDataUrl){
- $e_layer_data_url = $doc->createElement("DataURL");
-
- $e_layer_data_url_or = $doc->createElement("OnlineResource");
- $e_layer_data_url_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_layer_data_url_or->setAttribute("xlink:type", "simple");
- $e_layer_data_url_or->setAttribute("xlink:href", $layerDataUrl);
-
- $e_layer_data_url->appendChild($e_layer_data_url_or);
- $e_layer->appendChild($e_layer_data_url);
- }
-
- if ($layerMetadataUrl){
- $e_layer_metadata_url = $doc->createElement("MetadataURL");
-
- $e_layer_metadata_url_or = $doc->createElement("OnlineResource");
- $e_layer_metadata_url_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_layer_metadata_url_or->setAttribute("xlink:type", "simple");
- $e_layer_metadata_url_or->setAttribute("xlink:href", $layerMetadataUrl);
-
- $e_layer_metadata_url->appendChild($e_layer_metadata_url_or);
- $e_layer->appendChild($e_layer_metadata_url);
- }
-
- $e_extension = $doc->createElement("Extension");
-
- $e_scalehint = $doc->createElement($extension_namespace.":ScaleHint");
- $e_scalehint->setAttribute("min", $layerMinscale);
- $e_scalehint->setAttribute("max", $layerMaxscale);
- $e_extension->appendChild($e_scalehint);
-
- $e_layer_id = $doc->createElement($extension_namespace.":layer_id", $layerId);
- $e_extension->appendChild($e_layer_id);
-
- $e_wms_id = $doc->createElement($extension_namespace.":wms_id", $wmsId);
- $e_extension->appendChild($e_wms_id);
-
- $e_querylayer = $doc->createElement($extension_namespace.":querylayer", $layerQuerylayer);
- $e_extension->appendChild($e_querylayer);
-
- $e_layer->appendChild($e_extension);
-
- //layerFormat
- $e_layer_format = $doc->createElement("FormatList");
-
- $data_format_current = false;
-
- for ($k = 0; $k < count($mapObject->wms[$i]->data_format); $k++){
-
- if ($mapObject->wms[$i]->data_type[$k] == "map") {
- $layerFormat = $mapObject->wms[$i]->data_format[$k];
-
- $e_format = $doc->createElement("Format", $layerFormat);
-
- if ($data_format_current == false && (
- ($mapObject->wms[$i]->data_format[$k] == $mapObject->wms[$i]->gui_wms_mapformat) ||
- ($k == (count($mapObject->wms[$i]->data_format)-1))
- )){
-
- $e_format->setAttribute("current", "1");
- $data_format_current = true;
- }
- $e_layer_format->appendChild($e_format);
- }
- }
- $e_layer->appendChild($e_layer_format);
-
-
- // LayerStyle
- $e_layer_stylelist = $doc->createElement("StyleList");
-
- for ($k = 0; $k < count($mapObject->wms[$i]->objLayer[$j]->layer_style); $k++){
-
- if ($k == 0){
- $layerStyle_current = 1; // To do: insert proper data
- }
- else{
- $layerStyle_current = 0; // To do: insert proper data
- }
-
- $e_layer_style = $doc->createElement("Style");
-
- $layerStyleSLD = "";
-
- if ($layerStyleSLD){
- $layerStyleSLDUrl = ""; // To Do: Insert Proper Data
-
- $e_layer_style_or = $doc->createElement("OnlineResource");
- $e_layer_style_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_layer_style_or->setAttribute("xlink:type", "simple");
- $e_layer_style_or->setAttribute("xlink:href", $layerStyleSLDUrl);
- $e_layer_style->appendChild($e_layer_style_or);
- }
- else{
- //TODO: determine correct layer style entries
- $layerStyle_name = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->name;
- $layerStyle_title = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->title;
- $layerStyle_legendUrl = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->legendurl;
- $layerStyle_legendUrl_width = ""; // To Do: add proper data
- $layerStyle_legendUrl_height = ""; // To Do: add proper data
- $layerStyle_legendUrl_format = ""; // To Do: add proper data
-
- if ($layerStyle_current == 1){
- $e_layer_style->setAttribute("current", "1");
- }
-
- $e_layer_style_name = $doc->createElement("Name", $layerStyle_name);
- $e_layer_style->appendChild($e_layer_style_name);
-
- $e_layer_style_title = $doc->createElement("Title", $layerStyle_title);
- $e_layer_style->appendChild($e_layer_style_title);
-
-
- $e_layer_style_legendurl = $doc->createElement("LegendUrl");
- $e_layer_style_legendurl->setAttribute("width", $layerStyle_legendUrl_width);
- $e_layer_style_legendurl->setAttribute("height", $layerStyle_legendUrl_height);
- $e_layer_style_legendurl->setAttribute("format", $layerStyle_legendUrl_format);
-
- $e_layer_style_legendurl_or = $doc->createElement("OnlineResource");
- $e_layer_style_legendurl_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
- $e_layer_style_legendurl_or->setAttribute("xlink:type", "simple");
- $e_layer_style_legendurl_or->setAttribute("xlink:href", $layerStyle_legendUrl);
- $e_layer_style_legendurl->appendChild($e_layer_style_legendurl_or);
- $e_layer_style->appendChild($e_layer_style_legendurl);
- }
- $e_layer_stylelist->appendChild($e_layer_style);
- }
- $e_layer->appendChild($e_layer_stylelist);
-
- $e_layer_list->appendChild($e_layer);
- }
- }
- }
- $e_view_context->appendChild($e_layer_list);
-
-
-$doc->appendChild($e_view_context);
-$xml = $doc->saveXML();
-
-if ($save_in_session) {
- if (isset($_SESSION["mb_wmc"])) {
- $_SESSION["mb_wmc"] = $xml;
- }
-}
-else {
- if ($user_id && $wmc_id) {
- $sql = "INSERT INTO mb_user_wmc VALUES ($1, $2, $3, $4, $5)";
- $v = array($wmc_id, $user_id, $xml, $generalTitle, time());
- $t = array("s", "i", "s", "s", "s");
-
- $res = db_prep_query($sql, $v, $t);
- if (db_error()) {
- echo "Error while saving WMC document '" . $generalTitle . "': " . db_error();
- }
- else {
- echo "WMC document '" . $generalTitle . "' has been saved.";
- }
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php (from rev 2209, branches/2.4.5/http/php/mod_insertWmcIntoDb.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_insertWmcIntoDb.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,475 @@
+<?php
+#$Id: mod_insertWmcIntoDb.php 507 2006-11-20 10:55:57Z christoph $
+#$Header: /cvsroot/mapbender/mapbender/http/javascripts/mod_insertWmcIntoDb.php,v 1.19 2006/03/09 14:02:42 uli_rothstein Exp $
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_mb_exception.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../extensions/JSON.php");
+
+$json = new Services_JSON();
+$mapObject = $json->decode($_REQUEST["mapObject"]);
+$user_id = $_SESSION["mb_user_id"];
+$save_in_session = $_POST["saveInSession"];
+$generalTitle = $_POST["generalTitle"];
+
+$wmc_id = $user_id . '_' . time();
+
+$generalWidth = $mapObject->width;
+$generalHeight = $mapObject->height;
+$generalBboxSrs = $mapObject->epsg;
+
+$arrayBBox = explode(",", $mapObject->extent);
+$generalBboxMinx = floatval($arrayBBox[0]);
+$generalBboxMiny = floatval($arrayBBox[1]);
+$generalBboxMaxx = floatval($arrayBBox[2]);
+$generalBboxMaxy = floatval($arrayBBox[3]);
+
+$generalName = "Mapbender WMC"; // TO do : insert proper data
+$generalKeywords = array("Mapbender", "WMC"); // TO do : insert proper data
+$generalAbstract = ""; // TO do : insert proper data
+$generalLogoUrl = ""; // TO do : insert proper data
+$generalLogoUrlWidth = ""; // TO do : insert proper data
+$generalLogoUrlHeight = ""; // TO do : insert proper data
+$generalLogoUrlFormat = ""; // TO do : insert proper data
+$generalDescriptionUrl = ""; // TO do : insert proper data
+$generalContactPerson = "";
+$generalContactOrganization = "";
+$generalContactPosition = "";
+$generalContactAddressType = "";
+$generalContactAddress = "";
+$generalContactCity = "";
+$generalContactStateOrProvince = "";
+$generalContactPostCode = "";
+$generalContactCountry = "";
+$generalContactVoiceTelephone = "";
+$generalContactFacsimileTelephone = "";
+$generalContactElectronicMailAddress = "";
+
+$extension_namespace = "mapbender";
+
+// LayerList variables
+$layerHidden = "";
+$layerQueryable = "";
+$layerAbstract = "";
+$layerName = "";
+$layerSrs = "";
+$layerDataUrl = "";
+$layerMetadataUrl = "";
+$layerFormat = "";
+$layerFormat_current = "";
+$layerStyle_current = "";
+$layerStyle_name = "";
+$layerStyle_title = "";
+$layerStyle_legendURL = "";
+$layerStyle_legendURL_width = "";
+$layerStyle_legendURL_height = "";
+$layerStyle_legendURL_format = "";
+
+// generate XML
+$doc = new DOMDocument("1.0", CHARSET);
+$doc->preserveWhiteSpace = false;
+
+// ViewContext
+$e_view_context = $doc->createElementNS("http://www.opengis.net/context", "ViewContext");
+
+
+$e_view_context->setAttribute("version", "1.0.0");
+$e_view_context->setAttribute("id", $wmc_id);
+$e_view_context->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+$e_view_context->setAttribute("xmlns:mapbender", "http://www.mapbender.org");
+$e_view_context->setAttribute("xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance");
+$e_view_context->setAttribute("xsi:SchemaLocation", "http://schemas.opengis.net/context/1.0.0/context.xsd");
+
+ // General
+ $e_general = $doc->createElement("General");
+
+ $e_window = $doc->createElement("Window");
+ if (!empty($generalWidth) && !empty($generalHeight)) {
+ $e_window->setAttribute("width", $generalWidth);
+ $e_window->setAttribute("height", $generalHeight);
+ }
+ $e_general->appendChild($e_window);
+
+ $e_bbox = $doc->createElement("BoundingBox");
+ $e_bbox->setAttribute("SRS", $generalBboxSrs);
+ $e_bbox->setAttribute("minx", $generalBboxMinx);
+ $e_bbox->setAttribute("miny", $generalBboxMiny);
+ $e_bbox->setAttribute("maxx", $generalBboxMaxx);
+ $e_bbox->setAttribute("maxy", $generalBboxMaxy);
+ $e_general->appendChild($e_bbox);
+
+ $e_name = $doc->createElement("Name", $generalName);
+ $e_general->appendChild($e_name);
+
+ $e_title = $doc->createElement("Title", $generalTitle);
+ $e_general->appendChild($e_title);
+
+ $e_keyword_list = $doc->createElement("KeywordList");
+ for ($i=0; $i < count($generalKeywords); $i++) {
+ $e_keyword = $doc->createElement("Keyword", $generalKeywords[$i]);
+ $e_keyword_list->appendChild($e_keyword);
+ }
+ $e_general->appendChild($e_keyword_list);
+
+ if ($generalAbstract){
+ $e_abstract = $doc->createElement("Abstract", $generalAbstract);
+ $e_general->appendChild($e_abstract);
+ }
+
+ if ($generalLogoUrlWidth && $generalLogoUrlHeight && $generalLogoUrlFormat && $generalLogoUrl){
+ $e_logo_url = $doc->createElement("LogoURL");
+ $e_logo_url->setAttribute("width", $generalLogoUrlWidth);
+ $e_logo_url->setAttribute("height", $generalLogoUrlHeight);
+ $e_logo_url->setAttribute("format", $generalLogoUrlFormat);
+
+ $e_logo_url_or = $doc->createElement("OnlineResource");
+ $e_logo_url_or->setAttributeNS("http://www.opengis.net/context", "xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_logo_url_or->setAttribute("xlink:type", "simple");
+ $e_logo_url_or->setAttribute("xlink:href", $generalLogoUrl);
+ $e_logo_url->appendChild($e_logo_url_or);
+
+ $e_general->appendChild($e_logo_url);
+ }
+
+ if ($generalDescriptionUrl){
+ $e_description_url = $doc->createElement("DescriptionURL");
+
+ $e_description_url_or = $doc->createElement("OnlineResource");
+ $e_description_url_or->setAttributeNS("http://www.opengis.net/context", "xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_description_url_or->setAttribute("xlink:type", "simple");
+ $e_description_url_or->setAttribute("xlink:href", $generalDescriptionUrl);
+ $e_description_url->appendChild($e_description_url_or);
+
+ $e_general->appendChild($e_description_url);
+ }
+
+ if ($generalContactElectronicMailAddress || $generalContactOrganization ||
+ $generalContactPerson || $generalContactPosition || $generalContactAddressType ||
+ $generalContactAddress || $generalContactCity || $generalContactStateOrProvince ||
+ $generalContactPostCode || $generalContactCountry || $generalContactVoiceTelephone ||
+ $generalContactFacsimileTelephone || $generalContactElectronicMailAddress) {
+
+ $e_contact = $doc->createElement("ContactInformation");
+
+ if ($generalContactPerson || $generalContactOrganization){
+ $e_contact_person_primary = $doc->createElement("ContactPersonPrimary");
+
+ if ($generalContactPerson){
+ $e_contact_person = $doc->createElement("ContactPerson", $generalContactPerson);
+ $e_contact_person_primary->appendChild($e_contact_person);
+ }
+ if ($generalContactOrganization){
+ $e_contact_organization = $doc->createElement("ContactOrganization", $generalContactOrganization);
+ $e_contact_person_primary->appendChild($e_contact_organization);
+ }
+ $e_contact->appendChild($e_contact_person_primary);
+ }
+
+ if ($generalContactPosition){
+ $e_contact_position = $doc->createElement("ContactPosition", $generalContactPosition);
+ $e_contact->appendChild($e_contact_position);
+ }
+
+ if ($generalContactAddressType || $arrayBBoxgeneralContactAddress ||
+ $generalContactCity || $generalContactStateOrProvince ||
+ $generalContactPostCode || $generalContactCountry) {
+
+ $e_contact_address = $doc->createElement("ContactAddress");
+
+ if ($generalContactAddressType){
+ $e_address_type = $doc->createElement("AddressType", $generalContactAddressType);
+ $e_contact_address->appendChild($e_address_type);
+ }
+ if ($generalContactAddress){
+ $e_address = $doc->createElement("Address", $generalContactAddress);
+ $e_contact_address->appendChild($e_address);
+ }
+ if ($generalContactCity){
+ $e_city = $doc->createElement("City", $generalContactCity);
+ $e_contact_address->appendChild($e_city);
+ }
+ if ($generalContactStateOrProvince){
+ $e_state = $doc->createElement("StateOrProvince", $generalContactStateOrProvince);
+ $e_contact_address->appendChild($e_state);
+ }
+ if ($generalContactPostCode){
+ $e_postcode = $doc->createElement("PostCode", $generalContactPostCode);
+ $e_contact_address->appendChild($e_postcode);
+ }
+ if ($generalContactCountry){
+ $e_country = $doc->createElement("Country", $generalContactCountry);
+ $e_contact_address->appendChild($e_country);
+ }
+ $e_contact->appendChild($e_contact_address);
+ }
+
+ if ($generalContactVoiceTelephone){
+ $e_voice_telephone = $doc->createElement("ContactVoiceTelephone", $generalContactVoiceTelephone);
+ $e_contact->appendChild($e_voice_telephone);
+ }
+ if ($generalContactFacsimileTelephone){
+ $e_facsimile_telephone = $doc->createElement("ContactFacsimileTelephone", $generalContactFacsimileTelephone);
+ $e_contact->appendChild($e_facsimile_telephone);
+ }
+ if ($generalContactElectronicMailAddress){
+ $e_email = $doc->createElement("ContactElectronicMailAddress", $generalContactElectronicMailAddress);
+ $e_contact->appendChild($e_email);
+ }
+ $e_general->appendChild($e_contact);
+ }
+ $e_view_context->appendChild($e_general);
+
+
+ // LayerList
+ $e_layer_list = $doc->createElement("LayerList");
+
+ for ($i=0; $i < count($mapObject->wms); $i++){
+ $wmsId = $mapObject->wms[$i]->wms_id;
+ $wms_epsg = array();
+ $wms_epsg[0] = $mapObject->epsg;
+
+ if ($mapObject->wms[$i]->gui_wms_epsg != $mapObject->epsg){
+ $wms_epsg[1] = $mapObject->wms[$i]->gui_wms_epsg;
+ }
+
+ for ($q = 0; $q < count($mapObject->wms[$i]->gui_epsg); $q++){
+ $isInArray = false;
+
+ for ($r=0 ; $r < count($wms_epsg); $r++){
+ if ($wms_epsg[$r] == $mapObject->wms[$i]->gui_epsg[$q]){
+ $isInArray = true;
+ }
+ }
+ if ($isInArray == false){
+ array_push($wms_epsg, $mapObject->wms[$i]->gui_epsg[$q]);
+ }
+ }
+ for ($j = 0; $j < count($mapObject->wms[$i]->objLayer); $j++){
+ if ($mapObject->wms[$i]->objLayer[$j]->layer_parent != ''){
+ if ($mapObject->wms[$i]->objLayer[$j]->gui_layer_visible == "1"){
+ $layerHidden = 0;
+ }
+ else{
+ $layerHidden = 1;
+ }
+ $layerQueryable = $mapObject->wms[$i]->objLayer[$j]->layer_queryable;
+ $layerQuerylayer = $mapObject->wms[$i]->objLayer[$j]->gui_layer_querylayer;
+ $layerId = $mapObject->wms[$i]->objLayer[$j]->layer_uid;
+ $layerName = $mapObject->wms[$i]->objLayer[$j]->layer_name;
+ $layerTitle = $mapObject->wms[$i]->objLayer[$j]->layer_title;
+ $layerAbstract = $mapObject->wms[$i]->wms_abstract; //To Do: insert actual abstract
+ $layerDataUrl = $mapObject->wms[$i]->objLayer[$j]->layer_dataurl_href;
+ $layerMetadataUrl = $mapObject->wms[$i]->objLayer[$j]->layer_metadataurl;
+ $layerMinscale = $mapObject->wms[$i]->objLayer[$j]->layer_minscale;
+ $layerMaxscale = $mapObject->wms[$i]->objLayer[$j]->layer_maxscale;
+ $wmsVersion = $mapObject->wms[$i]->wms_version;
+ $wmsTitle = $mapObject->wms[$i]->wms_title;
+ $wmsOnlineResource = $mapObject->wms[$i]->wms_getmap;
+
+ $e_layer = $doc->createElement("Layer");
+ $e_layer->setAttribute("queryable", $layerQueryable);
+ $e_layer->setAttribute("hidden", $layerHidden);
+
+ $e_service = $doc->createElement("Server");
+ $e_service->setAttribute("service", "OGC:WMS");
+ $e_service->setAttribute("version", $wmsVersion);
+ $e_service->setAttribute("title", $wmsTitle);
+
+ $e_service_or = $doc->createElement("OnlineResource");
+ $e_service_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_service_or->setAttribute("xlink:type", "simple");
+ $e_service_or->setAttribute("xlink:href", $wmsOnlineResource);
+
+ $e_service->appendChild($e_service_or);
+ $e_layer->appendChild($e_service);
+
+ $e_layer_name = $doc->createElement("Name", $layerName);
+ $e_layer->appendChild($e_layer_name);
+
+ $e_layer_title = $doc->createElement("Title", $layerTitle);
+ $e_layer->appendChild($e_layer_title);
+
+ if ($layerAbstract){
+ $e_layer_abstract = $doc->createElement("Abstract", $layerAbstract);
+ $e_layer->appendChild($e_layer_abstract);
+ }
+
+ $e_layer_srs = $doc->createElement("SRS", implode(" ", $wms_epsg));
+ $e_layer->appendChild($e_layer_name);
+
+ if ($layerDataUrl){
+ $e_layer_data_url = $doc->createElement("DataURL");
+
+ $e_layer_data_url_or = $doc->createElement("OnlineResource");
+ $e_layer_data_url_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_layer_data_url_or->setAttribute("xlink:type", "simple");
+ $e_layer_data_url_or->setAttribute("xlink:href", $layerDataUrl);
+
+ $e_layer_data_url->appendChild($e_layer_data_url_or);
+ $e_layer->appendChild($e_layer_data_url);
+ }
+
+ if ($layerMetadataUrl){
+ $e_layer_metadata_url = $doc->createElement("MetadataURL");
+
+ $e_layer_metadata_url_or = $doc->createElement("OnlineResource");
+ $e_layer_metadata_url_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_layer_metadata_url_or->setAttribute("xlink:type", "simple");
+ $e_layer_metadata_url_or->setAttribute("xlink:href", $layerMetadataUrl);
+
+ $e_layer_metadata_url->appendChild($e_layer_metadata_url_or);
+ $e_layer->appendChild($e_layer_metadata_url);
+ }
+
+ $e_extension = $doc->createElement("Extension");
+
+ $e_scalehint = $doc->createElement($extension_namespace.":ScaleHint");
+ $e_scalehint->setAttribute("min", $layerMinscale);
+ $e_scalehint->setAttribute("max", $layerMaxscale);
+ $e_extension->appendChild($e_scalehint);
+
+ $e_layer_id = $doc->createElement($extension_namespace.":layer_id", $layerId);
+ $e_extension->appendChild($e_layer_id);
+
+ $e_wms_id = $doc->createElement($extension_namespace.":wms_id", $wmsId);
+ $e_extension->appendChild($e_wms_id);
+
+ $e_querylayer = $doc->createElement($extension_namespace.":querylayer", $layerQuerylayer);
+ $e_extension->appendChild($e_querylayer);
+
+ $e_layer->appendChild($e_extension);
+
+ //layerFormat
+ $e_layer_format = $doc->createElement("FormatList");
+
+ $data_format_current = false;
+
+ for ($k = 0; $k < count($mapObject->wms[$i]->data_format); $k++){
+
+ if ($mapObject->wms[$i]->data_type[$k] == "map") {
+ $layerFormat = $mapObject->wms[$i]->data_format[$k];
+
+ $e_format = $doc->createElement("Format", $layerFormat);
+
+ if ($data_format_current == false && (
+ ($mapObject->wms[$i]->data_format[$k] == $mapObject->wms[$i]->gui_wms_mapformat) ||
+ ($k == (count($mapObject->wms[$i]->data_format)-1))
+ )){
+
+ $e_format->setAttribute("current", "1");
+ $data_format_current = true;
+ }
+ $e_layer_format->appendChild($e_format);
+ }
+ }
+ $e_layer->appendChild($e_layer_format);
+
+
+ // LayerStyle
+ $e_layer_stylelist = $doc->createElement("StyleList");
+
+ for ($k = 0; $k < count($mapObject->wms[$i]->objLayer[$j]->layer_style); $k++){
+
+ if ($k == 0){
+ $layerStyle_current = 1; // To do: insert proper data
+ }
+ else{
+ $layerStyle_current = 0; // To do: insert proper data
+ }
+
+ $e_layer_style = $doc->createElement("Style");
+
+ $layerStyleSLD = "";
+
+ if ($layerStyleSLD){
+ $layerStyleSLDUrl = ""; // To Do: Insert Proper Data
+
+ $e_layer_style_or = $doc->createElement("OnlineResource");
+ $e_layer_style_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_layer_style_or->setAttribute("xlink:type", "simple");
+ $e_layer_style_or->setAttribute("xlink:href", $layerStyleSLDUrl);
+ $e_layer_style->appendChild($e_layer_style_or);
+ }
+ else{
+ //TODO: determine correct layer style entries
+ $layerStyle_name = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->name;
+ $layerStyle_title = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->title;
+ $layerStyle_legendUrl = $mapObject->wms[$i]->objLayer[$j]->layer_style[$k]->legendurl;
+ $layerStyle_legendUrl_width = ""; // To Do: add proper data
+ $layerStyle_legendUrl_height = ""; // To Do: add proper data
+ $layerStyle_legendUrl_format = ""; // To Do: add proper data
+
+ if ($layerStyle_current == 1){
+ $e_layer_style->setAttribute("current", "1");
+ }
+
+ $e_layer_style_name = $doc->createElement("Name", $layerStyle_name);
+ $e_layer_style->appendChild($e_layer_style_name);
+
+ $e_layer_style_title = $doc->createElement("Title", $layerStyle_title);
+ $e_layer_style->appendChild($e_layer_style_title);
+
+
+ $e_layer_style_legendurl = $doc->createElement("LegendUrl");
+ $e_layer_style_legendurl->setAttribute("width", $layerStyle_legendUrl_width);
+ $e_layer_style_legendurl->setAttribute("height", $layerStyle_legendUrl_height);
+ $e_layer_style_legendurl->setAttribute("format", $layerStyle_legendUrl_format);
+
+ $e_layer_style_legendurl_or = $doc->createElement("OnlineResource");
+ $e_layer_style_legendurl_or->setAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink");
+ $e_layer_style_legendurl_or->setAttribute("xlink:type", "simple");
+ $e_layer_style_legendurl_or->setAttribute("xlink:href", $layerStyle_legendUrl);
+ $e_layer_style_legendurl->appendChild($e_layer_style_legendurl_or);
+ $e_layer_style->appendChild($e_layer_style_legendurl);
+ }
+ $e_layer_stylelist->appendChild($e_layer_style);
+ }
+ $e_layer->appendChild($e_layer_stylelist);
+
+ $e_layer_list->appendChild($e_layer);
+ }
+ }
+ }
+ $e_view_context->appendChild($e_layer_list);
+
+
+$doc->appendChild($e_view_context);
+$xml = $doc->saveXML();
+
+if ($save_in_session) {
+ if (isset($_SESSION["mb_wmc"])) {
+ $_SESSION["mb_wmc"] = $xml;
+ }
+}
+else {
+ if ($user_id && $wmc_id) {
+ $sql = "INSERT INTO mb_user_wmc VALUES ($1, $2, $3, $4, $5)";
+ $v = array($wmc_id, $user_id, $xml, $generalTitle, time());
+ $t = array("s", "i", "s", "s", "s");
+
+ $res = db_prep_query($sql, $v, $t);
+ if (db_error()) {
+ echo "Error while saving WMC document '" . $generalTitle . "': " . db_error();
+ }
+ else {
+ echo "WMC document '" . $generalTitle . "' has been saved.";
+ }
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_layerMetadata.php
===================================================================
--- branches/2.4.5/http/php/mod_layerMetadata.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_layerMetadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,168 +0,0 @@
-<?php
-# $Id: mod_layerMetadata.php 235 2006-05-11 08:34:48Z uli $
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-function display_text($string) {
- $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);
- $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);
- $string = eregi_replace("\n", "<br>", $string);
- return $string;
-}
-
-function getEpsgByLayerId ($layer_id) { // from merge_layer.php
- $epsg_list = "";
- $sql = "SELECT DISTINCT epsg FROM layer_epsg WHERE fkey_layer_id = $1";
- $v = array($layer_id);
- $t = array('i');
- $res = db_prep_query($sql, $v, $t);
- while($row = db_fetch_array($res)){
- $epsg_list .= $row['epsg'] . " ";
- }
- return trim($epsg_list);
-}
-?>
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
- <head>
- <title>Metadaten</title>
- <meta name="description" content="Metadaten" xml:lang="de" />
- <meta name="keywords" content="Metadaten" xml:lang="de" />
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="content-language" content="de" />
- <meta http-equiv="content-style-type" content="text/css" />
- <link rel="stylesheet" type="text/css" href="../css/metadata.css" />
-<?php
- echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
- </head>
- <body>
-<?php
- $layer_id = $_GET['id'];
- $wms_getmap = urldecode($_GET['wms']);
- $layer_name = urldecode($_GET['name']);
-
- if ($layer_id) {
- $sql = "SELECT ";
- $sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, ";
- $sql .= "layer.layer_minscale, layer.layer_maxscale, layer_dataurl, layer_metadataurl, ";
- $sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
- $sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
- $sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
- $sql .= "wms.contactelectronicmailaddress, wms.country ";
- $sql .= "FROM layer, wms WHERE layer.layer_id = $1 AND layer.fkey_wms_id = wms.wms_id LIMIT 1";
- $v = array($layer_id);
- $t = array('i');
- }
- else if ($wms_getmap && $layer_name) {
- $sql = "SELECT ";
- $sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, ";
- $sql .= "layer.layer_minscale, layer.layer_maxscale, layer_dataurl, layer_metadataurl, ";
- $sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
- $sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
- $sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
- $sql .= "wms.contactelectronicmailaddress, wms.country ";
- $sql .= "FROM layer, wms WHERE layer.layer_pos <> 0 AND layer.layer_name = $1 AND layer.fkey_wms_id = wms.wms_id AND wms.wms_getmap LIKE $2 LIMIT 1";
- $v = array($layer_name, $wms_getmap."%");
- $t = array('s', 's');
- }
- else die("layer not specified!");
- $res = db_prep_query($sql,$v,$t);
- echo db_error();
- $layer = array();
- $row = db_fetch_array($res);
- $layer_id = $row['layer_id'];
-
- $sql_dep = "SELECT mb_group_name FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1 AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND b.mb_user_department = a.mb_group_description LIMIT 1";
- $v_dep = array($row['wms_owner']);
- $t_dep = array('i');
- $res_dep = db_prep_query($sql_dep, $v_dep, $t_dep);
- $row_dep = db_fetch_array($res_dep);
-
-
- $layer['ID'] = $row['layer_id'];
- $layer['Titel'] = $row['layer_title'];
- $layer['Zusammenfassung'] = $row['layer_abstract'];
- if ($row['layer_pos'] || $row['layer_parent']) {
- $layer['Minscale'] = $row['layer_minscale'];
- $layer['Maxscale'] = $row['layer_maxscale'];
- }
- $layer['Koordinatensysteme'] = str_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
-// $layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
- if ($row['wms_timestamp']) {
- $layer['Datum der Registrierung'] = date("d.m.Y",$row['wms_timestamp']);
- }
- else {
- $layer['Datum der Registrierung'] = "Keine Angabe";
- }
- $layer['Registrierende Stelle'] = $row_dep['mb_group_name'];
- $layer['WMS ID'] = $row['wms_id'];
- $layer['WMS Titel'] = $row['wms_title'];
- $layer['WMS Zusammenfassung'] = $row['wms_abstract'];
- $layer['Gebühren'] = $row['fees'];
- $layer['Zugriffsbeschränkung'] = $row['accessconstraints'];
- $layer['Ansprechpartner'] = $row['contactperson'];
- $layer['Organisation'] = $row['contactorganization'];
- $layer['Adresse'] = $row['address'];
- $layer['Stadt'] = $row['city'];
- $layer['Bundesland'] = $row['stateorprovince'];
- $layer['PLZ'] = $row['postcode'];
- $layer['Telefon'] = $row['contactvoicetelephone'];
- $layer['Fax'] = $row['contactfacsimiletelephone'];
- $layer['E-Mail'] = $row['contactelectronicmailaddress'];
- $layer['Land'] = $row['country'];
-
- echo "<table >\n";
- $t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
- $t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
- $t_c = "\n\t\t</td>\n\t</tr>\n";
-
- $keys = array_keys($layer);
- for ($j=0; $j<count($layer); $j++) {
- echo $t_a . $keys[$j] . $t_b . display_text($layer[$keys[$j]]) . $t_c;
- }
-
- if (!$row['layer_pos'] && !$row['layer_parent']) {
- $wms_id = $row['wms_id'];
- $sql = "SELECT layer.layer_title, layer.layer_id FROM layer WHERE fkey_wms_id = $1 AND layer_pos <> 0";
- $v = array($wms_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- $i=0;
- $layer = array();
- while ($row = db_fetch_array($res)) {
- $layer[$i] = array();
- $layer[$i]['Titel'] = $row['layer_title'];
- $layer[$i]['id'] = $row['layer_id'];
- $i++;
- }
- echo "<tr><th>Ebenen</th><td>";
- for ($i=0; $i<count($layer); $i++) {
- if ($i >0) echo ", ";
- echo "<a href='mod_layerMetadata.php?id=".$layer[$i]['id']."'>" . $layer[$i]['Titel'] . "</a>";
- }
- }
- echo "</td></tr></table>\n";
-?>
- </div>
- </body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_layerMetadata.php (from rev 2138, branches/2.4.5/http/php/mod_layerMetadata.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_layerMetadata.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_layerMetadata.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,169 @@
+<?php
+# $Id: mod_layerMetadata.php 235 2006-05-11 08:34:48Z uli $
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+function display_text($string) {
+ $string = eregi_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", "<a href=\"\\0\" target=_blank>\\0</a>", $string);
+ $string = eregi_replace("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@([0-9a-z](-?[0-9a-z])*\.)+[a-z]{2}([zmuvtg]|fo|me)?$", "<a href=\"mailto:\\0\" target=_blank>\\0</a>", $string);
+ $string = eregi_replace("\n", "<br>", $string);
+ return $string;
+}
+
+function getEpsgByLayerId ($layer_id) { // from merge_layer.php
+ $epsg_list = "";
+ $sql = "SELECT DISTINCT epsg FROM layer_epsg WHERE fkey_layer_id = $1";
+ $v = array($layer_id);
+ $t = array('i');
+ $res = db_prep_query($sql, $v, $t);
+ while($row = db_fetch_array($res)){
+ $epsg_list .= $row['epsg'] . " ";
+ }
+ return trim($epsg_list);
+}
+?>
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
+ <head>
+ <title>Metadaten</title>
+ <meta name="description" content="Metadaten" xml:lang="de" />
+ <meta name="keywords" content="Metadaten" xml:lang="de" />
+ <meta http-equiv="cache-control" content="no-cache">
+ <meta http-equiv="pragma" content="no-cache">
+ <meta http-equiv="expires" content="0">
+ <meta http-equiv="content-language" content="de" />
+ <meta http-equiv="content-style-type" content="text/css" />
+ <link rel="stylesheet" type="text/css" href="../css/metadata.css" />
+<?php
+ echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+ </head>
+ <body>
+<?php
+ $layer_id = $_GET['id'];
+ $wms_getmap = urldecode($_GET['wms']);
+ $layer_name = urldecode($_GET['name']);
+
+ if ($layer_id) {
+ $sql = "SELECT ";
+ $sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, ";
+ $sql .= "layer.layer_minscale, layer.layer_maxscale, layer_dataurl, layer_metadataurl, ";
+ $sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
+ $sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
+ $sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
+ $sql .= "wms.contactelectronicmailaddress, wms.country ";
+ $sql .= "FROM layer, wms WHERE layer.layer_id = $1 AND layer.fkey_wms_id = wms.wms_id LIMIT 1";
+ $v = array($layer_id);
+ $t = array('i');
+ }
+ else if ($wms_getmap && $layer_name) {
+ $sql = "SELECT ";
+ $sql .= "layer.layer_id, layer.layer_title, layer.layer_abstract, layer.layer_pos, layer.layer_parent, ";
+ $sql .= "layer.layer_minscale, layer.layer_maxscale, layer_dataurl, layer_metadataurl, ";
+ $sql .= "wms.wms_title, wms.wms_abstract, wms.wms_id, wms.fees, wms.accessconstraints, wms.contactperson, ";
+ $sql .= "wms.contactposition, wms.contactorganization, wms.address, wms.city, wms_timestamp, wms_owner, ";
+ $sql .= "wms.stateorprovince, wms.postcode, wms.contactvoicetelephone, wms.contactfacsimiletelephone, ";
+ $sql .= "wms.contactelectronicmailaddress, wms.country ";
+ $sql .= "FROM layer, wms WHERE layer.layer_pos <> 0 AND layer.layer_name = $1 AND layer.fkey_wms_id = wms.wms_id AND wms.wms_getmap LIKE $2 LIMIT 1";
+ $v = array($layer_name, $wms_getmap."%");
+ $t = array('s', 's');
+ }
+ else die("layer not specified!");
+ $res = db_prep_query($sql,$v,$t);
+ echo db_error();
+ $layer = array();
+ $row = db_fetch_array($res);
+ $layer_id = $row['layer_id'];
+
+ $sql_dep = "SELECT mb_group_name FROM mb_group AS a, mb_user AS b, mb_user_mb_group AS c WHERE b.mb_user_id = $1 AND b.mb_user_id = c.fkey_mb_user_id AND c.fkey_mb_group_id = a.mb_group_id AND b.mb_user_department = a.mb_group_description LIMIT 1";
+ $v_dep = array($row['wms_owner']);
+ $t_dep = array('i');
+ $res_dep = db_prep_query($sql_dep, $v_dep, $t_dep);
+ $row_dep = db_fetch_array($res_dep);
+
+
+ $layer['ID'] = $row['layer_id'];
+ $layer['Titel'] = $row['layer_title'];
+ $layer['Zusammenfassung'] = $row['layer_abstract'];
+ if ($row['layer_pos'] || $row['layer_parent']) {
+ $layer['Minscale'] = $row['layer_minscale'];
+ $layer['Maxscale'] = $row['layer_maxscale'];
+ }
+ $layer['Koordinatensysteme'] = str_replace(" ", ", ", getEpsgByLayerId($row['layer_id']));
+// $layer['Capabilities-Dokument'] = "<a href = '../x_geoportal/getCapabilities_document.php?wms_request=".$row['wms_id']."&layer_request=".$row['layer_pos']."' target=_blank>Capabilities-Dokument</a>";
+ if ($row['wms_timestamp']) {
+ $layer['Datum der Registrierung'] = date("d.m.Y",$row['wms_timestamp']);
+ }
+ else {
+ $layer['Datum der Registrierung'] = "Keine Angabe";
+ }
+ $layer['Registrierende Stelle'] = $row_dep['mb_group_name'];
+ $layer['WMS ID'] = $row['wms_id'];
+ $layer['WMS Titel'] = $row['wms_title'];
+ $layer['WMS Zusammenfassung'] = $row['wms_abstract'];
+ $layer['Gebühren'] = $row['fees'];
+ $layer['Zugriffsbeschränkung'] = $row['accessconstraints'];
+ $layer['Ansprechpartner'] = $row['contactperson'];
+ $layer['Organisation'] = $row['contactorganization'];
+ $layer['Adresse'] = $row['address'];
+ $layer['Stadt'] = $row['city'];
+ $layer['Bundesland'] = $row['stateorprovince'];
+ $layer['PLZ'] = $row['postcode'];
+ $layer['Telefon'] = $row['contactvoicetelephone'];
+ $layer['Fax'] = $row['contactfacsimiletelephone'];
+ $layer['E-Mail'] = $row['contactelectronicmailaddress'];
+ $layer['Land'] = $row['country'];
+
+ echo "<table >\n";
+ $t_a = "\t<tr>\n\t\t<th>\n\t\t\t";
+ $t_b = "\n\t\t</th>\n\t\t<td>\n\t\t\t";
+ $t_c = "\n\t\t</td>\n\t</tr>\n";
+
+ $keys = array_keys($layer);
+ for ($j=0; $j<count($layer); $j++) {
+ echo $t_a . $keys[$j] . $t_b . display_text($layer[$keys[$j]]) . $t_c;
+ }
+
+ if (!$row['layer_pos'] && !$row['layer_parent']) {
+ $wms_id = $row['wms_id'];
+ $sql = "SELECT layer.layer_title, layer.layer_id FROM layer WHERE fkey_wms_id = $1 AND layer_pos <> 0";
+ $v = array($wms_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ $i=0;
+ $layer = array();
+ while ($row = db_fetch_array($res)) {
+ $layer[$i] = array();
+ $layer[$i]['Titel'] = $row['layer_title'];
+ $layer[$i]['id'] = $row['layer_id'];
+ $i++;
+ }
+ echo "<tr><th>Ebenen</th><td>";
+ for ($i=0; $i<count($layer); $i++) {
+ if ($i >0) echo ", ";
+ echo "<a href='mod_layerMetadata.php?id=".$layer[$i]['id']."'>" . $layer[$i]['Titel'] . "</a>";
+ }
+ }
+ echo "</td></tr></table>\n";
+?>
+ </div>
+ </body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_loadCapabilities.php
===================================================================
--- branches/2.4.5/http/php/mod_loadCapabilities.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilities.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,179 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-include(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$secParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-$self = $PHP_SELF."?".$secParams;
-import_request_variables("PG");
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Load WMS</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .list_guis{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080;
- }
- a:link{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- text-decoration : none;
- color: #808080;
- }
- a:visited {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- a:active {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- -->
-</style>
-<script language="JavaScript">
-function validate(wert){
- if(wert == 'guiList'){
- var listIndex = document.form1.guiList.selectedIndex;
- if(listIndex<0){
- alert("Please select a GUI.");
- return false;
- }
- else{
- var gui_id=document.form1.guiList.options[listIndex].value;
- document.form1.action = '../php/mod_loadwms.php?<?php echo $secParams ?>';
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-
-<?php
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-echo "<table cellpadding='0' cellspacing='0' border='0'>";
-echo "<tr>";
-echo "<td>";
-if (count($ownguis)>0){
- echo"GUI";
- echo"<br>";
- $v = array();
- $t = array();
- $sql = "SELECT * FROM gui WHERE gui_id IN (";
- for($i=0; $i<count($ownguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i+1);
- array_push($v,$ownguis[$i]);
- array_push($t,'s');
- }
- $sql .= ") ORDER BY gui_name";
- $res = db_prep_query($sql,$v,$t);
- echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["gui_id"]."' ";
- if($guiList && $guiList == $row["gui_name"]){
- echo "selected";
- }
- echo ">".$row["gui_name"]."</option>";
- }
- $arrayGUIs=$_SESSION["mb_user_guis"];
- echo count($arrayGUIs);
- echo "</select><br><br>";
- echo "</td>";
- echo "<td>";
- echo"WMS";
- echo"<br>";
-
- if(isset($guiList) && $guiList!=""){
- $sql = "SELECT DISTINCT wms.wms_title,gui_wms_position from gui_wms JOIN ";
- $sql .= "gui on gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON gui_wms.fkey_wms_id = wms.wms_id ";
- $sql .= "and gui_wms.fkey_gui_id = gui.gui_id where gui.gui_name = $1 order by gui_wms_position";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $count=0;
- echo"<select size='8' name='wmsList' style='width:200px'>";
-
- while($row = db_fetch_array($res)){
- if ($row["wms_title"]!=""){
- echo "<option value='' ";
- echo ">".$row["wms_title"]."</option>";
- }
- $count++;
- }
- echo "</select><br><br>";
- }
- else{
- echo"<select size='8' name='wmsList' style='width:200px' on Click='submit()'>";
- echo "</select><br><br>";
- }
- echo "</td>";
- echo "<tr></table><br>";
- echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
- echo "<i>(Triple click to select and copy)</i><br>";
- echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1<br>";
- echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0<br>";
- echo "REQUEST=capabilities&WMTVER=1.0.0<br><br>";
- echo "Link to WMS Capabilities URL:<br>";
- #echo "Load WMS capabilities URL:<br>"
-
- if (isset($xml_file)){
- echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
- }else{
- echo"<input type='text' name='xml_file' size='50' value='http://'>";
- }
- echo"<input type='button' name='loadCap' value='Load' onClick='validate(\"guiList\")'>";
- echo "</form>";
-}
-else{
- echo "There are no guis available for this user. Please create a gui first.";
-}
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_loadCapabilities.php (from rev 2209, branches/2.4.5/http/php/mod_loadCapabilities.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadCapabilities.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilities.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,173 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+include(dirname(__FILE__)."/../php/mb_validatePermission.php");
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Load WMS</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .list_guis{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080;
+ }
+ a:link{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ text-decoration : none;
+ color: #808080;
+ }
+ a:visited {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ a:active {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ -->
+</style>
+<script language="JavaScript">
+function validate(wert){
+ if(wert == 'guiList'){
+ var listIndex = document.form1.guiList.selectedIndex;
+ if(listIndex<0){
+ alert("Please select a GUI.");
+ return false;
+ }
+ else{
+ var gui_id=document.form1.guiList.options[listIndex].value;
+ document.form1.action = '../php/mod_loadwms.php?<?php echo SID; ?>';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+
+<?php
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+echo "<table cellpadding='0' cellspacing='0' border='0'>";
+echo "<tr>";
+echo "<td>";
+if (count($ownguis)>0){
+ echo"GUI";
+ echo"<br>";
+ $v = array();
+ $t = array();
+ $sql = "SELECT * FROM gui WHERE gui_id IN (";
+ for($i=0; $i<count($ownguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i+1);
+ array_push($v,$ownguis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ") ORDER BY gui_name";
+ $res = db_prep_query($sql,$v,$t);
+ echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["gui_id"]."' ";
+ if($guiList && $guiList == $row["gui_name"]){
+ echo "selected";
+ }
+ echo ">".$row["gui_name"]."</option>";
+ }
+ $arrayGUIs=$_SESSION["mb_user_guis"];
+ echo count($arrayGUIs);
+ echo "</select><br><br>";
+ echo "</td>";
+ echo "<td>";
+ echo"WMS";
+ echo"<br>";
+
+ if(isset($guiList) && $guiList!=""){
+ $sql = "SELECT DISTINCT wms.wms_title,gui_wms_position from gui_wms JOIN ";
+ $sql .= "gui on gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON gui_wms.fkey_wms_id = wms.wms_id ";
+ $sql .= "and gui_wms.fkey_gui_id = gui.gui_id where gui.gui_name = $1 order by gui_wms_position";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ echo"<select size='8' name='wmsList' style='width:200px'>";
+
+ while($row = db_fetch_array($res)){
+ if ($row["wms_title"]!=""){
+ echo "<option value='' ";
+ echo ">".$row["wms_title"]."</option>";
+ }
+ $count++;
+ }
+ echo "</select><br><br>";
+ }
+ else{
+ echo"<select size='8' name='wmsList' style='width:200px' on Click='submit()'>";
+ echo "</select><br><br>";
+ }
+ echo "</td>";
+ echo "<tr></table><br>";
+ echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
+ echo "<i>(Triple click to select and copy)</i><br>";
+ echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1<br>";
+ echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0<br>";
+ echo "REQUEST=capabilities&WMTVER=1.0.0<br><br>";
+ echo "Link to WMS Capabilities URL:<br>";
+ #echo "Load WMS capabilities URL:<br>"
+
+ if (isset($xml_file)){
+ echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
+ }else{
+ echo"<input type='text' name='xml_file' size='50' value='http://'>";
+ }
+ echo"<input type='button' name='loadCap' value='Load' onClick='validate(\"guiList\")'>";
+ echo "</form>";
+}
+else{
+ echo "There are no guis available for this user. Please create a gui first.";
+}
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php
===================================================================
--- branches/2.4.5/http/php/mod_loadCapabilitiesList.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,298 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-include(dirname(__FILE__)."/../php/mb_validatePermission.php");
-import_request_variables("PG");
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Load WMS from Catalog</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .list_guis{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080;
- }
-.text1{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 15px;
- position:absolute;
- top:190px;
-}
-.select1{
- position:absolute;
- top:210px;
- width:270px;
-}
-.text2{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 15px;
- position:absolute;
- top:190px;
- left:300px;
-}
-.select2{
- position:absolute;
- top:210px;
- left:300px;
-}
-.getcapabilities{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 15px;
- position:absolute;
- top:570px;
-}
-
- -->
-</style>
-<script language="JavaScript">
-function validate(wert){
- if(wert == 'guiList'){
- var listIndex = document.form1.guiList.selectedIndex;
- if(listIndex<0){
- alert("Please select a GUI.");
- return false;
- }
- else{
- var gui_id=document.form1.guiList.options[listIndex].value;
- document.form1.action='../php/mod_loadwms.php';
- document.form1.submit();
- }
- }
-}
-function load(){
- if(document.form1.guiList.selectedIndex<0){
- alert("Please select a GUI.");
- return false;
- }
- var gui_ind = document.form1.guiList.selectedIndex;
- var ind = document.form1.wmsID.selectedIndex;
- var ind2 = document.form1.guiID.selectedIndex;
- var permission = confirm("Load " + document.form1.wmsID.options[ind].text + " FROM " + document.form1.guiID.options[ind2].value + " INTO "+document.form1.guiList.options[gui_ind].value+" ?");
- if(permission == true){
- document.form1.submit();
- }
- else{
- document.form1.guiID.selectedIndex = -1;
- }
-}
-</script>
-</head>
-<body>
-
-<?php
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-
-
-
-###INSERT
-if(isset($wmsID) && isset($guiID)){
- $sql_pos = "SELECT MAX(gui_wms_position) AS my_gui_wms_position FROM gui_wms WHERE fkey_gui_id = $1";
- $v = array($guiList);
- $t = array('s');
- $res_pos = db_prep_query($sql_pos,$v,$t);
- if(db_result($res_pos,0,"my_gui_wms_position") > -1){
- $gui_wms_position = db_result($res_pos,0,"my_gui_wms_position") + 1;
- }
- else{
- $gui_wms_position = 0;
- }
-
- $sql = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
- $v = array($guiID,$wmsID);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $sql_ins = "INSERT INTO gui_wms (fkey_gui_id,fkey_wms_id,gui_wms_position,gui_wms_mapformat,";
- $sql_ins .= "gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible) ";
- $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8)";
- $v = array($guiList,$wmsID,$gui_wms_position,$row["gui_wms_mapformat"],$row["gui_wms_featureinfoformat"],
- $row["gui_wms_exceptionformat"],$row["gui_wms_epsg"],$row["gui_wms_visible"]);
- $t = array('s','i','i','s','s','s','s','i');
- db_prep_query($sql_ins,$v,$t);
- $cnt++;
- }
-
- $sql = "SELECT * FROM gui_layer WHERE fkey_gui_id = $1 AND gui_layer_wms_id = $2";
- $v = array($guiID, $wmsID);
- $t = array("s", "i");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- $sql_ins = "INSERT INTO gui_layer (fkey_gui_id,fkey_layer_id,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,";
- $sql_ins .= "gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_priority) ";
- $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
- $v = array($guiList,$row["fkey_layer_id"],$wmsID,$row["gui_layer_status"],$row["gui_layer_selectable"],
- $row["gui_layer_visible"],$row["gui_layer_queryable"],$row["gui_layer_querylayer"],$row["gui_layer_minscale"],
- $row["gui_layer_maxscale"],$row["gui_layer_priority"]);
- $t = array('s','i','i','i','i','i','i','i','i','i','i');
- db_prep_query($sql_ins,$v,$t);
- $cnt++;
- }
-}
-
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-
-echo "<table cellpadding='0' cellspacing='0' border='0'>";
-echo "<tr>";
-echo "<td>";
-if (count($ownguis)>0){
- echo"GUI";
- echo"<br>";
-
- $sql = "SELECT * FROM gui WHERE gui_id IN (";
- $v = $ownguis;
- $t = array();
- for ($i = 1; $i <= count($ownguis); $i++){
- if ($i > 1) {
- $sql .= ",";
- }
- $sql .= "$".$i;
- array_push($t, "s");
- }
- $sql .= ") ORDER BY gui_name";
- $res = db_prep_query($sql, $v, $t);
- $count=0;
- echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
- while($row = db_fetch_array($res)){
- $gui_id[$count]=$row["gui_id"];
- $gui_name[$count]=$row["gui_name"];
- $gui_description[$count]=$row["gui_description"];
- $count++;
- echo "<option value='".$row["gui_id"]."' ";
- if($guiList && $guiList == $row["gui_name"]){
- echo "selected";
- }
- echo ">".$row["gui_name"]."</option>";
- }
-
- $arrayGUIs=$_SESSION["mb_user_guis"];
- echo count($arrayGUIs);
- echo "</select><br><br>";
-
- echo "</td>";
- echo "<td>";
- echo"WMS";
- echo"<br>";
- if(isset($guiList) && $guiList!=""){
- $sql = "SELECT DISTINCT wms.wms_title, gui_wms_position FROM gui_wms ";
- $sql .= "JOIN gui ON gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON gui_wms.fkey_wms_id=wms.wms_id ";
- $sql .= "AND gui_wms.fkey_gui_id=gui.gui_id WHERE gui.gui_name = $1 ORDER BY gui_wms_position";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- $count=0;
- echo"<select size='8' name='wmsList' style='width:200px'>";
-
- while($row = db_fetch_array($res)){
- if ($row["wms_title"]!=""){
- echo "<option value='' ";
- echo ">".$row["wms_title"]."</option>";
- }
- $count++;
- }
- echo "</select><br><br>";
- }else{
- echo"<select size='8' name='wmsList' style='width:200px' on Click='submit()'>";
- echo "</select><br><br>";
- }
- echo "</td>";
- echo "<tr></table><br>";
-
- echo"<div class='text1'>Load WMS</div>";
- $sql = "SELECT DISTINCT wms.wms_id,wms.wms_title,wms.wms_abstract,wms.wms_owner FROM gui_wms JOIN wms ON ";
- $sql .= "wms.wms_id = gui_wms.fkey_wms_id WHERE gui_wms.fkey_gui_id IN(";
- $v = $arrayGUIs;
- $t = array();
- for ($i = 1; $i <= count($arrayGUIs); $i++){
- if ($i > 1) {
- $sql .= ",";
- }
- $sql .= "$" . $i;
- array_push($t, "s");
- }
- $sql .= ") ORDER BY wms.wms_title";
- $res = db_prep_query($sql, $v, $t);
- echo "<select class='select1' name='wmsID' size='20' onchange='submit()'>";
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["wms_id"]."' ";
- if($row["wms_owner"] == $_SESSION["mb_user_id"]){
- echo "style='color:green' ";
- }
- else{
- echo "style='color:red' ";
- }
- if(isset($wmsID) && $wmsID == $row["wms_id"]){
- echo "selected";
- $wms_getcapabilities = $row["wms_getcapabilities"];
- }
- echo ">".$row["wms_title"]."</option>";
- $cnt++;
- }
- echo "</select>";
-
- if(isset($wmsID)){
- echo "<div class='text2'>FROM:</div>";
- $sql = "SELECT * from gui_wms WHERE fkey_wms_id = $1 ORDER BY fkey_gui_id";
- $v = array($wmsID);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- echo "<select class='select2' name='guiID' size='20' onchange='load()'>";
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["fkey_gui_id"]."' ";
- echo ">".$row["fkey_gui_id"]."</option>";
- $cnt++;
- }
- echo "</select>";
-}
-echo "</form>";
-}else{
- echo "There are no guis available for this user. Please create a gui first.";
-}
-echo "<div class='getcapabilities'>" . $wms_getcapabilities . "</div>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php (from rev 2209, branches/2.4.5/http/php/mod_loadCapabilitiesList.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilitiesList.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,292 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require(dirname(__FILE__)."/../php/mb_validatePermission.php");
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Load WMS from Catalog</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .list_guis{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080;
+ }
+.text1{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 15px;
+ position:absolute;
+ top:190px;
+}
+.select1{
+ position:absolute;
+ top:210px;
+ width:270px;
+}
+.text2{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 15px;
+ position:absolute;
+ top:190px;
+ left:300px;
+}
+.select2{
+ position:absolute;
+ top:210px;
+ left:300px;
+}
+.getcapabilities{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 15px;
+ position:absolute;
+ top:570px;
+}
+
+ -->
+</style>
+<script language="JavaScript">
+function validate(wert){
+ if(wert == 'guiList'){
+ var listIndex = document.form1.guiList.selectedIndex;
+ if(listIndex<0){
+ alert("Please select a GUI.");
+ return false;
+ }
+ else{
+ var gui_id=document.form1.guiList.options[listIndex].value;
+ document.form1.action='../php/mod_loadwms.php<?php echo SID;?>';
+ document.form1.submit();
+ }
+ }
+}
+function load(){
+ if(document.form1.guiList.selectedIndex<0){
+ alert("Please select a GUI.");
+ return false;
+ }
+ var gui_ind = document.form1.guiList.selectedIndex;
+ var ind = document.form1.wmsID.selectedIndex;
+ var ind2 = document.form1.guiID_.selectedIndex;
+ var permission = confirm("Load " + document.form1.wmsID.options[ind].text + " FROM " + document.form1.guiID_.options[ind2].value + " INTO "+document.form1.guiList.options[gui_ind].value+" ?");
+ if(permission == true){
+ document.form1.submit();
+ }
+ else{
+ document.form1.guiID_.selectedIndex = -1;
+ }
+}
+</script>
+</head>
+<body>
+
+<?php
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+
+
+
+###INSERT
+if(isset($wmsID) && isset($guiID_)){
+ $sql_pos = "SELECT MAX(gui_wms_position) AS my_gui_wms_position FROM gui_wms WHERE fkey_gui_id = $1";
+ $v = array($guiList);
+ $t = array('s');
+ $res_pos = db_prep_query($sql_pos,$v,$t);
+ if(db_result($res_pos,0,"my_gui_wms_position") > -1){
+ $gui_wms_position = db_result($res_pos,0,"my_gui_wms_position") + 1;
+ }
+ else{
+ $gui_wms_position = 0;
+ }
+
+ $sql = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
+ $v = array($guiID_,$wmsID);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $sql_ins = "INSERT INTO gui_wms (fkey_gui_id,fkey_wms_id,gui_wms_position,gui_wms_mapformat,";
+ $sql_ins .= "gui_wms_featureinfoformat,gui_wms_exceptionformat,gui_wms_epsg,gui_wms_visible) ";
+ $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8)";
+ $v = array($guiList,$wmsID,$gui_wms_position,$row["gui_wms_mapformat"],$row["gui_wms_featureinfoformat"],
+ $row["gui_wms_exceptionformat"],$row["gui_wms_epsg"],$row["gui_wms_visible"]);
+ $t = array('s','i','i','s','s','s','s','i');
+ db_prep_query($sql_ins,$v,$t);
+ $cnt++;
+ }
+
+ $sql = "SELECT * FROM gui_layer WHERE fkey_gui_id = $1 AND gui_layer_wms_id = $2";
+ $v = array($guiID_, $wmsID);
+ $t = array("s", "i");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ $sql_ins = "INSERT INTO gui_layer (fkey_gui_id,fkey_layer_id,gui_layer_wms_id,gui_layer_status,gui_layer_selectable,";
+ $sql_ins .= "gui_layer_visible,gui_layer_queryable,gui_layer_querylayer,gui_layer_minscale,gui_layer_maxscale,gui_layer_priority) ";
+ $sql_ins .= "VALUES ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11)";
+ $v = array($guiList,$row["fkey_layer_id"],$wmsID,$row["gui_layer_status"],$row["gui_layer_selectable"],
+ $row["gui_layer_visible"],$row["gui_layer_queryable"],$row["gui_layer_querylayer"],$row["gui_layer_minscale"],
+ $row["gui_layer_maxscale"],$row["gui_layer_priority"]);
+ $t = array('s','i','i','i','i','i','i','i','i','i','i');
+ db_prep_query($sql_ins,$v,$t);
+ $cnt++;
+ }
+}
+
+echo "<form name='form1' action='" . $self."' method='post'>";
+
+echo "<table cellpadding='0' cellspacing='0' border='0'>";
+echo "<tr>";
+echo "<td>";
+if (count($ownguis)>0){
+ echo"GUI";
+ echo"<br>";
+
+ $sql = "SELECT * FROM gui WHERE gui_id IN (";
+ $v = $ownguis;
+ $t = array();
+ for ($i = 1; $i <= count($ownguis); $i++){
+ if ($i > 1) {
+ $sql .= ",";
+ }
+ $sql .= "$".$i;
+ array_push($t, "s");
+ }
+ $sql .= ") ORDER BY gui_name";
+ $res = db_prep_query($sql, $v, $t);
+ $count=0;
+ echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
+ while($row = db_fetch_array($res)){
+ $gui_name[$count]=$row["gui_name"];
+ $gui_description[$count]=$row["gui_description"];
+ $count++;
+ echo "<option value='".$row["gui_id"]."' ";
+ if($guiList && $guiList == $row["gui_name"]){
+ echo "selected";
+ }
+ echo ">".$row["gui_name"]."</option>";
+ }
+
+ $arrayGUIs=$_SESSION["mb_user_guis"];
+ echo count($arrayGUIs);
+ echo "</select><br><br>";
+
+ echo "</td>";
+ echo "<td>";
+ echo"WMS";
+ echo"<br>";
+ if(isset($guiList) && $guiList!=""){
+ $sql = "SELECT DISTINCT wms.wms_title, gui_wms_position FROM gui_wms ";
+ $sql .= "JOIN gui ON gui_wms.fkey_gui_id = gui.gui_id JOIN wms ON gui_wms.fkey_wms_id=wms.wms_id ";
+ $sql .= "AND gui_wms.fkey_gui_id=gui.gui_id WHERE gui.gui_name = $1 ORDER BY gui_wms_position";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ echo"<select size='8' name='wmsList' style='width:200px'>";
+
+ while($row = db_fetch_array($res)){
+ if ($row["wms_title"]!=""){
+ echo "<option value='' ";
+ echo ">".$row["wms_title"]."</option>";
+ }
+ $count++;
+ }
+ echo "</select><br><br>";
+ }else{
+ echo"<select size='8' name='wmsList' style='width:200px' on Click='submit()'>";
+ echo "</select><br><br>";
+ }
+ echo "</td>";
+ echo "<tr></table><br>";
+
+ echo"<div class='text1'>Load WMS</div>";
+ $sql = "SELECT DISTINCT wms.wms_id,wms.wms_title,wms.wms_abstract,wms.wms_owner FROM gui_wms JOIN wms ON ";
+ $sql .= "wms.wms_id = gui_wms.fkey_wms_id WHERE gui_wms.fkey_gui_id IN(";
+ $v = $arrayGUIs;
+ $t = array();
+ for ($i = 1; $i <= count($arrayGUIs); $i++){
+ if ($i > 1) {
+ $sql .= ",";
+ }
+ $sql .= "$" . $i;
+ array_push($t, "s");
+ }
+ $sql .= ") ORDER BY wms.wms_title";
+ $res = db_prep_query($sql, $v, $t);
+ echo "<select class='select1' name='wmsID' size='20' onchange='submit()'>";
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["wms_id"]."' ";
+ if($row["wms_owner"] == $_SESSION["mb_user_id"]){
+ echo "style='color:green' ";
+ }
+ else{
+ echo "style='color:red' ";
+ }
+ if(isset($wmsID) && $wmsID == $row["wms_id"]){
+ echo "selected";
+ $wms_getcapabilities = $row["wms_getcapabilities"];
+ }
+ echo ">".$row["wms_title"]."</option>";
+ $cnt++;
+ }
+ echo "</select>";
+
+ if(isset($wmsID)){
+ echo "<div class='text2'>FROM:</div>";
+ $sql = "SELECT * from gui_wms WHERE fkey_wms_id = $1 ORDER BY fkey_gui_id";
+ $v = array($wmsID);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ echo "<select class='select2' name='guiID_' size='20' onchange='load()'>";
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["fkey_gui_id"]."' ";
+ echo ">".$row["fkey_gui_id"]."</option>";
+ $cnt++;
+ }
+ echo "</select>";
+}
+echo "</form>";
+}else{
+ echo "There are no guis available for this user. Please create a gui first.";
+}
+echo "<div class='getcapabilities'>" . $wms_getcapabilities . "</div>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php
===================================================================
--- branches/2.4.5/http/php/mod_loadCapabilities_temp.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,105 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/mb_validateInput.php");
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-import_request_variables("PG");
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Load WMS Capabilities</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #fbc327;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .list_guis{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080;
- }
- a:link{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- text-decoration : none;
- color: #808080;
- }
- a:visited {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- a:active {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- -->
-</style>
-<script language="JavaScript">
-function validate(wert){
- var gui_id= document.form1.gui_id.value;
- document.form1.action='../php/mod_loadwms_temp.php';
- document.form1.submit();
- var main = parent.window.location;
- main.reload();
-}
-//location.reload() target="_self">reload page</a>
-
-</script>
-</head>
-<body>
-
-<?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-
-$gui_id = $_SESSION["mb_user_gui"];
-
-echo "<input type='hidden'name='gui_id' value='".$gui_id."'>";
-
-echo"WMS hinzuladen<br>";
-if (isset($xml_file)){
- echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
-}else{
- echo"<input type='text' name='xml_file' size='50' value='http://'>";
-}
-echo"<input type='button' name='loadCap' value='Laden' onClick='validate(\"guiList\")'>";
-echo "</form>";
-#echo "<a href='javascript:location.reload()' target='_parent'>reload page</a>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php (from rev 2138, branches/2.4.5/http/php/mod_loadCapabilities_temp.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadCapabilities_temp.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,103 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+include(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/mb_validateInput.php");
+import_request_variables("PG");
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Load WMS Capabilities</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #fbc327;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .list_guis{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080;
+ }
+ a:link{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ text-decoration : none;
+ color: #808080;
+ }
+ a:visited {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ a:active {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ -->
+</style>
+<script language="JavaScript">
+function validate(wert){
+ var gui_id= document.form1.gui_id.value;
+ document.form1.action='../php/mod_loadwms_temp.php';
+ document.form1.submit();
+ var main = parent.window.location;
+ main.reload();
+}
+//location.reload() target="_self">reload page</a>
+
+</script>
+</head>
+<body>
+
+<?php
+$con = db_connect($DBSERVER,$OWNER,$PW);
+
+echo "<form name='form1' action='" . $self."' method='post'>";
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+echo "<input type='hidden'name='gui_id' value='".$gui_id."'>";
+
+echo"WMS hinzuladen<br>";
+if (isset($xml_file)){
+ echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
+}else{
+ echo"<input type='text' name='xml_file' size='50' value='http://'>";
+}
+echo"<input type='button' name='loadCap' value='Laden' onClick='validate(\"guiList\")'>";
+echo "</form>";
+#echo "<a href='javascript:location.reload()' target='_parent'>reload page</a>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php
===================================================================
--- branches/2.4.5/http/php/mod_loadWFSCapabilities.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,179 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-include(dirname(__FILE__)."/../php/mb_validatePermission.php");
-include(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-import_request_variables("PG");
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Load WFS Capabilities</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
- .list_guis{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080;
- }
- a:link{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- text-decoration : none;
- color: #808080;
- }
- a:visited {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- a:active {
- font-family: Arial, Helvetica, sans-serif;
- text-decoration : none;
- color: #808080;
- font-size : 12px;
- }
- -->
-</style>
-<script language="JavaScript">
-function validate(wert){
- if(wert == 'guiList'){
- var listIndex = document.form1.guiList.selectedIndex;
- if(listIndex<0){
- alert("Please select a GUI.");
- return false;
- }
- else{
- var gui_id=document.form1.guiList.options[listIndex].value;
- document.form1.action='../php/mod_loadwfs.php';
- document.form1.submit();
- }
- }
-}
-</script>
-</head>
-<body>
-
-<?php
-$con = db_connect(DBSERVER,OWNER,PW);
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-echo count($ownguis)."<br>";
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-
-echo "<table cellpadding='0' cellspacing='0' border='0'>";
-echo "<tr>";
-echo "<td>";
-echo"GUI";
-echo"<br>";
-#$sql = "SELECT * from gui_mb_user, gui WHERE gui.gui_id = gui_mb_user.fkey_gui_id ";
-#$sql .= "AND gui.gui_public = 1 AND gui_mb_user.fkey_mb_user_id = $1 Order BY fkey_gui_id ;";
-#$v = array($_SESSION["mb_user_id"]);
-#$t = array('i');
-#$res = db_prep_query($sql,$v,$t);
-#$count=0;
-$gui_id =array();
-if (count($ownguis)>0){
- for($i=0; $i<count($ownguis); $i++){
- $gui_id[$i]=$ownguis[$i];
- }
-}
-
- echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
- for ($i=0; $i<count($ownguis);$i++){
- echo "<option value='".$gui_id[$i]."' ";
- if($guiList && $guiList == $gui_id[$i]){
- echo "selected";
- $selected_gui_id=$gui_id[$i];
- }
- else{
- if ($i==0){
- echo "selected";
- $selected_gui_id=$gui_id[$i];
- }
- }
- echo ">".$gui_id[$i]."</option>";
- }
-echo "</select><br><br>";
-
-echo "</td>";
-echo "<td>";
-#echo"WFS";
-echo"<br>";
-###
-
-
-if(isset($guiList) && $guiList!=""){
- $sql = "SELECT Distinct wfs.wfs_title from gui_wfs LEFT JOIN wfs ON gui_wfs.fkey_wfs_id=wfs.wfs_id ";
- $sql .= "where gui_wfs.fkey_gui_id = $1 order by wfs.wfs_title";
- $v = array($guiList);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
-
- $count=0;
- echo"<select size='8' name='wfsList' style='width:200px'>";
-
- while($row = db_fetch_array($res)){
- if ($row["wfs_title"]!=""){
- echo "<option value='' ";
- echo ">".$row["wfs_title"]."</option>";
- }
- $count++;
- }
- echo "</select><br><br>";
-}
-echo "</td>";
-echo "<tr></table><br>";
-echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
-echo "<i>(Triple click to select and copy)</i><br>";
-echo "REQUEST=getCapabilities&VERSION=1.0.0&SERVICE=WFS<br>";
-echo "<br><br>";
-echo "Link to WFS Capabilities URL:<br>";
-#echo "Load WMS capabilities URL:<br>"
-
-if (isset($xml_file)){
- echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
-}else{
- echo"<input type='text' name='xml_file' size='50' value='http://'>";
-}
-echo"<input type='button' name='loadCap' value='Load' onClick='validate(\"guiList\")'>";
-echo "</form>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php (from rev 2219, branches/2.4.5/http/php/mod_loadWFSCapabilities.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadWFSCapabilities.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,174 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+include(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Load WFS Capabilities</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+ .list_guis{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080;
+ }
+ a:link{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ text-decoration : none;
+ color: #808080;
+ }
+ a:visited {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ a:active {
+ font-family: Arial, Helvetica, sans-serif;
+ text-decoration : none;
+ color: #808080;
+ font-size : 12px;
+ }
+ -->
+</style>
+<script language="JavaScript">
+function validate(wert){
+ if(wert == 'guiList'){
+ var listIndex = document.form1.guiList.selectedIndex;
+ if(listIndex<0){
+ alert("Please select a GUI.");
+ return false;
+ }
+ else{
+ var gui_id=document.form1.guiList.options[listIndex].value;
+ document.form1.action='../php/mod_loadwfs.php?<?php echo $urlParameters;?>';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+</head>
+<body>
+
+<?php
+$con = db_connect(DBSERVER,OWNER,PW);
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+echo count($ownguis)."<br>";
+echo "<form name='form1' action='" . $self."' method='post'>";
+
+echo "<table cellpadding='0' cellspacing='0' border='0'>";
+echo "<tr>";
+echo "<td>";
+echo"GUI";
+echo"<br>";
+#$sql = "SELECT * from gui_mb_user, gui WHERE gui.gui_id = gui_mb_user.fkey_gui_id ";
+#$sql .= "AND gui.gui_public = 1 AND gui_mb_user.fkey_mb_user_id = $1 Order BY fkey_gui_id ;";
+#$v = array($_SESSION["mb_user_id"]);
+#$t = array('i');
+#$res = db_prep_query($sql,$v,$t);
+#$count=0;
+$gui_id =array();
+if (count($ownguis)>0){
+ for($i=0; $i<count($ownguis); $i++){
+ $gui_id[$i]=$ownguis[$i];
+ }
+}
+
+ echo"<select size='8' name='guiList' style='width:200px' onClick='submit()'>";
+ for ($i=0; $i<count($ownguis);$i++){
+ echo "<option value='".$gui_id[$i]."' ";
+ if($guiList && $guiList == $gui_id[$i]){
+ echo "selected";
+ $selected_gui_id=$gui_id[$i];
+ }
+ else{
+ if ($i==0){
+ echo "selected";
+ $selected_gui_id=$gui_id[$i];
+ }
+ }
+ echo ">".$gui_id[$i]."</option>";
+ }
+echo "</select><br><br>";
+
+echo "</td>";
+echo "<td>";
+#echo"WFS";
+echo"<br>";
+###
+
+
+if(isset($guiList) && $guiList!=""){
+ $sql = "SELECT Distinct wfs.wfs_title from gui_wfs LEFT JOIN wfs ON gui_wfs.fkey_wfs_id=wfs.wfs_id ";
+ $sql .= "where gui_wfs.fkey_gui_id = $1 order by wfs.wfs_title";
+ $v = array($guiList);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+
+ $count=0;
+ echo"<select size='8' name='wfsList' style='width:200px'>";
+
+ while($row = db_fetch_array($res)){
+ if ($row["wfs_title"]!=""){
+ echo "<option value='' ";
+ echo ">".$row["wfs_title"]."</option>";
+ }
+ $count++;
+ }
+ echo "</select><br><br>";
+}
+echo "</td>";
+echo "<tr></table><br>";
+echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
+echo "<i>(Triple click to select and copy)</i><br>";
+echo "REQUEST=getCapabilities&VERSION=1.0.0&SERVICE=WFS<br>";
+echo "<br><br>";
+echo "Link to WFS Capabilities URL:<br>";
+#echo "Load WMS capabilities URL:<br>"
+
+if (isset($xml_file)){
+ echo"<input type='text' name='xml_file' size='50' value='".$xml_file."'>";
+}else{
+ echo"<input type='text' name='xml_file' size='50' value='http://'>";
+}
+echo"<input type='button' name='loadCap' value='Load' onClick='validate(\"guiList\")'>";
+echo "</form>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_loadwfs.php
===================================================================
--- branches/2.4.5/http/php/mod_loadwfs.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadwfs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,34 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-require_once(dirname(__FILE__)."/mb_validateInput.php");
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_wfs.php");
-echo "file: ".$_REQUEST["xml_file"];
-echo "<br>-------------------------------<br>";
-$gui_id=mb_validateInput($_REQUEST["guiList"]);
-$xml=mb_validateInput($_REQUEST["xml_file"]);
-$mywms = new wfs();
-$mywms->createObjFromXML($xml);
-$mywms->wfs2db($gui_id);
-$mywms->displayWFS();
-?>
Copied: branches/2.4.5_rc1/http/php/mod_loadwfs.php (from rev 2138, branches/2.4.5/http/php/mod_loadwfs.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadwfs.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadwfs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,31 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/mb_validateInput.php");
+require_once(dirname(__FILE__)."/../classes/class_wfs.php");
+echo "file: ".$_REQUEST["xml_file"];
+echo "<br>-------------------------------<br>";
+$gui_id=mb_validateInput($_REQUEST["guiList"]);
+$xml=mb_validateInput($_REQUEST["xml_file"]);
+$mywms = new wfs();
+$mywms->createObjFromXML($xml);
+$mywms->wfs2db($gui_id);
+$mywms->displayWFS();
+?>
Deleted: branches/2.4.5_rc1/http/php/mod_loadwms.php
===================================================================
--- branches/2.4.5/http/php/mod_loadwms.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadwms.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,37 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once("../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once("mb_validatePermission.php");
-require_once("../classes/class_wms.php");
-
-
-echo "file: ".$_REQUEST["xml_file"];
-
-$gui_id = $_REQUEST["guiList"];
-$xml = $_REQUEST["xml_file"];
-
-$mywms = new wms();
-$mywms->createObjFromXML($xml);
-$mywms->writeObjInDB($gui_id);
-$mywms->displayWMS();
-?>
Copied: branches/2.4.5_rc1/http/php/mod_loadwms.php (from rev 2209, branches/2.4.5/http/php/mod_loadwms.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadwms.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadwms.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,32 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once("mb_validateSession.php");
+require_once("../classes/class_wms.php");
+
+echo "file: ".$_REQUEST["xml_file"];
+
+$guiList = $_REQUEST["guiList"];
+$xml = $_REQUEST["xml_file"];
+
+$mywms = new wms();
+$mywms->createObjFromXML($xml);
+$mywms->writeObjInDB($guiList);
+$mywms->displayWMS();
+?>
Deleted: branches/2.4.5_rc1/http/php/mod_loadwms_temp.php
===================================================================
--- branches/2.4.5/http/php/mod_loadwms_temp.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_loadwms_temp.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,38 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/mb_validateInput.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-
-
-#echo "file: ".$_REQUEST["xml_file"];
-
-$gui_id=mb_validateInput($_REQUEST["gui_id"]);
-$xml=mb_validateInput($_REQUEST["xml_file"]);
-
- $mywms = new wms();
- $mywms->createObjFromXML($xml);
- $mywms->writeObjInDB($gui_id);
-
-// $mywms->displayWMS();
-#echo "<body bgcolor='#fbc327'>";
-#echo "</body>";
-?>
Copied: branches/2.4.5_rc1/http/php/mod_loadwms_temp.php (from rev 2138, branches/2.4.5/http/php/mod_loadwms_temp.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_loadwms_temp.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_loadwms_temp.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,37 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/mb_validateInput.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+
+
+#echo "file: ".$_REQUEST["xml_file"];
+
+$gui_id=mb_validateInput($_REQUEST["gui_id"]);
+$xml=mb_validateInput($_REQUEST["xml_file"]);
+
+ $mywms = new wms();
+ $mywms->createObjFromXML($xml);
+ $mywms->writeObjInDB($gui_id);
+
+// $mywms->displayWMS();
+#echo "<body bgcolor='#fbc327'>";
+#echo "</body>";
+?>
Deleted: branches/2.4.5_rc1/http/php/mod_log.php
===================================================================
--- branches/2.4.5/http/php/mod_log.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_log.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,41 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-include_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include(dirname(__FILE__)."/../php/mb_validateSession.php");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-if($_REQUEST['req']){
- session_start();
- ignore_user_abort();
- $req = array();
- $req[0] = urldecode($_REQUEST['req']);
- $time_client = $_REQUEST['time_client'];
-
- if(empty($req)){$req = "init";}
- include(dirname(__FILE__)."/../classes/class_log.php");
- $log = new log("default", $req, $time_client);
-}
-
-header ("Content-type: image/png");
-$im = imagecreate(1,1);
-$col = ImageColorAllocate ($im, 0, 0, 0);
-imagesetpixel ( $im, 1, 1, $col);
-
-ImagePNG ($im);
-?>
Copied: branches/2.4.5_rc1/http/php/mod_log.php (from rev 2138, branches/2.4.5/http/php/mod_log.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_log.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_log.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,40 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+if($_REQUEST['req']){
+ session_start();
+ ignore_user_abort();
+ $req = array();
+ $req[0] = urldecode($_REQUEST['req']);
+ $time_client = $_REQUEST['time_client'];
+
+ if(empty($req)){$req = "init";}
+ include(dirname(__FILE__)."/../classes/class_log.php");
+ $log = new log("default", $req, $time_client);
+}
+
+header ("Content-type: image/png");
+$im = imagecreate(1,1);
+$col = ImageColorAllocate ($im, 0, 0, 0);
+imagesetpixel ( $im, 1, 1, $col);
+
+ImagePNG ($im);
+?>
Deleted: branches/2.4.5_rc1/http/php/mod_logout.php
===================================================================
--- branches/2.4.5/http/php/mod_logout.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_logout.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,48 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-session_start();
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-
-ob_start();
-
-require_once(dirname(__FILE__)."/../include/dyn_php.php");
-ignore_user_abort();
-if (isset($_COOKIE[session_name()])) {
- setcookie(session_name(), '', time()-42000, '/');
-}
-session_destroy();
-$dir = preg_replace("/\\\/","/", dirname($_SERVER['PHP_SELF']));
-
-if (isset($logout_location) && $logout_location != ''){
- header("Location: ".$logout_location);
-}
-else{
- if(is_file(dirname($_SERVER['PHP_SELF'])."/login.php")){
- header("Location: http://".$_SERVER['HTTP_HOST'].$dir."/login.php");
- }
- else{
- header("Location: http://".$_SERVER['HTTP_HOST'].str_replace("/php","/frames",$dir)."/login.php");
- }
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_logout.php (from rev 2138, branches/2.4.5/http/php/mod_logout.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_logout.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_logout.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,47 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+
+ob_start();
+
+require_once(dirname(__FILE__)."/../include/dyn_php.php");
+ignore_user_abort();
+if (isset($_COOKIE[session_name()])) {
+ setcookie(session_name(), '', time()-42000, '/');
+}
+session_destroy();
+$dir = preg_replace("/\\\/","/", dirname($_SERVER['PHP_SELF']));
+
+if (isset($logout_location) && $logout_location != ''){
+ header("Location: ".$logout_location);
+}
+else{
+ if(is_file(dirname($_SERVER['PHP_SELF'])."/login.php")){
+ header("Location: http://".$_SERVER['HTTP_HOST'].$dir."/login.php");
+ }
+ else{
+ header("Location: http://".$_SERVER['HTTP_HOST'].str_replace("/php","/frames",$dir)."/login.php");
+ }
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_map1.php
===================================================================
--- branches/2.4.5/http/php/mod_map1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_map1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,90 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-
-<title>mod_map1</title>
-<?php
-$sql = "SELECT e_width, e_height FROM gui_element WHERE e_id = 'mapframe1' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_width = $row["e_width"];
- $e_height = $row["e_height"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('mapframe1: ID not unique!');";}
-echo '<script type="text/javascript">';
-echo "\n";
-echo "var mod_map1_width = '".$e_width."';\n";
-echo "var mod_map1_height = '".$e_height."';\n";
-echo "</script>\n";
-?>
-<script type="text/javascript">
-<!--
-function init_mod_map1(){
- parent.mb_registerMapObj('mapframe1', 'maps', null,mod_map1_width, mod_map1_height);
- document.getElementById("maps").style.width = mod_map1_width;
- document.getElementById("maps").style.height = mod_map1_height;
-}
-// -->
-</script>
-</head>
-<body leftmargin='0' topmargin='0' onload="init_mod_map1()" bgcolor='#ffffff'>
-<div id='markResult' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:26'> </div>
-<div id='maps' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:2;'> </div>
-
-<div id='highlight' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:3;visibility:visible"><img src="../img/redball.gif"/></div>
-<div id='l_right' name='l_right' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:10;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
-<div id='l_bottom' name='l_bottom' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:11;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
-<div id='l_left' name='l_left' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:12;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
-<div id='l_top' name='l_top' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:13;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
-<div id="sandclock" style="position:absolute; top:0px; left:0px; z-index:14;"></div>
-<div id="scalebar" style="position:absolute; top:0px; left:0px; z-index:15;"></div>
-<div id="measuring" style="position:absolute; top:0px; left:0px; z-index:16; font-size:10px"></div>
-<div id="measure_display" style="position:absolute; top:0px; left:0px; z-index:17;"></div>
-<div id="copyright" style="position:absolute; top:0px; left:0px; z-index:18;"></div>
-<div id="measure_sub" style="position:absolute; top:0px; left:0px; z-index:19;"></div>
-<div id='permanent' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:13;visibility:hidden"><img src="../img/redball.gif"/></div>
-<div id="digitize_sub" style="position:absolute; top:0px; left:0px; z-index:24;"></div>
-<div id="digitize_display" style="position:absolute; top:0px; left:0px; z-index:25;"></div>
-<div id='um_title' name='um_title' style="font-family: Arial, Helvetica, sans-serif; DISPLAY:none; OVERFLOW:visible; POSITION:absolute; DISPLAY:none; BACKGROUND:#BEC1C4;border:1px solid black; z-index:98;"></div>
-<div id='um_draw' name='um_draw' style="LEFT:0px;OVERFLOW:visible;POSITION:absolute;TOP:0px;z-index:99;"></div>
-<img id='um_img' name='um_img' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; border:0;z-index:100' src='../img/transparent.gif' useMap='#um'>
-<map name='um' id='um'></map>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_map1.php (from rev 2138, branches/2.4.5/http/php/mod_map1.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_map1.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_map1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,89 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+
+<title>mod_map1</title>
+<?php
+$sql = "SELECT e_width, e_height FROM gui_element WHERE e_id = 'mapframe1' AND fkey_gui_id = $1";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_width = $row["e_width"];
+ $e_height = $row["e_height"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('mapframe1: ID not unique!');";}
+echo '<script type="text/javascript">';
+echo "\n";
+echo "var mod_map1_width = '".$e_width."';\n";
+echo "var mod_map1_height = '".$e_height."';\n";
+echo "</script>\n";
+?>
+<script type="text/javascript">
+<!--
+function init_mod_map1(){
+ parent.mb_registerMapObj('mapframe1', 'maps', null,mod_map1_width, mod_map1_height);
+ document.getElementById("maps").style.width = mod_map1_width;
+ document.getElementById("maps").style.height = mod_map1_height;
+}
+// -->
+</script>
+</head>
+<body leftmargin='0' topmargin='0' onload="init_mod_map1()" bgcolor='#ffffff'>
+<div id='markResult' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:26'> </div>
+<div id='maps' name='maps' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; z-index:2;'> </div>
+
+<div id='highlight' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:3;visibility:visible"><img src="../img/redball.gif"/></div>
+<div id='l_right' name='l_right' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:10;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
+<div id='l_bottom' name='l_bottom' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:11;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
+<div id='l_left' name='l_left' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:12;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
+<div id='l_top' name='l_top' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:13;visibility:hidden;background-color:#ff0000;cursor: crosshair;"></div>
+<div id="sandclock" style="position:absolute; top:0px; left:0px; z-index:14;"></div>
+<div id="scalebar" style="position:absolute; top:0px; left:0px; z-index:15;"></div>
+<div id="measuring" style="position:absolute; top:0px; left:0px; z-index:16; font-size:10px"></div>
+<div id="measure_display" style="position:absolute; top:0px; left:0px; z-index:17;"></div>
+<div id="copyright" style="position:absolute; top:0px; left:0px; z-index:18;"></div>
+<div id="measure_sub" style="position:absolute; top:0px; left:0px; z-index:19;"></div>
+<div id='permanent' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:13;visibility:hidden"><img src="../img/redball.gif"/></div>
+<div id="digitize_sub" style="position:absolute; top:0px; left:0px; z-index:24;"></div>
+<div id="digitize_display" style="position:absolute; top:0px; left:0px; z-index:25;"></div>
+<div id='um_title' name='um_title' style="font-family: Arial, Helvetica, sans-serif; DISPLAY:none; OVERFLOW:visible; POSITION:absolute; DISPLAY:none; BACKGROUND:#BEC1C4;border:1px solid black; z-index:98;"></div>
+<div id='um_draw' name='um_draw' style="LEFT:0px;OVERFLOW:visible;POSITION:absolute;TOP:0px;z-index:99;"></div>
+<img id='um_img' name='um_img' style ='position: absolute; left: 0px; top: 0px; width: 0px; height: 0px; border:0;z-index:100' src='../img/transparent.gif' useMap='#um'>
+<map name='um' id='um'></map>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_mapOV.php
===================================================================
--- branches/2.4.5/http/php/mod_mapOV.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_mapOV.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,144 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-if(isset($_REQUEST["wms"])){
- $rank = $_REQUEST["wms"];
-}
-else{
- $rank = 0;
-}
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>mod_mapOV0.php</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<?php
-$gui_id = $_SESSION["mb_user_gui"];
-$sql = "SELECT e_width,e_height, e_target FROM gui_element WHERE e_id = 'overview' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-echo "<script type='text/javascript'>";
-while($row = db_fetch_array($res)){
- echo "var mod_overview_width = " . $row["e_width"].";";
- echo "var mod_overview_height = " . $row["e_height"].";";
- echo "var mod_overview_target = '" . $row["e_target"]."';";
- $cnt++;
-}
-echo "var mod_overview_rank = ".$rank.";";
-if($cnt > 1){ echo "alert('overview: ID not unique!');";}
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function init_mod_mapOV(){
- parent.mb_registerMapObj('overview', 'maps', mod_overview_rank, mod_overview_width, mod_overview_height);
- document.onmouseover = mod_ov_setHandler;
- document.onmousedown = parent.mod_box_start;
- document.onmouseup = mod_ov_getExtent;
- document.onmousemove = parent.mod_box_run;
- document.getElementById("maps").style.width = mod_overview_width;
- document.getElementById("maps").style.height = mod_overview_height;
-}
-function mod_ov_setHandler(e){
- parent.mb_isBF = "overview";
- parent.mb_zF = mod_overview_target;
-}
-function mod_ov_getExtent(e){
- mod_ov_setValidClipping(parent.mod_box_stop(e));
-}
-parent.mb_registerSubFunctions("window.frames['overview'].mod_ov_showMapExtent()");
-function mod_ov_showMapExtent(){
- for(var i=0; i<parent.mb_mapObj.length; i++){
- if(parent.mb_mapObj[i].frameName == mod_overview_target){
- var arrayBBox = parent.mb_mapObj[i].extent.split(",");
- var minX = parseFloat(arrayBBox[0]);
- var minY = parseFloat(arrayBBox[1]);
- var maxX = parseFloat(arrayBBox[2]);
- var maxY = parseFloat(arrayBBox[3]);
- var posMin = parent.makeRealWorld2mapPos("overview",minX,maxY);
- var posMax = parent.makeRealWorld2mapPos("overview",maxX,minY);
- var px1 = posMin[0];
- var py1 = posMin[1];
- var px2 = posMax[0];
- var py2 = posMax[1];
-
- parent.mb_isBF = "overview";
- parent.mb_zF = mod_overview_target;
- while((px2 - px1) < 8){
- px1 -= 1;
- px2 += 1;
- }
- while((py2 - py1) < 8){
- py1 -= 1;
- py2 += 1;
- }
- if(px1 < 0){px1 = 1;}
- if(px1 > mod_overview_width){px1 = mod_overview_width-1;}
-
- if(py1 < 0){py1 = 1;}
- if(py1 > mod_overview_height){py1 = mod_overview_height-1;}
-
- if(px2 > mod_overview_width){px2 = mod_overview_width-1;}
- if(px2 < 0){px2 = 1;}
-
- if(py2 > mod_overview_height){py2 = mod_overview_height-1;}
- if(py2 < 0){py2 = 1;}
-
- parent.mb_drawBox(px1,py1,px2,py2);
- }
- }
-}
-function mod_ov_setValidClipping(coords){
- if(coords.length > 2){
- parent.mb_calculateExtent(parent.mb_zF,coords[0],coords[1],coords[2],coords[3]);
- parent.setMapRequest(parent.mb_zF);
- }
- else{
- parent.zoom(parent.mb_zF,true,1.0,coords[0], coords[1]);
- }
-}
-// -->
-</script>
-</head>
-<body leftmargin='0' topmargin='0' onload="init_mod_mapOV()" bgcolor='#ffffff'>
-<div id='maps' name='maps' style =' position:absolute;left:0px;top:0px;width:0px;height:0px;' ></div>
-<div id='l_top' name='l_top' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:11;visibility:hidden;background-color:red;cursor: crosshair;"></div>
-<div id='l_right' name='l_right' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:12;visibility:hidden;background-color:red;cursor: crosshair;"></div>
-<div id='l_bottom' name='l_bottom' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:13;visibility:hidden;background-color:red;cursor: crosshair;"></div>
-<div id='l_left' name='l_left' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:14;visibility:hidden;background-color:red;cursor: crosshair;"></div>
-<div id='highlight' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:3;visibility:visible"><img src="../img/redball.gif" width="14" height="14" /></div>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_mapOV.php (from rev 2138, branches/2.4.5/http/php/mod_mapOV.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_mapOV.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_mapOV.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,144 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+if(isset($_REQUEST["wms"])){
+ $rank = $_REQUEST["wms"];
+}
+else{
+ $rank = 0;
+}
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>mod_mapOV0.php</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<?php
+$gui_id = $_SESSION["mb_user_gui"];
+$sql = "SELECT e_width,e_height, e_target FROM gui_element WHERE e_id = 'overview' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+echo "<script type='text/javascript'>";
+while($row = db_fetch_array($res)){
+ echo "var mod_overview_width = " . $row["e_width"].";";
+ echo "var mod_overview_height = " . $row["e_height"].";";
+ echo "var mod_overview_target = '" . $row["e_target"]."';";
+ $cnt++;
+}
+echo "var mod_overview_rank = ".$rank.";";
+if($cnt > 1){ echo "alert('overview: ID not unique!');";}
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function init_mod_mapOV(){
+ parent.mb_registerMapObj('overview', 'maps', mod_overview_rank, mod_overview_width, mod_overview_height);
+ document.onmouseover = mod_ov_setHandler;
+ document.onmousedown = parent.mod_box_start;
+ document.onmouseup = mod_ov_getExtent;
+ document.onmousemove = parent.mod_box_run;
+ document.getElementById("maps").style.width = mod_overview_width;
+ document.getElementById("maps").style.height = mod_overview_height;
+}
+function mod_ov_setHandler(e){
+ parent.mb_isBF = "overview";
+ parent.mb_zF = mod_overview_target;
+}
+function mod_ov_getExtent(e){
+ mod_ov_setValidClipping(parent.mod_box_stop(e));
+}
+parent.mb_registerSubFunctions("window.frames['overview'].mod_ov_showMapExtent()");
+function mod_ov_showMapExtent(){
+ for(var i=0; i<parent.mb_mapObj.length; i++){
+ if(parent.mb_mapObj[i].frameName == mod_overview_target){
+ var arrayBBox = parent.mb_mapObj[i].extent.split(",");
+ var minX = parseFloat(arrayBBox[0]);
+ var minY = parseFloat(arrayBBox[1]);
+ var maxX = parseFloat(arrayBBox[2]);
+ var maxY = parseFloat(arrayBBox[3]);
+ var posMin = parent.makeRealWorld2mapPos("overview",minX,maxY);
+ var posMax = parent.makeRealWorld2mapPos("overview",maxX,minY);
+ var px1 = posMin[0];
+ var py1 = posMin[1];
+ var px2 = posMax[0];
+ var py2 = posMax[1];
+
+ parent.mb_isBF = "overview";
+ parent.mb_zF = mod_overview_target;
+ while((px2 - px1) < 8){
+ px1 -= 1;
+ px2 += 1;
+ }
+ while((py2 - py1) < 8){
+ py1 -= 1;
+ py2 += 1;
+ }
+ if(px1 < 0){px1 = 1;}
+ if(px1 > mod_overview_width){px1 = mod_overview_width-1;}
+
+ if(py1 < 0){py1 = 1;}
+ if(py1 > mod_overview_height){py1 = mod_overview_height-1;}
+
+ if(px2 > mod_overview_width){px2 = mod_overview_width-1;}
+ if(px2 < 0){px2 = 1;}
+
+ if(py2 > mod_overview_height){py2 = mod_overview_height-1;}
+ if(py2 < 0){py2 = 1;}
+
+ parent.mb_drawBox(px1,py1,px2,py2);
+ }
+ }
+}
+function mod_ov_setValidClipping(coords){
+ if(coords.length > 2){
+ parent.mb_calculateExtent(parent.mb_zF,coords[0],coords[1],coords[2],coords[3]);
+ parent.setMapRequest(parent.mb_zF);
+ }
+ else{
+ parent.zoom(parent.mb_zF,true,1.0,coords[0], coords[1]);
+ }
+}
+// -->
+</script>
+</head>
+<body leftmargin='0' topmargin='0' onload="init_mod_mapOV()" bgcolor='#ffffff'>
+<div id='maps' name='maps' style =' position:absolute;left:0px;top:0px;width:0px;height:0px;' ></div>
+<div id='l_top' name='l_top' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:11;visibility:hidden;background-color:red;cursor: crosshair;"></div>
+<div id='l_right' name='l_right' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:12;visibility:hidden;background-color:red;cursor: crosshair;"></div>
+<div id='l_bottom' name='l_bottom' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:13;visibility:hidden;background-color:red;cursor: crosshair;"></div>
+<div id='l_left' name='l_left' style="position:absolute;top:0px;left:0px;width:0px;height:0px;overflow:hidden;z-index:14;visibility:hidden;background-color:red;cursor: crosshair;"></div>
+<div id='highlight' style="position:absolute;top:-10px;left:-10px;width:14px;height:14px;z-index:3;visibility:visible"><img src="../img/redball.gif" width="14" height="14" /></div>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_meetingPoint.php
===================================================================
--- branches/2.4.5/http/php/mod_meetingPoint.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_meetingPoint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,323 +0,0 @@
-<?PHP
-# $Id$
-# http://www.mapbender.org/index.php/MeetingPoint
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-require("../php/mb_validateSession.php");
-require_once("../../conf/mapbender.conf");
-
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-
-$gui_id = $_SESSION["mb_user_gui"];
-
-$sql = "SELECT DISTINCT e_target FROM gui_element WHERE e_id = '".$_REQUEST["e_id_css"]."' AND fkey_gui_id = $1";
-$v = array($gui_id);
-$t = array('s');
-
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){
- echo "alert('legend: ID not unique!');";
-}
-
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<title>meetingPoint</title>
-
-<?php
-
-$e_id_css = 'meetingPoint';
-include '../include/dyn_css.php';
-?>
-
-<script language='JavaScript'>
-<!--
-<?php
-
-
-include('../include/dyn_js.php');
-
-echo "var mod_meetingPoint_target = '".$e_target."';";
-echo "var meetingPoint_write_to = 'meetingPoint';";
-
-?>
-
-try{
- if (meetingPoint_export_subject){}
-}
-catch(e){
- meetingPoint_export_subject = 'Your meeting point. Follow the link!';
-}
-
-try{
- if (meetingPoint_export_format){}
-}
-catch(e){
- meetingPoint_export_format = 'prompt';
-}
-
-try{
- if (meetingPoint_max_characters){}
-}
-catch(e){
- meetingPoint_max_characters = 100;
-}
-
-try{
- if (meetingPoint_image){}
-}
-catch(e){
- meetingPoint_image = "../img/button_digitize/point_off.png";
-}
-
-try{
- if (meetingPoint_icon){}
-}
-catch(e){
- meetingPoint_icon = '../img/redball.gif';
-}
-
-try{
- if (meetingPoint_width){}
-}
-catch(e){
- meetingPoint_width = 14;
-}
-
-try{
- if (meetingPoint_height){}
-}
-catch(e){
- meetingPoint_height = 14;
-}
-
-try{
- if (meetingPoint_style){}
-}
-catch(e){
- meetingPoint_style = 'background-color:white;font-weight: bold;color:black;font-family:Arial;';
-}
-
-try{
- if (meetingPoint_please_click){}
-}
-catch(e){
- meetingPoint_please_click = 'Please click for the meeting point position!';
-}
-
-parent.mb_registerSubFunctions("window.frames['meetingPoint'].mod_meetingPoint_draw()");
-
-var ie = document.all?1:0;
-var mod_meetingPoint_win = null;
-var mod_meetingPoint_elName = "meetingPoint";
-var mod_meetingPoint_frameName = "meetingPoint";
-
-var mod_meetingPoint_img_on = new Image(); mod_meetingPoint_img_on.src = meetingPoint_image.replace(/_off/,"_on") ;
-var mod_meetingPoint_img_off = new Image(); mod_meetingPoint_img_off.src = meetingPoint_image;
-var mod_meetingPoint_img_over = new Image(); mod_meetingPoint_img_over.src = meetingPoint_image.replace(/_off/,"_over") ;
-var mod_meetingPoint_fix = "";
-
-
-function init_mod_meetingPoint(ind){
- parent.mb_button[ind] = window.document.getElementById("my_getCoords");
- parent.mb_button[ind].img_over = mod_meetingPoint_img_over.src;
- parent.mb_button[ind].img_on = mod_meetingPoint_img_on.src;
- parent.mb_button[ind].img_off = mod_meetingPoint_img_off.src;
- parent.mb_button[ind].status = 0;
- parent.mb_button[ind].elName = "my_getCoords";
- parent.mb_button[ind].go = new Function ("mod_meetingPoint_run()");
- parent.mb_button[ind].stop = new Function ("mod_meetingPoint_disable()");
-}
-
-function mod_meetingPoint_run(){
- parent.frames[mod_meetingPoint_target].document.onclick = mod_meetingPoint_click;
-}
-
-function mod_meetingPoint_disable(){
- parent.frames[mod_meetingPoint_target].document.onclick = null;
-}
-
-function mod_meetingPoint_click(e){
- if(ie){
- clickX = parent.frames[mod_meetingPoint_target].event.clientX;
- clickY = parent.frames[mod_meetingPoint_target].event.clientY;
- }
- else{
- clickX = e.pageX;
- clickY = e.pageY;
- }
-
- var pos = parent.makeClickPos2RealWorldPos(mod_meetingPoint_target, clickX, clickY);
-
- mod_meetingPoint_write(pos[0],pos[1]);
- mod_meetingPoint_draw();
-}
-
-function mod_meetingPoint_write(x,y){
- document.forms[0].x.value =x;
- document.forms[0].y.value =y;
-}
-
-function mod_meetingPoint_hide(){
- var ind = parent.getMapObjIndexByName(mod_meetingPoint_target);
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.visibility = 'hidden';
-}
-
-function mod_meetingPoint_draw(){
- var ind = parent.getMapObjIndexByName(mod_meetingPoint_target);
- if (document.forms[0].x.value!='' && document.forms[0].y.value != ''){
- //alert(document.forms[0].x.value +" -- "+ document.forms[0].y.value + " - " + parent.mb_mapObj[ind].width +" iii: "+ ind);
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.width = parent.mb_mapObj[ind].width;
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.height = parent.mb_mapObj[ind].height;
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.top = 0;
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.left = 0;
- parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.visibility = 'visible';
- var tagSource = "";
- var pos = parent.makeRealWorld2mapPos(mod_meetingPoint_target,document.forms[0].x.value, document.forms[0].y.value);
- tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]- Math.round(0.5*meetingPoint_width))+"px;top:"+(pos[1]-Math.round(0.5*meetingPoint_height))+"px'>";
- tagSource += "<img src='"+meetingPoint_icon+"'>";
- tagSource += "<span style='"+meetingPoint_style+"'>"+document.forms[0].mytext.value+"<span>";
- tagSource += "</div>";
- //prompt("meetingPoint",tagSource);
- parent.writeTag(mod_meetingPoint_target, "permanent", tagSource);
- }
-}
--->
-</script>
-
-<script language='JavaScript'>
-<!--
-<?php
-echo "var used_charset = '".CHARSET ."';";
-?>
-
-function validate(){
- var mycheck = true;
- var checkObj= document.forms[0].mytext.value;
- if(checkObj == '') {
- alert ("Bitte geben Sie einen Text an!");
- checkObj.focus();
- mycheck=false;
- }
-
- var checkObj= document.forms[0].x.value;
- if(checkObj == '') {
- alert (meetingPoint_please_click);
- mycheck = false;
- }
-
- if(mycheck == true){
- my_meetingPoint = document.forms[0].myurl.value + "?";
- my_meetingPoint += "name=" + encodeURIComponent(document.forms[0].myuser.value);
- my_meetingPoint += "&password=" + encodeURIComponent(document.forms[0].mypw.value);
- my_meetingPoint += "&mb_user_myGui=" + encodeURIComponent(document.forms[0].mygui.value);
-
- var ind = parent.getMapObjIndexByName('mapframe1');
- var coord = parent.mb_mapObj[ind].extent.split(",");
-
- my_meetingPoint += "&mb_myBBOX=" + parseFloat(coord[0]) + ",";
- my_meetingPoint += parseFloat(coord[1]) + ",";
- my_meetingPoint += parseFloat(coord[2]) + ",";
- my_meetingPoint += parseFloat(coord[3]) ;
-
- my_meetingPoint += "&mb_myPOI=";
-
- var splitext = document.forms[0].mytext.value;
- document.forms[0].mytext.value = splitext.substring(0, meetingPoint_max_characters);
-
-
- my_meetingPoint += encodeURIComponent(document.forms[0].mytext.value);
-
-
- my_meetingPoint += "," + document.forms[0].x.value + ",";
- my_meetingPoint += document.forms[0].y.value;
-
- if(meetingPoint_export_format == 'email'){
- createEmail(my_meetingPoint,meetingPoint_export_subject);
- }else{
- prompt(meetingPoint_export_subject,my_meetingPoint);
- }
- }
-}
-
-function emptyfields(){
- document.forms[0].mytext.value ='';
- document.forms[0].x.value ='';
- document.forms[0].y.value = '';
- mod_meetingPoint_hide();
-}
-
-function createEmail (url,subject) {
- var email = "mailto:"
- email += "";
- email += "?subject=";
- email += subject;
- email += "&body=";
- email += escape(url);
-
- var win = window.open(email, 'email', 'top=120,left=120');
- win.close();
-}
-
-function goBack(where){
- document.location.href=where;
-}
-
-function init(){
- parent.mb_regButton_frame("init_mod_meetingPoint","meetingPoint",null);
-}
-
--->
-</script>
-
-</head>
-<body>
-
-<form action="" >
-
-<img id='my_getCoords' name='my_getCoords' onclick="mod_meetingPoint_run()" onmouseover ="parent.mb_regButton_frame('init_mod_meetingPoint','meetingPoint',null)" title="Treffpunkt setzen" src = '../img/button_digitize/point_off.png'>
-<br>
-<input class='strinput' type="hidden" name='myurl' value='<?php echo LOGIN; ?>'>
-
-<input class='strinput' type="hidden" name='mygui' value='<?php echo $_SESSION["mb_user_gui"]; ?>'>
-
-<input class='strinput' type="hidden" name='myuser' value='<?php echo $_SESSION["mb_user_name"]; ?>'>
-
-<input class='strinput' type="hidden" name='mypw' value='<?php echo $_SESSION["mb_user_password"]; ?>'>
-<br>
-<!--<input class='strinput' type="textarea" size=2 name='mytext' value='' "maxlength=70" title="max. 70 Zeichen">-->
-<textarea class='strinput' rows="3" name='mytext' title='maximal 70 Zeichen'></textarea>
-<br>
-<input class="okbutton" name="Send" type="button" value="ok" onclick="validate();">
-<input class="ibutton" type="button" value="cancel" onClick="emptyfields();">
-<br>
-<input class="coord" type="hidden" name='x' value='' readonly>
-<input class="coord" type="hidden" name='y' value='' readonly>
-<br>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_meetingPoint.php (from rev 2138, branches/2.4.5/http/php/mod_meetingPoint.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_meetingPoint.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_meetingPoint.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,320 @@
+<?PHP
+# $Id$
+# http://www.mapbender.org/index.php/MeetingPoint
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require("../php/mb_validateSession.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+$sql = "SELECT DISTINCT e_target FROM gui_element WHERE e_id = '".$_REQUEST["e_id_css"]."' AND fkey_gui_id = $1";
+$v = array($gui_id);
+$t = array('s');
+
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){
+ echo "alert('legend: ID not unique!');";
+}
+
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>meetingPoint</title>
+
+<?php
+
+$e_id_css = 'meetingPoint';
+include '../include/dyn_css.php';
+?>
+
+<script language='JavaScript'>
+<!--
+<?php
+
+
+include('../include/dyn_js.php');
+
+echo "var mod_meetingPoint_target = '".$e_target."';";
+echo "var meetingPoint_write_to = 'meetingPoint';";
+
+?>
+
+try{
+ if (meetingPoint_export_subject){}
+}
+catch(e){
+ meetingPoint_export_subject = 'Your meeting point. Follow the link!';
+}
+
+try{
+ if (meetingPoint_export_format){}
+}
+catch(e){
+ meetingPoint_export_format = 'prompt';
+}
+
+try{
+ if (meetingPoint_max_characters){}
+}
+catch(e){
+ meetingPoint_max_characters = 100;
+}
+
+try{
+ if (meetingPoint_image){}
+}
+catch(e){
+ meetingPoint_image = "../img/button_digitize/point_off.png";
+}
+
+try{
+ if (meetingPoint_icon){}
+}
+catch(e){
+ meetingPoint_icon = '../img/redball.gif';
+}
+
+try{
+ if (meetingPoint_width){}
+}
+catch(e){
+ meetingPoint_width = 14;
+}
+
+try{
+ if (meetingPoint_height){}
+}
+catch(e){
+ meetingPoint_height = 14;
+}
+
+try{
+ if (meetingPoint_style){}
+}
+catch(e){
+ meetingPoint_style = 'background-color:white;font-weight: bold;color:black;font-family:Arial;';
+}
+
+try{
+ if (meetingPoint_please_click){}
+}
+catch(e){
+ meetingPoint_please_click = 'Please click for the meeting point position!';
+}
+
+parent.mb_registerSubFunctions("window.frames['meetingPoint'].mod_meetingPoint_draw()");
+
+var ie = document.all?1:0;
+var mod_meetingPoint_win = null;
+var mod_meetingPoint_elName = "meetingPoint";
+var mod_meetingPoint_frameName = "meetingPoint";
+
+var mod_meetingPoint_img_on = new Image(); mod_meetingPoint_img_on.src = meetingPoint_image.replace(/_off/,"_on") ;
+var mod_meetingPoint_img_off = new Image(); mod_meetingPoint_img_off.src = meetingPoint_image;
+var mod_meetingPoint_img_over = new Image(); mod_meetingPoint_img_over.src = meetingPoint_image.replace(/_off/,"_over") ;
+var mod_meetingPoint_fix = "";
+
+
+function init_mod_meetingPoint(ind){
+ parent.mb_button[ind] = window.document.getElementById("my_getCoords");
+ parent.mb_button[ind].img_over = mod_meetingPoint_img_over.src;
+ parent.mb_button[ind].img_on = mod_meetingPoint_img_on.src;
+ parent.mb_button[ind].img_off = mod_meetingPoint_img_off.src;
+ parent.mb_button[ind].status = 0;
+ parent.mb_button[ind].elName = "my_getCoords";
+ parent.mb_button[ind].go = new Function ("mod_meetingPoint_run()");
+ parent.mb_button[ind].stop = new Function ("mod_meetingPoint_disable()");
+}
+
+function mod_meetingPoint_run(){
+ parent.frames[mod_meetingPoint_target].document.onclick = mod_meetingPoint_click;
+}
+
+function mod_meetingPoint_disable(){
+ parent.frames[mod_meetingPoint_target].document.onclick = null;
+}
+
+function mod_meetingPoint_click(e){
+ if(ie){
+ clickX = parent.frames[mod_meetingPoint_target].event.clientX;
+ clickY = parent.frames[mod_meetingPoint_target].event.clientY;
+ }
+ else{
+ clickX = e.pageX;
+ clickY = e.pageY;
+ }
+
+ var pos = parent.makeClickPos2RealWorldPos(mod_meetingPoint_target, clickX, clickY);
+
+ mod_meetingPoint_write(pos[0],pos[1]);
+ mod_meetingPoint_draw();
+}
+
+function mod_meetingPoint_write(x,y){
+ document.forms[0].x.value =x;
+ document.forms[0].y.value =y;
+}
+
+function mod_meetingPoint_hide(){
+ var ind = parent.getMapObjIndexByName(mod_meetingPoint_target);
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.visibility = 'hidden';
+}
+
+function mod_meetingPoint_draw(){
+ var ind = parent.getMapObjIndexByName(mod_meetingPoint_target);
+ if (document.forms[0].x.value!='' && document.forms[0].y.value != ''){
+ //alert(document.forms[0].x.value +" -- "+ document.forms[0].y.value + " - " + parent.mb_mapObj[ind].width +" iii: "+ ind);
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.width = parent.mb_mapObj[ind].width;
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.height = parent.mb_mapObj[ind].height;
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.top = 0;
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.left = 0;
+ parent.frames[mod_meetingPoint_target].document.getElementById('permanent').style.visibility = 'visible';
+ var tagSource = "";
+ var pos = parent.makeRealWorld2mapPos(mod_meetingPoint_target,document.forms[0].x.value, document.forms[0].y.value);
+ tagSource += "<div style='z-index:13;position:absolute;left:"+(pos[0]- Math.round(0.5*meetingPoint_width))+"px;top:"+(pos[1]-Math.round(0.5*meetingPoint_height))+"px'>";
+ tagSource += "<img src='"+meetingPoint_icon+"'>";
+ tagSource += "<span style='"+meetingPoint_style+"'>"+document.forms[0].mytext.value+"<span>";
+ tagSource += "</div>";
+ //prompt("meetingPoint",tagSource);
+ parent.writeTag(mod_meetingPoint_target, "permanent", tagSource);
+ }
+}
+-->
+</script>
+
+<script language='JavaScript'>
+<!--
+<?php
+echo "var used_charset = '".CHARSET ."';";
+?>
+
+function validate(){
+ var mycheck = true;
+ var checkObj= document.forms[0].mytext.value;
+ if(checkObj == '') {
+ alert ("Bitte geben Sie einen Text an!");
+ checkObj.focus();
+ mycheck=false;
+ }
+
+ var checkObj= document.forms[0].x.value;
+ if(checkObj == '') {
+ alert (meetingPoint_please_click);
+ mycheck = false;
+ }
+
+ if(mycheck == true){
+ my_meetingPoint = document.forms[0].myurl.value + "?";
+ my_meetingPoint += "name=" + encodeURIComponent(document.forms[0].myuser.value);
+ my_meetingPoint += "&password=" + encodeURIComponent(document.forms[0].mypw.value);
+ my_meetingPoint += "&mb_user_myGui=" + encodeURIComponent(document.forms[0].mygui.value);
+
+ var ind = parent.getMapObjIndexByName('mapframe1');
+ var coord = parent.mb_mapObj[ind].extent.split(",");
+
+ my_meetingPoint += "&mb_myBBOX=" + parseFloat(coord[0]) + ",";
+ my_meetingPoint += parseFloat(coord[1]) + ",";
+ my_meetingPoint += parseFloat(coord[2]) + ",";
+ my_meetingPoint += parseFloat(coord[3]) ;
+
+ my_meetingPoint += "&mb_myPOI=";
+
+ var splitext = document.forms[0].mytext.value;
+ document.forms[0].mytext.value = splitext.substring(0, meetingPoint_max_characters);
+
+
+ my_meetingPoint += encodeURIComponent(document.forms[0].mytext.value);
+
+
+ my_meetingPoint += "," + document.forms[0].x.value + ",";
+ my_meetingPoint += document.forms[0].y.value;
+
+ if(meetingPoint_export_format == 'email'){
+ createEmail(my_meetingPoint,meetingPoint_export_subject);
+ }else{
+ prompt(meetingPoint_export_subject,my_meetingPoint);
+ }
+ }
+}
+
+function emptyfields(){
+ document.forms[0].mytext.value ='';
+ document.forms[0].x.value ='';
+ document.forms[0].y.value = '';
+ mod_meetingPoint_hide();
+}
+
+function createEmail (url,subject) {
+ var email = "mailto:"
+ email += "";
+ email += "?subject=";
+ email += subject;
+ email += "&body=";
+ email += escape(url);
+
+ var win = window.open(email, 'email', 'top=120,left=120');
+ win.close();
+}
+
+function goBack(where){
+ document.location.href=where;
+}
+
+function init(){
+ parent.mb_regButton_frame("init_mod_meetingPoint","meetingPoint",null);
+}
+
+-->
+</script>
+
+</head>
+<body>
+
+<form action="<?php echo $self; ?>" >
+
+<img id='my_getCoords' name='my_getCoords' onclick="mod_meetingPoint_run()" onmouseover ="parent.mb_regButton_frame('init_mod_meetingPoint','meetingPoint',null)" title="Treffpunkt setzen" src = '../img/button_digitize/point_off.png'>
+<br>
+<input class='strinput' type="hidden" name='myurl' value='<?php echo LOGIN; ?>'>
+
+<input class='strinput' type="hidden" name='mygui' value='<?php echo $_SESSION["mb_user_gui"]; ?>'>
+
+<input class='strinput' type="hidden" name='myuser' value='<?php echo $_SESSION["mb_user_name"]; ?>'>
+
+<input class='strinput' type="hidden" name='mypw' value='<?php echo $_SESSION["mb_user_password"]; ?>'>
+<br>
+<!--<input class='strinput' type="textarea" size=2 name='mytext' value='' "maxlength=70" title="max. 70 Zeichen">-->
+<textarea class='strinput' rows="3" name='mytext' title='maximal 70 Zeichen'></textarea>
+<br>
+<input class="okbutton" name="Send" type="button" value="ok" onclick="validate();">
+<input class="ibutton" type="button" value="cancel" onClick="emptyfields();">
+<br>
+<input class="coord" type="hidden" name='x' value='' readonly>
+<input class="coord" type="hidden" name='y' value='' readonly>
+<br>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_newGui.php
===================================================================
--- branches/2.4.5/http/php/mod_newGui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_newGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,110 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>New GUI</title>
-<?php include '../include/dyn_css.php'; ?>
-<?php
-if(isset($newGui) && $newGui != ""){
- $sql = "SELECT gui_id FROM gui WHERE gui_id = $1";
- $v = array($newGui);
- $t = array('s');
- $res = db_prep_query($sql,$v,$t);
- if(db_fetch_row($res)){
- echo "<script type='text/javascript'>";
- echo "alert('Error: Gui already exists!');";
- echo "</script>";
- }
- else{
- $sql = "INSERT INTO gui (gui_id,gui_name,gui_description,gui_public) ";
- $sql .= "VALUES($1, $2, $3, $4)";
- $v = array($newGui,$newGui,$newDesc,1);
- $t = array('s','s','s','i');
- $res = db_prep_query($sql,$v,$t);
- $sql = "INSERT INTO gui_mb_user (fkey_gui_id,fkey_mb_user_id,mb_user_type) ";
- $sql .= "VALUES($1, $2, $3)";
- $v = array($newGui,$_SESSION["mb_user_id"], 'owner');
- $t = array('s','i','s');
- $res = db_prep_query($sql,$v,$t);
- require_once(dirname(__FILE__)."/mb_getGUIs.php");
- $arrayGUIs = mb_getGUIs( $_SESSION["mb_user_id"]);
- $_SESSION["mb_user_guis"] = $arrayGUIs;
- $guiCreated=true;
- }
-}
-?>
-<script type="text/javascript">
-<!--
-function setFocus(){
- document.form1.newGui.focus();
-}
-function validate(){
- if(document.form1.newGui.value == ""){
- alert("Please enter a GUI-NAME!");
- document.form1.newGui.focus();
- return;
- }
- else if(document.form1.newDesc.value == ""){
- alert("Please enter a GUI-Description!");
- document.form1.newDesc.focus();
- return;
- }
- else{
- document.form1.submit();
- }
-}
-// -->
-</script>
-</head>
-<body onload='setFocus()'>
-<form name='form1' action="<?php echo $self ?>" method="POST">
-<table>
-<tr><td>Name: </td><td><input type='text' name='newGui'></td></tr>
-<tr><td>Description: </td><td><input type='text' name='newDesc'></td></tr>
-<tr><td></td><td><input type='button' onclick='validate()' value="new"></td></tr>
-</table>
-
-<?php
-if(isset($newGui) && $newGui != ""){
- if ($guiCreated==true){
- echo "<p class = 'guiList'>";
- echo "The GUI <b>".$newGui."</b> has been created successfully.";
- echo "<p>";
- }
-}
-?>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_newGui.php (from rev 2138, branches/2.4.5/http/php/mod_newGui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_newGui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_newGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,108 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>New GUI</title>
+<?php include '../include/dyn_css.php'; ?>
+<?php
+if(isset($newGui) && $newGui != ""){
+ $sql = "SELECT gui_id FROM gui WHERE gui_id = $1";
+ $v = array($newGui);
+ $t = array('s');
+ $res = db_prep_query($sql,$v,$t);
+ if(db_fetch_row($res)){
+ echo "<script type='text/javascript'>";
+ echo "alert('Error: Gui already exists!');";
+ echo "</script>";
+ }
+ else{
+ $sql = "INSERT INTO gui (gui_id,gui_name,gui_description,gui_public) ";
+ $sql .= "VALUES($1, $2, $3, $4)";
+ $v = array($newGui,$newGui,$newDesc,1);
+ $t = array('s','s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ $sql = "INSERT INTO gui_mb_user (fkey_gui_id,fkey_mb_user_id,mb_user_type) ";
+ $sql .= "VALUES($1, $2, $3)";
+ $v = array($newGui,$_SESSION["mb_user_id"], 'owner');
+ $t = array('s','i','s');
+ $res = db_prep_query($sql,$v,$t);
+ require_once(dirname(__FILE__)."/mb_getGUIs.php");
+ $arrayGUIs = mb_getGUIs( $_SESSION["mb_user_id"]);
+ $_SESSION["mb_user_guis"] = $arrayGUIs;
+ $guiCreated=true;
+ }
+}
+?>
+<script type="text/javascript">
+<!--
+function setFocus(){
+ document.form1.newGui.focus();
+}
+function validate(){
+ if(document.form1.newGui.value == ""){
+ alert("Please enter a GUI-NAME!");
+ document.form1.newGui.focus();
+ return;
+ }
+ else if(document.form1.newDesc.value == ""){
+ alert("Please enter a GUI-Description!");
+ document.form1.newDesc.focus();
+ return;
+ }
+ else{
+ document.form1.submit();
+ }
+}
+// -->
+</script>
+</head>
+<body onload='setFocus()'>
+<form name='form1' action="<?php echo $self ?>" method="POST">
+<table>
+<tr><td>Name: </td><td><input type='text' name='newGui'></td></tr>
+<tr><td>Description: </td><td><input type='text' name='newDesc'></td></tr>
+<tr><td></td><td><input type='button' onclick='validate()' value="new"></td></tr>
+</table>
+
+<?php
+if(isset($newGui) && $newGui != ""){
+ if ($guiCreated==true){
+ echo "<p class = 'guiList'>";
+ echo "The GUI <b>".$newGui."</b> has been created successfully.";
+ echo "<p>";
+ }
+}
+?>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_orphanWMS.php
===================================================================
--- branches/2.4.5/http/php/mod_orphanWMS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_orphanWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,128 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/OrphanWMS
-# Copyright (C) 2002 Melchior Moos
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Orphaned WMS</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-
-function validate()
-{
- var ind = document.form1.wmsList.selectedIndex;
- if(ind > -1) {
- var permission = confirm("delete: " + document.form1.wmsList.options[ind].text + " ?");
- if(permission == true) {
- document.form1.del.value = 1;
- document.form1.submit();
- }
- }
-}
-
--->
-</script>
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-
-$error_msg='';
-{
- // delete WMS
- if($del){
- $sql = "DELETE FROM wms WHERE wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- }
- // display WMS List
- $sql = "SELECT * from wms WHERE wms_id NOT IN (select fkey_wms_id from gui_wms)";
- $res = db_query($sql);
- $cnt = 0;
-
- if (db_numrows($res)>0){
- echo "<form name='form1' action='" . $self ."' method='post'>";
- echo "<select class='wmsList' size='20' name='wmsList' onchange='document.form1.wmsList.value = this.value;submit()'>";
- while($row = db_fetch_array($res))
- {
- $wmsvalue = $row["wms_id"];
- echo "<option value='".$wmsvalue."'" . (($wmsvalue == $wmsList)?" selected":"") . ">".$row["wms_title"]."</option>";
- $cnt++;
- }
- echo "</select><br>";
-
-
- //
- //
- // If WMS is selected, show more info
- //
- //
- if($wmsList)
- {
- echo "<p class = 'guiList'>";
-
- // Show wms_id, GetCapabilities, Abstract of chosen WMS
- $sql = "SELECT wms_id,wms_abstract,wms_getcapabilities FROM wms WHERE wms_id = $1";
- $v = array($wmsList);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- $cnt = 0;
- while($row = db_fetch_array($res))
- {
- echo "<b>wms_id:</b> ". $row["wms_id"]."<br>";
- echo "<br><b>GetCapabilities</b><br><br>";
- echo $row["wms_getcapabilities"]."<br>";
- echo "<br><b>Abstract</b><br><br>";
- echo $row["wms_abstract"]."<br>";
- $cnt++;
- }
-
- echo "</p>";
-
- echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
- }
- }else{
- echo "There are no orphaned WMS.<br>";
- }
-}
-?>
-<input type='hidden' name='del'>
-</form>
-</body>
-</html>
-
Copied: branches/2.4.5_rc1/http/php/mod_orphanWMS.php (from rev 2138, branches/2.4.5/http/php/mod_orphanWMS.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_orphanWMS.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_orphanWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,125 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/OrphanWMS
+# Copyright (C) 2002 Melchior Moos
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Orphaned WMS</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+
+function validate()
+{
+ var ind = document.form1.wmsList.selectedIndex;
+ if(ind > -1) {
+ var permission = confirm("delete: " + document.form1.wmsList.options[ind].text + " ?");
+ if(permission == true) {
+ document.form1.del.value = 1;
+ document.form1.submit();
+ }
+ }
+}
+
+-->
+</script>
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+
+$error_msg='';
+{
+ // delete WMS
+ if($del){
+ $sql = "DELETE FROM wms WHERE wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ }
+ // display WMS List
+ $sql = "SELECT * from wms WHERE wms_id NOT IN (select fkey_wms_id from gui_wms)";
+ $res = db_query($sql);
+ $cnt = 0;
+
+ if (db_numrows($res)>0){
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+ echo "<select class='wmsList' size='20' name='wmsList' onchange='document.form1.wmsList.value = this.value;submit()'>";
+ while($row = db_fetch_array($res))
+ {
+ $wmsvalue = $row["wms_id"];
+ echo "<option value='".$wmsvalue."'" . (($wmsvalue == $wmsList)?" selected":"") . ">".$row["wms_title"]."</option>";
+ $cnt++;
+ }
+ echo "</select><br>";
+
+
+ //
+ //
+ // If WMS is selected, show more info
+ //
+ //
+ if($wmsList)
+ {
+ echo "<p class = 'guiList'>";
+
+ // Show wms_id, GetCapabilities, Abstract of chosen WMS
+ $sql = "SELECT wms_id,wms_abstract,wms_getcapabilities FROM wms WHERE wms_id = $1";
+ $v = array($wmsList);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ $cnt = 0;
+ while($row = db_fetch_array($res))
+ {
+ echo "<b>wms_id:</b> ". $row["wms_id"]."<br>";
+ echo "<br><b>GetCapabilities</b><br><br>";
+ echo $row["wms_getcapabilities"]."<br>";
+ echo "<br><b>Abstract</b><br><br>";
+ echo $row["wms_abstract"]."<br>";
+ $cnt++;
+ }
+
+ echo "</p>";
+
+ echo "<input class='button_del' type='button' value='delete' onclick='validate()'>";
+ }
+ }else{
+ echo "There are no orphaned WMS.<br>";
+ }
+}
+?>
+<input type='hidden' name='del'>
+</form>
+</body>
+</html>
+
Deleted: branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_owsproxy_conf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,66 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_owsproxy_conf.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-include(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownwms = $admin->getWmsByOwner($_SESSION["mb_user_id"]);
-if(isset($_REQUEST["wms_id"]) && isset($_REQUEST["status"])){
- $admin->setWMSOWSstring(intval($_REQUEST["wms_id"]),$_REQUEST["status"]);
-}
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>OWS Security Proxy</title>
-<style type="text/css">
-
-body{
- font-family: Arial, Helvetica, sans-serif;
-}
-</style>
-<script language="JavaScript" type="text/javascript">
-function set(wms_id, status){
- document.location.href = "mod_owsproxy_conf.php?wms_id="+wms_id+"&status="+status+"&<?php echo SID; ?>";
-}
-</script>
-
-</head>
-<body>
-<form>
-<table>
-<?php
-for($i=0; $i<count($ownwms); $i++){
- echo "<tr>";
- echo "<td>";
- echo "<input type='checkbox' onclick='if(this.checked){set(\"".$ownwms[$i]."\",\"on\")}else{set(\"".$ownwms[$i]."\",\"off\")}' ";
- if($admin->getWMSOWSstring($ownwms[$i]) != false){ echo "checked"; }
- echo ">";
- echo "</td>";
- echo "<td>".$ownwms[$i]."</td>";
- echo "<td>".$admin->getWmsTitleByWmsId($ownwms[$i])."</td>";
- echo "</tr>";
-}
-?>
-</table>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php (from rev 2193, branches/2.4.5/http/php/mod_owsproxy_conf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_owsproxy_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,66 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_owsproxy_conf.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownwms = $admin->getWmsByOwner($_SESSION["mb_user_id"]);
+if(isset($_REQUEST["wms_id"]) && isset($_REQUEST["status"])){
+ $admin->setWMSOWSstring(intval($_REQUEST["wms_id"]),$_REQUEST["status"]);
+}
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>OWS Security Proxy</title>
+<style type="text/css">
+
+body{
+ font-family: Arial, Helvetica, sans-serif;
+}
+</style>
+<script language="JavaScript" type="text/javascript">
+function set(wms_id, status){
+ document.location.href = "mod_owsproxy_conf.php?<?php echo $urlParameters; ?>&wms_id="+wms_id+"&status="+status;
+}
+</script>
+
+</head>
+<body>
+<form>
+<table>
+<?php
+for($i=0; $i<count($ownwms); $i++){
+ echo "<tr>";
+ echo "<td>";
+ echo "<input type='checkbox' onclick='if(this.checked){set(\"".$ownwms[$i]."\",\"on\")}else{set(\"".$ownwms[$i]."\",\"off\")}' ";
+ if($admin->getWMSOWSstring($ownwms[$i]) != false){ echo "checked"; }
+ echo ">";
+ echo "</td>";
+ echo "<td>".$ownwms[$i]."</td>";
+ echo "<td>".$admin->getWmsTitleByWmsId($ownwms[$i])."</td>";
+ echo "</tr>";
+}
+?>
+</table>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_printView1.php
===================================================================
--- branches/2.4.5/http/php/mod_printView1.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_printView1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,95 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-//
-import_request_variables("PG");
-$_SESSION["mb_print_url"] = $map_url;
-$_SESSION["mb_print_resolution"] = $quality;
-include(dirname(__FILE__)."/../../conf/print.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Print Settings</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
-
- .bg_header{
- background-color: white;
- }
- .bg{
- background-color: black;
- }
- body{
- font-family: Arial, Helvetica, sans-serif;
- }
- -->
-</style>
-</head>
-<body leftmargin="0" topmargin="0">
-<?php
-
-$printOffset_top = intval($_REQUEST["printOffset_top"]) * $deformation;
-$printOffset_left = intval($_REQUEST["printOffset_left"]) * $deformation;
-$header_height = intval($_REQUEST["header_height"]) * $deformation;
-$map_width = intval($_REQUEST["map_width"]) * $deformation;
-$map_height = intval($_REQUEST["map_height"]) * $deformation;
-$date = date("d.m.y");
-#map
-echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:3;' src='../extensions/ext_weldMaps.php?". SID."' width='".$map_width."' height='".$map_height."'>";
-echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:2;' src='../img/white.gif' width='".$map_width."' height='".$map_height."'>";
-
-echo "<img class='bg' style='position: absolute; top:".($printOffset_top - 1)."px;left:".($printOffset_left-1)."px; z-index:1;width:".($map_width+3)."px; height:".($map_height +$header_height +2)."px;' src='../img/black.gif'>";
-#header
-
-
-echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
-
-echo "<div style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;'>";
-echo "<div style='position:relative;left:5px; font-weight:bold; font-size:20px;z-index:3;'>".$printTitle . "</div>";
-echo "<div style='position:relative;left:5px;z-index:3;'>Datum: ".$date . "</div>";
-echo "<div style='position:relative;left:5px;z-index:3;'>Maßstab: 1:".$map_scale . "</div>";
-echo"</div>";
-
-echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
-echo "<div style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' >";
-echo "<div style='position:relative;left:5px;z-index:3;'>".$printComment . "</div>";
-echo"</div>";
-
-echo "<div style='position: absolute; top:".($printOffset_top + $header_height + $map_height+5)."px;left:".($printOffset_left+2)."px; z-index:3;font-size:10px' >";
-echo $footer;
-echo "</div>";
-#$myfactor = 37.81;
-#echo "<img style='position: absolute; top:".($printOffset_top + $header_height + $map_height+10)."px;left:".($printOffset_left+2)."px; ' src='../img/black.gif' height='2' width='".(10 * $myfactor)."'>";
-?>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_printView1.php (from rev 2138, branches/2.4.5/http/php/mod_printView1.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_printView1.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_printView1.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,96 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+//
+import_request_variables("PG");
+$_SESSION["mb_print_url"] = $map_url;
+$_SESSION["mb_print_resolution"] = $quality;
+include(dirname(__FILE__)."/../../conf/print.conf");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Print Settings</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+
+ .bg_header{
+ background-color: white;
+ }
+ .bg{
+ background-color: black;
+ }
+ body{
+ font-family: Arial, Helvetica, sans-serif;
+ }
+ -->
+</style>
+</head>
+<body leftmargin="0" topmargin="0">
+<?php
+
+$printOffset_top = intval($_REQUEST["printOffset_top"]) * $deformation;
+$printOffset_left = intval($_REQUEST["printOffset_left"]) * $deformation;
+$header_height = intval($_REQUEST["header_height"]) * $deformation;
+$map_width = intval($_REQUEST["map_width"]) * $deformation;
+$map_height = intval($_REQUEST["map_height"]) * $deformation;
+$date = date("d.m.y");
+#map
+echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:3;' src='../extensions/ext_weldMaps.php?". SID."' width='".$map_width."' height='".$map_height."'>";
+echo "<img style='position:absolute; top:".($printOffset_top + $header_height)."px; left:".($printOffset_left+1)."px; z-index:2;' src='../img/white.gif' width='".$map_width."' height='".$map_height."'>";
+
+echo "<img class='bg' style='position: absolute; top:".($printOffset_top - 1)."px;left:".($printOffset_left-1)."px; z-index:1;width:".($map_width+3)."px; height:".($map_height +$header_height +2)."px;' src='../img/black.gif'>";
+#header
+
+
+echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
+
+echo "<div style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left+1)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;'>";
+echo "<div style='position:relative;left:5px; font-weight:bold; font-size:20px;z-index:3;'>".$printTitle . "</div>";
+echo "<div style='position:relative;left:5px;z-index:3;'>Datum: ".$date . "</div>";
+echo "<div style='position:relative;left:5px;z-index:3;'>Ma�stab: 1:".$map_scale . "</div>";
+echo"</div>";
+
+echo "<img class='bg_header' style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' src='../img/white.gif'>";
+echo "<div style='position: absolute; top:".($printOffset_top+1)."px;left:".($printOffset_left + $map_width/2+2)."px; z-index:1;width:".($map_width/2-1)."px; height:".($header_height -2)."px;' >";
+echo "<div style='position:relative;left:5px;z-index:3;'>".$printComment . "</div>";
+echo"</div>";
+
+echo "<div style='position: absolute; top:".($printOffset_top + $header_height + $map_height+5)."px;left:".($printOffset_left+2)."px; z-index:3;font-size:10px' >";
+echo $footer;
+echo "</div>";
+#$myfactor = 37.81;
+#echo "<img style='position: absolute; top:".($printOffset_top + $header_height + $map_height+10)."px;left:".($printOffset_left+2)."px; ' src='../img/black.gif' height='2' width='".(10 * $myfactor)."'>";
+?>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_renameGUI.php
===================================================================
--- branches/2.4.5/http/php/mod_renameGUI.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_renameGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,227 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Rename GUI</title>
-<style type="text/css">
-
-body{
- background-color: #ffffff;
-}
-.button_rename{
- color: red;
- position:absolute;
- top:390px;
- left:10px;
-}
-.button_copy{
- color: red;
- position:absolute;
- top:390px;
- left:110px;
-}
-.button_copy_checkbox{
- color: red;
- position:absolute;
- top:390px;
- left:170px;
-}
-.newName{
- position:absolute;
- top:350px;
- left:60px;
- width:150px
-}
-.newName_str{
- position:absolute;
- top:350px;
- left:10px;
- width:200px
-}
-.guiList{
- position:absolute;
- top:10px;
- left:10px;
- width:200px
-}
-
-</style>
-
-<script type="text/javascript">
-
-
-function validate_rename(){
- if(document.form1.newGuiName.value == ""){
- alert("Please enter a GUI name!");
- document.form1.newGuiName.focus();
- }
- else{
- // gui name already taken?
- var taken = false;
- for (var i=0; i<document.form1.guiList.options.length; i++){
- if(document.form1.guiList.options[i].text == document.form1.newGuiName.value){
- alert("GUI name already taken!");
- taken = true;
- }
- }
- if (!taken){
- var ind = document.form1.guiList.selectedIndex;
- // check if any gui is selected
- if(ind > -1){
- var permission = confirm("rename '" + document.form1.guiList.options[ind].text + "' to '" + document.form1.newGuiName.value + "' ?");
- if(permission == true){
- document.form1.rename.value = 1;
- document.form1.submit();
- }
- }
- else{
- alert("Please select a GUI!");
- }
- }
- }
-}
-
-function validate_copy(){
- document.form1.withU.value = document.form1.withUsers.checked;
- if(document.form1.newGuiName.value == ""){
- alert("Please enter a GUI name!");
- document.form1.newGuiName.focus();
- }
- else{
- // gui name already taken?
- var taken = false;
- for (var i=0; i<document.form1.guiList.options.length; i++){
- if(document.form1.guiList.options[i].text == document.form1.newGuiName.value){
- alert("GUI name already taken!");
- taken = true;
- }
- }
- if (!taken){
- var ind = document.form1.guiList.selectedIndex;
- // check if any gui is selected
- if(ind > -1){
- var permission = confirm("copy '" + document.form1.guiList.options[ind].text + "' to '" + document.form1.newGuiName.value + "' ?");
- if(permission == true){
- document.form1.copy.value = 1;
- document.form1.submit();
- }
- }
- else{
- alert("Please select a GUI!");
- }
- }
- }
-}
-</script>
-</head>
-<body>
-<?php
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-require_once(dirname(__FILE__)."/../classes/class_gui.php");
-
-###rename
-if($rename || $copy){
-
- $gui = new gui();
-
- if ($copy) {
- if ($_POST['withU'] == 'true') $gui->copyGui($guiList, $newGuiName, true);
- else $gui->copyGui($guiList, $newGuiName, false);
- }
- elseif ($rename) {
- $gui->renameGui($guiList, $newGuiName);
- }
- $rename = 0;
- $copy = 0;
-
-}
-###
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-
-echo "<form name='form1' action='" . $self ."' method='post'>";
-if(count($ownguis)>0){
- $sql = "SELECT * FROM gui WHERE gui_id IN (";
- $v = array();
- $t = array();
- for($i=0; $i<count($ownguis); $i++){
- if($i>0){ $sql .= ",";}
- $sql .= "$".($i+1);
- array_push($v,$ownguis[$i]);
- array_push($t,'s');
- }
- $sql .= ") ORDER BY gui_name";
- $res = db_prep_query($sql,$v,$t);
- $count=0;
- while($row = db_fetch_array($res)){
- $gui_id[$count]=$row["gui_id"];
- $count++;
- }
- echo "<select class='guiList' size='20' name='guiList' onchange='document.form1.guiList.value = this.value;submit();'>";
- for ($i=0; $i<$count;$i++){
- echo "<option value='".$gui_id[$i]."' ";
- if($guiList && $guiList == $gui_id[$i]){
- echo "selected";
- }
- echo ">".$gui_id[$i]."</option>";
- }
- echo "</select><br><br><br>";
-}
-else{
- echo "There are no guis owned by this user.";
-}
-
-
-if($guiList){
-echo "<table>";
-echo "<tr><td class='newName_str'>Name: </td><td><input class='newName' type='text' id='newGuiName' name='newGuiName'></td></tr>\n";
-echo "<tr>";
-echo " <td><input class='button_rename' type='button' value='rename' onclick='validate_rename()'></td>";
-echo " <td><input class='button_copy' type='button' value='copy' onclick='validate_copy()'><div class='button_copy_checkbox'>(<input name='withUsers' type='checkbox' /> copy users)</div></td>";
-echo "</tr>\n";
-echo "</table>";
-}
-?>
-<input type='hidden' name='rename'>
-<input type='hidden' name='copy'>
-<input type='hidden' name='withU'>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_renameGUI.php (from rev 2194, branches/2.4.5/http/php/mod_renameGUI.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_renameGUI.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_renameGUI.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,222 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+import_request_variables("PG");
+?>
+
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Rename GUI</title>
+<style type="text/css">
+
+body{
+ background-color: #ffffff;
+}
+.button_rename{
+ color: red;
+ position:absolute;
+ top:390px;
+ left:10px;
+}
+.button_copy{
+ color: red;
+ position:absolute;
+ top:390px;
+ left:110px;
+}
+.button_copy_checkbox{
+ color: red;
+ position:absolute;
+ top:390px;
+ left:170px;
+}
+.newName{
+ position:absolute;
+ top:350px;
+ left:60px;
+ width:150px
+}
+.newName_str{
+ position:absolute;
+ top:350px;
+ left:10px;
+ width:200px
+}
+.guiList{
+ position:absolute;
+ top:10px;
+ left:10px;
+ width:200px
+}
+
+</style>
+
+<script type="text/javascript">
+
+
+function validate_rename(){
+ if(document.form1.newGuiName.value == ""){
+ alert("Please enter a GUI name!");
+ document.form1.newGuiName.focus();
+ }
+ else{
+ // gui name already taken?
+ var taken = false;
+ for (var i=0; i<document.form1.guiList.options.length; i++){
+ if(document.form1.guiList.options[i].text == document.form1.newGuiName.value){
+ alert("GUI name already taken!");
+ taken = true;
+ }
+ }
+ if (!taken){
+ var ind = document.form1.guiList.selectedIndex;
+ // check if any gui is selected
+ if(ind > -1){
+ var permission = confirm("rename '" + document.form1.guiList.options[ind].text + "' to '" + document.form1.newGuiName.value + "' ?");
+ if(permission == true){
+ document.form1.rename.value = 1;
+ document.form1.submit();
+ }
+ }
+ else{
+ alert("Please select a GUI!");
+ }
+ }
+ }
+}
+
+function validate_copy(){
+ document.form1.withU.value = document.form1.withUsers.checked;
+ if(document.form1.newGuiName.value == ""){
+ alert("Please enter a GUI name!");
+ document.form1.newGuiName.focus();
+ }
+ else{
+ // gui name already taken?
+ var taken = false;
+ for (var i=0; i<document.form1.guiList.options.length; i++){
+ if(document.form1.guiList.options[i].text == document.form1.newGuiName.value){
+ alert("GUI name already taken!");
+ taken = true;
+ }
+ }
+ if (!taken){
+ var ind = document.form1.guiList.selectedIndex;
+ // check if any gui is selected
+ if(ind > -1){
+ var permission = confirm("copy '" + document.form1.guiList.options[ind].text + "' to '" + document.form1.newGuiName.value + "' ?");
+ if(permission == true){
+ document.form1.copy.value = 1;
+ document.form1.submit();
+ }
+ }
+ else{
+ alert("Please select a GUI!");
+ }
+ }
+ }
+}
+</script>
+</head>
+<body>
+<?php
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+require_once(dirname(__FILE__)."/../classes/class_gui.php");
+
+###rename
+if($rename || $copy){
+
+ $gui = new gui();
+
+ if ($copy) {
+ if ($_POST['withU'] == 'true') $gui->copyGui($guiList, $newGuiName, true);
+ else $gui->copyGui($guiList, $newGuiName, false);
+ }
+ elseif ($rename) {
+ $gui->renameGui($guiList, $newGuiName);
+ }
+ $rename = 0;
+ $copy = 0;
+
+}
+###
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+
+echo "<form name='form1' action='" . $self ."' method='post'>";
+if(count($ownguis)>0){
+ $sql = "SELECT * FROM gui WHERE gui_id IN (";
+ $v = array();
+ $t = array();
+ for($i=0; $i<count($ownguis); $i++){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".($i+1);
+ array_push($v,$ownguis[$i]);
+ array_push($t,'s');
+ }
+ $sql .= ") ORDER BY gui_name";
+ $res = db_prep_query($sql,$v,$t);
+ $count=0;
+ while($row = db_fetch_array($res)){
+ $gui_id_[$count]=$row["gui_id"];
+ $count++;
+ }
+ echo "<select class='guiList' size='20' name='guiList' onchange='document.form1.guiList.value = this.value;submit();'>";
+ for ($i=0; $i<$count;$i++){
+ echo "<option value='".$gui_id_[$i]."' ";
+ if($guiList && $guiList == $gui_id_[$i]){
+ echo "selected";
+ }
+ echo ">".$gui_id_[$i]."</option>";
+ }
+ echo "</select><br><br><br>";
+}
+else{
+ echo "There are no guis owned by this user.";
+}
+
+
+if($guiList){
+echo "<table>";
+echo "<tr><td class='newName_str'>Name: </td><td><input class='newName' type='text' id='newGuiName' name='newGuiName'></td></tr>\n";
+echo "<tr>";
+echo " <td><input class='button_rename' type='button' value='rename' onclick='validate_rename()'></td>";
+echo " <td><input class='button_copy' type='button' value='copy' onclick='validate_copy()'><div class='button_copy_checkbox'>(<input name='withUsers' type='checkbox' /> copy users)</div></td>";
+echo "</tr>\n";
+echo "</table>";
+}
+?>
+<input type='hidden' name='rename'>
+<input type='hidden' name='copy'>
+<input type='hidden' name='withU'>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_saveWKT.php
===================================================================
--- branches/2.4.5/http/php/mod_saveWKT.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_saveWKT.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,237 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>mod_saveWKT</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type="text/javascript">
-<!--
-function validate(){
- document.forms[0].x.value = "";
- document.forms[0].y.value = "";
- for(var i=0; i<window.opener.mod_measure_RX.length;i++){
- if(i>0){ document.forms[0].x.value += ",";}
- document.forms[0].x.value += window.opener.mod_measure_RX[i];
- }
- for(var i=0; i<window.opener.mod_measure_RY.length;i++){
- if(i>0){ document.forms[0].y.value += ",";}
- document.forms[0].y.value += window.opener.mod_measure_RY[i];
- }
- document.forms[0].save.value='true';
- document.forms[0].src_epsg.value=window.opener.mod_measure_epsg.substr(5,5); //NEW!!!
- document.forms[0].submit();
-}
-var geoType;
-function checkGeom(){
- if(window.opener.mod_measure_RX.length == 1){
- geoType = "POINT";
- }
- if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] =! window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
- geoType = "MULTILINESTRING";
- }
- if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] == window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
- geoType = "MULTIPOLYGON";
- }
- if(document.forms[0].myGeometryType.value != geoType){
- alert("Falscher Geometrietyp!");
- }
-}
-// -->
-</script>
-</head>
-<!-- <body onload='checkGeom()'>
-//NEW!!! Bei Erstaufruf ist die ausgewählte Tabelle (und deren Geometrie) noch nicht bekannt!
-Deshalb zuvor eine Fehlermeldung. Jetzt als PHP-Code, siehe if($save) -->
-<body>
-<?php
-/*****************************************************************************
-personal postgresql parameters - persönliche Postgresql-Einstellungen */
-$host = "localhost";
-$port = "5432";
-define("DBname", "databasename");
-$user = "username";
-$password = "password";
-//personal example: pick only certain (working-) tables, here: tables which start with "mapbender_"
-$tblmb="mapbender_%";
-//*****************************************************************************
-
-import_request_variables("P");
-
-$con_string = "host=$host port=$port dbname=DBname user=$user password=$password";
-$con = pg_connect ($con_string) or die ("Error while connecting database DBname");
-$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns
- where f_table_name like '$tblmb'"; //pick only certain tables (see above)
-//$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns";
-$res = pg_query($con,$sql);
-$cnt = 0;
-echo "<form action='".$PHP_SELF."' method='POST'>";
-#echo "Selektieren: <input name='actionType' type='radio' value='select'>";
-#echo "Speichern: <input name='actionType' type='radio' value='create'><br>";
-echo "<select name='tablenames' onchange='submit()'>";
-echo "<option value=''>Bitte Tabelle auswählen...</option>";
-while(pg_fetch_row($res)){
- echo "<option value='".pg_result($res,$cnt,"f_table_name")."' ";
- if($tablenames == pg_result($res,$cnt,"f_table_name")){
- echo "selected";
- $geometry = pg_result($res,$cnt,"f_geometry_column");
- $geometryType = pg_result($res,$cnt,"type");
- $epsg = pg_result($res,$cnt,"srid");
- }
- echo ">".pg_result($res,$cnt,"f_table_name")."</option>";
- $cnt++;
-}
-echo "</select>";
-
-
-if(isset($tablenames)){
- $sql = "SELECT * from ".$tablenames." limit 1";
- $res = pg_query($con,$sql);
- $num = pg_num_fields($res);
-
- echo "<table>";
- $cnt = 0;
- for($i=0; $i<$num; $i++){
- echo "<tr>";
- echo "<td>".pg_fieldname($res,$i)."</td><td><input type='text' name='".pg_fieldname($res,$i)."'></td><td>".pg_fieldtype($res,$i)."</td>";
- echo "</tr>";
- if(!isset($str_names)){
- $str_names = pg_fieldname($res,$i);
- }
- else{
- $str_names .= ",".pg_fieldname($res,$i);
- }
- $cnt++;
- }
- echo "</table>";
- echo "<br>";
- echo "<input type='button' value='save' onclick='validate()'>";
- echo "<input type='hidden' value='' name='save'>";
- echo "<input type='text' value='".$x."' name='x'>"; //NEW!!!
- echo "<input type='text' value='".$y."' name='y'>"; //NEW!!!
- echo "<input type='text' value='".$geometry."' name='myGeometry'>";
- echo "<input type='text' value='".$geometryType."' name='myGeometryType'>";
- echo "<input type='text' value='".$src_epsg."' name='src_epsg'>"; //NEW!!!
- echo "<input type='text' value='".$epsg."' name='epsg'>";
- echo "<input name='myStrColumns' type='text' value='".$str_names."'>";
-}
-if($save){
- $myColumns = explode(",",$myStrColumns);
- $myX = explode(",", $x);
- $myY = explode(",", $y);
- $myxcount = count($myX);
-
- if ($myxcount == 1) {
- $geoType = 'POINT';
- }
- if ($myxcount > 1 && $myX[0] != $myX[$myxcount-1]) {
- $geoType = 'MULTILINESTRING';
- if ($geometryType == 'LINESTRING') { $geoType = 'LINESTRING'; } //NEW!! funktioniert aber nur solange, wie keine wirklichen MULTILINESTRING's digitalisiert werden
- }
- if ($myxcount > 1 && $myX[0] == $myX[$myxcount-1]) {
- $geoType = 'MULTIPOLYGON';
- if ($geometryType == 'POLYGON') { $geoType = 'POLYGON'; } //NEW!! funktioniert aber nur...
- }
- //NEW!!! in Tabellen vom GEOMETRY-Typ lassen sich (datensatzweise) verschiedene Geometrien abspeichern
- if ($geometryType != $geoType && $geometryType != 'GEOMETRY') {
- echo "<br>";
- echo "Geometrie (".$geoType.") stimmt nicht mit der der Tabelle (".$geometryType.") überein!";
- die;
- }
-
- if(count(myX) != count(myY)){
- echo "Geometrie verschlüsselt.....................";
- die;
- }
- $sql = "INSERT INTO ".$tablenames."(";
- for($i=0; $i<count($myColumns); $i++){
- if($i>0){
- $sql .= ",";
- }
- $sql .= $myColumns[$i];
- }
- $sql .= ") ";
- $sql .= "VALUES (";
- for($i=0; $i<count($myColumns); $i++){
- if($i>0){
- $sql .= ",";
- }
-
- if($myColumns[$i] == $myGeometry){
- //NEW!! $geoType anstelle von $geometryType, um a) auch in Tabellen mit Geometrietyp 'Geometry' abspeichern zu können
- if ($geoType == "POINT") {
- $sql .= "transform(GeometryFromText('".$geoType."("; //$geoType anstelle von $geometryType s. o.
- } elseif ($geoType == "LINESTRING") {
- $sql .= "transform(GeometryFromText('".$geoType."(";
- } elseif ($geoType == "MULTILINESTRING") {
- $sql .= "transform(GeometryFromText('".$geoType."((";
- } elseif ($geoType == "POLYGON") {
- $sql .= "transform(GeometryFromText('".$geoType."((";
- } elseif ($geoType == "MULTIPOLYGON") {
- $sql .= "transform(GeometryFromText('".$geoType."(((";
- }
- for($j=0; $j<count($myX); $j++){
- if($j > 0){$sql .= ", ";}
- $sql .= $myX[$j] . " " . $myY[$j];
- }
- if ($geoType == "POINT") {
-// $sql .= ")))',".$src_epsg."),".$epsg.")"; //OLD!!! so funktioniert es mit postgis Version 0.9 !!
- $sql .= ")',".$src_epsg."),".$epsg.")"; //NEW!!! aber nur so mit 1.0.0 RC6
- } elseif ($geoType == "LINESTRING") { //NEW!!!
- $sql .= ")',".$src_epsg."),".$epsg.")";
- } elseif ($geoType == "MULTILINESTRING") {
-// $sql .= "))))',".$src_epsg."),".$epsg.")"; // 0.9
- $sql .= "))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
- } elseif ($geoType == "POLYGON") {
- $sql .= "))',".$src_epsg."),".$epsg.")"; //NEW!!!
- } elseif ($geoType == "MULTIPOLYGON") {
-// $sql .= ")))))',".$src_epsg."),".$epsg.")"; // 0.9
- $sql .= ")))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
- }
-/* Linestrings lassen sich in MULTILINESTRING, Polygone in MULTIPOLYGON-Tabellen abspeichern, wenn gegen $geoType geprüft wird, ergibt sich kein Problem
-// da sich aber MULTI... nicht in Tabellen vom einfachen Typ LINESTRING bzw. POLYGON abspeichern lassen, wurde dies oben (unelegant) abgefangen
- else {
- echo "<br>Tabelle vom Typ Linestring, Polygon etc?";
- }
-*/
- }
- else{
- $sql .= "'".$_REQUEST[$myColumns[$i]]."'";
- }
- }
- $sql .= ")";
- #echo $sql;
-$res = pg_query($con,$sql);
-}
-
-?>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_saveWKT.php (from rev 2138, branches/2.4.5/http/php/mod_saveWKT.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_saveWKT.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_saveWKT.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,237 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>mod_saveWKT</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type="text/javascript">
+<!--
+function validate(){
+ document.forms[0].x.value = "";
+ document.forms[0].y.value = "";
+ for(var i=0; i<window.opener.mod_measure_RX.length;i++){
+ if(i>0){ document.forms[0].x.value += ",";}
+ document.forms[0].x.value += window.opener.mod_measure_RX[i];
+ }
+ for(var i=0; i<window.opener.mod_measure_RY.length;i++){
+ if(i>0){ document.forms[0].y.value += ",";}
+ document.forms[0].y.value += window.opener.mod_measure_RY[i];
+ }
+ document.forms[0].save.value='true';
+ document.forms[0].src_epsg.value=window.opener.mod_measure_epsg.substr(5,5); //NEW!!!
+ document.forms[0].submit();
+}
+var geoType;
+function checkGeom(){
+ if(window.opener.mod_measure_RX.length == 1){
+ geoType = "POINT";
+ }
+ if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] =! window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
+ geoType = "MULTILINESTRING";
+ }
+ if(window.opener.mod_measure_RX.length > 1 && (window.opener.mod_measure_RX[0] == window.opener.mod_measure_RX[window.opener.mod_measure_RX.length -1])){
+ geoType = "MULTIPOLYGON";
+ }
+ if(document.forms[0].myGeometryType.value != geoType){
+ alert("Falscher Geometrietyp!");
+ }
+}
+// -->
+</script>
+</head>
+<!-- <body onload='checkGeom()'>
+//NEW!!! Bei Erstaufruf ist die ausgew�hlte Tabelle (und deren Geometrie) noch nicht bekannt!
+Deshalb zuvor eine Fehlermeldung. Jetzt als PHP-Code, siehe if($save) -->
+<body>
+<?php
+/*****************************************************************************
+personal postgresql parameters - pers�nliche Postgresql-Einstellungen */
+$host = "localhost";
+$port = "5432";
+define("DBname", "databasename");
+$user = "username";
+$password = "password";
+//personal example: pick only certain (working-) tables, here: tables which start with "mapbender_"
+$tblmb="mapbender_%";
+//*****************************************************************************
+
+import_request_variables("P");
+
+$con_string = "host=$host port=$port dbname=DBname user=$user password=$password";
+$con = pg_connect ($con_string) or die ("Error while connecting database DBname");
+$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns
+ where f_table_name like '$tblmb'"; //pick only certain tables (see above)
+//$sql = "SELECT f_table_name, f_geometry_column,type,srid FROM geometry_columns";
+$res = pg_query($con,$sql);
+$cnt = 0;
+echo "<form action='".$self."' method='POST'>";
+#echo "Selektieren: <input name='actionType' type='radio' value='select'>";
+#echo "Speichern: <input name='actionType' type='radio' value='create'><br>";
+echo "<select name='tablenames' onchange='submit()'>";
+echo "<option value=''>Bitte Tabelle auswählen...</option>";
+while(pg_fetch_row($res)){
+ echo "<option value='".pg_result($res,$cnt,"f_table_name")."' ";
+ if($tablenames == pg_result($res,$cnt,"f_table_name")){
+ echo "selected";
+ $geometry = pg_result($res,$cnt,"f_geometry_column");
+ $geometryType = pg_result($res,$cnt,"type");
+ $epsg = pg_result($res,$cnt,"srid");
+ }
+ echo ">".pg_result($res,$cnt,"f_table_name")."</option>";
+ $cnt++;
+}
+echo "</select>";
+
+
+if(isset($tablenames)){
+ $sql = "SELECT * from ".$tablenames." limit 1";
+ $res = pg_query($con,$sql);
+ $num = pg_num_fields($res);
+
+ echo "<table>";
+ $cnt = 0;
+ for($i=0; $i<$num; $i++){
+ echo "<tr>";
+ echo "<td>".pg_fieldname($res,$i)."</td><td><input type='text' name='".pg_fieldname($res,$i)."'></td><td>".pg_fieldtype($res,$i)."</td>";
+ echo "</tr>";
+ if(!isset($str_names)){
+ $str_names = pg_fieldname($res,$i);
+ }
+ else{
+ $str_names .= ",".pg_fieldname($res,$i);
+ }
+ $cnt++;
+ }
+ echo "</table>";
+ echo "<br>";
+ echo "<input type='button' value='save' onclick='validate()'>";
+ echo "<input type='hidden' value='' name='save'>";
+ echo "<input type='text' value='".$x."' name='x'>"; //NEW!!!
+ echo "<input type='text' value='".$y."' name='y'>"; //NEW!!!
+ echo "<input type='text' value='".$geometry."' name='myGeometry'>";
+ echo "<input type='text' value='".$geometryType."' name='myGeometryType'>";
+ echo "<input type='text' value='".$src_epsg."' name='src_epsg'>"; //NEW!!!
+ echo "<input type='text' value='".$epsg."' name='epsg'>";
+ echo "<input name='myStrColumns' type='text' value='".$str_names."'>";
+}
+if($save){
+ $myColumns = explode(",",$myStrColumns);
+ $myX = explode(",", $x);
+ $myY = explode(",", $y);
+ $myxcount = count($myX);
+
+ if ($myxcount == 1) {
+ $geoType = 'POINT';
+ }
+ if ($myxcount > 1 && $myX[0] != $myX[$myxcount-1]) {
+ $geoType = 'MULTILINESTRING';
+ if ($geometryType == 'LINESTRING') { $geoType = 'LINESTRING'; } //NEW!! funktioniert aber nur solange, wie keine wirklichen MULTILINESTRING's digitalisiert werden
+ }
+ if ($myxcount > 1 && $myX[0] == $myX[$myxcount-1]) {
+ $geoType = 'MULTIPOLYGON';
+ if ($geometryType == 'POLYGON') { $geoType = 'POLYGON'; } //NEW!! funktioniert aber nur...
+ }
+ //NEW!!! in Tabellen vom GEOMETRY-Typ lassen sich (datensatzweise) verschiedene Geometrien abspeichern
+ if ($geometryType != $geoType && $geometryType != 'GEOMETRY') {
+ echo "<br>";
+ echo "Geometrie (".$geoType.") stimmt nicht mit der der Tabelle (".$geometryType.") �berein!";
+ die;
+ }
+
+ if(count(myX) != count(myY)){
+ echo "Geometrie verschl�sselt.....................";
+ die;
+ }
+ $sql = "INSERT INTO ".$tablenames."(";
+ for($i=0; $i<count($myColumns); $i++){
+ if($i>0){
+ $sql .= ",";
+ }
+ $sql .= $myColumns[$i];
+ }
+ $sql .= ") ";
+ $sql .= "VALUES (";
+ for($i=0; $i<count($myColumns); $i++){
+ if($i>0){
+ $sql .= ",";
+ }
+
+ if($myColumns[$i] == $myGeometry){
+ //NEW!! $geoType anstelle von $geometryType, um a) auch in Tabellen mit Geometrietyp 'Geometry' abspeichern zu k�nnen
+ if ($geoType == "POINT") {
+ $sql .= "transform(GeometryFromText('".$geoType."("; //$geoType anstelle von $geometryType s. o.
+ } elseif ($geoType == "LINESTRING") {
+ $sql .= "transform(GeometryFromText('".$geoType."(";
+ } elseif ($geoType == "MULTILINESTRING") {
+ $sql .= "transform(GeometryFromText('".$geoType."((";
+ } elseif ($geoType == "POLYGON") {
+ $sql .= "transform(GeometryFromText('".$geoType."((";
+ } elseif ($geoType == "MULTIPOLYGON") {
+ $sql .= "transform(GeometryFromText('".$geoType."(((";
+ }
+ for($j=0; $j<count($myX); $j++){
+ if($j > 0){$sql .= ", ";}
+ $sql .= $myX[$j] . " " . $myY[$j];
+ }
+ if ($geoType == "POINT") {
+// $sql .= ")))',".$src_epsg."),".$epsg.")"; //OLD!!! so funktioniert es mit postgis Version 0.9 !!
+ $sql .= ")',".$src_epsg."),".$epsg.")"; //NEW!!! aber nur so mit 1.0.0 RC6
+ } elseif ($geoType == "LINESTRING") { //NEW!!!
+ $sql .= ")',".$src_epsg."),".$epsg.")";
+ } elseif ($geoType == "MULTILINESTRING") {
+// $sql .= "))))',".$src_epsg."),".$epsg.")"; // 0.9
+ $sql .= "))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
+ } elseif ($geoType == "POLYGON") {
+ $sql .= "))',".$src_epsg."),".$epsg.")"; //NEW!!!
+ } elseif ($geoType == "MULTIPOLYGON") {
+// $sql .= ")))))',".$src_epsg."),".$epsg.")"; // 0.9
+ $sql .= ")))',".$src_epsg."),".$epsg.")"; // postgis 1.0.0
+ }
+/* Linestrings lassen sich in MULTILINESTRING, Polygone in MULTIPOLYGON-Tabellen abspeichern, wenn gegen $geoType gepr�ft wird, ergibt sich kein Problem
+// da sich aber MULTI... nicht in Tabellen vom einfachen Typ LINESTRING bzw. POLYGON abspeichern lassen, wurde dies oben (unelegant) abgefangen
+ else {
+ echo "<br>Tabelle vom Typ Linestring, Polygon etc?";
+ }
+*/
+ }
+ else{
+ $sql .= "'".$_REQUEST[$myColumns[$i]]."'";
+ }
+ }
+ $sql .= ")";
+ #echo $sql;
+$res = pg_query($con,$sql);
+}
+
+?>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_showLoggedUser.php
===================================================================
--- branches/2.4.5/http/php/mod_showLoggedUser.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_showLoggedUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,46 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$gui_id = $_SESSION["mb_user_gui"];
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-import_request_variables("PG");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Show User</title>
-<?php
-include '../include/dyn_css.php';
-?>
-</head>
-<body leftmargin="5" topmargin="0">
-<?php
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-echo "<div class='text4'>Logged User: ".$logged_user_name."</div>";
-?>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_showLoggedUser.php (from rev 2138, branches/2.4.5/http/php/mod_showLoggedUser.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_showLoggedUser.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_showLoggedUser.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,44 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$gui_id = $_SESSION["mb_user_gui"];
+import_request_variables("PG");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Show User</title>
+<?php
+include '../include/dyn_css.php';
+?>
+</head>
+<body leftmargin="5" topmargin="0">
+<?php
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+echo "<div class='text4'>Logged User: ".$logged_user_name."</div>";
+?>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php
===================================================================
--- branches/2.4.5/http/php/mod_simpleWMSpreferences.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,184 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta name="author-mail" content="info at ccgis.de">
-<meta name="author" content="U. Rothstein">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Edit WMS Context</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<STYLE TYPE="text/css">
- <!--
- body{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- color:#0066cc;
- font-size:10pt
- }
-
- table{
- font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
- color:#0066cc;
- font-size:10pt
- }
-
- th{
- background-color:white;
- }
-
- select{
- width:240px;
- }
-
- .up{
- color:#0066cc;
- border: solid thin;
- height:20px;
- width:70px;
- }
-
- .remove{
- color:#0066cc;
- border: solid thin;
- height:20px;
- width:60px;
- }
- -->
-</STYLE>
-<?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT * FROM gui_element WHERE e_id = 'WMS_preferences' AND fkey_gui_id = $1";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-if($cnt > 1){ echo "alert('WMS_preferences: ID not unique!');";}
-echo '<script type="text/javascript">';
-$target = explode(",", $e_target);
-echo "var mod_WMSpreferences_target1 = '".trim($target[0])."';";
-echo "var mod_WMSpreferences_target2 = '".trim($target[1])."';";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
-var my = window.opener.mb_mapObj[ind];
-
-function setMapformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_mapformat = tmp[1];
- loadWMS();
-}
-function setFeatureformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_featureinfoformat = tmp[1];
- loadWMS();
-}
-function setExceptionformat(val){
- var tmp = val.split(",");
- my.wms[tmp[0]].gui_wms_exceptionformat = tmp[1];
- loadWMS();
-}
-function up(num){
- if(num > 0){
- var upper = new Object();
- upper = my.wms[num-1];
- var lower = new Object();
- my.wms[num-1] = my.wms[num];
- my.wms[num] = upper;
- window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
-
- var upperLayers = my.layers[num-1];
- var upperStyles = my.styles[num-1];
- var upperQuerylayers = my.querylayers[num-1];
- my.layers[num-1] = my.layers[num];
- my.styles[num-1] = my.styles[num];
- my.querylayers[num-1] = my.querylayers[num];
- my.layers[num] = upperLayers;
- my.styles[num] = upperStyles;
- my.querylayers[num] = upperQuerylayers;
- loadWMS();
- window.opener.zoom(mod_WMSpreferences_target1, true, 1.0);
- }
-}
-
-
-function remove_wms(num){
- //alert(num +" length:"+my.wms.length);
-
- if (my.wms.length>1) {
- var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
- window.opener.mb_mapObjremoveWMS(ind,num)
- //alert(ind);
- window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
- window.location.reload();
- }
- else{
- alert ("Last WMS can't be removed.\n(Der letzte WMS kann nicht entfernt werden.)");
- }
-}
-
-function loadWMS(){
- var str = "";
- for(var i=0; i < my.wms.length; i++){
- str += "<table border='0' cellpading ='1' size='100%'>";
-
- str += "<tr>";
- if(i==0){
- str += "<th><input src='/evudb/images/mapbender/button_gray/up_off.gif' disabled type='image' onclick='up("+i+")' value='nach oben'> <input src='/evudb/images/mapbender/button_gray/trash_on.gif' type='image' onclick='remove_wms("+i+")' value='entfernen'></th><th width='300'><div id ='id_"+my.wms[i].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+my.wms[i].wms_abstract+"\"'><b>"+my.wms[i].wms_title+"</b></div></th>";
- }
- else
- {
- str += "<th><input type='image' src='/evudb/images/mapbender/button_gray/up_on.gif' onclick='up("+i+")' value='nach oben'> <input src='/evudb/images/mapbender/button_gray/trash_on.gif' type='image' onclick='remove_wms("+i+")' value='entfernen'></th><th width='300'><div id ='id_"+my.wms[i].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+my.wms[i].wms_abstract+"\"'><b>"+my.wms[i].wms_title+"</b></div></th>";
- }
-
-
- str += "<tr>";
- str += "<table>";
-
-
-
- }
- document.getElementById('data').innerHTML = str;
-}
-
-// -->
-</script>
-</head>
-<body onload='loadWMS()'>
-<div id='data'><div>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php (from rev 2138, branches/2.4.5/http/php/mod_simpleWMSpreferences.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_simpleWMSpreferences.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,183 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta name="author-mail" content="info at ccgis.de">
+<meta name="author" content="U. Rothstein">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Edit WMS Context</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<STYLE TYPE="text/css">
+ <!--
+ body{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ color:#0066cc;
+ font-size:10pt
+ }
+
+ table{
+ font-family:Verdana, Geneva, Arial, Helvetica, sans-serif;
+ color:#0066cc;
+ font-size:10pt
+ }
+
+ th{
+ background-color:white;
+ }
+
+ select{
+ width:240px;
+ }
+
+ .up{
+ color:#0066cc;
+ border: solid thin;
+ height:20px;
+ width:70px;
+ }
+
+ .remove{
+ color:#0066cc;
+ border: solid thin;
+ height:20px;
+ width:60px;
+ }
+ -->
+</STYLE>
+<?php
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT * FROM gui_element WHERE e_id = 'WMS_preferences' AND fkey_gui_id = $1";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('WMS_preferences: ID not unique!');";}
+echo '<script type="text/javascript">';
+$target = explode(",", $e_target);
+echo "var mod_WMSpreferences_target1 = '".trim($target[0])."';";
+echo "var mod_WMSpreferences_target2 = '".trim($target[1])."';";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
+var my = window.opener.mb_mapObj[ind];
+
+function setMapformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_mapformat = tmp[1];
+ loadWMS();
+}
+function setFeatureformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_featureinfoformat = tmp[1];
+ loadWMS();
+}
+function setExceptionformat(val){
+ var tmp = val.split(",");
+ my.wms[tmp[0]].gui_wms_exceptionformat = tmp[1];
+ loadWMS();
+}
+function up(num){
+ if(num > 0){
+ var upper = new Object();
+ upper = my.wms[num-1];
+ var lower = new Object();
+ my.wms[num-1] = my.wms[num];
+ my.wms[num] = upper;
+ window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
+
+ var upperLayers = my.layers[num-1];
+ var upperStyles = my.styles[num-1];
+ var upperQuerylayers = my.querylayers[num-1];
+ my.layers[num-1] = my.layers[num];
+ my.styles[num-1] = my.styles[num];
+ my.querylayers[num-1] = my.querylayers[num];
+ my.layers[num] = upperLayers;
+ my.styles[num] = upperStyles;
+ my.querylayers[num] = upperQuerylayers;
+ loadWMS();
+ window.opener.zoom(mod_WMSpreferences_target1, true, 1.0);
+ }
+}
+
+
+function remove_wms(num){
+ //alert(num +" length:"+my.wms.length);
+
+ if (my.wms.length>1) {
+ var ind = window.opener.getMapObjIndexByName(mod_WMSpreferences_target1);
+ window.opener.mb_mapObjremoveWMS(ind,num)
+ //alert(ind);
+ window.opener.frames[mod_WMSpreferences_target2].document.location.reload();
+ window.location.reload();
+ }
+ else{
+ alert ("Last WMS can't be removed.\n(Der letzte WMS kann nicht entfernt werden.)");
+ }
+}
+
+function loadWMS(){
+ var str = "";
+ for(var i=0; i < my.wms.length; i++){
+ str += "<table border='0' cellpading ='1' size='100%'>";
+
+ str += "<tr>";
+ if(i==0){
+ str += "<th><input src='/evudb/images/mapbender/button_gray/up_off.gif' disabled type='image' onclick='up("+i+")' value='nach oben'> <input src='/evudb/images/mapbender/button_gray/trash_on.gif' type='image' onclick='remove_wms("+i+")' value='entfernen'></th><th width='300'><div id ='id_"+my.wms[i].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+my.wms[i].wms_abstract+"\"'><b>"+my.wms[i].wms_title+"</b></div></th>";
+ }
+ else
+ {
+ str += "<th><input type='image' src='/evudb/images/mapbender/button_gray/up_on.gif' onclick='up("+i+")' value='nach oben'> <input src='/evudb/images/mapbender/button_gray/trash_on.gif' type='image' onclick='remove_wms("+i+")' value='entfernen'></th><th width='300'><div id ='id_"+my.wms[i].wms_id+"' style='cursor:pointer' onmouseover = 'title=\""+my.wms[i].wms_abstract+"\"'><b>"+my.wms[i].wms_title+"</b></div></th>";
+ }
+
+
+ str += "<tr>";
+ str += "<table>";
+
+
+
+ }
+ document.getElementById('data').innerHTML = str;
+}
+
+// -->
+</script>
+</head>
+<body onload='loadWMS()'>
+<div id='data'><div>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php
===================================================================
--- branches/2.4.5/http/php/mod_treefolderAdmin.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,561 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) see license below
-#
-# Dual License
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<TITLE>Treefolder Administration</TITLE>
-<STYLE TYPE="text/css">
- <!--
- .sitemap {
- font-family:Arial,Helvetica;
- font-size:10pt;
- line-height:6pt;
- }
-
- body { margin-top:7px;
- margin-left:4px;
- }
- a:link { text-decoration: none }
- a:visited { text-decoration: none }
- a:active { text-decoration: none }
- // -->
-</STYLE>
-<SCRIPT language="JavaScript1.2">
- <!--
-
- /*
- * sitemap.js 1.31 05/02/2000
- * - Opera 5
- *
- * sitemap.js 1.3 27/11/2000
- * - Netscape 6
- *
- * sitemap.js 1.2 20/05/2000
- * - split array tree into arrays for each element old tree
- * - no mory type flag, an folder is an entry which has sons
- * - a folder can have an link
- * - while initing an default layers is shown
- *
- * sitemap.js 1.1 20/10/1999
- * - showTree only updates and init layers new which have been really changed
- * - add deep to knot entry
- * - substitute knotDeep[ id ] w/ tree[ id2treeIndex[ id ] ].deep
- * - add alignment to img and a at the beginning of eyery line
- * - add a fake img for bookmarks on top panel
- *
- * sitemap.js 1.02 14/10/1999
- * - fix bug in initStyles
- *
- * sitemap.js 1.01 06/10/1999
- * - fix bug in knotDeep for Netscape 4.00-4.0.5
- *
- * sitemap.js 1.0 20/09/1999
- *
- * Javascript function for displaying hierarchic directory structures with
- * the ability to collapse and expand directories.
- *
- * Copyright (c) 1999 Polzin GmbH, Duesseldorf. All Rights Reserved.
- * Author: Lutz Eymers <ixtab at polzin.com>
- * Download: http://www.polzin.com/inet/fset_inet.phtml?w=goodies
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for any purposes and without fee
- * is hereby granted provided that this copyright notice
- * appears in all copies.
- *
- * Of course, this software is provided "as is" without express or implied
- * warranty of any kind.
- *
- */
-
-window.onError=null;
-
-var idx=0
-var treeId = new Array();
-var treeP_id = new Array();
-var treeIsOn = new Array();
-var treeTyp = new Array();
-var treeName = new Array();
-var treeUrl = new Array();
-var treeWasOn = new Array();
-var treeDeep = new Array();
-var treeLastY = new Array();
-var treeIsShown = new Array();
-var treeURL = new Array();
-var treeWMS = new Array();
-
-function Note( id,p_id,name,url,left,wms_id) {
- treeId[ idx ] = id;
- treeP_id[ idx ] = p_id;
- treeIsOn[ idx ] = true;
- treeTyp[ idx ] = 'f';
- treeName[ idx ] = name + " <input type='radio' value='"+left+"' name='radio1' style='width:10px;height:10px' onclick='parent.document.forms[0].left.value="+left+"'>" + left + " ("+url+" - "+wms_id+")";
- treeUrl[ idx ] = url ;
- treeWasOn[ idx ] = true;
- treeDeep[ idx ] = 0;
- treeLastY[ idx ] = 0;
- treeIsShown[ idx ] = true;
- treeURL [ idx ] = url;
- treeWMS [ idx ] = wms_id;
- idx++;
-// if(url != ''){
-// parent.loadImage(name);
-// }
- }
-
- function initDiv ( )
- {
- if ( isDOM || isDomIE )
- {
- divPrefix='<DIV CLASS="sitemap" style="position:absolute; left:0; top:0; visibility:hidden;" ID="sitemap'
- divInfo='<DIV CLASS="sitemap" style="position:absolute; visibility:visible" ID="sitemap'
- }
- else
- {
- divPrefix='<DIV CLASS="sitemap" ID="sitemap'
- divInfo='<DIV CLASS="sitemap" ID="sitemap'
- }
- document.writeln( divInfo + 'info">Bitte haben Sie etwas Geduld.<BR> <BR>Es werden die Einträge aus<BR> <BR>der Datenbank initialisiert.</DIV> ' );
- document.writeln("<form name='treeForm'>");
- for ( var i=1; i<idx; i++ )
- {
-
- // linked Name ?
- if ( treeUrl[i] != '' )
-// onClick='if(this.checked){parent.addSelectedLayer("1",""+treeURL[i]+"","visibles")} else{parent.removeSelectedLayer("1",""+treeURL[i]+"","visibles")}'
- linkedName = "<input type='checkbox' onClick=''><IMG SRC='../img/tree/1w.gif' BORDER='0' WIDTH='3'><span>" + treeName[i] + "</span>"
- else
- linkedName = '<IMG SRC="../img/tree/1w.gif" BORDER="0" WIDTH="3">' + treeName[i]
- // don't link folder icon if node has no sons
- if ( i == idx-1 || treeP_id[i+1] != treeId[i] ) {
- if ( treeDeep[ i ] == 0 )
- folderImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="1" HSPACE="0">'
- else
- folderImg = ''
- } else {
- folderImg = '<A HREF="javascript:sitemapClick(' + treeId[i] + ')"><IMG ALIGN="BOTTOM" SRC="../img/tree/folder_off.gif" BORDER="0" NAME="folder' + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0"></A>'
- }
- // which type of file icon should be displayed?
- if ( treeP_id[i] != 0 )
- {
- if ( lastEntryInFolder( treeId[i] ) )
- fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_last.gif" BORDER="0" NAME="file'
- + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
- else
- fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file.gif" BORDER="0" NAME="file'
- + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
- }
- else
- fileImg = ''
- // traverse parents up to root and show vertical lines if parent
- // is not the last entry on this layer
- verticales = ''
- for( var act_id=treeId[i] ; treeDeep[ id2treeIndex[ act_id ] ] > 1; )
- {
- act_id = treeP_id[ id2treeIndex[ act_id ]]
- if ( lastEntryInFolder( act_id ) )
- {
- verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
- }
- else
- {
- verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_vert.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
- }
- }
-
-
- document.writeln( divPrefix + treeId[i] + '"><NOBR> ' + verticales + fileImg + folderImg + linkedName + '</NOBR></DIV><BR>'
- )
- }
- document.writeln("</form>");
- }
-
- function initStyles ( )
- {
- document.writeln( '<STYLE TYPE="text/css">' + "\n" + '<!--' )
- for ( var i=1,y=y0; i<idx; i++ )
- {
- document.writeln( '#sitemap' + treeId[i] + ' {POSITION: absolute; VISIBILITY: hidden;}' )
- if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
- y += deltaY
- }
- document.writeln( '#sitemapinfo {POSITION: absolute; VISIBILITY: visible;}' )
- document.writeln( '//-->' + "\n" + '</STYLE>' )
- }
-
-
-
- function sitemapClick( id )
- {
- var i = id2treeIndex[ id ]
-
- if ( treeIsOn[ i ] )
- // close directory
- {
- // mark node as invisible
- treeIsOn[ i ]=false
- // mark all sons as invisible
- actDeep = treeDeep[ i ]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
- {
- treeWasOn[ j ] = treeIsOn[ j ]
- treeIsOn[ j ]=false
- }
- gif_off( id )
- }
- else
- // open directory
- {
- treeIsOn[ i ]=true
- // remember and restore old status
- actDeep = treeDeep[ i ]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
- {
- treeIsOn[ j ] = treeWasOn[ j ]
- }
- gif_on( id )
- }
- showTree()
- }
-
- function knotDeep( id )
- {
- var deep=0
- while ( true )
- if ( treeP_id[ id2treeIndex[id] ] == 0 )
- return deep
- else
- {
- ++deep
- id = treeP_id[ id2treeIndex[id] ]
- }
- return deep
- }
-
- function initTree( id )
- {
- treeIsOn[ id2treeIndex[id] ] = true
- if ( treeTyp[ id2treeIndex[id] ] != 'b' )
- gif_on( id )
- while ( treeP_id[ id2treeIndex[id] ] != 0 )
- {
- id = treeP_id[ id2treeIndex[id] ]
- treeIsOn[ id2treeIndex[id] ] = true
- if ( treeTyp[ id2treeIndex[id] ] != 'b' )
- gif_on( id )
- }
- }
-
- function lastEntryInFolder( id )
- {
- var i = id2treeIndex[id]
- if ( i == idx-1 )
- return true
- if ( treeTyp[i] == 'b' )
- {
- if ( treeP_id[i+1] != treeP_id[i] )
- return true
- else
- return false
- }
- else
- {
- var actDeep = treeDeep[i]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep ; j++ )
- ;
- if ( j<idx && treeDeep[j] == actDeep )
- return false
- else
- return true
- }
- }
-
- function showTree()
- {
- for( var i=1, y=y0, x=x0; i<idx; i++ )
- {
- if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
- {
- // show current node
- if ( !(y == treeLastY[i] && treeIsShown[i] ) )
- {
- showLayer( "sitemap"+ treeId[i] )
- setyLayer( "sitemap"+ treeId[i], y )
- treeIsShown[i] = true
- }
- treeLastY[i] = y
- y += deltaY
- }
- else
- {
- // hide current node and all sons
- if ( treeIsShown[ i ] )
- {
- hideLayer( "sitemap"+ treeId[i] )
- treeIsShown[i] = false
- }
- }
- }
- }
-
- function initIndex() {
- for( var i=0; i<idx; i++ )
- id2treeIndex[ treeId[i] ] = i
- }
-
- function gif_name (name, width, height) {
- this.on = new Image (width, height);
- this.on.src ="../img/tree/" + name + "_on.gif"
- this.off = new Image (width, height);
- this.off.src ="../img/tree/" + name + "_off.gif"
- }
-
- function load_gif (name, width, height) {
- gif_name [name] = new gif_name (name,width,height);
- }
-
- function load_all () {
- load_gif ('folder',30,16)
- file_last = new Image( 30,16 )
- file_last.src = "file_last.gif"
- file_middle = new Image( 30,16 )
- file_middle.src = "file.gif"
- file_vert = new Image( 30,16 )
- file_vert.src = "file_vert.gif"
- file_empty = new Image( 30,16 )
- file_empty = "file_empty.gif"
- }
-
- function gif_on ( id ) {
- eval("document['folder" + id + "'].src = gif_name['folder'].on.src")
- }
-
- function gif_off ( id ) {
- eval("document['folder" + id + "'].src = gif_name['folder'].off.src")
- }
-
- // global configuration
- var deltaX = 30
- var deltaY = 16
- var x0 = 5
- var y0 = 5
- var defaultTarget = 'examplemain'
-
- var browserName = navigator.appName;
- var browserVersion = parseInt(navigator.appVersion);
- var isIE = false;
- var isNN = false;
- var isDOM = false;
- var isDomIE = false;
- var isDomNN = false;
- var layerok = false;
-
- var isIE = browserName.indexOf("Microsoft Internet Explorer" )==-1?false:true;
- var isNN = browserName.indexOf("Netscape")==-1?false:true;
- var isOpera = browserName.indexOf("Opera")==-1?false:true;
- var isDOM = document.getElementById?true:false;
- var isDomNN = document.layers?true:false;
- var isDomIE = document.all?true:false;
-
- if ( isNN && browserVersion>=4 ) layerok=true;
- if ( isIE && browserVersion>=4 ) layerok=true;
- if ( isOpera && browserVersion>=5 ) layerok=true;
-
-
- function hideLayer(layerName) {
- if (isDOM)
- document.getElementById(layerName).style.visibility="hidden"
- else if (isDomIE)
- document.all[layerName].style.visibility="hidden";
- else if (isDomNN)
- document.layers[layerName].visibility="hidden";
- }
-
- function showLayer(layerName) {
- if (isDOM)
- document.getElementById(layerName).style.visibility="visible"
- else if (isDomIE)
- document.all[layerName].style.visibility="visible";
- else if (isDomNN)
- document.layers[layerName].visibility="visible";
- }
-
- function setyLayer(layerName, y) {
- if (isDOM)
- document.getElementById(layerName).style.top=y
- else if (isDomIE)
- document.all[layerName].style.top=y;
- else if (isDomNN)
- document.layers[layerName].top=y;
- }
-
- var id2treeIndex = new Array()
-
- // the structure is easy to understand with a simple example
- // p_id is the id of the parent
- // E0 ( id=0,p_id=-1 )
- // E11 ( id=1,p_id=0)
- // E111 ( id=2,p_id=1 )
- // E112 ( id=3,p_id=1 )
- // E12 ( id=4,p_id=0 )
- // E121 ( id=5,p_id=4 )
- // E13 ( id=6,p_id=0 )
- // E131 ( id=7,p_id=6 )
- // E1311 ( id=8,p_id=7 )
- // E132 ( id=9,p_id=6 )
- // this is a multinary tree structure which is easy to
- // populate with database data :)
-<?php
-$sql = "SELECT id FROM gui_treegde WHERE fkey_gui_id = $1";
-// $v and $t will be re-used below!
-$v = array($guiList);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-if(!db_fetch_row($res)){
- $sql = "INSERT INTO gui_treegde(fkey_gui_id, my_layer_title,lft,rgt,layer) VALUES($1, 'new','1','4','')";
- //using $v and $t fom above
- db_prep_query($sql, $v, $t);
- $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES($1,'new','2','3','')";
- //using $v and $t fom above
- db_prep_query($sql, $v, $t);
-}
-
-$sql = "SELECT n.wms_id, n.id, n.my_layer_title, n.lft, n.rgt, n.layer, COUNT(*) AS level1, ((n.rgt - n.lft -1)/2) AS offspring ";
-$sql .= "FROM gui_treegde as n, gui_treegde as p WHERE n.lft BETWEEN p.lft AND p.rgt ";
-$sql .= " AND n.fkey_gui_id = $1 AND p.fkey_gui_id = $2 ";
-$sql .= " GROUP BY n.wms_id, n.lft, n.my_layer_title, ((n.rgt - n.lft -1)/2) , n.id, n.rgt, n.layer ORDER BY n.lft;";
-#echo $sql;
-$v = array($guiList, $guiList);
-$t = array("s", "s");
-$res = db_prep_query($sql, $v, $t);
- echo "function initArray(){";
- echo "Note(0,-1,'','');";
- $cnt = 0;
-
- while($row = db_fetch_array($res)){
- if(db_result($res, $cnt, "level1") == 1 && $row["offspring"] >= 0 ){
- if(count($parent) > 0){unset($parent);}
- $level = db_result($res, $cnt, "level1");
- $parent[$level+1] = db_result($res, $cnt, "id");
- echo "Note(".$row["id"].",0,'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
- if($row["wms_id"] != ''){
- echo ", '".$row["wms_id"]."'";
- }
- echo ");";
- }
- /**/
- else if($row["level1"] > $level){
- $level = $row["level1"];
- $parent[$level+1] = $row["id"];
- echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
- if($row["wms_id"] != ''){
- echo ", '".$row["wms_id"]."'";
- }
- echo ");";
- }
- /**/
- else if($row["level1"] == $level){
- $level = $row["level1"];
- $parent[$level+1] = $row["id"];
- echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
- if($row["wms_id"] != ''){
- echo ", '".$row["wms_id"]."'";
- }
- echo ");";
- }
- /**/
- else if($row["level1"] < $level){
- $level = $row["level1"];
- $parent[$level + 1] = $row["id"];
- echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
- if($row["wms_id"] != ''){
- echo ", '".$row["wms_id"]."'";
- }
- echo ");";
- }
-
- $cnt++;
- }
- echo "treeTyp[0] = 'f'; treeIsOn[0] = true; treeWasOn[0] = true;";
- echo "}";
-?>
- function initArray_()
- {
- Note(0,-1,'','')
- Note(1,0,'Tutorials','')
- Note(8,1,'HTML','')
- Note(10,8,'SelfHtml','http://www.teamone.de/selfaktuell/')
- Note(9,1,'willi','')
- Note(100,9,'SelfHtml','http://www.teamone.de/selfaktuell/')
- Note(3,1,'JavaScript','')
- Note(4,3, 'Netscape Guide 1.3','http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm')
- Note(7,3, 'Introduction to Javascript','http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm')
- Note(12,1, 'Perl','')
- Note(14,12, 'Perl Tutorial','http://www.awu.id.ethz.ch/~didi/perl/perl_start.html')
- Note(13,1,'SQL','')
- Note(15,13, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
- Note(111,1, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
- Note(2,0, 'Reference Manuals','')
- Note(11,2, 'HTML Version 3.2 Referenz','http://www.cls-online.de/htmlref/index.htm')
- Note(6,2,'Netscape Reference 1.3','http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm')
- Note(17,2,'PHP Manual','http://www.php.net/manual/html/')
- treeTyp[0] = 'f'
- treeIsOn[0] = true
- treeWasOn[0] = true
- }
-
- var idx=0
- initArray()
- initIndex()
- load_all()
- for( i=1; i<idx; i++ )
- {
- treeDeep[i] = knotDeep( treeId[i] )
- if ( treeDeep[i] == 0 )
- treeIsShown[i] = true
- }
- if ( isDomNN )
- initStyles();
- //-->
- </SCRIPT>
-</HEAD>
-<BODY VLINK="#000000" ALINK="#000000" LINK="#000000" BGCOLOR="#ffffff" TEXT="#000000"
- onLoad="if (layerok) showTree();"
- MARGINHEIGHT="0" MARGINWIDTH="0" LEFTMARGIN="0" TOPMARGIN="0" onkeydown="parent.keyhandler('FolderFrame')">
-<SCRIPT language="JavaScript1.2">
-<!--
- initDiv();
- hideLayer("sitemapinfo");
-//-->
-</SCRIPT>
-</BODY>
-</HTML>
Copied: branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php (from rev 2138, branches/2.4.5/http/php/mod_treefolderAdmin.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_treefolderAdmin.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,561 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) see license below
+#
+# Dual License
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<TITLE>Treefolder Administration</TITLE>
+<STYLE TYPE="text/css">
+ <!--
+ .sitemap {
+ font-family:Arial,Helvetica;
+ font-size:10pt;
+ line-height:6pt;
+ }
+
+ body { margin-top:7px;
+ margin-left:4px;
+ }
+ a:link { text-decoration: none }
+ a:visited { text-decoration: none }
+ a:active { text-decoration: none }
+ // -->
+</STYLE>
+<SCRIPT language="JavaScript1.2">
+ <!--
+
+ /*
+ * sitemap.js 1.31 05/02/2000
+ * - Opera 5
+ *
+ * sitemap.js 1.3 27/11/2000
+ * - Netscape 6
+ *
+ * sitemap.js 1.2 20/05/2000
+ * - split array tree into arrays for each element old tree
+ * - no mory type flag, an folder is an entry which has sons
+ * - a folder can have an link
+ * - while initing an default layers is shown
+ *
+ * sitemap.js 1.1 20/10/1999
+ * - showTree only updates and init layers new which have been really changed
+ * - add deep to knot entry
+ * - substitute knotDeep[ id ] w/ tree[ id2treeIndex[ id ] ].deep
+ * - add alignment to img and a at the beginning of eyery line
+ * - add a fake img for bookmarks on top panel
+ *
+ * sitemap.js 1.02 14/10/1999
+ * - fix bug in initStyles
+ *
+ * sitemap.js 1.01 06/10/1999
+ * - fix bug in knotDeep for Netscape 4.00-4.0.5
+ *
+ * sitemap.js 1.0 20/09/1999
+ *
+ * Javascript function for displaying hierarchic directory structures with
+ * the ability to collapse and expand directories.
+ *
+ * Copyright (c) 1999 Polzin GmbH, Duesseldorf. All Rights Reserved.
+ * Author: Lutz Eymers <ixtab at polzin.com>
+ * Download: http://www.polzin.com/inet/fset_inet.phtml?w=goodies
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * and its documentation for any purposes and without fee
+ * is hereby granted provided that this copyright notice
+ * appears in all copies.
+ *
+ * Of course, this software is provided "as is" without express or implied
+ * warranty of any kind.
+ *
+ */
+
+window.onError=null;
+
+var idx=0
+var treeId = new Array();
+var treeP_id = new Array();
+var treeIsOn = new Array();
+var treeTyp = new Array();
+var treeName = new Array();
+var treeUrl = new Array();
+var treeWasOn = new Array();
+var treeDeep = new Array();
+var treeLastY = new Array();
+var treeIsShown = new Array();
+var treeURL = new Array();
+var treeWMS = new Array();
+
+function Note( id,p_id,name,url,left,wms_id) {
+ treeId[ idx ] = id;
+ treeP_id[ idx ] = p_id;
+ treeIsOn[ idx ] = true;
+ treeTyp[ idx ] = 'f';
+ treeName[ idx ] = name + " <input type='radio' value='"+left+"' name='radio1' style='width:10px;height:10px' onclick='parent.document.forms[0].left.value="+left+"'>" + left + " ("+url+" - "+wms_id+")";
+ treeUrl[ idx ] = url ;
+ treeWasOn[ idx ] = true;
+ treeDeep[ idx ] = 0;
+ treeLastY[ idx ] = 0;
+ treeIsShown[ idx ] = true;
+ treeURL [ idx ] = url;
+ treeWMS [ idx ] = wms_id;
+ idx++;
+// if(url != ''){
+// parent.loadImage(name);
+// }
+ }
+
+ function initDiv ( )
+ {
+ if ( isDOM || isDomIE )
+ {
+ divPrefix='<DIV CLASS="sitemap" style="position:absolute; left:0; top:0; visibility:hidden;" ID="sitemap'
+ divInfo='<DIV CLASS="sitemap" style="position:absolute; visibility:visible" ID="sitemap'
+ }
+ else
+ {
+ divPrefix='<DIV CLASS="sitemap" ID="sitemap'
+ divInfo='<DIV CLASS="sitemap" ID="sitemap'
+ }
+ document.writeln( divInfo + 'info">Bitte haben Sie etwas Geduld.<BR> <BR>Es werden die Einträge aus<BR> <BR>der Datenbank initialisiert.</DIV> ' );
+ document.writeln("<form name='treeForm'>");
+ for ( var i=1; i<idx; i++ )
+ {
+
+ // linked Name ?
+ if ( treeUrl[i] != '' )
+// onClick='if(this.checked){parent.addSelectedLayer("1",""+treeURL[i]+"","visibles")} else{parent.removeSelectedLayer("1",""+treeURL[i]+"","visibles")}'
+ linkedName = "<input type='checkbox' onClick=''><IMG SRC='../img/tree/1w.gif' BORDER='0' WIDTH='3'><span>" + treeName[i] + "</span>"
+ else
+ linkedName = '<IMG SRC="../img/tree/1w.gif" BORDER="0" WIDTH="3">' + treeName[i]
+ // don't link folder icon if node has no sons
+ if ( i == idx-1 || treeP_id[i+1] != treeId[i] ) {
+ if ( treeDeep[ i ] == 0 )
+ folderImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="1" HSPACE="0">'
+ else
+ folderImg = ''
+ } else {
+ folderImg = '<A HREF="javascript:sitemapClick(' + treeId[i] + ')"><IMG ALIGN="BOTTOM" SRC="../img/tree/folder_off.gif" BORDER="0" NAME="folder' + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0"></A>'
+ }
+ // which type of file icon should be displayed?
+ if ( treeP_id[i] != 0 )
+ {
+ if ( lastEntryInFolder( treeId[i] ) )
+ fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_last.gif" BORDER="0" NAME="file'
+ + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
+ else
+ fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file.gif" BORDER="0" NAME="file'
+ + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
+ }
+ else
+ fileImg = ''
+ // traverse parents up to root and show vertical lines if parent
+ // is not the last entry on this layer
+ verticales = ''
+ for( var act_id=treeId[i] ; treeDeep[ id2treeIndex[ act_id ] ] > 1; )
+ {
+ act_id = treeP_id[ id2treeIndex[ act_id ]]
+ if ( lastEntryInFolder( act_id ) )
+ {
+ verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
+ }
+ else
+ {
+ verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_vert.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
+ }
+ }
+
+
+ document.writeln( divPrefix + treeId[i] + '"><NOBR> ' + verticales + fileImg + folderImg + linkedName + '</NOBR></DIV><BR>'
+ )
+ }
+ document.writeln("</form>");
+ }
+
+ function initStyles ( )
+ {
+ document.writeln( '<STYLE TYPE="text/css">' + "\n" + '<!--' )
+ for ( var i=1,y=y0; i<idx; i++ )
+ {
+ document.writeln( '#sitemap' + treeId[i] + ' {POSITION: absolute; VISIBILITY: hidden;}' )
+ if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
+ y += deltaY
+ }
+ document.writeln( '#sitemapinfo {POSITION: absolute; VISIBILITY: visible;}' )
+ document.writeln( '//-->' + "\n" + '</STYLE>' )
+ }
+
+
+
+ function sitemapClick( id )
+ {
+ var i = id2treeIndex[ id ]
+
+ if ( treeIsOn[ i ] )
+ // close directory
+ {
+ // mark node as invisible
+ treeIsOn[ i ]=false
+ // mark all sons as invisible
+ actDeep = treeDeep[ i ]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
+ {
+ treeWasOn[ j ] = treeIsOn[ j ]
+ treeIsOn[ j ]=false
+ }
+ gif_off( id )
+ }
+ else
+ // open directory
+ {
+ treeIsOn[ i ]=true
+ // remember and restore old status
+ actDeep = treeDeep[ i ]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
+ {
+ treeIsOn[ j ] = treeWasOn[ j ]
+ }
+ gif_on( id )
+ }
+ showTree()
+ }
+
+ function knotDeep( id )
+ {
+ var deep=0
+ while ( true )
+ if ( treeP_id[ id2treeIndex[id] ] == 0 )
+ return deep
+ else
+ {
+ ++deep
+ id = treeP_id[ id2treeIndex[id] ]
+ }
+ return deep
+ }
+
+ function initTree( id )
+ {
+ treeIsOn[ id2treeIndex[id] ] = true
+ if ( treeTyp[ id2treeIndex[id] ] != 'b' )
+ gif_on( id )
+ while ( treeP_id[ id2treeIndex[id] ] != 0 )
+ {
+ id = treeP_id[ id2treeIndex[id] ]
+ treeIsOn[ id2treeIndex[id] ] = true
+ if ( treeTyp[ id2treeIndex[id] ] != 'b' )
+ gif_on( id )
+ }
+ }
+
+ function lastEntryInFolder( id )
+ {
+ var i = id2treeIndex[id]
+ if ( i == idx-1 )
+ return true
+ if ( treeTyp[i] == 'b' )
+ {
+ if ( treeP_id[i+1] != treeP_id[i] )
+ return true
+ else
+ return false
+ }
+ else
+ {
+ var actDeep = treeDeep[i]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep ; j++ )
+ ;
+ if ( j<idx && treeDeep[j] == actDeep )
+ return false
+ else
+ return true
+ }
+ }
+
+ function showTree()
+ {
+ for( var i=1, y=y0, x=x0; i<idx; i++ )
+ {
+ if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
+ {
+ // show current node
+ if ( !(y == treeLastY[i] && treeIsShown[i] ) )
+ {
+ showLayer( "sitemap"+ treeId[i] )
+ setyLayer( "sitemap"+ treeId[i], y )
+ treeIsShown[i] = true
+ }
+ treeLastY[i] = y
+ y += deltaY
+ }
+ else
+ {
+ // hide current node and all sons
+ if ( treeIsShown[ i ] )
+ {
+ hideLayer( "sitemap"+ treeId[i] )
+ treeIsShown[i] = false
+ }
+ }
+ }
+ }
+
+ function initIndex() {
+ for( var i=0; i<idx; i++ )
+ id2treeIndex[ treeId[i] ] = i
+ }
+
+ function gif_name (name, width, height) {
+ this.on = new Image (width, height);
+ this.on.src ="../img/tree/" + name + "_on.gif"
+ this.off = new Image (width, height);
+ this.off.src ="../img/tree/" + name + "_off.gif"
+ }
+
+ function load_gif (name, width, height) {
+ gif_name [name] = new gif_name (name,width,height);
+ }
+
+ function load_all () {
+ load_gif ('folder',30,16)
+ file_last = new Image( 30,16 )
+ file_last.src = "file_last.gif"
+ file_middle = new Image( 30,16 )
+ file_middle.src = "file.gif"
+ file_vert = new Image( 30,16 )
+ file_vert.src = "file_vert.gif"
+ file_empty = new Image( 30,16 )
+ file_empty = "file_empty.gif"
+ }
+
+ function gif_on ( id ) {
+ eval("document['folder" + id + "'].src = gif_name['folder'].on.src")
+ }
+
+ function gif_off ( id ) {
+ eval("document['folder" + id + "'].src = gif_name['folder'].off.src")
+ }
+
+ // global configuration
+ var deltaX = 30
+ var deltaY = 16
+ var x0 = 5
+ var y0 = 5
+ var defaultTarget = 'examplemain'
+
+ var browserName = navigator.appName;
+ var browserVersion = parseInt(navigator.appVersion);
+ var isIE = false;
+ var isNN = false;
+ var isDOM = false;
+ var isDomIE = false;
+ var isDomNN = false;
+ var layerok = false;
+
+ var isIE = browserName.indexOf("Microsoft Internet Explorer" )==-1?false:true;
+ var isNN = browserName.indexOf("Netscape")==-1?false:true;
+ var isOpera = browserName.indexOf("Opera")==-1?false:true;
+ var isDOM = document.getElementById?true:false;
+ var isDomNN = document.layers?true:false;
+ var isDomIE = document.all?true:false;
+
+ if ( isNN && browserVersion>=4 ) layerok=true;
+ if ( isIE && browserVersion>=4 ) layerok=true;
+ if ( isOpera && browserVersion>=5 ) layerok=true;
+
+
+ function hideLayer(layerName) {
+ if (isDOM)
+ document.getElementById(layerName).style.visibility="hidden"
+ else if (isDomIE)
+ document.all[layerName].style.visibility="hidden";
+ else if (isDomNN)
+ document.layers[layerName].visibility="hidden";
+ }
+
+ function showLayer(layerName) {
+ if (isDOM)
+ document.getElementById(layerName).style.visibility="visible"
+ else if (isDomIE)
+ document.all[layerName].style.visibility="visible";
+ else if (isDomNN)
+ document.layers[layerName].visibility="visible";
+ }
+
+ function setyLayer(layerName, y) {
+ if (isDOM)
+ document.getElementById(layerName).style.top=y
+ else if (isDomIE)
+ document.all[layerName].style.top=y;
+ else if (isDomNN)
+ document.layers[layerName].top=y;
+ }
+
+ var id2treeIndex = new Array()
+
+ // the structure is easy to understand with a simple example
+ // p_id is the id of the parent
+ // E0 ( id=0,p_id=-1 )
+ // E11 ( id=1,p_id=0)
+ // E111 ( id=2,p_id=1 )
+ // E112 ( id=3,p_id=1 )
+ // E12 ( id=4,p_id=0 )
+ // E121 ( id=5,p_id=4 )
+ // E13 ( id=6,p_id=0 )
+ // E131 ( id=7,p_id=6 )
+ // E1311 ( id=8,p_id=7 )
+ // E132 ( id=9,p_id=6 )
+ // this is a multinary tree structure which is easy to
+ // populate with database data :)
+<?php
+$sql = "SELECT id FROM gui_treegde WHERE fkey_gui_id = $1";
+// $v and $t will be re-used below!
+$v = array($guiList);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+if(!db_fetch_row($res)){
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id, my_layer_title,lft,rgt,layer) VALUES($1, 'new','1','4','')";
+ //using $v and $t fom above
+ db_prep_query($sql, $v, $t);
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES($1,'new','2','3','')";
+ //using $v and $t fom above
+ db_prep_query($sql, $v, $t);
+}
+
+$sql = "SELECT n.wms_id, n.id, n.my_layer_title, n.lft, n.rgt, n.layer, COUNT(*) AS level1, ((n.rgt - n.lft -1)/2) AS offspring ";
+$sql .= "FROM gui_treegde as n, gui_treegde as p WHERE n.lft BETWEEN p.lft AND p.rgt ";
+$sql .= " AND n.fkey_gui_id = $1 AND p.fkey_gui_id = $2 ";
+$sql .= " GROUP BY n.wms_id, n.lft, n.my_layer_title, ((n.rgt - n.lft -1)/2) , n.id, n.rgt, n.layer ORDER BY n.lft;";
+#echo $sql;
+$v = array($guiList, $guiList);
+$t = array("s", "s");
+$res = db_prep_query($sql, $v, $t);
+ echo "function initArray(){";
+ echo "Note(0,-1,'','');";
+ $cnt = 0;
+
+ while($row = db_fetch_array($res)){
+ if(db_result($res, $cnt, "level1") == 1 && $row["offspring"] >= 0 ){
+ if(count($parent) > 0){unset($parent);}
+ $level = db_result($res, $cnt, "level1");
+ $parent[$level+1] = db_result($res, $cnt, "id");
+ echo "Note(".$row["id"].",0,'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
+ if($row["wms_id"] != ''){
+ echo ", '".$row["wms_id"]."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if($row["level1"] > $level){
+ $level = $row["level1"];
+ $parent[$level+1] = $row["id"];
+ echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
+ if($row["wms_id"] != ''){
+ echo ", '".$row["wms_id"]."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if($row["level1"] == $level){
+ $level = $row["level1"];
+ $parent[$level+1] = $row["id"];
+ echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
+ if($row["wms_id"] != ''){
+ echo ", '".$row["wms_id"]."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if($row["level1"] < $level){
+ $level = $row["level1"];
+ $parent[$level + 1] = $row["id"];
+ echo "Note(".$row["id"].",".$parent[$level].",'".$row["my_layer_title"]."','".$row["layer"]."',".$row["lft"];
+ if($row["wms_id"] != ''){
+ echo ", '".$row["wms_id"]."'";
+ }
+ echo ");";
+ }
+
+ $cnt++;
+ }
+ echo "treeTyp[0] = 'f'; treeIsOn[0] = true; treeWasOn[0] = true;";
+ echo "}";
+?>
+ function initArray_()
+ {
+ Note(0,-1,'','')
+ Note(1,0,'Tutorials','')
+ Note(8,1,'HTML','')
+ Note(10,8,'SelfHtml','http://www.teamone.de/selfaktuell/')
+ Note(9,1,'willi','')
+ Note(100,9,'SelfHtml','http://www.teamone.de/selfaktuell/')
+ Note(3,1,'JavaScript','')
+ Note(4,3, 'Netscape Guide 1.3','http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm')
+ Note(7,3, 'Introduction to Javascript','http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm')
+ Note(12,1, 'Perl','')
+ Note(14,12, 'Perl Tutorial','http://www.awu.id.ethz.ch/~didi/perl/perl_start.html')
+ Note(13,1,'SQL','')
+ Note(15,13, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
+ Note(111,1, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
+ Note(2,0, 'Reference Manuals','')
+ Note(11,2, 'HTML Version 3.2 Referenz','http://www.cls-online.de/htmlref/index.htm')
+ Note(6,2,'Netscape Reference 1.3','http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm')
+ Note(17,2,'PHP Manual','http://www.php.net/manual/html/')
+ treeTyp[0] = 'f'
+ treeIsOn[0] = true
+ treeWasOn[0] = true
+ }
+
+ var idx=0
+ initArray()
+ initIndex()
+ load_all()
+ for( i=1; i<idx; i++ )
+ {
+ treeDeep[i] = knotDeep( treeId[i] )
+ if ( treeDeep[i] == 0 )
+ treeIsShown[i] = true
+ }
+ if ( isDomNN )
+ initStyles();
+ //-->
+ </SCRIPT>
+</HEAD>
+<BODY VLINK="#000000" ALINK="#000000" LINK="#000000" BGCOLOR="#ffffff" TEXT="#000000"
+ onLoad="if (layerok) showTree();"
+ MARGINHEIGHT="0" MARGINWIDTH="0" LEFTMARGIN="0" TOPMARGIN="0" onkeydown="parent.keyhandler('FolderFrame')">
+<SCRIPT language="JavaScript1.2">
+<!--
+ initDiv();
+ hideLayer("sitemapinfo");
+//-->
+</SCRIPT>
+</BODY>
+</HTML>
Deleted: branches/2.4.5_rc1/http/php/mod_treefolderClient.php
===================================================================
--- branches/2.4.5/http/php/mod_treefolderClient.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_treefolderClient.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,679 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$guiList = $_SESSION["mb_user_gui"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<HTML>
-<HEAD>
-<META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-
-<TITLE>Treefolder Client</TITLE>
- <STYLE TYPE="text/css">
- <!--
- .sitemap {
- font-family:Arial,Helvetica;
- font-size:10pt;
- line-height:6pt;
- }
-
- body { margin-top:7px;
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- margin-left:4px;
- overflow-x: hidden;
- }
- a:link {
- text-decoration: none;
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- }
- a:visited {
- text-decoration: none;
- font-family : Arial, Helvetica, sans-serif;
- font-size : 12px;
- font-weight : bold;
- color: #808080;
- }
- a:active { text-decoration: none }
- a:active { text-decoration: none }
- .header{
- font-family : Arial, Helvetica, sans-serif;
- font-size : 14px;
- font-weight : bold;
- color: #808080;
- }
- // -->
- </STYLE>
-<?php
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'treeConfGDE' AND fkey_gui_id = $1";
-$v = array($guiList);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-while(db_fetch_row($res)){
- $e_target = db_result($res,0,"e_target");
- $cnt++;
-}
-if($cnt > 1){ echo "alert('treeConfGDE: ID not unique!');";}
-echo "<script language='JavaScript'>";
-echo "var treetarget = '".$e_target."';";
-echo "</script>";
-?>
- <SCRIPT language="JavaScript1.2">
- <!--
-
- /*
- * sitemap.js 1.31 05/02/2000
- * - Opera 5
- *
- * sitemap.js 1.3 27/11/2000
- * - Netscape 6
- *
- * sitemap.js 1.2 20/05/2000
- * - split array tree into arrays for each element old tree
- * - no mory type flag, an folder is an entry which has sons
- * - a folder can have an link
- * - while initing an default layers is shown
- *
- * sitemap.js 1.1 20/10/1999
- * - showTree only updates and init layers new which have been really changed
- * - add deep to knot entry
- * - substitute knotDeep[ id ] w/ tree[ id2treeIndex[ id ] ].deep
- * - add alignment to img and a at the beginning of eyery line
- * - add a fake img for bookmarks on top panel
- *
- * sitemap.js 1.02 14/10/1999
- * - fix bug in initStyles
- *
- * sitemap.js 1.01 06/10/1999
- * - fix bug in knotDeep for Netscape 4.00-4.0.5
- *
- * sitemap.js 1.0 20/09/1999
- *
- * Javascript function for displaying hierarchic directory structures with
- * the ability to collapse and expand directories.
- *
- * Copyright (c) 1999 Polzin GmbH, Duesseldorf. All Rights Reserved.
- * Author: Lutz Eymers <ixtab at polzin.com>
- * Download: http://www.polzin.com/inet/fset_inet.phtml?w=goodies
- *
- * Permission to use, copy, modify, and distribute this software
- * and its documentation for any purposes and without fee
- * is hereby granted provided that this copyright notice
- * appears in all copies.
- *
- * Of course, this software is provided "as is" without express or implied
- * warranty of any kind.
- *
- */
-
- window.onError=null;
-
- var idx=0
- var treeId = new Array();
- var treeP_id = new Array();
- var treeIsOn = new Array();
- var treeTyp = new Array();
- var treeName = new Array();
- var treeUrl = new Array();
- var treeWasOn = new Array();
- var treeDeep = new Array();
- var treeLastY = new Array();
- var treeIsShown = new Array();
- var treeURL = new Array();
- var treeWMS_id = new Array();
-// o_id,level, Beschr, layer_id,lft, wms_id
- function Note( id,p_id,name,url,left, wms_id ) {
- treeId[ idx ] = id;
- treeP_id[ idx ] = p_id;
- treeIsOn[ idx ] = false;
- treeTyp[ idx ] = 'f';
- treeName[ idx ] = name;
- treeUrl[ idx ] = url ;
- treeWasOn[ idx ] = false;
- treeDeep[ idx ] = 0;
- treeLastY[ idx ] = 0;
- treeIsShown[ idx ] = false;
- treeURL [ idx ] = url;
- treeWMS_id [ idx ] = wms_id;
- idx++;
-// if(url != ''){
-// parent.loadImage(name);
-// }
- }
-function handleClick(wms,layer){
- var array_wms = new Array();
- var array_layer = new Array();
- array_wms = wms.split(",");
- array_layer = layer.split(",");
- var myObj;
- var ind = parent.getMapObjIndexByName(treetarget);
- for(var i=0; i<array_wms.length; i++){
- var indwms = parent.getWMSIndexById(treetarget,array_wms[i]);
- for(var j=0; j<parent.mb_mapObj[ind].wms[indwms].objLayer.length; j++){
- myObj = parent.mb_mapObj[ind].wms[indwms].objLayer[j];
- if(myObj.layer_name == array_layer[i] && myObj.layer_metadataurl != ""){
- window.open(myObj.layer_metadataurl);
- }
- }
- }
-}
-function handleLayer(obj){
- var params = obj.value.split("###");
- var array_wms = new Array();
- var array_layer = new Array();
- array_wms = params[0].split(",");
- array_layer = params[1].split(",");
- var type = params[2];
- if(obj.checked == true){ var status = '1';}
- else{var status = '0';}
- //handleSelectedLayer_array(mapObj, array_wms, array_layer, type, status)
- parent.handleSelectedLayer_array(treetarget, array_wms, array_layer, 'visible', status);
- parent.handleSelectedLayer_array(treetarget, array_wms, array_layer, 'querylayer', status);
-}
-var cBox = new Array();
-function setObjArray(){
- for (var i=0; i< document.getElementsByTagName("input").length; i++){
- var temp = document.getElementsByTagName("input")[i].value.split("###");
- array_wms = temp[0].split(",");
- array_layer = temp[1].split(",");
- var ind = cBox.length;
- cBox[ind] = new Array();
- cBox[ind]['id'] = document.getElementsByTagName("input")[i].id;
- cBox[ind]['wms'] = new Array();
- cBox[ind]['layer'] = new Array();
- cBox[ind]['wms'] = array_wms;
- cBox[ind]['layer'] = array_layer;
- }
-}
-function checkLayer(){
- var checkit;
- for(var i=0; i<cBox.length; i++){
- checkit = true;
- for(var j=0; j<cBox[i]['wms'].length;j++){
- var obj = parent.mb_getLayerObjByName(treetarget,cBox[i]['wms'][j],cBox[i]['layer'][j]);
- if(obj){
- if(obj.gui_layer_visible == '0' || obj.gui_layer_visible == 0){
- checkit = false;
- }
- }
- else{
- alert(cBox[i]['wms'][j]+" / "+cBox[i]['layer'][j]+"not defined.");
- }
- }
- if(checkit){
- document.getElementById(cBox[i]['id']).checked = true;
- }
- else{
- document.getElementById(cBox[i]['id']).checked = false;
- }
- }
-}
- function initDiv ( )
- {
- document.writeln("<span class='header'><?php echo $language[MSG53] ?></span>");
- if ( isDOM || isDomIE )
- {
- divPrefix='<DIV CLASS="sitemap" style="position:absolute; left:0; top:0; visibility:hidden;" ID="sitemap'
- divInfo='<DIV CLASS="sitemap" style="position:absolute; visibility:visible" ID="sitemap'
- }
- else
- {
- divPrefix='<DIV CLASS="sitemap" ID="sitemap'
- divInfo='<DIV CLASS="sitemap" ID="sitemap'
- }
- document.writeln( divInfo + 'info">Bitte haben Sie etwas Geduld.<BR> <BR>Es werden die Einträge aus<BR> <BR>der Datenbank initialisiert.</DIV> ' );
- document.writeln("<form name='treeForm'>");
- for ( var i=1; i<idx; i++ )
- {
-
- // linked Name ?
- if ( treeUrl[i] != '' ){
- linkedName = "<input type='checkbox' id='c_"+i+"' value='"+treeWMS_id[i]+"###"+treeUrl[i]+"' onClick='handleLayer(this)'>";
- //linkedName += "<input type='checkbox' id='q"+i+"' value='"+treeWMS_id[i]+"###"+treeUrl[i]+"###querylayer' onClick='handleLayer(this.value)'>";
- linkedName += "<IMG SRC='../img/tree/1w.gif' BORDER='0' WIDTH='3'>";
- linkedName += "<A onclick='handleClick(\""+treeWMS_id[i]+"\",\""+treeUrl[i]+"\")' style='cursor:pointer'>" + treeName[i] + "</A>";
- }
- else{
- linkedName = '<IMG SRC="../img/tree/1w.gif" BORDER="0" WIDTH="3">' + treeName[i];
- }
- // don't link folder icon if node has no sons
- if ( i == idx-1 || treeP_id[i+1] != treeId[i] ) {
- if ( treeDeep[ i ] == 0 )
- folderImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="1" HSPACE="0">'
- else
- folderImg = ''
- } else {
- folderImg = '<A HREF="javascript:sitemapClick(' + treeId[i] + ')"><IMG ALIGN="BOTTOM" SRC="../img/tree/folder_off.gif" BORDER="0" NAME="folder' + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0"></A>'
- }
- // which type of file icon should be displayed?
- if ( treeP_id[i] != 0 )
- {
- if ( lastEntryInFolder( treeId[i] ) )
- fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_last.gif" BORDER="0" NAME="file'
- + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
- else
- fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file.gif" BORDER="0" NAME="file'
- + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
- }
- else
- fileImg = ''
- // traverse parents up to root and show vertical lines if parent
- // is not the last entry on this layer
- verticales = ''
- for( var act_id=treeId[i] ; treeDeep[ id2treeIndex[ act_id ] ] > 1; )
- {
- act_id = treeP_id[ id2treeIndex[ act_id ]]
- if ( lastEntryInFolder( act_id ) )
- {
- verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
- }
- else
- {
- verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_vert.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
- }
- }
-
-
- document.writeln( divPrefix + treeId[i] + '"><NOBR> ' + verticales + fileImg + folderImg + linkedName + '</NOBR></DIV>'
- )
- }
- document.writeln("</form>");
- }
-
- function initStyles ( )
- {
- document.writeln( '<STYLE TYPE="text/css">' + "\n" + '<!--' )
- for ( var i=1,y=y0; i<idx; i++ )
- {
- document.writeln( '#sitemap' + treeId[i] + ' {POSITION: absolute; VISIBILITY: hidden;}' )
- if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
- y += deltaY
- }
- document.writeln( '#sitemapinfo {POSITION: absolute; VISIBILITY: visible;}' )
- document.writeln( '//-->' + "\n" + '</STYLE>' )
- }
-
-
-
- function sitemapClick( id )
- {
- var i = id2treeIndex[ id ]
-
- if ( treeIsOn[ i ] )
- // close directory
- {
- // mark node as invisible
- treeIsOn[ i ]=false
- // mark all sons as invisible
- actDeep = treeDeep[ i ]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
- {
- treeWasOn[ j ] = treeIsOn[ j ]
- treeIsOn[ j ]=false
- }
- gif_off( id )
- }
- else
- // open directory
- {
- treeIsOn[ i ]=true
- // remember and restore old status
- actDeep = treeDeep[ i ]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
- {
- treeIsOn[ j ] = treeWasOn[ j ]
- }
- gif_on( id )
- }
- showTree()
- }
-
- function knotDeep( id )
- {
- var deep=0
- while ( true )
- if ( treeP_id[ id2treeIndex[id] ] == 0 )
- return deep
- else
- {
- ++deep
- id = treeP_id[ id2treeIndex[id] ]
- }
- return deep
- }
-
- function initTree( id )
- {
- treeIsOn[ id2treeIndex[id] ] = true
- if ( treeTyp[ id2treeIndex[id] ] != 'b' )
- gif_on( id )
- while ( treeP_id[ id2treeIndex[id] ] != 0 )
- {
- id = treeP_id[ id2treeIndex[id] ]
- treeIsOn[ id2treeIndex[id] ] = true
- if ( treeTyp[ id2treeIndex[id] ] != 'b' )
- gif_on( id )
- }
- }
-
- function lastEntryInFolder( id )
- {
- var i = id2treeIndex[id]
- if ( i == idx-1 )
- return true
- if ( treeTyp[i] == 'b' )
- {
- if ( treeP_id[i+1] != treeP_id[i] )
- return true
- else
- return false
- }
- else
- {
- var actDeep = treeDeep[i]
- for( var j=i+1; j<idx && treeDeep[j] > actDeep ; j++ )
- ;
- if ( j<idx && treeDeep[j] == actDeep )
- return false
- else
- return true
- }
- }
-
- function showTree()
- {
- for( var i=1, y=y0, x=x0; i<idx; i++ )
- {
- if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
- {
- // show current node
- if ( !(y == treeLastY[i] && treeIsShown[i] ) )
- {
- showLayer( "sitemap"+ treeId[i] )
- setyLayer( "sitemap"+ treeId[i], y )
- treeIsShown[i] = true
- }
- treeLastY[i] = y
- y += deltaY
- }
- else
- {
- // hide current node and all sons
- if ( treeIsShown[ i ] )
- {
- hideLayer( "sitemap"+ treeId[i] )
- treeIsShown[i] = false
- }
- }
- }
- }
-
- function initIndex() {
- for( var i=0; i<idx; i++ )
- id2treeIndex[ treeId[i] ] = i
- }
-
- function gif_name (name, width, height) {
- this.on = new Image (width, height);
- this.on.src ="../img/tree/" + name + "_on.gif"
- this.off = new Image (width, height);
- this.off.src ="../img/tree/" + name + "_off.gif"
- }
-
- function load_gif (name, width, height) {
- gif_name [name] = new gif_name (name,width,height);
- }
-
- function load_all () {
- load_gif ('folder',30,16)
- file_last = new Image( 30,16 )
- file_last.src = "file_last.gif"
- file_middle = new Image( 30,16 )
- file_middle.src = "file.gif"
- file_vert = new Image( 30,16 )
- file_vert.src = "file_vert.gif"
- file_empty = new Image( 30,16 )
- file_empty = "file_empty.gif"
- }
-
- function gif_on ( id ) {
- eval("document['folder" + id + "'].src = gif_name['folder'].on.src")
- }
-
- function gif_off ( id ) {
- eval("document['folder" + id + "'].src = gif_name['folder'].off.src")
- }
-
- // global configuration
- var deltaX = 30
- var deltaY = 16
- var x0 = 5
- var y0 = 20
- var defaultTarget = '_blank'
-
- var browserName = navigator.appName;
- var browserVersion = parseInt(navigator.appVersion);
- var isIE = false;
- var isNN = false;
- var isDOM = false;
- var isDomIE = false;
- var isDomNN = false;
- var layerok = false;
-
- var isIE = browserName.indexOf("Microsoft Internet Explorer" )==-1?false:true;
- var isNN = browserName.indexOf("Netscape")==-1?false:true;
- var isOpera = browserName.indexOf("Opera")==-1?false:true;
- var isDOM = document.getElementById?true:false;
- var isDomNN = document.layers?true:false;
- var isDomIE = document.all?true:false;
-
- if ( isNN && browserVersion>=4 ) layerok=true;
- if ( isIE && browserVersion>=4 ) layerok=true;
- if ( isOpera && browserVersion>=5 ) layerok=true;
-
-
- function hideLayer(layerName) {
- if (isDOM)
- document.getElementById(layerName).style.visibility="hidden"
- else if (isDomIE)
- document.all[layerName].style.visibility="hidden";
- else if (isDomNN)
- document.layers[layerName].visibility="hidden";
- }
-
- function showLayer(layerName) {
- if (isDOM)
- document.getElementById(layerName).style.visibility="visible"
- else if (isDomIE)
- document.all[layerName].style.visibility="visible";
- else if (isDomNN)
- document.layers[layerName].visibility="visible";
- }
-
- function setyLayer(layerName, y) {
- if (isDOM)
- document.getElementById(layerName).style.top=y
- else if (isDomIE)
- document.all[layerName].style.top=y;
- else if (isDomNN)
- document.layers[layerName].top=y;
- }
-
- var id2treeIndex = new Array()
-
- // the structure is easy to understand with a simple example
- // p_id is the id of the parent
- // E0 ( id=0,p_id=-1 )
- // E11 ( id=1,p_id=0)
- // E111 ( id=2,p_id=1 )
- // E112 ( id=3,p_id=1 )
- // E12 ( id=4,p_id=0 )
- // E121 ( id=5,p_id=4 )
- // E13 ( id=6,p_id=0 )
- // E131 ( id=7,p_id=6 )
- // E1311 ( id=8,p_id=7 )
- // E132 ( id=9,p_id=6 )
- // this is a multinary tree structure which is easy to
- // populate with database data :)
-<?php
-$sql = "SELECT id FROM gui_treegde WHERE fkey_gui_id = $1";
-// $v and $t will be re-used below!
-$v = array($guiList);
-$t = array("s");
-$res = db_prep_query($sql, $v, $t);
-if(!db_fetch_row($res)){
- $sql = "INSERT INTO gui_treegde(fkey_gui_id, my_layer_title,lft,rgt,layer) VALUES($1, 'new','1','4','')";
- //using $v and $t fom above
- db_prep_query($sql, $v, $t);
- $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES($1,'new','2','3','')";
- //using $v and $t fom above
- db_prep_query($sql, $v, $t);
-}
-
-$sql = "SELECT n.wms_id, n.id, n.my_layer_title, n.lft, n.rgt, n.layer, COUNT(*) AS level1, ((n.rgt - n.lft -1)/2) AS offspring ";
-$sql .= "FROM gui_treegde as n, gui_treegde as p WHERE n.lft BETWEEN p.lft AND p.rgt ";
-$sql .= " AND n.fkey_gui_id = $1 AND p.fkey_gui_id = $2 ";
-$sql .= " GROUP BY n.wms_id, n.lft, n.my_layer_title, ((n.rgt - n.lft -1)/2) , n.id, n.rgt, n.layer ORDER BY n.lft";
-$v = array($guiList, $guiList);
-$t = array("s", "s");
-$res = db_prep_query($sql, $v, $t);
- echo "function initArray(){";
- echo "Note(0,-1,'','');";
- $cnt = 0;
-
- while(db_fetch_row($res)){
- if(db_result($res, $cnt, "level1") == 1 && db_result($res, $cnt, "offspring") >= 0 ){
- if(count($parent) > 0){unset($parent);}
- $level = db_result($res, $cnt, "level1");
- $parent[$level+1] = db_result($res, $cnt, "id");
-
- echo "Note(".db_result($res, $cnt, "id").",0,'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
- if(db_result($res, $cnt, "wms_id") != ''){
- echo ", '".db_result($res, $cnt, "wms_id")."'";
- }
- echo ");";
- }
- /**/
- else if(db_result($res, $cnt, "level1") > $level){
- $level = db_result($res, $cnt, "level1");
- $parent[$level+1] = db_result($res, $cnt, "id");
- echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
- if(db_result($res, $cnt, "wms_id") != ''){
- echo ", '".db_result($res, $cnt, "wms_id")."'";
- }
- echo ");";
- }
- /**/
- else if(db_result($res, $cnt, "level1") == $level){
- $level = db_result($res, $cnt, "level1");
- $parent[$level+1] = db_result($res, $cnt, "id");
- echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
- if(db_result($res, $cnt, "wms_id") != ''){
- echo ", '".db_result($res, $cnt, "wms_id")."'";
- }
- echo ");";
- }
- /**/
- else if(db_result($res, $cnt, "level1") < $level){
- $level = db_result($res, $cnt, "level1");
- $parent[$level + 1] = db_result($res, $cnt, "id");
- echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
- if(db_result($res, $cnt, "wms_id") != ''){
- echo ", '".db_result($res, $cnt, "wms_id")."'";
- }
- echo ");";
- }
-
- $cnt++;
- }
- echo "treeTyp[0] = 'f'; treeIsOn[0] = true; treeWasOn[0] = true;";
- echo "}";
-?>
- function initArray_()
- {
- Note(0,-1,'','')
- Note(1,0,'Tutorials','')
- Note(8,1,'HTML','')
- Note(10,8,'SelfHtml','http://www.teamone.de/selfaktuell/')
- Note(9,1,'willi','')
- Note(100,9,'SelfHtml','http://www.teamone.de/selfaktuell/')
- Note(3,1,'JavaScript','')
- Note(4,3, 'Netscape Guide 1.3','http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm')
- Note(7,3, 'Introduction to Javascript','http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm')
- Note(12,1, 'Perl','')
- Note(14,12, 'Perl Tutorial','http://www.awu.id.ethz.ch/~didi/perl/perl_start.html')
- Note(13,1,'SQL','')
- Note(15,13, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
- Note(111,1, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
- Note(2,0, 'Reference Manuals','')
- Note(11,2, 'HTML Version 3.2 Referenz','http://www.cls-online.de/htmlref/index.htm')
- Note(6,2,'Netscape Reference 1.3','http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm')
- Note(17,2,'PHP Manual','http://www.php.net/manual/html/')
- treeTyp[0] = 'f'
- treeIsOn[0] = true
- treeWasOn[0] = true
- }
-
- var idx=0
- initArray()
- initIndex()
- load_all()
- for( i=1; i<idx; i++ )
- {
- treeDeep[i] = knotDeep( treeId[i] )
- if ( treeDeep[i] == 0 )
- treeIsShown[i] = true
- }
- if ( isDomNN )
- initStyles();
- //-->
- </SCRIPT>
-</HEAD>
-<BODY VLINK="#000000" ALINK="#000000" LINK="#000000" BGCOLOR="#ffffff" TEXT="#000000"
- onLoad="if (layerok) showTree();"
- >
- <!-- onkeydown="parent.keyhandler('FolderFrame')"-->
-<SCRIPT language="JavaScript1.2">
-<!--
- initDiv();
- hideLayer("sitemapinfo");
- setObjArray();
-//-->
-</SCRIPT>
-</BODY>
-</HTML>
Copied: branches/2.4.5_rc1/http/php/mod_treefolderClient.php (from rev 2138, branches/2.4.5/http/php/mod_treefolderClient.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_treefolderClient.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_treefolderClient.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,677 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$guiList = $_SESSION["mb_user_gui"];
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
+<HTML>
+<HEAD>
+<META NAME="Generator" CONTENT="Cosmo Create 1.0.3">
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+
+<TITLE>Treefolder Client</TITLE>
+ <STYLE TYPE="text/css">
+ <!--
+ .sitemap {
+ font-family:Arial,Helvetica;
+ font-size:10pt;
+ line-height:6pt;
+ }
+
+ body { margin-top:7px;
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ margin-left:4px;
+ overflow-x: hidden;
+ }
+ a:link {
+ text-decoration: none;
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ }
+ a:visited {
+ text-decoration: none;
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ font-weight : bold;
+ color: #808080;
+ }
+ a:active { text-decoration: none }
+ a:active { text-decoration: none }
+ .header{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size : 14px;
+ font-weight : bold;
+ color: #808080;
+ }
+ // -->
+ </STYLE>
+<?php
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'treeConfGDE' AND fkey_gui_id = $1";
+$v = array($guiList);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+while(db_fetch_row($res)){
+ $e_target = db_result($res,0,"e_target");
+ $cnt++;
+}
+if($cnt > 1){ echo "alert('treeConfGDE: ID not unique!');";}
+echo "<script language='JavaScript'>";
+echo "var treetarget = '".$e_target."';";
+echo "</script>";
+?>
+ <SCRIPT language="JavaScript1.2">
+ <!--
+
+ /*
+ * sitemap.js 1.31 05/02/2000
+ * - Opera 5
+ *
+ * sitemap.js 1.3 27/11/2000
+ * - Netscape 6
+ *
+ * sitemap.js 1.2 20/05/2000
+ * - split array tree into arrays for each element old tree
+ * - no mory type flag, an folder is an entry which has sons
+ * - a folder can have an link
+ * - while initing an default layers is shown
+ *
+ * sitemap.js 1.1 20/10/1999
+ * - showTree only updates and init layers new which have been really changed
+ * - add deep to knot entry
+ * - substitute knotDeep[ id ] w/ tree[ id2treeIndex[ id ] ].deep
+ * - add alignment to img and a at the beginning of eyery line
+ * - add a fake img for bookmarks on top panel
+ *
+ * sitemap.js 1.02 14/10/1999
+ * - fix bug in initStyles
+ *
+ * sitemap.js 1.01 06/10/1999
+ * - fix bug in knotDeep for Netscape 4.00-4.0.5
+ *
+ * sitemap.js 1.0 20/09/1999
+ *
+ * Javascript function for displaying hierarchic directory structures with
+ * the ability to collapse and expand directories.
+ *
+ * Copyright (c) 1999 Polzin GmbH, Duesseldorf. All Rights Reserved.
+ * Author: Lutz Eymers <ixtab at polzin.com>
+ * Download: http://www.polzin.com/inet/fset_inet.phtml?w=goodies
+ *
+ * Permission to use, copy, modify, and distribute this software
+ * and its documentation for any purposes and without fee
+ * is hereby granted provided that this copyright notice
+ * appears in all copies.
+ *
+ * Of course, this software is provided "as is" without express or implied
+ * warranty of any kind.
+ *
+ */
+
+ window.onError=null;
+
+ var idx=0
+ var treeId = new Array();
+ var treeP_id = new Array();
+ var treeIsOn = new Array();
+ var treeTyp = new Array();
+ var treeName = new Array();
+ var treeUrl = new Array();
+ var treeWasOn = new Array();
+ var treeDeep = new Array();
+ var treeLastY = new Array();
+ var treeIsShown = new Array();
+ var treeURL = new Array();
+ var treeWMS_id = new Array();
+// o_id,level, Beschr, layer_id,lft, wms_id
+ function Note( id,p_id,name,url,left, wms_id ) {
+ treeId[ idx ] = id;
+ treeP_id[ idx ] = p_id;
+ treeIsOn[ idx ] = false;
+ treeTyp[ idx ] = 'f';
+ treeName[ idx ] = name;
+ treeUrl[ idx ] = url ;
+ treeWasOn[ idx ] = false;
+ treeDeep[ idx ] = 0;
+ treeLastY[ idx ] = 0;
+ treeIsShown[ idx ] = false;
+ treeURL [ idx ] = url;
+ treeWMS_id [ idx ] = wms_id;
+ idx++;
+// if(url != ''){
+// parent.loadImage(name);
+// }
+ }
+function handleClick(wms,layer){
+ var array_wms = new Array();
+ var array_layer = new Array();
+ array_wms = wms.split(",");
+ array_layer = layer.split(",");
+ var myObj;
+ var ind = parent.getMapObjIndexByName(treetarget);
+ for(var i=0; i<array_wms.length; i++){
+ var indwms = parent.getWMSIndexById(treetarget,array_wms[i]);
+ for(var j=0; j<parent.mb_mapObj[ind].wms[indwms].objLayer.length; j++){
+ myObj = parent.mb_mapObj[ind].wms[indwms].objLayer[j];
+ if(myObj.layer_name == array_layer[i] && myObj.layer_metadataurl != ""){
+ window.open(myObj.layer_metadataurl);
+ }
+ }
+ }
+}
+function handleLayer(obj){
+ var params = obj.value.split("###");
+ var array_wms = new Array();
+ var array_layer = new Array();
+ array_wms = params[0].split(",");
+ array_layer = params[1].split(",");
+ var type = params[2];
+ if(obj.checked == true){ var status = '1';}
+ else{var status = '0';}
+ //handleSelectedLayer_array(mapObj, array_wms, array_layer, type, status)
+ parent.handleSelectedLayer_array(treetarget, array_wms, array_layer, 'visible', status);
+ parent.handleSelectedLayer_array(treetarget, array_wms, array_layer, 'querylayer', status);
+}
+var cBox = new Array();
+function setObjArray(){
+ for (var i=0; i< document.getElementsByTagName("input").length; i++){
+ var temp = document.getElementsByTagName("input")[i].value.split("###");
+ array_wms = temp[0].split(",");
+ array_layer = temp[1].split(",");
+ var ind = cBox.length;
+ cBox[ind] = new Array();
+ cBox[ind]['id'] = document.getElementsByTagName("input")[i].id;
+ cBox[ind]['wms'] = new Array();
+ cBox[ind]['layer'] = new Array();
+ cBox[ind]['wms'] = array_wms;
+ cBox[ind]['layer'] = array_layer;
+ }
+}
+function checkLayer(){
+ var checkit;
+ for(var i=0; i<cBox.length; i++){
+ checkit = true;
+ for(var j=0; j<cBox[i]['wms'].length;j++){
+ var obj = parent.mb_getLayerObjByName(treetarget,cBox[i]['wms'][j],cBox[i]['layer'][j]);
+ if(obj){
+ if(obj.gui_layer_visible == '0' || obj.gui_layer_visible == 0){
+ checkit = false;
+ }
+ }
+ else{
+ alert(cBox[i]['wms'][j]+" / "+cBox[i]['layer'][j]+"not defined.");
+ }
+ }
+ if(checkit){
+ document.getElementById(cBox[i]['id']).checked = true;
+ }
+ else{
+ document.getElementById(cBox[i]['id']).checked = false;
+ }
+ }
+}
+ function initDiv ( )
+ {
+ document.writeln("<span class='header'><?php echo $language[MSG53] ?></span>");
+ if ( isDOM || isDomIE )
+ {
+ divPrefix='<DIV CLASS="sitemap" style="position:absolute; left:0; top:0; visibility:hidden;" ID="sitemap'
+ divInfo='<DIV CLASS="sitemap" style="position:absolute; visibility:visible" ID="sitemap'
+ }
+ else
+ {
+ divPrefix='<DIV CLASS="sitemap" ID="sitemap'
+ divInfo='<DIV CLASS="sitemap" ID="sitemap'
+ }
+ document.writeln( divInfo + 'info">Bitte haben Sie etwas Geduld.<BR> <BR>Es werden die Einträge aus<BR> <BR>der Datenbank initialisiert.</DIV> ' );
+ document.writeln("<form name='treeForm'>");
+ for ( var i=1; i<idx; i++ )
+ {
+
+ // linked Name ?
+ if ( treeUrl[i] != '' ){
+ linkedName = "<input type='checkbox' id='c_"+i+"' value='"+treeWMS_id[i]+"###"+treeUrl[i]+"' onClick='handleLayer(this)'>";
+ //linkedName += "<input type='checkbox' id='q"+i+"' value='"+treeWMS_id[i]+"###"+treeUrl[i]+"###querylayer' onClick='handleLayer(this.value)'>";
+ linkedName += "<IMG SRC='../img/tree/1w.gif' BORDER='0' WIDTH='3'>";
+ linkedName += "<A onclick='handleClick(\""+treeWMS_id[i]+"\",\""+treeUrl[i]+"\")' style='cursor:pointer'>" + treeName[i] + "</A>";
+ }
+ else{
+ linkedName = '<IMG SRC="../img/tree/1w.gif" BORDER="0" WIDTH="3">' + treeName[i];
+ }
+ // don't link folder icon if node has no sons
+ if ( i == idx-1 || treeP_id[i+1] != treeId[i] ) {
+ if ( treeDeep[ i ] == 0 )
+ folderImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="1" HSPACE="0">'
+ else
+ folderImg = ''
+ } else {
+ folderImg = '<A HREF="javascript:sitemapClick(' + treeId[i] + ')"><IMG ALIGN="BOTTOM" SRC="../img/tree/folder_off.gif" BORDER="0" NAME="folder' + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0"></A>'
+ }
+ // which type of file icon should be displayed?
+ if ( treeP_id[i] != 0 )
+ {
+ if ( lastEntryInFolder( treeId[i] ) )
+ fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_last.gif" BORDER="0" NAME="file'
+ + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
+ else
+ fileImg = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file.gif" BORDER="0" NAME="file'
+ + treeId[i] + '" HEIGHT="16" WIDTH="30" HSPACE="0">'
+ }
+ else
+ fileImg = ''
+ // traverse parents up to root and show vertical lines if parent
+ // is not the last entry on this layer
+ verticales = ''
+ for( var act_id=treeId[i] ; treeDeep[ id2treeIndex[ act_id ] ] > 1; )
+ {
+ act_id = treeP_id[ id2treeIndex[ act_id ]]
+ if ( lastEntryInFolder( act_id ) )
+ {
+ verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_empty.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
+ }
+ else
+ {
+ verticales = '<IMG ALIGN="BOTTOM" SRC="../img/tree/file_vert.gif" BORDER="0" HEIGHT="16" WIDTH="30" HSPACE="0">' + verticales
+ }
+ }
+
+
+ document.writeln( divPrefix + treeId[i] + '"><NOBR> ' + verticales + fileImg + folderImg + linkedName + '</NOBR></DIV>'
+ )
+ }
+ document.writeln("</form>");
+ }
+
+ function initStyles ( )
+ {
+ document.writeln( '<STYLE TYPE="text/css">' + "\n" + '<!--' )
+ for ( var i=1,y=y0; i<idx; i++ )
+ {
+ document.writeln( '#sitemap' + treeId[i] + ' {POSITION: absolute; VISIBILITY: hidden;}' )
+ if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
+ y += deltaY
+ }
+ document.writeln( '#sitemapinfo {POSITION: absolute; VISIBILITY: visible;}' )
+ document.writeln( '//-->' + "\n" + '</STYLE>' )
+ }
+
+
+
+ function sitemapClick( id )
+ {
+ var i = id2treeIndex[ id ]
+
+ if ( treeIsOn[ i ] )
+ // close directory
+ {
+ // mark node as invisible
+ treeIsOn[ i ]=false
+ // mark all sons as invisible
+ actDeep = treeDeep[ i ]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
+ {
+ treeWasOn[ j ] = treeIsOn[ j ]
+ treeIsOn[ j ]=false
+ }
+ gif_off( id )
+ }
+ else
+ // open directory
+ {
+ treeIsOn[ i ]=true
+ // remember and restore old status
+ actDeep = treeDeep[ i ]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep; j++ )
+ {
+ treeIsOn[ j ] = treeWasOn[ j ]
+ }
+ gif_on( id )
+ }
+ showTree()
+ }
+
+ function knotDeep( id )
+ {
+ var deep=0
+ while ( true )
+ if ( treeP_id[ id2treeIndex[id] ] == 0 )
+ return deep
+ else
+ {
+ ++deep
+ id = treeP_id[ id2treeIndex[id] ]
+ }
+ return deep
+ }
+
+ function initTree( id )
+ {
+ treeIsOn[ id2treeIndex[id] ] = true
+ if ( treeTyp[ id2treeIndex[id] ] != 'b' )
+ gif_on( id )
+ while ( treeP_id[ id2treeIndex[id] ] != 0 )
+ {
+ id = treeP_id[ id2treeIndex[id] ]
+ treeIsOn[ id2treeIndex[id] ] = true
+ if ( treeTyp[ id2treeIndex[id] ] != 'b' )
+ gif_on( id )
+ }
+ }
+
+ function lastEntryInFolder( id )
+ {
+ var i = id2treeIndex[id]
+ if ( i == idx-1 )
+ return true
+ if ( treeTyp[i] == 'b' )
+ {
+ if ( treeP_id[i+1] != treeP_id[i] )
+ return true
+ else
+ return false
+ }
+ else
+ {
+ var actDeep = treeDeep[i]
+ for( var j=i+1; j<idx && treeDeep[j] > actDeep ; j++ )
+ ;
+ if ( j<idx && treeDeep[j] == actDeep )
+ return false
+ else
+ return true
+ }
+ }
+
+ function showTree()
+ {
+ for( var i=1, y=y0, x=x0; i<idx; i++ )
+ {
+ if ( treeIsOn[ id2treeIndex[ treeP_id[i] ] ] )
+ {
+ // show current node
+ if ( !(y == treeLastY[i] && treeIsShown[i] ) )
+ {
+ showLayer( "sitemap"+ treeId[i] )
+ setyLayer( "sitemap"+ treeId[i], y )
+ treeIsShown[i] = true
+ }
+ treeLastY[i] = y
+ y += deltaY
+ }
+ else
+ {
+ // hide current node and all sons
+ if ( treeIsShown[ i ] )
+ {
+ hideLayer( "sitemap"+ treeId[i] )
+ treeIsShown[i] = false
+ }
+ }
+ }
+ }
+
+ function initIndex() {
+ for( var i=0; i<idx; i++ )
+ id2treeIndex[ treeId[i] ] = i
+ }
+
+ function gif_name (name, width, height) {
+ this.on = new Image (width, height);
+ this.on.src ="../img/tree/" + name + "_on.gif"
+ this.off = new Image (width, height);
+ this.off.src ="../img/tree/" + name + "_off.gif"
+ }
+
+ function load_gif (name, width, height) {
+ gif_name [name] = new gif_name (name,width,height);
+ }
+
+ function load_all () {
+ load_gif ('folder',30,16)
+ file_last = new Image( 30,16 )
+ file_last.src = "file_last.gif"
+ file_middle = new Image( 30,16 )
+ file_middle.src = "file.gif"
+ file_vert = new Image( 30,16 )
+ file_vert.src = "file_vert.gif"
+ file_empty = new Image( 30,16 )
+ file_empty = "file_empty.gif"
+ }
+
+ function gif_on ( id ) {
+ eval("document['folder" + id + "'].src = gif_name['folder'].on.src")
+ }
+
+ function gif_off ( id ) {
+ eval("document['folder" + id + "'].src = gif_name['folder'].off.src")
+ }
+
+ // global configuration
+ var deltaX = 30
+ var deltaY = 16
+ var x0 = 5
+ var y0 = 20
+ var defaultTarget = '_blank'
+
+ var browserName = navigator.appName;
+ var browserVersion = parseInt(navigator.appVersion);
+ var isIE = false;
+ var isNN = false;
+ var isDOM = false;
+ var isDomIE = false;
+ var isDomNN = false;
+ var layerok = false;
+
+ var isIE = browserName.indexOf("Microsoft Internet Explorer" )==-1?false:true;
+ var isNN = browserName.indexOf("Netscape")==-1?false:true;
+ var isOpera = browserName.indexOf("Opera")==-1?false:true;
+ var isDOM = document.getElementById?true:false;
+ var isDomNN = document.layers?true:false;
+ var isDomIE = document.all?true:false;
+
+ if ( isNN && browserVersion>=4 ) layerok=true;
+ if ( isIE && browserVersion>=4 ) layerok=true;
+ if ( isOpera && browserVersion>=5 ) layerok=true;
+
+
+ function hideLayer(layerName) {
+ if (isDOM)
+ document.getElementById(layerName).style.visibility="hidden"
+ else if (isDomIE)
+ document.all[layerName].style.visibility="hidden";
+ else if (isDomNN)
+ document.layers[layerName].visibility="hidden";
+ }
+
+ function showLayer(layerName) {
+ if (isDOM)
+ document.getElementById(layerName).style.visibility="visible"
+ else if (isDomIE)
+ document.all[layerName].style.visibility="visible";
+ else if (isDomNN)
+ document.layers[layerName].visibility="visible";
+ }
+
+ function setyLayer(layerName, y) {
+ if (isDOM)
+ document.getElementById(layerName).style.top=y
+ else if (isDomIE)
+ document.all[layerName].style.top=y;
+ else if (isDomNN)
+ document.layers[layerName].top=y;
+ }
+
+ var id2treeIndex = new Array()
+
+ // the structure is easy to understand with a simple example
+ // p_id is the id of the parent
+ // E0 ( id=0,p_id=-1 )
+ // E11 ( id=1,p_id=0)
+ // E111 ( id=2,p_id=1 )
+ // E112 ( id=3,p_id=1 )
+ // E12 ( id=4,p_id=0 )
+ // E121 ( id=5,p_id=4 )
+ // E13 ( id=6,p_id=0 )
+ // E131 ( id=7,p_id=6 )
+ // E1311 ( id=8,p_id=7 )
+ // E132 ( id=9,p_id=6 )
+ // this is a multinary tree structure which is easy to
+ // populate with database data :)
+<?php
+$sql = "SELECT id FROM gui_treegde WHERE fkey_gui_id = $1";
+// $v and $t will be re-used below!
+$v = array($guiList);
+$t = array("s");
+$res = db_prep_query($sql, $v, $t);
+if(!db_fetch_row($res)){
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id, my_layer_title,lft,rgt,layer) VALUES($1, 'new','1','4','')";
+ //using $v and $t fom above
+ db_prep_query($sql, $v, $t);
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES($1,'new','2','3','')";
+ //using $v and $t fom above
+ db_prep_query($sql, $v, $t);
+}
+
+$sql = "SELECT n.wms_id, n.id, n.my_layer_title, n.lft, n.rgt, n.layer, COUNT(*) AS level1, ((n.rgt - n.lft -1)/2) AS offspring ";
+$sql .= "FROM gui_treegde as n, gui_treegde as p WHERE n.lft BETWEEN p.lft AND p.rgt ";
+$sql .= " AND n.fkey_gui_id = $1 AND p.fkey_gui_id = $2 ";
+$sql .= " GROUP BY n.wms_id, n.lft, n.my_layer_title, ((n.rgt - n.lft -1)/2) , n.id, n.rgt, n.layer ORDER BY n.lft";
+$v = array($guiList, $guiList);
+$t = array("s", "s");
+$res = db_prep_query($sql, $v, $t);
+ echo "function initArray(){";
+ echo "Note(0,-1,'','');";
+ $cnt = 0;
+
+ while(db_fetch_row($res)){
+ if(db_result($res, $cnt, "level1") == 1 && db_result($res, $cnt, "offspring") >= 0 ){
+ if(count($parent) > 0){unset($parent);}
+ $level = db_result($res, $cnt, "level1");
+ $parent[$level+1] = db_result($res, $cnt, "id");
+
+ echo "Note(".db_result($res, $cnt, "id").",0,'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
+ if(db_result($res, $cnt, "wms_id") != ''){
+ echo ", '".db_result($res, $cnt, "wms_id")."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if(db_result($res, $cnt, "level1") > $level){
+ $level = db_result($res, $cnt, "level1");
+ $parent[$level+1] = db_result($res, $cnt, "id");
+ echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
+ if(db_result($res, $cnt, "wms_id") != ''){
+ echo ", '".db_result($res, $cnt, "wms_id")."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if(db_result($res, $cnt, "level1") == $level){
+ $level = db_result($res, $cnt, "level1");
+ $parent[$level+1] = db_result($res, $cnt, "id");
+ echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
+ if(db_result($res, $cnt, "wms_id") != ''){
+ echo ", '".db_result($res, $cnt, "wms_id")."'";
+ }
+ echo ");";
+ }
+ /**/
+ else if(db_result($res, $cnt, "level1") < $level){
+ $level = db_result($res, $cnt, "level1");
+ $parent[$level + 1] = db_result($res, $cnt, "id");
+ echo "Note(".db_result($res, $cnt, "id").",".$parent[$level].",'".db_result($res, $cnt, "my_layer_title")."','".db_result($res, $cnt, "layer")."',".db_result($res, $cnt, "lft");
+ if(db_result($res, $cnt, "wms_id") != ''){
+ echo ", '".db_result($res, $cnt, "wms_id")."'";
+ }
+ echo ");";
+ }
+
+ $cnt++;
+ }
+ echo "treeTyp[0] = 'f'; treeIsOn[0] = true; treeWasOn[0] = true;";
+ echo "}";
+?>
+ function initArray_()
+ {
+ Note(0,-1,'','')
+ Note(1,0,'Tutorials','')
+ Note(8,1,'HTML','')
+ Note(10,8,'SelfHtml','http://www.teamone.de/selfaktuell/')
+ Note(9,1,'willi','')
+ Note(100,9,'SelfHtml','http://www.teamone.de/selfaktuell/')
+ Note(3,1,'JavaScript','')
+ Note(4,3, 'Netscape Guide 1.3','http://developer.netscape.com/docs/manuals/js/client/jsguide/index.htm')
+ Note(7,3, 'Introduction to Javascript','http://rummelplatz.uni-mannheim.de/~skoch/js/script.htm')
+ Note(12,1, 'Perl','')
+ Note(14,12, 'Perl Tutorial','http://www.awu.id.ethz.ch/~didi/perl/perl_start.html')
+ Note(13,1,'SQL','')
+ Note(15,13, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
+ Note(111,1, 'Introduction to SQL','http://w3.one.net/~jhoffman/sqltut.htm')
+ Note(2,0, 'Reference Manuals','')
+ Note(11,2, 'HTML Version 3.2 Referenz','http://www.cls-online.de/htmlref/index.htm')
+ Note(6,2,'Netscape Reference 1.3','http://developer.netscape.com/docs/manuals/js/client/jsref/index.htm')
+ Note(17,2,'PHP Manual','http://www.php.net/manual/html/')
+ treeTyp[0] = 'f'
+ treeIsOn[0] = true
+ treeWasOn[0] = true
+ }
+
+ var idx=0
+ initArray()
+ initIndex()
+ load_all()
+ for( i=1; i<idx; i++ )
+ {
+ treeDeep[i] = knotDeep( treeId[i] )
+ if ( treeDeep[i] == 0 )
+ treeIsShown[i] = true
+ }
+ if ( isDomNN )
+ initStyles();
+ //-->
+ </SCRIPT>
+</HEAD>
+<BODY VLINK="#000000" ALINK="#000000" LINK="#000000" BGCOLOR="#ffffff" TEXT="#000000"
+ onLoad="if (layerok) showTree();"
+ >
+ <!-- onkeydown="parent.keyhandler('FolderFrame')"-->
+<SCRIPT language="JavaScript1.2">
+<!--
+ initDiv();
+ hideLayer("sitemapinfo");
+ setObjArray();
+//-->
+</SCRIPT>
+</BODY>
+</HTML>
Deleted: branches/2.4.5_rc1/http/php/mod_updateWMS.php
===================================================================
--- branches/2.4.5/http/php/mod_updateWMS.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_updateWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,167 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/UpdateWMS
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-require_once(dirname(__FILE__)."/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-import_request_variables("PG");
-$secParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-$self = $PHP_SELF."?".$secParams;
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>updateWMS</title>
-<?php
-include '../include/dyn_css.php';
-?>
-<script type='text/javascript'>
-function validate(){
- var ind = document.form1.selWMS.selectedIndex;
- if(ind < 0){
- alert("No WMS selected!");
- return;
- }
- else{
- document.form1.submit();
- }
-}
-function sel(){
- var ind = document.form1.selWMS.selectedIndex;
- var wmsData = document.form1.selWMS.options[ind].value.split("###");
- document.form1.capURL.value = wmsData[1];
- document.form1.myURL.value = wmsData[1];
- document.form1.myWMS.value = wmsData[0];
-}
-</script>
-</head>
-<body>
-<form name='form1' action='<?php $self ?>' method='POST'>
-<?php
-
-
-
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$wms_id_own = $admin->getWmsByWmsOwner($_SESSION["mb_user_id"]);
-
-if (count($wms_id_own)>0){
- $v = array();
- $t = array();
- $c = 1;
- $sql = "SELECT wms_id, wms_title, wms_getcapabilities, wms_upload_url FROM wms ";
- $sql .= "WHERE wms_id IN(";
- for($i=0; $i<count($wms_id_own); $i++){
- if($wms_id_own[$i] != ''){
- if($i>0){ $sql .= ",";}
- $sql .= "$".$c;
- array_push($v,$wms_id_own[$i]);
- array_push($t,'i');
- $c++;
- }
- }
- $sql .= ")";
- $sql .= " ORDER BY wms_title";
- $res = db_prep_query($sql,$v,$t);
- $cnt = 0;
- echo "<select name='selWMS' size='15' onchange='sel()'>";
- while($row = db_fetch_array($res)){
- echo "<option value='".$row['wms_id']."###".$row['wms_upload_url']."'>".$row['wms_title']."</option>";
- $cnt++;
- }
- echo "</select><br /><br />";
- echo "Link to the last uploaded Online Resource URL:<br><input type='text' size='120' name='capURL'><br />";
- echo "<input type='hidden' name='myWMS' value=''><br>";
- echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
- echo "<i>(Triple click to select and copy)</i><br>";
- echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1<br>";
- echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0<br>";
- echo "REQUEST=capabilities&WMTVER=1.0.0<br><br>";
- echo "Link to new WMS Capabilities URL:<br><input size='120' type='text' name='myURL'><br>";
- echo "<input type='button' value='Preview Capabilities' onclick='window.open(this.form.myURL.value,\"\",\"\")'> ";
- echo "<input type='button' value='Upload Capabilities' onclick='validate()'><br>";
-
-/**/
-if(isset($myURL) && $myURL != ''){
-
- $mywms = new wms();
- $mywms->createObjFromXML($myURL);
- echo "<br />";
- $mywms->updateObjInDB($myWMS);
- $mywms->displayWMS();
-
- // start (owners of the updated wms will be notified by email)
- if ($use_php_mailing) {
- $owner = $admin->getOwnerByWms($myWMS);
-
- if ($owner && count($owner)>0) {
- $owner_ids = array();
- $owner_mail_addresses = array();
- for ($i=0; $i<count($owner); $i++) {
- $tmp_array = $admin->getUserIdByUserName($owner[$i]);
- $owner_ids[$i] = $tmp_array[0];
- }
- $j=0;
- for ($i=0; $i<count($owner_ids); $i++) {
- $adr_tmp = $admin->getEmailByUserId($owner_ids[$i]);
- if (!in_array($adr_tmp, $owner_mail_addresses) && $adr_tmp) {
- $owner_mail_addresses[$j] = $adr_tmp;
- $j++;
- }
- }
-
- $replyto = $admin->getEmailByUserId($_SESSION["mb_user_id"]);
- $from = $replyto;
- $pathArray = explode("http/php/", $_SERVER["PATH_TRANSLATED"]);
- $path = $pathArray[0];
- $body = "WMS '" . $admin->getWmsTitleByWmsId($myWMS) . "' has been updated. \n\nServer name: " . $_SERVER["SERVER_NAME"] . "\nInstallation Path: " . $path . "\n\nYou may want to check the changes as you are an owner of this WMS.";
- $error_msg = "";
- for ($i=0; $i<count($owner_mail_addresses); $i++) {
- if (!$admin->sendEmail($replyto, $from, $owner_mail_addresses[$i], $owner_mail_addresses[$i], "[Mapbender] A user has updated one of your WMS", $body, $error)) {
- if ($error){
- $error_msg .= $error . " ";
- }
- }
- }
- if (!$error_msg) {
- echo "<script language='javascript'>";
- echo "alert('Other owners of this WMS have been informed about the changes!');";
- echo "</script>";
- }
- else {
- echo "<script language='javascript'>";
- echo "alert('When notifying the owners of this WMS about your changes, an error occured: ' + '" . $error_msg . "');";
- echo "</script>";
- }
- }
- }
- // end (owners of the updated wms will be notified by email)
-}
-
- echo "</form>";
- echo "</body>";
-}else{
- echo "There are no wms available for this user.<br>";
-}
-?>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_updateWMS.php (from rev 2138, branches/2.4.5/http/php/mod_updateWMS.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_updateWMS.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_updateWMS.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,166 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/UpdateWMS
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+
+import_request_variables("PG");
+$secParams = SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>updateWMS</title>
+<?php
+include '../include/dyn_css.php';
+?>
+<script type='text/javascript'>
+function validate(){
+ var ind = document.form1.selWMS.selectedIndex;
+ if(ind < 0){
+ alert("No WMS selected!");
+ return;
+ }
+ else{
+ document.form1.submit();
+ }
+}
+function sel(){
+ var ind = document.form1.selWMS.selectedIndex;
+ var wmsData = document.form1.selWMS.options[ind].value.split("###");
+ document.form1.capURL.value = wmsData[1];
+ document.form1.myURL.value = wmsData[1];
+ document.form1.myWMS.value = wmsData[0];
+}
+</script>
+</head>
+<body>
+<form name='form1' action='<?php echo $self ?>' method='POST'>
+<?php
+
+
+
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$wms_id_own = $admin->getWmsByWmsOwner($_SESSION["mb_user_id"]);
+
+if (count($wms_id_own)>0){
+ $v = array();
+ $t = array();
+ $c = 1;
+ $sql = "SELECT wms_id, wms_title, wms_getcapabilities, wms_upload_url FROM wms ";
+ $sql .= "WHERE wms_id IN(";
+ for($i=0; $i<count($wms_id_own); $i++){
+ if($wms_id_own[$i] != ''){
+ if($i>0){ $sql .= ",";}
+ $sql .= "$".$c;
+ array_push($v,$wms_id_own[$i]);
+ array_push($t,'i');
+ $c++;
+ }
+ }
+ $sql .= ")";
+ $sql .= " ORDER BY wms_title";
+ $res = db_prep_query($sql,$v,$t);
+ $cnt = 0;
+ echo "<select name='selWMS' size='15' onchange='sel()'>";
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row['wms_id']."###".$row['wms_upload_url']."'>".$row['wms_title']."</option>";
+ $cnt++;
+ }
+ echo "</select><br /><br />";
+ echo "Link to the last uploaded Online Resource URL:<br><input type='text' size='120' name='capURL'><br />";
+ echo "<input type='hidden' name='myWMS' value=''><br>";
+ echo "Add the following REQUEST to the Online Resource URL to obtain the Capabilities document:<br>";
+ echo "<i>(Triple click to select and copy)</i><br>";
+ echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.1<br>";
+ echo "REQUEST=GetCapabilities&SERVICE=WMS&VERSION=1.1.0<br>";
+ echo "REQUEST=capabilities&WMTVER=1.0.0<br><br>";
+ echo "Link to new WMS Capabilities URL:<br><input size='120' type='text' name='myURL'><br>";
+ echo "<input type='button' value='Preview Capabilities' onclick='window.open(this.form.myURL.value,\"\",\"\")'> ";
+ echo "<input type='button' value='Upload Capabilities' onclick='validate()'><br>";
+
+/**/
+if(isset($myURL) && $myURL != ''){
+
+ $mywms = new wms();
+ $mywms->createObjFromXML($myURL);
+ echo "<br />";
+ $mywms->updateObjInDB($myWMS);
+ $mywms->displayWMS();
+
+ // start (owners of the updated wms will be notified by email)
+ if ($use_php_mailing) {
+ $owner = $admin->getOwnerByWms($myWMS);
+
+ if ($owner && count($owner)>0) {
+ $owner_ids = array();
+ $owner_mail_addresses = array();
+ for ($i=0; $i<count($owner); $i++) {
+ $tmp_array = $admin->getUserIdByUserName($owner[$i]);
+ $owner_ids[$i] = $tmp_array[0];
+ }
+ $j=0;
+ for ($i=0; $i<count($owner_ids); $i++) {
+ $adr_tmp = $admin->getEmailByUserId($owner_ids[$i]);
+ if (!in_array($adr_tmp, $owner_mail_addresses) && $adr_tmp) {
+ $owner_mail_addresses[$j] = $adr_tmp;
+ $j++;
+ }
+ }
+
+ $replyto = $admin->getEmailByUserId($_SESSION["mb_user_id"]);
+ $from = $replyto;
+ $pathArray = explode("http/php/", $_SERVER["PATH_TRANSLATED"]);
+ $path = $pathArray[0];
+ $body = "WMS '" . $admin->getWmsTitleByWmsId($myWMS) . "' has been updated. \n\nServer name: " . $_SERVER["SERVER_NAME"] . "\nInstallation Path: " . $path . "\n\nYou may want to check the changes as you are an owner of this WMS.";
+ $error_msg = "";
+ for ($i=0; $i<count($owner_mail_addresses); $i++) {
+ if (!$admin->sendEmail($replyto, $from, $owner_mail_addresses[$i], $owner_mail_addresses[$i], "[Mapbender] A user has updated one of your WMS", $body, $error)) {
+ if ($error){
+ $error_msg .= $error . " ";
+ }
+ }
+ }
+ if (!$error_msg) {
+ echo "<script language='javascript'>";
+ echo "alert('Other owners of this WMS have been informed about the changes!');";
+ echo "</script>";
+ }
+ else {
+ echo "<script language='javascript'>";
+ echo "alert('When notifying the owners of this WMS about your changes, an error occured: ' + '" . $error_msg . "');";
+ echo "</script>";
+ }
+ }
+ }
+ // end (owners of the updated wms will be notified by email)
+}
+
+ echo "</form>";
+ echo "</body>";
+}else{
+ echo "There are no wms available for this user.<br>";
+}
+?>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_usemap.php
===================================================================
--- branches/2.4.5/http/php/mod_usemap.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_usemap.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,52 +0,0 @@
-<html>
-<head>
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/UseMap
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>image map generator</title>
-</head>
-<?php
-include_once(dirname(__FILE__)."/../classes/class_gml2.php");
-$url = urldecode($_REQUEST["url"]);
-
-$g = new gml2();
-$g->parsegml($url);
-
-echo "<script language='JavaScript'>";
-echo "var um_title = new Array();";
-echo "var um_x = new Array();";
-echo "var um_y = new Array();";
- for($ii=0; $ii<$g->getMemberCount();$ii++){
- echo "um_title[um_title.length] = '".$g->getValueBySeparatedKey($ii,"name")."';";
- echo "um_x[um_x.length] = ".$g->getXfromMemberAsString($ii,0).";";
- echo "um_y[um_y.length] = ".$g->getYfromMemberAsString($ii,0).";";
- }
-echo "</script>"
-?>
-<script language="JavaScript" type="text/javascript">
-function init(){
- parent.mod_usemap_set(um_title,um_x,um_y)
-}
-</script>
-<body onload='init()'>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_usemap.php (from rev 2138, branches/2.4.5/http/php/mod_usemap.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_usemap.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_usemap.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,53 @@
+<html>
+<head>
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/UseMap
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>image map generator</title>
+</head>
+<?php
+include_once(dirname(__FILE__)."/../classes/class_gml2.php");
+$url = urldecode($_REQUEST["url"]);
+
+$g = new gml2();
+$g->parsegml($url);
+
+echo "<script language='JavaScript'>";
+echo "var um_title = new Array();";
+echo "var um_x = new Array();";
+echo "var um_y = new Array();";
+ for($ii=0; $ii<$g->getMemberCount();$ii++){
+ echo "um_title[um_title.length] = '".$g->getValueBySeparatedKey($ii,"name")."';";
+ echo "um_x[um_x.length] = ".$g->getXfromMemberAsString($ii,0).";";
+ echo "um_y[um_y.length] = ".$g->getYfromMemberAsString($ii,0).";";
+ }
+echo "</script>"
+?>
+<script language="JavaScript" type="text/javascript">
+function init(){
+ parent.mod_usemap_set(um_title,um_x,um_y)
+}
+</script>
+<body onload='init()'>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php
===================================================================
--- branches/2.4.5/http/php/mod_user_filteredGroup.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,195 +0,0 @@
-<?php
-#$Id$
-# http://www.mapbender.org/index.php/mod_user_filteredGroup.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add User to Group</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_group[$i],$selected_user);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get owner groups *******************************************************************************/
-$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_group = db_prep_query($sql_group,$v,$t);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all user ************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get owner group from selected_user***************************************************************/
-$v = array();
-$t = array();
-$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
-$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
-if(!$selected_user){array_push($v,$user_id[0]);}
-if($selected_user){array_push($v,$selected_user);}
-array_push($t,'i');
-$sql_user_mb_group .= " AND mb_group.mb_group_owner = $2 ";
-array_push($v,$logged_user_id);
-array_push($t,'i');
-$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
-$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
-while($row = db_fetch_array($res_user_mb_group)){
- $group_id_user[$cnt_group_user] = $row["mb_group_id"];
- $group_name_user[$cnt_group_user] = $row["mb_group_name"];
- $cnt_group_user++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*********************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all group in selectbox********************************************************************/
-echo "<div class='text2'>GROUP:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button*******************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_group_dependence in selectbox********************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php (from rev 2138, branches/2.4.5/http/php/mod_user_filteredGroup.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_user_filteredGroup.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,194 @@
+<?php
+#$Id$
+# http://www.mapbender.org/index.php/mod_user_filteredGroup.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add User to Group</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_group[$i],$selected_user);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get owner groups *******************************************************************************/
+$sql_group = "SELECT * FROM mb_group WHERE mb_group_owner = $1 ORDER BY mb_group_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_group = db_prep_query($sql_group,$v,$t);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all user ************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get owner group from selected_user***************************************************************/
+$v = array();
+$t = array();
+$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
+$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
+if(!$selected_user){array_push($v,$user_id[0]);}
+if($selected_user){array_push($v,$selected_user);}
+array_push($t,'i');
+$sql_user_mb_group .= " AND mb_group.mb_group_owner = $2 ";
+array_push($v,$logged_user_id);
+array_push($t,'i');
+$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
+$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
+while($row = db_fetch_array($res_user_mb_group)){
+ $group_id_user[$cnt_group_user] = $row["mb_group_id"];
+ $group_name_user[$cnt_group_user] = $row["mb_group_name"];
+ $cnt_group_user++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*********************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all group in selectbox********************************************************************/
+echo "<div class='text2'>GROUP:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button*******************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_group_dependence in selectbox********************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_user_filteredGui.php
===================================================================
--- branches/2.4.5/http/php/mod_user_filteredGui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_user_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,245 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Add User to Group</title>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
-
-$fieldHeight = 25;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-$cnt_gui_user = 0;
-$cnt_gui_logged_user = 0;
-
-$gui_id_array = array();
-
-$logged_user_name=$_SESSION["mb_user_name"];
-$logged_user_id=$_SESSION["mb_user_id"];
-
-
-/*handle remove, update and insert**************************************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_gui[$i],$selected_user);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-
-
-/*get all user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get allocated gui ********************************************************************************************/
-
-$arrayGuis=mb_getGUIs($logged_user_id);
-
-$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
-$v = array();
-$t = array();
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_gui .= ",";}
- $sql_gui .= "$".($i+1);
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
-}
-$sql_gui.= ") ORDER BY gui_name";
-
-
-$res_gui = db_prep_query($sql_gui,$v,$t);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-
-
-/*get allocated gui from logged_user******************************************************************************/
-$sql_logged_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
-$sql_logged_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
-$sql_logged_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
-$sql_logged_user_mb_gui .= " ORDER BY gui.gui_name";
-$v = array($logged_user_id);
-$t = array('i');
-$res_logged_user_mb_all_gui = db_prep_query($sql_logged_user_mb_gui,$v,$t);
-while($roe = db_fetch_array($res_logged_user_mb_all_gui)){
- $gui_id_logged_user[$cnt_gui_logged_user] = $row["gui_id"];
- $gui_name_logged_user[$cnt_gui_logged_user] = $row["gui_name"];
- $cnt_gui_logged_user++;
-}
-
-/*get allocated gui from selected_user******************************************************************************/
-$v = array();
-$t = array();
-$c = 2;
-$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
-$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
-$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
-if(!$selected_user){array_push($v,$user_id[0]);}
-if($selected_user){array_push($v,$selected_user);}
-array_push($t,'i');
-$sql_user_mb_gui .= " AND gui.gui_id IN(";
-for($i=0; $i<count($arrayGuis); $i++){
- if($i>0){ $sql_user_mb_gui .= ",";}
- $sql_user_mb_gui .= "$".$c;
- array_push($v,$arrayGuis[$i]);
- array_push($t,'s');
- $c++;
-}
-$sql_user_mb_gui .= ") ORDER BY gui.gui_name";
-$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
-while($row = db_fetch_array($res_user_mb_gui)){
- $gui_id_user[$cnt_gui_user] = $row["gui_id"];
- $gui_name_user[$cnt_gui_user] = $row["gui_name"];
- $cnt_gui_user++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*************************************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";}
-echo "</select>";
-/*insert allocated gui in selectbox**************************************************************************/
-echo "<div class='text2'>GUI:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-/*Button****************************************************************************************************/
-echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_gui_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' style='background:#ffffff' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
-}
-
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_user_filteredGui.php (from rev 2138, branches/2.4.5/http/php/mod_user_filteredGui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_user_filteredGui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_user_filteredGui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,242 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Add User to Group</title>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+require_once(dirname(__FILE__)."/../php/mb_getGUIs.php");
+
+$fieldHeight = 25;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+$cnt_gui_user = 0;
+$cnt_gui_logged_user = 0;
+
+$gui_id_array = array();
+
+$logged_user_name=$_SESSION["mb_user_name"];
+$logged_user_id=$_SESSION["mb_user_id"];
+
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_gui[$i],$selected_user);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+
+
+/*get all user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get allocated gui ********************************************************************************************/
+
+$arrayGuis=mb_getGUIs($logged_user_id);
+
+$sql_gui = "SELECT * FROM gui WHERE gui_id IN (";
+$v = array();
+$t = array();
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_gui .= ",";}
+ $sql_gui .= "$".($i+1);
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+}
+$sql_gui.= ") ORDER BY gui_name";
+
+
+$res_gui = db_prep_query($sql_gui,$v,$t);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+
+
+/*get allocated gui from logged_user******************************************************************************/
+$sql_logged_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+$sql_logged_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+$sql_logged_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
+$sql_logged_user_mb_gui .= " ORDER BY gui.gui_name";
+$v = array($logged_user_id);
+$t = array('i');
+$res_logged_user_mb_all_gui = db_prep_query($sql_logged_user_mb_gui,$v,$t);
+while($roe = db_fetch_array($res_logged_user_mb_all_gui)){
+ $gui_id_logged_user[$cnt_gui_logged_user] = $row["gui_id"];
+ $gui_name_logged_user[$cnt_gui_logged_user] = $row["gui_name"];
+ $cnt_gui_logged_user++;
+}
+
+/*get allocated gui from selected_user******************************************************************************/
+$v = array();
+$t = array();
+$c = 2;
+$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1";
+if(!$selected_user){array_push($v,$user_id[0]);}
+if($selected_user){array_push($v,$selected_user);}
+array_push($t,'i');
+$sql_user_mb_gui .= " AND gui.gui_id IN(";
+for($i=0; $i<count($arrayGuis); $i++){
+ if($i>0){ $sql_user_mb_gui .= ",";}
+ $sql_user_mb_gui .= "$".$c;
+ array_push($v,$arrayGuis[$i]);
+ array_push($t,'s');
+ $c++;
+}
+$sql_user_mb_gui .= ") ORDER BY gui.gui_name";
+$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
+while($row = db_fetch_array($res_user_mb_gui)){
+ $gui_id_user[$cnt_gui_user] = $row["gui_id"];
+ $gui_name_user[$cnt_gui_user] = $row["gui_name"];
+ $cnt_gui_user++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*************************************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";}
+echo "</select>";
+/*insert allocated gui in selectbox**************************************************************************/
+echo "<div class='text2'>GUI:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+/*Button****************************************************************************************************/
+echo "<div class='button1' ><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_gui_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' style='background:#ffffff' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
+}
+
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_user_group.php
===================================================================
--- branches/2.4.5/http/php/mod_user_group.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_user_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,188 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-include '../include/dyn_css.php';
-?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_group[]"].selectedIndex == -1){
- document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_group[]"].selectedIndex == -1){
- document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-
-$fieldHeight = 20;
-
-$cnt_group = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_group_user = 0;
-$cnt_group_group = 0;
-$exists = false;
-
-/*handle remove, update and insert*****************************************************************/
-if($insert){
- if(count($selected_group)>0){
- for($i=0; $i<count($selected_group); $i++){
- $exists = false;
- $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while(db_fetch_row($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1,$2)";
- $v = array($selected_user,$selected_group[$i]);
- $t = array('i','i');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_group)>0){
- for($i=0; $i<count($remove_group); $i++){
- $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_group[$i],$selected_user);
- $t = array('i','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all groups ********************************************************************************************/
-$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
-$res_group = db_query($sql_group);
-while($row = db_fetch_array($res_group)){
- $group_id[$cnt_group] = $row["mb_group_id"];
- $group_name[$cnt_group] = $row["mb_group_name"];
- $cnt_group++;
-}
-
-/*get all user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all group from selected_user******************************************************************************/
-$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
-$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
-$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
-$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
-
-if(!$selected_user){$v = array($user_id[0]);}
-if($selected_user){$v = array($selected_user);}
-$t = array('i');
-
-$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
-while($row = db_fetch_array($res_user_mb_group)){
- $group_id_user[$cnt_group_user] = $row["mb_group_id"];
- $group_name_user[$cnt_group_user] = $row["mb_group_name"];
- $cnt_group_user++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."' method='post'>";
-
-/*insert all user in selectbox*************************************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all group in selectbox**************************************************************************/
-echo "<div class='text2'>GROUP:</div>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group; $i++){
- echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_group_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GROUP:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_group_user; $i++){
- echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
-}
-echo "</select>";
-
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_user_group.php (from rev 2138, branches/2.4.5/http/php/mod_user_group.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_user_group.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_user_group.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,187 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+include '../include/dyn_css.php';
+?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_group[]"].selectedIndex == -1){
+ document.getElementsByName("remove_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_group[]"].selectedIndex == -1){
+ document.getElementsByName("selected_group[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+
+$fieldHeight = 20;
+
+$cnt_group = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_group_user = 0;
+$cnt_group_group = 0;
+$exists = false;
+
+/*handle remove, update and insert*****************************************************************/
+if($insert){
+ if(count($selected_group)>0){
+ for($i=0; $i<count($selected_group); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from mb_user_mb_group where fkey_mb_user_id = $1 and fkey_mb_group_id = $2 ";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while(db_fetch_row($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO mb_user_mb_group(fkey_mb_user_id, fkey_mb_group_id) VALUES($1,$2)";
+ $v = array($selected_user,$selected_group[$i]);
+ $t = array('i','i');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_group)>0){
+ for($i=0; $i<count($remove_group); $i++){
+ $sql_remove = "DELETE FROM mb_user_mb_group WHERE fkey_mb_group_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_group[$i],$selected_user);
+ $t = array('i','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all groups ********************************************************************************************/
+$sql_group = "SELECT * FROM mb_group ORDER BY mb_group_name";
+$res_group = db_query($sql_group);
+while($row = db_fetch_array($res_group)){
+ $group_id[$cnt_group] = $row["mb_group_id"];
+ $group_name[$cnt_group] = $row["mb_group_name"];
+ $cnt_group++;
+}
+
+/*get all user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all group from selected_user******************************************************************************/
+$sql_user_mb_group = "SELECT mb_group.mb_group_id, mb_group.mb_group_name, mb_user_mb_group.fkey_mb_user_id FROM mb_user_mb_group ";
+$sql_user_mb_group .= "INNER JOIN mb_group ON mb_user_mb_group.fkey_mb_group_id = mb_group.mb_group_id ";
+$sql_user_mb_group .= "WHERE mb_user_mb_group.fkey_mb_user_id = $1 ";
+$sql_user_mb_group .= " ORDER BY mb_group.mb_group_name";
+
+if(!$selected_user){$v = array($user_id[0]);}
+if($selected_user){$v = array($selected_user);}
+$t = array('i');
+
+$res_user_mb_group = db_prep_query($sql_user_mb_group,$v,$t);
+while($row = db_fetch_array($res_user_mb_group)){
+ $group_id_user[$cnt_group_user] = $row["mb_group_id"];
+ $group_name_user[$cnt_group_user] = $row["mb_group_name"];
+ $cnt_group_user++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."' method='post'>";
+
+/*insert all user in selectbox*************************************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all group in selectbox**************************************************************************/
+echo "<div class='text2'>GROUP:</div>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group; $i++){
+ echo "<option value='" . $group_id[$i] . "'>" . $group_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_group_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GROUP:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_group[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_group_user; $i++){
+ echo "<option value='" . $group_id_user[$i] . "'>" . $group_name_user[$i] . "</option>";
+}
+echo "</select>";
+
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_user_gui.php
===================================================================
--- branches/2.4.5/http/php/mod_user_gui.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_user_gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,192 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/mod_user_gui.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-import_request_variables("PG");
-session_start();
-$gui_id = $_SESSION["mb_user_gui"];
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-require_once(dirname(__FILE__)."/mb_validatePermission.php");
-require_once(dirname(__FILE__)."/../classes/class_wms.php");
-$self = $PHP_SELF . "?".SID."&guiID=".$_REQUEST["guiID"]."&elementID=".$_REQUEST["elementID"];
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<?php include '../include/dyn_css.php'; ?>
-<script language="JavaScript">
-function validate(wert){
- if(document.forms[0]["selected_user"].selectedIndex == -1){
- document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
- return;
- }else{
- if(wert == "remove"){
- if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
- document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.remove.value = 'true';
- document.form1.submit();
- }
- if(wert == "insert"){
- if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
- document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
- return;
- }
- document.form1.insert.value = 'true';
- document.form1.submit();
- }
- }
-}
-</script>
-
-</head>
-<body>
-<?php
-$fieldHeight = 20;
-
-$cnt_gui = 0;
-$cnt_user = 0;
-$cnt_group = 0;
-$cnt_gui_user = 0;
-$cnt_gui_group = 0;
-$exists = false;
-
-$gui_id_array = array();
-
-
-/*handle remove, update and insert**************************************************************************************/
-if($insert){
- if(count($selected_gui)>0){
- for($i=0; $i<count($selected_gui); $i++){
- $exists = false;
- $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- while($row = db_fetch_array($res_insert)){$exists = true;}
- if($exists == false){
- $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
- $v = array($selected_user,$selected_gui[$i]);
- $t = array('i','s');
- $res_insert = db_prep_query($sql_insert,$v,$t);
- }
- }
- }
-}
-if($remove){
- if(count($remove_gui)>0){
- for($i=0; $i<count($remove_gui); $i++){
- $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
- $v = array($remove_gui[$i],$selected_user);
- $t = array('s','i');
- db_prep_query($sql_remove,$v,$t);
- }
- }
-}
-
-/*get all gui ********************************************************************************************/
-$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
-$res_gui = db_query($sql_gui);
-while($row = db_fetch_array($res_gui)){
- $gui_id_array[$cnt_gui] = $row["gui_id"];
- $gui_name[$cnt_gui] = $row["gui_name"];
- $cnt_gui++;
-}
-
-/*get all user **********************************************************************************************/
-$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
-
-$res_user = db_query($sql_user);
-while($row = db_fetch_array($res_user)){
- $user_id[$cnt_user] = $row["mb_user_id"];
- $user_name[$cnt_user] = $row["mb_user_name"];
- $cnt_user++;
-}
-
-/*get all gui from selected_user******************************************************************************/
-$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
-$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
-$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ORDER BY gui.gui_name";
-
-if(!$selected_user){$v = array($user_id[0]);}
-if($selected_user){$v = array($selected_user);}
-$t = array('i');
-
-$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
-while($row = db_fetch_array($res_user_mb_gui)){
- $gui_id_user[$cnt_gui_user] = $row["gui_id"];
- $gui_name_user[$cnt_gui_user] = $row["gui_name"];
- $cnt_gui_user++;
-}
-
-/*INSERT HTML*/
-echo "<form name='form1' action='" . $self ."&e_id_css=".$_REQUEST["e_id_css"]."' method='post'>";
-
-/*insert all user in selectbox*************************************************************************************/
-echo "<div class='text1'>USER: </div>";
-echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
-for($i=0; $i<$cnt_user; $i++){
- echo "<option value='" . $user_id[$i] . "' ";
- if($selected_user && $selected_user == $user_id[$i]){
- echo "selected";
- }
- echo ">" . $user_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*insert all gui in selectbox**************************************************************************/
-echo "<div class='text2'>GUI:</div><br>";
-echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui; $i++){
- echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
-}
-echo "</select>";
-
-/*Button****************************************************************************************************/
-
-echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
-echo "<input type='hidden' name='insert'>";
-
-echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
-echo "<input type='hidden' name='remove'>";
-
-/*insert user_gui_dependence in selectbox**************************************************/
-echo "<div class='text3'>SELECTED GUI:</div>";
-echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
-for($i=0; $i<$cnt_gui_user; $i++){
- echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
-}
-echo "</select>";
-echo "</form>";
-
-?>
-<script type="text/javascript">
-<!--
-document.forms[0].selected_user.focus();
-// -->
-</script>
-
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_user_gui.php (from rev 2138, branches/2.4.5/http/php/mod_user_gui.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_user_gui.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_user_gui.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,191 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/mod_user_gui.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+import_request_variables("PG");
+
+require_once(dirname(__FILE__)."/mb_validatePermission.php");
+require_once(dirname(__FILE__)."/../classes/class_wms.php");
+
+$gui_id = $_SESSION["mb_user_gui"];
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<?php include '../include/dyn_css.php'; ?>
+<script language="JavaScript">
+function validate(wert){
+ if(document.forms[0]["selected_user"].selectedIndex == -1){
+ document.getElementsByName("selected_user")[0].style.backgroundColor = '#ff0000';
+ return;
+ }else{
+ if(wert == "remove"){
+ if(document.forms[0]["remove_gui[]"].selectedIndex == -1){
+ document.getElementsByName("remove_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.remove.value = 'true';
+ document.form1.submit();
+ }
+ if(wert == "insert"){
+ if(document.forms[0]["selected_gui[]"].selectedIndex == -1){
+ document.getElementsByName("selected_gui[]")[0].style.backgroundColor = '#ff0000';
+ return;
+ }
+ document.form1.insert.value = 'true';
+ document.form1.submit();
+ }
+ }
+}
+</script>
+
+</head>
+<body>
+<?php
+$fieldHeight = 20;
+
+$cnt_gui = 0;
+$cnt_user = 0;
+$cnt_group = 0;
+$cnt_gui_user = 0;
+$cnt_gui_group = 0;
+$exists = false;
+
+$gui_id_array = array();
+
+
+/*handle remove, update and insert**************************************************************************************/
+if($insert){
+ if(count($selected_gui)>0){
+ for($i=0; $i<count($selected_gui); $i++){
+ $exists = false;
+ $sql_insert = "SELECT * from gui_mb_user where fkey_mb_user_id = $1 and fkey_gui_id = $2";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ while($row = db_fetch_array($res_insert)){$exists = true;}
+ if($exists == false){
+ $sql_insert = "INSERT INTO gui_mb_user(fkey_mb_user_id, fkey_gui_id) VALUES($1, $2)";
+ $v = array($selected_user,$selected_gui[$i]);
+ $t = array('i','s');
+ $res_insert = db_prep_query($sql_insert,$v,$t);
+ }
+ }
+ }
+}
+if($remove){
+ if(count($remove_gui)>0){
+ for($i=0; $i<count($remove_gui); $i++){
+ $sql_remove = "DELETE FROM gui_mb_user WHERE fkey_gui_id = $1 and fkey_mb_user_id = $2";
+ $v = array($remove_gui[$i],$selected_user);
+ $t = array('s','i');
+ db_prep_query($sql_remove,$v,$t);
+ }
+ }
+}
+
+/*get all gui ********************************************************************************************/
+$sql_gui = "SELECT * FROM gui ORDER BY gui_name";
+$res_gui = db_query($sql_gui);
+while($row = db_fetch_array($res_gui)){
+ $gui_id_array[$cnt_gui] = $row["gui_id"];
+ $gui_name[$cnt_gui] = $row["gui_name"];
+ $cnt_gui++;
+}
+
+/*get all user **********************************************************************************************/
+$sql_user = "SELECT * FROM mb_user ORDER BY mb_user_name";
+
+$res_user = db_query($sql_user);
+while($row = db_fetch_array($res_user)){
+ $user_id[$cnt_user] = $row["mb_user_id"];
+ $user_name[$cnt_user] = $row["mb_user_name"];
+ $cnt_user++;
+}
+
+/*get all gui from selected_user******************************************************************************/
+$sql_user_mb_gui = "SELECT gui.gui_id, gui.gui_name, gui_mb_user.fkey_mb_user_id FROM gui_mb_user ";
+$sql_user_mb_gui .= "INNER JOIN gui ON gui_mb_user.fkey_gui_id = gui.gui_id ";
+$sql_user_mb_gui .= "WHERE gui_mb_user.fkey_mb_user_id = $1 ORDER BY gui.gui_name";
+
+if(!$selected_user){$v = array($user_id[0]);}
+if($selected_user){$v = array($selected_user);}
+$t = array('i');
+
+$res_user_mb_gui = db_prep_query($sql_user_mb_gui,$v,$t);
+while($row = db_fetch_array($res_user_mb_gui)){
+ $gui_id_user[$cnt_gui_user] = $row["gui_id"];
+ $gui_name_user[$cnt_gui_user] = $row["gui_name"];
+ $cnt_gui_user++;
+}
+
+/*INSERT HTML*/
+echo "<form name='form1' action='" . $self ."&e_id_css=".$_REQUEST["e_id_css"]."' method='post'>";
+
+/*insert all user in selectbox*************************************************************************************/
+echo "<div class='text1'>USER: </div>";
+echo "<select style='background:#ffffff' class='select1' name='selected_user' onChange='submit()' size='10'>";
+for($i=0; $i<$cnt_user; $i++){
+ echo "<option value='" . $user_id[$i] . "' ";
+ if($selected_user && $selected_user == $user_id[$i]){
+ echo "selected";
+ }
+ echo ">" . $user_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*insert all gui in selectbox**************************************************************************/
+echo "<div class='text2'>GUI:</div><br>";
+echo "<select style='background:#ffffff' class='select2' multiple='multiple' name='selected_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui; $i++){
+ echo "<option value='" . $gui_id_array[$i] . "'>" . $gui_name[$i] . "</option>";
+}
+echo "</select>";
+
+/*Button****************************************************************************************************/
+
+echo "<div class='button1'><input type='button' value='==>' onClick='validate(\"insert\")'></div>";
+echo "<input type='hidden' name='insert'>";
+
+echo "<div class='button2'><input type='button' value='<==' onClick='validate(\"remove\")'></div>";
+echo "<input type='hidden' name='remove'>";
+
+/*insert user_gui_dependence in selectbox**************************************************/
+echo "<div class='text3'>SELECTED GUI:</div>";
+echo "<select style='background:#ffffff' class='select3' multiple='multiple' name='remove_gui[]' size='$fieldHeight' >";
+for($i=0; $i<$cnt_gui_user; $i++){
+ echo "<option value='" . $gui_id_user[$i] . "'>" . $gui_name_user[$i] . "</option>";
+}
+echo "</select>";
+echo "</form>";
+
+?>
+<script type="text/javascript">
+<!--
+document.forms[0].selected_user.focus();
+// -->
+</script>
+
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,177 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>mod_wfs</title>
-<script language='JavaScript' type='text/javascript'>
-var wfs_conf = new Array();
-function register(){
- var isReg = false;
- for(var i=0; i<parent.mb_InitFunctions.length; i++){
- if(parent.mb_InitFunctions[i] == (window.name+".fetchInf()")){
- isReg = true;
- }
- }
- if(isReg == false){
- parent.mb_registerInitFunctions(window.name+".fetchInf()");
- }
-}
-function fetchInf(){
- var wfs = new Array();
- var l;
- var ind = parent.getMapObjIndexByName('mapframe1');
- for(var i=0; i<parent.mb_mapObj[ind].wms.length; i++){
- for(var j=0; j<parent.mb_mapObj[ind].wms[i].objLayer.length; j++){
- l = parent.mb_mapObj[ind].wms[i].objLayer[j];
- if(l.gui_layer_wfs_featuretype != ""){
- wfs[wfs.length] = l.gui_layer_wfs_featuretype;
- }
- }
- }
- document.location.href = "../php/mod_wfs.php?id=" + wfs.join(",");
-
-}
-function get_wfs_conf(){
- return wfs_conf;
-}
-var iamready = false;
-</script>
-<?php
-echo "<script language='JavaScript' type='text/javascript'>";
-if(isset($_REQUEST['id'])){
- $wfs = split(",",$_REQUEST['id']);
-
- $con = db_connect($DBSERVER,$OWNER,$PW);
- db_select_db($DB,$con);
-
- for($i=0; $i<count($wfs); $i++){
-
- /* wfs_conf */
-
-
- $sql = "SELECT * FROM wfs_conf ";
- $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
- $sql .= "WHERE wfs_conf.wfs_conf_id = $1";
-
- $v = array($wfs[$i]);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- if($row = db_fetch_array($res)){
- $wfs_id = $row["fkey_wfs_id"];
- $featuretype_id = $row["fkey_featuretype_id"];
- echo "var len = wfs_conf.length;";
- echo "wfs_conf[".$i."] = new Array();";
- echo "wfs_conf[".$i."]['wfs_conf_id'] = '".$row["wfs_conf_id"]."';";
- echo "wfs_conf[".$i."]['wfs_conf_abstract'] = '".$row["wfs_conf_abstract"]."';";
- echo "wfs_conf[".$i."]['g_label'] = '".$row["g_label"]."';";
- echo "wfs_conf[".$i."]['g_label_id'] = '".$row["g_label_id"]."';";
- echo "wfs_conf[".$i."]['g_style'] = \"".str_replace(chr(13), "", str_replace(chr(10), "", $row["g_style"]))."\";";
- echo "wfs_conf[".$i."]['g_button'] = '".$row["g_button"]."';";
- echo "wfs_conf[".$i."]['g_button_id'] = '".$row["g_button_id"]."';";
- echo "wfs_conf[".$i."]['g_buffer'] = '".$row["g_buffer"]."';";
- echo "wfs_conf[".$i."]['g_res_style'] = \"".str_replace(chr(13), "", str_replace(chr(10), "", $row["g_res_style"]))."\";";
- echo "wfs_conf[".$i."]['g_use_wzgraphics'] = '".$row["g_use_wzgraphics"]."';";
- echo "wfs_conf[".$i."]['fkey_featuretype_id'] = '".$row["fkey_featuretype_id"]."';";
- echo "wfs_conf[".$i."]['wfs_getfeature'] = '".$row["wfs_getfeature"]."';";
- echo "wfs_conf[".$i."]['wfs_transaction'] = '".$row["wfs_transaction"]."';";
-
- }else{die("wfs_conf data not available");}
-
- $sql = "SELECT * FROM wfs_featuretype_namespace";
- $sql .= " WHERE fkey_wfs_id = $1 AND fkey_featuretype_id = $2";
- $v = array($wfs_id,$featuretype_id);
- $t = array('i','i');
- $res = db_prep_query($sql,$v,$t);
- echo "wfs_conf[".$i."]['namespaces'] = new Array();";
- $counter = 0;
- while($row = db_fetch_array($res)){
- echo "wfs_conf[".$i."]['namespaces'][".$counter."] = new Array();";
- echo "wfs_conf[".$i."]['namespaces'][".$counter."]['name'] = '".$row["namespace"]."';";
- echo "wfs_conf[".$i."]['namespaces'][".$counter."]['location'] = '".$row["namespace_location"]."';";
- $counter++;
- }
-
-
- $sql = "SELECT * FROM wfs_featuretype ";
- $sql .= "WHERE fkey_wfs_id = $1 AND featuretype_id = $2";
- $v = array($wfs_id,$featuretype_id);
- $t = array('i','i');
- $res = db_prep_query($sql,$v,$t);
- if($row = db_fetch_array($res)){
- echo "wfs_conf[".$i."]['featuretype_name'] = '".$row["featuretype_name"]."';";
- echo "wfs_conf[".$i."]['featuretype_srs'] = '".$row["featuretype_srs"]."';";
- }else{die("wfs_featuretype data not available");}
-
- /* wfs_conf_element */
- $sql = "SELECT * FROM wfs_conf_element ";
- $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1";
- $sql .= " ORDER BY wfs_conf_element.f_respos";
- #$sql .= "AND wfs_conf_element.f_search = 1 ORDER BY wfs_conf_element.f_search;";
-
- $v = array($wfs[$i]);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
-
- echo "wfs_conf[".$i."]['element'] = new Array();";
- $cnt = 0;
-
- while($row = db_fetch_array($res)){
- echo "wfs_conf[".$i."]['element'][".$cnt."] = new Array();";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_search'] = ".$row["f_search"].";";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_style_id'] = '".$row["f_style_id"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_toupper'] = '".$row["f_toupper"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_label'] = '".$row["f_label"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_label_id'] = '".$row["f_label_id"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_show'] = '".$row["f_show"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_respos'] = '".$row["f_respos"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['element_name'] = '".$row["element_name"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['element_type'] = '".$row["element_type"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_geom'] = '".$row["f_geom"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_gid'] = '".$row["f_gid"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_form_element_html'] = \"".(str_replace(chr(13), "", str_replace(chr(10), "", $row["f_form_element_html"])))."\";";
-// echo "wfs_conf[".$i."]['element'][".$cnt."]['f_form_element_html'] = \"\";";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_edit'] = '".$row["f_edit"]."';";
- echo "wfs_conf[".$i."]['element'][".$cnt."]['f_mandatory'] = '".$row["f_mandatory"]."';";
- $cnt++;
- }
- if($cnt == 0){die("wfs_conf data not available");}
- }
- echo "iamready = true;";
-}
-
-?>
-if(iamready){
-
-}
-
-</script>
-</head>
-<body leftmargin='0' topmargin='10' bgcolor='#ffffff' onload='register()'>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs.php (from rev 2138, branches/2.4.5/http/php/mod_wfs.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,177 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>mod_wfs</title>
+<script language='JavaScript' type='text/javascript'>
+var wfs_conf = new Array();
+function register(){
+ var isReg = false;
+ for(var i=0; i<parent.mb_InitFunctions.length; i++){
+ if(parent.mb_InitFunctions[i] == (window.name+".fetchInf()")){
+ isReg = true;
+ }
+ }
+ if(isReg == false){
+ parent.mb_registerInitFunctions(window.name+".fetchInf()");
+ }
+}
+function fetchInf(){
+ var wfs = new Array();
+ var l;
+ var ind = parent.getMapObjIndexByName('mapframe1');
+ for(var i=0; i<parent.mb_mapObj[ind].wms.length; i++){
+ for(var j=0; j<parent.mb_mapObj[ind].wms[i].objLayer.length; j++){
+ l = parent.mb_mapObj[ind].wms[i].objLayer[j];
+ if(l.gui_layer_wfs_featuretype != ""){
+ wfs[wfs.length] = l.gui_layer_wfs_featuretype;
+ }
+ }
+ }
+ document.location.href = "../php/mod_wfs.php?id=" + wfs.join(",");
+
+}
+function get_wfs_conf(){
+ return wfs_conf;
+}
+var iamready = false;
+</script>
+<?php
+echo "<script language='JavaScript' type='text/javascript'>";
+if(isset($_REQUEST['id'])){
+ $wfs = split(",",$_REQUEST['id']);
+
+ $con = db_connect($DBSERVER,$OWNER,$PW);
+ db_select_db($DB,$con);
+
+ for($i=0; $i<count($wfs); $i++){
+
+ /* wfs_conf */
+
+
+ $sql = "SELECT * FROM wfs_conf ";
+ $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
+ $sql .= "WHERE wfs_conf.wfs_conf_id = $1";
+
+ $v = array($wfs[$i]);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ if($row = db_fetch_array($res)){
+ $wfs_id = $row["fkey_wfs_id"];
+ $featuretype_id = $row["fkey_featuretype_id"];
+ echo "var len = wfs_conf.length;";
+ echo "wfs_conf[".$i."] = new Array();";
+ echo "wfs_conf[".$i."]['wfs_conf_id'] = '".$row["wfs_conf_id"]."';";
+ echo "wfs_conf[".$i."]['wfs_conf_abstract'] = '".$row["wfs_conf_abstract"]."';";
+ echo "wfs_conf[".$i."]['g_label'] = '".$row["g_label"]."';";
+ echo "wfs_conf[".$i."]['g_label_id'] = '".$row["g_label_id"]."';";
+ echo "wfs_conf[".$i."]['g_style'] = \"".str_replace(chr(13), "", str_replace(chr(10), "", $row["g_style"]))."\";";
+ echo "wfs_conf[".$i."]['g_button'] = '".$row["g_button"]."';";
+ echo "wfs_conf[".$i."]['g_button_id'] = '".$row["g_button_id"]."';";
+ echo "wfs_conf[".$i."]['g_buffer'] = '".$row["g_buffer"]."';";
+ echo "wfs_conf[".$i."]['g_res_style'] = \"".str_replace(chr(13), "", str_replace(chr(10), "", $row["g_res_style"]))."\";";
+ echo "wfs_conf[".$i."]['g_use_wzgraphics'] = '".$row["g_use_wzgraphics"]."';";
+ echo "wfs_conf[".$i."]['fkey_featuretype_id'] = '".$row["fkey_featuretype_id"]."';";
+ echo "wfs_conf[".$i."]['wfs_getfeature'] = '".$row["wfs_getfeature"]."';";
+ echo "wfs_conf[".$i."]['wfs_transaction'] = '".$row["wfs_transaction"]."';";
+
+ }else{die("wfs_conf data not available");}
+
+ $sql = "SELECT * FROM wfs_featuretype_namespace";
+ $sql .= " WHERE fkey_wfs_id = $1 AND fkey_featuretype_id = $2";
+ $v = array($wfs_id,$featuretype_id);
+ $t = array('i','i');
+ $res = db_prep_query($sql,$v,$t);
+ echo "wfs_conf[".$i."]['namespaces'] = new Array();";
+ $counter = 0;
+ while($row = db_fetch_array($res)){
+ echo "wfs_conf[".$i."]['namespaces'][".$counter."] = new Array();";
+ echo "wfs_conf[".$i."]['namespaces'][".$counter."]['name'] = '".$row["namespace"]."';";
+ echo "wfs_conf[".$i."]['namespaces'][".$counter."]['location'] = '".$row["namespace_location"]."';";
+ $counter++;
+ }
+
+
+ $sql = "SELECT * FROM wfs_featuretype ";
+ $sql .= "WHERE fkey_wfs_id = $1 AND featuretype_id = $2";
+ $v = array($wfs_id,$featuretype_id);
+ $t = array('i','i');
+ $res = db_prep_query($sql,$v,$t);
+ if($row = db_fetch_array($res)){
+ echo "wfs_conf[".$i."]['featuretype_name'] = '".$row["featuretype_name"]."';";
+ echo "wfs_conf[".$i."]['featuretype_srs'] = '".$row["featuretype_srs"]."';";
+ }else{die("wfs_featuretype data not available");}
+
+ /* wfs_conf_element */
+ $sql = "SELECT * FROM wfs_conf_element ";
+ $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1";
+ $sql .= " ORDER BY wfs_conf_element.f_respos";
+ #$sql .= "AND wfs_conf_element.f_search = 1 ORDER BY wfs_conf_element.f_search;";
+
+ $v = array($wfs[$i]);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+
+ echo "wfs_conf[".$i."]['element'] = new Array();";
+ $cnt = 0;
+
+ while($row = db_fetch_array($res)){
+ echo "wfs_conf[".$i."]['element'][".$cnt."] = new Array();";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_search'] = ".$row["f_search"].";";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_style_id'] = '".$row["f_style_id"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_toupper'] = '".$row["f_toupper"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_label'] = '".$row["f_label"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_label_id'] = '".$row["f_label_id"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_show'] = '".$row["f_show"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_respos'] = '".$row["f_respos"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['element_name'] = '".$row["element_name"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['element_type'] = '".$row["element_type"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_geom'] = '".$row["f_geom"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_gid'] = '".$row["f_gid"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_form_element_html'] = \"".(str_replace(chr(13), "", str_replace(chr(10), "", $row["f_form_element_html"])))."\";";
+// echo "wfs_conf[".$i."]['element'][".$cnt."]['f_form_element_html'] = \"\";";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_edit'] = '".$row["f_edit"]."';";
+ echo "wfs_conf[".$i."]['element'][".$cnt."]['f_mandatory'] = '".$row["f_mandatory"]."';";
+ $cnt++;
+ }
+ if($cnt == 0){die("wfs_conf data not available");}
+ }
+ echo "iamready = true;";
+}
+
+?>
+if(iamready){
+
+}
+
+</script>
+</head>
+<body leftmargin='0' topmargin='10' bgcolor='#ffffff' onload='register()'>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_wfsLayerObj_conf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,109 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>wfs_conf</title>
-<script language="JavaScript" type="text/javascript">
- function selectWFS(){
- if(document.forms[0].featuretype){
- if(document.forms[0].featuretype.length){
- for(var i=0; i<document.forms[0].featuretype.length;i++){
- document.forms[0].featuretype[i].checked = false;
- }
- }
- else{
- document.forms[0].featuretype.checked = false;
- }
- }
- document.forms[0].submit();
- }
- function validate(){
- for(var i=0; i<document.forms[0].length; i++){
- if(document.forms[0].elements[i].type == 'checkbox'){
- if(document.forms[0].elements[i].checked){
- document.forms[0].elements[i].value = 1;
- }
- else{
- document.forms[0].elements[i].value = 0;
- }
- document.forms[0].elements[i].checked = true;
- }
- }
- return true;
- }
-</script>
-
-</head>
-<body>
-wfs_conf Configuration<br>
-<br>
-<form method='POST' onsubmit='return validate()'>
-
-<?php
-if(isset($_REQUEST["save"])){
- $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = $1 ";
- $sql .= "WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
- $v = array($_REQUEST["wfs_conf"],$_REQUEST["gui"],$_REQUEST["layer"]);
- $t = array('s','s','i');
- $res = db_prep_query($sql,$v,$t);
- echo "layer is connected with wfs_conf: ".$_REQUEST["wfs_conf"]."<br><br>";
-}
-else if(isset($_REQUEST["del"])){
-
- $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = '' ";
- $sql .= "WHERE fkey_gui_id = $1 AND fkey_layer_id = $2";
- $v = array($_REQUEST["gui"],$_REQUEST["layer"]);
- $t = array('s','i');
- $res = db_prep_query($sql,$v,$t);
- echo "layer connection removed<br><br>";
-}
-echo "<input type='hidden' name='gui' value='".$_REQUEST["gui"]."'>";
-echo "<input type='hidden' name='wms' value='".$_REQUEST["wms"]."'>";
-echo "<input type='hidden' name='layer' value='".$_REQUEST["layer"]."'>";
-
-/* select wfs */
-
-$sql = "SELECT * FROM wfs_conf";
-$res = db_query($sql);
-echo "<select size='20' name='wfs_conf' onchange='submit()'>";
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo "<option value='".$row["wfs_conf_id"]."' ";
- if(isset($_REQUEST["wfs_conf"]) && $row["wfs_conf_id"] == $_REQUEST["wfs_conf"]){
- echo "selected";
- }
- echo ">".$row["wfs_conf_abstract"]."</option>";
- $cnt++;
-}
-echo "</select>";
-
-echo "<br><br><input type='submit' name='save' value='save'><br><br>";
-echo "<input name='del' type='submit' value='delete'>";
-?>
-</form>
-</body>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php (from rev 2138, branches/2.4.5/http/php/mod_wfsLayerObj_conf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfsLayerObj_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,110 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db($DB,$con);
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>wfs_conf</title>
+<script language="JavaScript" type="text/javascript">
+ function selectWFS(){
+ if(document.forms[0].featuretype){
+ if(document.forms[0].featuretype.length){
+ for(var i=0; i<document.forms[0].featuretype.length;i++){
+ document.forms[0].featuretype[i].checked = false;
+ }
+ }
+ else{
+ document.forms[0].featuretype.checked = false;
+ }
+ }
+ document.forms[0].submit();
+ }
+ function validate(){
+ for(var i=0; i<document.forms[0].length; i++){
+ if(document.forms[0].elements[i].type == 'checkbox'){
+ if(document.forms[0].elements[i].checked){
+ document.forms[0].elements[i].value = 1;
+ }
+ else{
+ document.forms[0].elements[i].value = 0;
+ }
+ document.forms[0].elements[i].checked = true;
+ }
+ }
+ return true;
+ }
+</script>
+
+</head>
+<body>
+wfs_conf Configuration<br>
+<br>
+<form method='POST' onsubmit='return validate()'>
+
+<?php
+if(isset($_REQUEST["save"])){
+ $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = $1 ";
+ $sql .= "WHERE fkey_gui_id = $2 AND fkey_layer_id = $3";
+ $v = array($_REQUEST["wfs_conf"],$_REQUEST["gui"],$_REQUEST["layer"]);
+ $t = array('s','s','i');
+ $res = db_prep_query($sql,$v,$t);
+ echo "layer is connected with wfs_conf: ".$_REQUEST["wfs_conf"]."<br><br>";
+}
+else if(isset($_REQUEST["del"])){
+
+ $sql = "UPDATE gui_layer SET gui_layer_wfs_featuretype = '' ";
+ $sql .= "WHERE fkey_gui_id = $1 AND fkey_layer_id = $2";
+ $v = array($_REQUEST["gui"],$_REQUEST["layer"]);
+ $t = array('s','i');
+ $res = db_prep_query($sql,$v,$t);
+ echo "layer connection removed<br><br>";
+}
+echo "<input type='hidden' name='gui' value='".$_REQUEST["gui"]."'>";
+echo "<input type='hidden' name='wms' value='".$_REQUEST["wms"]."'>";
+echo "<input type='hidden' name='layer' value='".$_REQUEST["layer"]."'>";
+
+/* select wfs */
+
+$sql = "SELECT * FROM wfs_conf";
+$res = db_query($sql);
+echo "<select size='20' name='wfs_conf' onchange='submit()'>";
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ echo "<option value='".$row["wfs_conf_id"]."' ";
+ if(isset($_REQUEST["wfs_conf"]) && $row["wfs_conf_id"] == $_REQUEST["wfs_conf"]){
+ echo "selected";
+ }
+ echo ">".$row["wfs_conf_abstract"]."</option>";
+ $cnt++;
+}
+echo "</select>";
+
+echo "<br><br><input type='submit' name='save' value='save'><br><br>";
+echo "<input name='del' type='submit' value='delete'>";
+?>
+</form>
+</body>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs_conf.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_conf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,300 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-
-$con = db_connect(DBSERVER,OWNER,PW);
-db_select_db(DB,$con);
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-
-#include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
-
- -->
-</style>
-
-<title>wfs_conf</title>
-<script language="JavaScript" type="text/javascript">
-function selectWFS(){
- if(document.forms[0].featuretype){
- if(document.forms[0].featuretype.length){
- for(var i=0; i<document.forms[0].featuretype.length;i++){
- document.forms[0].featuretype[i].checked = false;
- }
- }
- else{
- document.forms[0].featuretype.checked = false;
- }
- }
- document.forms[0].submit();
-}
-function validate(){
- return true;
-}
-</script>
-
-</head>
-<body>
-<br>
-<b>WFS Configuration</b>
-<br>
-<form method='POST' onsubmit='return validate()'>
-<br>
-<a href="mod_wfs_edit.php">edit WFS Configuration</a><br><br>
-Select WFS:
-<?php
-$aWFS = new wfs_conf();
-$aWFS->getallwfs();
-
-
-function toImage($text) {
- $angle = 90;
- if (extension_loaded("gd2")) {
- return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
- }
- return $text;
-}
-
-/* save wfs_conf properties */
-
-if(isset($_REQUEST["save"])){
-
- db_select_db($DB,$con);
-
- $sql = "INSERT INTO wfs_conf (";
- $sql .= "wfs_conf_abstract, fkey_wfs_id, ";
- $sql .= "fkey_featuretype_id, g_label, g_label_id, g_button, ";
- $sql .= "g_button_id, g_style, g_buffer, g_res_style, g_use_wzgraphics";
- $sql .= ") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, ";
- if (!empty($_REQUEST["g_use_wzgraphics"])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0'";
- }
- $sql .= "); ";
-
- $v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["wfs"], $_REQUEST["featuretype"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
- $res = db_prep_query($sql, $v, $t);
-
- $wfsID = db_insert_id($con,'wfs_conf','wfs_conf_id');
-
- for ($i = 0; $i < $_REQUEST["num"]; $i++){
- $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory) VALUES(";
- $sql .= "$1, $2, ";
- if (!empty($_REQUEST["f_search".$i])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0'";
- }
- $sql .= ", $3, $4, ";
- if (!empty($_REQUEST["f_toupper".$i])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0'";
- }
- $sql .= ",$5, $6, ";
- if (!empty($_REQUEST["f_show".$i])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0',";
- }
- $sql .= ", $7, ";
- if (!empty($_REQUEST["f_edit".$i])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0'";
- }
- $sql .= ",$8, ";
- if (!empty($_REQUEST["f_mandatory".$i])) {
- $sql .= "'1'";
- }
- else {
- $sql .= "'0'";
- }
- $sql .= "); ";
-
- $v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], $_REQUEST["f_form_element_html".$i], $_REQUEST["f_auth_varname".$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s");
- $res = db_prep_query($sql, $v, $t);
- }
- if (isset($_REQUEST["f_geom"])) {
- $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
- $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
- $v = array($wfsID, $_REQUEST["f_geom"]);
- $t = array("i", "i");
- $res = db_prep_query($sql, $v, $t);
- }
-
- echo "<script language='javascript'>";
- echo "document.location.href = 'mod_wfs_edit.php?gaz=".$wfsID."';";
- echo "</script>";
-}
-
-/* end save wfs_conf properties */
-
-/* select wfs */
-
-if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
- unset($_REQUEST["wfs"]);
- unset($_REQUEST["featuretype"]);
-}
-
-echo "<select name='wfs' onchange='selectWFS()'>";
-echo "<option value=''>...</option>";
-for($i=0; $i<count($aWFS->wfs_id);$i++){
- echo "<option value='".$aWFS->wfs_id[$i]."' ";
- if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "selected";
- }
- echo ">".$aWFS->wfs_id[$i]." ".$aWFS->wfs_title[$i]."</option>";
-}
-echo "</select>";
-echo "";
-
-/* end select wfs */
-
-
-/* select featuretype */
-
-if(isset($_REQUEST["wfs"])){
-
- for($i=0; $i<count($aWFS->wfs_id);$i++){
- if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
- echo "<table>";
- echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
- echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
- echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
- echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
- echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
- echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
- echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
- echo "</table>";
- }
- }
-
- $aWFS->getfeatures($_REQUEST["wfs"]);
- echo "<table>";
- for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
- echo "<tr>";
- echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
- if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
- echo "checked ";
- }
- echo "/></td>";
- echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
- echo "</tr>";
- }
- echo "</table>";
-}
-
-/* end select featuretype */
-
-/* configure elements */
-if(isset($_REQUEST["featuretype"])){
-
-
- for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
- if($_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
- echo "<hr>SRS: ".$aWFS->features->featuretype_srs[$i];
- }
- }
-
- /* set featuretype options */
- echo "<table>";
- echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract'></td></tr>" ;
- echo "<tr><td>Label:</td><td><input type='text' name='g_label'></td></tr>" ;
- echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id'></td></tr>" ;
- echo "<tr><td>Button:</td><td><input type='text' name='g_button'></td></tr>" ;
- echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id'></td></tr>" ;
- echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'></textarea></td></tr>" ;
- echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='1'></td></tr>" ;
- echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'></textarea></td></tr>" ;
- echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
- echo "</table>";
-
-
- /* set element options */
- $aWFS->getelements($_REQUEST["featuretype"]);
- echo "<table border='1'>";
- echo "<tr valign = bottom>";
- echo "<td>" . toImage('ID') . "</td>";
- echo "<td>" . toImage('name / type') . "</td>";
- echo "<td>" . toImage('geom') . "</td>";
- echo "<td>" . toImage('search') . "</td>";
- echo "<td>" . toImage('pos') . "</td>";
- echo "<td>" . toImage('style_id') . "</td>";
- echo "<td>" . toImage('upper') . "</td>";
- echo "<td>" . toImage('label') . "</td>";
- echo "<td>" . toImage('label_id') . "</td>";
- echo "<td>" . toImage('show') . "</td>";
- echo "<td>" . toImage('position') . "</td>";
- echo "<td>" . toImage('mandatory') . "</td>";
- echo "<td>" . toImage('edit') . "</td>";
- echo "<td>" . toImage('html') . "</td>";
-// echo "<td>" . toImage('auth') . "</td>";
- echo "</tr>";
-
- for($i=0; $i<count($aWFS->elements->element_id); $i++){
- echo "<tr>";
- echo "<td>".$aWFS->elements->element_id[$i]."<input type='hidden' name='f_id".$i."' value='".$aWFS->elements->element_id[$i]."'></td>";
- echo "<td>".$aWFS->elements->element_name[$i]."<br><div style='font-size:10'>".$aWFS->elements->element_type[$i]."</div></td>";
- echo "<td><input name='f_geom' type='radio' value='".$aWFS->elements->element_id[$i]."'></td>";
- echo "<td><input name='f_search".$i."' type='checkbox'></td>";
- echo "<td><input name='f_pos".$i."' type='text' size='1' value='0'></td>";
- echo "<td><input name='f_style_id".$i."' type='text' size='2' value='0'></td>";
- echo "<td><input name='f_toupper".$i."' type='checkbox'></td>";
- echo "<td><input name='f_label".$i."' type='text' size='4'></td>";
- echo "<td><input name='f_label_id".$i."' type='text' size='2' value='0'></td>";
- echo "<td><input name='f_show".$i."' type='checkbox'></td>";
- echo "<td><input name='f_respos".$i."' type='text' size='1' value='0'></td>";
- echo "<td><input name='f_mandatory".$i."' type='checkbox'></td>";
- echo "<td><input name='f_edit".$i."' type='checkbox'></td>";
- echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
- echo "</tr>";
- }
- echo "</table>";
- echo "<input type='hidden' name='num' value='".$i."'>";
- echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs_conf.php (from rev 2210, branches/2.4.5/http/php/mod_wfs_conf.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs_conf.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs_conf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,300 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require(dirname(__FILE__)."/../classes/class_wfs_conf.php");
+
+$con = db_connect(DBSERVER,OWNER,PW);
+db_select_db(DB,$con);
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+
+#include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+
+ -->
+</style>
+
+<title>wfs_conf</title>
+<script language="JavaScript" type="text/javascript">
+function selectWFS(){
+ if(document.forms[0].featuretype){
+ if(document.forms[0].featuretype.length){
+ for(var i=0; i<document.forms[0].featuretype.length;i++){
+ document.forms[0].featuretype[i].checked = false;
+ }
+ }
+ else{
+ document.forms[0].featuretype.checked = false;
+ }
+ }
+ document.forms[0].submit();
+}
+function validate(){
+ return true;
+}
+</script>
+
+</head>
+<body>
+<br>
+<b>WFS Configuration</b>
+<br>
+<form method='POST' action='<?php echo $self;?>'onsubmit='return validate()'>
+<br>
+<a href="mod_wfs_edit.php?<?php echo $urlParameters;?>">edit WFS Configuration</a><br><br>
+Select WFS:
+<?php
+$aWFS = new wfs_conf();
+$aWFS->getallwfs();
+
+
+function toImage($text) {
+ $angle = 90;
+ if (extension_loaded("gd2")) {
+ return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+ }
+ return $text;
+}
+
+/* save wfs_conf properties */
+
+if(isset($_REQUEST["save"])){
+
+ db_select_db($DB,$con);
+
+ $sql = "INSERT INTO wfs_conf (";
+ $sql .= "wfs_conf_abstract, fkey_wfs_id, ";
+ $sql .= "fkey_featuretype_id, g_label, g_label_id, g_button, ";
+ $sql .= "g_button_id, g_style, g_buffer, g_res_style, g_use_wzgraphics";
+ $sql .= ") VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, ";
+ if (!empty($_REQUEST["g_use_wzgraphics"])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= "); ";
+
+ $v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["wfs"], $_REQUEST["featuretype"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "s", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+
+ $wfsID = db_insert_id($con,'wfs_conf','wfs_conf_id');
+
+ for ($i = 0; $i < $_REQUEST["num"]; $i++){
+ $sql = "INSERT INTO wfs_conf_element (fkey_wfs_conf_id,f_id,f_search,f_pos,f_style_id,f_toupper,f_label,f_label_id,f_show,f_respos,f_edit,f_form_element_html,f_mandatory,f_auth_varname) VALUES(";
+ $sql .= "$1, $2, ";
+ if (!empty($_REQUEST["f_search".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ", $3, $4, ";
+ if (!empty($_REQUEST["f_toupper".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$5, $6, ";
+ if (!empty($_REQUEST["f_show".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ", $7, ";
+ if (!empty($_REQUEST["f_edit".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$8, ";
+ if (!empty($_REQUEST["f_mandatory".$i])) {
+ $sql .= "'1'";
+ }
+ else {
+ $sql .= "'0'";
+ }
+ $sql .= ",$9";
+ $sql .= "); ";
+
+ $v = array($wfsID, $_REQUEST["f_id".$i], $_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], $_REQUEST["f_form_element_html".$i], $_REQUEST["f_auth_varname".$i]);
+ $t = array("i", "s", "s", "s", "s", "s", "i", "s", "s");
+ $res = db_prep_query($sql, $v, $t);
+ }
+ if (isset($_REQUEST["f_geom"])) {
+ $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
+ $v = array($wfsID, $_REQUEST["f_geom"]);
+ $t = array("i", "i");
+ $res = db_prep_query($sql, $v, $t);
+ }
+
+ echo "<script language='javascript'>";
+ echo "document.location.href = 'mod_wfs_edit.php?gaz=".$wfsID."';";
+ echo "</script>";
+}
+
+/* end save wfs_conf properties */
+
+/* select wfs */
+
+if(isset($_REQUEST["wfs"]) && $_REQUEST["wfs"] == ""){
+ unset($_REQUEST["wfs"]);
+ unset($_REQUEST["featuretype"]);
+}
+
+echo "<select name='wfs' onchange='selectWFS()'>";
+echo "<option value=''>...</option>";
+for($i=0; $i<count($aWFS->wfs_id);$i++){
+ echo "<option value='".$aWFS->wfs_id[$i]."' ";
+ if(isset($_REQUEST["wfs"]) && $aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "selected";
+ }
+ echo ">".$aWFS->wfs_id[$i]." ".$aWFS->wfs_title[$i]."</option>";
+}
+echo "</select>";
+echo "";
+
+/* end select wfs */
+
+
+/* select featuretype */
+
+if(isset($_REQUEST["wfs"])){
+
+ for($i=0; $i<count($aWFS->wfs_id);$i++){
+ if($aWFS->wfs_id[$i] == $_REQUEST["wfs"]){
+ echo "<table>";
+ echo "<tr><td>ID:</td><td>".$aWFS->wfs_id[$i]."</td></tr>";
+ echo "<tr><td>Name:</td><td>".$aWFS->wfs_name[$i]."</td></tr>";
+ echo "<tr><td>Title:</td><td>".$aWFS->wfs_title[$i]."</td></tr>";
+ echo "<tr><td>Abstract:</td><td>".$aWFS->wfs_abstract[$i]."</td></tr>";
+ echo "<tr><td>Capabilities:</td><td>".$aWFS->wfs_getcapabilities[$i]."</td></tr>";
+ echo "<tr><td>FeatureTypes:</td><td>".$aWFS->wfs_describefeaturetype[$i]."</td></tr>";
+ echo "<tr><td>Feature:</td><td>".$aWFS->wfs_getfeature[$i]."</td></tr>";
+ echo "</table>";
+ }
+ }
+
+ $aWFS->getfeatures($_REQUEST["wfs"]);
+ echo "<table>";
+ for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
+ echo "<tr>";
+ echo "<td><input type='radio' name='featuretype' value='".$aWFS->features->featuretype_id[$i]."' onclick='submit()' ";
+ if(isset($_REQUEST["featuretype"]) && $_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
+ echo "checked ";
+ }
+ echo "/></td>";
+ echo "<td>".$aWFS->features->featuretype_name[$i]."</td>";
+ echo "</tr>";
+ }
+ echo "</table>";
+}
+
+/* end select featuretype */
+
+/* configure elements */
+if(isset($_REQUEST["featuretype"])){
+
+
+ for($i=0; $i<count($aWFS->features->featuretype_id); $i++){
+ if($_REQUEST["featuretype"] == $aWFS->features->featuretype_id[$i]){
+ echo "<hr>SRS: ".$aWFS->features->featuretype_srs[$i];
+ }
+ }
+
+ /* set featuretype options */
+ echo "<table>";
+ echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract'></td></tr>" ;
+ echo "<tr><td>Label:</td><td><input type='text' name='g_label'></td></tr>" ;
+ echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id'></td></tr>" ;
+ echo "<tr><td>Button:</td><td><input type='text' name='g_button'></td></tr>" ;
+ echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id'></td></tr>" ;
+ echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'></textarea></td></tr>" ;
+ echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='1'></td></tr>" ;
+ echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'></textarea></td></tr>" ;
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'></td></tr>";
+ echo "</table>";
+
+
+ /* set element options */
+ $aWFS->getelements($_REQUEST["featuretype"]);
+ echo "<table border='1'>";
+ echo "<tr valign = bottom>";
+ echo "<td>" . toImage('ID') . "</td>";
+ echo "<td>" . toImage('name / type') . "</td>";
+ echo "<td>" . toImage('geom') . "</td>";
+ echo "<td>" . toImage('search') . "</td>";
+ echo "<td>" . toImage('pos') . "</td>";
+ echo "<td>" . toImage('style_id') . "</td>";
+ echo "<td>" . toImage('upper') . "</td>";
+ echo "<td>" . toImage('label') . "</td>";
+ echo "<td>" . toImage('label_id') . "</td>";
+ echo "<td>" . toImage('show') . "</td>";
+ echo "<td>" . toImage('position') . "</td>";
+ echo "<td>" . toImage('mandatory') . "</td>";
+ echo "<td>" . toImage('edit') . "</td>";
+ echo "<td>" . toImage('html') . "</td>";
+// echo "<td>" . toImage('auth') . "</td>";
+ echo "</tr>";
+
+ for($i=0; $i<count($aWFS->elements->element_id); $i++){
+ echo "<tr>";
+ echo "<td>".$aWFS->elements->element_id[$i]."<input type='hidden' name='f_id".$i."' value='".$aWFS->elements->element_id[$i]."'></td>";
+ echo "<td>".$aWFS->elements->element_name[$i]."<br><div style='font-size:10'>".$aWFS->elements->element_type[$i]."</div></td>";
+ echo "<td><input name='f_geom' type='radio' value='".$aWFS->elements->element_id[$i]."'></td>";
+ echo "<td><input name='f_search".$i."' type='checkbox'></td>";
+ echo "<td><input name='f_pos".$i."' type='text' size='1' value='0'></td>";
+ echo "<td><input name='f_style_id".$i."' type='text' size='2' value='0'></td>";
+ echo "<td><input name='f_toupper".$i."' type='checkbox'></td>";
+ echo "<td><input name='f_label".$i."' type='text' size='4'></td>";
+ echo "<td><input name='f_label_id".$i."' type='text' size='2' value='0'></td>";
+ echo "<td><input name='f_show".$i."' type='checkbox'></td>";
+ echo "<td><input name='f_respos".$i."' type='text' size='1' value='0'></td>";
+ echo "<td><input name='f_mandatory".$i."' type='checkbox'></td>";
+ echo "<td><input name='f_edit".$i."' type='checkbox'></td>";
+ echo "<td><textarea name='f_form_element_html".$i."' cols='15' rows='1' ></textarea></td>";
+ echo "</tr>";
+ }
+ echo "</table>";
+ echo "<input type='hidden' name='num' value='".$i."'>";
+ echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs_edit.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_edit.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,271 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require(dirname(__FILE__)."/../../conf/mapbender.conf");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-?>
-<html>
-<head>
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<style type="text/css">
- <!--
- body{
- background-color: #ffffff;
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #808080
- }
-
- -->
-</style>
-<title>wfs_edit</title>
-<script language="JavaScript" type="text/javascript">
-function validate(){
- return true;
-}
-</script>
-
-</head>
-<body>
-<br>
-<b>WFS Configuration</b>
-<br><br>
-<form name='form1' method='POST' onsubmit='return validate()'>
-<a href="mod_wfs_conf.php">new Configuration</a><br><br>
-Select WFS Configuration:<br><br>
-<?php
-/* save wfs_conf properties */
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-
-if(isset($_REQUEST["save"])){
-
- $sql = "UPDATE wfs_conf SET ";
- $sql .= "wfs_conf_abstract = $1, g_label = $2, ";
- $sql .= "g_label_id = $3, g_button = $4, g_button_id = $5, g_style = $6, ";
- $sql .= "g_buffer = $7, g_res_style = $8, g_use_wzgraphics = ";
- if (!empty($_REQUEST["g_use_wzgraphics"])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= " WHERE wfs_conf_id = $9;";
-
- $v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["gaz"]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s", "i");
- $res = db_prep_query($sql, $v, $t);
-
- if (isset($_REQUEST["f_geom"])) {
- $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
- $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
- $v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
- $t = array("i", "s");
- $res = db_prep_query($sql);
-
- $sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
- $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id <> $2;";
- $v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
- $t = array("i", "s");
- $res = db_prep_query($sql);
- }
- else {
- $sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
- $sql .= "WHERE fkey_wfs_conf_id = $1;";
- $v = array($_REQUEST["gaz"]);
- $t = array("i");
- $res = db_prep_query($sql);
- }
-
- for($i=0; $i<$_REQUEST["num"]; $i++){
-
- $sql = "UPDATE wfs_conf_element SET f_search = '";
- if (!empty($_REQUEST["f_search".$i])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= "', f_pos = $1, f_style_id = $2,";
- $sql .= "f_toupper = '" ;
- if (!empty($_REQUEST["f_toupper".$i])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= "',f_label = $3, f_label_id = $4,";
- $sql .= "f_show = '";
- if (!empty($_REQUEST["f_show".$i])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= "',f_respos = $5,";
- $sql .= "f_edit = '";
- if (!empty($_REQUEST["f_edit".$i])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= "', f_form_element_html = $6,";
- $sql .= "f_mandatory = '";
- if (!empty($_REQUEST["f_mandatory".$i])) {
- $sql .= "1";
- }
- else {
- $sql .= "0";
- }
- $sql .= "'";
- $sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
-
- $v = array($_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], addslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
- $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
- $res = db_prep_query($sql, $v, $t);
- }
-}
-
-/* end save wfs_conf properties */
-
-/* select wfs */
-
-$sql = "SELECT * FROM wfs_conf";
-$res = db_query($sql);
-echo "<select size='10' name='gaz' onchange='submit()'>";
-$cnt = 0;
-while($row = db_fetch_array($res)){
- echo "<option value='".$row["wfs_conf_id"]."' ";
- if(isset($_REQUEST["gaz"]) && $row["wfs_conf_id"] == $_REQUEST["gaz"]){
- echo "selected";
- }
- echo ">".$row["wfs_conf_id"]." ".$row["wfs_conf_abstract"]."</option>";
- $cnt++;
-}
-echo "</select>";
-
-
-
-/* end select wfs */
-
-function toImage($text) {
- $angle = 90;
- if (extension_loaded("gd2")) {
- return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
- }
- return $text;
-}
-
-/* configure elements */
-if (isset($_REQUEST["gaz"])) {
- $sql = "SELECT * FROM wfs_conf WHERE wfs_conf_id = $1";
- $v = array($_REQUEST["gaz"]);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
- if($row = db_fetch_array($res)){
- echo "<table>";
- echo "<tr><td>GazetterID:</td><td>".$row["wfs_conf_id"]."</td></tr>" ;
- echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract' value='".$row["wfs_conf_abstract"]."'></td></tr>" ;
- echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
- echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
- echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
- echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
- echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
- echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
- echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'>".$row["g_res_style"]."</textarea></td></tr>" ;
- echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
- if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
- echo "></td></tr>";
- echo "</table>";
- }
-
- /* set element options */
- $sql = "SELECT * FROM wfs_conf_element ";
- $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE fkey_wfs_conf_id = $1 ORDER BY f_id";
- $v = array($_REQUEST["gaz"]);
- $t = array("i");
- $res = db_prep_query($sql, $v, $t);
-
- echo "<table border='1'>";
- echo "<tr valign = bottom>";
- echo "<td>" . toImage('ID') . "</td>";
- echo "<td>" . toImage('name / type') . "</td>";
- echo "<td>" . toImage('geom') . "</td>";
- echo "<td>" . toImage('search') . "</td>";
- echo "<td>" . toImage('pos') . "</td>";
- echo "<td>" . toImage('style_id') . "</td>";
- echo "<td>" . toImage('upper') . "</td>";
- echo "<td>" . toImage('label') . "</td>";
- echo "<td>" . toImage('label_id') . "</td>";
- echo "<td>" . toImage('show') . "</td>";
- echo "<td>" . toImage('position') . "</td>";
- echo "<td>" . toImage('mandatory') . "</td>";
- echo "<td>" . toImage('edit') . "</td>";
- echo "<td>" . toImage('html') . "</td>";
- echo "</tr>";
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<tr>";
- echo "<td><input type='text' size='1' name='f_id".$cnt."' value='".$row["f_id"]."' readonly></td>";
- echo "<td>".$row["element_name"]."<br>";
- if ($row["element_type"]) {
- echo "<div style='font-size:10'>(".$row["element_type"].")</div>";
- }
- echo "</td>";
- echo "<td><input name='f_geom' type='radio' value='".$row["f_id"]."' ";
- if($row["f_geom"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_search".$cnt."' type='checkbox'";
- if($row["f_search"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_pos".$cnt."' type='text' size='1' value='".$row["f_pos"]."'></td>";
- echo "<td><input name='f_style_id".$cnt."' type='text' size='2' value='".$row["f_style_id"]."'></td>";
- echo "<td><input name='f_toupper".$cnt."' type='checkbox'";
- if($row["f_toupper"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_label".$cnt."' type='text' size='4' value='".$row["f_label"]."'></td>";
- echo "<td><input name='f_label_id".$cnt."' type='text' size='2' value='".$row["f_label_id"]."'></td>";
- echo "<td><input name='f_show".$cnt."' type='checkbox'";
- if($row["f_show"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_respos".$cnt."' type='text' size='1' value='".$row["f_respos"]."'></td>";
- echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
- if($row["f_mandatory"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><input name='f_edit".$cnt."' type='checkbox'";
- if($row["f_edit"] == 1){ echo " checked"; }
- echo "></td>";
- echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".stripslashes($row["f_form_element_html"])."</textarea></td>";
- echo "</tr>";
- $cnt++;
- }
- echo "</table>";
- echo "<input type='hidden' name='num' value='".$cnt."'>";
- echo "<input type='submit' name='save' value='save'>";
-}
-
-
-/* end configure elements */
-?>
-</form>
-</body>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs_edit.php (from rev 2210, branches/2.4.5/http/php/mod_wfs_edit.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs_edit.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs_edit.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,268 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+?>
+<html>
+<head>
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<style type="text/css">
+ <!--
+ body{
+ background-color: #ffffff;
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #808080
+ }
+
+ -->
+</style>
+<title>wfs_edit</title>
+<script language="JavaScript" type="text/javascript">
+function validate(){
+ return true;
+}
+</script>
+
+</head>
+<body>
+<br>
+<b>WFS Configuration</b>
+<br><br>
+<form name='form1' action='<?php echo $self;?>' method='POST' onsubmit='return validate()'>
+<a href="mod_wfs_conf.php?<?php echo $urlParameters;?>">new Configuration</a><br><br>
+Select WFS Configuration:<br><br>
+<?php
+/* save wfs_conf properties */
+
+if(isset($_REQUEST["save"])){
+
+ $sql = "UPDATE wfs_conf SET ";
+ $sql .= "wfs_conf_abstract = $1, g_label = $2, ";
+ $sql .= "g_label_id = $3, g_button = $4, g_button_id = $5, g_style = $6, ";
+ $sql .= "g_buffer = $7, g_res_style = $8, g_use_wzgraphics = ";
+ if (!empty($_REQUEST["g_use_wzgraphics"])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= " WHERE wfs_conf_id = $9;";
+
+ $v = array($_REQUEST["wfs_conf_abstract"], $_REQUEST["g_label"], $_REQUEST["g_label_id"], $_REQUEST["g_button"], $_REQUEST["g_button_id"], $_REQUEST["g_style"], $_REQUEST["g_buffer"], $_REQUEST["g_res_style"], $_REQUEST["gaz"]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
+ $res = db_prep_query($sql, $v, $t);
+
+ if (isset($_REQUEST["f_geom"])) {
+ $sql = "UPDATE wfs_conf_element SET f_geom = 1 ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id = $2;";
+ $v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
+ $t = array("i", "s");
+ $res = db_prep_query($sql, $v, $t);
+
+ $sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1 AND f_id <> $2;";
+ $v = array($_REQUEST["gaz"], $_REQUEST["f_geom"]);
+ $t = array("i", "s");
+ $res = db_prep_query($sql, $v, $t);
+ }
+ else {
+ $sql = "UPDATE wfs_conf_element SET f_geom = 0 ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1;";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+ }
+
+ for($i=0; $i<$_REQUEST["num"]; $i++){
+
+ $sql = "UPDATE wfs_conf_element SET f_search = '";
+ if (!empty($_REQUEST["f_search".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "', f_pos = $1, f_style_id = $2,";
+ $sql .= "f_toupper = '" ;
+ if (!empty($_REQUEST["f_toupper".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "',f_label = $3, f_label_id = $4,";
+ $sql .= "f_show = '";
+ if (!empty($_REQUEST["f_show".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "',f_respos = $5,";
+ $sql .= "f_edit = '";
+ if (!empty($_REQUEST["f_edit".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "', f_form_element_html = $6,";
+ $sql .= "f_mandatory = '";
+ if (!empty($_REQUEST["f_mandatory".$i])) {
+ $sql .= "1";
+ }
+ else {
+ $sql .= "0";
+ }
+ $sql .= "', f_auth_varname = $7";
+ $sql .= " WHERE fkey_wfs_conf_id = $8 AND f_id = $9;";
+
+ $v = array($_REQUEST["f_pos".$i], $_REQUEST["f_style_id".$i], $_REQUEST["f_label".$i], $_REQUEST["f_label_id".$i], $_REQUEST["f_respos".$i], addslashes($_REQUEST["f_form_element_html".$i]), $_REQUEST["f_auth_varname".$i], $_REQUEST["gaz"], $_REQUEST["f_id".$i]);
+ $t = array("s", "s", "s", "s", "s", "s", "s", "i", "s");
+ $res = db_prep_query($sql, $v, $t);
+ }
+}
+
+/* end save wfs_conf properties */
+
+/* select wfs */
+
+$sql = "SELECT * FROM wfs_conf";
+$res = db_query($sql);
+echo "<select size='10' name='gaz' onchange='submit()'>";
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ echo "<option value='".$row["wfs_conf_id"]."' ";
+ if(isset($_REQUEST["gaz"]) && $row["wfs_conf_id"] == $_REQUEST["gaz"]){
+ echo "selected";
+ }
+ echo ">".$row["wfs_conf_id"]." ".$row["wfs_conf_abstract"]."</option>";
+ $cnt++;
+}
+echo "</select>";
+
+
+
+/* end select wfs */
+
+function toImage($text) {
+ $angle = 90;
+ if (extension_loaded("gd2")) {
+ return "<img src='../php/createImageFromText.php?text=" . urlencode($text) . "&angle=" . $angle . "'>";
+ }
+ return $text;
+}
+
+/* configure elements */
+if (isset($_REQUEST["gaz"])) {
+ $sql = "SELECT * FROM wfs_conf WHERE wfs_conf_id = $1";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+ if($row = db_fetch_array($res)){
+ echo "<table>";
+ echo "<tr><td>GazetterID:</td><td>".$row["wfs_conf_id"]."</td></tr>" ;
+ echo "<tr><td>Abstract:</td><td><input type='text' name='wfs_conf_abstract' value='".$row["wfs_conf_abstract"]."'></td></tr>" ;
+ echo "<tr><td>Label:</td><td><input type='text' name='g_label' value='".$row["g_label"]."'></td></tr>" ;
+ echo "<tr><td>Label_id:</td><td><input type='text' name='g_label_id' value='".$row["g_label_id"]."'></td></tr>" ;
+ echo "<tr><td>Button:</td><td><input type='text' name='g_button' value='".$row["g_button"]."'></td></tr>" ;
+ echo "<tr><td>Button_id:</td><td><input type='text' name='g_button_id' value='".$row["g_button_id"]."'></td></tr>" ;
+ echo "<tr><td>Style:</td><td><textarea cols=50 rows=5 name='g_style'>".$row["g_style"]."</textarea></td></tr>" ;
+ echo "<tr><td>Buffer:</td><td><input type='text' size='4' name='g_buffer' value='".$row["g_buffer"]."'></td></tr>" ;
+ echo "<tr><td>ResultStyle:</td><td><textarea cols=50 rows=5 name='g_res_style'>".$row["g_res_style"]."</textarea></td></tr>" ;
+ echo "<tr><td>WZ-Graphics:</td><td><input name='g_use_wzgraphics' type='checkbox'";
+ if($row["g_use_wzgraphics"] == 1){ echo " checked"; }
+ echo "></td></tr>";
+ echo "</table>";
+ }
+
+ /* set element options */
+ $sql = "SELECT * FROM wfs_conf_element ";
+ $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE fkey_wfs_conf_id = $1 ORDER BY f_id";
+ $v = array($_REQUEST["gaz"]);
+ $t = array("i");
+ $res = db_prep_query($sql, $v, $t);
+
+ echo "<table border='1'>";
+ echo "<tr valign = bottom>";
+ echo "<td>" . toImage('ID') . "</td>";
+ echo "<td>" . toImage('name / type') . "</td>";
+ echo "<td>" . toImage('geom') . "</td>";
+ echo "<td>" . toImage('search') . "</td>";
+ echo "<td>" . toImage('pos') . "</td>";
+ echo "<td>" . toImage('style_id') . "</td>";
+ echo "<td>" . toImage('upper') . "</td>";
+ echo "<td>" . toImage('label') . "</td>";
+ echo "<td>" . toImage('label_id') . "</td>";
+ echo "<td>" . toImage('show') . "</td>";
+ echo "<td>" . toImage('position') . "</td>";
+ echo "<td>" . toImage('mandatory') . "</td>";
+ echo "<td>" . toImage('edit') . "</td>";
+ echo "<td>" . toImage('html') . "</td>";
+ echo "</tr>";
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<tr>";
+ echo "<td><input type='text' size='1' name='f_id".$cnt."' value='".$row["f_id"]."' readonly></td>";
+ echo "<td>".$row["element_name"]."<br>";
+ if ($row["element_type"]) {
+ echo "<div style='font-size:10'>(".$row["element_type"].")</div>";
+ }
+ echo "</td>";
+ echo "<td><input name='f_geom' type='radio' value='".$row["f_id"]."' ";
+ if($row["f_geom"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_search".$cnt."' type='checkbox'";
+ if($row["f_search"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_pos".$cnt."' type='text' size='1' value='".$row["f_pos"]."'></td>";
+ echo "<td><input name='f_style_id".$cnt."' type='text' size='2' value='".$row["f_style_id"]."'></td>";
+ echo "<td><input name='f_toupper".$cnt."' type='checkbox'";
+ if($row["f_toupper"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_label".$cnt."' type='text' size='4' value='".$row["f_label"]."'></td>";
+ echo "<td><input name='f_label_id".$cnt."' type='text' size='2' value='".$row["f_label_id"]."'></td>";
+ echo "<td><input name='f_show".$cnt."' type='checkbox'";
+ if($row["f_show"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_respos".$cnt."' type='text' size='1' value='".$row["f_respos"]."'></td>";
+ echo "<td><input name='f_mandatory".$cnt."' type='checkbox'";
+ if($row["f_mandatory"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><input name='f_edit".$cnt."' type='checkbox'";
+ if($row["f_edit"] == 1){ echo " checked"; }
+ echo "></td>";
+ echo "<td><textarea name='f_form_element_html".$cnt."' cols='15' rows='1' >".stripslashes($row["f_form_element_html"])."</textarea></td>";
+ echo "</tr>";
+ $cnt++;
+ }
+ echo "</table>";
+ echo "<input type='hidden' name='num' value='".$cnt."'>";
+ echo "<input type='submit' name='save' value='save'>";
+}
+
+
+/* end configure elements */
+?>
+</form>
+</body>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_gazetteer_server.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,210 +0,0 @@
-<?php
-# $Id: mod_wfsrequest.php 1008 2007-01-16 11:26:56Z christoph $
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-include(dirname(__FILE__)."/../classes/class_gml2.php");
-require_once(dirname(__FILE__)."/../extensions/JSON.php");
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-
-$command = $_REQUEST["command"];
-
-function checkAccessConstraint($filter, $wfs_conf_id) {
- /* wfs_conf_element */
- $sql = "SELECT * FROM wfs_conf_element ";
- $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
- $sql .= "ORDER BY wfs_conf_element.f_respos";
-
- $v = array($wfs_conf_id);
- $t = array('i');
- $res = db_prep_query($sql,$v,$t);
- while($row = db_fetch_array($res)){
-
- if (!empty($row["f_auth_varname"])) {
- $auth_varname = $row["f_auth_varname"];
- $element_name = $row["element_name"];
- }
- }
- if (!empty($auth_varname)) {
-
- if (isValidVarName($auth_varname)) {
- $user = eval("return " . $auth_varname . ";");
- $pattern = "(<ogc:Filter[^>]*>)(.*)(</ogc:Filter>)";
- $replacement = "\\1<And>\\2<ogc:PropertyIsEqualTo><ogc:PropertyName>" . $element_name . "</ogc:PropertyName><ogc:Literal>" . $user . "</ogc:Literal></ogc:PropertyIsEqualTo></And>\\3";
- $filter = eregi_replace($pattern, $replacement, $filter);
- }
- }
- return $filter;
-}
-
-
-if ($command == "getWfsConf") {
-
- $wfsConfIdString = $_GET["wfsConfIdString"];
-
- if ($wfsConfIdString != "") {
- $wfsConfIdArray = split(",", $wfsConfIdString);
- }
- else {
- echo "please specify wfs conf id.";
- die();
- }
-
- $sql = "SELECT * FROM wfs_conf ";
- $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
- $sql .= "WHERE wfs_conf.wfs_conf_id IN (";
-
- $v = array();
- $t = array();
- for ($i = 0; $i < count($wfsConfIdArray); $i++) {
- if ($i > 0) {$sql .= ", ";}
- $sql .= "$" . ($i+1);
- array_push($v, $wfsConfIdArray[$i]);
- array_push($t, 'i');
- }
- $sql .= ")";
-
- $res = db_prep_query($sql, $v, $t);
-
- $obj = array();
- while ($row = db_fetch_array($res)) {
- $id = $row["wfs_conf_id"];
-
- $sql_conf_element = "SELECT * FROM wfs_conf_element ";
- $sql_conf_element .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql_conf_element .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
- $sql_conf_element .= "AND wfs_conf_element.f_search = 1 ORDER BY wfs_conf_element.f_pos";
- $v_conf_element = array($id);
- $t_conf_element = array('i');
- $res_conf_element = db_prep_query($sql_conf_element, $v_conf_element, $t_conf_element);
-
- $elementArray = array();
- while ($row_conf_element = db_fetch_array($res_conf_element)) {
- $currentElement = array("f_search" => $row_conf_element["f_search"],
- "f_style_id" => $row_conf_element["f_style_id"],
- "f_toupper" => $row_conf_element["f_toupper"],
- "f_label" => $row_conf_element["f_label"],
- "f_label_id" => $row_conf_element["f_label_id"],
- "element_name" => $row_conf_element["element_name"],
- "element_type" => $row_conf_element["element_type"]
- );
- array_push($elementArray, $currentElement);
- }
-
- $sql_feature_type = "SELECT * FROM wfs_featuretype WHERE fkey_wfs_id = $1 AND featuretype_id = $2";
- $v_feature_type = array($row["fkey_wfs_id"], $row["fkey_featuretype_id"]);
- $t_feature_type = array("i", "i");
-
- $res_feature_type = db_prep_query($sql_feature_type, $v_feature_type, $t_feature_type);
- if($row_feature_type = db_fetch_array($res_feature_type)){
- $featuretype_name = $row_feature_type["featuretype_name"];
- $featuretype_srs = $row_feature_type["featuretype_srs"];
- }
-
- $currentRow = array("g_label" => $row["g_label"],
- "g_label_id" => $row["g_label_id"],
- "g_style" => $row["g_style"],
- "g_button" => $row["g_button"],
- "g_button_id" => $row["g_button_id"],
- "g_buffer" => $row["g_buffer"],
- "g_res_style" => $row["g_res_style"],
- "g_use_wzgraphics" => $row["g_use_wzgraphics"],
- "wfs_id" => $row["fkey_wfs_id"],
- "featuretype_id" => $row["fkey_featuretype_id"],
- "featuretype_name" => $featuretype_name,
- "featuretype_id" => $featuretype_srs,
- "wfs_getfeature" => $row["wfs_getfeature"],
- "element" => $elementArray
- );
-
- $obj[$id] = $currentRow;
- }
- $json = new Services_JSON();
- $output = $json->encode($obj);
- echo $output;
-}
-else if ($command == "getSearchResults") {
- $wfs_conf_id = $_REQUEST["wfs_conf_id"];
- $backlink = $_REQUEST["backlink"];
- $frame = $_REQUEST["frame"];
- $filter = $_REQUEST["filter"];
- $url = $_REQUEST["url"];
-
- /* wfs_conf */
- $sql = "SELECT * FROM wfs_conf JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
- $sql .= "WHERE wfs_conf.wfs_conf_id = $1";
- $v = array($wfs_conf_id);
- $t = array('i');
-
- $res = db_prep_query($sql,$v,$t);
- if ($row = db_fetch_array($res)) {
- $g_res_style = $row["g_res_style"];
- }
- else {
- die("wfs_conf " . $wfs_conf_id . "data not available");
- }
-
- /* wfs_conf_element */
- $sql = "SELECT * FROM wfs_conf_element ";
- $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
- $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
- $sql .= "AND wfs_conf_element.f_show = 1 ORDER BY wfs_conf_element.f_respos;";
- $v = array($wfs_conf_id);
- $t = array('i');
-
- $res = db_prep_query($sql,$v,$t);
- $col = array();
- while ($row = db_fetch_array($res)) {
- array_push($col, $row["element_name"]);
- }
- if (count($col) == 0) {
- die("wfs_conf_element data not available");
- }
-
- // append authorisation condition to filter
- $filter = checkAccessConstraint($filter, $wfs_conf_id);
-
- $admin = new administration();
-
- $req = urldecode($url).urlencode($admin->char_decode(stripslashes($filter)));
- $mygml = new gml2();
- $mygml->parsegml($req);
-
- // generates JavaScript code that will add a geometry array containing
- // all the result geometries and their attributes (wfs_conf_elements)
-
- $js = "";
- if ($mygml->getMemberCount() > 0) {
- $js .= $mygml->exportGeometriesToJS(true);
-
- for ($i = 0; $i < $mygml->getMemberCount(); $i++) {
- for ($j = 0; $j < count($col); $j++){
- $js .= "geom.get(".$i.").e.setElement('".$j."', '".$mygml->getValueBySeparatedKey($i, $col[$j]) . "');\n";
- }
- }
- }
- echo $js;
-}
-else {
- echo "please enter a valid command.";
-}
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php (from rev 2186, branches/2.4.5/http/php/mod_wfs_gazetteer_server.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs_gazetteer_server.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,207 @@
+<?php
+# $Id: mod_wfsrequest.php 1008 2007-01-16 11:26:56Z christoph $
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../classes/class_gml2.php");
+require_once(dirname(__FILE__)."/../extensions/JSON.php");
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+
+$command = $_REQUEST["command"];
+
+function checkAccessConstraint($filter, $wfs_conf_id) {
+ /* wfs_conf_element */
+ $sql = "SELECT * FROM wfs_conf_element ";
+ $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
+ $sql .= "ORDER BY wfs_conf_element.f_respos";
+
+ $v = array($wfs_conf_id);
+ $t = array('i');
+ $res = db_prep_query($sql,$v,$t);
+ while($row = db_fetch_array($res)){
+
+ if (!empty($row["f_auth_varname"])) {
+ $auth_varname = $row["f_auth_varname"];
+ $element_name = $row["element_name"];
+ }
+ }
+ if (!empty($auth_varname)) {
+
+ if (isValidVarName($auth_varname)) {
+ $user = eval("return " . $auth_varname . ";");
+ $pattern = "(<ogc:Filter[^>]*>)(.*)(</ogc:Filter>)";
+ $replacement = "\\1<And>\\2<ogc:PropertyIsEqualTo><ogc:PropertyName>" . $element_name . "</ogc:PropertyName><ogc:Literal>" . $user . "</ogc:Literal></ogc:PropertyIsEqualTo></And>\\3";
+ $filter = eregi_replace($pattern, $replacement, $filter);
+ }
+ }
+ return $filter;
+}
+
+
+if ($command == "getWfsConf") {
+
+ $wfsConfIdString = $_GET["wfsConfIdString"];
+
+ if ($wfsConfIdString != "") {
+ $wfsConfIdArray = split(",", $wfsConfIdString);
+ }
+ else {
+ echo "please specify wfs conf id.";
+ die();
+ }
+
+ $sql = "SELECT * FROM wfs_conf ";
+ $sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
+ $sql .= "WHERE wfs_conf.wfs_conf_id IN (";
+
+ $v = array();
+ $t = array();
+ for ($i = 0; $i < count($wfsConfIdArray); $i++) {
+ if ($i > 0) {$sql .= ", ";}
+ $sql .= "$" . ($i+1);
+ array_push($v, $wfsConfIdArray[$i]);
+ array_push($t, 'i');
+ }
+ $sql .= ")";
+
+ $res = db_prep_query($sql, $v, $t);
+
+ $obj = array();
+ while ($row = db_fetch_array($res)) {
+ $id = $row["wfs_conf_id"];
+
+ $sql_conf_element = "SELECT * FROM wfs_conf_element ";
+ $sql_conf_element .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+ $sql_conf_element .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
+ $sql_conf_element .= "AND wfs_conf_element.f_search = 1 ORDER BY wfs_conf_element.f_pos";
+ $v_conf_element = array($id);
+ $t_conf_element = array('i');
+ $res_conf_element = db_prep_query($sql_conf_element, $v_conf_element, $t_conf_element);
+
+ $elementArray = array();
+ while ($row_conf_element = db_fetch_array($res_conf_element)) {
+ $currentElement = array("f_search" => $row_conf_element["f_search"],
+ "f_style_id" => $row_conf_element["f_style_id"],
+ "f_toupper" => $row_conf_element["f_toupper"],
+ "f_label" => $row_conf_element["f_label"],
+ "f_label_id" => $row_conf_element["f_label_id"],
+ "element_name" => $row_conf_element["element_name"],
+ "element_type" => $row_conf_element["element_type"]
+ );
+ array_push($elementArray, $currentElement);
+ }
+
+ $sql_feature_type = "SELECT * FROM wfs_featuretype WHERE fkey_wfs_id = $1 AND featuretype_id = $2";
+ $v_feature_type = array($row["fkey_wfs_id"], $row["fkey_featuretype_id"]);
+ $t_feature_type = array("i", "i");
+
+ $res_feature_type = db_prep_query($sql_feature_type, $v_feature_type, $t_feature_type);
+ if($row_feature_type = db_fetch_array($res_feature_type)){
+ $featuretype_name = $row_feature_type["featuretype_name"];
+ $featuretype_srs = $row_feature_type["featuretype_srs"];
+ }
+
+ $currentRow = array("g_label" => $row["g_label"],
+ "g_label_id" => $row["g_label_id"],
+ "g_style" => $row["g_style"],
+ "g_button" => $row["g_button"],
+ "g_button_id" => $row["g_button_id"],
+ "g_buffer" => $row["g_buffer"],
+ "g_res_style" => $row["g_res_style"],
+ "g_use_wzgraphics" => $row["g_use_wzgraphics"],
+ "wfs_id" => $row["fkey_wfs_id"],
+ "featuretype_id" => $row["fkey_featuretype_id"],
+ "featuretype_name" => $featuretype_name,
+ "featuretype_id" => $featuretype_srs,
+ "wfs_getfeature" => $row["wfs_getfeature"],
+ "element" => $elementArray
+ );
+
+ $obj[$id] = $currentRow;
+ }
+ $json = new Services_JSON();
+ $output = $json->encode($obj);
+ echo $output;
+}
+else if ($command == "getSearchResults") {
+ $wfs_conf_id = $_REQUEST["wfs_conf_id"];
+ $backlink = $_REQUEST["backlink"];
+ $frame = $_REQUEST["frame"];
+ $filter = $_REQUEST["filter"];
+ $url = $_REQUEST["url"];
+
+ /* wfs_conf */
+ $sql = "SELECT * FROM wfs_conf JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
+ $sql .= "WHERE wfs_conf.wfs_conf_id = $1";
+ $v = array($wfs_conf_id);
+ $t = array('i');
+
+ $res = db_prep_query($sql,$v,$t);
+ if ($row = db_fetch_array($res)) {
+ $g_res_style = $row["g_res_style"];
+ }
+ else {
+ die("wfs_conf " . $wfs_conf_id . "data not available");
+ }
+
+ /* wfs_conf_element */
+ $sql = "SELECT * FROM wfs_conf_element ";
+ $sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+ $sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
+ $sql .= "AND wfs_conf_element.f_show = 1 ORDER BY wfs_conf_element.f_respos;";
+ $v = array($wfs_conf_id);
+ $t = array('i');
+
+ $res = db_prep_query($sql,$v,$t);
+ $col = array();
+ while ($row = db_fetch_array($res)) {
+ array_push($col, $row["element_name"]);
+ }
+ if (count($col) == 0) {
+ die("wfs_conf_element data not available");
+ }
+
+ // append authorisation condition to filter
+ $filter = checkAccessConstraint($filter, $wfs_conf_id);
+
+ $admin = new administration();
+
+ $req = urldecode($url).urlencode($admin->char_decode(stripslashes($filter)));
+ $mygml = new gml2();
+ $mygml->parsegml($req);
+
+ // generates JavaScript code that will add a geometry array containing
+ // all the result geometries and their attributes (wfs_conf_elements)
+
+ $js = "";
+ if ($mygml->getMemberCount() > 0) {
+ $js .= $mygml->exportGeometriesToJS(true);
+
+ for ($i = 0; $i < $mygml->getMemberCount(); $i++) {
+ for ($j = 0; $j < count($col); $j++){
+ $js .= "geom.get(".$i.").e.setElement('".$j."', '".$mygml->getValueBySeparatedKey($i, $col[$j]) . "');\n";
+ }
+ }
+ }
+ echo $js;
+}
+else {
+ echo "please enter a valid command.";
+}
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs_result.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_result.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs_result.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,145 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-$filter = stripslashes($_REQUEST["filter"]);
-$url = stripslashes($_REQUEST["url"]);
-$js_wfs_conf_id = $_REQUEST["js_wfs_conf_id"];
-$db_wfs_conf_id = $_REQUEST["db_wfs_conf_id"];
-$typename = $_REQUEST["typename"];
-
-//echo $filter; die();
-require_once("../../conf/mapbender.conf");
-require_once("../classes/class_stripRequest.php");
-require_once("../classes/class_connector.php");
-
-function sepNameSpace($s){
- $c = strpos($s,":");
- if ($c > 0){
- return substr($s,$c+1);
- }
- else{
- return $s;
- }
-}
-
-$wfsRequest = $url . urlencode($filter);
-$connection = new connector($wfsRequest);
-$data = $connection->file;
-if (!$data) die('wfs not available');
-
-$geometries = array('Point', 'Polygon', 'LineString', 'MultiPolygon', 'MultiLineString');
-
-
-//TODO:
-// parsing via class_gml
-// add method toJSON to classGML
-$parser = xml_parser_create();
-xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
-xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
-xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,CHARSET);
-xml_parse_into_struct($parser,$data,$values,$tags);
-xml_parser_free($parser);
-$member = -1;
-$section = false;
-$geom = false;
-$memberHasBeenCreated = false;
-$str = array();
-$geomtype = array();
-$el = -1;
-$fid = -1;
-
-$element_str = "";
-$geom_str = "";
-foreach ($values as $element) {
- if(strtoupper($element[tag]) == strtoupper("gml:featureMember") && $element[type] == "open"){
- $member++;
- $section = true;
- $cnt_geom = 0;
- }
- else if(strtoupper($element[tag]) == strtoupper($typename) && $element[type] == "open") {
- $fid = $element[attributes][fid];
- }
- else if(in_array(sepNameSpace($element[tag]),$geometries) && $element[type] == "open" && $section == true){
- $geom = true;
- if (sepNameSpace($element[tag]) == "MultiLineString") {
- $geom_str .= "geom.addMember(geomType.line);\n";
- $memberHasBeenCreated = true;
- }
- else if (sepNameSpace($element[tag]) == "MultiPolygon" ) {
- $geom_str .= "geom.addMember(geomType.polygon);\n";
- $memberHasBeenCreated = true;
- }
- elseif (sepNameSpace($element[tag]) == "Point") {
- $geom_str .= "geom.addMember(geomType.point);\n";
- $memberHasBeenCreated = true;
- $geom_str .= "geom.get(-1).addGeometry();\n";
- }
- elseif (sepNameSpace($element[tag]) == "LineString") {
- if (!$memberHasBeenCreated) {
- $geom_str .= "geom.addMember(geomType.line);\n";
- $memberHasBeenCreated = true;
- }
- $geom_str .= "geom.get(-1).addGeometry();\n";
- }
- else if (sepNameSpace($element[tag]) == "Polygon" ) {
- if (!$memberHasBeenCreated) {
- $geom_str .= "geom.addMember(geomType.polygon);\n";
- $memberHasBeenCreated = true;
- }
- $geom_str .= "geom.get(-1).addGeometry();\n";
- }
- else {
- $geom_str .= "alert('unknown geomtype ".sepNameSpace($element[tag])."');";
- }
- // TO DO: the following is added twice! Once suffices.
- $element_str .= "geom.get(" . $member . ").e.setElement('fid', '".$fid."');\n";
- $element_str .= "geom.get(" . $member . ").wfs_conf = ".$js_wfs_conf_id.";\n";
- }
- else if(strtoupper($element[tag]) == strtoupper("gml:coordinates") && $geom == true){
- $tmp = str_replace(",,","",str_replace(" ",",",trim($element[value])));
- $geom_str .= "var tmp1 = '".$tmp."';\n";
- $geom_str .= "var tmp = tmp1.split(',');\n";
- $geom_str .= "for (var i = 0 ; i < tmp.length ; i+=2) {\n";
- $geom_str .= "\tgeom.getGeometry(-1,-1).addPointByCoordinates(parseFloat(tmp[i]), parseFloat(tmp[i+1]));\n";
- $geom_str .= "}\n";
- $geom_str .= "geom.close();\n";
- $cnt_geom++;
-
- }
- else if(in_array(sepNameSpace($element[tag]),$geometries) && $element[type] == "close"){
- $geom = false;
- $memberHasBeenCreated = false;
- }
- else if($section == true && $geom == false && $element[value]){
- $el++;
- $str = $element[value];
- $element_str .= "geom.get(" . $member . ").e.setElement('".sepNameSpace($element[tag])."', '".addslashes($str)."');\n";
- }
- else if(strtoupper($element[tag]) == strtoupper("gml:featureMember") && $element[type] == "close"){
- $section = false;
- $el = -1;
- }
-}
-if ($geom_str != "") {
- $geom_str = "var geom = new GeometryArray();\n" . $geom_str;
-}
-header('Content-type: text/html');
-echo $geom_str;
-echo $element_str;
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs_result.php (from rev 2138, branches/2.4.5/http/php/mod_wfs_result.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs_result.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs_result.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,146 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once("../classes/class_stripRequest.php");
+require_once("../classes/class_connector.php");
+
+$filter = stripslashes($_REQUEST["filter"]);
+$url = stripslashes($_REQUEST["url"]);
+$js_wfs_conf_id = $_REQUEST["js_wfs_conf_id"];
+$db_wfs_conf_id = $_REQUEST["db_wfs_conf_id"];
+$typename = $_REQUEST["typename"];
+
+//echo $filter; die();
+
+function sepNameSpace($s){
+ $c = strpos($s,":");
+ if ($c > 0){
+ return substr($s,$c+1);
+ }
+ else{
+ return $s;
+ }
+}
+
+$wfsRequest = $url . urlencode($filter);
+$connection = new connector($wfsRequest);
+$data = $connection->file;
+if (!$data) die('wfs not available');
+
+$geometries = array('Point', 'Polygon', 'LineString', 'MultiPolygon', 'MultiLineString');
+
+
+//TODO:
+// parsing via class_gml
+// add method toJSON to classGML
+$parser = xml_parser_create();
+xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
+xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
+xml_parser_set_option($parser,XML_OPTION_TARGET_ENCODING,CHARSET);
+xml_parse_into_struct($parser,$data,$values,$tags);
+xml_parser_free($parser);
+$member = -1;
+$section = false;
+$geom = false;
+$memberHasBeenCreated = false;
+$str = array();
+$geomtype = array();
+$el = -1;
+$fid = -1;
+
+$element_str = "";
+$geom_str = "";
+foreach ($values as $element) {
+ if(strtoupper($element[tag]) == strtoupper("gml:featureMember") && $element[type] == "open"){
+ $member++;
+ $section = true;
+ $cnt_geom = 0;
+ }
+ else if(strtoupper($element[tag]) == strtoupper($typename) && $element[type] == "open") {
+ $fid = $element[attributes][fid];
+ }
+ else if(in_array(sepNameSpace($element[tag]),$geometries) && $element[type] == "open" && $section == true){
+ $geom = true;
+ if (sepNameSpace($element[tag]) == "MultiLineString") {
+ $geom_str .= "geom.addMember(geomType.line);\n";
+ $memberHasBeenCreated = true;
+ }
+ else if (sepNameSpace($element[tag]) == "MultiPolygon" ) {
+ $geom_str .= "geom.addMember(geomType.polygon);\n";
+ $memberHasBeenCreated = true;
+ }
+ elseif (sepNameSpace($element[tag]) == "Point") {
+ $geom_str .= "geom.addMember(geomType.point);\n";
+ $memberHasBeenCreated = true;
+ $geom_str .= "geom.get(-1).addGeometry();\n";
+ }
+ elseif (sepNameSpace($element[tag]) == "LineString") {
+ if (!$memberHasBeenCreated) {
+ $geom_str .= "geom.addMember(geomType.line);\n";
+ $memberHasBeenCreated = true;
+ }
+ $geom_str .= "geom.get(-1).addGeometry();\n";
+ }
+ else if (sepNameSpace($element[tag]) == "Polygon" ) {
+ if (!$memberHasBeenCreated) {
+ $geom_str .= "geom.addMember(geomType.polygon);\n";
+ $memberHasBeenCreated = true;
+ }
+ $geom_str .= "geom.get(-1).addGeometry();\n";
+ }
+ else {
+ $geom_str .= "alert('unknown geomtype ".sepNameSpace($element[tag])."');";
+ }
+ // TO DO: the following is added twice! Once suffices.
+ $element_str .= "geom.get(" . $member . ").e.setElement('fid', '".$fid."');\n";
+ $element_str .= "geom.get(" . $member . ").wfs_conf = ".$js_wfs_conf_id.";\n";
+ }
+ else if(strtoupper($element[tag]) == strtoupper("gml:coordinates") && $geom == true){
+ $tmp = str_replace(",,","",str_replace(" ",",",trim($element[value])));
+ $geom_str .= "var tmp1 = '".$tmp."';\n";
+ $geom_str .= "var tmp = tmp1.split(',');\n";
+ $geom_str .= "for (var i = 0 ; i < tmp.length ; i+=2) {\n";
+ $geom_str .= "\tgeom.getGeometry(-1,-1).addPointByCoordinates(parseFloat(tmp[i]), parseFloat(tmp[i+1]));\n";
+ $geom_str .= "}\n";
+ $geom_str .= "geom.close();\n";
+ $cnt_geom++;
+
+ }
+ else if(in_array(sepNameSpace($element[tag]),$geometries) && $element[type] == "close"){
+ $geom = false;
+ $memberHasBeenCreated = false;
+ }
+ else if($section == true && $geom == false && $element[value]){
+ $el++;
+ $str = $element[value];
+ $element_str .= "geom.get(" . $member . ").e.setElement('".sepNameSpace($element[tag])."', '".addslashes($str)."');\n";
+ }
+ else if(strtoupper($element[tag]) == strtoupper("gml:featureMember") && $element[type] == "close"){
+ $section = false;
+ $el = -1;
+ }
+}
+if ($geom_str != "") {
+ $geom_str = "var geom = new GeometryArray();\n" . $geom_str;
+}
+header('Content-type: text/html');
+echo $geom_str;
+echo $element_str;
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfs_save.php
===================================================================
--- branches/2.4.5/http/php/mod_wfs_save.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfs_save.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,153 +0,0 @@
-<html>
-<head>
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>WFS Save</title>
-<script language='JavaScript' type='text/javascript'>
-var my = window.opener.parent.frames.wfs_conf.wfs_conf;
-var dig = window.opener.parent.frames.digitize;
-var w;
-function sepNameSpace(n){
- var c = n.indexOf(":");
- if(c>0){
- var temp = n.split(":");
- return temp[1];
- }
- else{
- return n;
- }
-}
-function init(){
- for(var i=0; i<my.length; i++){
- N = new Option(my[i]['wfs_conf_abstract'],i,false,false);
- document.forms[0].thema.options[document.forms[0].thema.length] = N;
- }
-}
-function validate(obj){
- var ind = obj.selectedIndex;
- if(ind == 0){return;}
- w = obj[ind].value;
-
- var str = "<table>";
- for(var i=0; i< my[w]['element'].length; i++){
- if(my[w]['element'][i]['f_geom'] != '1'){
- str += "<tr>";
- str += "<td>" + my[w]['element'][i]['element_name'] + "</td>";
- str += "<td><input name='"+my[w]['element'][i]['element_name']+"' type='text'></td>";
- str += "<tr>";
- }
- }
- str += "</table>";
- str += "<input type='submit' value='save'>"
- document.getElementById("a").innerHTML = str;
-}
-function set(){
- document.forms[1].url.value = my[w]['wfs_transaction'];
- var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">';
- str += '<wfs:Insert>';
- str += '<'+ sepNameSpace(my[w]['featuretype_name'])+'>';
- for(var i=0; i<document.forms[0].elements.length; i++){
- if(document.forms[0].elements[i].type == 'text' && document.forms[0].elements[i].value != ''){
- var tmp = sepNameSpace(document.forms[0].elements[i].name);
- str += '<' + tmp + '>';
- str += document.forms[0].elements[i].value;
- str += '</' + tmp + '>';
- }
- }
-
- for(var j=0; j<my[w]['element'].length; j++){
- if(my[w]['element'][j]['f_geom'] == 1){
- var el_geom = my[w]['element'][j]['element_name'];
- }
- }
- str += '<' + el_geom + '>';
-
- if(dig.D[0].type == 'text'){
- str += '<gml:Point srsName="epsg:4326">';
- str += '<gml:coordinates>';
- str += dig.D[0].x[0] + "," + dig.D[0].y[0];
- str += '</gml:coordinates>';
- str += '</gml:Point>';
- }
- if(dig.D[0].type == 'line'){
- str += '<gml:MultiLineString srsName="epsg:4326">';
- str += '<gml:lineStringMember>';
- str += '<gml:LineString>';
-
- str += '<gml:coordinates>';
- for(var k=0; k<dig.D[0].x.length; k++){
- if(k>0){
- str += " ";
- }
- str += dig.D[0].x[k] + "," + dig.D[0].y[k];
- }
- str += '</gml:coordinates>';
- str += '</gml:LineString>';
- str += '</gml:lineStringMember>';
- str += '</gml:MultiLineString>';
- }
- if(dig.D[0].type == 'polygon'){
- str += '<gml:MultiPolygon srsName="epsg:4326">';
- str += '<gml:polygonMember>';
- str += '<gml:Polygon>';
- str += '<gml:outerBoundaryIs>';
- str += '<gml:LinearRing>';
-
- str += '<gml:coordinates>';
- for(var k=0; k<dig.D[0].x.length; k++){
- if(k>0){
- str += " ";
- }
- str += dig.D[0].x[k] + "," + dig.D[0].y[k];
- }
- str += '</gml:coordinates>';
- str += '</gml:LinearRing>';
- str += '</gml:outerBoundaryIs>';
- str += '</gml:Polygon>';
- str += '</gml:polygonMember>';
- str += '</gml:MultiPolygon>';
- }
- str += '</' + el_geom + '>';
- str += '</'+ sepNameSpace(my[w]['featuretype_name'])+'>';
- str += '</wfs:Insert>';
- str += '</wfs:Transaction>';
- document.forms[1].filter.value = str;
- document.forms[1].submit();
- return false;
-}
-</script>
-</head>
-<body onload='init()'>
-<form onsubmit='return set()'>
-<select name='thema' onchange='validate(this)'>
-<option value=''>WFS...</option>
-</select><br>
-<div id='a' name='a'></div>
-</form>
-
-<form action='../extensions/geom2wfst.php' method='POST'>
-<input type='text' name='url'>
-<input type='text' name='filter'>
-</form>
-</body>
-</html>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfs_save.php (from rev 2138, branches/2.4.5/http/php/mod_wfs_save.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfs_save.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfs_save.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,155 @@
+<html>
+<head>
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>WFS Save</title>
+<script language='JavaScript' type='text/javascript'>
+var my = window.opener.parent.frames.wfs_conf.wfs_conf;
+var dig = window.opener.parent.frames.digitize;
+var w;
+function sepNameSpace(n){
+ var c = n.indexOf(":");
+ if(c>0){
+ var temp = n.split(":");
+ return temp[1];
+ }
+ else{
+ return n;
+ }
+}
+function init(){
+ for(var i=0; i<my.length; i++){
+ N = new Option(my[i]['wfs_conf_abstract'],i,false,false);
+ document.forms[0].thema.options[document.forms[0].thema.length] = N;
+ }
+}
+function validate(obj){
+ var ind = obj.selectedIndex;
+ if(ind == 0){return;}
+ w = obj[ind].value;
+
+ var str = "<table>";
+ for(var i=0; i< my[w]['element'].length; i++){
+ if(my[w]['element'][i]['f_geom'] != '1'){
+ str += "<tr>";
+ str += "<td>" + my[w]['element'][i]['element_name'] + "</td>";
+ str += "<td><input name='"+my[w]['element'][i]['element_name']+"' type='text'></td>";
+ str += "<tr>";
+ }
+ }
+ str += "</table>";
+ str += "<input type='submit' value='save'>"
+ document.getElementById("a").innerHTML = str;
+}
+function set(){
+ document.forms[1].url.value = my[w]['wfs_transaction'];
+ var str = '<wfs:Transaction version="1.0.0" service="WFS" xmlns="http://www.someserver.com/myns" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:wfs="http://www.opengis.net/wfs" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://schemas.opengis.net/wfs/1.0.0/WFS-transaction.xsd">';
+ str += '<wfs:Insert>';
+ str += '<'+ sepNameSpace(my[w]['featuretype_name'])+'>';
+ for(var i=0; i<document.forms[0].elements.length; i++){
+ if(document.forms[0].elements[i].type == 'text' && document.forms[0].elements[i].value != ''){
+ var tmp = sepNameSpace(document.forms[0].elements[i].name);
+ str += '<' + tmp + '>';
+ str += document.forms[0].elements[i].value;
+ str += '</' + tmp + '>';
+ }
+ }
+
+ for(var j=0; j<my[w]['element'].length; j++){
+ if(my[w]['element'][j]['f_geom'] == 1){
+ var el_geom = my[w]['element'][j]['element_name'];
+ }
+ }
+ str += '<' + el_geom + '>';
+
+ if(dig.D[0].type == 'text'){
+ str += '<gml:Point srsName="epsg:4326">';
+ str += '<gml:coordinates>';
+ str += dig.D[0].x[0] + "," + dig.D[0].y[0];
+ str += '</gml:coordinates>';
+ str += '</gml:Point>';
+ }
+ if(dig.D[0].type == 'line'){
+ str += '<gml:MultiLineString srsName="epsg:4326">';
+ str += '<gml:lineStringMember>';
+ str += '<gml:LineString>';
+
+ str += '<gml:coordinates>';
+ for(var k=0; k<dig.D[0].x.length; k++){
+ if(k>0){
+ str += " ";
+ }
+ str += dig.D[0].x[k] + "," + dig.D[0].y[k];
+ }
+ str += '</gml:coordinates>';
+ str += '</gml:LineString>';
+ str += '</gml:lineStringMember>';
+ str += '</gml:MultiLineString>';
+ }
+ if(dig.D[0].type == 'polygon'){
+ str += '<gml:MultiPolygon srsName="epsg:4326">';
+ str += '<gml:polygonMember>';
+ str += '<gml:Polygon>';
+ str += '<gml:outerBoundaryIs>';
+ str += '<gml:LinearRing>';
+
+ str += '<gml:coordinates>';
+ for(var k=0; k<dig.D[0].x.length; k++){
+ if(k>0){
+ str += " ";
+ }
+ str += dig.D[0].x[k] + "," + dig.D[0].y[k];
+ }
+ str += '</gml:coordinates>';
+ str += '</gml:LinearRing>';
+ str += '</gml:outerBoundaryIs>';
+ str += '</gml:Polygon>';
+ str += '</gml:polygonMember>';
+ str += '</gml:MultiPolygon>';
+ }
+ str += '</' + el_geom + '>';
+ str += '</'+ sepNameSpace(my[w]['featuretype_name'])+'>';
+ str += '</wfs:Insert>';
+ str += '</wfs:Transaction>';
+ document.forms[1].filter.value = str;
+ document.forms[1].submit();
+ return false;
+}
+</script>
+</head>
+<body onload='init()'>
+<form onsubmit='return set()'>
+<select name='thema' onchange='validate(this)'>
+<option value=''>WFS...</option>
+</select><br>
+<div id='a' name='a'></div>
+</form>
+
+<form action='../extensions/geom2wfst.php<?php echo $urlParameters;?>' method='POST'>
+<input type='text' name='url'>
+<input type='text' name='filter'>
+</form>
+</body>
+</html>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_wfsrequest.php
===================================================================
--- branches/2.4.5/http/php/mod_wfsrequest.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_wfsrequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,98 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db($DB,$con);
-if(isset($_REQUEST["backlink"]) && $_REQUEST["backlink"] == 'parent'){
- $p = 'parent';
-}else{
- $p = "parent.frames[\"".$_REQUEST["frame"]."\"]";
-}
-
-/* wfs_conf */
-$sql = "SELECT * FROM wfs_conf ";
-$sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
-$sql .= "WHERE wfs_conf.wfs_conf_id = $1";
-
-$v = array($_REQUEST['wfs_conf_id']);
-$t = array("i");
-$res = db_prep_query($sql, $v, $t);
-if($row = db_fetch_array($res)){
- $g_res_style = $row["g_res_style"];
-
-}else{die("wfs_conf data not available");}
-
-/* wfs_conf_element */
-$sql = "SELECT * FROM wfs_conf_element ";
-$sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
-$sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
-$sql .= "AND wfs_conf_element.f_show = 1 ORDER BY wfs_conf_element.f_respos;";
-$v = array($_REQUEST['wfs_conf_id']);
-$t = array("i");
-$res = db_prep_query($sql, $v, $t);
-$col = array();
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $col[$cnt] = $row["element_name"];
- $cnt++;
-}
-if($cnt == 0){die("wfs_conf_element data not available");}
-
-$req = urldecode($_REQUEST["url"]).urlencode(stripslashes($_REQUEST["filter"]));
-#echo $req; die;
-
-$gml = 'off';
-if(isset($_REQUEST['gml'])){
- $gml = $_REQUEST['gml'];
-}
-if($gml == 'on'){
- header("Location: ".$req);
-}
-else{
- echo "<html><head><style type='text/css'>".$g_res_style."</style></head><body>";
- include(dirname(__FILE__)."/../classes/class_gml2.php");
- $mygml = new gml2();
- $mygml->parsegml($req);
- $c = $mygml->getMemberCount();
- for($i=0; $i<$c; $i++){
- echo "<div style='cursor:pointer;' ";
- if(fmod($i,2) == 0){
- echo "class='even'";
- }
- else{
- echo "class='uneven'";
- }
- $mygeom = implode(":",$mygml->getGeometriesFromMember($i));
- $geomtype = $mygml->getGeometryTypeFromMember($i);
- echo " onmouseover='".$p.".setResult(\"".$geomtype."\",\"over\",\"".$mygeom."\")' ";
- echo " onmouseout='".$p.".setResult(\"".$geomtype."\",\"out\",\"false\")' ";
- echo " onclick='".$p.".setResult(\"".$geomtype."\",\"click\",\"".$mygeom."\")'>";
- for($j=0; $j<count($col); $j++){
- echo $mygml->getValueBySeparatedKey($i,$col[$j]) . " ";
- }
- echo "</div>";
-
- }
-if($i == 0){ echo "Kein Ergebnis...";}
- echo "</body></html>";
-}
-
-
-?>
\ No newline at end of file
Copied: branches/2.4.5_rc1/http/php/mod_wfsrequest.php (from rev 2138, branches/2.4.5/http/php/mod_wfsrequest.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_wfsrequest.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_wfsrequest.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,100 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db($DB,$con);
+
+if(isset($_REQUEST["backlink"]) && $_REQUEST["backlink"] == 'parent'){
+ $p = 'parent';
+}else{
+ $p = "parent.frames[\"".$_REQUEST["frame"]."\"]";
+}
+
+/* wfs_conf */
+$sql = "SELECT * FROM wfs_conf ";
+$sql .= "JOIN wfs ON wfs_conf.fkey_wfs_id = wfs.wfs_id ";
+$sql .= "WHERE wfs_conf.wfs_conf_id = $1";
+
+$v = array($_REQUEST['wfs_conf_id']);
+$t = array("i");
+$res = db_prep_query($sql, $v, $t);
+if($row = db_fetch_array($res)){
+ $g_res_style = $row["g_res_style"];
+
+}else{die("wfs_conf data not available");}
+
+/* wfs_conf_element */
+$sql = "SELECT * FROM wfs_conf_element ";
+$sql .= "JOIN wfs_element ON wfs_conf_element.f_id = wfs_element.element_id ";
+$sql .= "WHERE wfs_conf_element.fkey_wfs_conf_id = $1 ";
+$sql .= "AND wfs_conf_element.f_show = 1 ORDER BY wfs_conf_element.f_respos;";
+$v = array($_REQUEST['wfs_conf_id']);
+$t = array("i");
+$res = db_prep_query($sql, $v, $t);
+$col = array();
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $col[$cnt] = $row["element_name"];
+ $cnt++;
+}
+if($cnt == 0){die("wfs_conf_element data not available");}
+
+$req = urldecode($_REQUEST["url"]).urlencode(stripslashes($_REQUEST["filter"]));
+#echo $req; die;
+
+$gml = 'off';
+if(isset($_REQUEST['gml'])){
+ $gml = $_REQUEST['gml'];
+}
+if($gml == 'on'){
+ header("Location: ".$req);
+}
+else{
+ echo "<html><head><style type='text/css'>".$g_res_style."</style></head><body>";
+ include(dirname(__FILE__)."/../classes/class_gml2.php");
+ $mygml = new gml2();
+ $mygml->parsegml($req);
+ $c = $mygml->getMemberCount();
+ for($i=0; $i<$c; $i++){
+ echo "<div style='cursor:pointer;' ";
+ if(fmod($i,2) == 0){
+ echo "class='even'";
+ }
+ else{
+ echo "class='uneven'";
+ }
+ $mygeom = implode(":",$mygml->getGeometriesFromMember($i));
+ $geomtype = $mygml->getGeometryTypeFromMember($i);
+ echo " onmouseover='".$p.".setResult(\"".$geomtype."\",\"over\",\"".$mygeom."\")' ";
+ echo " onmouseout='".$p.".setResult(\"".$geomtype."\",\"out\",\"false\")' ";
+ echo " onclick='".$p.".setResult(\"".$geomtype."\",\"click\",\"".$mygeom."\")'>";
+ for($j=0; $j<count($col); $j++){
+ echo $mygml->getValueBySeparatedKey($i,$col[$j]) . " ";
+ }
+ echo "</div>";
+
+ }
+if($i == 0){ echo "Kein Ergebnis...";}
+ echo "</body></html>";
+}
+
+
+?>
\ No newline at end of file
Deleted: branches/2.4.5_rc1/http/php/mod_zoomCoords.php
===================================================================
--- branches/2.4.5/http/php/mod_zoomCoords.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_zoomCoords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,160 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-import_request_variables("PG");
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Zoom to Coordinate</title>
-<?php
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-
-include '../include/dyn_css.php';
-?>
-<style type="text/css">
- <!--
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size: 11px;
- }
- .labelx{
- position: absolute;
- left: 5px;
- top:5px;
- color: Gray;
- }
- .labely{
- position: absolute;
- left: 90px;
- top:5px;
- color: Gray;
- }
- .textx{
- position: absolute;
- left:5px;
- top:20px;
- color: Gray;
- width:70px;
- border: solid thin;
- height:20px;
- }
- .texty{
- position: absolute;
- left:90px;
- top:20px;
- color: Gray;
- width:70px;
- border: solid thin;
- height:20px;
- }
- .send{
- position: absolute;
- left:177px;
- top:20px;
- color: Gray;
- border: solid thin;
- height:20px;
- width:30px;
- }
- -->
-</style>
-<?php
-
-$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1 ";
-$v = array($_SESSION["mb_user_gui"]);
-$t = array('s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-
-echo '<script type="text/javascript">';
-if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
-
-echo "var mod_zoomCoords_target = '".$e_target."';";
-echo "var target = mod_zoomCoords_target.split(',')";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-function zoomCoordinate(){
- var coordx = document.form1.X.value;
- var coordy = document.form1.Y.value;
- coordx = coordx.replace(",",".");
- coordy = coordy.replace(",",".");
- var valid = true;
- setPermanentMarker(coordx,coordy);
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
- parent.zoom(target[0],true, 1.0,coordx,coordy);
-}
-
-function highlight(x, y){
- x=x.replace(",",".");
- y=y.replace(",",".");
- document.form1.X.value=x;
- document.form1.Y.value=y;
- if (isNaN(x)==true || isNaN(y)==true){
- }
- else{
- parent.mb_showHighlight(target[0],x,y);
- parent.mb_showHighlight(target[1],x,y);
- }
-}
-
-function hideHighlight(){
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
-}
-
-function setPermanentMarker(x,y){
- parent.mod_permanentHighlight_x = parseFloat(x);
- parent.mod_permanentHighlight_y = parseFloat(y);
-}
-// -->
-</script>
-</head>
-<body bgcolor='#ffffff' onload=''>
-
-<?php
-# needs intl'!
- echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
- echo "<span class='labelx'>Länge:</span>";
- echo "<span class='labely'>Breite:</span>";
- echo "<input class='textx' type='text' name='X'>";
- echo "<input class='texty' type='text' name='Y'>";
- echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
-?>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_zoomCoords.php (from rev 2138, branches/2.4.5/http/php/mod_zoomCoords.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_zoomCoords.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_zoomCoords.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,158 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+import_request_variables("PG");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Zoom to Coordinate</title>
+<?php
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+
+include '../include/dyn_css.php';
+?>
+<style type="text/css">
+ <!--
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ }
+ .labelx{
+ position: absolute;
+ left: 5px;
+ top:5px;
+ color: Gray;
+ }
+ .labely{
+ position: absolute;
+ left: 90px;
+ top:5px;
+ color: Gray;
+ }
+ .textx{
+ position: absolute;
+ left:5px;
+ top:20px;
+ color: Gray;
+ width:70px;
+ border: solid thin;
+ height:20px;
+ }
+ .texty{
+ position: absolute;
+ left:90px;
+ top:20px;
+ color: Gray;
+ width:70px;
+ border: solid thin;
+ height:20px;
+ }
+ .send{
+ position: absolute;
+ left:177px;
+ top:20px;
+ color: Gray;
+ border: solid thin;
+ height:20px;
+ width:30px;
+ }
+ -->
+</style>
+<?php
+
+$sql = "SELECT e_target FROM gui_element WHERE e_id = 'zoomCoords' AND fkey_gui_id = $1 ";
+$v = array($_SESSION["mb_user_gui"]);
+$t = array('s');
+$res = db_prep_query($sql,$v,$t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+
+echo '<script type="text/javascript">';
+if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
+
+echo "var mod_zoomCoords_target = '".$e_target."';";
+echo "var target = mod_zoomCoords_target.split(',')";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+function zoomCoordinate(){
+ var coordx = document.form1.X.value;
+ var coordy = document.form1.Y.value;
+ coordx = coordx.replace(",",".");
+ coordy = coordy.replace(",",".");
+ var valid = true;
+ setPermanentMarker(coordx,coordy);
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+ parent.zoom(target[0],true, 1.0,coordx,coordy);
+}
+
+function highlight(x, y){
+ x=x.replace(",",".");
+ y=y.replace(",",".");
+ document.form1.X.value=x;
+ document.form1.Y.value=y;
+ if (isNaN(x)==true || isNaN(y)==true){
+ }
+ else{
+ parent.mb_showHighlight(target[0],x,y);
+ parent.mb_showHighlight(target[1],x,y);
+ }
+}
+
+function hideHighlight(){
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+}
+
+function setPermanentMarker(x,y){
+ parent.mod_permanentHighlight_x = parseFloat(x);
+ parent.mod_permanentHighlight_y = parseFloat(y);
+}
+// -->
+</script>
+</head>
+<body bgcolor='#ffffff' onload=''>
+
+<?php
+# needs intl'!
+ echo "<form name='form1' action='" . $self ."' method='post'>";
+ echo "<span class='labelx'>Länge:</span>";
+ echo "<span class='labely'>Breite:</span>";
+ echo "<input class='textx' type='text' name='X'>";
+ echo "<input class='texty' type='text' name='Y'>";
+ echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
+?>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php
===================================================================
--- branches/2.4.5/http/php/mod_zoomCoords_en.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,200 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-import_request_variables("PG");
-
-require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
-
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Zoom to Coordinate</title>
-<style type="text/css">
- <!--
-
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size: 11px;
- }
- .labelx{
- position: absolute;
- left: 5px;
- top:5px;
- color: Gray;
- }
- .labely{
- position: absolute;
- left: 90px;
- top:5px;
- color: Gray;
- }
- .textx{
- position: absolute;
- left:5px;
- top:20px;
- color: Gray;
- width:70px;
- border: solid thin;
- height:20px;
- }
- .texty{
- position: absolute;
- left:90px;
- top:20px;
- color: Gray;
- width:70px;
- border: solid thin;
- height:20px;
- }
- .send{
- position: absolute;
- left:177px;
- top:20px;
- color: Gray;
- border: solid thin;
- height:20px;
- width:30px;
- }
- -->
-</style>
-<?php
-$gui_id = $_SESSION["mb_user_gui"];
-$e_id_css = $_REQUEST["elementID"];
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-$sql = "SELECT e_target FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
-$v = array($e_id_css,$gui_id);
-$t = array('s','s');
-$res = db_prep_query($sql,$v,$t);
-$cnt = 0;
-while($row = db_fetch_array($res)){
- $e_target = $row["e_target"];
- $cnt++;
-}
-
-echo '<script type="text/javascript">';
-if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
-
-echo "var mod_zoomCoords_target = '".$e_target."';";
-echo "var target = mod_zoomCoords_target.split(',');";
-
-
-include(dirname(__FILE__)."/../include/dyn_js.php");
-
-?>
-try{
- if (zoomCoords_permanentHighlight){}
-}
-catch(e){
- zoomCoords_permanentHighlight = 'false';
-}
-
-
-function zoomCoordinate(){
- var coordx = document.form1.X.value;
- var coordy = document.form1.Y.value;
- coordx = coordx.replace(",",".");
- coordy = coordy.replace(",",".");
- var valid = true;
-
- /* if(parseFloat(coordx) < 5.88 || parseFloat(coordx) > 15){
- alert("Eingabe unzulässig!");
- document.form1.X.select();
- document.form1.X.focus();
- valid = false;
- return false;
- }
- if(parseFloat(coordy) < 46.62 || parseFloat(coordy) > 55.71){
- alert("Eingabe unzulässig!");
- document.form1.Y.select();
- document.form1.Y.focus();
- valid = false;
- return false;
- } */
-
- if(zoomCoords_permanentHighlight =='true'){
- setPermanentMarker(coordx,coordy);
- }
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
- parent.zoom(target[0],true, 1.0,coordx,coordy);
-
-}
-
-function highlight(x, y){
-
- x=x.replace(",",".");
- y=y.replace(",",".");
-
- document.form1.X.value=x;
- document.form1.Y.value=y;
-
- if (isNaN(x)==true || isNaN(y)==true){
-
- }
- else{
- parent.mb_showHighlight(target[0],x,y);
- parent.mb_showHighlight(target[1],x,y);
- }
-}
-
-function hideHighlight(){
- parent.mb_hideHighlight(target[0]);
- parent.mb_hideHighlight(target[1]);
-}
-
-function setPermanentMarker(x,y){
- parent.mod_permanentHighlight_x = parseFloat(x);
- parent.mod_permanentHighlight_y = parseFloat(y);
- parent.mod_permanentHighlight_text = x + ' / '+ y;
- //alert('setPermanentMarker'+ parseFloat(x) + parseFloat(y));
-
- parent.mod_permanentHighlight_init();
-}
-// -->
-</script>
-</head>
-<body bgcolor='#ffffff' onload=''>
-
-<?php
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
-#coordinates
-
- #deutsche Version
- echo "<span class='labelx'>X-Coordinate:</span>";
- echo "<span class='labely'>Y-Coordinate:</span>";
- echo "<input class='textx' type='text' name='X'>";
- echo "<input class='texty' type='text' name='Y'>";
- echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
-
-?>
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php (from rev 2138, branches/2.4.5/http/php/mod_zoomCoords_en.php)
===================================================================
--- branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php (rev 0)
+++ branches/2.4.5_rc1/http/php/mod_zoomCoords_en.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,197 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+
+import_request_variables("PG");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Zoom to Coordinate</title>
+<style type="text/css">
+ <!--
+
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size: 11px;
+ }
+ .labelx{
+ position: absolute;
+ left: 5px;
+ top:5px;
+ color: Gray;
+ }
+ .labely{
+ position: absolute;
+ left: 90px;
+ top:5px;
+ color: Gray;
+ }
+ .textx{
+ position: absolute;
+ left:5px;
+ top:20px;
+ color: Gray;
+ width:70px;
+ border: solid thin;
+ height:20px;
+ }
+ .texty{
+ position: absolute;
+ left:90px;
+ top:20px;
+ color: Gray;
+ width:70px;
+ border: solid thin;
+ height:20px;
+ }
+ .send{
+ position: absolute;
+ left:177px;
+ top:20px;
+ color: Gray;
+ border: solid thin;
+ height:20px;
+ width:30px;
+ }
+ -->
+</style>
+<?php
+$gui_id = $_SESSION["mb_user_gui"];
+$e_id_css = $_REQUEST["elementID"];
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+$sql = "SELECT e_target FROM gui_element WHERE e_id = $1 AND fkey_gui_id = $2";
+$v = array($e_id_css,$gui_id);
+$t = array('s','s');
+$res = db_prep_query($sql,$v,$t);
+$cnt = 0;
+while($row = db_fetch_array($res)){
+ $e_target = $row["e_target"];
+ $cnt++;
+}
+
+echo '<script type="text/javascript">';
+if($cnt > 1){ echo "alert('zoomCoords: ID not unique!');";}
+
+echo "var mod_zoomCoords_target = '".$e_target."';";
+echo "var target = mod_zoomCoords_target.split(',');";
+
+
+include(dirname(__FILE__)."/../include/dyn_js.php");
+
+?>
+try{
+ if (zoomCoords_permanentHighlight){}
+}
+catch(e){
+ zoomCoords_permanentHighlight = 'false';
+}
+
+
+function zoomCoordinate(){
+ var coordx = document.form1.X.value;
+ var coordy = document.form1.Y.value;
+ coordx = coordx.replace(",",".");
+ coordy = coordy.replace(",",".");
+ var valid = true;
+
+ /* if(parseFloat(coordx) < 5.88 || parseFloat(coordx) > 15){
+ alert("Eingabe unzul�ssig!");
+ document.form1.X.select();
+ document.form1.X.focus();
+ valid = false;
+ return false;
+ }
+ if(parseFloat(coordy) < 46.62 || parseFloat(coordy) > 55.71){
+ alert("Eingabe unzul�ssig!");
+ document.form1.Y.select();
+ document.form1.Y.focus();
+ valid = false;
+ return false;
+ } */
+
+ if(zoomCoords_permanentHighlight =='true'){
+ setPermanentMarker(coordx,coordy);
+ }
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+ parent.zoom(target[0],true, 1.0,coordx,coordy);
+
+}
+
+function highlight(x, y){
+
+ x=x.replace(",",".");
+ y=y.replace(",",".");
+
+ document.form1.X.value=x;
+ document.form1.Y.value=y;
+
+ if (isNaN(x)==true || isNaN(y)==true){
+
+ }
+ else{
+ parent.mb_showHighlight(target[0],x,y);
+ parent.mb_showHighlight(target[1],x,y);
+ }
+}
+
+function hideHighlight(){
+ parent.mb_hideHighlight(target[0]);
+ parent.mb_hideHighlight(target[1]);
+}
+
+function setPermanentMarker(x,y){
+ parent.mod_permanentHighlight_x = parseFloat(x);
+ parent.mod_permanentHighlight_y = parseFloat(y);
+ parent.mod_permanentHighlight_text = x + ' / '+ y;
+ //alert('setPermanentMarker'+ parseFloat(x) + parseFloat(y));
+
+ parent.mod_permanentHighlight_init();
+}
+// -->
+</script>
+</head>
+<body bgcolor='#ffffff' onload=''>
+
+<?php
+echo "<form name='form1' action='" . $self."' method='post'>";
+#coordinates
+
+ #deutsche Version
+ echo "<span class='labelx'>X-Coordinate:</span>";
+ echo "<span class='labely'>Y-Coordinate:</span>";
+ echo "<input class='textx' type='text' name='X'>";
+ echo "<input class='texty' type='text' name='Y'>";
+ echo "<input class='send' type='button' value='ok' onclick='zoomCoordinate();' onmouseover='highlight(document.form1.X.value, document.form1.Y.value)' onmouseout='hideHighlight(document.form1.X.value, document.form1.Y.value)' >";
+
+?>
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/php/nestedSets.php
===================================================================
--- branches/2.4.5/http/php/nestedSets.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/php/nestedSets.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,410 +0,0 @@
-<?php
-# $Id$
-# http://www.mapbender.org/index.php/Administration
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-import_request_variables("PG");
-require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
-$con = db_connect($DBSERVER,$OWNER,$PW);
-db_select_db(DB,$con);
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>nestedSets</title>
-<?php
-include '../include/dyn_css.php';
-?>
-
-<style type="text/css">
- <!--
- input{
- width: 164px;
- }
- body{
- font-family : Arial, Helvetica, sans-serif;
- font-size: 12px;
- }
- -->
-</style>
-</head>
-<!-- <link rel='stylesheet' type='text/css' href='administration.css'> -->
-<script type="text/javascript">
-<!--
-function validate(value){
- var permission = true;
- if(value == 'insert'){
- /*
- if(document.forms[0].title.value == ''){alert("Bitte geben Sie einen Titel an."); permission = false; return;}
- if(document.forms[0].left.value == ''){alert("W�hlen Sie eine Position."); permission = false; return;}
- */
- if(document.forms[0].title.value == ''){alert("Please insert a title."); permission = false; return;}
- if(document.forms[0].left.value == ''){alert("Please choose a position."); permission = false; return;}
-
- if(document.forms[0].wmsList.selectedIndex > 0 && document.forms[0].layer.selectedIndex == 0){alert("W�hlen Sie einen Layer."); permission = false; return;}
- if(permission == true){document.forms[0].action.value = "insert"; document.forms[0].submit();}
- }
- if(value == 'delete'){
- //permission = confirm("Soll das Objekt mit Inhalten gel�scht werden?");
- permission = confirm("Do you want to delete the object and the content of the object?");
- if(permission == true){
- document.forms[0].action.value = "delete";
- document.forms[0].submit();
- }
- }
- if(value == 'update'){
- /*
- if(document.forms[0].title.value == ''){alert("Bitte geben Sie einen Titel an."); permission = false; return;}
- if(document.forms[0].left.value == ''){alert("Bitte w�hlen Sie eine Position."); permission = false; return;}
- */
-
- if(document.forms[0].title.value == ''){alert("Please fill in a labeling."); permission = false; return;}
- if(document.forms[0].left.value == ''){alert("Please choose a position."); permission = false; return;}
-
- if(permission == true){document.forms[0].action.value = "update"; document.forms[0].submit();}
- }
- if(value == 'add'){
- /*
- if(document.forms[0].left.value == ''){alert("Bitte w�hlen Sie eine Position."); permission = false; return;}
- if(document.forms[0].guiList.selectedIndex == 0){alert("Bitte w�hlen Sie eine GUI."); permission = false; return;}
- if(document.forms[0].wmsList.selectedIndex == 0){alert("Bitte w�hlen Sie einen WMS."); permission = false; return;}
- if(document.forms[0].layer.selectedIndex == 0){alert("Bitte w�hlen Sie eine Ebene."); permission = false; return;}
- */
-
- if(document.forms[0].left.value == ''){alert("Please fill in a position."); permission = false; return;}
- if(document.forms[0].guiList.selectedIndex == 0){alert("Please choose a GUI."); permission = false; return;}
- if(document.forms[0].wmsList.selectedIndex == 0){alert("Please choose a WMS."); permission = false; return;}
- if(document.forms[0].layer.selectedIndex == 0){alert("Please choose a layer."); permission = false; return;}
-
- if(permission == true){document.forms[0].action.value = "add"; document.forms[0].submit();}
- }
-}
-function rmWMS(obj){
- if(obj.value == ''){
- document.forms[0].wmsList.selectedIndex = 0;
- }
-}
-// -->
-</script>
-<body >
-<?php
-
-if(isset($action)){
- if($layer == 'Ordner'){$layer = "";}
-}
-if(isset($action) && $action == "insert"){
- $temp = explode("###", $layer);
- $sql = "SELECT rgt FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $1";
- $v = array($left, $guiList);
- $t = array("i", "s");
- $res = db_prep_query($sql, $v, $t);
- if($pos == 'in'){$left = $left + 1;}
- else if($pos == 'hinter'){$left = db_result($res,0,"rgt") + 1;}
- else{ $left = $left + 2;}
-
- $sql = "UPDATE gui_treegde SET rgt=rgt+2 WHERE rgt >= $1 AND fkey_gui_id = $2";
- $v = array($left, $guiList);
- $t = array("i", "s");
- db_prep_query($sql, $v, $t);
-
- $sql = "UPDATE gui_treegde SET lft=lft+2 WHERE lft >= $1 AND fkey_gui_id = $2";
- $v = array($left, $guiList);
- $t = array("i", "s");
- db_prep_query($sql, $v, $t);
-
- $sql = "INSERT INTO gui_treegde(fkey_gui_id, fkey_layer_id, lft,rgt, ";
- $sql .= "my_layer_title, layer, wms_id) VALUES($1, $2, $3, $4, $5, $6, $7)";
- #echo $sql . "<br>";
- $v = array($guiList, $temp[0], $left, ($left+1), $name, $temp[1], $wmsList);
- $t = array("s", "s", "i", "i", "s", "s", "s");
- db_prep_query($sql, $v, $t);
-
- /*
- if($layer == ""){
- $left = $left + 1;
- $sql = "UPDATE gui_treegde SET rgt=rgt+2 WHERE rgt >=". $left." AND fkey_gui_id = '".$guiList."'";
- db_query($sql);
- $sql = "UPDATE gui_treegde SET lft=lft+2 WHERE lft >=".$left." AND fkey_gui_id = '".$guiList."'";
- db_query($sql);
- #hier ist noch was falsch
- $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES('".$guiList."','new',".$left.",".($left+1).",'new')";
- echo $sql . "<br />";
- db_query($sql);
- }
- */
-}
-if(isset($action) && $action == "delete"){
- if($left){
- $sql = "SELECT rgt FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $2";
- $v = array($left, $guiList);
- $t = array("i", "s");
- $res = db_prep_query($sql, $v, $t);
- $right = db_result($res,0,"rgt");
-
- $sql = "DELETE FROM gui_treegde WHERE lft BETWEEN $1 and $2 AND fkey_gui_id = $3";
- $v = array($left, $right, $guiList);
- $t = array("i", "i", "s");
- db_prep_query($sql, $v, $t);
-
- $sql = "UPDATE gui_treegde SET lft=lft-(($1 - $2 + 1)) WHERE lft > $3 AND fkey_gui_id = $4";
- $v = array($right, $left, $right, $guiList);
- $t = array("i", "i", "i", "s");
- db_prep_query($sql, $v, $t);
-
- $sql = "UPDATE gui_treegde SET rgt=rgt-(($1 - $2 + 1)) WHERE rgt > $3 AND fkey_gui_id = $4";
- $v = array($right, $left, $right, $guiList);
- $t = array("i", "i", "i", "s");
- db_prep_query($sql, $v, $t);
- }
-}
-if(isset($action) && $action == "update"){
- $temp = explode("###", $layer);
- $sql = "UPDATE gui_treegde SET ";
- $sql .= "my_layer_title = $1, ";
- $sql .= "fkey_layer_id = $2, ";
- $sql .= "layer = $3, ";
- $sql .= "wms_id = $4";
- $sql .= " WHERE lft = $5 AND fkey_gui_id = $6";
- $v = array($name, $temp[0], $temp[1], $wmsList, $left, $guiList);
- $t = array("s", "s", "s", "s", "i", "s");
- db_prep_query($sql, $v, $t);
-}
-if(isset($action) && $action == "add"){
- $temp = explode("###", $layer);
-
- $sql_val = "SELECT * FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $2";
- $v = array($left, $guiList);
- $t = array("i", "s");
- $res = db_prep_query($sql_val, $v, $t);
-
- $sql = "UPDATE gui_treegde SET ";
- $sql .= "fkey_layer_id = $1, layer = $2, wms_id = $3 ";
- $sql .= "WHERE lft = $4 AND fkey_gui_id = $5";
-
- $v = array();
- $t = array("s", "s", "s", "i", "s");
-
- if (db_result($res_val, 0, "fkey_layer_id") != '') {
- array_push($v, db_result($res_val, 0, "fkey_layer_id") . "," . $temp[0]);
- }
- else {
- array_push($v, $temp[0]);
- }
-
- if (db_result($res_val, 0, "layer") != '') {
- array_push($v, db_result($res_val, 0, "layer") . "," . $temp[1]);
- }
- else {
- array_push($v, $temp[1]);
- }
-
- if (db_result($res_val, 0, "wms_id") != '') {
- array_push($v, db_result($res_val, 0, "wms_id") . "," . $wmsList);
- }
- else {
- array_push($v, $wmsList);
- }
-
- array_push($v, $left);
- array_push($v, $guiList);
- db_prep_query($sql, $v, $t);
-}
-?>
-<br />
-<b>Create your own tree for your GUI. Include the element treeconfGDE to see this tree</b><br />
-Find detailed infos in the (<a href='http://www.mapbender.org/index.php/ConfTreeGde' target='_blank'>Mapbender Wiki</a>)<br />
-1. Select the GUI you want to create the new tree for <br />
-2. Select an element in the folder view<br />
-<br />
-<br />
-<!-- -->
-<?php
-if(isset($guiList) && $guiList != ""){
- echo "<iframe ID='foldertree' name='foldertree' height='400' width='300' src='mod_treefolderAdmin.php?guiList=".$guiList."' scrolling='auto' frameborder='1'></iframe>";
-}
-else{
- echo "<iframe ID='foldertree' name='foldertree' height='400' width='300' src='../html/mod_blank.html' scrolling='auto' frameborder='1'></iframe>";
-}
-?>
-
-<div style='position:absolute;top:50px;left:350px'>
-<form action='<?php $PHP_SELF ?>' method='POST'>
-<br><br>
-<table >
-<tr><td></td><td></td></tr>
-<?php
-require_once(dirname(__FILE__)."/../classes/class_administration.php");
-$admin = new administration();
-$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
-
-$sql = "SELECT * FROM gui WHERE gui_id IN (";
-$v = $ownguis;
-$t = array();
-for ($i = 1; $i <= count($ownguis); $i++){
- if ($i > 1) {
- $sql .= ",";
- }
- $sql .= "$" . $i;
- array_push($t, "s");
-}
-$sql .= ") ORDER BY gui_name";
-
-$res = db_prep_query($sql, $v, $t);
-$cnt = 0;
-echo "<select class='guiList' size='10' name='guiList' class='guiList' onchange='document.forms[0].submit()'>";
-echo "<option value=''>GUI ...</option>";
-while($row = db_fetch_array($res)){
- echo "<option value='".$row["gui_id"]."' ";
- if(isset($guiList) && $guiList == $row["gui_id"]){
- echo "selected";
- }
- echo ">".$row["gui_name"]."</option>";
- $cnt++;
-}
-echo "</select><br>";
-echo "<tr>";
- #echo "<td>Beschriftung:</td>";
- echo "<td>Labeling:</td>";
- echo "<td><input type='text' size='16' name='name' value='";
- echo $name;
- echo "'></td>";
-echo "</tr>";
-?>
-<tr>
-<td>WMS: </td>
-<td>
- <select name='wmsList' onchange='document.forms[0].submit()'>
- <option value=''>WMS ...</option>
- <?php
- if(isset($guiList) && $guiList != ""){
- $sql = "SELECT gui_wms.fkey_wms_id, wms.wms_title FROM gui_wms ";
- $sql .= "INNER JOIN wms ON gui_wms.fkey_wms_id = wms.wms_id ";
- $sql .= "WHERE gui_wms.fkey_gui_id = $1 ";
- $sql .= "ORDER BY wms.wms_title";
- $v = array($guiList);
- $t = array("s");
- $res = db_prep_query($sql, $v, $t);
- $cnt = 0;
- while($row = db_fetch_array($res)){
- echo "<option value='".$row["fkey_wms_id"]."' ";
- if($wmsList == $row["fkey_wms_id"]){
- echo "selected";
- }
- echo ">";
- echo $row["wms_title"];
- echo "</option>";
- $cnt++;
- }
- }
-
- else{echo "<option value=''>no gui selected</option>";}
- echo"</select>";
- echo"</td> </tr><tr>";
- #echo"<td>Ordner oder Ebene: </td>";
- echo"<td>Folder or Layer: </td>";
- echo"<td>";
- echo"<select name='layer' onchange='rmWMS(this)'>";
- #echo"<option value=''>Ordner</option>";
- echo"<option value=''>Folder</option>";
- if(isset($wmsList) && $wmsList != ""){
- $sql_l = "SELECT gui_layer.fkey_layer_id, layer.layer_name, layer.layer_title FROM gui_layer ";
- $sql_l .= "LEFT JOIN layer ON gui_layer.fkey_layer_id = layer.layer_id ";
- $sql_l .= "WHERE gui_layer.gui_layer_wms_id = $1 AND layer.layer_parent = '0' AND gui_layer.fkey_gui_id = $2";
- $sql_l .= " ORDER BY layer.layer_title";
- $v = array($wmsList, $guiList);
- $t = array("i", "s");
- $res_l = db_prep_query($sql_l, $v, $t);
- $cnt = 0;
- while($row = db_fetch_array($res_l)){
- echo "<option value='".$row["fkey_layer_id"]."###".$row["layer_name"]."'>";
- echo $row["layer_title"];
- echo "</option>";
- $cnt++;
- }
- }
- ?>
- </select>
-</td>
-</tr>
-<tr>
- <td>Position: </td>
- <td>
- <select name='pos'>
-<?php
- #echo "<option value='hinter'>hinter</option>";
- echo "<option value='hinter'>behind</option>";
- echo "<option value='in' ";
- if($pos == 'in'){
- echo "selected";
- }
- echo ">in</option>";
- echo"</select> </td> </tr><tr>";
- #echo"<td>Hinter bzw. in Element Nr.:</td>";
- echo"<td>Insert behind or <br>in element with number:</td>";
- echo "<td><input type='text' size='1' name='left' ";
- if($left)
- {
- echo "value='".$left."'";
- }
- echo "></td>";
-?>
-</tr>
-<tr>
- <td>
- <!--<input class='abutton' type='button' name="insert" value='einfügen' onclick="validate('insert')"></td>
- -->
- <input class='abutton' type='button' name="insert" value='create new element' onclick="validate('insert')"></td>
- <td></td>
-</tr>
-<tr>
- <td>
- <!--
- <input class='abutton' type='button' name="delete" value='löschen' onclick="validate('delete')"></td>
- -->
- <input class='abutton' type='button' name="delete" value='delete element' onclick="validate('delete')"></td>
- <td></td>
-</tr>
-<tr>
- <td>
- <!--
- <input class='abutton' type='button' name="update" value='&amlndern' onclick="validate('update')"></td>
- -->
- <input class='abutton' type='button' name="update" value='change element' onclick="validate('update')"></td>
- <td></td>
-</tr>
-<tr>
- <td>
- <!--
- <input class='abutton' type='button' name="update" value='Ebene verbinden' onclick="validate('add')"></td>
- -->
- <input class='abutton' type='button' name="update" value='join layer' onclick="validate('add')"></td>
- <td></td>
-</tr>
-<input type='hidden' name="action">
-</table>
-</form>
-</div>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/php/nestedSets.php (from rev 2209, branches/2.4.5/http/php/nestedSets.php)
===================================================================
--- branches/2.4.5_rc1/http/php/nestedSets.php (rev 0)
+++ branches/2.4.5_rc1/http/php/nestedSets.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,406 @@
+<?php
+# $Id$
+# http://www.mapbender.org/index.php/Administration
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+import_request_variables("PG");
+require_once(dirname(__FILE__)."/../php/mb_validatePermission.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>nestedSets</title>
+<?php
+include '../include/dyn_css.php';
+?>
+
+<style type="text/css">
+ <!--
+ input{
+ width: 164px;
+ }
+ body{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size: 12px;
+ }
+ -->
+</style>
+</head>
+<!-- <link rel='stylesheet' type='text/css' href='administration.css'> -->
+<script type="text/javascript">
+<!--
+function validate(value){
+ var permission = true;
+ if(value == 'insert'){
+ /*
+ if(document.forms[0].title.value == ''){alert("Bitte geben Sie einen Titel an."); permission = false; return;}
+ if(document.forms[0].left.value == ''){alert("W�hlen Sie eine Position."); permission = false; return;}
+ */
+ if(document.forms[0].title.value == ''){alert("Please insert a title."); permission = false; return;}
+ if(document.forms[0].left.value == ''){alert("Please choose a position."); permission = false; return;}
+
+ if(document.forms[0].wmsList.selectedIndex > 0 && document.forms[0].layer.selectedIndex == 0){alert("W�hlen Sie einen Layer."); permission = false; return;}
+ if(permission == true){document.forms[0].action.value = "insert"; document.forms[0].submit();}
+ }
+ if(value == 'delete'){
+ //permission = confirm("Soll das Objekt mit Inhalten gel�scht werden?");
+ permission = confirm("Do you want to delete the object and the content of the object?");
+ if(permission == true){
+ document.forms[0].action.value = "delete";
+ document.forms[0].submit();
+ }
+ }
+ if(value == 'update'){
+ /*
+ if(document.forms[0].title.value == ''){alert("Bitte geben Sie einen Titel an."); permission = false; return;}
+ if(document.forms[0].left.value == ''){alert("Bitte w�hlen Sie eine Position."); permission = false; return;}
+ */
+
+ if(document.forms[0].title.value == ''){alert("Please fill in a labeling."); permission = false; return;}
+ if(document.forms[0].left.value == ''){alert("Please choose a position."); permission = false; return;}
+
+ if(permission == true){document.forms[0].action.value = "update"; document.forms[0].submit();}
+ }
+ if(value == 'add'){
+ /*
+ if(document.forms[0].left.value == ''){alert("Bitte w�hlen Sie eine Position."); permission = false; return;}
+ if(document.forms[0].guiList.selectedIndex == 0){alert("Bitte w�hlen Sie eine GUI."); permission = false; return;}
+ if(document.forms[0].wmsList.selectedIndex == 0){alert("Bitte w�hlen Sie einen WMS."); permission = false; return;}
+ if(document.forms[0].layer.selectedIndex == 0){alert("Bitte w�hlen Sie eine Ebene."); permission = false; return;}
+ */
+
+ if(document.forms[0].left.value == ''){alert("Please fill in a position."); permission = false; return;}
+ if(document.forms[0].guiList.selectedIndex == 0){alert("Please choose a GUI."); permission = false; return;}
+ if(document.forms[0].wmsList.selectedIndex == 0){alert("Please choose a WMS."); permission = false; return;}
+ if(document.forms[0].layer.selectedIndex == 0){alert("Please choose a layer."); permission = false; return;}
+
+ if(permission == true){document.forms[0].action.value = "add"; document.forms[0].submit();}
+ }
+}
+function rmWMS(obj){
+ if(obj.value == ''){
+ document.forms[0].wmsList.selectedIndex = 0;
+ }
+}
+// -->
+</script>
+<body >
+<?php
+
+if(isset($action)){
+ if($layer == 'Ordner'){$layer = "";}
+}
+if(isset($action) && $action == "insert"){
+ $temp = explode("###", $layer);
+ $sql = "SELECT rgt FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $1";
+ $v = array($left, $guiList);
+ $t = array("i", "s");
+ $res = db_prep_query($sql, $v, $t);
+ if($pos == 'in'){$left = $left + 1;}
+ else if($pos == 'hinter'){$left = db_result($res,0,"rgt") + 1;}
+ else{ $left = $left + 2;}
+
+ $sql = "UPDATE gui_treegde SET rgt=rgt+2 WHERE rgt >= $1 AND fkey_gui_id = $2";
+ $v = array($left, $guiList);
+ $t = array("i", "s");
+ db_prep_query($sql, $v, $t);
+
+ $sql = "UPDATE gui_treegde SET lft=lft+2 WHERE lft >= $1 AND fkey_gui_id = $2";
+ $v = array($left, $guiList);
+ $t = array("i", "s");
+ db_prep_query($sql, $v, $t);
+
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id, fkey_layer_id, lft,rgt, ";
+ $sql .= "my_layer_title, layer, wms_id) VALUES($1, $2, $3, $4, $5, $6, $7)";
+ #echo $sql . "<br>";
+ $v = array($guiList, $temp[0], $left, ($left+1), $name, $temp[1], $wmsList);
+ $t = array("s", "s", "i", "i", "s", "s", "s");
+ db_prep_query($sql, $v, $t);
+
+ /*
+ if($layer == ""){
+ $left = $left + 1;
+ $sql = "UPDATE gui_treegde SET rgt=rgt+2 WHERE rgt >=". $left." AND fkey_gui_id = '".$guiList."'";
+ db_query($sql);
+ $sql = "UPDATE gui_treegde SET lft=lft+2 WHERE lft >=".$left." AND fkey_gui_id = '".$guiList."'";
+ db_query($sql);
+ #hier ist noch was falsch
+ $sql = "INSERT INTO gui_treegde(fkey_gui_id,my_layer_title,lft,rgt,layer) VALUES('".$guiList."','new',".$left.",".($left+1).",'new')";
+ echo $sql . "<br />";
+ db_query($sql);
+ }
+ */
+}
+if(isset($action) && $action == "delete"){
+ if($left){
+ $sql = "SELECT rgt FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $2";
+ $v = array($left, $guiList);
+ $t = array("i", "s");
+ $res = db_prep_query($sql, $v, $t);
+ $right = db_result($res,0,"rgt");
+
+ $sql = "DELETE FROM gui_treegde WHERE lft BETWEEN $1 and $2 AND fkey_gui_id = $3";
+ $v = array($left, $right, $guiList);
+ $t = array("i", "i", "s");
+ db_prep_query($sql, $v, $t);
+
+ $sql = "UPDATE gui_treegde SET lft=lft-(($1 - $2 + 1)) WHERE lft > $3 AND fkey_gui_id = $4";
+ $v = array($right, $left, $right, $guiList);
+ $t = array("i", "i", "i", "s");
+ db_prep_query($sql, $v, $t);
+
+ $sql = "UPDATE gui_treegde SET rgt=rgt-(($1 - $2 + 1)) WHERE rgt > $3 AND fkey_gui_id = $4";
+ $v = array($right, $left, $right, $guiList);
+ $t = array("i", "i", "i", "s");
+ db_prep_query($sql, $v, $t);
+ }
+}
+if(isset($action) && $action == "update"){
+ $temp = explode("###", $layer);
+ $sql = "UPDATE gui_treegde SET ";
+ $sql .= "my_layer_title = $1, ";
+ $sql .= "fkey_layer_id = $2, ";
+ $sql .= "layer = $3, ";
+ $sql .= "wms_id = $4";
+ $sql .= " WHERE lft = $5 AND fkey_gui_id = $6";
+ $v = array($name, $temp[0], $temp[1], $wmsList, $left, $guiList);
+ $t = array("s", "s", "s", "s", "i", "s");
+ db_prep_query($sql, $v, $t);
+}
+if(isset($action) && $action == "add"){
+ $temp = explode("###", $layer);
+
+ $sql_val = "SELECT * FROM gui_treegde WHERE lft = $1 AND fkey_gui_id = $2";
+ $v = array($left, $guiList);
+ $t = array("i", "s");
+ $res = db_prep_query($sql_val, $v, $t);
+
+ $sql = "UPDATE gui_treegde SET ";
+ $sql .= "fkey_layer_id = $1, layer = $2, wms_id = $3 ";
+ $sql .= "WHERE lft = $4 AND fkey_gui_id = $5";
+
+ $v = array();
+ $t = array("s", "s", "s", "i", "s");
+
+ if (db_result($res_val, 0, "fkey_layer_id") != '') {
+ array_push($v, db_result($res_val, 0, "fkey_layer_id") . "," . $temp[0]);
+ }
+ else {
+ array_push($v, $temp[0]);
+ }
+
+ if (db_result($res_val, 0, "layer") != '') {
+ array_push($v, db_result($res_val, 0, "layer") . "," . $temp[1]);
+ }
+ else {
+ array_push($v, $temp[1]);
+ }
+
+ if (db_result($res_val, 0, "wms_id") != '') {
+ array_push($v, db_result($res_val, 0, "wms_id") . "," . $wmsList);
+ }
+ else {
+ array_push($v, $wmsList);
+ }
+
+ array_push($v, $left);
+ array_push($v, $guiList);
+ db_prep_query($sql, $v, $t);
+}
+?>
+<br />
+<b>Create your own tree for your GUI. Include the element treeconfGDE to see this tree</b><br />
+Find detailed infos in the (<a href='http://www.mapbender.org/index.php/ConfTreeGde' target='_blank'>Mapbender Wiki</a>)<br />
+1. Select the GUI you want to create the new tree for <br />
+2. Select an element in the folder view<br />
+<br />
+<br />
+<!-- -->
+<?php
+if(isset($guiList) && $guiList != ""){
+ echo "<iframe ID='foldertree' name='foldertree' height='400' width='300' src='mod_treefolderAdmin.php?guiList=".$guiList."' scrolling='auto' frameborder='1'></iframe>";
+}
+else{
+ echo "<iframe ID='foldertree' name='foldertree' height='400' width='300' src='../html/mod_blank.html' scrolling='auto' frameborder='1'></iframe>";
+}
+?>
+
+<div style='position:absolute;top:50px;left:350px'>
+<form action='<?php echo $self; ?>' method='POST'>
+<br><br>
+<table >
+<tr><td></td><td></td></tr>
+<?php
+require_once(dirname(__FILE__)."/../classes/class_administration.php");
+$admin = new administration();
+$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"],true);
+
+$sql = "SELECT * FROM gui WHERE gui_id IN (";
+$v = $ownguis;
+$t = array();
+for ($i = 1; $i <= count($ownguis); $i++){
+ if ($i > 1) {
+ $sql .= ",";
+ }
+ $sql .= "$" . $i;
+ array_push($t, "s");
+}
+$sql .= ") ORDER BY gui_name";
+
+$res = db_prep_query($sql, $v, $t);
+$cnt = 0;
+echo "<select class='guiList' size='10' name='guiList' class='guiList' onchange='document.forms[0].submit()'>";
+echo "<option value=''>GUI ...</option>";
+while($row = db_fetch_array($res)){
+ echo "<option value='".$row["gui_id"]."' ";
+ if(isset($guiList) && $guiList == $row["gui_id"]){
+ echo "selected";
+ }
+ echo ">".$row["gui_name"]."</option>";
+ $cnt++;
+}
+echo "</select><br>";
+echo "<tr>";
+ #echo "<td>Beschriftung:</td>";
+ echo "<td>Labeling:</td>";
+ echo "<td><input type='text' size='16' name='name' value='";
+ echo $name;
+ echo "'></td>";
+echo "</tr>";
+?>
+<tr>
+<td>WMS: </td>
+<td>
+ <select name='wmsList' onchange='document.forms[0].submit()'>
+ <option value=''>WMS ...</option>
+ <?php
+ if(isset($guiList) && $guiList != ""){
+ $sql = "SELECT gui_wms.fkey_wms_id, wms.wms_title FROM gui_wms ";
+ $sql .= "INNER JOIN wms ON gui_wms.fkey_wms_id = wms.wms_id ";
+ $sql .= "WHERE gui_wms.fkey_gui_id = $1 ";
+ $sql .= "ORDER BY wms.wms_title";
+ $v = array($guiList);
+ $t = array("s");
+ $res = db_prep_query($sql, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res)){
+ echo "<option value='".$row["fkey_wms_id"]."' ";
+ if($wmsList == $row["fkey_wms_id"]){
+ echo "selected";
+ }
+ echo ">";
+ echo $row["wms_title"];
+ echo "</option>";
+ $cnt++;
+ }
+ }
+
+ else{echo "<option value=''>no gui selected</option>";}
+ echo"</select>";
+ echo"</td> </tr><tr>";
+ #echo"<td>Ordner oder Ebene: </td>";
+ echo"<td>Folder or Layer: </td>";
+ echo"<td>";
+ echo"<select name='layer' onchange='rmWMS(this)'>";
+ #echo"<option value=''>Ordner</option>";
+ echo"<option value=''>Folder</option>";
+ if(isset($wmsList) && $wmsList != ""){
+ $sql_l = "SELECT gui_layer.fkey_layer_id, layer.layer_name, layer.layer_title FROM gui_layer ";
+ $sql_l .= "LEFT JOIN layer ON gui_layer.fkey_layer_id = layer.layer_id ";
+ $sql_l .= "WHERE gui_layer.gui_layer_wms_id = $1 AND layer.layer_parent = '0' AND gui_layer.fkey_gui_id = $2";
+ $sql_l .= " ORDER BY layer.layer_title";
+ $v = array($wmsList, $guiList);
+ $t = array("i", "s");
+ $res_l = db_prep_query($sql_l, $v, $t);
+ $cnt = 0;
+ while($row = db_fetch_array($res_l)){
+ echo "<option value='".$row["fkey_layer_id"]."###".$row["layer_name"]."'>";
+ echo $row["layer_title"];
+ echo "</option>";
+ $cnt++;
+ }
+ }
+ ?>
+ </select>
+</td>
+</tr>
+<tr>
+ <td>Position: </td>
+ <td>
+ <select name='pos'>
+<?php
+ #echo "<option value='hinter'>hinter</option>";
+ echo "<option value='hinter'>behind</option>";
+ echo "<option value='in' ";
+ if($pos == 'in'){
+ echo "selected";
+ }
+ echo ">in</option>";
+ echo"</select> </td> </tr><tr>";
+ #echo"<td>Hinter bzw. in Element Nr.:</td>";
+ echo"<td>Insert behind or <br>in element with number:</td>";
+ echo "<td><input type='text' size='1' name='left' ";
+ if($left)
+ {
+ echo "value='".$left."'";
+ }
+ echo "></td>";
+?>
+</tr>
+<tr>
+ <td>
+ <!--<input class='abutton' type='button' name="insert" value='einfügen' onclick="validate('insert')"></td>
+ -->
+ <input class='abutton' type='button' name="insert" value='create new element' onclick="validate('insert')"></td>
+ <td></td>
+</tr>
+<tr>
+ <td>
+ <!--
+ <input class='abutton' type='button' name="delete" value='löschen' onclick="validate('delete')"></td>
+ -->
+ <input class='abutton' type='button' name="delete" value='delete element' onclick="validate('delete')"></td>
+ <td></td>
+</tr>
+<tr>
+ <td>
+ <!--
+ <input class='abutton' type='button' name="update" value='&amlndern' onclick="validate('update')"></td>
+ -->
+ <input class='abutton' type='button' name="update" value='change element' onclick="validate('update')"></td>
+ <td></td>
+</tr>
+<tr>
+ <td>
+ <!--
+ <input class='abutton' type='button' name="update" value='Ebene verbinden' onclick="validate('add')"></td>
+ -->
+ <input class='abutton' type='button' name="update" value='join layer' onclick="validate('add')"></td>
+ <td></td>
+</tr>
+<input type='hidden' name="action">
+</table>
+</form>
+</div>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/print/mod_printPDF.php
===================================================================
--- branches/2.4.5/http/print/mod_printPDF.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/print/mod_printPDF.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,425 +0,0 @@
-<?php
-# $Id: mod_printPDF.php
-# http://www.mapbender.org/index.php/mod_printPDF.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-session_start();
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-?>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-
-<html>
-<head>
-<meta http-equiv="cache-control" content="no-cache">
-<meta http-equiv="pragma" content="no-cache">
-<meta http-equiv="expires" content="0">
-<?php
-echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
-?>
-<title>Print PDF</title>
-</head>
-<style type="text/css">
-<!--
-select{
- width:150px;
-}
-input{
- width:150px;
-}
-.mycheck{
- width:15px;
-}
-div{
- font-family : Arial, Helvetica, sans-serif;
- font-size: 12px;
-}
--->
-</style>
-<?php
-
-
-require_once(dirname(__FILE__)."/../print/".$_REQUEST["conf"]);
-echo "<script type='text/javascript'>";
-echo "var target = '".$_REQUEST["target"]."';";
-echo "var comment = '".$label_comment."';";
-echo "var comment_length = ".$comment_length.";";
-echo "var label_button = '".$label_button."';";
-echo "var type = '".$type."';";
-echo "</script>";
-?>
-<script type="text/javascript">
-<!--
-
-
-var size;
-var format;
-var map_width;
-var map_height;
-
-if(type=='window'){
- var pt = window.opener;
-}
-else if(type == 'iframe'){
- var pt = parent;
-}
-
-function mod_legend_print(){
- var mod_legend_target = target;
- var ind = pt.getMapObjIndexByName(mod_legend_target);
- var layers;
-
- document.forms[0].layers.value = "";
- document.forms[0].wms_id.value = "";
- document.forms[0].wms_title.value = "";
- document.forms[0].legendurl.value = "";
-
-
-
- for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
- if(pt.mb_mapObj[ind].wms[i].gui_wms_visible != 0){
- layers = pt.mb_checkScale(mod_legend_target,ind,i);
- var layer = layers[0].split(",");
- var title = layers[2].split(",");
- var temp_legendurl = layers[3].split(",");
- var layerparent= layers[4].split(",");
-
- if( pt.mb_mapObj[ind].layers[i] != "" && pt.mb_mapObj[ind].layers[i]){
-
- if(i>0 && document.forms[0].wms_id.value!=''){
- document.forms[0].layers.value += "___";
- document.forms[0].wms_id.value += "___";
- document.forms[0].wms_title.value += "___";
- document.forms[0].legendurl.value += "___";
- }
-
- //document.forms[0].layers.value += pt.mb_mapObj[ind].wms[i].objLayer[ii].layer_title; //pt.mb_mapObj[ind].layers[i] ;
-
- document.forms[0].wms_id.value += pt.mb_mapObj[ind].wms[i].wms_id;
- document.forms[0].wms_title.value += pt.mb_mapObj[ind].wms[i].wms_title;
-
- //---------- legendurl ----------
- tmp_name = "";
- for(var j=0; j<layer.length; j++){
- if(layerparent[j] == 0){
- if(j>0){
- document.forms[0].layers.value += ",";
- }
-
- var l = pt.mb_getchildsbyname(ind,i,layer[j]);
-
- if (l) {
- document.forms[0].layers.value += title[j];
-
- if(j>0){
- document.forms[0].legendurl.value += ",";
- }
- for (var k=0; k<l["name"].length; k++){
- if (tmp_name != l["title"][k]) {
- document.forms[0].layers.value += "*"
- if(k>0){
- document.forms[0].legendurl.value += "*";
- }else{
- document.forms[0].legendurl.value += '1*';
- }
-
- if (l["legendurl"][k] != '' || !l["legendurl"][k]==true){
- document.forms[0].layers.value += l["name"][k];
- document.forms[0].legendurl.value += l["legendurl"][k];
- }else{
- document.forms[0].layers.value += '0';
- document.forms[0].legendurl.value += '0';
- }
- tmp_name = l["title"][k];
- } // if
- } // for var k=0
-
- } // if (l)
- else{
- //prompt (!temp_legendurl[j] ,temp_legendurl[j] + !temp_legendurl[j]);
-
- document.forms[0].layers.value += title[j];
- if(j>0){
- document.forms[0].legendurl.value += ",";
- }
- if (temp_legendurl[j]!= '' || !temp_legendurl[j] == 'true'){
- document.forms[0].legendurl.value += temp_legendurl[j];
- }else{
- document.forms[0].legendurl.value +='0';
- }
-
- }// else (l)
- }//check parent==0
- }//for var j=0
-
- //-------------------
-
- //document.forms[0].legendurl.value += layers[3];
-
- } else{
- if(i>0 && document.forms[0].wms_id.value!=''){
- document.forms[0].layers.value += "___";
- document.forms[0].wms_id.value += "___";
- document.forms[0].wms_title.value += "___";
- document.forms[0].legendurl.value += "___";
- }
-
- document.forms[0].layers.value += "0";
- document.forms[0].wms_id.value += "0";
- document.forms[0].wms_title.value += "0";
- document.forms[0].legendurl.value += "0";
- }
- }//if
- }//for
-}
-
-function validate(){
- size = document.form1.size.options[document.form1.size.selectedIndex].value;
- format = document.form1.format.options[document.form1.format.selectedIndex].value;
- if(size != "" && format != ""){
- var ind = pt.getMapObjIndexByName(target);
- var coord = pt.mb_mapObj[ind].extent.split(",");
- var centerX = parseFloat(coord[0]) + (parseFloat(coord[2]) - parseFloat(coord[0]))/2
- var centerY = parseFloat(coord[1]) + (parseFloat(coord[3]) - parseFloat(coord[1]))/2
- if(size == "A4" && format == "portrait"){
- map_width = <?php echo $a4p_map_width; ?>;
- map_height = <?php echo $a4p_map_height; ?>;
- }
- if(size == "A4" && format == "landscape"){
- map_width = <?php echo $a4l_map_width; ?>;
- map_height = <?php echo $a4l_map_height; ?>;
- }
- if(size == "A3" && format == "portrait"){
- map_width = <?php echo $a3p_map_width; ?>;
- map_height = <?php echo $a3p_map_height; ?>;
- }
- if(size == "A3" && format == "landscape"){
- map_width = <?php echo $a3l_map_width; ?>;
- map_height = <?php echo $a3l_map_height; ?>;
- }
- if(size == "A2" && format == "portrait"){
- map_width = <?php echo $a2p_map_width; ?>;
- map_height = <?php echo $a2p_map_height; ?>;
- }
- if(size == "A2" && format == "landscape"){
- map_width = <?php echo $a2l_map_width; ?>;
- map_height = <?php echo $a2l_map_height; ?>;
- }
- if(size == "A1" && format == "portrait"){
- map_width = <?php echo $a1p_map_width; ?>;
- map_height = <?php echo $a1p_map_height; ?>;
- }
- if(size == "A1" && format == "landscape"){
- map_width = <?php echo $a1l_map_width; ?>;
- map_height = <?php echo $a1l_map_height; ?>;
- }
- if(size == "A0" && format == "portrait"){
- map_width = <?php echo $a0p_map_width; ?>;
- map_height = <?php echo $a0p_map_height; ?>;
- }
- if(size == "A0" && format == "landscape"){
- map_width = <?php echo $a0l_map_width; ?>;
- map_height = <?php echo $a0l_map_height; ?>;
- }
- var pos = pt.makeClickPos2RealWorldPos(target, map_width , map_height);
- pt.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
-
- pt.mb_mapObj[ind].width = Math.round(map_width);
- pt.mb_mapObj[ind].height = Math.round(map_height);
- pt.document.getElementById(target).style.width = Math.round(map_width);
- pt.document.getElementById(target).style.height = Math.round(map_height);
- pt.window.frames[target].document.getElementById("maps").style.width = Math.round(map_width);
- pt.window.frames[target].document.getElementById("maps").style.height = Math.round(map_height);
-
- //pt.setMapRequest(target);
- pt.mb_repaintScale(target, null, null, pt.mb_getScale(target));
- document.form1.map_url.value = '';
- for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
- if(pt.mb_mapObj[ind].wms[i].gui_wms_visible > 0){
- if(pt.mb_mapObj[ind].wms[i].mapURL != false && pt.mb_mapObj[ind].wms[i].mapURL != 'false' && pt.mb_mapObj[ind].wms[i].mapURL != ''){
- if(document.form1.map_url.value != ""){
- document.form1.map_url.value += "___";
- }
- document.form1.map_url.value += pt.mb_mapObj[ind].wms[i].mapURL;
- }
- }
- }
-
- //overview_url
- var ind_overview = pt.getMapObjIndexByName('overview');
-
- //alert ("länge: " + length+ " - " + ind_overview + name + pt.mb_mapObj[ind_overview].wms.length);
- if(pt.mb_mapObj[ind_overview].mapURL != false ){
- document.forms[0].overview_url.value = pt.mb_mapObj[ind_overview].mapURL;
- }
- }
-}
-function refreshParams(){
- var ind = pt.getMapObjIndexByName(target);
- var f = document.form1;
- f.map_url.value = "";
- for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
- if(pt.mb_mapObj[ind].wms[i].gui_wms_visible > 0){
- if(pt.mb_mapObj[ind].wms[i].mapURL != false && pt.mb_mapObj[ind].wms[i].mapURL != 'false' && pt.mb_mapObj[ind].wms[i].mapURL != ''){
- if(f.map_url.value != ""){
- f.map_url.value += "___";
- }
- f.map_url.value += pt.mb_mapObj[ind].wms[i].mapURL;
- }
- }
- }
- f.map_scale.value = pt.mb_getScale(target);
- f.epsg.value = pt.mb_mapObj[ind].epsg;
- mod_legend_print();
-}
-function printMap(){
- if(size != "" && (format == "portrait" || format == "landscape")){
- refreshParams();
- if(document.form1.c1.value != comment){
- document.form1.comment1.value = document.form1.c1.value;
- }
- if(document.form1.c2.value != comment){
- document.form1.comment2.value = document.form1.c2.value;
- }
- if(document.form1.mylegendcheckbox.checked == 0){
- document.form1.mylegend.value = 'false';
- }else{
- document.form1.mylegend.value = 'true';
- }
-
- // write the measured coordinates
-
- if (pt.mod_measure_RX != undefined && pt.mod_measure_RY != undefined) {
- var tmp_x = '';
- var tmp_y = '';
- for(i = 0; i<pt.mod_measure_RX.length; i++) {
- if(tmp_x != '') {
- tmp_x += ','
- }
- tmp_x += pt.mod_measure_RX[i];
- }
- for(i = 0; i<pt.mod_measure_RY.length; i++) {
- if(tmp_y != '') {
- tmp_y += ','
- }
- tmp_y += pt.mod_measure_RY[i];
- }
- document.forms['form1'].elements['measured_x_values'].value = tmp_x;
- document.forms['form1'].elements['measured_y_values'].value = tmp_y;
- }
-
- document.form1.submit();
- }
- else{
- alert("Das Format ist noch nicht ausgewählt.");
- }
-}
-function valCom(obj){
- if(obj.value.length > comment_length){
- obj.value = obj.value.substr(0,comment_length);
- }
-}
-// -->
-</script>
-<body>
-<form name='form1' method='POST' action='../print/mod_printPDF_pdf.php?<?php echo SID; ?>' target="_blank">
-<table border='0'>
-<tr>
- <td>
- <select name='size' onchange='validate()'>
-<?php
- if($a4 == true && $a3 == true){
- echo "<option value=''>".$label_format."</option>";
- }
- if($a4 == true){
- echo "<option value='A4'>".$label_format_a4."</option>";
- }
- if($a3 == true){
- echo "<option value='A3'>".$label_format_a3."</option>";
- }
- if($a2 == true){
- echo "<option value='A2'>".$label_format_a2."</option>";
- }
- if($a1 == true){
- echo "<option value='A1'>".$label_format_a1."</option>";
- }
- if($a0 == true){
- echo "<option value='A0'>".$label_format_a0."</option>";
- }
-?>
- </select>
- </td>
-</tr>
-<tr>
- <td>
- <select name='format' onchange='validate()'>
- <option value=''><?php echo $label_orientation; ?></option>
- <option value='portrait'><?php echo $label_portrait; ?></option>
- <option value='landscape'><?php echo $label_landscape; ?></option>
- </select>
- </td>
-</tr>
-<?php
-if($highquality == true){
- echo "<tr>";
- echo "<td>";
- echo "<select name='quality'>";
- echo "<option value='1'>".$label_72dpi."</option>";
- echo "<option value='2'>".$label_288dpi."</option>";
- echo "</select>";
- echo "</td>";
- echo "</tr>";
-}
-?>
-<tr>
- <td>
- <input type='text' name='c1' value='<?php echo $label_comment; ?>' onkeydown="valCom(this)">
- </td>
-</tr>
-<tr>
- <td>
- <input type='text' name='c2' value='<?php echo $label_comment; ?>' onkeydown="valCom(this)">
- </td>
-</tr>
-<?php
-if($legend == true){
- echo "<tr>";
- echo "<td>";
- echo "<div><input type='checkbox' class='mycheck' name='mylegendcheckbox' value='false'>".$label_legend."</div>";
- echo "</td>";
- echo "</tr>";
-}
-?>
-<table>
-<input type='hidden' name='map_url' value=''>
-<input type='hidden' name='overview_url' value=''>
-<input type='hidden' name='wms_title' value=''>
-<input type='hidden' name='wms_id' value=''>
-<input type='hidden' name='layers' value=''>
-<input type='hidden' name='legendurl' value=''>
-<input type='hidden' name='map_scale' value=''>
-<input type='hidden' name='epsg' value=''>
-<input type='button' name='print' value="<?php echo $label_button; ?>" onclick='printMap()'>
-<input type='hidden' name='conf' value='<?php echo $_REQUEST["conf"]; ?>'>
-<input type='hidden' name='comment1' value=''>
-<input type='hidden' name='comment2' value=''>
-<input type='hidden' name='mylegend' value='true'>
-<input type='hidden' name='measured_x_values' value=''>
-<input type='hidden' name='measured_y_values' value=''>
-
-</form>
-</body>
-</html>
Copied: branches/2.4.5_rc1/http/print/mod_printPDF.php (from rev 2140, branches/2.4.5/http/print/mod_printPDF.php)
===================================================================
--- branches/2.4.5_rc1/http/print/mod_printPDF.php (rev 0)
+++ branches/2.4.5_rc1/http/print/mod_printPDF.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,425 @@
+<?php
+# $Id: mod_printPDF.php
+# http://www.mapbender.org/index.php/mod_printPDF.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
+<html>
+<head>
+<meta http-equiv="cache-control" content="no-cache">
+<meta http-equiv="pragma" content="no-cache">
+<meta http-equiv="expires" content="0">
+<?php
+echo '<meta http-equiv="Content-Type" content="text/html; charset='.CHARSET.'">';
+?>
+<title>Print PDF</title>
+</head>
+<style type="text/css">
+<!--
+select{
+ width:150px;
+}
+input{
+ width:150px;
+}
+.mycheck{
+ width:15px;
+}
+div{
+ font-family : Arial, Helvetica, sans-serif;
+ font-size: 12px;
+}
+-->
+</style>
+<?php
+
+
+require_once(dirname(__FILE__)."/../print/".$_REQUEST["conf"]);
+echo "<script type='text/javascript'>";
+echo "var target = '".$_REQUEST["target"]."';";
+echo "var comment = '".$label_comment."';";
+echo "var comment_length = ".$comment_length.";";
+echo "var label_button = '".$label_button."';";
+echo "var type = '".$type."';";
+echo "</script>";
+?>
+<script type="text/javascript">
+<!--
+
+
+var size;
+var format;
+var map_width;
+var map_height;
+
+if(type=='window'){
+ var pt = window.opener;
+}
+else if(type == 'iframe'){
+ var pt = parent;
+}
+
+function mod_legend_print(){
+ var mod_legend_target = target;
+ var ind = pt.getMapObjIndexByName(mod_legend_target);
+ var layers;
+
+ document.forms[0].layers.value = "";
+ document.forms[0].wms_id.value = "";
+ document.forms[0].wms_title.value = "";
+ document.forms[0].legendurl.value = "";
+
+
+
+ for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
+ if(pt.mb_mapObj[ind].wms[i].gui_wms_visible != 0){
+ layers = pt.mb_checkScale(mod_legend_target,ind,i);
+ var layer = layers[0].split(",");
+ var title = layers[2].split(",");
+ var temp_legendurl = layers[3].split(",");
+ var layerparent= layers[4].split(",");
+
+ if( pt.mb_mapObj[ind].layers[i] != "" && pt.mb_mapObj[ind].layers[i]){
+
+ if(i>0 && document.forms[0].wms_id.value!=''){
+ document.forms[0].layers.value += "___";
+ document.forms[0].wms_id.value += "___";
+ document.forms[0].wms_title.value += "___";
+ document.forms[0].legendurl.value += "___";
+ }
+
+ //document.forms[0].layers.value += pt.mb_mapObj[ind].wms[i].objLayer[ii].layer_title; //pt.mb_mapObj[ind].layers[i] ;
+
+ document.forms[0].wms_id.value += pt.mb_mapObj[ind].wms[i].wms_id;
+ document.forms[0].wms_title.value += pt.mb_mapObj[ind].wms[i].wms_title;
+
+ //---------- legendurl ----------
+ tmp_name = "";
+ for(var j=0; j<layer.length; j++){
+ if(layerparent[j] == 0){
+ if(j>0){
+ document.forms[0].layers.value += ",";
+ }
+
+ var l = pt.mb_getchildsbyname(ind,i,layer[j]);
+
+ if (l) {
+ document.forms[0].layers.value += title[j];
+
+ if(j>0){
+ document.forms[0].legendurl.value += ",";
+ }
+ for (var k=0; k<l["name"].length; k++){
+ if (tmp_name != l["title"][k]) {
+ document.forms[0].layers.value += "*"
+ if(k>0){
+ document.forms[0].legendurl.value += "*";
+ }else{
+ document.forms[0].legendurl.value += '1*';
+ }
+
+ if (l["legendurl"][k] != '' || !l["legendurl"][k]==true){
+ document.forms[0].layers.value += l["name"][k];
+ document.forms[0].legendurl.value += l["legendurl"][k];
+ }else{
+ document.forms[0].layers.value += '0';
+ document.forms[0].legendurl.value += '0';
+ }
+ tmp_name = l["title"][k];
+ } // if
+ } // for var k=0
+
+ } // if (l)
+ else{
+ //prompt (!temp_legendurl[j] ,temp_legendurl[j] + !temp_legendurl[j]);
+
+ document.forms[0].layers.value += title[j];
+ if(j>0){
+ document.forms[0].legendurl.value += ",";
+ }
+ if (temp_legendurl[j]!= '' || !temp_legendurl[j] == 'true'){
+ document.forms[0].legendurl.value += temp_legendurl[j];
+ }else{
+ document.forms[0].legendurl.value +='0';
+ }
+
+ }// else (l)
+ }//check parent==0
+ }//for var j=0
+
+ //-------------------
+
+ //document.forms[0].legendurl.value += layers[3];
+
+ } else{
+ if(i>0 && document.forms[0].wms_id.value!=''){
+ document.forms[0].layers.value += "___";
+ document.forms[0].wms_id.value += "___";
+ document.forms[0].wms_title.value += "___";
+ document.forms[0].legendurl.value += "___";
+ }
+
+ document.forms[0].layers.value += "0";
+ document.forms[0].wms_id.value += "0";
+ document.forms[0].wms_title.value += "0";
+ document.forms[0].legendurl.value += "0";
+ }
+ }//if
+ }//for
+}
+
+function validate(){
+ size = document.form1.size.options[document.form1.size.selectedIndex].value;
+ format = document.form1.format.options[document.form1.format.selectedIndex].value;
+ if(size != "" && format != ""){
+ var ind = pt.getMapObjIndexByName(target);
+ var coord = pt.mb_mapObj[ind].extent.split(",");
+ var centerX = parseFloat(coord[0]) + (parseFloat(coord[2]) - parseFloat(coord[0]))/2
+ var centerY = parseFloat(coord[1]) + (parseFloat(coord[3]) - parseFloat(coord[1]))/2
+ if(size == "A4" && format == "portrait"){
+ map_width = <?php echo $a4p_map_width; ?>;
+ map_height = <?php echo $a4p_map_height; ?>;
+ }
+ if(size == "A4" && format == "landscape"){
+ map_width = <?php echo $a4l_map_width; ?>;
+ map_height = <?php echo $a4l_map_height; ?>;
+ }
+ if(size == "A3" && format == "portrait"){
+ map_width = <?php echo $a3p_map_width; ?>;
+ map_height = <?php echo $a3p_map_height; ?>;
+ }
+ if(size == "A3" && format == "landscape"){
+ map_width = <?php echo $a3l_map_width; ?>;
+ map_height = <?php echo $a3l_map_height; ?>;
+ }
+ if(size == "A2" && format == "portrait"){
+ map_width = <?php echo $a2p_map_width; ?>;
+ map_height = <?php echo $a2p_map_height; ?>;
+ }
+ if(size == "A2" && format == "landscape"){
+ map_width = <?php echo $a2l_map_width; ?>;
+ map_height = <?php echo $a2l_map_height; ?>;
+ }
+ if(size == "A1" && format == "portrait"){
+ map_width = <?php echo $a1p_map_width; ?>;
+ map_height = <?php echo $a1p_map_height; ?>;
+ }
+ if(size == "A1" && format == "landscape"){
+ map_width = <?php echo $a1l_map_width; ?>;
+ map_height = <?php echo $a1l_map_height; ?>;
+ }
+ if(size == "A0" && format == "portrait"){
+ map_width = <?php echo $a0p_map_width; ?>;
+ map_height = <?php echo $a0p_map_height; ?>;
+ }
+ if(size == "A0" && format == "landscape"){
+ map_width = <?php echo $a0l_map_width; ?>;
+ map_height = <?php echo $a0l_map_height; ?>;
+ }
+ var pos = pt.makeClickPos2RealWorldPos(target, map_width , map_height);
+ pt.mb_mapObj[ind].extent = coord[0] + "," + pos[1] + "," + pos[0] + "," + coord[3];
+
+ pt.mb_mapObj[ind].width = Math.round(map_width);
+ pt.mb_mapObj[ind].height = Math.round(map_height);
+ pt.document.getElementById(target).style.width = Math.round(map_width);
+ pt.document.getElementById(target).style.height = Math.round(map_height);
+ pt.window.frames[target].document.getElementById("maps").style.width = Math.round(map_width);
+ pt.window.frames[target].document.getElementById("maps").style.height = Math.round(map_height);
+
+ //pt.setMapRequest(target);
+ pt.mb_repaintScale(target, null, null, pt.mb_getScale(target));
+ document.form1.map_url.value = '';
+ for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
+ if(pt.mb_mapObj[ind].wms[i].gui_wms_visible > 0){
+ if(pt.mb_mapObj[ind].wms[i].mapURL != false && pt.mb_mapObj[ind].wms[i].mapURL != 'false' && pt.mb_mapObj[ind].wms[i].mapURL != ''){
+ if(document.form1.map_url.value != ""){
+ document.form1.map_url.value += "___";
+ }
+ document.form1.map_url.value += pt.mb_mapObj[ind].wms[i].mapURL;
+ }
+ }
+ }
+
+ //overview_url
+ var ind_overview = pt.getMapObjIndexByName('overview');
+
+ //alert ("l�nge: " + length+ " - " + ind_overview + name + pt.mb_mapObj[ind_overview].wms.length);
+ if(pt.mb_mapObj[ind_overview].mapURL != false ){
+ document.forms[0].overview_url.value = pt.mb_mapObj[ind_overview].mapURL;
+ }
+ }
+}
+function refreshParams(){
+ var ind = pt.getMapObjIndexByName(target);
+ var f = document.form1;
+ f.map_url.value = "";
+ for(var i=0; i<pt.mb_mapObj[ind].wms.length; i++){
+ if(pt.mb_mapObj[ind].wms[i].gui_wms_visible > 0){
+ if(pt.mb_mapObj[ind].wms[i].mapURL != false && pt.mb_mapObj[ind].wms[i].mapURL != 'false' && pt.mb_mapObj[ind].wms[i].mapURL != ''){
+ if(f.map_url.value != ""){
+ f.map_url.value += "___";
+ }
+ f.map_url.value += pt.mb_mapObj[ind].wms[i].mapURL;
+ }
+ }
+ }
+ f.map_scale.value = pt.mb_getScale(target);
+ f.epsg.value = pt.mb_mapObj[ind].epsg;
+ mod_legend_print();
+}
+function printMap(){
+ if(size != "" && (format == "portrait" || format == "landscape")){
+ refreshParams();
+ if(document.form1.c1.value != comment){
+ document.form1.comment1.value = document.form1.c1.value;
+ }
+ if(document.form1.c2.value != comment){
+ document.form1.comment2.value = document.form1.c2.value;
+ }
+ if(document.form1.mylegendcheckbox.checked == 0){
+ document.form1.mylegend.value = 'false';
+ }else{
+ document.form1.mylegend.value = 'true';
+ }
+
+ // write the measured coordinates
+
+ if (pt.mod_measure_RX != undefined && pt.mod_measure_RY != undefined) {
+ var tmp_x = '';
+ var tmp_y = '';
+ for(i = 0; i<pt.mod_measure_RX.length; i++) {
+ if(tmp_x != '') {
+ tmp_x += ','
+ }
+ tmp_x += pt.mod_measure_RX[i];
+ }
+ for(i = 0; i<pt.mod_measure_RY.length; i++) {
+ if(tmp_y != '') {
+ tmp_y += ','
+ }
+ tmp_y += pt.mod_measure_RY[i];
+ }
+ document.forms['form1'].elements['measured_x_values'].value = tmp_x;
+ document.forms['form1'].elements['measured_y_values'].value = tmp_y;
+ }
+
+ document.form1.submit();
+ }
+ else{
+ alert("Das Format ist noch nicht ausgew�hlt.");
+ }
+}
+function valCom(obj){
+ if(obj.value.length > comment_length){
+ obj.value = obj.value.substr(0,comment_length);
+ }
+}
+// -->
+</script>
+<body>
+<form name='form1' method='POST' action='../print/mod_printPDF_pdf.php?<?php echo SID; ?>' target="_blank">
+<table border='0'>
+<tr>
+ <td>
+ <select name='size' onchange='validate()'>
+<?php
+ if($a4 == true && $a3 == true){
+ echo "<option value=''>".$label_format."</option>";
+ }
+ if($a4 == true){
+ echo "<option value='A4'>".$label_format_a4."</option>";
+ }
+ if($a3 == true){
+ echo "<option value='A3'>".$label_format_a3."</option>";
+ }
+ if($a2 == true){
+ echo "<option value='A2'>".$label_format_a2."</option>";
+ }
+ if($a1 == true){
+ echo "<option value='A1'>".$label_format_a1."</option>";
+ }
+ if($a0 == true){
+ echo "<option value='A0'>".$label_format_a0."</option>";
+ }
+?>
+ </select>
+ </td>
+</tr>
+<tr>
+ <td>
+ <select name='format' onchange='validate()'>
+ <option value=''><?php echo $label_orientation; ?></option>
+ <option value='portrait'><?php echo $label_portrait; ?></option>
+ <option value='landscape'><?php echo $label_landscape; ?></option>
+ </select>
+ </td>
+</tr>
+<?php
+if($highquality == true){
+ echo "<tr>";
+ echo "<td>";
+ echo "<select name='quality'>";
+ echo "<option value='1'>".$label_72dpi."</option>";
+ echo "<option value='2'>".$label_288dpi."</option>";
+ echo "</select>";
+ echo "</td>";
+ echo "</tr>";
+}
+?>
+<tr>
+ <td>
+ <input type='text' name='c1' value='<?php echo $label_comment; ?>' onkeydown="valCom(this)">
+ </td>
+</tr>
+<tr>
+ <td>
+ <input type='text' name='c2' value='<?php echo $label_comment; ?>' onkeydown="valCom(this)">
+ </td>
+</tr>
+<?php
+if($legend == true){
+ echo "<tr>";
+ echo "<td>";
+ echo "<div><input type='checkbox' class='mycheck' name='mylegendcheckbox' value='false'>".$label_legend."</div>";
+ echo "</td>";
+ echo "</tr>";
+}
+?>
+<table>
+<input type='hidden' name='map_url' value=''>
+<input type='hidden' name='overview_url' value=''>
+<input type='hidden' name='wms_title' value=''>
+<input type='hidden' name='wms_id' value=''>
+<input type='hidden' name='layers' value=''>
+<input type='hidden' name='legendurl' value=''>
+<input type='hidden' name='map_scale' value=''>
+<input type='hidden' name='epsg' value=''>
+<input type='button' name='print' value="<?php echo $label_button; ?>" onclick='printMap()'>
+<input type='hidden' name='conf' value='<?php echo $_REQUEST["conf"]; ?>'>
+<input type='hidden' name='comment1' value=''>
+<input type='hidden' name='comment2' value=''>
+<input type='hidden' name='mylegend' value='true'>
+<input type='hidden' name='measured_x_values' value=''>
+<input type='hidden' name='measured_y_values' value=''>
+
+</form>
+</body>
+</html>
Deleted: branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php
===================================================================
--- branches/2.4.5/http/print/mod_printPDF_pdf.php 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,853 +0,0 @@
-<?php
-# $Id:
-# http://www.mapbender.org/index.php/mod_printPDF_pdf.php
-# Copyright (C) 2002 CCGIS
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-
-#require_once("../php/mb_validateSession.php");
-ob_start();
-session_start();
-ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
-require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
-
-include (dirname(__FILE__)."/../classes/class.ezpdf.php");
-include (dirname(__FILE__)."/../classes/class_stripRequest.php");
-include (dirname(__FILE__)."/../classes/class_weldMaps2PNG.php");
-include (dirname(__FILE__)."/../classes/class_weldOverview2PNG.php");
-include (dirname(__FILE__)."/../print/".$_REQUEST["conf"]);
-include (dirname(__FILE__)."/../classes/class_SaveLegend.php");
-include (dirname(__FILE__)."/../print/print_functions.php");
-
-if($log == true){
- include (dirname(__FILE__)."/../classes/class_log.php");
-}
-
-#Globals
-
-$factor = intval($_REQUEST["quality"]);
-
-#$date = date("d.m.Y",strtotime("now"));
-$linewidth_dashed = 0.5;
-$linewidth = 0.5;
-
-// DURATION TIME:
-function microtime_float(){
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
-$time_start = microtime_float();
-// END DURATION TIME
-
-$time_end = microtime_float();
-$time = $time_end - $time_start;
-
-/* -------------------------------------- */
-
-$size = $_REQUEST["size"];
-$format = $_REQUEST["format"];
-$map_scale = $_REQUEST["map_scale"];
-$overview_url = $_REQUEST["overview_url"];
-$epsg = $_REQUEST["epsg"];
-
-function setscalebar($scale){
- $mb_resolution = 28.35;
-
- if($scale < 16){
- $value = "10";
- $unit = "cm";
- $scalefactor = 10/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale >= 16 && $scale < 151){
- $value = "1";
- $unit = "Meter";
- $scalefactor = 100/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale >= 151 && $scale < 1550 ){
- $value = "10";
- $unit = "Meter";
- $scalefactor = 1000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale >= 1550 && $scale < 15050){
- $value = "100";
- $unit = "Meter";
- $scalefactor = 10000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale < 150050 && $scale >= 15050){
- $value = "1";
- $unit = "Kilometer";
- $scalefactor = 100000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale < 1500050 && $scale >= 150050){
- $value = "10";
- $unit = "Kilometer";
- $scalefactor = 1000000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale < 15000050 && $scale >= 1500050){
- $value = "100";
- $unit = "Kilometer";
- $scalefactor = 10000000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale < 150000001 && $scale >= 15000001){
- $value = "1000";
- $unit = "Kilometer";
- $scalefactor = 100000000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- if($scale >= 150000001){
- $value = "1000";
- $unit = "Kilometer";
- $scalefactor = 100000000/$scale;
- $img_width = round($scalefactor * $mb_resolution);
- }
- $array_scale[0] = $unit;
- $array_scale[1] = $img_width;
- $array_scale[2] = $value;
-
- return $array_scale;
-}
-
-
-$border = 0.8 * $DPC;
-
-if($matching == true){
- $urls = str_replace($pattern,$replacement,$_REQUEST["map_url"]);
-}
-else{
- $urls = $_REQUEST["map_url"];
-}
-
-
-$array_urls = explode("___", $urls);
-
-$myURL = new stripRequest($array_urls[0]);
-$map_width = round($myURL->get("width"));
-$map_height = round($myURL->get("height"));
-$map_extent = $myURL->get("BBOX");
-if($factor>1){
- for($i=0; $i<count($array_urls); $i++){
- $m = new stripRequest($array_urls[$i]);
- $m->set('width',(intval($m->get('width'))*4));
- $m->set('height',(intval($m->get('height'))*4));
- if(in_array($m->get('map'),$highqualitymapfiles)){
- $m->set('map',str_replace(".map","_4.map",$m->get('map')));
- }
- $array_urls[$i] = $m->url;
- }
-}
-$coord = split(",",$map_extent);
-
-// analyse overview url and draw rectangle with position
-$o_url = new stripRequest($overview_url);
-$overview_width = round($o_url->get("width"));
-$overview_height = round($o_url->get("height"));
-
-if($factor>1){
- $o_url->set('width',(intval($o_url->get('width'))*4));
- $o_url->set('height',(intval($o_url->get('height'))*4));
- if(in_array($o_url->get('map'),$highqualitymapfiles)){
- $o_url->set('map',str_replace(".map","_4.map",$o_url->get('map')));
- $overview_url = $o_url->url;
- }
-}
-
-if($matching == true){
- $overview_url = str_replace($pattern,$replacement,$overview_url);
-}
-
-
-if ($size == "A4" && $format == "portrait"){
- $overview_left = $a4p_overviewOffset_left;
- $overview_bottom =$a4p_overviewOffset_bottom;
-}elseif ($size == "A4" && $format == "landscape"){
- $overview_left = $a4l_overviewOffset_left;
- $overview_bottom =$a4l_overviewOffset_bottom;
-}elseif ($size == "A3" && $format == "portrait"){
- $overview_left = $a3p_overviewOffset_left;
- $overview_bottom =$a3p_overviewOffset_bottom;
-}elseif ($size == "A3" && $format == "landscape"){
- $overview_left = $a3l_overviewOffset_left;
- $overview_bottom = $a3l_overviewOffset_bottom;
-}elseif ($size == "A2" && $format == "portrait"){
- $overview_left = $a2p_overviewOffset_left;
- $overview_bottom =$a2p_overviewOffset_bottom;
-}elseif ($size == "A2" && $format == "landscape"){
- $overview_left = $a2l_overviewOffset_left;
- $overview_bottom = $a2l_overviewOffset_bottom;
-}elseif ($size == "A1" && $format == "portrait"){
- $overview_left = $a1p_overviewOffset_left;
- $overview_bottom =$a1p_overviewOffset_bottom;
-}elseif ($size == "A1" && $format == "landscape"){
- $overview_left = $a1l_overviewOffset_left;
- $overview_bottom = $a1l_overviewOffset_bottom;
-}elseif ($size == "A0" && $format == "portrait"){
- $overview_left = $a0p_overviewOffset_left;
- $overview_bottom =$a0p_overviewOffset_bottom;
-}elseif ($size == "A0" && $format == "landscape"){
- $overview_left = $a0l_overviewOffset_left;
- $overview_bottom = $a0l_overviewOffset_bottom;
-}
-
-$o_extent = $o_url->get("BBOX");
-
-$array_overview_url[0] = $overview_url;
-if($log == true){
- $l = new log("printPDF_overview",$array_overview_url);
-}
-
-/*
-$o_new = new stripRequest($overview_url);
-$o_new->set('width',50);
-$o_new->set('height',50);
-//$o->set('BBOX',$overview_extent);
-$o_url_new =$o_new->url;
-$array_overview[0] = $overview_url;
-$array_overview[1] = $o_url;
-*/
-
-/*
- * north arrow
- */
-if($size == "A4" && $format == "portrait"){
- $northarrow_left = $a4p_northarrow_left;
- $northarrow_bottom = $a4p_northarrow_bottom;
-}elseif ($size == "A4" && $format == "landscape"){
- $northarrow_left = $a4l_northarrow_left;
- $northarrow_bottom = $a4l_northarrow_bottom;
-}elseif ($size == "A3" && $format == "portrait"){
- $northarrow_left = $a3p_northarrow_left;
- $northarrow_bottom = $a3p_northarrow_bottom;
-}elseif ($size == "A3" && $format == "landscape"){
- $northarrow_left = $a3l_northarrow_left;
- $northarrow_bottom = $a3l_northarrow_bottom;
-}elseif ($size == "A2" && $format == "portrait"){
- $northarrow_left = $a2p_northarrow_left;
- $northarrow_bottom = $a2p_northarrow_bottom;
-}elseif ($size == "A2" && $format == "landscape"){
- $northarrow_left = $a2l_northarrow_left;
- $northarrow_bottom = $a2l_northarrow_bottom;
-}elseif ($size == "A1" && $format == "portrait"){
- $northarrow_left = $a1p_northarrow_left;
- $northarrow_bottom = $a1p_northarrow_bottom;
-}elseif ($size == "A1" && $format == "landscape"){
- $northarrow_left = $a1l_northarrow_left;
- $northarrow_bottom = $a1l_northarrow_bottom;
-}elseif ($size == "A0" && $format == "portrait"){
- $northarrow_left = $a0p_northarrow_left;
- $northarrow_bottom = $a0p_northarrow_bottom;
-}elseif ($size == "A0" && $format == "landscape"){
- $northarrow_left = $a0l_northarrow_left;
- $northarrow_bottom = $a0l_northarrow_bottom;
-}
-
-/*
- * special image
- */
-if ($size == "A4" && $format == "portrait"){
- $specialImage_left = $a4p_special_left;
- $specialImage_bottom = $a4p_special_bottom;
-}elseif ($size == "A4" && $format == "landscape"){
- $specialImage_left = $a4l_special_left;
- $specialImage_bottom = $a4l_special_bottom;
-}elseif ($size == "A3" && $format == "portrait"){
- $specialImage_left = $a3p_special_left;
- $specialImage_bottom = $a3p_special_bottom;
-}elseif ($size == "A3" && $format == "landscape"){
- $specialImage_left = $a3l_special_left;
- $specialImage_bottom = $a3l_special_bottom;
-}elseif ($size == "A2" && $format == "portrait"){
- $specialImage_left = $a2p_special_left;
- $specialImage_bottom = $a2p_special_bottom;
-}elseif ($size == "A2" && $format == "landscape"){
- $specialImage_left = $a2l_special_left;
- $specialImage_bottom = $a2l_special_bottom;
-}elseif ($size == "A1" && $format == "portrait"){
- $specialImage_left = $a1p_special_left;
- $specialImage_bottom = $a1p_special_bottom;
-}elseif ($size == "A1" && $format == "landscape"){
- $specialImage_left = $a1l_special_left;
- $specialImage_bottom = $a1l_special_bottom;
-}elseif ($size == "A0" && $format == "portrait"){
- $specialImage_left = $a0p_special_left;
- $specialImage_bottom = $a0p_special_bottom;
-}elseif ($size == "A0" && $format == "landscape"){
- $specialImage_left = $a0l_special_left;
- $specialImage_bottom = $a0l_special_bottom;
-}
-
-if($log == true){
- $l = new log("printPDF",$array_urls);
-}
-$pdf = new Cezpdf();
-
-$pdf->Cezpdf(strtolower($size),$format);
-$diff=array(196=>'Adieresis',228=>'adieresis',
- 214=>'Odieresis',246=>'odieresis',
- 220=>'Udieresis',252=>'udieresis',
- 223=>'germandbls');
-$pdf->selectFont('../classes/fonts/Helvetica.afm', array('encoding'=>'WinAnsiEncoding','differences'=>$diff));
-if($size == "A4" && $format == "portrait"){
- $mapOffset_left = $a4p_mapOffset_left;
- $mapOffset_bottom = $a4p_mapOffset_bottom;
- $header_height = $a4p_header_height;
- $footer_height = $a4p_footer_height;
-}
-else{
- $mapOffset_left = $a4l_mapOffset_left;
- $mapOffset_bottom = $a4l_mapOffset_bottom;
- $header_height = $a4l_header_height;
- $header_width = $a4l_header_width;
-}
-session_write_close();
-$i = new weldMaps2PNG(implode("___",$array_urls),$filename);
-
-$pdf->addPngFromFile($filename, $mapOffset_left, $mapOffset_bottom, $map_width, $map_height);
-if($unlink == true){
- unlink($filename);
-}
-
-/** ******************************************************************
-* user drawn elements
-*/
-
-$theMeasureConfigArray = array(
- "do_fill" => FALSE,
- "fill_color" => array(
- "r" => 128 / 255,
- "g" => 128 / 255,
- "b" => 128 / 255
- ),
- "do_stroke" => FALSE,
- "stroke_color" => array(
- "r" => 254 / 255,
- "g" => 1 / 255,
- "b" => 1 / 255
- ),
- "line_style" => array(
- "width" => 2,
- "cap" => 'butt',
- "join" => 'miter',
- "dash" => array(10, 6)
- )
- );
-
-if ($_REQUEST["measured_x_values"]!=''){
- addMeasuredItem(&$pdf, $_REQUEST["measured_x_values"], $_REQUEST["measured_y_values"], $theMeasureConfigArray);
- hideElementsOutsideMapframe(&$pdf);
-}
-
-# dashed line
-$pdf->setLineStyle($linewidth_dashed, '','', array(2,2));
-$pdf->line($mapOffset_left - $linewidth_dashed, $mapOffset_bottom - $linewidth_dashed, $mapOffset_left - $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed);
-$pdf->line($mapOffset_left - $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed, $mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed);
-$pdf->line($mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed, $mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom -$linewidth_dashed);
-$pdf->line($mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom -$linewidth_dashed, $mapOffset_left - $linewidth_dashed, $mapOffset_bottom - $linewidth_dashed);
-
-
-#line
-$pdf->setLineStyle($linewidth, '', '', array());
-$pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border);
-$pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
-$pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width + $border, $mapOffset_bottom -$border);
-$pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border, $mapOffset_left - $border, $mapOffset_bottom - $border);
-
-if($epsg == "EPSG:4326"){
-
- $text4 = "";
-}
-
-if($size == "A4" && $format == "portrait"){
- #header:
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height);
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height);
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
- $pdf->line( $mapOffset_left + $map_width/2, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width/2, $mapOffset_bottom + $map_height + $border + $header_height);
- #header-text
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text1);
- $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 60,$mySize,$text1);
-
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text2);
- $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 45,$mySize,$text2);
-
- $length = $pdf->getTextWidth($mySize, $text3);
- $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 35,$mySize,$text3);
-
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text4);
- $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 20,$mySize,$text4);
-
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text5);
- $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 10,$mySize,$text5);
-
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text6);
- $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 60,$mySize,$text6);
- $length = $pdf->getTextWidth($mySize, $text7);
- $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 50,$mySize,$text7);
- $length = $pdf->getTextWidth($mySize, $text8);
- $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 30,$mySize,$text8);
- $length = $pdf->getTextWidth($mySize, $text9);
- $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 20,$mySize,$text9);
- $length = $pdf->getTextWidth($mySize, $text10);
- $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 10,$mySize,$text10);
-
- //special image on the map-page
- if ($special == true){
- $pdf->addPngFromFile($specialImage, $specialImage_left, $specialImage_bottom , $specialImage_width, $specialImage_height);
- }
-
- #footer
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height);
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height);
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border);
-
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text11);
- $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 10,$mySize,$text11);
- $mySize = 6;
- $length = $pdf->getTextWidth($mySize, $text12);
- $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 18,$mySize,$text12);
- $length = $pdf->getTextWidth($mySize, $text13);
- $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 25,$mySize,$text13);
-}
-else{
- $pdf->setColor(1,1,1);
- $ll = array($mapOffset_left + $map_width - $header_width + $border - $linewidth, $mapOffset_bottom - $border + 1);
- $pdf->filledRectangle($ll[0], $ll[1], $header_width,$header_height);
- $pdf->line($ll[0], $ll[1], $ll[0], $ll[1] + $header_height);
- $pdf->line($ll[0], $ll[1] + $header_height, $ll[0] + $header_width, $ll[1] + $header_height);
-
- $pdf->line($ll[0] + 2, $ll[1] + 2, $ll[0] + 2, $ll[1] + $header_height - 2);
- $pdf->line($ll[0] + 2, $ll[1] + $header_height - 2, $ll[0] - 2 + $header_width, $ll[1] + $header_height - 2);
- $pdf->line($ll[0] - 2 + $header_width, $ll[1] + $header_height - 2, $ll[0] - 2 + $header_width, $ll[1] + 2);
- $pdf->line($ll[0] - 2 + $header_width, $ll[1] + 2, $ll[0] + 2, $ll[1] + 2);
-
- $pdf->line($ll[0] + 2, $ll[1] + 110 , $ll[0] - 2 + $header_width, $ll[1] + 110);
- $pdf->line($ll[0] + 2, $ll[1] + 40 , $ll[0] - 2 + $header_width, $ll[1] + 40);
-
-
- //special image on the map-page
- if ($special == true){
- $pdf->addPngFromFile($specialImage, $specialImage_left, $specialImage_bottom , $specialImage_width, $specialImage_height);
- }
-
- if($epsg == "EPSG:4326"){
-
- $text4 = "";
- }
-
- $pdf->setColor(0,0,0);
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text1);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,185,$mySize,$text1);
-
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text2);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,175,$mySize,$text2);
- $length = $pdf->getTextWidth($mySize, $text3);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,165,$mySize,$text3);
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text4);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,155,$mySize,$text4);
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text5);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,145,$mySize,$text5);
-
- $mySize = 9;
- $length = $pdf->getTextWidth($mySize, $text6);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,125,$mySize,$text6);
- $length = $pdf->getTextWidth($mySize, $text7);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,115,$mySize,$text7);
- $length = $pdf->getTextWidth($mySize, $text8);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,95,$mySize,$text8);
- $length = $pdf->getTextWidth($mySize, $text9);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,85,$mySize,$text9);
- $length = $pdf->getTextWidth($mySize, $text10);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,75,$mySize,$text10);
-
- $mySize = 8;
- $length = $pdf->getTextWidth($mySize, $text11);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,60,$mySize,$text11);
- $mySize = 6;
- $length = $pdf->getTextWidth($mySize, $text14);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,53,$mySize,$text14);
- $length = $pdf->getTextWidth($mySize, $text15);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,47,$mySize,$text15);
- $length = $pdf->getTextWidth($mySize, $text16);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,41,$mySize,$text16);
- $length = $pdf->getTextWidth($mySize, $text17);
- $pdf->addText($ll[0] + $header_width/2 - $length/2,35,$mySize,$text17);
-}
-#Coordinates
-$myMinx = "R ".substr(round($coord[0]), 0, 4)." ".substr(round($coord[0]), 4, 3)."";
-$myMiny = "H ".substr(round($coord[1]), 0, 4)." ".substr(round($coord[1]), 4, 3)."";
-$myMaxx = "R ".substr(round($coord[2]), 0, 4)." ".substr(round($coord[2]), 4, 3)."";
-$myMaxy = "H ".substr(round($coord[3]), 0, 4)." ".substr(round($coord[3]), 4, 3)."";
-
-$mySize = 9;
-$pdf->addText($mapOffset_left - 3, $mapOffset_bottom, $mySize, $myMinx, -90);
-$pdf->addText($mapOffset_left, $mapOffset_bottom - ($pdf->getFontHeight($mySize)), $mySize, $myMiny);
-$pdf->addText($mapOffset_left + $map_width - ($pdf->getTextWidth($mySize, $myMaxx)), $mapOffset_bottom + $map_height + 3, $mySize, $myMaxx);
-$pdf->addText($mapOffset_left + $map_width + 3, $mapOffset_bottom + $map_height, $mySize, $myMaxy, 90);
-
-
-
-
-
-
-if ($overview==true){
- // analyse request, draw rectancle
- $filename = str_replace("map_","overview_",$filename);
- if($size == "A4" && $format == "portrait"){
- $i = new weldOverview2PNG($overview_url,$array_urls[0] ,$filename);
-
- $pdf->addPngFromFile($filename, $overview_left,$overview_bottom, $overview_width, $overview_height);
- if($unlink == true){
- unlink($filename);
- }
- }
- else{
- $i = new weldOverview2PNG($overview_url,$array_urls[0],$filename);
-
- //$pdf->addPngFromFile($filename, $mapOffset_left,$mapOffset_bottom, $overview_width, $overview_height);
- $pdf->addPngFromFile($filename, $overview_left,$overview_bottom, $overview_width, $overview_height);
- if($unlink == true){
- unlink($filename);
- }
- }
-}
-
-if ($northarrow==true){
- $pdf->addPngFromFile($northarrowImage, $northarrow_left, $northarrow_bottom , $northarrowImage_width, $northarrowImage_height);
-}
-
-if($epsg == "EPSG:4326"){
-
- $scalebar = false;
-}
-else{
-
- $scalebar = true;
-}
-
-if($scalebar == true){
- if ($size == "A4" && $format == "portrait"){
- $scalebar_left = $a4p_scalebar_left;
- $scalebar_bottom = $a4p_scalebar_bottom;
- }elseif ($size == "A4" && $format == "landscape"){
- $scalebar_left = $a4l_scalebar_left;
- $scalebar_bottom = $a4l_scalebar_bottom;
- }elseif ($size == "A3" && $format == "portrait"){
- $scalebar_left = $a3p_scalebar_left;
- $scalebar_bottom = $a3p_scalebar_bottom;
- }elseif ($size == "A3" && $format == "landscape"){
- $scalebar_left = $a3l_scalebar_left;
- $scalebar_bottom = $a3l_scalebar_bottom;
- }elseif ($size == "A2" && $format == "portrait"){
- $scalebar_left = $a2p_scalebar_left;
- $scalebar_bottom = $a2p_scalebar_bottom;
- }elseif ($size == "A2" && $format == "landscape"){
- $scalebar_left = $a2l_scalebar_left;
- $scalebar_bottom = $a2l_scalebar_bottom;
- }elseif ($size == "A1" && $format == "portrait"){
- $scalebar_left = $a1p_scalebar_left;
- $scalebar_bottom = $a1p_scalebar_bottom;
- }elseif ($size == "A1" && $format == "landscape"){
- $scalebar_left = $a1l_scalebar_left;
- $scalebar_bottom = $a1l_scalebar_bottom;
- }elseif ($size == "A0" && $format == "portrait"){
- $scalebar_left = $a0p_scalebar_left;
- $scalebar_bottom = $a0p_scalebar_bottom;
- }elseif ($size == "A0" && $format == "landscape"){
- $scalebar_left = $a0l_scalebar_left;
- $scalebar_bottom = $a0l_scalebar_bottom;
- }
-
- $array_scalebar = setscalebar($map_scale);
-
- $scalebar_left = $scalebar_left + $header_width/2 - $array_scalebar[1]/2;
- $pdf->setLineStyle($scalebar_height, '','', array());
- $pdf->setColor(0,0,0);
- #$pdf->line($scalebar_left, $scalebar_bottom , $scalebar_left - 200 + $array_scalebar[1], $scalebar_bottom);
- $pdf->filledRectangle($scalebar_left, $scalebar_bottom, $array_scalebar[1],$scalebar_height);
-
- $pdf->setColor(1,1,1);
- $pdf->filledRectangle($scalebar_left + $array_scalebar[1]/4 + 1 , $scalebar_bottom + 1, $array_scalebar[1]/4 - 1 ,$scalebar_height-2);
- $pdf->setColor(1,1,1);
- $pdf->filledRectangle($scalebar_left + 3*($array_scalebar[1]/4) + 1 , $scalebar_bottom + 1, $array_scalebar[1]/4 - 2 ,$scalebar_height-2);
-
-
- #$pdf->setColor(1,0,1);
- #$pdf->filledRectangle($scalebar_left , $scalebar_bottom - 20, 1 * $DPC ,$scalebar_height-2);
-
-
- # value - Einheiten
- $pdf->setColor(0,0,0);
- $mySize = 8;
- $scalebar_height_half = 0.5 * $scalebar_height;
-
- $myText = 0;
- $length = $pdf->getTextWidth($mySize, $myText);
- $pdf->addText($scalebar_left - $length/2 ,$scalebar_bottom + 9 ,$mySize,$myText);
-
- $myText = $array_scalebar[2]/2;
- $length = $pdf->getTextWidth($mySize, $myText);
- $pdf->addText($scalebar_left + $array_scalebar[1]/2 - $length/2 ,$scalebar_bottom + 9 ,$mySize,$myText);
-
- $myText = $array_scalebar[2];
- $length = $pdf->getTextWidth($mySize, $myText);
- $pdf->addText($scalebar_left + $array_scalebar[1] - $length/2 - $length/4 ,$scalebar_bottom + 9 ,$mySize,$myText);
-
-
- $pdf->setColor(0,0,0);
- $mySize = 8;
- $scalebar_height_half = 0.5 * $scalebar_height;
- $myText = $array_scalebar[0];
-
- #$pdf->addText($scalebar_left + $scalebar_width + 5,$scalebar_bottom - $scalebar_height_half ,$mySize,$myText);
-
-
- #units
- $length = $pdf->getTextWidth($mySize, $myText);
- $pdf->addText($scalebar_left + $array_scalebar[1]/2 - $length/2 ,$scalebar_bottom - 12 ,$mySize,$myText);
-
-}
-
-
-/* ------------------------
- new page for legend
- ------------------------ */
-if ($legend == true && $_REQUEST["mylegend"]=='true'){
-
- $pdf->ezNewPage();
-
- //Pageborder (top, bottom, left, right)
-
- if($size == "A4" && $format == "portrait"){
- $pdf->ezSetMargins(50,50,80,30);
- } else {
- $pdf->ezSetMargins(60,35,60,60);
- }
-
- //Requests
- if(CHARSET=="UTF-8"){
- $new_wms_title=utf8_decode($_REQUEST["wms_title"]);
- }else{
- $new_wms_title=$_REQUEST["wms_title"];
- }
-
- if(CHARSET=="UTF-8"){
- $new_layers=utf8_decode($_REQUEST["layers"]);
- }else{
- $new_layers=$_REQUEST["layers"];
- }
-
- $my_wms_id = explode("___",$_REQUEST["wms_id"]);
- $my_wms_title = explode("___",$new_wms_title);
- $my_layers = explode("___",$new_layers);
- if($matching == true){
- $my_legend = str_replace($pattern,$replacement,$_REQUEST["legendurl"]);
- }
- else{
- $my_legend = $_REQUEST["legendurl"];
- }
- $my_legend = explode("___",$my_legend);
-
- //columns
- if($size == "A4" && $format == "portrait"){
- $pdf->ezColumnsStart(array ('num'=>2, 'gap'=>10));
- } else {
- $pdf->ezColumnsStart(array ('num'=>3, 'gap'=>10));
- }
-
- //header from printPDF.conf
- //$pdf->ezText("<b>".$titel."</b>", 13);
- $pdf->ezText("<b><u>".$legendText."</u></b>", 13);
-
-
- //Seitenraender (top, bottom, left, right)
- if($size == "A4" && $format == "portrait"){
- $pdf->ezSetMargins(70,35,80,30);
- } else {
- $pdf->ezSetMargins(100,35,60,60);
- }
-
- //generate the legend---------------------------------------------
-
- // Gesamthoehe Legende / height of the legend
- $sum_legend_height = 0;
-
-
- for($i=0; $i<count($my_wms_id); $i++){
- if ($my_wms_id[$i] != '0'){ //wms_id not 0
- $layer = explode(",",$my_layers[$i]);
- $my_legendurls = explode(",",$my_legend[$i]);
-
- $wms_y_position = $pdf->ezText("<b>".$my_wms_title[$i]."</b>", 12, array('spacing'=>1.2));
- $wms_zeilenhoehe = $pdf->getFontHeight(12);
-
- // add this to the height of the legend /addiere dies zur Gesamthoehe Legende
- $sum_legend_height += $wms_zeilenhoehe;
-
- //Layer
- $l = 0; #l temporary parameter to count the layer /Hilfvariable zum durchz�hlen der angezeigten Layer
- for($j=0; $j<count($my_legendurls); $j++){
- // url with grouped layers------------------
- $temp_url = explode('*',$my_legendurls[$j]);
- $temp_layers = explode('*',$layer[$j]);
-
- for ($q=0; $q <count($temp_url);$q++){
- if($temp_url[$q] == '1' ){ // Layertitle for the parent of grouped layers
- // add this to the height of the legend /addiere dies zur Gesamth�he Legende
- $layer_y_position = $pdf->ezText($temp_layers[$q], 11, array('spacing'=>1.2));
- $layer_zeilenhoehe = $pdf->getFontHeight(12);
- $sum_legend_height += $layer_zeilenhoehe;
-
- }elseif($temp_url[$q] != '0' ){
- $funktionsaufruf = new SaveLegend($temp_url[$q],$legendFilename);
- $imgsize = getimagesize($legendFilename);
- // add this to the height of the legend /addiere dies zur Gesamthoehe der Legende
- $sum_legend_height += $imgsize[1];
-
- //calculate text + picture / Berechnung Groesse Schrift + Bild
- if($l == 0){
- $y_position = $wms_y_position;
- $wms_y_position = '';
- }else{
- $y_position = $pdf->ezText("", 1, array('spacing'=>1.2));
- }
- $layer_zeilenhoehe = $pdf->getFontHeight(11);
- $next_position = $y_position - $layer_zeilenhoehe - $imgsize[1];
-
- // add this to the height of the legend / addiere dies zur Gesamth�he Legende
- $sum_legend_height += $layer_zeilenhoehe;
-
- $l = $l+1;
-
- // if text + picture are smaler then the lower margin + textsize, then set a space
- //wenn Schrift + Bild kleiner der unteren Margin + Zeilenhoehe, dann Abstand setzen
- if($size == "A4" && $format == "portrait" && $next_position <= 35 +$layer_zeilenhoehe){ //90 $layer_zeilenhoehe
- $space = $layer_zeilenhoehe + $imgsize[1];
- $pdf->ezSetDy(-$space);
- }
- if($size == "A4" && $format == "landscape" && $next_position <= 35+$layer_zeilenhoehe){//50
- $space = $layer_zeilenhoehe + $imgsize[1];
- $pdf->ezSetDy(-$space);
- }
-
- //write the header layername / Ueberschrift schreiben
- $legend = $temp_layers[$q]."\n"; //$layer[$j]."\n";
- $pdf->ezText($legend, 11, array('spacing'=>1.2));
-
- //$pdf->ezText($url, 9, array('spacing'=>1.2));
- //print the picture / Bild schreiben
- $pdf->ezImage($legendFilename, 0, 'width', 'none', 'left');
- if($unlink == true){
- unlink($legendFilename);
- }
-
- } //if legendurl
- }// for legendurl
-
- //frames (x1, y1, x2, y2)
- if($size == "A4" && $format == "portrait"){
- #line
- $pdf->setLineStyle($linewidth, '', '', array());
- //left
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height);
- //right
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height);
- //top
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height);
- //bottom
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border - $footer_height, $mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height);
-
- if ($legendImage!=''){
- //image on top of page
- $pdf->addPngFromFile($legendImage, $mapOffset_left + $map_width + $border - $legendImage_width -6, $mapOffset_bottom + $map_height + $border + $header_height - $legendImage_height - 4 , $legendImage_width, $legendImage_height);
- }
- } else {
- $pdf->setLineStyle($linewidth, '', '', array());
- //left
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border);
- //right
- $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border , $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
- //top
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border , $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border);
- //bottom
- $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border , $mapOffset_left - $border, $mapOffset_bottom - $border);
-
- if ($legendImage!=''){
- //image on top of page
- $pdf->addPngFromFile($legendImage, $mapOffset_left + $map_width + $border - $legendImage_width -6, $mapOffset_bottom + $map_height + $border - $legendImage_height -4 , $legendImage_width, $legendImage_height);
- //line under legend (only landscape)
- //$pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border - $legendImage_height - 4 , $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border - $legendImage_height - 6);
- }
- }
- }// for layers
- } //if wms_id not 0
- }// for wms
-
- /****
- * USER POLYGON:
- */
- if($_REQUEST["measured_x_values"] != ""
- && $_REQUEST["measured_y_values"] != ""
- && is_file($legendFilenameUserPolygon)) {
- // load image
- $myY = $pdf->ezText("<b>temporary Object</b>", 11);
- $pdf->ezSetDy(-15);
- $pdf->ezImage($legendFilenameUserPolygon, 5, 17, 'none', 'left');
- if($unlink == true){
- unlink($legendFilenameUserPolygon);
- }
- $pdf->ezSetY($myY - 7);
-
- $pdf->ezText("Element", 11, array("left" => 25));
- // deletes image
-
- $pdf->ezSetDy(-15);
-
- }
-
-$pdf->ezText($legendFooter, 11);
-}//legend true
-/* ------------------------
- end of legend
- ------------------------ */
-
-ob_clean();
-if($download == false){
- $pdf->ezStream();
-}
-else{
- $content = $pdf->ezOutput();
-
- $fp = fopen($downloadFile,'w');
- fwrite($fp,$content);
- fclose($fp);
- echo "<html><head></head><body><a href='".$downloadFile."'>".$downloadText."</a></body></html>";
-}
-?>
Copied: branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php (from rev 2140, branches/2.4.5/http/print/mod_printPDF_pdf.php)
===================================================================
--- branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php (rev 0)
+++ branches/2.4.5_rc1/http/print/mod_printPDF_pdf.php 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,853 @@
+<?php
+# $Id:
+# http://www.mapbender.org/index.php/mod_printPDF_pdf.php
+# Copyright (C) 2002 CCGIS
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+require_once(dirname(__FILE__)."/../php/mb_validateSession.php");
+ob_start();
+session_start();
+ini_set('error_reporting', 'E_ALL & ~ E_NOTICE');
+require_once(dirname(__FILE__)."/../../conf/mapbender.conf");
+
+include (dirname(__FILE__)."/../classes/class.ezpdf.php");
+include (dirname(__FILE__)."/../classes/class_stripRequest.php");
+include (dirname(__FILE__)."/../classes/class_weldMaps2PNG.php");
+include (dirname(__FILE__)."/../classes/class_weldOverview2PNG.php");
+include (dirname(__FILE__)."/../print/".$_REQUEST["conf"]);
+include (dirname(__FILE__)."/../classes/class_SaveLegend.php");
+include (dirname(__FILE__)."/../print/print_functions.php");
+
+if($log == true){
+ include (dirname(__FILE__)."/../classes/class_log.php");
+}
+
+#Globals
+
+$factor = intval($_REQUEST["quality"]);
+
+#$date = date("d.m.Y",strtotime("now"));
+$linewidth_dashed = 0.5;
+$linewidth = 0.5;
+
+// DURATION TIME:
+function microtime_float(){
+ list($usec, $sec) = explode(" ", microtime());
+ return ((float)$usec + (float)$sec);
+}
+$time_start = microtime_float();
+// END DURATION TIME
+
+$time_end = microtime_float();
+$time = $time_end - $time_start;
+
+/* -------------------------------------- */
+
+$size = $_REQUEST["size"];
+$format = $_REQUEST["format"];
+$map_scale = $_REQUEST["map_scale"];
+$overview_url = $_REQUEST["overview_url"];
+$epsg = $_REQUEST["epsg"];
+
+function setscalebar($scale){
+ $mb_resolution = 28.35;
+
+ if($scale < 16){
+ $value = "10";
+ $unit = "cm";
+ $scalefactor = 10/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale >= 16 && $scale < 151){
+ $value = "1";
+ $unit = "Meter";
+ $scalefactor = 100/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale >= 151 && $scale < 1550 ){
+ $value = "10";
+ $unit = "Meter";
+ $scalefactor = 1000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale >= 1550 && $scale < 15050){
+ $value = "100";
+ $unit = "Meter";
+ $scalefactor = 10000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale < 150050 && $scale >= 15050){
+ $value = "1";
+ $unit = "Kilometer";
+ $scalefactor = 100000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale < 1500050 && $scale >= 150050){
+ $value = "10";
+ $unit = "Kilometer";
+ $scalefactor = 1000000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale < 15000050 && $scale >= 1500050){
+ $value = "100";
+ $unit = "Kilometer";
+ $scalefactor = 10000000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale < 150000001 && $scale >= 15000001){
+ $value = "1000";
+ $unit = "Kilometer";
+ $scalefactor = 100000000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ if($scale >= 150000001){
+ $value = "1000";
+ $unit = "Kilometer";
+ $scalefactor = 100000000/$scale;
+ $img_width = round($scalefactor * $mb_resolution);
+ }
+ $array_scale[0] = $unit;
+ $array_scale[1] = $img_width;
+ $array_scale[2] = $value;
+
+ return $array_scale;
+}
+
+
+$border = 0.8 * $DPC;
+
+if($matching == true){
+ $urls = str_replace($pattern,$replacement,$_REQUEST["map_url"]);
+}
+else{
+ $urls = $_REQUEST["map_url"];
+}
+
+
+$array_urls = explode("___", $urls);
+
+$myURL = new stripRequest($array_urls[0]);
+$map_width = round($myURL->get("width"));
+$map_height = round($myURL->get("height"));
+$map_extent = $myURL->get("BBOX");
+if($factor>1){
+ for($i=0; $i<count($array_urls); $i++){
+ $m = new stripRequest($array_urls[$i]);
+ $m->set('width',(intval($m->get('width'))*4));
+ $m->set('height',(intval($m->get('height'))*4));
+ if(in_array($m->get('map'),$highqualitymapfiles)){
+ $m->set('map',str_replace(".map","_4.map",$m->get('map')));
+ }
+ $array_urls[$i] = $m->url;
+ }
+}
+$coord = split(",",$map_extent);
+
+// analyse overview url and draw rectangle with position
+$o_url = new stripRequest($overview_url);
+$overview_width = round($o_url->get("width"));
+$overview_height = round($o_url->get("height"));
+
+if($factor>1){
+ $o_url->set('width',(intval($o_url->get('width'))*4));
+ $o_url->set('height',(intval($o_url->get('height'))*4));
+ if(in_array($o_url->get('map'),$highqualitymapfiles)){
+ $o_url->set('map',str_replace(".map","_4.map",$o_url->get('map')));
+ $overview_url = $o_url->url;
+ }
+}
+
+if($matching == true){
+ $overview_url = str_replace($pattern,$replacement,$overview_url);
+}
+
+
+if ($size == "A4" && $format == "portrait"){
+ $overview_left = $a4p_overviewOffset_left;
+ $overview_bottom =$a4p_overviewOffset_bottom;
+}elseif ($size == "A4" && $format == "landscape"){
+ $overview_left = $a4l_overviewOffset_left;
+ $overview_bottom =$a4l_overviewOffset_bottom;
+}elseif ($size == "A3" && $format == "portrait"){
+ $overview_left = $a3p_overviewOffset_left;
+ $overview_bottom =$a3p_overviewOffset_bottom;
+}elseif ($size == "A3" && $format == "landscape"){
+ $overview_left = $a3l_overviewOffset_left;
+ $overview_bottom = $a3l_overviewOffset_bottom;
+}elseif ($size == "A2" && $format == "portrait"){
+ $overview_left = $a2p_overviewOffset_left;
+ $overview_bottom =$a2p_overviewOffset_bottom;
+}elseif ($size == "A2" && $format == "landscape"){
+ $overview_left = $a2l_overviewOffset_left;
+ $overview_bottom = $a2l_overviewOffset_bottom;
+}elseif ($size == "A1" && $format == "portrait"){
+ $overview_left = $a1p_overviewOffset_left;
+ $overview_bottom =$a1p_overviewOffset_bottom;
+}elseif ($size == "A1" && $format == "landscape"){
+ $overview_left = $a1l_overviewOffset_left;
+ $overview_bottom = $a1l_overviewOffset_bottom;
+}elseif ($size == "A0" && $format == "portrait"){
+ $overview_left = $a0p_overviewOffset_left;
+ $overview_bottom =$a0p_overviewOffset_bottom;
+}elseif ($size == "A0" && $format == "landscape"){
+ $overview_left = $a0l_overviewOffset_left;
+ $overview_bottom = $a0l_overviewOffset_bottom;
+}
+
+$o_extent = $o_url->get("BBOX");
+
+$array_overview_url[0] = $overview_url;
+if($log == true){
+ $l = new log("printPDF_overview",$array_overview_url);
+}
+
+/*
+$o_new = new stripRequest($overview_url);
+$o_new->set('width',50);
+$o_new->set('height',50);
+//$o->set('BBOX',$overview_extent);
+$o_url_new =$o_new->url;
+$array_overview[0] = $overview_url;
+$array_overview[1] = $o_url;
+*/
+
+/*
+ * north arrow
+ */
+if($size == "A4" && $format == "portrait"){
+ $northarrow_left = $a4p_northarrow_left;
+ $northarrow_bottom = $a4p_northarrow_bottom;
+}elseif ($size == "A4" && $format == "landscape"){
+ $northarrow_left = $a4l_northarrow_left;
+ $northarrow_bottom = $a4l_northarrow_bottom;
+}elseif ($size == "A3" && $format == "portrait"){
+ $northarrow_left = $a3p_northarrow_left;
+ $northarrow_bottom = $a3p_northarrow_bottom;
+}elseif ($size == "A3" && $format == "landscape"){
+ $northarrow_left = $a3l_northarrow_left;
+ $northarrow_bottom = $a3l_northarrow_bottom;
+}elseif ($size == "A2" && $format == "portrait"){
+ $northarrow_left = $a2p_northarrow_left;
+ $northarrow_bottom = $a2p_northarrow_bottom;
+}elseif ($size == "A2" && $format == "landscape"){
+ $northarrow_left = $a2l_northarrow_left;
+ $northarrow_bottom = $a2l_northarrow_bottom;
+}elseif ($size == "A1" && $format == "portrait"){
+ $northarrow_left = $a1p_northarrow_left;
+ $northarrow_bottom = $a1p_northarrow_bottom;
+}elseif ($size == "A1" && $format == "landscape"){
+ $northarrow_left = $a1l_northarrow_left;
+ $northarrow_bottom = $a1l_northarrow_bottom;
+}elseif ($size == "A0" && $format == "portrait"){
+ $northarrow_left = $a0p_northarrow_left;
+ $northarrow_bottom = $a0p_northarrow_bottom;
+}elseif ($size == "A0" && $format == "landscape"){
+ $northarrow_left = $a0l_northarrow_left;
+ $northarrow_bottom = $a0l_northarrow_bottom;
+}
+
+/*
+ * special image
+ */
+if ($size == "A4" && $format == "portrait"){
+ $specialImage_left = $a4p_special_left;
+ $specialImage_bottom = $a4p_special_bottom;
+}elseif ($size == "A4" && $format == "landscape"){
+ $specialImage_left = $a4l_special_left;
+ $specialImage_bottom = $a4l_special_bottom;
+}elseif ($size == "A3" && $format == "portrait"){
+ $specialImage_left = $a3p_special_left;
+ $specialImage_bottom = $a3p_special_bottom;
+}elseif ($size == "A3" && $format == "landscape"){
+ $specialImage_left = $a3l_special_left;
+ $specialImage_bottom = $a3l_special_bottom;
+}elseif ($size == "A2" && $format == "portrait"){
+ $specialImage_left = $a2p_special_left;
+ $specialImage_bottom = $a2p_special_bottom;
+}elseif ($size == "A2" && $format == "landscape"){
+ $specialImage_left = $a2l_special_left;
+ $specialImage_bottom = $a2l_special_bottom;
+}elseif ($size == "A1" && $format == "portrait"){
+ $specialImage_left = $a1p_special_left;
+ $specialImage_bottom = $a1p_special_bottom;
+}elseif ($size == "A1" && $format == "landscape"){
+ $specialImage_left = $a1l_special_left;
+ $specialImage_bottom = $a1l_special_bottom;
+}elseif ($size == "A0" && $format == "portrait"){
+ $specialImage_left = $a0p_special_left;
+ $specialImage_bottom = $a0p_special_bottom;
+}elseif ($size == "A0" && $format == "landscape"){
+ $specialImage_left = $a0l_special_left;
+ $specialImage_bottom = $a0l_special_bottom;
+}
+
+if($log == true){
+ $l = new log("printPDF",$array_urls);
+}
+$pdf = new Cezpdf();
+
+$pdf->Cezpdf(strtolower($size),$format);
+$diff=array(196=>'Adieresis',228=>'adieresis',
+ 214=>'Odieresis',246=>'odieresis',
+ 220=>'Udieresis',252=>'udieresis',
+ 223=>'germandbls');
+$pdf->selectFont('../classes/fonts/Helvetica.afm', array('encoding'=>'WinAnsiEncoding','differences'=>$diff));
+if($size == "A4" && $format == "portrait"){
+ $mapOffset_left = $a4p_mapOffset_left;
+ $mapOffset_bottom = $a4p_mapOffset_bottom;
+ $header_height = $a4p_header_height;
+ $footer_height = $a4p_footer_height;
+}
+else{
+ $mapOffset_left = $a4l_mapOffset_left;
+ $mapOffset_bottom = $a4l_mapOffset_bottom;
+ $header_height = $a4l_header_height;
+ $header_width = $a4l_header_width;
+}
+session_write_close();
+$i = new weldMaps2PNG(implode("___",$array_urls),$filename);
+
+$pdf->addPngFromFile($filename, $mapOffset_left, $mapOffset_bottom, $map_width, $map_height);
+if($unlink == true){
+ unlink($filename);
+}
+
+/** ******************************************************************
+* user drawn elements
+*/
+
+$theMeasureConfigArray = array(
+ "do_fill" => FALSE,
+ "fill_color" => array(
+ "r" => 128 / 255,
+ "g" => 128 / 255,
+ "b" => 128 / 255
+ ),
+ "do_stroke" => FALSE,
+ "stroke_color" => array(
+ "r" => 254 / 255,
+ "g" => 1 / 255,
+ "b" => 1 / 255
+ ),
+ "line_style" => array(
+ "width" => 2,
+ "cap" => 'butt',
+ "join" => 'miter',
+ "dash" => array(10, 6)
+ )
+ );
+
+if ($_REQUEST["measured_x_values"]!=''){
+ addMeasuredItem(&$pdf, $_REQUEST["measured_x_values"], $_REQUEST["measured_y_values"], $theMeasureConfigArray);
+ hideElementsOutsideMapframe(&$pdf);
+}
+
+# dashed line
+$pdf->setLineStyle($linewidth_dashed, '','', array(2,2));
+$pdf->line($mapOffset_left - $linewidth_dashed, $mapOffset_bottom - $linewidth_dashed, $mapOffset_left - $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed);
+$pdf->line($mapOffset_left - $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed, $mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed);
+$pdf->line($mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom + $map_height + $linewidth_dashed, $mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom -$linewidth_dashed);
+$pdf->line($mapOffset_left + $map_width + $linewidth_dashed, $mapOffset_bottom -$linewidth_dashed, $mapOffset_left - $linewidth_dashed, $mapOffset_bottom - $linewidth_dashed);
+
+
+#line
+$pdf->setLineStyle($linewidth, '', '', array());
+$pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border);
+$pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
+$pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width + $border, $mapOffset_bottom -$border);
+$pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border, $mapOffset_left - $border, $mapOffset_bottom - $border);
+
+if($epsg == "EPSG:4326"){
+
+ $text4 = "";
+}
+
+if($size == "A4" && $format == "portrait"){
+ #header:
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height);
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height);
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
+ $pdf->line( $mapOffset_left + $map_width/2, $mapOffset_bottom + $map_height + $border, $mapOffset_left + $map_width/2, $mapOffset_bottom + $map_height + $border + $header_height);
+ #header-text
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text1);
+ $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 60,$mySize,$text1);
+
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text2);
+ $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 45,$mySize,$text2);
+
+ $length = $pdf->getTextWidth($mySize, $text3);
+ $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 35,$mySize,$text3);
+
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text4);
+ $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 20,$mySize,$text4);
+
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text5);
+ $pdf->addText($mapOffset_left - ($border/2) + ($map_width/4) - ($length/2),$mapOffset_bottom + $map_height + $border + 10,$mySize,$text5);
+
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text6);
+ $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 60,$mySize,$text6);
+ $length = $pdf->getTextWidth($mySize, $text7);
+ $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 50,$mySize,$text7);
+ $length = $pdf->getTextWidth($mySize, $text8);
+ $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 30,$mySize,$text8);
+ $length = $pdf->getTextWidth($mySize, $text9);
+ $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 20,$mySize,$text9);
+ $length = $pdf->getTextWidth($mySize, $text10);
+ $pdf->addText($mapOffset_left + ($border/2) + ($map_width/4*3) - ($length/2),$mapOffset_bottom + $map_height + $border + 10,$mySize,$text10);
+
+ //special image on the map-page
+ if ($special == true){
+ $pdf->addPngFromFile($specialImage, $specialImage_left, $specialImage_bottom , $specialImage_width, $specialImage_height);
+ }
+
+ #footer
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height);
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height);
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border);
+
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text11);
+ $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 10,$mySize,$text11);
+ $mySize = 6;
+ $length = $pdf->getTextWidth($mySize, $text12);
+ $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 18,$mySize,$text12);
+ $length = $pdf->getTextWidth($mySize, $text13);
+ $pdf->addText( $mapOffset_left + $map_width/2 - ($length/2),$mapOffset_bottom - $border - 25,$mySize,$text13);
+}
+else{
+ $pdf->setColor(1,1,1);
+ $ll = array($mapOffset_left + $map_width - $header_width + $border - $linewidth, $mapOffset_bottom - $border + 1);
+ $pdf->filledRectangle($ll[0], $ll[1], $header_width,$header_height);
+ $pdf->line($ll[0], $ll[1], $ll[0], $ll[1] + $header_height);
+ $pdf->line($ll[0], $ll[1] + $header_height, $ll[0] + $header_width, $ll[1] + $header_height);
+
+ $pdf->line($ll[0] + 2, $ll[1] + 2, $ll[0] + 2, $ll[1] + $header_height - 2);
+ $pdf->line($ll[0] + 2, $ll[1] + $header_height - 2, $ll[0] - 2 + $header_width, $ll[1] + $header_height - 2);
+ $pdf->line($ll[0] - 2 + $header_width, $ll[1] + $header_height - 2, $ll[0] - 2 + $header_width, $ll[1] + 2);
+ $pdf->line($ll[0] - 2 + $header_width, $ll[1] + 2, $ll[0] + 2, $ll[1] + 2);
+
+ $pdf->line($ll[0] + 2, $ll[1] + 110 , $ll[0] - 2 + $header_width, $ll[1] + 110);
+ $pdf->line($ll[0] + 2, $ll[1] + 40 , $ll[0] - 2 + $header_width, $ll[1] + 40);
+
+
+ //special image on the map-page
+ if ($special == true){
+ $pdf->addPngFromFile($specialImage, $specialImage_left, $specialImage_bottom , $specialImage_width, $specialImage_height);
+ }
+
+ if($epsg == "EPSG:4326"){
+
+ $text4 = "";
+ }
+
+ $pdf->setColor(0,0,0);
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text1);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,185,$mySize,$text1);
+
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text2);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,175,$mySize,$text2);
+ $length = $pdf->getTextWidth($mySize, $text3);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,165,$mySize,$text3);
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text4);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,155,$mySize,$text4);
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text5);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,145,$mySize,$text5);
+
+ $mySize = 9;
+ $length = $pdf->getTextWidth($mySize, $text6);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,125,$mySize,$text6);
+ $length = $pdf->getTextWidth($mySize, $text7);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,115,$mySize,$text7);
+ $length = $pdf->getTextWidth($mySize, $text8);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,95,$mySize,$text8);
+ $length = $pdf->getTextWidth($mySize, $text9);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,85,$mySize,$text9);
+ $length = $pdf->getTextWidth($mySize, $text10);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,75,$mySize,$text10);
+
+ $mySize = 8;
+ $length = $pdf->getTextWidth($mySize, $text11);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,60,$mySize,$text11);
+ $mySize = 6;
+ $length = $pdf->getTextWidth($mySize, $text14);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,53,$mySize,$text14);
+ $length = $pdf->getTextWidth($mySize, $text15);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,47,$mySize,$text15);
+ $length = $pdf->getTextWidth($mySize, $text16);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,41,$mySize,$text16);
+ $length = $pdf->getTextWidth($mySize, $text17);
+ $pdf->addText($ll[0] + $header_width/2 - $length/2,35,$mySize,$text17);
+}
+#Coordinates
+$myMinx = "R ".substr(round($coord[0]), 0, 4)." ".substr(round($coord[0]), 4, 3)."";
+$myMiny = "H ".substr(round($coord[1]), 0, 4)." ".substr(round($coord[1]), 4, 3)."";
+$myMaxx = "R ".substr(round($coord[2]), 0, 4)." ".substr(round($coord[2]), 4, 3)."";
+$myMaxy = "H ".substr(round($coord[3]), 0, 4)." ".substr(round($coord[3]), 4, 3)."";
+
+$mySize = 9;
+$pdf->addText($mapOffset_left - 3, $mapOffset_bottom, $mySize, $myMinx, -90);
+$pdf->addText($mapOffset_left, $mapOffset_bottom - ($pdf->getFontHeight($mySize)), $mySize, $myMiny);
+$pdf->addText($mapOffset_left + $map_width - ($pdf->getTextWidth($mySize, $myMaxx)), $mapOffset_bottom + $map_height + 3, $mySize, $myMaxx);
+$pdf->addText($mapOffset_left + $map_width + 3, $mapOffset_bottom + $map_height, $mySize, $myMaxy, 90);
+
+
+
+
+
+
+if ($overview==true){
+ // analyse request, draw rectancle
+ $filename = str_replace("map_","overview_",$filename);
+ if($size == "A4" && $format == "portrait"){
+ $i = new weldOverview2PNG($overview_url,$array_urls[0] ,$filename);
+
+ $pdf->addPngFromFile($filename, $overview_left,$overview_bottom, $overview_width, $overview_height);
+ if($unlink == true){
+ unlink($filename);
+ }
+ }
+ else{
+ $i = new weldOverview2PNG($overview_url,$array_urls[0],$filename);
+
+ //$pdf->addPngFromFile($filename, $mapOffset_left,$mapOffset_bottom, $overview_width, $overview_height);
+ $pdf->addPngFromFile($filename, $overview_left,$overview_bottom, $overview_width, $overview_height);
+ if($unlink == true){
+ unlink($filename);
+ }
+ }
+}
+
+if ($northarrow==true){
+ $pdf->addPngFromFile($northarrowImage, $northarrow_left, $northarrow_bottom , $northarrowImage_width, $northarrowImage_height);
+}
+
+if($epsg == "EPSG:4326"){
+
+ $scalebar = false;
+}
+else{
+
+ $scalebar = true;
+}
+
+if($scalebar == true){
+ if ($size == "A4" && $format == "portrait"){
+ $scalebar_left = $a4p_scalebar_left;
+ $scalebar_bottom = $a4p_scalebar_bottom;
+ }elseif ($size == "A4" && $format == "landscape"){
+ $scalebar_left = $a4l_scalebar_left;
+ $scalebar_bottom = $a4l_scalebar_bottom;
+ }elseif ($size == "A3" && $format == "portrait"){
+ $scalebar_left = $a3p_scalebar_left;
+ $scalebar_bottom = $a3p_scalebar_bottom;
+ }elseif ($size == "A3" && $format == "landscape"){
+ $scalebar_left = $a3l_scalebar_left;
+ $scalebar_bottom = $a3l_scalebar_bottom;
+ }elseif ($size == "A2" && $format == "portrait"){
+ $scalebar_left = $a2p_scalebar_left;
+ $scalebar_bottom = $a2p_scalebar_bottom;
+ }elseif ($size == "A2" && $format == "landscape"){
+ $scalebar_left = $a2l_scalebar_left;
+ $scalebar_bottom = $a2l_scalebar_bottom;
+ }elseif ($size == "A1" && $format == "portrait"){
+ $scalebar_left = $a1p_scalebar_left;
+ $scalebar_bottom = $a1p_scalebar_bottom;
+ }elseif ($size == "A1" && $format == "landscape"){
+ $scalebar_left = $a1l_scalebar_left;
+ $scalebar_bottom = $a1l_scalebar_bottom;
+ }elseif ($size == "A0" && $format == "portrait"){
+ $scalebar_left = $a0p_scalebar_left;
+ $scalebar_bottom = $a0p_scalebar_bottom;
+ }elseif ($size == "A0" && $format == "landscape"){
+ $scalebar_left = $a0l_scalebar_left;
+ $scalebar_bottom = $a0l_scalebar_bottom;
+ }
+
+ $array_scalebar = setscalebar($map_scale);
+
+ $scalebar_left = $scalebar_left + $header_width/2 - $array_scalebar[1]/2;
+ $pdf->setLineStyle($scalebar_height, '','', array());
+ $pdf->setColor(0,0,0);
+ #$pdf->line($scalebar_left, $scalebar_bottom , $scalebar_left - 200 + $array_scalebar[1], $scalebar_bottom);
+ $pdf->filledRectangle($scalebar_left, $scalebar_bottom, $array_scalebar[1],$scalebar_height);
+
+ $pdf->setColor(1,1,1);
+ $pdf->filledRectangle($scalebar_left + $array_scalebar[1]/4 + 1 , $scalebar_bottom + 1, $array_scalebar[1]/4 - 1 ,$scalebar_height-2);
+ $pdf->setColor(1,1,1);
+ $pdf->filledRectangle($scalebar_left + 3*($array_scalebar[1]/4) + 1 , $scalebar_bottom + 1, $array_scalebar[1]/4 - 2 ,$scalebar_height-2);
+
+
+ #$pdf->setColor(1,0,1);
+ #$pdf->filledRectangle($scalebar_left , $scalebar_bottom - 20, 1 * $DPC ,$scalebar_height-2);
+
+
+ # value - Einheiten
+ $pdf->setColor(0,0,0);
+ $mySize = 8;
+ $scalebar_height_half = 0.5 * $scalebar_height;
+
+ $myText = 0;
+ $length = $pdf->getTextWidth($mySize, $myText);
+ $pdf->addText($scalebar_left - $length/2 ,$scalebar_bottom + 9 ,$mySize,$myText);
+
+ $myText = $array_scalebar[2]/2;
+ $length = $pdf->getTextWidth($mySize, $myText);
+ $pdf->addText($scalebar_left + $array_scalebar[1]/2 - $length/2 ,$scalebar_bottom + 9 ,$mySize,$myText);
+
+ $myText = $array_scalebar[2];
+ $length = $pdf->getTextWidth($mySize, $myText);
+ $pdf->addText($scalebar_left + $array_scalebar[1] - $length/2 - $length/4 ,$scalebar_bottom + 9 ,$mySize,$myText);
+
+
+ $pdf->setColor(0,0,0);
+ $mySize = 8;
+ $scalebar_height_half = 0.5 * $scalebar_height;
+ $myText = $array_scalebar[0];
+
+ #$pdf->addText($scalebar_left + $scalebar_width + 5,$scalebar_bottom - $scalebar_height_half ,$mySize,$myText);
+
+
+ #units
+ $length = $pdf->getTextWidth($mySize, $myText);
+ $pdf->addText($scalebar_left + $array_scalebar[1]/2 - $length/2 ,$scalebar_bottom - 12 ,$mySize,$myText);
+
+}
+
+
+/* ------------------------
+ new page for legend
+ ------------------------ */
+if ($legend == true && $_REQUEST["mylegend"]=='true'){
+
+ $pdf->ezNewPage();
+
+ //Pageborder (top, bottom, left, right)
+
+ if($size == "A4" && $format == "portrait"){
+ $pdf->ezSetMargins(50,50,80,30);
+ } else {
+ $pdf->ezSetMargins(60,35,60,60);
+ }
+
+ //Requests
+ if(CHARSET=="UTF-8"){
+ $new_wms_title=utf8_decode($_REQUEST["wms_title"]);
+ }else{
+ $new_wms_title=$_REQUEST["wms_title"];
+ }
+
+ if(CHARSET=="UTF-8"){
+ $new_layers=utf8_decode($_REQUEST["layers"]);
+ }else{
+ $new_layers=$_REQUEST["layers"];
+ }
+
+ $my_wms_id = explode("___",$_REQUEST["wms_id"]);
+ $my_wms_title = explode("___",$new_wms_title);
+ $my_layers = explode("___",$new_layers);
+ if($matching == true){
+ $my_legend = str_replace($pattern,$replacement,$_REQUEST["legendurl"]);
+ }
+ else{
+ $my_legend = $_REQUEST["legendurl"];
+ }
+ $my_legend = explode("___",$my_legend);
+
+ //columns
+ if($size == "A4" && $format == "portrait"){
+ $pdf->ezColumnsStart(array ('num'=>2, 'gap'=>10));
+ } else {
+ $pdf->ezColumnsStart(array ('num'=>3, 'gap'=>10));
+ }
+
+ //header from printPDF.conf
+ //$pdf->ezText("<b>".$titel."</b>", 13);
+ $pdf->ezText("<b><u>".$legendText."</u></b>", 13);
+
+
+ //Seitenraender (top, bottom, left, right)
+ if($size == "A4" && $format == "portrait"){
+ $pdf->ezSetMargins(70,35,80,30);
+ } else {
+ $pdf->ezSetMargins(100,35,60,60);
+ }
+
+ //generate the legend---------------------------------------------
+
+ // Gesamthoehe Legende / height of the legend
+ $sum_legend_height = 0;
+
+
+ for($i=0; $i<count($my_wms_id); $i++){
+ if ($my_wms_id[$i] != '0'){ //wms_id not 0
+ $layer = explode(",",$my_layers[$i]);
+ $my_legendurls = explode(",",$my_legend[$i]);
+
+ $wms_y_position = $pdf->ezText("<b>".$my_wms_title[$i]."</b>", 12, array('spacing'=>1.2));
+ $wms_zeilenhoehe = $pdf->getFontHeight(12);
+
+ // add this to the height of the legend /addiere dies zur Gesamthoehe Legende
+ $sum_legend_height += $wms_zeilenhoehe;
+
+ //Layer
+ $l = 0; #l temporary parameter to count the layer /Hilfvariable zum durchz�hlen der angezeigten Layer
+ for($j=0; $j<count($my_legendurls); $j++){
+ // url with grouped layers------------------
+ $temp_url = explode('*',$my_legendurls[$j]);
+ $temp_layers = explode('*',$layer[$j]);
+
+ for ($q=0; $q <count($temp_url);$q++){
+ if($temp_url[$q] == '1' ){ // Layertitle for the parent of grouped layers
+ // add this to the height of the legend /addiere dies zur Gesamth�he Legende
+ $layer_y_position = $pdf->ezText($temp_layers[$q], 11, array('spacing'=>1.2));
+ $layer_zeilenhoehe = $pdf->getFontHeight(12);
+ $sum_legend_height += $layer_zeilenhoehe;
+
+ }elseif($temp_url[$q] != '0' ){
+ $funktionsaufruf = new SaveLegend($temp_url[$q],$legendFilename);
+ $imgsize = getimagesize($legendFilename);
+ // add this to the height of the legend /addiere dies zur Gesamthoehe der Legende
+ $sum_legend_height += $imgsize[1];
+
+ //calculate text + picture / Berechnung Groesse Schrift + Bild
+ if($l == 0){
+ $y_position = $wms_y_position;
+ $wms_y_position = '';
+ }else{
+ $y_position = $pdf->ezText("", 1, array('spacing'=>1.2));
+ }
+ $layer_zeilenhoehe = $pdf->getFontHeight(11);
+ $next_position = $y_position - $layer_zeilenhoehe - $imgsize[1];
+
+ // add this to the height of the legend / addiere dies zur Gesamth�he Legende
+ $sum_legend_height += $layer_zeilenhoehe;
+
+ $l = $l+1;
+
+ // if text + picture are smaler then the lower margin + textsize, then set a space
+ //wenn Schrift + Bild kleiner der unteren Margin + Zeilenhoehe, dann Abstand setzen
+ if($size == "A4" && $format == "portrait" && $next_position <= 35 +$layer_zeilenhoehe){ //90 $layer_zeilenhoehe
+ $space = $layer_zeilenhoehe + $imgsize[1];
+ $pdf->ezSetDy(-$space);
+ }
+ if($size == "A4" && $format == "landscape" && $next_position <= 35+$layer_zeilenhoehe){//50
+ $space = $layer_zeilenhoehe + $imgsize[1];
+ $pdf->ezSetDy(-$space);
+ }
+
+ //write the header layername / Ueberschrift schreiben
+ $legend = $temp_layers[$q]."\n"; //$layer[$j]."\n";
+ $pdf->ezText($legend, 11, array('spacing'=>1.2));
+
+ //$pdf->ezText($url, 9, array('spacing'=>1.2));
+ //print the picture / Bild schreiben
+ $pdf->ezImage($legendFilename, 0, 'width', 'none', 'left');
+ if($unlink == true){
+ unlink($legendFilename);
+ }
+
+ } //if legendurl
+ }// for legendurl
+
+ //frames (x1, y1, x2, y2)
+ if($size == "A4" && $format == "portrait"){
+ #line
+ $pdf->setLineStyle($linewidth, '', '', array());
+ //left
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height);
+ //right
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height);
+ //top
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border + $header_height, $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border - $footer_height);
+ //bottom
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border - $footer_height, $mapOffset_left - $border, $mapOffset_bottom - $border - $footer_height);
+
+ if ($legendImage!=''){
+ //image on top of page
+ $pdf->addPngFromFile($legendImage, $mapOffset_left + $map_width + $border - $legendImage_width -6, $mapOffset_bottom + $map_height + $border + $header_height - $legendImage_height - 4 , $legendImage_width, $legendImage_height);
+ }
+ } else {
+ $pdf->setLineStyle($linewidth, '', '', array());
+ //left
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom - $border, $mapOffset_left - $border, $mapOffset_bottom + $map_height + $border);
+ //right
+ $pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border , $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border);
+ //top
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border , $mapOffset_left + $map_width + $border, $mapOffset_bottom - $border);
+ //bottom
+ $pdf->line($mapOffset_left + $map_width + $border, $mapOffset_bottom -$border , $mapOffset_left - $border, $mapOffset_bottom - $border);
+
+ if ($legendImage!=''){
+ //image on top of page
+ $pdf->addPngFromFile($legendImage, $mapOffset_left + $map_width + $border - $legendImage_width -6, $mapOffset_bottom + $map_height + $border - $legendImage_height -4 , $legendImage_width, $legendImage_height);
+ //line under legend (only landscape)
+ //$pdf->line($mapOffset_left - $border, $mapOffset_bottom + $map_height + $border - $legendImage_height - 4 , $mapOffset_left + $map_width + $border, $mapOffset_bottom + $map_height + $border - $legendImage_height - 6);
+ }
+ }
+ }// for layers
+ } //if wms_id not 0
+ }// for wms
+
+ /****
+ * USER POLYGON:
+ */
+ if($_REQUEST["measured_x_values"] != ""
+ && $_REQUEST["measured_y_values"] != ""
+ && is_file($legendFilenameUserPolygon)) {
+ // load image
+ $myY = $pdf->ezText("<b>temporary Object</b>", 11);
+ $pdf->ezSetDy(-15);
+ $pdf->ezImage($legendFilenameUserPolygon, 5, 17, 'none', 'left');
+ if($unlink == true){
+ unlink($legendFilenameUserPolygon);
+ }
+ $pdf->ezSetY($myY - 7);
+
+ $pdf->ezText("Element", 11, array("left" => 25));
+ // deletes image
+
+ $pdf->ezSetDy(-15);
+
+ }
+
+$pdf->ezText($legendFooter, 11);
+}//legend true
+/* ------------------------
+ end of legend
+ ------------------------ */
+
+ob_clean();
+if($download == false){
+ $pdf->ezStream();
+}
+else{
+ $content = $pdf->ezOutput();
+
+ $fp = fopen($downloadFile,'w');
+ fwrite($fp,$content);
+ fclose($fp);
+ echo "<html><head></head><body><a href='".$downloadFile."'>".$downloadText."</a></body></html>";
+}
+?>
Deleted: branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql
===================================================================
--- branches/2.4.5/resources/db/mysql/mysql_schema.sql 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,755 +0,0 @@
-
-SET FOREIGN_KEY_CHECKS=0;
---
--- Datenbank: mb2.4.3
---
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui`
---
-
-CREATE TABLE gui (
- gui_id varchar(50) NOT NULL default '',
- gui_name varchar(50) NOT NULL default '',
- gui_description varchar(255) NOT NULL default '',
- gui_public tinyint(4) NOT NULL default '1',
- PRIMARY KEY (gui_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_element`
---
-
-CREATE TABLE gui_element (
- fkey_gui_id varchar(50) NOT NULL default '',
- e_id varchar(50) NOT NULL default '',
- e_pos tinyint(4) unsigned zerofill default NULL,
- e_public tinyint(1) unsigned zerofill default NULL,
- e_comment text,
- e_title varchar(255),
- e_element varchar(255) NOT NULL default '',
- e_src varchar(255) default NULL,
- e_attributes longtext,
- e_left int(4) default NULL,
- e_top int(4) default NULL,
- e_width int(4) unsigned default NULL,
- e_height int(4) unsigned default NULL,
- e_z_index tinyint(3) unsigned default NULL,
- e_more_styles longtext,
- e_content longtext,
- e_closetag varchar(255) default NULL,
- e_js_file varchar(50) default NULL,
- e_mb_mod varchar(50) default NULL,
- e_target varchar(50) default NULL,
- e_requires varchar(50) default NULL,
- e_url VARCHAR(255) NULL,
- PRIMARY KEY (fkey_gui_id,e_id),
- KEY idx_gui_id_e_id (fkey_gui_id,e_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_element_vars`
---
-
-CREATE TABLE gui_element_vars (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_e_id varchar(50) NOT NULL default '',
- var_name varchar(50) NOT NULL default '',
- var_value text,
- context text,
- var_type varchar(50) default NULL,
- PRIMARY KEY (fkey_gui_id,fkey_e_id,var_name),
- KEY idx_elementvars (fkey_gui_id,fkey_e_id,var_name)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_layer`
---
-
-CREATE TABLE gui_layer (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_layer_id int(11) NOT NULL default '0',
- gui_layer_wms_id int(11) default '0',
- gui_layer_status smallint(6) default '1',
- gui_layer_selectable smallint(6) default '1',
- gui_layer_visible smallint(6) default '1',
- gui_layer_queryable smallint(6) default '0',
- gui_layer_querylayer int(11) default '0',
- gui_layer_minscale int(11) unsigned default '0',
- gui_layer_maxscale int(11) unsigned default '0',
- gui_layer_priority int(6) default NULL,
- gui_layer_style varchar(50) default NULL,
- gui_layer_wfs_featuretype varchar(255) default NULL,
- KEY gui_index (fkey_gui_id),
- KEY layer_index (fkey_layer_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_mb_group`
---
-
-CREATE TABLE gui_mb_group (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_mb_group_id int(11) NOT NULL default '0',
- mb_group_type varchar(50) NOT NULL default '',
- PRIMARY KEY (fkey_gui_id,fkey_mb_group_id),
- KEY fkey_mb_group_id (fkey_mb_group_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_mb_user`
---
-
-CREATE TABLE gui_mb_user (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_mb_user_id int(11) NOT NULL default '0',
- mb_user_type varchar(50) default NULL,
- PRIMARY KEY (fkey_gui_id,fkey_mb_user_id),
- KEY fkey_mb_user_id (fkey_mb_user_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_treegde`
---
-
-CREATE TABLE gui_treegde (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_layer_id text,
- id int(11) NOT NULL auto_increment,
- lft int(11) NOT NULL default '0',
- rgt int(11) NOT NULL default '0',
- my_layer_title varchar(50) default NULL,
- layer text,
- wms_id text,
- PRIMARY KEY (fkey_gui_id,id,lft,rgt),
- KEY tree_ind (id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_wfs`
---
-
-CREATE TABLE gui_wfs (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_wfs_id int(11) NOT NULL default '0',
- PRIMARY KEY (fkey_gui_id,fkey_wfs_id),
- KEY fkey_wfs_id (fkey_wfs_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `gui_wms`
---
-
-CREATE TABLE gui_wms (
- fkey_gui_id varchar(50) NOT NULL default '',
- fkey_wms_id int(11) NOT NULL default '0',
- gui_wms_position int(11) NOT NULL default '0',
- gui_wms_mapformat varchar(50) NOT NULL default '',
- gui_wms_featureinfoformat varchar(50) NOT NULL default '',
- gui_wms_exceptionformat varchar(50) NOT NULL default '',
- gui_wms_epsg varchar(50) NOT NULL default '',
- gui_wms_visible smallint(6) NOT NULL default '1',
- KEY gui_index (fkey_gui_id),
- KEY wms_index (fkey_wms_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `layer`
---
-
-CREATE TABLE layer (
- layer_id int(11) NOT NULL auto_increment,
- fkey_wms_id int(11) NOT NULL default '0',
- layer_pos int(11) NOT NULL default '0',
- layer_parent varchar(50) NOT NULL default '',
- layer_name varchar(255) NOT NULL default '',
- layer_title varchar(255) NOT NULL default '',
- layer_queryable smallint(6) NOT NULL default '0',
- layer_minscale int(11) default '0',
- layer_maxscale int(11) default '0',
- layer_dataurl varchar(255) default NULL,
- layer_metadataurl varchar(255) default NULL,
- PRIMARY KEY (layer_id),
- KEY wms_index (fkey_wms_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `layer_epsg`
---
-
-CREATE TABLE layer_epsg (
- fkey_layer_id int(11) NOT NULL default '0',
- epsg varchar(50) NOT NULL default '',
- minx double default '0',
- miny double default '0',
- maxx double default '0',
- maxy double default '0',
- KEY layer_index (fkey_layer_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `layer_style`
---
-
-CREATE TABLE layer_style (
- fkey_layer_id int(11) NOT NULL default '0',
- name varchar(50) NOT NULL default '',
- title varchar(100) NOT NULL default '',
- legendurl varchar(255) default NULL,
- legendurlformat varchar(50) default NULL,
- KEY layer_index (fkey_layer_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `mb_group`
---
-
-CREATE TABLE mb_group (
- mb_group_id int(11) NOT NULL auto_increment,
- mb_group_name varchar(50) NOT NULL default '',
- mb_group_owner int(4) default NULL,
- mb_group_description varchar(255) NOT NULL default '',
- PRIMARY KEY (mb_group_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `mb_log`
---
-
-CREATE TABLE mb_log (
- id bigint(20) NOT NULL auto_increment,
- time_client varchar(13) default '0',
- time_server varchar(13) default NULL,
- time_readable varchar(50) default NULL,
- mb_session varchar(50) default NULL,
- gui varchar(50) default NULL,
- module varchar(50) default NULL,
- ip varchar(20) default NULL,
- username varchar(50) default NULL,
- userid varchar(50) default NULL,
- request text,
- KEY logindex (id)
-) TYPE=MyISAM;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle mb_monitor
---
-CREATE TABLE mb_monitor (
- upload_id varchar(255) NOT NULL default '',
- fkey_wms_id int NOT NULL default '0',
- status int4 NOT NULL,
- status_comment varchar(255) NOT NULL default '',
- timestamp_begin int4 NOT NULL,
- timestamp_end int4 NOT NULL,
- upload_url varchar(255) NOT NULL default '',
- updated char(1) NOT NULL default ''
-) TYPE=InnoDb;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `mb_user`
---
-CREATE TABLE mb_user (
- mb_user_id int(11) NOT NULL auto_increment,
- mb_user_name varchar(50) NOT NULL default '',
- mb_user_password varchar(50) NOT NULL default '',
- mb_user_owner int(11) NOT NULL default '0',
- mb_user_description varchar(255) default NULL,
- mb_user_login_count int(4) unsigned NOT NULL default '0',
- mb_user_email varchar(50) default NULL,
- mb_user_phone varchar(50) default NULL,
- mb_user_department varchar(255) default NULL,
- mb_user_resolution int(4) NOT NULL default '72',
- mb_user_organisation_name varchar(255) default NULL,
- mb_user_position_name varchar(255) default NULL,
- mb_user_phone1 varchar(255) default NULL,
- mb_user_facsimile varchar(255) default NULL,
- mb_user_delivery_point varchar(255) default NULL,
- mb_user_city varchar(255) default NULL,
- mb_user_postal_code int(4) default NULL,
- mb_user_country varchar(255) default NULL,
- mb_user_online_resource varchar(255) default NULL,
- PRIMARY KEY (mb_user_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `mb_user_mb_group`
---
-
-CREATE TABLE mb_user_mb_group (
- fkey_mb_user_id int(11) NOT NULL default '0',
- fkey_mb_group_id int(11) NOT NULL default '0',
- PRIMARY KEY (fkey_mb_user_id,fkey_mb_group_id),
- KEY fkey_mb_group_id (fkey_mb_group_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `mb_user_wmc`
---
-
-CREATE TABLE mb_user_wmc (
- wmc_id varchar(20) NOT NULL default '',
- fkey_user_id int(11) NOT NULL default '0',
- wmc longtext NOT NULL,
- wmc_title varchar(50) default NULL,
- wmc_timestamp int(10) default NULL,
- KEY fkey_user_id (fkey_user_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs`
---
-
-CREATE TABLE wfs (
- wfs_id int(11) NOT NULL auto_increment,
- wfs_version varchar(50) default NULL,
- wfs_name varchar(255) default NULL,
- wfs_title varchar(255) default NULL,
- wfs_abstract text,
- wfs_getcapabilities varchar(255) default NULL,
- wfs_describefeaturetype varchar(255) default NULL,
- wfs_getfeature varchar(255) default NULL,
- wfs_transaction varchar(255) default NULL,
- wfs_owsproxy VARCHAR(50) NULL,
- PRIMARY KEY (wfs_id),
- KEY wfs_ (wfs_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs_conf`
---
-
-CREATE TABLE wfs_conf (
- wfs_conf_id int(11) NOT NULL auto_increment,
- wfs_conf_abstract text,
- fkey_wfs_id int(11) NOT NULL default '0',
- fkey_featuretype_id int(11) NOT NULL default '0',
- g_label varchar(50) default NULL,
- g_label_id varchar(50) default NULL,
- g_button varchar(50) default NULL,
- g_button_id varchar(50) default NULL,
- g_style text,
- g_buffer float default '0',
- g_res_style text,
- g_use_wzgraphics int(10) unsigned default '0',
- PRIMARY KEY (wfs_conf_id),
- KEY fkey_wfs_id (fkey_wfs_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs_conf_element`
---
-
-CREATE TABLE wfs_conf_element (
- wfs_conf_element_id int(11) unsigned NOT NULL auto_increment,
- fkey_wfs_conf_id int(11) NOT NULL default '0',
- f_id int(11) NOT NULL default '0',
- f_geom tinyint(3) unsigned default '0',
- f_gid tinyint(3) unsigned NOT NULL default '0',
- f_search tinyint(3) unsigned default NULL,
- f_pos int(11) default NULL,
- f_style_id varchar(255) default NULL,
- f_toupper int(11) unsigned default NULL,
- f_label varchar(255) default NULL,
- f_label_id varchar(50) default NULL,
- f_show tinyint(3) unsigned default NULL,
- f_respos int(11) default NULL,
- f_form_element_html TEXT NULL,
- f_edit int4,
- f_mandatory int4,
- f_auth_varname VARCHAR(50),
- PRIMARY KEY (wfs_conf_element_id),
- KEY fkey_wfs_conf_id (fkey_wfs_conf_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs_element`
---
-
-CREATE TABLE wfs_element (
- fkey_featuretype_id int(11) NOT NULL default '0',
- element_id int(11) NOT NULL auto_increment,
- element_name varchar(50) default NULL,
- element_type varchar(50) default NULL,
- KEY element_ind0 (fkey_featuretype_id),
- KEY element_ind1 (element_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs_featuretype`
---
-
-CREATE TABLE wfs_featuretype (
- fkey_wfs_id int(11) NOT NULL default '0',
- featuretype_id int(11) NOT NULL auto_increment,
- featuretype_name varchar(50) NOT NULL default '',
- featuretype_title varchar(50) default NULL,
- featuretype_srs varchar(50) default NULL,
- PRIMARY KEY (featuretype_id),
- KEY wfs_ind (fkey_wfs_id),
- KEY wfs_ind2 (featuretype_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wfs_featuretype_namespace`
---
-
-CREATE TABLE `wfs_featuretype_namespace` (
- `fkey_wfs_id` int(11) NOT NULL default '0',
- `fkey_featuretype_id` int(11) NOT NULL default '0',
- `namespace` varchar(255) NOT NULL default '',
- `namespace_location` varchar(255) NOT NULL default '',
- KEY `wfs_id` (`fkey_wfs_id`),
- KEY `featuretype_id` (`fkey_featuretype_id`)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wms`
---
-
-CREATE TABLE wms (
- wms_id int(11) NOT NULL auto_increment,
- wms_version varchar(50) NOT NULL default '',
- wms_title varchar(255) NOT NULL default '',
- wms_abstract text,
- wms_getcapabilities varchar(255) NOT NULL default '',
- wms_getmap varchar(255) NOT NULL default '',
- wms_getfeatureinfo varchar(255) NOT NULL default '',
- wms_getlegendurl varchar(255) default NULL,
- wms_filter varchar(255) default NULL,
- wms_getcapabilities_doc longtext,
- wms_owsproxy VARCHAR(50) NULL,
- wms_upload_url VARCHAR(255) NULL,
- PRIMARY KEY (wms_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wms_format`
---
-
-CREATE TABLE wms_format (
- fkey_wms_id int(11) NOT NULL default '0',
- data_type varchar(50) NOT NULL default '',
- data_format varchar(100) NOT NULL default '',
- KEY wms_index (fkey_wms_id)
-) TYPE=InnoDB;
-
--- --------------------------------------------------------
-
---
--- Tabellenstruktur für Tabelle `wms_srs`
---
-
-CREATE TABLE wms_srs (
- fkey_wms_id int(11) NOT NULL default '0',
- wms_srs varchar(50) NOT NULL default '',
- KEY wms_index (fkey_wms_id)
-) TYPE=InnoDB;
-
---
--- Constraints der exportierten Tabellen
---
-
---
--- Constraints der Tabelle `gui_element`
---
-ALTER TABLE `gui_element`
- ADD CONSTRAINT `gui_element_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_element_vars`
---
-ALTER TABLE `gui_element_vars`
- ADD CONSTRAINT `gui_element_vars_ibfk_1` FOREIGN KEY (`fkey_gui_id`, `fkey_e_id`) REFERENCES `gui_element` (`fkey_gui_id`, `e_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_layer`
---
-ALTER TABLE `gui_layer`
- ADD CONSTRAINT `gui_layer_ibfk_3` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `gui_layer_ibfk_4` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_mb_group`
---
-ALTER TABLE `gui_mb_group`
- ADD CONSTRAINT `gui_mb_group_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `gui_mb_group_ibfk_2` FOREIGN KEY (`fkey_mb_group_id`) REFERENCES `mb_group` (`mb_group_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_mb_user`
---
-ALTER TABLE `gui_mb_user`
- ADD CONSTRAINT `gui_mb_user_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `gui_mb_user_ibfk_2` FOREIGN KEY (`fkey_mb_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_treegde`
---
-ALTER TABLE `gui_treegde`
- ADD CONSTRAINT `gui_treegde_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_wfs`
---
-ALTER TABLE `gui_wfs`
- ADD CONSTRAINT `gui_wfs_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `gui_wfs_ibfk_2` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `gui_wms`
---
-ALTER TABLE `gui_wms`
- ADD CONSTRAINT `gui_wms_ibfk_3` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `gui_wms_ibfk_4` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `layer`
---
-ALTER TABLE `layer`
- ADD CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `layer_epsg`
---
-ALTER TABLE `layer_epsg`
- ADD CONSTRAINT `layer_epsg_ibfk_1` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `layer_style`
---
-ALTER TABLE `layer_style`
- ADD CONSTRAINT `layer_style_ibfk_1` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle mb_monitor
---
-ALTER TABLE mb_monitor ADD CONSTRAINT mb_monitor_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms (wms_id) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `mb_user_mb_group`
---
-ALTER TABLE `mb_user_mb_group`
- ADD CONSTRAINT `fkey_mb_user_mb_group_mb_use_id` FOREIGN KEY (`fkey_mb_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `mb_user_mb_group_ibfk_1` FOREIGN KEY (`fkey_mb_group_id`) REFERENCES `mb_group` (`mb_group_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `mb_user_wmc`
---
-ALTER TABLE `mb_user_wmc`
- ADD CONSTRAINT `mb_user_wmc_ibfk_1` FOREIGN KEY (`fkey_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wfs_conf`
---
-ALTER TABLE `wfs_conf`
- ADD CONSTRAINT `wfs_conf_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wfs_conf_element`
---
-ALTER TABLE `wfs_conf_element`
- ADD CONSTRAINT `wfs_conf_element_ibfk_1` FOREIGN KEY (`fkey_wfs_conf_id`) REFERENCES `wfs_conf` (`wfs_conf_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wfs_element`
---
-ALTER TABLE `wfs_element`
- ADD CONSTRAINT `wfs_element_ibfk_1` FOREIGN KEY (`fkey_featuretype_id`) REFERENCES `wfs_featuretype` (`featuretype_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wfs_featuretype`
---
-ALTER TABLE `wfs_featuretype`
- ADD CONSTRAINT `wfs_featuretype_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wfs_featuretype_namespace`
---
-ALTER TABLE `wfs_featuretype_namespace`
- ADD CONSTRAINT `wfs_featuretype_namespace_ibfk_2` FOREIGN KEY (`fkey_featuretype_id`) REFERENCES `wfs_featuretype` (`featuretype_id`) ON DELETE CASCADE ON UPDATE CASCADE,
- ADD CONSTRAINT `wfs_featuretype_namespace_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
-
---
--- Constraints der Tabelle `wms_format`
---
-ALTER TABLE `wms_format`
- ADD CONSTRAINT `wms_format_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- Constraints der Tabelle `wms_srs`
---
-ALTER TABLE `wms_srs`
- ADD CONSTRAINT `wms_srs_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
-
---
--- changes in version 2.4.1
---
-
---
--- new table: keyword
---
-CREATE TABLE keyword
-(
-keyword_id int(11) NOT NULL auto_increment,
-keyword varchar(255) NOT NULL,
-PRIMARY KEY (keyword_id)
-) TYPE=InnoDB;
-
-ALTER TABLE keyword
- ADD CONSTRAINT keyword_keyword_key UNIQUE (keyword);
-
---
--- Index: ind_keyword
---
-ALTER TABLE `keyword` ADD INDEX `ind_keyword` ( `keyword` ) ;
-
---
--- new table: layer_keyword
---
-CREATE TABLE layer_keyword
-(
- fkey_layer_id int(11) NOT NULL,
- fkey_keyword_id int(11) NOT NULL
-
-) TYPE=InnoDB;
-
-ALTER TABLE layer_keyword
-ADD CONSTRAINT fkey_keyword_id_fkey_layer_id FOREIGN KEY (fkey_keyword_id)
-REFERENCES keyword (keyword_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
-
-ALTER TABLE layer_keyword
-ADD CONSTRAINT fkey_layer_id_fkey_keyword_id FOREIGN KEY (fkey_layer_id)
-REFERENCES layer (layer_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
-
---
--- new columns in table wms
---
-ALTER TABLE wms ADD fees varchar(255) NULL;
-ALTER TABLE wms ADD accessconstraints text NULL;
-ALTER TABLE wms ADD contactperson varchar(255) NULL;
-ALTER TABLE wms ADD contactposition varchar(255) NULL;
-ALTER TABLE wms ADD contactorganization varchar(255) NULL;
-ALTER TABLE wms ADD address varchar(255) NULL;
-ALTER TABLE wms ADD city varchar(255) NULL;
-ALTER TABLE wms ADD stateorprovince varchar(255) NULL;
-ALTER TABLE wms ADD postcode varchar(255) NULL;
-ALTER TABLE wms ADD country varchar(255) NULL;
-ALTER TABLE wms ADD contactvoicetelephone varchar(255) NULL;
-ALTER TABLE wms ADD contactfacsimiletelephone varchar(255) NULL;
-ALTER TABLE wms ADD contactelectronicmailaddress varchar(255) NULL;
-ALTER TABLE wms ADD wms_mb_getcapabilies_doc text NULL;
-ALTER TABLE wms ADD wms_owner int(11) NULL;
-ALTER TABLE wms ADD wms_timestamp int(11) NULL;
-ALTER TABLE layer ADD layer_abstract text NULL;
-
-
---
--- new table: md_topic_category
---
-CREATE TABLE md_topic_category (
- md_topic_category_id int(11) NOT NULL auto_increment,
- md_topic_category_code_en varchar(255),
- md_topic_category_code_de varchar(255),
- PRIMARY KEY (md_topic_category_id)
-) TYPE=InnoDB;
-
-
---
--- new table: wms_md_topic_category
---
-CREATE TABLE wms_md_topic_category (
- fkey_wms_id int(11) NOT NULL,
- fkey_md_topic_category_id int(11) NOT NULL
-) TYPE=InnoDB;
-
-ALTER TABLE wms_md_topic_category
-ADD CONSTRAINT wms_md_topic_category_fkey_md_topic_category_id_fkey FOREIGN KEY (fkey_md_topic_category_id)
-REFERENCES md_topic_category (md_topic_category_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
-
-ALTER TABLE wms_md_topic_category
-ADD CONSTRAINT wms_md_topic_category_fkey_wms_id_fkey FOREIGN KEY (fkey_wms_id)
-REFERENCES wms (wms_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
-
--- wms_owner has to be set
--- Update wms set wms_owner =1;
-
---
--- add missing primary keys
---
-ALTER TABLE gui_layer ADD CONSTRAINT pk_gui_layer PRIMARY KEY (fkey_gui_id,fkey_layer_id);
-
-ALTER TABLE gui_wms ADD CONSTRAINT pk_gui_wms PRIMARY KEY (fkey_gui_id,fkey_wms_id);
-
-ALTER TABLE layer_keyword ADD CONSTRAINT pk_layer_keyword PRIMARY KEY (fkey_layer_id,fkey_keyword_id);
-
-ALTER TABLE mb_user_wmc ADD CONSTRAINT pk_user_wmc PRIMARY KEY (wmc_id);
-
-ALTER TABLE wfs_element ADD CONSTRAINT pk_wfs_element PRIMARY KEY (fkey_featuretype_id,element_id);
-
-ALTER TABLE wms_format ADD CONSTRAINT pk_wms_format PRIMARY KEY (fkey_wms_id,data_type,data_format);
-
-ALTER TABLE wms_md_topic_category ADD CONSTRAINT pk_md_topic_category PRIMARY KEY (fkey_wms_id,fkey_md_topic_category_id);
-
-ALTER TABLE wms_srs ADD CONSTRAINT pk_wms_srs PRIMARY KEY (fkey_wms_id,wms_srs);
-
-ALTER TABLE wfs_featuretype_namespace ADD CONSTRAINT pk_featuretype_namespace PRIMARY KEY (fkey_wfs_id,fkey_featuretype_id,namespace);
-
-ALTER TABLE mb_monitor ADD CONSTRAINT pk_mb_monitor PRIMARY KEY (upload_id,fkey_wms_id);
-
-ALTER TABLE mb_log ADD CONSTRAINT pk_mb_log PRIMARY KEY (id);
-
-
-SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
Copied: branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql (from rev 2139, branches/2.4.5/resources/db/mysql/mysql_schema.sql)
===================================================================
--- branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql (rev 0)
+++ branches/2.4.5_rc1/resources/db/mysql/mysql_schema.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,755 @@
+
+SET FOREIGN_KEY_CHECKS=0;
+--
+-- Datenbank: mb2.4.3
+--
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui`
+--
+
+CREATE TABLE gui (
+ gui_id varchar(50) NOT NULL default '',
+ gui_name varchar(50) NOT NULL default '',
+ gui_description varchar(255) NOT NULL default '',
+ gui_public tinyint(4) NOT NULL default '1',
+ PRIMARY KEY (gui_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_element`
+--
+
+CREATE TABLE gui_element (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ e_id varchar(50) NOT NULL default '',
+ e_pos tinyint(4) unsigned zerofill default NULL,
+ e_public tinyint(1) unsigned zerofill default NULL,
+ e_comment text,
+ e_element varchar(255) NOT NULL default '',
+ e_src varchar(255) default NULL,
+ e_attributes longtext,
+ e_left int(4) default NULL,
+ e_top int(4) default NULL,
+ e_width int(4) unsigned default NULL,
+ e_height int(4) unsigned default NULL,
+ e_z_index tinyint(3) unsigned default NULL,
+ e_more_styles longtext,
+ e_content longtext,
+ e_closetag varchar(255) default NULL,
+ e_js_file varchar(50) default NULL,
+ e_mb_mod varchar(50) default NULL,
+ e_target varchar(50) default NULL,
+ e_requires varchar(50) default NULL,
+ e_url VARCHAR(255) NULL,
+ e_title varchar(255),
+ PRIMARY KEY (fkey_gui_id,e_id),
+ KEY idx_gui_id_e_id (fkey_gui_id,e_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_element_vars`
+--
+
+CREATE TABLE gui_element_vars (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_e_id varchar(50) NOT NULL default '',
+ var_name varchar(50) NOT NULL default '',
+ var_value text,
+ context text,
+ var_type varchar(50) default NULL,
+ PRIMARY KEY (fkey_gui_id,fkey_e_id,var_name),
+ KEY idx_elementvars (fkey_gui_id,fkey_e_id,var_name)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_layer`
+--
+
+CREATE TABLE gui_layer (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_layer_id int(11) NOT NULL default '0',
+ gui_layer_wms_id int(11) default '0',
+ gui_layer_status smallint(6) default '1',
+ gui_layer_selectable smallint(6) default '1',
+ gui_layer_visible smallint(6) default '1',
+ gui_layer_queryable smallint(6) default '0',
+ gui_layer_querylayer int(11) default '0',
+ gui_layer_minscale int(11) unsigned default '0',
+ gui_layer_maxscale int(11) unsigned default '0',
+ gui_layer_priority int(6) default NULL,
+ gui_layer_style varchar(50) default NULL,
+ gui_layer_wfs_featuretype varchar(255) default NULL,
+ KEY gui_index (fkey_gui_id),
+ KEY layer_index (fkey_layer_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_mb_group`
+--
+
+CREATE TABLE gui_mb_group (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_mb_group_id int(11) NOT NULL default '0',
+ mb_group_type varchar(50) NOT NULL default '',
+ PRIMARY KEY (fkey_gui_id,fkey_mb_group_id),
+ KEY fkey_mb_group_id (fkey_mb_group_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_mb_user`
+--
+
+CREATE TABLE gui_mb_user (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_mb_user_id int(11) NOT NULL default '0',
+ mb_user_type varchar(50) default NULL,
+ PRIMARY KEY (fkey_gui_id,fkey_mb_user_id),
+ KEY fkey_mb_user_id (fkey_mb_user_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_treegde`
+--
+
+CREATE TABLE gui_treegde (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_layer_id text,
+ id int(11) NOT NULL auto_increment,
+ lft int(11) NOT NULL default '0',
+ rgt int(11) NOT NULL default '0',
+ my_layer_title varchar(50) default NULL,
+ layer text,
+ wms_id text,
+ PRIMARY KEY (fkey_gui_id,id,lft,rgt),
+ KEY tree_ind (id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_wfs`
+--
+
+CREATE TABLE gui_wfs (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_wfs_id int(11) NOT NULL default '0',
+ PRIMARY KEY (fkey_gui_id,fkey_wfs_id),
+ KEY fkey_wfs_id (fkey_wfs_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `gui_wms`
+--
+
+CREATE TABLE gui_wms (
+ fkey_gui_id varchar(50) NOT NULL default '',
+ fkey_wms_id int(11) NOT NULL default '0',
+ gui_wms_position int(11) NOT NULL default '0',
+ gui_wms_mapformat varchar(50) NOT NULL default '',
+ gui_wms_featureinfoformat varchar(50) NOT NULL default '',
+ gui_wms_exceptionformat varchar(50) NOT NULL default '',
+ gui_wms_epsg varchar(50) NOT NULL default '',
+ gui_wms_visible smallint(6) NOT NULL default '1',
+ KEY gui_index (fkey_gui_id),
+ KEY wms_index (fkey_wms_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `layer`
+--
+
+CREATE TABLE layer (
+ layer_id int(11) NOT NULL auto_increment,
+ fkey_wms_id int(11) NOT NULL default '0',
+ layer_pos int(11) NOT NULL default '0',
+ layer_parent varchar(50) NOT NULL default '',
+ layer_name varchar(255) NOT NULL default '',
+ layer_title varchar(255) NOT NULL default '',
+ layer_queryable smallint(6) NOT NULL default '0',
+ layer_minscale int(11) default '0',
+ layer_maxscale int(11) default '0',
+ layer_dataurl varchar(255) default NULL,
+ layer_metadataurl varchar(255) default NULL,
+ PRIMARY KEY (layer_id),
+ KEY wms_index (fkey_wms_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `layer_epsg`
+--
+
+CREATE TABLE layer_epsg (
+ fkey_layer_id int(11) NOT NULL default '0',
+ epsg varchar(50) NOT NULL default '',
+ minx double default '0',
+ miny double default '0',
+ maxx double default '0',
+ maxy double default '0',
+ KEY layer_index (fkey_layer_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `layer_style`
+--
+
+CREATE TABLE layer_style (
+ fkey_layer_id int(11) NOT NULL default '0',
+ name varchar(50) NOT NULL default '',
+ title varchar(100) NOT NULL default '',
+ legendurl varchar(255) default NULL,
+ legendurlformat varchar(50) default NULL,
+ KEY layer_index (fkey_layer_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `mb_group`
+--
+
+CREATE TABLE mb_group (
+ mb_group_id int(11) NOT NULL auto_increment,
+ mb_group_name varchar(50) NOT NULL default '',
+ mb_group_owner int(4) default NULL,
+ mb_group_description varchar(255) NOT NULL default '',
+ PRIMARY KEY (mb_group_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `mb_log`
+--
+
+CREATE TABLE mb_log (
+ id bigint(20) NOT NULL auto_increment,
+ time_client varchar(13) default '0',
+ time_server varchar(13) default NULL,
+ time_readable varchar(50) default NULL,
+ mb_session varchar(50) default NULL,
+ gui varchar(50) default NULL,
+ module varchar(50) default NULL,
+ ip varchar(20) default NULL,
+ username varchar(50) default NULL,
+ userid varchar(50) default NULL,
+ request text,
+ KEY logindex (id)
+) TYPE=MyISAM;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle mb_monitor
+--
+CREATE TABLE mb_monitor (
+ upload_id varchar(255) NOT NULL default '',
+ fkey_wms_id int NOT NULL default '0',
+ status int4 NOT NULL,
+ status_comment varchar(255) NOT NULL default '',
+ timestamp_begin int4 NOT NULL,
+ timestamp_end int4 NOT NULL,
+ upload_url varchar(255) NOT NULL default '',
+ updated char(1) NOT NULL default ''
+) TYPE=InnoDb;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `mb_user`
+--
+CREATE TABLE mb_user (
+ mb_user_id int(11) NOT NULL auto_increment,
+ mb_user_name varchar(50) NOT NULL default '',
+ mb_user_password varchar(50) NOT NULL default '',
+ mb_user_owner int(11) NOT NULL default '0',
+ mb_user_description varchar(255) default NULL,
+ mb_user_login_count int(4) unsigned NOT NULL default '0',
+ mb_user_email varchar(50) default NULL,
+ mb_user_phone varchar(50) default NULL,
+ mb_user_department varchar(255) default NULL,
+ mb_user_resolution int(4) NOT NULL default '72',
+ mb_user_organisation_name varchar(255) default NULL,
+ mb_user_position_name varchar(255) default NULL,
+ mb_user_phone1 varchar(255) default NULL,
+ mb_user_facsimile varchar(255) default NULL,
+ mb_user_delivery_point varchar(255) default NULL,
+ mb_user_city varchar(255) default NULL,
+ mb_user_postal_code int(4) default NULL,
+ mb_user_country varchar(255) default NULL,
+ mb_user_online_resource varchar(255) default NULL,
+ PRIMARY KEY (mb_user_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `mb_user_mb_group`
+--
+
+CREATE TABLE mb_user_mb_group (
+ fkey_mb_user_id int(11) NOT NULL default '0',
+ fkey_mb_group_id int(11) NOT NULL default '0',
+ PRIMARY KEY (fkey_mb_user_id,fkey_mb_group_id),
+ KEY fkey_mb_group_id (fkey_mb_group_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `mb_user_wmc`
+--
+
+CREATE TABLE mb_user_wmc (
+ wmc_id varchar(20) NOT NULL default '',
+ fkey_user_id int(11) NOT NULL default '0',
+ wmc longtext NOT NULL,
+ wmc_title varchar(50) default NULL,
+ wmc_timestamp int(10) default NULL,
+ KEY fkey_user_id (fkey_user_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs`
+--
+
+CREATE TABLE wfs (
+ wfs_id int(11) NOT NULL auto_increment,
+ wfs_version varchar(50) default NULL,
+ wfs_name varchar(255) default NULL,
+ wfs_title varchar(255) default NULL,
+ wfs_abstract text,
+ wfs_getcapabilities varchar(255) default NULL,
+ wfs_describefeaturetype varchar(255) default NULL,
+ wfs_getfeature varchar(255) default NULL,
+ wfs_transaction varchar(255) default NULL,
+ wfs_owsproxy VARCHAR(50) NULL,
+ PRIMARY KEY (wfs_id),
+ KEY wfs_ (wfs_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs_conf`
+--
+
+CREATE TABLE wfs_conf (
+ wfs_conf_id int(11) NOT NULL auto_increment,
+ wfs_conf_abstract text,
+ fkey_wfs_id int(11) NOT NULL default '0',
+ fkey_featuretype_id int(11) NOT NULL default '0',
+ g_label varchar(50) default NULL,
+ g_label_id varchar(50) default NULL,
+ g_button varchar(50) default NULL,
+ g_button_id varchar(50) default NULL,
+ g_style text,
+ g_buffer float default '0',
+ g_res_style text,
+ g_use_wzgraphics int(10) unsigned default '0',
+ PRIMARY KEY (wfs_conf_id),
+ KEY fkey_wfs_id (fkey_wfs_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs_conf_element`
+--
+
+CREATE TABLE wfs_conf_element (
+ wfs_conf_element_id int(11) unsigned NOT NULL auto_increment,
+ fkey_wfs_conf_id int(11) NOT NULL default '0',
+ f_id int(11) NOT NULL default '0',
+ f_geom tinyint(3) unsigned default '0',
+ f_gid tinyint(3) unsigned NOT NULL default '0',
+ f_search tinyint(3) unsigned default NULL,
+ f_pos int(11) default NULL,
+ f_style_id varchar(255) default NULL,
+ f_toupper int(11) unsigned default NULL,
+ f_label varchar(255) default NULL,
+ f_label_id varchar(50) default NULL,
+ f_show tinyint(3) unsigned default NULL,
+ f_respos int(11) default NULL,
+ f_form_element_html TEXT NULL,
+ f_edit int4,
+ f_mandatory int4,
+ f_auth_varname VARCHAR(50),
+ PRIMARY KEY (wfs_conf_element_id),
+ KEY fkey_wfs_conf_id (fkey_wfs_conf_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs_element`
+--
+
+CREATE TABLE wfs_element (
+ fkey_featuretype_id int(11) NOT NULL default '0',
+ element_id int(11) NOT NULL auto_increment,
+ element_name varchar(50) default NULL,
+ element_type varchar(50) default NULL,
+ KEY element_ind0 (fkey_featuretype_id),
+ KEY element_ind1 (element_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs_featuretype`
+--
+
+CREATE TABLE wfs_featuretype (
+ fkey_wfs_id int(11) NOT NULL default '0',
+ featuretype_id int(11) NOT NULL auto_increment,
+ featuretype_name varchar(50) NOT NULL default '',
+ featuretype_title varchar(50) default NULL,
+ featuretype_srs varchar(50) default NULL,
+ PRIMARY KEY (featuretype_id),
+ KEY wfs_ind (fkey_wfs_id),
+ KEY wfs_ind2 (featuretype_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wfs_featuretype_namespace`
+--
+
+CREATE TABLE `wfs_featuretype_namespace` (
+ `fkey_wfs_id` int(11) NOT NULL default '0',
+ `fkey_featuretype_id` int(11) NOT NULL default '0',
+ `namespace` varchar(255) NOT NULL default '',
+ `namespace_location` varchar(255) NOT NULL default '',
+ KEY `wfs_id` (`fkey_wfs_id`),
+ KEY `featuretype_id` (`fkey_featuretype_id`)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wms`
+--
+
+CREATE TABLE wms (
+ wms_id int(11) NOT NULL auto_increment,
+ wms_version varchar(50) NOT NULL default '',
+ wms_title varchar(255) NOT NULL default '',
+ wms_abstract text,
+ wms_getcapabilities varchar(255) NOT NULL default '',
+ wms_getmap varchar(255) NOT NULL default '',
+ wms_getfeatureinfo varchar(255) NOT NULL default '',
+ wms_getlegendurl varchar(255) default NULL,
+ wms_filter varchar(255) default NULL,
+ wms_getcapabilities_doc longtext,
+ wms_owsproxy VARCHAR(50) NULL,
+ wms_upload_url VARCHAR(255) NULL,
+ PRIMARY KEY (wms_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wms_format`
+--
+
+CREATE TABLE wms_format (
+ fkey_wms_id int(11) NOT NULL default '0',
+ data_type varchar(50) NOT NULL default '',
+ data_format varchar(100) NOT NULL default '',
+ KEY wms_index (fkey_wms_id)
+) TYPE=InnoDB;
+
+-- --------------------------------------------------------
+
+--
+-- Tabellenstruktur f�r Tabelle `wms_srs`
+--
+
+CREATE TABLE wms_srs (
+ fkey_wms_id int(11) NOT NULL default '0',
+ wms_srs varchar(50) NOT NULL default '',
+ KEY wms_index (fkey_wms_id)
+) TYPE=InnoDB;
+
+--
+-- Constraints der exportierten Tabellen
+--
+
+--
+-- Constraints der Tabelle `gui_element`
+--
+ALTER TABLE `gui_element`
+ ADD CONSTRAINT `gui_element_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_element_vars`
+--
+ALTER TABLE `gui_element_vars`
+ ADD CONSTRAINT `gui_element_vars_ibfk_1` FOREIGN KEY (`fkey_gui_id`, `fkey_e_id`) REFERENCES `gui_element` (`fkey_gui_id`, `e_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_layer`
+--
+ALTER TABLE `gui_layer`
+ ADD CONSTRAINT `gui_layer_ibfk_3` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `gui_layer_ibfk_4` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_mb_group`
+--
+ALTER TABLE `gui_mb_group`
+ ADD CONSTRAINT `gui_mb_group_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `gui_mb_group_ibfk_2` FOREIGN KEY (`fkey_mb_group_id`) REFERENCES `mb_group` (`mb_group_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_mb_user`
+--
+ALTER TABLE `gui_mb_user`
+ ADD CONSTRAINT `gui_mb_user_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `gui_mb_user_ibfk_2` FOREIGN KEY (`fkey_mb_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_treegde`
+--
+ALTER TABLE `gui_treegde`
+ ADD CONSTRAINT `gui_treegde_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_wfs`
+--
+ALTER TABLE `gui_wfs`
+ ADD CONSTRAINT `gui_wfs_ibfk_1` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `gui_wfs_ibfk_2` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `gui_wms`
+--
+ALTER TABLE `gui_wms`
+ ADD CONSTRAINT `gui_wms_ibfk_3` FOREIGN KEY (`fkey_gui_id`) REFERENCES `gui` (`gui_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `gui_wms_ibfk_4` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `layer`
+--
+ALTER TABLE `layer`
+ ADD CONSTRAINT `layer_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `layer_epsg`
+--
+ALTER TABLE `layer_epsg`
+ ADD CONSTRAINT `layer_epsg_ibfk_1` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `layer_style`
+--
+ALTER TABLE `layer_style`
+ ADD CONSTRAINT `layer_style_ibfk_1` FOREIGN KEY (`fkey_layer_id`) REFERENCES `layer` (`layer_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle mb_monitor
+--
+ALTER TABLE mb_monitor ADD CONSTRAINT mb_monitor_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms (wms_id) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `mb_user_mb_group`
+--
+ALTER TABLE `mb_user_mb_group`
+ ADD CONSTRAINT `fkey_mb_user_mb_group_mb_use_id` FOREIGN KEY (`fkey_mb_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `mb_user_mb_group_ibfk_1` FOREIGN KEY (`fkey_mb_group_id`) REFERENCES `mb_group` (`mb_group_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `mb_user_wmc`
+--
+ALTER TABLE `mb_user_wmc`
+ ADD CONSTRAINT `mb_user_wmc_ibfk_1` FOREIGN KEY (`fkey_user_id`) REFERENCES `mb_user` (`mb_user_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wfs_conf`
+--
+ALTER TABLE `wfs_conf`
+ ADD CONSTRAINT `wfs_conf_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wfs_conf_element`
+--
+ALTER TABLE `wfs_conf_element`
+ ADD CONSTRAINT `wfs_conf_element_ibfk_1` FOREIGN KEY (`fkey_wfs_conf_id`) REFERENCES `wfs_conf` (`wfs_conf_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wfs_element`
+--
+ALTER TABLE `wfs_element`
+ ADD CONSTRAINT `wfs_element_ibfk_1` FOREIGN KEY (`fkey_featuretype_id`) REFERENCES `wfs_featuretype` (`featuretype_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wfs_featuretype`
+--
+ALTER TABLE `wfs_featuretype`
+ ADD CONSTRAINT `wfs_featuretype_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wfs_featuretype_namespace`
+--
+ALTER TABLE `wfs_featuretype_namespace`
+ ADD CONSTRAINT `wfs_featuretype_namespace_ibfk_2` FOREIGN KEY (`fkey_featuretype_id`) REFERENCES `wfs_featuretype` (`featuretype_id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ ADD CONSTRAINT `wfs_featuretype_namespace_ibfk_1` FOREIGN KEY (`fkey_wfs_id`) REFERENCES `wfs` (`wfs_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+
+--
+-- Constraints der Tabelle `wms_format`
+--
+ALTER TABLE `wms_format`
+ ADD CONSTRAINT `wms_format_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- Constraints der Tabelle `wms_srs`
+--
+ALTER TABLE `wms_srs`
+ ADD CONSTRAINT `wms_srs_ibfk_1` FOREIGN KEY (`fkey_wms_id`) REFERENCES `wms` (`wms_id`) ON DELETE CASCADE ON UPDATE CASCADE;
+
+--
+-- changes in version 2.4.1
+--
+
+--
+-- new table: keyword
+--
+CREATE TABLE keyword
+(
+keyword_id int(11) NOT NULL auto_increment,
+keyword varchar(255) NOT NULL,
+PRIMARY KEY (keyword_id)
+) TYPE=InnoDB;
+
+ALTER TABLE keyword
+ ADD CONSTRAINT keyword_keyword_key UNIQUE (keyword);
+
+--
+-- Index: ind_keyword
+--
+ALTER TABLE `keyword` ADD INDEX `ind_keyword` ( `keyword` ) ;
+
+--
+-- new table: layer_keyword
+--
+CREATE TABLE layer_keyword
+(
+ fkey_layer_id int(11) NOT NULL,
+ fkey_keyword_id int(11) NOT NULL
+
+) TYPE=InnoDB;
+
+ALTER TABLE layer_keyword
+ADD CONSTRAINT fkey_keyword_id_fkey_layer_id FOREIGN KEY (fkey_keyword_id)
+REFERENCES keyword (keyword_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
+
+ALTER TABLE layer_keyword
+ADD CONSTRAINT fkey_layer_id_fkey_keyword_id FOREIGN KEY (fkey_layer_id)
+REFERENCES layer (layer_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
+
+--
+-- new columns in table wms
+--
+ALTER TABLE wms ADD fees varchar(255) NULL;
+ALTER TABLE wms ADD accessconstraints text NULL;
+ALTER TABLE wms ADD contactperson varchar(255) NULL;
+ALTER TABLE wms ADD contactposition varchar(255) NULL;
+ALTER TABLE wms ADD contactorganization varchar(255) NULL;
+ALTER TABLE wms ADD address varchar(255) NULL;
+ALTER TABLE wms ADD city varchar(255) NULL;
+ALTER TABLE wms ADD stateorprovince varchar(255) NULL;
+ALTER TABLE wms ADD postcode varchar(255) NULL;
+ALTER TABLE wms ADD country varchar(255) NULL;
+ALTER TABLE wms ADD contactvoicetelephone varchar(255) NULL;
+ALTER TABLE wms ADD contactfacsimiletelephone varchar(255) NULL;
+ALTER TABLE wms ADD contactelectronicmailaddress varchar(255) NULL;
+ALTER TABLE wms ADD wms_mb_getcapabilies_doc text NULL;
+ALTER TABLE wms ADD wms_owner int(11) NULL;
+ALTER TABLE wms ADD wms_timestamp int(11) NULL;
+ALTER TABLE layer ADD layer_abstract text NULL;
+
+
+--
+-- new table: md_topic_category
+--
+CREATE TABLE md_topic_category (
+ md_topic_category_id int(11) NOT NULL auto_increment,
+ md_topic_category_code_en varchar(255),
+ md_topic_category_code_de varchar(255),
+ PRIMARY KEY (md_topic_category_id)
+) TYPE=InnoDB;
+
+
+--
+-- new table: wms_md_topic_category
+--
+CREATE TABLE wms_md_topic_category (
+ fkey_wms_id int(11) NOT NULL,
+ fkey_md_topic_category_id int(11) NOT NULL
+) TYPE=InnoDB;
+
+ALTER TABLE wms_md_topic_category
+ADD CONSTRAINT wms_md_topic_category_fkey_md_topic_category_id_fkey FOREIGN KEY (fkey_md_topic_category_id)
+REFERENCES md_topic_category (md_topic_category_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
+
+ALTER TABLE wms_md_topic_category
+ADD CONSTRAINT wms_md_topic_category_fkey_wms_id_fkey FOREIGN KEY (fkey_wms_id)
+REFERENCES wms (wms_id) MATCH SIMPLE ON UPDATE CASCADE ON DELETE CASCADE;
+
+-- wms_owner has to be set
+-- Update wms set wms_owner =1;
+
+--
+-- add missing primary keys
+--
+ALTER TABLE gui_layer ADD CONSTRAINT pk_gui_layer PRIMARY KEY (fkey_gui_id,fkey_layer_id);
+
+ALTER TABLE gui_wms ADD CONSTRAINT pk_gui_wms PRIMARY KEY (fkey_gui_id,fkey_wms_id);
+
+ALTER TABLE layer_keyword ADD CONSTRAINT pk_layer_keyword PRIMARY KEY (fkey_layer_id,fkey_keyword_id);
+
+ALTER TABLE mb_user_wmc ADD CONSTRAINT pk_user_wmc PRIMARY KEY (wmc_id);
+
+ALTER TABLE wfs_element ADD CONSTRAINT pk_wfs_element PRIMARY KEY (fkey_featuretype_id,element_id);
+
+ALTER TABLE wms_format ADD CONSTRAINT pk_wms_format PRIMARY KEY (fkey_wms_id,data_type,data_format);
+
+ALTER TABLE wms_md_topic_category ADD CONSTRAINT pk_md_topic_category PRIMARY KEY (fkey_wms_id,fkey_md_topic_category_id);
+
+ALTER TABLE wms_srs ADD CONSTRAINT pk_wms_srs PRIMARY KEY (fkey_wms_id,wms_srs);
+
+ALTER TABLE wfs_featuretype_namespace ADD CONSTRAINT pk_featuretype_namespace PRIMARY KEY (fkey_wfs_id,fkey_featuretype_id,namespace);
+
+ALTER TABLE mb_monitor ADD CONSTRAINT pk_mb_monitor PRIMARY KEY (upload_id,fkey_wms_id);
+
+ALTER TABLE mb_log ADD CONSTRAINT pk_mb_log PRIMARY KEY (id);
+
+
+SET FOREIGN_KEY_CHECKS=1;
\ No newline at end of file
Deleted: branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql
===================================================================
--- branches/2.4.5/resources/db/postgresql/pgsql_schema.sql 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,1080 +0,0 @@
---
--- PostgreSQL database dump Mapbender 2.4.3
---
-
-
-
-CREATE TABLE gui (
- gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_name character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_description character varying(255) DEFAULT ''::character varying NOT NULL,
- gui_public integer DEFAULT 1 NOT NULL
-);
-
-
---
--- TOC entry 1239 (class 1259 OID 47913127)
--- Dependencies: 1607 1608 1609 4
--- Name: gui_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_element (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- e_id character varying(50) DEFAULT ''::character varying NOT NULL,
- e_pos integer,
- e_public integer,
- e_comment text,
- e_title character varying(255),
- e_element character varying(255) DEFAULT ''::character varying NOT NULL,
- e_src character varying(255),
- e_attributes text,
- e_left integer,
- e_top integer,
- e_width integer,
- e_height integer,
- e_z_index integer,
- e_more_styles text,
- e_content text,
- e_closetag character varying(255),
- e_js_file character varying(50),
- e_mb_mod character varying(50),
- e_target character varying(50),
- e_requires character varying(50),
- e_url character varying(255)
-);
-
-
---
--- TOC entry 1240 (class 1259 OID 47913135)
--- Dependencies: 1610 1611 1612 4
--- Name: gui_element_vars; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_element_vars (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_e_id character varying(50) DEFAULT ''::character varying NOT NULL,
- var_name character varying(50) DEFAULT ''::character varying NOT NULL,
- var_value text,
- context text,
- var_type character varying(50)
-);
-
-
---
--- TOC entry 1241 (class 1259 OID 47913143)
--- Dependencies: 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 4
--- Name: gui_layer; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_layer (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_layer_id integer DEFAULT 0 NOT NULL,
- gui_layer_wms_id integer DEFAULT 0,
- gui_layer_status integer DEFAULT 1,
- gui_layer_selectable integer DEFAULT 1,
- gui_layer_visible integer DEFAULT 1,
- gui_layer_queryable integer DEFAULT 0,
- gui_layer_querylayer integer DEFAULT 0,
- gui_layer_minscale integer DEFAULT 0,
- gui_layer_maxscale integer DEFAULT 0,
- gui_layer_priority integer,
- gui_layer_style character varying(50),
- gui_layer_wfs_featuretype character varying(50)
-);
-
-
---
--- TOC entry 1242 (class 1259 OID 47913155)
--- Dependencies: 1623 1624 1625 4
--- Name: gui_mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_mb_group (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_mb_group_id integer DEFAULT 0 NOT NULL,
- mb_group_type character varying(50) DEFAULT ''::character varying NOT NULL
-);
-
-
---
--- TOC entry 1243 (class 1259 OID 47913160)
--- Dependencies: 1626 1627 4
--- Name: gui_mb_user; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_mb_user (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_mb_user_id integer DEFAULT 0 NOT NULL,
- mb_user_type character varying(50)
-);
-
-
---
--- TOC entry 1245 (class 1259 OID 47913166)
--- Dependencies: 1628 1630 1631 4
--- Name: gui_treegde; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_treegde (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_layer_id text,
- id serial NOT NULL,
- lft integer DEFAULT 0 NOT NULL,
- rgt integer DEFAULT 0 NOT NULL,
- my_layer_title character varying(50),
- layer text,
- wms_id text
-);
-
-
---
--- TOC entry 1246 (class 1259 OID 47913175)
--- Dependencies: 1632 1633 4
--- Name: gui_wfs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_wfs (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_wfs_id integer DEFAULT 0 NOT NULL
-);
-
-
---
--- TOC entry 1247 (class 1259 OID 47913179)
--- Dependencies: 1634 1635 1636 1637 1638 1639 1640 1641 4
--- Name: gui_wms; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE gui_wms (
- fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
- fkey_wms_id integer DEFAULT 0 NOT NULL,
- gui_wms_position integer DEFAULT 0 NOT NULL,
- gui_wms_mapformat character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_wms_featureinfoformat character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_wms_exceptionformat character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_wms_epsg character varying(50) DEFAULT ''::character varying NOT NULL,
- gui_wms_visible integer DEFAULT 1 NOT NULL
-);
-
-
---
--- TOC entry 1277 (class 1259 OID 48558625)
--- Dependencies: 4
--- Name: keyword; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE keyword (
- keyword_id serial NOT NULL,
- keyword character varying(255) NOT NULL
-);
-
-
---
--- TOC entry 1249 (class 1259 OID 47913191)
--- Dependencies: 1643 1644 1645 1646 1647 1648 1649 1650 4
--- Name: layer; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE layer (
- layer_id serial NOT NULL,
- fkey_wms_id integer DEFAULT 0 NOT NULL,
- layer_pos integer DEFAULT 0 NOT NULL,
- layer_parent character varying(50) DEFAULT ''::character varying NOT NULL,
- layer_name character varying(255) DEFAULT ''::character varying NOT NULL,
- layer_title character varying(255) DEFAULT ''::character varying NOT NULL,
- layer_queryable integer DEFAULT 0 NOT NULL,
- layer_minscale integer DEFAULT 0,
- layer_maxscale integer DEFAULT 0,
- layer_dataurl character varying(255),
- layer_metadataurl character varying(255),
- layer_abstract text
-);
-
-
---
--- TOC entry 1250 (class 1259 OID 47913205)
--- Dependencies: 1651 1652 1653 1654 1655 1656 4
--- Name: layer_epsg; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE layer_epsg (
- fkey_layer_id integer DEFAULT 0 NOT NULL,
- epsg character varying(50) DEFAULT ''::character varying NOT NULL,
- minx double precision DEFAULT 0,
- miny double precision DEFAULT 0,
- maxx double precision DEFAULT 0,
- maxy double precision DEFAULT 0
-);
-
-
---
--- TOC entry 1278 (class 1259 OID 48558633)
--- Dependencies: 4
--- Name: layer_keyword; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE layer_keyword (
- fkey_layer_id integer NOT NULL,
- fkey_keyword_id integer NOT NULL
-);
-
-
---
--- TOC entry 1251 (class 1259 OID 47913213)
--- Dependencies: 1657 1658 1659 4
--- Name: layer_style; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE layer_style (
- fkey_layer_id integer DEFAULT 0 NOT NULL,
- name character varying(50) DEFAULT ''::character varying NOT NULL,
- title character varying(100) DEFAULT ''::character varying NOT NULL,
- legendurl character varying(255),
- legendurlformat character varying(50)
-);
-
-
---
--- TOC entry 1253 (class 1259 OID 47913220)
--- Dependencies: 1661 1662 4
--- Name: mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_group (
- mb_group_id serial NOT NULL,
- mb_group_name character varying(50) DEFAULT ''::character varying NOT NULL,
- mb_group_owner integer,
- mb_group_description character varying(255) DEFAULT ''::character varying NOT NULL
-);
-
-
---
--- TOC entry 1255 (class 1259 OID 47913227)
--- Dependencies: 1664 4
--- Name: mb_log; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_log (
- id serial NOT NULL,
- time_client character varying(13) DEFAULT 0,
- time_server character varying(13),
- time_readable character varying(50),
- mb_session character varying(50),
- gui character varying(50),
- module character varying(50),
- ip character varying(20),
- username character varying(50),
- userid character varying(50),
- request text
-);
-
-
---
--- TOC entry 1256 (class 1259 OID 47913234)
--- Dependencies: 1665 1666 1667 1668 1669 4
--- Name: mb_monitor; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_monitor (
- upload_id character varying(255) DEFAULT ''::character varying NOT NULL,
- fkey_wms_id integer DEFAULT 0 NOT NULL,
- status integer NOT NULL,
- status_comment character varying(255) DEFAULT ''::character varying NOT NULL,
- timestamp_begin integer NOT NULL,
- timestamp_end integer NOT NULL,
- upload_url character varying(255) DEFAULT ''::character varying NOT NULL,
- updated character(1) DEFAULT ''::bpchar NOT NULL
-);
-
-
---
--- TOC entry 1258 (class 1259 OID 47913246)
--- Dependencies: 1671 1672 1673 1674 1675 4
--- Name: mb_user; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_user (
- mb_user_id serial NOT NULL,
- mb_user_name character varying(50) DEFAULT ''::character varying NOT NULL,
- mb_user_password character varying(50) DEFAULT ''::character varying NOT NULL,
- mb_user_owner integer DEFAULT 0 NOT NULL,
- mb_user_description character varying(255),
- mb_user_login_count integer DEFAULT 0 NOT NULL,
- mb_user_email character varying(50),
- mb_user_phone character varying(50),
- mb_user_department character varying(255),
- mb_user_resolution integer DEFAULT 72 NOT NULL,
- mb_user_organisation_name character varying(255),
- mb_user_position_name character varying(255),
- mb_user_phone1 character varying(255),
- mb_user_facsimile character varying(255),
- mb_user_delivery_point character varying(255),
- mb_user_city character varying(255),
- mb_user_postal_code integer,
- mb_user_country character varying(255),
- mb_user_online_resource character varying(255)
-);
-
-
---
--- TOC entry 1259 (class 1259 OID 47913257)
--- Dependencies: 1676 1677 4
--- Name: mb_user_mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_user_mb_group (
- fkey_mb_user_id integer DEFAULT 0 NOT NULL,
- fkey_mb_group_id integer DEFAULT 0 NOT NULL
-);
-
-
---
--- TOC entry 1260 (class 1259 OID 47913261)
--- Dependencies: 1678 1679 4
--- Name: mb_user_wmc; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE mb_user_wmc (
- wmc_id character varying(20) DEFAULT ''::character varying NOT NULL,
- fkey_user_id integer DEFAULT 0 NOT NULL,
- wmc text NOT NULL,
- wmc_title character varying(50),
- wmc_timestamp integer
-);
-
-
---
--- TOC entry 1280 (class 1259 OID 48558647)
--- Dependencies: 4
--- Name: md_topic_category; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE md_topic_category (
- md_topic_category_id serial NOT NULL,
- md_topic_category_code_en character varying(255),
- md_topic_category_code_de character varying(255)
-);
-
-
-
---
--- TOC entry 1262 (class 1259 OID 47913270)
--- Dependencies: 4
--- Name: wfs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs (
- wfs_id serial NOT NULL,
- wfs_version character varying(50),
- wfs_name character varying(255),
- wfs_title character varying(255),
- wfs_abstract text,
- wfs_getcapabilities character varying(255),
- wfs_describefeaturetype character varying(255),
- wfs_getfeature character varying(255),
- wfs_transaction character varying(255),
- wfs_owsproxy character varying(50)
-);
-
-
---
--- TOC entry 1264 (class 1259 OID 47913278)
--- Dependencies: 1682 1683 1684 1685 4
--- Name: wfs_conf; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs_conf (
- wfs_conf_id serial NOT NULL,
- wfs_conf_abstract text,
- fkey_wfs_id integer DEFAULT 0 NOT NULL,
- fkey_featuretype_id integer DEFAULT 0 NOT NULL,
- g_label character varying(50),
- g_label_id character varying(50),
- g_button character varying(50),
- g_button_id character varying(50),
- g_style text,
- g_buffer double precision DEFAULT 0,
- g_res_style text,
- g_use_wzgraphics integer DEFAULT 0
-);
-
-
---
--- TOC entry 1266 (class 1259 OID 47913290)
--- Dependencies: 1687 1688 1689 1690 4
--- Name: wfs_conf_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs_conf_element (
- wfs_conf_element_id serial NOT NULL,
- fkey_wfs_conf_id integer DEFAULT 0 NOT NULL,
- f_id integer DEFAULT 0 NOT NULL,
- f_geom integer DEFAULT 0,
- f_gid integer DEFAULT 0 NOT NULL,
- f_search integer,
- f_pos integer,
- f_style_id character varying(255),
- f_toupper integer,
- f_label character varying(255),
- f_label_id character varying(50),
- f_show integer,
- f_respos integer,
- f_form_element_html TEXT NULL,
- f_edit int4,
- f_mandatory int4,
- f_auth_varname character varying(255)
-);
-
-
---
--- TOC entry 1268 (class 1259 OID 47913302)
--- Dependencies: 1691 4
--- Name: wfs_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs_element (
- fkey_featuretype_id integer DEFAULT 0 NOT NULL,
- element_id serial NOT NULL,
- element_name character varying(50),
- element_type character varying(50)
-);
-
-
---
--- TOC entry 1270 (class 1259 OID 47913308)
--- Dependencies: 1693 1695 4
--- Name: wfs_featuretype; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs_featuretype (
- fkey_wfs_id integer DEFAULT 0 NOT NULL,
- featuretype_id serial NOT NULL,
- featuretype_name character varying(50) DEFAULT ''::character varying NOT NULL,
- featuretype_title character varying(50),
- featuretype_srs character varying(50)
-);
-
-
---
--- TOC entry 1271 (class 1259 OID 47913313)
--- Dependencies: 1696 1697 1698 1699 4
--- Name: wfs_featuretype_namespace; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wfs_featuretype_namespace (
- fkey_wfs_id integer DEFAULT 0 NOT NULL,
- fkey_featuretype_id integer DEFAULT 0 NOT NULL,
- namespace character varying(255) DEFAULT ''::character varying NOT NULL,
- namespace_location character varying(255) DEFAULT ''::character varying NOT NULL
-);
-
-
---
--- TOC entry 1273 (class 1259 OID 47913324)
--- Dependencies: 1701 1702 1703 1704 1705 4
--- Name: wms; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wms (
- wms_id serial NOT NULL,
- wms_version character varying(50) DEFAULT ''::character varying NOT NULL,
- wms_title character varying(255) DEFAULT ''::character varying NOT NULL,
- wms_abstract text,
- wms_getcapabilities character varying(255) DEFAULT ''::character varying NOT NULL,
- wms_getmap character varying(255) DEFAULT ''::character varying NOT NULL,
- wms_getfeatureinfo character varying(255) DEFAULT ''::character varying NOT NULL,
- wms_getlegendurl character varying(255),
- wms_filter character varying(255),
- wms_getcapabilities_doc text,
- wms_owsproxy character varying(50),
- wms_upload_url character varying(255),
- fees character varying(255),
- accessconstraints text,
- contactperson character varying(255),
- contactposition character varying(255),
- contactorganization character varying(255),
- address character varying(255),
- city character varying(255),
- stateorprovince character varying(255),
- postcode character varying(255),
- country character varying(255),
- contactvoicetelephone character varying(255),
- contactfacsimiletelephone character varying(255),
- contactelectronicmailaddress character varying(255),
- wms_mb_getcapabilies_doc text,
- wms_owner integer,
- wms_timestamp integer
-);
-
-
---
--- TOC entry 1274 (class 1259 OID 47913335)
--- Dependencies: 1706 1707 1708 4
--- Name: wms_format; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wms_format (
- fkey_wms_id integer DEFAULT 0 NOT NULL,
- data_type character varying(50) DEFAULT ''::character varying NOT NULL,
- data_format character varying(100) DEFAULT ''::character varying NOT NULL
-);
-
-
---
--- TOC entry 1281 (class 1259 OID 48558674)
--- Dependencies: 4
--- Name: wms_md_topic_category; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wms_md_topic_category (
- fkey_wms_id integer NOT NULL,
- fkey_md_topic_category_id integer NOT NULL
-);
-
-
---
--- TOC entry 1275 (class 1259 OID 47913340)
--- Dependencies: 1709 1710 4
--- Name: wms_srs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE TABLE wms_srs (
- fkey_wms_id integer DEFAULT 0 NOT NULL,
- wms_srs character varying(50) DEFAULT ''::character varying NOT NULL
-);
-
-
---
--- TOC entry 1745 (class 2606 OID 48558631)
--- Dependencies: 1277 1277
--- Name: keyword_keyword_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY keyword
- ADD CONSTRAINT keyword_keyword_key UNIQUE (keyword);
-
-
---
--- TOC entry 1749 (class 2606 OID 48558654)
--- Dependencies: 1280 1280
--- Name: md_topic_category_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY md_topic_category
- ADD CONSTRAINT md_topic_category_pkey PRIMARY KEY (md_topic_category_id);
-
-
---
--- TOC entry 1740 (class 2606 OID 47913345)
--- Dependencies: 1270 1270
--- Name: pk_featuretype_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY wfs_featuretype
- ADD CONSTRAINT pk_featuretype_id PRIMARY KEY (featuretype_id);
-
-
---
--- TOC entry 1716 (class 2606 OID 47913347)
--- Dependencies: 1239 1239 1239
--- Name: pk_fkey_gui_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui_element
- ADD CONSTRAINT pk_fkey_gui_id PRIMARY KEY (fkey_gui_id, e_id);
-
-
---
--- TOC entry 1718 (class 2606 OID 47913349)
--- Dependencies: 1240 1240 1240 1240
--- Name: pk_fkey_gui_id_fkey_e_id_var_name; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui_element_vars
- ADD CONSTRAINT pk_fkey_gui_id_fkey_e_id_var_name PRIMARY KEY (fkey_gui_id, fkey_e_id, var_name);
-
-
---
--- TOC entry 1720 (class 2606 OID 47913351)
--- Dependencies: 1242 1242 1242
--- Name: pk_fkey_mb_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui_mb_group
- ADD CONSTRAINT pk_fkey_mb_group_id PRIMARY KEY (fkey_mb_group_id, fkey_gui_id);
-
-
---
--- TOC entry 1722 (class 2606 OID 47913353)
--- Dependencies: 1243 1243 1243
--- Name: pk_fkey_mb_user_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui_mb_user
- ADD CONSTRAINT pk_fkey_mb_user_id PRIMARY KEY (fkey_gui_id, fkey_mb_user_id);
-
-
---
--- TOC entry 1732 (class 2606 OID 47913355)
--- Dependencies: 1259 1259 1259
--- Name: pk_fkey_mb_user_mb_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY mb_user_mb_group
- ADD CONSTRAINT pk_fkey_mb_user_mb_group_id PRIMARY KEY (fkey_mb_user_id, fkey_mb_group_id);
-
-
---
--- TOC entry 1724 (class 2606 OID 47913357)
--- Dependencies: 1245 1245 1245 1245 1245
--- Name: pk_fkey_treegde_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui_treegde
- ADD CONSTRAINT pk_fkey_treegde_id PRIMARY KEY (fkey_gui_id, id, lft, rgt);
-
-
---
--- TOC entry 1728 (class 2606 OID 47913359)
--- Dependencies: 1253 1253
--- Name: pk_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY mb_group
- ADD CONSTRAINT pk_group_id PRIMARY KEY (mb_group_id);
-
-
---
--- TOC entry 1714 (class 2606 OID 47913361)
--- Dependencies: 1238 1238
--- Name: pk_gui_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY gui
- ADD CONSTRAINT pk_gui_id PRIMARY KEY (gui_id);
-
-
---
--- TOC entry 1747 (class 2606 OID 48558629)
--- Dependencies: 1277 1277
--- Name: pk_keyword_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY keyword
- ADD CONSTRAINT pk_keyword_id PRIMARY KEY (keyword_id);
-
-
---
--- TOC entry 1726 (class 2606 OID 47913363)
--- Dependencies: 1249 1249
--- Name: pk_layer_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY layer
- ADD CONSTRAINT pk_layer_id PRIMARY KEY (layer_id);
-
-
---
--- TOC entry 1730 (class 2606 OID 47913365)
--- Dependencies: 1258 1258
--- Name: pk_mb_user_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY mb_user
- ADD CONSTRAINT pk_mb_user_id PRIMARY KEY (mb_user_id);
-
-
---
--- TOC entry 1738 (class 2606 OID 47913367)
--- Dependencies: 1266 1266
--- Name: pk_wfs_conf_element_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY wfs_conf_element
- ADD CONSTRAINT pk_wfs_conf_element_id PRIMARY KEY (wfs_conf_element_id);
-
-
---
--- TOC entry 1736 (class 2606 OID 47913369)
--- Dependencies: 1264 1264
--- Name: pk_wfs_conf_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY wfs_conf
- ADD CONSTRAINT pk_wfs_conf_id PRIMARY KEY (wfs_conf_id);
-
-
---
--- TOC entry 1734 (class 2606 OID 47913371)
--- Dependencies: 1262 1262
--- Name: pk_wfs_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY wfs
- ADD CONSTRAINT pk_wfs_id PRIMARY KEY (wfs_id);
-
-
---
--- TOC entry 1742 (class 2606 OID 47913373)
--- Dependencies: 1273 1273
--- Name: pk_wms_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
---
-
-ALTER TABLE ONLY wms
- ADD CONSTRAINT pk_wms_id PRIMARY KEY (wms_id);
-
-
---
--- TOC entry 1743 (class 1259 OID 48558632)
--- Dependencies: 1277
--- Name: ind_keyword; Type: INDEX; Schema: public; Owner: admin; Tablespace:
---
-
-CREATE INDEX ind_keyword ON keyword USING btree (keyword);
-
-
---
--- TOC entry 1778 (class 2606 OID 48558635)
--- Dependencies: 1746 1277 1278
--- Name: fkey_keyword_id_fkey_layer_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY layer_keyword
- ADD CONSTRAINT fkey_keyword_id_fkey_layer_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1779 (class 2606 OID 48558640)
--- Dependencies: 1725 1249 1278
--- Name: fkey_layer_id_fkey_keyword_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY layer_keyword
- ADD CONSTRAINT fkey_layer_id_fkey_keyword_id FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1767 (class 2606 OID 47913379)
--- Dependencies: 1729 1258 1259
--- Name: fkey_mb_user_mb_group_mb_use_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY mb_user_mb_group
- ADD CONSTRAINT fkey_mb_user_mb_group_mb_use_id FOREIGN KEY (fkey_mb_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1766 (class 2606 OID 47913374)
--- Dependencies: 1741 1273 1256
--- Name: fkey_monitor_wms_id_wms_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY mb_monitor
- ADD CONSTRAINT fkey_monitor_wms_id_wms_id FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1750 (class 2606 OID 47913384)
--- Dependencies: 1713 1238 1239
--- Name: gui_element_ibfk1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_element
- ADD CONSTRAINT gui_element_ibfk1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1751 (class 2606 OID 47913389)
--- Dependencies: 1715 1239 1239 1240 1240
--- Name: gui_element_vars_ibfk1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_element_vars
- ADD CONSTRAINT gui_element_vars_ibfk1 FOREIGN KEY (fkey_gui_id, fkey_e_id) REFERENCES gui_element(fkey_gui_id, e_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1754 (class 2606 OID 47913394)
--- Dependencies: 1713 1238 1242
--- Name: gui_mb_group_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_mb_group
- ADD CONSTRAINT gui_mb_group_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1755 (class 2606 OID 47913399)
--- Dependencies: 1727 1253 1242
--- Name: gui_mb_group_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_mb_group
- ADD CONSTRAINT gui_mb_group_ibfk_2 FOREIGN KEY (fkey_mb_group_id) REFERENCES mb_group(mb_group_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1756 (class 2606 OID 47913404)
--- Dependencies: 1713 1238 1243
--- Name: gui_mb_user_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_mb_user
- ADD CONSTRAINT gui_mb_user_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1757 (class 2606 OID 47913409)
--- Dependencies: 1729 1258 1243
--- Name: gui_mb_user_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_mb_user
- ADD CONSTRAINT gui_mb_user_ibfk_2 FOREIGN KEY (fkey_mb_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1758 (class 2606 OID 47913414)
--- Dependencies: 1713 1238 1245
--- Name: gui_treegde_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_treegde
- ADD CONSTRAINT gui_treegde_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1759 (class 2606 OID 47913419)
--- Dependencies: 1713 1238 1246
--- Name: gui_wfs_ibfk_3; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_wfs
- ADD CONSTRAINT gui_wfs_ibfk_3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1760 (class 2606 OID 47913424)
--- Dependencies: 1733 1262 1246
--- Name: gui_wfs_ibfk_4; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_wfs
- ADD CONSTRAINT gui_wfs_ibfk_4 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1761 (class 2606 OID 47913429)
--- Dependencies: 1713 1238 1247
--- Name: gui_wms_ibfk_3; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_wms
- ADD CONSTRAINT gui_wms_ibfk_3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1762 (class 2606 OID 47913434)
--- Dependencies: 1741 1273 1247
--- Name: gui_wms_ibfk_4; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_wms
- ADD CONSTRAINT gui_wms_ibfk_4 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1764 (class 2606 OID 47913439)
--- Dependencies: 1725 1249 1250
--- Name: layer_epsg_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY layer_epsg
- ADD CONSTRAINT layer_epsg_ibfk_1 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1763 (class 2606 OID 47913444)
--- Dependencies: 1741 1273 1249
--- Name: layer_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY layer
- ADD CONSTRAINT layer_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1765 (class 2606 OID 47913449)
--- Dependencies: 1725 1249 1251
--- Name: layer_style_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY layer_style
- ADD CONSTRAINT layer_style_ibfk_1 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1768 (class 2606 OID 47913454)
--- Dependencies: 1727 1253 1259
--- Name: mb_user_mb_group_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY mb_user_mb_group
- ADD CONSTRAINT mb_user_mb_group_ibfk_1 FOREIGN KEY (fkey_mb_group_id) REFERENCES mb_group(mb_group_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1769 (class 2606 OID 47913509)
--- Dependencies: 1729 1258 1260
--- Name: mb_user_wmc_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY mb_user_wmc
- ADD CONSTRAINT mb_user_wmc_ibfk_1 FOREIGN KEY (fkey_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1752 (class 2606 OID 47913459)
--- Dependencies: 1713 1238 1241
--- Name: pk_gui_layer_ifbk3; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_layer
- ADD CONSTRAINT pk_gui_layer_ifbk3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1753 (class 2606 OID 47913464)
--- Dependencies: 1725 1249 1241
--- Name: pk_gui_layer_ifbk4; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY gui_layer
- ADD CONSTRAINT pk_gui_layer_ifbk4 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1771 (class 2606 OID 47913469)
--- Dependencies: 1735 1264 1266
--- Name: wfs_conf_element_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_conf_element
- ADD CONSTRAINT wfs_conf_element_ibfk_1 FOREIGN KEY (fkey_wfs_conf_id) REFERENCES wfs_conf(wfs_conf_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1770 (class 2606 OID 47913474)
--- Dependencies: 1733 1262 1264
--- Name: wfs_conf_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_conf
- ADD CONSTRAINT wfs_conf_ibfk_1 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1772 (class 2606 OID 47913479)
--- Dependencies: 1739 1270 1268
--- Name: wfs_element_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_element
- ADD CONSTRAINT wfs_element_ibfk_1 FOREIGN KEY (fkey_featuretype_id) REFERENCES wfs_featuretype(featuretype_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1773 (class 2606 OID 47913484)
--- Dependencies: 1733 1262 1270
--- Name: wfs_featuretype_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_featuretype
- ADD CONSTRAINT wfs_featuretype_ibfk_1 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1774 (class 2606 OID 47913489)
--- Dependencies: 1739 1270 1271
--- Name: wfs_featuretype_namespace_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_featuretype_namespace
- ADD CONSTRAINT wfs_featuretype_namespace_ibfk_1 FOREIGN KEY (fkey_featuretype_id) REFERENCES wfs_featuretype(featuretype_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1775 (class 2606 OID 47913494)
--- Dependencies: 1733 1262 1271
--- Name: wfs_featuretype_namespace_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wfs_featuretype_namespace
- ADD CONSTRAINT wfs_featuretype_namespace_ibfk_2 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1776 (class 2606 OID 47913499)
--- Dependencies: 1741 1273 1274
--- Name: wms_format_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wms_format
- ADD CONSTRAINT wms_format_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1780 (class 2606 OID 48558676)
--- Dependencies: 1748 1280 1281
--- Name: wms_md_topic_category_fkey_md_topic_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wms_md_topic_category
- ADD CONSTRAINT wms_md_topic_category_fkey_md_topic_category_id_fkey FOREIGN KEY (fkey_md_topic_category_id) REFERENCES md_topic_category(md_topic_category_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1781 (class 2606 OID 48558681)
--- Dependencies: 1741 1273 1281
--- Name: wms_md_topic_category_fkey_wms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wms_md_topic_category
- ADD CONSTRAINT wms_md_topic_category_fkey_wms_id_fkey FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- TOC entry 1777 (class 2606 OID 47913504)
--- Dependencies: 1741 1273 1275
--- Name: wms_srs_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
---
-
-ALTER TABLE ONLY wms_srs
- ADD CONSTRAINT wms_srs_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
-
---
--- add missing primary keys
---
-ALTER TABLE gui_layer ADD CONSTRAINT pk_gui_layer PRIMARY KEY (fkey_gui_id,fkey_layer_id);
-
-ALTER TABLE gui_wms ADD CONSTRAINT pk_gui_wms PRIMARY KEY (fkey_gui_id,fkey_wms_id);
-
-ALTER TABLE layer_keyword ADD CONSTRAINT pk_layer_keyword PRIMARY KEY (fkey_layer_id,fkey_keyword_id);
-
-ALTER TABLE mb_user_wmc ADD CONSTRAINT pk_user_wmc PRIMARY KEY (wmc_id);
-
-ALTER TABLE wfs_element ADD CONSTRAINT pk_wfs_element PRIMARY KEY (fkey_featuretype_id,element_id);
-
-ALTER TABLE wms_format ADD CONSTRAINT pk_wms_format PRIMARY KEY (fkey_wms_id,data_type,data_format);
-
-ALTER TABLE wms_md_topic_category ADD CONSTRAINT pk_md_topic_category PRIMARY KEY (fkey_wms_id,fkey_md_topic_category_id);
-
-ALTER TABLE wms_srs ADD CONSTRAINT pk_wms_srs PRIMARY KEY (fkey_wms_id,wms_srs);
-
-ALTER TABLE wfs_featuretype_namespace ADD CONSTRAINT pk_featuretype_namespace PRIMARY KEY (fkey_wfs_id,fkey_featuretype_id,namespace);
-
-ALTER TABLE mb_monitor ADD CONSTRAINT pk_mb_monitor PRIMARY KEY (upload_id,fkey_wms_id);
-
-ALTER TABLE mb_log ADD CONSTRAINT pk_mb_log PRIMARY KEY (id);
Copied: branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql (from rev 2140, branches/2.4.5/resources/db/postgresql/pgsql_schema.sql)
===================================================================
--- branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql (rev 0)
+++ branches/2.4.5_rc1/resources/db/postgresql/pgsql_schema.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,1080 @@
+--
+-- PostgreSQL database dump Mapbender 2.4.3
+--
+
+
+
+CREATE TABLE gui (
+ gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_name character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_description character varying(255) DEFAULT ''::character varying NOT NULL,
+ gui_public integer DEFAULT 1 NOT NULL
+);
+
+
+--
+-- TOC entry 1239 (class 1259 OID 47913127)
+-- Dependencies: 1607 1608 1609 4
+-- Name: gui_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_element (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ e_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ e_pos integer,
+ e_public integer,
+ e_comment text,
+ e_element character varying(255) DEFAULT ''::character varying NOT NULL,
+ e_src character varying(255),
+ e_attributes text,
+ e_left integer,
+ e_top integer,
+ e_width integer,
+ e_height integer,
+ e_z_index integer,
+ e_more_styles text,
+ e_content text,
+ e_closetag character varying(255),
+ e_js_file character varying(50),
+ e_mb_mod character varying(50),
+ e_target character varying(50),
+ e_requires character varying(50),
+ e_url character varying(255),
+ e_title character varying(255)
+);
+
+
+--
+-- TOC entry 1240 (class 1259 OID 47913135)
+-- Dependencies: 1610 1611 1612 4
+-- Name: gui_element_vars; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_element_vars (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_e_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ var_name character varying(50) DEFAULT ''::character varying NOT NULL,
+ var_value text,
+ context text,
+ var_type character varying(50)
+);
+
+
+--
+-- TOC entry 1241 (class 1259 OID 47913143)
+-- Dependencies: 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 4
+-- Name: gui_layer; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_layer (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_layer_id integer DEFAULT 0 NOT NULL,
+ gui_layer_wms_id integer DEFAULT 0,
+ gui_layer_status integer DEFAULT 1,
+ gui_layer_selectable integer DEFAULT 1,
+ gui_layer_visible integer DEFAULT 1,
+ gui_layer_queryable integer DEFAULT 0,
+ gui_layer_querylayer integer DEFAULT 0,
+ gui_layer_minscale integer DEFAULT 0,
+ gui_layer_maxscale integer DEFAULT 0,
+ gui_layer_priority integer,
+ gui_layer_style character varying(50),
+ gui_layer_wfs_featuretype character varying(50)
+);
+
+
+--
+-- TOC entry 1242 (class 1259 OID 47913155)
+-- Dependencies: 1623 1624 1625 4
+-- Name: gui_mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_mb_group (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_mb_group_id integer DEFAULT 0 NOT NULL,
+ mb_group_type character varying(50) DEFAULT ''::character varying NOT NULL
+);
+
+
+--
+-- TOC entry 1243 (class 1259 OID 47913160)
+-- Dependencies: 1626 1627 4
+-- Name: gui_mb_user; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_mb_user (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_mb_user_id integer DEFAULT 0 NOT NULL,
+ mb_user_type character varying(50)
+);
+
+
+--
+-- TOC entry 1245 (class 1259 OID 47913166)
+-- Dependencies: 1628 1630 1631 4
+-- Name: gui_treegde; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_treegde (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_layer_id text,
+ id serial NOT NULL,
+ lft integer DEFAULT 0 NOT NULL,
+ rgt integer DEFAULT 0 NOT NULL,
+ my_layer_title character varying(50),
+ layer text,
+ wms_id text
+);
+
+
+--
+-- TOC entry 1246 (class 1259 OID 47913175)
+-- Dependencies: 1632 1633 4
+-- Name: gui_wfs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_wfs (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_wfs_id integer DEFAULT 0 NOT NULL
+);
+
+
+--
+-- TOC entry 1247 (class 1259 OID 47913179)
+-- Dependencies: 1634 1635 1636 1637 1638 1639 1640 1641 4
+-- Name: gui_wms; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE gui_wms (
+ fkey_gui_id character varying(50) DEFAULT ''::character varying NOT NULL,
+ fkey_wms_id integer DEFAULT 0 NOT NULL,
+ gui_wms_position integer DEFAULT 0 NOT NULL,
+ gui_wms_mapformat character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_wms_featureinfoformat character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_wms_exceptionformat character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_wms_epsg character varying(50) DEFAULT ''::character varying NOT NULL,
+ gui_wms_visible integer DEFAULT 1 NOT NULL
+);
+
+
+--
+-- TOC entry 1277 (class 1259 OID 48558625)
+-- Dependencies: 4
+-- Name: keyword; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE keyword (
+ keyword_id serial NOT NULL,
+ keyword character varying(255) NOT NULL
+);
+
+
+--
+-- TOC entry 1249 (class 1259 OID 47913191)
+-- Dependencies: 1643 1644 1645 1646 1647 1648 1649 1650 4
+-- Name: layer; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE layer (
+ layer_id serial NOT NULL,
+ fkey_wms_id integer DEFAULT 0 NOT NULL,
+ layer_pos integer DEFAULT 0 NOT NULL,
+ layer_parent character varying(50) DEFAULT ''::character varying NOT NULL,
+ layer_name character varying(255) DEFAULT ''::character varying NOT NULL,
+ layer_title character varying(255) DEFAULT ''::character varying NOT NULL,
+ layer_queryable integer DEFAULT 0 NOT NULL,
+ layer_minscale integer DEFAULT 0,
+ layer_maxscale integer DEFAULT 0,
+ layer_dataurl character varying(255),
+ layer_metadataurl character varying(255),
+ layer_abstract text
+);
+
+
+--
+-- TOC entry 1250 (class 1259 OID 47913205)
+-- Dependencies: 1651 1652 1653 1654 1655 1656 4
+-- Name: layer_epsg; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE layer_epsg (
+ fkey_layer_id integer DEFAULT 0 NOT NULL,
+ epsg character varying(50) DEFAULT ''::character varying NOT NULL,
+ minx double precision DEFAULT 0,
+ miny double precision DEFAULT 0,
+ maxx double precision DEFAULT 0,
+ maxy double precision DEFAULT 0
+);
+
+
+--
+-- TOC entry 1278 (class 1259 OID 48558633)
+-- Dependencies: 4
+-- Name: layer_keyword; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE layer_keyword (
+ fkey_layer_id integer NOT NULL,
+ fkey_keyword_id integer NOT NULL
+);
+
+
+--
+-- TOC entry 1251 (class 1259 OID 47913213)
+-- Dependencies: 1657 1658 1659 4
+-- Name: layer_style; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE layer_style (
+ fkey_layer_id integer DEFAULT 0 NOT NULL,
+ name character varying(50) DEFAULT ''::character varying NOT NULL,
+ title character varying(100) DEFAULT ''::character varying NOT NULL,
+ legendurl character varying(255),
+ legendurlformat character varying(50)
+);
+
+
+--
+-- TOC entry 1253 (class 1259 OID 47913220)
+-- Dependencies: 1661 1662 4
+-- Name: mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_group (
+ mb_group_id serial NOT NULL,
+ mb_group_name character varying(50) DEFAULT ''::character varying NOT NULL,
+ mb_group_owner integer,
+ mb_group_description character varying(255) DEFAULT ''::character varying NOT NULL
+);
+
+
+--
+-- TOC entry 1255 (class 1259 OID 47913227)
+-- Dependencies: 1664 4
+-- Name: mb_log; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_log (
+ id serial NOT NULL,
+ time_client character varying(13) DEFAULT 0,
+ time_server character varying(13),
+ time_readable character varying(50),
+ mb_session character varying(50),
+ gui character varying(50),
+ module character varying(50),
+ ip character varying(20),
+ username character varying(50),
+ userid character varying(50),
+ request text
+);
+
+
+--
+-- TOC entry 1256 (class 1259 OID 47913234)
+-- Dependencies: 1665 1666 1667 1668 1669 4
+-- Name: mb_monitor; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_monitor (
+ upload_id character varying(255) DEFAULT ''::character varying NOT NULL,
+ fkey_wms_id integer DEFAULT 0 NOT NULL,
+ status integer NOT NULL,
+ status_comment character varying(255) DEFAULT ''::character varying NOT NULL,
+ timestamp_begin integer NOT NULL,
+ timestamp_end integer NOT NULL,
+ upload_url character varying(255) DEFAULT ''::character varying NOT NULL,
+ updated character(1) DEFAULT ''::bpchar NOT NULL
+);
+
+
+--
+-- TOC entry 1258 (class 1259 OID 47913246)
+-- Dependencies: 1671 1672 1673 1674 1675 4
+-- Name: mb_user; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_user (
+ mb_user_id serial NOT NULL,
+ mb_user_name character varying(50) DEFAULT ''::character varying NOT NULL,
+ mb_user_password character varying(50) DEFAULT ''::character varying NOT NULL,
+ mb_user_owner integer DEFAULT 0 NOT NULL,
+ mb_user_description character varying(255),
+ mb_user_login_count integer DEFAULT 0 NOT NULL,
+ mb_user_email character varying(50),
+ mb_user_phone character varying(50),
+ mb_user_department character varying(255),
+ mb_user_resolution integer DEFAULT 72 NOT NULL,
+ mb_user_organisation_name character varying(255),
+ mb_user_position_name character varying(255),
+ mb_user_phone1 character varying(255),
+ mb_user_facsimile character varying(255),
+ mb_user_delivery_point character varying(255),
+ mb_user_city character varying(255),
+ mb_user_postal_code integer,
+ mb_user_country character varying(255),
+ mb_user_online_resource character varying(255)
+);
+
+
+--
+-- TOC entry 1259 (class 1259 OID 47913257)
+-- Dependencies: 1676 1677 4
+-- Name: mb_user_mb_group; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_user_mb_group (
+ fkey_mb_user_id integer DEFAULT 0 NOT NULL,
+ fkey_mb_group_id integer DEFAULT 0 NOT NULL
+);
+
+
+--
+-- TOC entry 1260 (class 1259 OID 47913261)
+-- Dependencies: 1678 1679 4
+-- Name: mb_user_wmc; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE mb_user_wmc (
+ wmc_id character varying(20) DEFAULT ''::character varying NOT NULL,
+ fkey_user_id integer DEFAULT 0 NOT NULL,
+ wmc text NOT NULL,
+ wmc_title character varying(50),
+ wmc_timestamp integer
+);
+
+
+--
+-- TOC entry 1280 (class 1259 OID 48558647)
+-- Dependencies: 4
+-- Name: md_topic_category; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE md_topic_category (
+ md_topic_category_id serial NOT NULL,
+ md_topic_category_code_en character varying(255),
+ md_topic_category_code_de character varying(255)
+);
+
+
+
+--
+-- TOC entry 1262 (class 1259 OID 47913270)
+-- Dependencies: 4
+-- Name: wfs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs (
+ wfs_id serial NOT NULL,
+ wfs_version character varying(50),
+ wfs_name character varying(255),
+ wfs_title character varying(255),
+ wfs_abstract text,
+ wfs_getcapabilities character varying(255),
+ wfs_describefeaturetype character varying(255),
+ wfs_getfeature character varying(255),
+ wfs_transaction character varying(255),
+ wfs_owsproxy character varying(50)
+);
+
+
+--
+-- TOC entry 1264 (class 1259 OID 47913278)
+-- Dependencies: 1682 1683 1684 1685 4
+-- Name: wfs_conf; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs_conf (
+ wfs_conf_id serial NOT NULL,
+ wfs_conf_abstract text,
+ fkey_wfs_id integer DEFAULT 0 NOT NULL,
+ fkey_featuretype_id integer DEFAULT 0 NOT NULL,
+ g_label character varying(50),
+ g_label_id character varying(50),
+ g_button character varying(50),
+ g_button_id character varying(50),
+ g_style text,
+ g_buffer double precision DEFAULT 0,
+ g_res_style text,
+ g_use_wzgraphics integer DEFAULT 0
+);
+
+
+--
+-- TOC entry 1266 (class 1259 OID 47913290)
+-- Dependencies: 1687 1688 1689 1690 4
+-- Name: wfs_conf_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs_conf_element (
+ wfs_conf_element_id serial NOT NULL,
+ fkey_wfs_conf_id integer DEFAULT 0 NOT NULL,
+ f_id integer DEFAULT 0 NOT NULL,
+ f_geom integer DEFAULT 0,
+ f_gid integer DEFAULT 0 NOT NULL,
+ f_search integer,
+ f_pos integer,
+ f_style_id character varying(255),
+ f_toupper integer,
+ f_label character varying(255),
+ f_label_id character varying(50),
+ f_show integer,
+ f_respos integer,
+ f_form_element_html TEXT NULL,
+ f_edit int4,
+ f_mandatory int4,
+ f_auth_varname character varying(255)
+);
+
+
+--
+-- TOC entry 1268 (class 1259 OID 47913302)
+-- Dependencies: 1691 4
+-- Name: wfs_element; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs_element (
+ fkey_featuretype_id integer DEFAULT 0 NOT NULL,
+ element_id serial NOT NULL,
+ element_name character varying(50),
+ element_type character varying(50)
+);
+
+
+--
+-- TOC entry 1270 (class 1259 OID 47913308)
+-- Dependencies: 1693 1695 4
+-- Name: wfs_featuretype; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs_featuretype (
+ fkey_wfs_id integer DEFAULT 0 NOT NULL,
+ featuretype_id serial NOT NULL,
+ featuretype_name character varying(50) DEFAULT ''::character varying NOT NULL,
+ featuretype_title character varying(50),
+ featuretype_srs character varying(50)
+);
+
+
+--
+-- TOC entry 1271 (class 1259 OID 47913313)
+-- Dependencies: 1696 1697 1698 1699 4
+-- Name: wfs_featuretype_namespace; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wfs_featuretype_namespace (
+ fkey_wfs_id integer DEFAULT 0 NOT NULL,
+ fkey_featuretype_id integer DEFAULT 0 NOT NULL,
+ namespace character varying(255) DEFAULT ''::character varying NOT NULL,
+ namespace_location character varying(255) DEFAULT ''::character varying NOT NULL
+);
+
+
+--
+-- TOC entry 1273 (class 1259 OID 47913324)
+-- Dependencies: 1701 1702 1703 1704 1705 4
+-- Name: wms; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wms (
+ wms_id serial NOT NULL,
+ wms_version character varying(50) DEFAULT ''::character varying NOT NULL,
+ wms_title character varying(255) DEFAULT ''::character varying NOT NULL,
+ wms_abstract text,
+ wms_getcapabilities character varying(255) DEFAULT ''::character varying NOT NULL,
+ wms_getmap character varying(255) DEFAULT ''::character varying NOT NULL,
+ wms_getfeatureinfo character varying(255) DEFAULT ''::character varying NOT NULL,
+ wms_getlegendurl character varying(255),
+ wms_filter character varying(255),
+ wms_getcapabilities_doc text,
+ wms_owsproxy character varying(50),
+ wms_upload_url character varying(255),
+ fees character varying(255),
+ accessconstraints text,
+ contactperson character varying(255),
+ contactposition character varying(255),
+ contactorganization character varying(255),
+ address character varying(255),
+ city character varying(255),
+ stateorprovince character varying(255),
+ postcode character varying(255),
+ country character varying(255),
+ contactvoicetelephone character varying(255),
+ contactfacsimiletelephone character varying(255),
+ contactelectronicmailaddress character varying(255),
+ wms_mb_getcapabilies_doc text,
+ wms_owner integer,
+ wms_timestamp integer
+);
+
+
+--
+-- TOC entry 1274 (class 1259 OID 47913335)
+-- Dependencies: 1706 1707 1708 4
+-- Name: wms_format; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wms_format (
+ fkey_wms_id integer DEFAULT 0 NOT NULL,
+ data_type character varying(50) DEFAULT ''::character varying NOT NULL,
+ data_format character varying(100) DEFAULT ''::character varying NOT NULL
+);
+
+
+--
+-- TOC entry 1281 (class 1259 OID 48558674)
+-- Dependencies: 4
+-- Name: wms_md_topic_category; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wms_md_topic_category (
+ fkey_wms_id integer NOT NULL,
+ fkey_md_topic_category_id integer NOT NULL
+);
+
+
+--
+-- TOC entry 1275 (class 1259 OID 47913340)
+-- Dependencies: 1709 1710 4
+-- Name: wms_srs; Type: TABLE; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE TABLE wms_srs (
+ fkey_wms_id integer DEFAULT 0 NOT NULL,
+ wms_srs character varying(50) DEFAULT ''::character varying NOT NULL
+);
+
+
+--
+-- TOC entry 1745 (class 2606 OID 48558631)
+-- Dependencies: 1277 1277
+-- Name: keyword_keyword_key; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY keyword
+ ADD CONSTRAINT keyword_keyword_key UNIQUE (keyword);
+
+
+--
+-- TOC entry 1749 (class 2606 OID 48558654)
+-- Dependencies: 1280 1280
+-- Name: md_topic_category_pkey; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY md_topic_category
+ ADD CONSTRAINT md_topic_category_pkey PRIMARY KEY (md_topic_category_id);
+
+
+--
+-- TOC entry 1740 (class 2606 OID 47913345)
+-- Dependencies: 1270 1270
+-- Name: pk_featuretype_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY wfs_featuretype
+ ADD CONSTRAINT pk_featuretype_id PRIMARY KEY (featuretype_id);
+
+
+--
+-- TOC entry 1716 (class 2606 OID 47913347)
+-- Dependencies: 1239 1239 1239
+-- Name: pk_fkey_gui_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui_element
+ ADD CONSTRAINT pk_fkey_gui_id PRIMARY KEY (fkey_gui_id, e_id);
+
+
+--
+-- TOC entry 1718 (class 2606 OID 47913349)
+-- Dependencies: 1240 1240 1240 1240
+-- Name: pk_fkey_gui_id_fkey_e_id_var_name; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui_element_vars
+ ADD CONSTRAINT pk_fkey_gui_id_fkey_e_id_var_name PRIMARY KEY (fkey_gui_id, fkey_e_id, var_name);
+
+
+--
+-- TOC entry 1720 (class 2606 OID 47913351)
+-- Dependencies: 1242 1242 1242
+-- Name: pk_fkey_mb_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui_mb_group
+ ADD CONSTRAINT pk_fkey_mb_group_id PRIMARY KEY (fkey_mb_group_id, fkey_gui_id);
+
+
+--
+-- TOC entry 1722 (class 2606 OID 47913353)
+-- Dependencies: 1243 1243 1243
+-- Name: pk_fkey_mb_user_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui_mb_user
+ ADD CONSTRAINT pk_fkey_mb_user_id PRIMARY KEY (fkey_gui_id, fkey_mb_user_id);
+
+
+--
+-- TOC entry 1732 (class 2606 OID 47913355)
+-- Dependencies: 1259 1259 1259
+-- Name: pk_fkey_mb_user_mb_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY mb_user_mb_group
+ ADD CONSTRAINT pk_fkey_mb_user_mb_group_id PRIMARY KEY (fkey_mb_user_id, fkey_mb_group_id);
+
+
+--
+-- TOC entry 1724 (class 2606 OID 47913357)
+-- Dependencies: 1245 1245 1245 1245 1245
+-- Name: pk_fkey_treegde_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui_treegde
+ ADD CONSTRAINT pk_fkey_treegde_id PRIMARY KEY (fkey_gui_id, id, lft, rgt);
+
+
+--
+-- TOC entry 1728 (class 2606 OID 47913359)
+-- Dependencies: 1253 1253
+-- Name: pk_group_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY mb_group
+ ADD CONSTRAINT pk_group_id PRIMARY KEY (mb_group_id);
+
+
+--
+-- TOC entry 1714 (class 2606 OID 47913361)
+-- Dependencies: 1238 1238
+-- Name: pk_gui_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY gui
+ ADD CONSTRAINT pk_gui_id PRIMARY KEY (gui_id);
+
+
+--
+-- TOC entry 1747 (class 2606 OID 48558629)
+-- Dependencies: 1277 1277
+-- Name: pk_keyword_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY keyword
+ ADD CONSTRAINT pk_keyword_id PRIMARY KEY (keyword_id);
+
+
+--
+-- TOC entry 1726 (class 2606 OID 47913363)
+-- Dependencies: 1249 1249
+-- Name: pk_layer_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY layer
+ ADD CONSTRAINT pk_layer_id PRIMARY KEY (layer_id);
+
+
+--
+-- TOC entry 1730 (class 2606 OID 47913365)
+-- Dependencies: 1258 1258
+-- Name: pk_mb_user_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY mb_user
+ ADD CONSTRAINT pk_mb_user_id PRIMARY KEY (mb_user_id);
+
+
+--
+-- TOC entry 1738 (class 2606 OID 47913367)
+-- Dependencies: 1266 1266
+-- Name: pk_wfs_conf_element_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY wfs_conf_element
+ ADD CONSTRAINT pk_wfs_conf_element_id PRIMARY KEY (wfs_conf_element_id);
+
+
+--
+-- TOC entry 1736 (class 2606 OID 47913369)
+-- Dependencies: 1264 1264
+-- Name: pk_wfs_conf_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY wfs_conf
+ ADD CONSTRAINT pk_wfs_conf_id PRIMARY KEY (wfs_conf_id);
+
+
+--
+-- TOC entry 1734 (class 2606 OID 47913371)
+-- Dependencies: 1262 1262
+-- Name: pk_wfs_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY wfs
+ ADD CONSTRAINT pk_wfs_id PRIMARY KEY (wfs_id);
+
+
+--
+-- TOC entry 1742 (class 2606 OID 47913373)
+-- Dependencies: 1273 1273
+-- Name: pk_wms_id; Type: CONSTRAINT; Schema: public; Owner: admin; Tablespace:
+--
+
+ALTER TABLE ONLY wms
+ ADD CONSTRAINT pk_wms_id PRIMARY KEY (wms_id);
+
+
+--
+-- TOC entry 1743 (class 1259 OID 48558632)
+-- Dependencies: 1277
+-- Name: ind_keyword; Type: INDEX; Schema: public; Owner: admin; Tablespace:
+--
+
+CREATE INDEX ind_keyword ON keyword USING btree (keyword);
+
+
+--
+-- TOC entry 1778 (class 2606 OID 48558635)
+-- Dependencies: 1746 1277 1278
+-- Name: fkey_keyword_id_fkey_layer_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY layer_keyword
+ ADD CONSTRAINT fkey_keyword_id_fkey_layer_id FOREIGN KEY (fkey_keyword_id) REFERENCES keyword(keyword_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1779 (class 2606 OID 48558640)
+-- Dependencies: 1725 1249 1278
+-- Name: fkey_layer_id_fkey_keyword_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY layer_keyword
+ ADD CONSTRAINT fkey_layer_id_fkey_keyword_id FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1767 (class 2606 OID 47913379)
+-- Dependencies: 1729 1258 1259
+-- Name: fkey_mb_user_mb_group_mb_use_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY mb_user_mb_group
+ ADD CONSTRAINT fkey_mb_user_mb_group_mb_use_id FOREIGN KEY (fkey_mb_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1766 (class 2606 OID 47913374)
+-- Dependencies: 1741 1273 1256
+-- Name: fkey_monitor_wms_id_wms_id; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY mb_monitor
+ ADD CONSTRAINT fkey_monitor_wms_id_wms_id FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1750 (class 2606 OID 47913384)
+-- Dependencies: 1713 1238 1239
+-- Name: gui_element_ibfk1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_element
+ ADD CONSTRAINT gui_element_ibfk1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1751 (class 2606 OID 47913389)
+-- Dependencies: 1715 1239 1239 1240 1240
+-- Name: gui_element_vars_ibfk1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_element_vars
+ ADD CONSTRAINT gui_element_vars_ibfk1 FOREIGN KEY (fkey_gui_id, fkey_e_id) REFERENCES gui_element(fkey_gui_id, e_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1754 (class 2606 OID 47913394)
+-- Dependencies: 1713 1238 1242
+-- Name: gui_mb_group_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_mb_group
+ ADD CONSTRAINT gui_mb_group_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1755 (class 2606 OID 47913399)
+-- Dependencies: 1727 1253 1242
+-- Name: gui_mb_group_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_mb_group
+ ADD CONSTRAINT gui_mb_group_ibfk_2 FOREIGN KEY (fkey_mb_group_id) REFERENCES mb_group(mb_group_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1756 (class 2606 OID 47913404)
+-- Dependencies: 1713 1238 1243
+-- Name: gui_mb_user_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_mb_user
+ ADD CONSTRAINT gui_mb_user_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1757 (class 2606 OID 47913409)
+-- Dependencies: 1729 1258 1243
+-- Name: gui_mb_user_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_mb_user
+ ADD CONSTRAINT gui_mb_user_ibfk_2 FOREIGN KEY (fkey_mb_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1758 (class 2606 OID 47913414)
+-- Dependencies: 1713 1238 1245
+-- Name: gui_treegde_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_treegde
+ ADD CONSTRAINT gui_treegde_ibfk_1 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1759 (class 2606 OID 47913419)
+-- Dependencies: 1713 1238 1246
+-- Name: gui_wfs_ibfk_3; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_wfs
+ ADD CONSTRAINT gui_wfs_ibfk_3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1760 (class 2606 OID 47913424)
+-- Dependencies: 1733 1262 1246
+-- Name: gui_wfs_ibfk_4; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_wfs
+ ADD CONSTRAINT gui_wfs_ibfk_4 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1761 (class 2606 OID 47913429)
+-- Dependencies: 1713 1238 1247
+-- Name: gui_wms_ibfk_3; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_wms
+ ADD CONSTRAINT gui_wms_ibfk_3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1762 (class 2606 OID 47913434)
+-- Dependencies: 1741 1273 1247
+-- Name: gui_wms_ibfk_4; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_wms
+ ADD CONSTRAINT gui_wms_ibfk_4 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1764 (class 2606 OID 47913439)
+-- Dependencies: 1725 1249 1250
+-- Name: layer_epsg_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY layer_epsg
+ ADD CONSTRAINT layer_epsg_ibfk_1 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1763 (class 2606 OID 47913444)
+-- Dependencies: 1741 1273 1249
+-- Name: layer_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY layer
+ ADD CONSTRAINT layer_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1765 (class 2606 OID 47913449)
+-- Dependencies: 1725 1249 1251
+-- Name: layer_style_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY layer_style
+ ADD CONSTRAINT layer_style_ibfk_1 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1768 (class 2606 OID 47913454)
+-- Dependencies: 1727 1253 1259
+-- Name: mb_user_mb_group_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY mb_user_mb_group
+ ADD CONSTRAINT mb_user_mb_group_ibfk_1 FOREIGN KEY (fkey_mb_group_id) REFERENCES mb_group(mb_group_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1769 (class 2606 OID 47913509)
+-- Dependencies: 1729 1258 1260
+-- Name: mb_user_wmc_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY mb_user_wmc
+ ADD CONSTRAINT mb_user_wmc_ibfk_1 FOREIGN KEY (fkey_user_id) REFERENCES mb_user(mb_user_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1752 (class 2606 OID 47913459)
+-- Dependencies: 1713 1238 1241
+-- Name: pk_gui_layer_ifbk3; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_layer
+ ADD CONSTRAINT pk_gui_layer_ifbk3 FOREIGN KEY (fkey_gui_id) REFERENCES gui(gui_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1753 (class 2606 OID 47913464)
+-- Dependencies: 1725 1249 1241
+-- Name: pk_gui_layer_ifbk4; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY gui_layer
+ ADD CONSTRAINT pk_gui_layer_ifbk4 FOREIGN KEY (fkey_layer_id) REFERENCES layer(layer_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1771 (class 2606 OID 47913469)
+-- Dependencies: 1735 1264 1266
+-- Name: wfs_conf_element_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_conf_element
+ ADD CONSTRAINT wfs_conf_element_ibfk_1 FOREIGN KEY (fkey_wfs_conf_id) REFERENCES wfs_conf(wfs_conf_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1770 (class 2606 OID 47913474)
+-- Dependencies: 1733 1262 1264
+-- Name: wfs_conf_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_conf
+ ADD CONSTRAINT wfs_conf_ibfk_1 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1772 (class 2606 OID 47913479)
+-- Dependencies: 1739 1270 1268
+-- Name: wfs_element_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_element
+ ADD CONSTRAINT wfs_element_ibfk_1 FOREIGN KEY (fkey_featuretype_id) REFERENCES wfs_featuretype(featuretype_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1773 (class 2606 OID 47913484)
+-- Dependencies: 1733 1262 1270
+-- Name: wfs_featuretype_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_featuretype
+ ADD CONSTRAINT wfs_featuretype_ibfk_1 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1774 (class 2606 OID 47913489)
+-- Dependencies: 1739 1270 1271
+-- Name: wfs_featuretype_namespace_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_featuretype_namespace
+ ADD CONSTRAINT wfs_featuretype_namespace_ibfk_1 FOREIGN KEY (fkey_featuretype_id) REFERENCES wfs_featuretype(featuretype_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1775 (class 2606 OID 47913494)
+-- Dependencies: 1733 1262 1271
+-- Name: wfs_featuretype_namespace_ibfk_2; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wfs_featuretype_namespace
+ ADD CONSTRAINT wfs_featuretype_namespace_ibfk_2 FOREIGN KEY (fkey_wfs_id) REFERENCES wfs(wfs_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1776 (class 2606 OID 47913499)
+-- Dependencies: 1741 1273 1274
+-- Name: wms_format_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wms_format
+ ADD CONSTRAINT wms_format_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1780 (class 2606 OID 48558676)
+-- Dependencies: 1748 1280 1281
+-- Name: wms_md_topic_category_fkey_md_topic_category_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wms_md_topic_category
+ ADD CONSTRAINT wms_md_topic_category_fkey_md_topic_category_id_fkey FOREIGN KEY (fkey_md_topic_category_id) REFERENCES md_topic_category(md_topic_category_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1781 (class 2606 OID 48558681)
+-- Dependencies: 1741 1273 1281
+-- Name: wms_md_topic_category_fkey_wms_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wms_md_topic_category
+ ADD CONSTRAINT wms_md_topic_category_fkey_wms_id_fkey FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+--
+-- TOC entry 1777 (class 2606 OID 47913504)
+-- Dependencies: 1741 1273 1275
+-- Name: wms_srs_ibfk_1; Type: FK CONSTRAINT; Schema: public; Owner: admin
+--
+
+ALTER TABLE ONLY wms_srs
+ ADD CONSTRAINT wms_srs_ibfk_1 FOREIGN KEY (fkey_wms_id) REFERENCES wms(wms_id) ON UPDATE CASCADE ON DELETE CASCADE;
+
+
+
+--
+-- add missing primary keys
+--
+ALTER TABLE gui_layer ADD CONSTRAINT pk_gui_layer PRIMARY KEY (fkey_gui_id,fkey_layer_id);
+
+ALTER TABLE gui_wms ADD CONSTRAINT pk_gui_wms PRIMARY KEY (fkey_gui_id,fkey_wms_id);
+
+ALTER TABLE layer_keyword ADD CONSTRAINT pk_layer_keyword PRIMARY KEY (fkey_layer_id,fkey_keyword_id);
+
+ALTER TABLE mb_user_wmc ADD CONSTRAINT pk_user_wmc PRIMARY KEY (wmc_id);
+
+ALTER TABLE wfs_element ADD CONSTRAINT pk_wfs_element PRIMARY KEY (fkey_featuretype_id,element_id);
+
+ALTER TABLE wms_format ADD CONSTRAINT pk_wms_format PRIMARY KEY (fkey_wms_id,data_type,data_format);
+
+ALTER TABLE wms_md_topic_category ADD CONSTRAINT pk_md_topic_category PRIMARY KEY (fkey_wms_id,fkey_md_topic_category_id);
+
+ALTER TABLE wms_srs ADD CONSTRAINT pk_wms_srs PRIMARY KEY (fkey_wms_id,wms_srs);
+
+ALTER TABLE wfs_featuretype_namespace ADD CONSTRAINT pk_featuretype_namespace PRIMARY KEY (fkey_wfs_id,fkey_featuretype_id,namespace);
+
+ALTER TABLE mb_monitor ADD CONSTRAINT pk_mb_monitor PRIMARY KEY (upload_id,fkey_wms_id);
+
+ALTER TABLE mb_log ADD CONSTRAINT pk_mb_log PRIMARY KEY (id);
Deleted: branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql
===================================================================
--- branches/2.4.5/resources/db/update/update_guis_iso.sql 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,853 +0,0 @@
---
--- update of mapbender guis
---
--- gui / gui1 / gui2 / gui_digitize
---
--- Mapbender (Version: 2.4.3)
--- 2007-09-21
-
-
-Delete from gui_element where fkey_gui_id ='gui';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','FeatureInfoRedirect',2,1,'redirect featureInfoRequests in an iframe for each wms','iframe','../html/mod_blank.html','frameborder="0"',83,-17,1,1,0,'','','iframe','mod_featureInfoRedirect.php','','','','http://www.mapbender.org/index.php/FeatureInfoRedirect');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_gray/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',540,10,24,24,1,'','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','addWMS',2,1,'add a WMS to the running application','img','../img/button_gray/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',515,10,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',490,10,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','back',2,1,'History.back()','img','../img/button_gray/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',360,10,24,24,1,'','','','mod_back.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Back');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,NULL ,NULL ,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',425,10,24,24,1,'','','','mod_featureInfoTunnel.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfoTunnel');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','forward',2,1,'History.forward()','img','../img/button_gray/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',385,10,24,24,1,'','','','mod_forward.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Forward');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','gazetteerMetadata',2,1,'gazetteer for metadata','iframe','../php/mod_gazetteerMetadata.php?sessionID&target=mapframe1,overview','frameborder = "0"',1,1,1,1,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',620,10,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','highlightPOI',2,1,'highlight 1 to n pois in your gui with a Symbol and a special text','div','','',0,0,NULL ,NULL ,NULL ,'','','div','mod_highlightPOI.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_back',3,1,'layout, background for buttons','div','','',360,10,51,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_featureInfo',3,1,'layout, background for FeatureInfo','div','','',425,10,51,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_help',3,1,'layout, background for Help-button','div','','',620,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_logout',3,1,'layout, background for Logout-button','div','','',660,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_metadata',3,1,'layout, background for Metadata','div','','',580,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_wms',3,1,'layout, background for wms','div','','',490,10,76,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_zoom',3,1,'layout, background for Zoom-button','div','','',220,10,126,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','logo',2,1,'Logo','img','../img/mapbender_logo.png','',20,20,180,26,5,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',660,10,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/Logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',230,55,500,450,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','meetingPoint',2,1,'create a meeting point','iframe','../php/mod_meetingPoint.php?sessionID','frameborder = "0" ',0,0,NULL ,NULL ,4,'visibility:hidden;','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_gray/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0'' onmouseover=''this.src="../img/button_gray/metadata_over.png"'' onmouseout=''this.src="../img/button_gray/metadata_off.png"'' title="Show service metadata"',580,10,24,24,1,'','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div> <div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div> <div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div> <div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div> <div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div> <div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div> <div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div> <div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div> ','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',30,65,150,130,100,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','pan1',2,1,'pan','img','../img/button_gray/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',270,10,24,24,1,'','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','http://www.mapbender.org/index.php/Print');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','selArea1',2,1,'zoombox','img','../img/button_gray/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',295,10,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','setBackground',2,1,'switch background-wms','form','','',30,210,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_gray/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',450,10,24,24,1,'','','','mod_coords_div.php','','mapframe1','dependendDiv','http://www.mapbender.org/index.php/ShowCoords_div');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','tabs',2,1,'vertical tabs to handle iframes','div','','',10,240,200,20,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
-for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomFull',2,1,'zoom to full extent button','img','../img/button_gray/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',320,10,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomIn1',2,1,'zoomIn button','img','../img/button_gray/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',220,10,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomOut1',2,1,'zoomOut button','img','../img/button_gray/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',245,10,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_all', '0', '1 enables option "load all wms"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_group', '0', '1 enables option "load wms from group"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_gui', '0', '1 enables option "load wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'gazetteerWFS', 'wfsConfIdString', '1', 'comma seperated list of WFS conf ids', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_height', '14', 'height of the poi_image', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_image', '../img/redball.gif', 'image to use to mark the poi(s)', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_style', 'background-color:white;font-weight: bold;color:blue;font-family:Arial;', 'style to display the poi text', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_width', '14', 'width of the poi_image', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'legendlink', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showlayertitle', 'false', 'show the layer title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showwmstitle', 'false', 'show the wms title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_ccs_file', '../css/meetingPoint.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_export_format', 'prompt', 'decide which format to choose (email, prompt)', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_export_subject', 'Ein Treffpunkt wurde erzeugt. Folgen Sie dem Link!', 'if you choose format email, define the text for the subject', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_height', '14', 'height of the meetingPoint_icon', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_icon', '../img/redball.gif', 'path to meetingPoint image', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_max_characters', '70', 'define the maximum length of the text', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_please_click', 'Please click in the map to define the meeting point position!', 'text to show if no clickposition is set', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_style', 'background-color:white;font-weight: bold;color:red;font-family:Arial;', 'style to display the meetingPoint text', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_width', '14', 'width of the meetingPoint_icon', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'open_tab', '0', 'define which tab should be opened when a gui is opened', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[5]', '160', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[6]', '280', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[5]', 'meetingPoint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[6]', 'gazetteerMetadata', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_prefix', ' ', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid white;font-size:12;color:#343434;background-color:#CFD2D4;cursor:pointer;', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[5]', 'Meeting Point', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[6]', 'Metadata search', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'menu', 'opacity_up,opacity_down,zoom,metainfo,hide,wms_up,wms_down,layer_up,layer_down,remove', 'context menu elements', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'metadatalink', 'false', 'link for layer-metadata', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'wmsbuttons', 'false', 'wms management buttons', 'var');
-
-Delete from gui_element where fkey_gui_id ='gui1';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','WMS_preferences',2,1,'configure the preferences of each loaded wms','img','../img/button_blink_red/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',670,60,24,24,1,'','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMS',2,1,'add a WMS to the running application','img','../img/button_blink_red/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',645,60,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMSfromList',2,1,'add a WMS to the running application from a list','img','../img/button_blink_red/addlist_off.png','onclick=''window.open("../javascripts/mod_addWMSfromList.php?sessionID","printWin","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from List"',595,60,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_list');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',620,60,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','back',2,1,'History.back()','img','../img/button_blink_red/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',400,60,24,24,1,'','','','mod_back.php','','mapframe1,overview','','http://www.mapbender.org/index.php/Back');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','center1',2,1,'Center button','img','../img/button_blink_red/center_off.png','onmouseover = "mb_regButton(''init_gui1_center'')" title="Set map center"',310,60,24,24,1,'','','','mod_center1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','changeEPSG',2,1,'change EPSG, Postgres required, overview is targed for full extent','iframe','../php/mod_changeEPSG.php?sessionID','scrolling="no" frameborder=''0'' ',432,25,107,24,1,'','','iframe','','','overview','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','changePassword_button',2,1,'button: change password of logged user','img','../img/button_blink_red/change_password_off.png','onclick="window.open(''../php/mod_changePassword.php?sessionID'','''',''width=300, height=300, menubar=no,toolbar=no,location=no,status=no,resizable=yes'');" border=''0'' onmouseover=''this.src="../img/button_blink_red/change_password_over.png"'' onmouseout=''this.src="../img/button_blink_red/change_password_off.png"'' title="Change password"',750,60,24,24,1,'cursor:hand','','','','','','','http://www.mapbender.org/index.php/ChangePassword');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','closePolygon',3,1,'close Polygon ','div','',' title="Close Polygon"',0,0,0,0,0,'','','div','mod_closePolygon.js','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',-59,1,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','dragMapSize',2,1,'drag & drop Mapsize','div','','',-59,1,0,0,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','featureInfo1',2,1,'FeatureInfoRequest','img','../img/button_blink_red/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')" title="Query"',465,60,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','forward',2,1,'History.forward()','img','../img/button_blink_red/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',425,60,24,24,1,'','','','mod_forward.php','','mapframe1,overview','','http://www.mapbender.org/index.php/Forward');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','getArea',3,1,'Calculation of area, Postgis required','div','',' title="Get Area"',0,0,0,0,0,'','','div','mod_getArea.php','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','help',2,1,'button help','img','../img/button_blink_red/help_off.png','onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' onclick=''window.open("http://www.mapbender.org/index.php/Using_Mapbender","Hilfe","width=800, height=800, resizable=yes,scrollbars=yes, menubar=yes, toolbar=yes, location=yes")'' title="Help"',790,60,24,24,1,'','','','','','','','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','help1',2,1,'button help','img','../img/button_blink_red/help_off.png','onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' onclick=''window.open("http://www.mapbender.org/index.php/Using_Mapbender","Hilfe","width=800, height=800, resizable=yes,scrollbars=yes, menubar=yes, toolbar=yes, location=yes")'' title="Help"',790,60,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/help');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','highlightPOI',2,1,'highlight 1 to n pois in your gui with a Symbol and a special text','div','','',0,0,NULL ,NULL ,NULL ,'','','div','mod_highlightPOI.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','layout_1',3,1,'layout, background for buttons','div','','',208,58,670,28,0,'background-color:#FFFFFF;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&wms_legend = yes','frameborder=''0''',-59,200,180,600,3,'','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','loadData',2,1,'IFRAME to load data','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','loadwmc',2,1,'load workspace from WMC','img','../img/button_blink_red/wmc_load_off.png','onclick=''mod_loadwmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");''
-onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Load a web map context document"',895,60,24,24,1,'','','','mod_loadwmc.php','','mapframe1','','http://www.mapbender.org/index.php/LoadWMC');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','logout',2,1,'Logout','img','../img/button_blink_red/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_blink_red/logout_over.png"'' onmouseout=''this.src="../img/button_blink_red/logout_off.png"'' title="Logout"',830,60,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/Logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',-59,1,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','mapframe1',2,1,'Frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',220,105,625,400,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','measure',2,1,'Measure','img','../img/button_blink_red/measure_off.png','onmouseover = "mb_regButton(''init_mod_measure'')" title="Measure distance"',515,60,24,24,1,'','','','mod_measure.php','','mapframe1','','http://www.mapbender.org/index.php/Measure');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_blink_red/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0'' onmouseover=''this.src="../img/button_blink_red/metadata_over.png"'' onmouseout=''this.src="../img/button_blink_red/metadata_off.png"'' title="Show WMS infos"',710,60,24,24,1,'','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,10,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div> <div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div> <div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div> <div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div> <div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div> <div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div> <div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div> <div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div> ','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',15,25,150,150,2,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','pan1',2,1,'pan','img','../img/button_blink_red/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',260,60,24,24,1,'','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','print1',2,0,'start print GUI','img','../img/button_blink_red/print_off.png','onclick=''window.open("../print/mod_printPDF.php?target=mapframe1&sessionID","printWin","width=300, height=400, resizable=yes ")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Print"',555,60,24,24,1,'','','','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','printPDF',2,1,'start print GUI','img','../img/button_blink_red/print_off.png','onclick=''window.open("../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF_b.conf","printWin","width=180, height=200, resizable=yes ")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Print"',555,60,24,24,1,'','','','','','mapframe1','','http://www.mapbender.org/index.php/Print');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','repaint',2,1,'refresh a mapobject','img','../img/button_blink_red/repaint_off.png','onclick=''mod_repaint()'' onmouseover=''mod_repaint_init(this)'' title="Redraw"',360,60,24,24,1,'','','','mod_repaint.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','rubber',3,1,'deletes temporary (digitized) objects','div','',' title="Rubber"',0,0,0,0,0,'','','div','mod_rubber.js','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',0,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','savewmc',2,1,'save workspace as WMC','img','../img/button_blink_red/wmc_save_off.png','onclick=''mod_savewmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Save workspace as web map context document"',870,60,24,24,1,'','','','mod_savewmc.php','','mapframe1','','http://www.mapbender.org/index.php/SaveWMC');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scaleSelect',2,1,'Scale-Selectbox','select','','onchange=''mod_scaleSelect(this)''',555,25,100,20,1,'','<option value = ''''>Scale</option> <option value=''100''>1 : 100</option> <option value=''250''>1 : 250</option> <option value=''500''>1 : 500</option> <option value=''1000''>1 : 1000</option> <option value=''2500''>1 : 2500</option> <option value=''5000''>1 : 5000</option> <option value=''10000''>1 : 10000</option> <option value=''25000''>1 : 25000</option> <option value=''30000''>1 : 30000</option> <option value=''50000''>1 : 50000</option> <option value=''75000''>1 : 75000</option> <option value=''100000''>1 : 100000</option> <option value=''200000''>1 : 200000</option> <option value=''300000''>1 : 300000</option> <option value=''400000''>1 : 400000</option> <option value=''500000''>1 : 500000</option> <option value=''600000''>1 : 600000</option> <option value=''700000''>1 : 700000</option> <option value=''800000''>1 : 800000</option> <option value=''900000''>1 : 900000</option> <option value=''1000000''>1 : 1000000</option>','select','mod_scaleSel.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scaleText',2,1,'Scale-description field','form','','onsubmit=''return mod_scaleText()''',672,25,100,30,0,'','<input type="text">','form','mod_scaleText.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scalebar',2,1,'scalebar','div','','',0,0,0,0,0,'','','div','mod_scalebar.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','selArea1',2,1,'zoombox','img','../img/button_blink_red/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',285,60,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBBOX',2,0,'set Extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBackground',2,0,'switch background-wms','form','','',15,190,0,0,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBackground_all',2,0,'switch all background-wms','form','','',157,190,40,20,1,'','<input type=''checkbox'' onclick=''mod_setBackground_all_init(this)''> <font face="Arial, sans-serif" size="2">all</font>','form','mod_setBackground_all.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setPOI2Scale',2,1,'zoom to a poi (get-parameter)','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_setPOI2Scale.php','','mapframe1','','http://www.mapbender.org/index.php/Mod_setPoi2Scale');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setScaleHint',1,0,'set scaleHint for mapframes','div','','',1,1,1,1,0,'visibility:hidden;','','div','mod_scaleHint.php','','mapframe1,100,10000000','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','showCoords_div',2,1,'displays coordinates by onmouseover','img','../img/button_blink_red/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates"',490,60,24,24,1,'','','','mod_coords_div.php','','mapframe1','','http://www.mapbender.org/index.php/ShowCoords_div');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeConfGDE',2,0,'configurable directory tree','iframe','../php/mod_treefolderClient.php?sessionID','frameborder = "0" ',0,180,250,500,0,'visibility:visible','','iframe','mod_treeConf.js','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
-for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeGDE_1',2,0,'directory tree, checkbox for visible, checkbox for querylayer, no immediate refreshing, with nested layers','iframe','../html/mod_sync_treefolder_1.html','frameborder = "0" ',0,180,250,500,0,'visibility:visible','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','wfs_gazetteer',2,0,'gazetteer using wfs','iframe','../php/mod_wfs_gazetteer.php?sessionID&color=255,0,255','frameborder = "0" ',-50,490,250,300,0,'visibility:visible','','iframe','','','mapframe1,overview','wfs','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomCoords',2,1,'zoom to coordinate','iframe','../php/mod_zoomCoords_en.php?sessionID','frameborder = "0" ',205,7,220,45,0,'','','iframe','','','mapframe1,overview','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomFull',2,1,'zoom to full extent button','img','../img/button_blink_red/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',335,60,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomIn1',2,1,'zoomIn button','img','../img/button_blink_red/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',210,60,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomOut1',2,1,'zoomOut button','img','../img/button_blink_red/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',235,60,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_db', '0', '1 enables option "load configured wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_height', '25', 'height of the poi_image', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_image', '../img/redball.gif', 'image to use to mark the poi(s)', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_style', 'background-color:white;font-weight: bold;color:blue;font-family:Arial;', 'style to display the poi text', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_width', '25', 'width of the poi_image', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'css_file_legend', '../css/legend.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'legendlink', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showlayertitle', 'true', 'show the layer title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showwmstitle', 'true', 'show the wms title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'stickylegend', 'true', 'parameter to decide wether the legend should stick on the mapframe1', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'logout', 'logout_location', 'http://www.mapbender.org/', 'webside to show after logout', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'setPOI2Scale', 'mod_setPOI2Scale_defScale', '5000', 'default scale', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'menu', '', 'context menu elements', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'wmsbuttons', 'true', 'wms management buttons', 'var');
-
-Delete from gui_element where fkey_gui_id ='gui2';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_blue/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',604,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','addWMS',2,1,'add a WMS to the running application','img','../img/button_blue/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',580,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blue/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',553,40,28,28,1,'filter:Chroma(color=#C2CBCF);','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','back',2,1,'History.back()','img','../img/button_blue/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',398,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_back.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Back');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','body',1,1,'body
-(obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'background-image:url(../img/background_yellow.jpg);background-repeat:repeat-x;','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','center1',2,1,'Center button','img','../img/button_blue/center_off.png','onmouseover = "mb_regButton(''init_gui1_center'')" title="Set map center"',308,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_center1.php','','mapframe1','','http://www.mapbender.org/index.php/ReCenter');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','changePassword_button',2,1,'button: change password of logged user','img','../img/button_blue/change_password_off.png','onclick="window.open(''../php/mod_changePassword.php?sessionID'','''',''width=300, height=300, menubar=no,toolbar=no,location=no,status=no,resizable=yes'');" border=''0''
-onmouseover=''this.src="../img/button_blue/change_password_over.png"'' onmouseout=''this.src="../img/button_blue/change_password_off.png"'' title="Change password"',668,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','','','http://www.mapbender.org/index.php/ChangePassword');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','closePolygon',3,1,'close Polygon ','div','','title="Close Polygon"',0,0,NULL ,NULL ,NULL ,'','','div','mod_closePolygon.js','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,NULL ,NULL ,2,'background-color:#799FEB; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dynamicOverview',2,1,'oveview acts in accordance with main mapframe','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','div','mod_dynamicOverview.php','','mapframe1,overview','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_blue/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_blue/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',461,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_featureInfoTunnel.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfoTunnel');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','forward',2,1,'History.forward()','img','../img/button_blue/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',423,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_forward.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Forward');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','getArea',3,1,'Calculation of area, Postgis required','div','','title="Get Area"',0,0,NULL ,NULL ,NULL ,'','','div','mod_getArea.php','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','header_yellow',2,0,'header','img','../img/header_yellow.jpg','',-1,-1,833,75,NULL ,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','help',2,1,'button help','img','../img/button_blue/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',693,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','layout_linie',3,0,'layout','div','','',1,70,830,1,1,'background-color:#799FEB;font-size:1px;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','layout_linie2',3,0,'layout','div','','',1,35,830,1,1,'background-color:#799FEB;font-size:1px;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','loadwmc',2,1,'load workspace from WMC','img','../img/button_blue/wmc_load_off.png','onclick=''mod_loadwmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");''
-onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Load a web map context document"',758,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_loadwmc.php','','mapframe1','','http://www.mapbender.org/index.php/LoadWMC');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','logo',2,1,'Logo','img','../img/mapbender_oo.png','',10,35,129,32,5,'filter:Chroma(color=#C2CBCF);','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','logout',2,1,'Logout','img','../img/button_blue/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_blue/logout_over.png"'' onmouseout=''this.src="../img/button_blue/logout_off.png"''',798,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','','','http://www.mapbender.org/index.php/Logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',213,90,608,467,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','measure',2,1,'Measure','img','../img/button_blue/measure_off.png','onmouseover = "mb_regButton(''init_mod_measure'')" title="Measure distance"',513,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_measure.php','','mapframe1','','http://www.mapbender.org/index.php/Measure');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_blue/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0''
-onmouseover=''this.src="../img/button_blue/metadata_over.png"'' onmouseout=''this.src="../img/button_blue/metadata_off.png"''
-title="Show SQL"',643,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div>
-<div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div>
-<div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div>
-<div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div>
-<div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div>
-<div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div>
-<div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div>
-<div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div>','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',9,80,185,130,100,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','pan1',2,1,'pan','img','../img/button_blue/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',258,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','http://www.mapbender.org/index.php/Print');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','repaint',2,1,'refresh a mapobject','img','../img/button_blue/repaint_off.png','onclick=''mod_repaint()'' onmouseover=''mod_repaint_init(this)'' title="Redraw"',358,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_repaint.php','','mapframe1','','http://www.mapbender.org/index.php/Repaint');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','resizeMapsize',2,1,'resize mapsize to browser window size','img','../img/button_blink_red/resizemapsize_off.png','onclick = "adjustDimension()"
-onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="optimize mapsize to browser window"',838,40,24,24,3,'filter:Chroma(color=#C2CBCF);','','','mod_resize_mapsize.php','','mapframe1','','http://www.mapbender.org/index.php/ResizeMapsize');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','rubber',3,1,'deletes temporary (digitized) objects','div','','title="Rubber"',0,0,NULL ,NULL ,NULL ,'','','div','mod_rubber.js','','mapframe1','measure','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','savewmc',2,1,'save workspace as WMC','img','../img/button_blue/wmc_save_off.png','onclick=''mod_savewmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Save workspace as web map context document"',733,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_savewmc.php','','mapframe1','','http://www.mapbender.org/index.php/SaveWMC');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','selArea1',2,1,'zoombox','img','../img/button_blue/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',283,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','setBackground',2,1,'switch background-wms','form','','',10,218,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_blue/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',488,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_coords_div.php','','mapframe1','dependendDiv','http://www.mapbender.org/index.php/ShowCoords_div');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','tabs',2,1,'vertical tabs to handle iframes','div','','',2,245,191,22,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
-for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomFull',2,1,'zoom to full extent button','img','../img/button_blue/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',333,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomIn1',2,1,'zoomIn button','img','../img/button_blue/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',203,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomOut1',2,1,'zoomOut button','img','../img/button_blue/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',231,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'body', 'css_class_bg', 'body{background-color: #FEF8D4;}', 'to define the color of the body', 'text/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_minScale', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_startExtent', '-24.5,32,34.5,71', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_useMaxExtent', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_wmsIndex', '0', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_zoomFactor', '5', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'gazetteerWFS', 'wfsConfIdString', '1', 'comma seperated list of WFS conf ids', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'legendlink', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showlayertitle', 'false', 'show the layer title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showwmstitle', 'false', 'show the wms title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'adjust_height', '-35', 'to adjust the height of the mapframe on the bottom of the window', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'adjust_width', '-45', 'to adjust the width of the mapframe on the right side of the window', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'resize_option', 'button', 'auto (autoresize on load), button (resize by button)', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'sandclock', 'mod_sandclock_image', '../img/sandclock_oo.gif', 'define a sandclock image ', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'open_tab', '0', 'define which tab should be opened when a gui is opened', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_prefix', ' ', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid #FDCC1A;font-size:12;color:#FFFFFF;background-color:#799FEB;cursor:pointer;margin-top:-3px; padding-top:3px;padding-left:4px;', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'menu', 'opacity_up,opacity_down,zoom,metainfo,hide,wms_up,wms_down,layer_up,layer_down,remove', 'context menu elements', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'wmsbuttons', 'false', 'wms management buttons', 'var');
-
-Delete from gui_element where fkey_gui_id ='gui_digitize';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','FeatureInfoRedirect',2,0,'redirect featureInfoRequests in an iframe for each wms','iframe','../html/mod_blank.html','frameborder="0"',83,-17,1,1,NULL ,'','','iframe','mod_featureInfoRedirect.php','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_gray/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")''
-onmouseover=''this.src = this.src.replace(/_off/,"_over");''
-onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',540,10,24,24,1,'','','','','','mapframe1,treeGDE','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','addWMS',2,1,'add a WMS to the running application','img','../img/button_gray/add_off.png','onclick=''mod_addWMS()''
-onmouseover=''this.src = this.src.replace(/_off/,"_over");''
-onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',515,10,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',490,10,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','back',2,1,'History.back()','img','../img/button_gray/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',360,10,24,24,1,'','','','mod_back.php','','mapframe1,overview0','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','closePolygonExt',3,0,'close Polygon ','div','',' title="Close Polygon"',0,0,NULL ,NULL ,NULL ,'','','div','mod_closePolygonExt.js','','mapframe1','setExtRequest','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','digitize',2,1,'Digitize tool.','iframe','../javascripts/mod_digitize_tab.php?sessionID','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,0,0,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',425,10,24,24,1,'','','','mod_featureInfoTunnel.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','forward',2,1,'History.forward()','img','../img/button_gray/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',385,10,24,24,1,'','','','mod_forward.php','','mapframe1,overview0','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',620,10,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','initWmc',2,0,'initialise client with wmc','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_initWmc.php','','mapframe1,overview','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_1',3,0,'Warning notice','div','','',150,250,300,16,100,'font-family: Arial, Helvetica, sans-serif; font-size : 14px; text-decoration : none;','Development Version - Work in Progress!','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_back',3,1,'layout, background for buttons','div','','',360,10,51,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_featureInfo',3,1,'layout, background for FeatureInfo','div','','',425,10,51,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_help',3,1,'layout, background for Help-button','div','','',620,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_logout',3,1,'layout, background for Logout-button','div','','',660,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_metadata',3,1,'layout, background for Metadata','div','','',580,10,26,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_wms',3,1,'layout, background for wms','div','','',490,10,76,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_zoom',3,1,'layout, background for Zoom-button','div','','',220,10,126,26,0,'background-color:#414547;','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','loadwmc',2,0,'load workspace from WMC','img','../img/button_wmc/wmc_load.png','onclick=''mod_loadwmc()'' onmouseover=''mod_loadwmc_init(this)''
-title=''Load a web map context document''',760,10,24,24,1,'','','','mod_loadwmc.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','logo',2,1,'Logo','img','../img/mapbender_logo.png','',20,20,180,26,5,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0''
-onmouseover=''this.src="../img/button_gray/logout_over.png"''
-onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',660,10,24,24,1,'','','','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr>
-<script language="javascript">
-mb_registerSubFunctions("mod_mapbender()");
-function mod_mapbender(){
-document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90;
-document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1;
-}
-</script>','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',230,55,500,450,2,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_gray/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''"
-border=''0''
-onmouseover=''this.src="../img/button_gray/metadata_over.png"''
-onmouseout=''this.src="../img/button_gray/metadata_off.png"'' title="Show service metadata"',580,10,24,24,1,'','','','mod_displayObj.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div>
-<div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div>
-<div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div>
-<div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div>
-<div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div>
-<div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div>
-<div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div>
-<div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div>
-','div','mod_navFrame.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',30,65,150,130,100,'','','iframe','','mod_box1.js','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','pan1',2,1,'pan','img','../img/button_gray/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',270,10,24,24,1,'','','','mod_pan.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','rubberExt',3,1,'deletes temporary (digitized) objects','div','',' title="Rubber"',0,0,0,0,0,'','','div','mod_rubberExt.js','','mapframe1','setExtRequest','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','savewmc',2,0,'save workspace as WMC','img','../img/button_wmc/wmc_save.png','onclick=''mod_savewmc()'' onmouseover=''mod_savewmc_init(this)''
-title=''Save workspace as web map context document''',730,10,24,24,1,'','','','mod_savewmc.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','scaleSelect',2,0,'Scale-Selectbox','select','','onchange=''mod_scaleSelect(this)''',555,25,100,20,1,'','<option value = ''''>Scale</option>
-<option value=''100''>1 : 100</option>
-<option value=''250''>1 : 250</option>
-<option value=''500''>1 : 500</option>
-<option value=''1000''>1 : 1000</option>
-<option value=''2500''>1 : 2500</option>
-<option value=''5000''>1 : 5000</option>
-<option value=''10000''>1 : 10000</option>
-<option value=''25000''>1 : 25000</option>
-<option value=''30000''>1 : 30000</option>
-<option value=''50000''>1 : 50000</option>
-<option value=''75000''>1 : 75000</option>
-<option value=''100000''>1 : 100000</option>
-<option value=''200000''>1 : 200000</option>
-<option value=''300000''>1 : 300000</option>
-<option value=''400000''>1 : 400000</option>
-<option value=''500000''>1 : 500000</option>
-<option value=''600000''>1 : 600000</option>
-<option value=''700000''>1 : 700000</option>
-<option value=''800000''>1 : 800000</option>
-<option value=''900000''>1 : 900000</option>
-<option value=''1000000''>1 : 1000000</option>','select','mod_scaleSel.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','selArea1',2,1,'zoombox','img','../img/button_gray/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',295,10,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setBackground',2,1,'switch background-wms','form','','',30,210,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12''
-name=''mod_setBackground_list''
-onchange=''mod_setBackground_change(this)'' ><option
-value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setSpatialRequest',2,1,'Spatial Request','div','','',1,1,1,1,1,'visibility:hidden;','','div','../javascripts/mod_wfs_SpatialRequest.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_gray/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',450,10,24,24,1,'','','','mod_coords_div.php','','mapframe1','dependendDiv','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','showLoggedUser',2,0,'Displays current user','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','tabs',1,1,'vertical tabs to handle iframes','div','','',10,240,200,20,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
-for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfs',2,1,'wfs request and result handling','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','wfs.js','../extensions/wz_jsgraphics.js','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfs_conf',2,1,'get all wfs_conf-params','iframe','../php/mod_wfs.php','frameborder = "0"',1,1,1,1,0,'visibility:hidden','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfsresult',2,1,'display the list of wfs results','iframe','../html/mod_blank.html','frameborder = "0"',10,730,200,150,4,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomFull',2,1,'zoom to full extent button','img','../img/button_gray/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',320,10,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomIn1',2,1,'zoomIn button','img','../img/button_gray/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title="Zoom in"',220,10,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomOut1',2,1,'zoomOut button','img','../img/button_gray/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',245,10,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'cssUrl', '../css/digitize.css', 'url to the style sheet of the mapframe', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'digitize_conf_filename', 'digitize_default.conf', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'text css', ' body{
- font-family: Arial, Helvetica, sans-serif;
- font-size : 12px;
- color: #ff00ff;
- background-color: #ffffff;
- margin-top: 0px;
- margin-left: 0px;
- }
- .button{
- height: 18px;
- width: 32px;
- }
-', 'text css', 'text/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'wfsCssUrl', '../css/mapbender.css', 'var', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'gazetteerWFS', 'wfsConfIdString', '1,2,3,4', 'comma seperated list of WFS conf ids', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'legendlink', 'false', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showlayertitle', 'true', 'show the layer title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showwmstitle', 'true', 'show the wms title in the legend', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'setSpatialRequest', 'useUsemap', '0', '"1" adds a usemap to each geometry; the geometry will be highlighted onMouseOver. Every other value will skip the usemap.', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'setSpatialRequest', 'wfs_conf_filename', 'wfs_default.conf', 'location and name of the WFS configuration file', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'open_tab', '5', 'define which tab should be opened when a gui is opened', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[5]', '250', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[5]', 'digitize', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_prefix', ' ', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid white;font-size:12;color:#343434;background-color:#CFD2D4;cursor:pointer;padding-left:8px;', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[5]', 'Digitize', '', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'menu', '', 'context menu elements', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'wmsbuttons', 'true', 'wms management buttons', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'wfs', 'displayWfsResultList', '1', '', 'var');
-
-Delete from gui_element where fkey_gui_id ='admin1';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','AdminFrame',2,1,'the frame for administration modules','iframe','','frameborder = "0"',220,20,800,800,NULL ,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','CreateTreeGDE',2,1,'create a foldertree for a individual geodataexplorer','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,810,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','CREATE TREE_GDE','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,950,250,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT WMS-METADATA','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_Gui',2,1,'allocate groups to guis','a','','href = "../php/mod_group_gui.php?sessionID&e_id_css=Group_Gui" target = "AdminFrame" ',10,610,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_User',2,1,'allocate groups to user','a','','href = "../php/mod_group_user.php?sessionID&e_id_css=Group_User" target = "AdminFrame" ',10,550,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','GROUP -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_filteredGui',2,1,'allocate Groups to the guis of this admin','a','','href = "../php/mod_group_filteredGui.php?sessionID&e_id_css=Group_filteredGui" target = "AdminFrame" ',10,710,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Gui_Group',2,1,'allocate guis to groups','a','','href = "../php/mod_gui_group.php?sessionID&e_id_css=Gui_Group" target = "AdminFrame" ',10,250,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Gui_User',2,1,'allocate a gui to user','a','','href = "../php/mod_gui_user.php?sessionID&e_id_css=Gui_User" target = "AdminFrame" ',10,190,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','User_Group',2,1,'allocat user to groups','a','','href = "../php/mod_user_group.php?sessionID&e_id_css=User_Group" target = "AdminFrame" ',10,430,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','body',1,1,'navigation','body','','onload=''mod_adminNavigation_init()''',0,0,0,0,0,'','','','mod_adminNavigation.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteGui',2,1,'delete gui','a','','href = "../php/mod_deleteGUI.php?sessionID" target = "AdminFrame" ',10,150,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteWFS',2,1,'delete WFS','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,890,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteWMS',2,1,'delete wms','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,110,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','delete_filteredGui',2,1,'delete guis of this admin','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,790,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editElements',2,1,'edit gui elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,170,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','EDIT GUI-ELEMENTS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editFilteredGroup',2,1,'edit group of this admin','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',10,530,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editFilteredUser',2,1,'save, edit, delete user where this admin is owner','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',10,350,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editGUI_WMS',2,1,'edit the elements of the gui','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,90,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT GUI-WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editGroup',2,1,'edit group','a','','href = "../php/mod_editGroup.php?sessionID" target = "AdminFrame" ',10,510,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editUser',2,1,'save, edit, delete user','a','','href = "../php/mod_editUser.php?sessionID" target="AdminFrame"',10,330,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','exportGUI',2,1,'export gui, create SQLL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,310,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EXPORT GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGoup_filteredUser',2,1,'allocate the groups of this admin to user where the admin is owner','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',10,590,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> myUSER ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_Gui',2,1,'allocate groups of this admin to guis','a','','href = "../php/mod_filteredGroup_Gui.php?sessionID&e_id_css=filteredGroup_Gui" target = "AdminFrame" ',10,750,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_User',2,1,'allocate groups of this admin to user','a','','href = "../php/mod_filteredGroup_User.php?sessionID&e_id_css=filteredGroup_User" target = "AdminFrame" ',10,690,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_filteredGui',2,1,'allocate groups of this admin to guis of this admin','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',10,730,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_Group',2,1,'allocate guis to groups','a','','href = "../php/mod_filteredGui_group.php?sessionID&e_id_css=filteredGui_Group" target = "AdminFrame" ',10,270,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> GROUP ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_filteredGroup',2,1,'allocate guis of this admin to groups where this admin is owner','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',10,290,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_filteredUser',2,1,'allocate the user where the admin is owner to his guis ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',10,230,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_user',2,1,'allocate the guis of this admin to a user','a','','href = "../php/mod_filteredGui_User.php?sessionID&e_id_css=filteredGui_user" target = "AdminFrame" ',10,210,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> USER ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_Group',2,1,'allocate user of this admin to groups','a','','href = "../php/mod_filteredUser_Group.php?sessionID&e_id_css=filteredUser_Group" target = "AdminFrame" ',10,670,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_Gui',2,1,'allocate user of this admin to guis','a','','href = "../php/mod_filteredUser_Gui.php?sessionID&e_id_css=filteredUser_Gui" target = "AdminFrame" ',10,770,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_filteredGroup',2,1,'allocate user where this admin is owner to groups where this admin is owner','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',10,490,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_filteredGui',2,1,'allocate admins user to guis of this admin','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',10,410,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','getStyles',2,0,'load styles from wms','a','','href = "../php/mod_getStyles.php?sessionID" target = "AdminFrame" ',10,890,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GET_STYLES','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','group_filteredUser',2,1,'allocate groups to user where this admin is owner','a','','href = "../php/mod_group_filteredUser.php?sessionID&e_id_css=group_filteredUser" target = "AdminFrame" ',10,570,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_filteredGroup',2,1,'allocate guis to groups of this admin','a','','href = "../php/mod_gui_filteredGroup.php?sessionID&e_id_css=gui_filteredGroup" target = "AdminFrame" ',10,650,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_filteredUser',2,1,'allocate guis to user of this admin','a','','href = "../php/mod_gui_filteredUser.php?sessionID&e_id_css=gui_filteredUser" target = "AdminFrame" ',10,630,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_owner',2,1,'set owner','a','','href = "../php/mod_gui_owner.php?sessionID&e_id_css=gui_owner" target = "AdminFrame" ',10,830,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> OWNER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWFS',2,1,'load capabilities in a gui','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,850,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/WFS_Konfiguration');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWMS',2,1,'load capabilities in a gui','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,30,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWMSList',2,1,'load wms from a list','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,50,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD myWMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,1,'','','img','','','','','http://www.mapbender.org/index.php/logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','myGUIlist',2,1,'go back to your GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,1,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','newGui',2,1,'create a new gui','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,130,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','NEW GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','orphanWMS',2,1,'display orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID&&elementID=orphanWMS" target = "AdminFrame"',10,930,200,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','ORPHAN WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,910,200,20,1,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','OWSPROXY','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','rename_copy_Gui',2,1,'rename and copy gui','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,470,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','RENAME COPY GUI','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','showLoggedUser',2,1,'displays the logged admin','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,NULL ,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','updateWMSs',2,1,'edit the elements of the gui','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,70,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','UPDATE WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_filteredGroup',2,1,'allocate user to groups where this admin is owner','a','','href = "../php/mod_user_filteredGroup.php?sessionID&e_id_css=user_filteredGroup" target = "AdminFrame" ',10,450,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> myGROUP','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_filteredGui',2,1,'allocate guis of this admin to user','a','','href = "../php/mod_user_filteredGui.php?sessionID&e_id_css=user_filteredGui" target = "AdminFrame" ',10,390,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER-> myGUI','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_gui',2,1,'allocate guis to user','a','','href = "../php/mod_user_gui.php?sessionID&e_id_css=user_gui" target = "AdminFrame" ',10,370,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> GUI ','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','wfs_conf',2,1,'create and edit a gazetteer module','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,870,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','WFS CONF','a','','','','AdminFrame','');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_Gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Gui_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Gui_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'User_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'editGUI_WMS', 'file_css', '../css/edit_gui.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGoup_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_Gui', 'file css', '../css/administration_alloc.css', 'file', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_user', 'file css', '../css/administration_alloc.css', 'a file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_Gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'group_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'gui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'gui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-
-
-Delete from gui_element where fkey_gui_id ='admin2_de';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','AdminFrame',2,1,'Bereich für Administrationsmodule','iframe','','frameborder = "0"',200,20,800,800,0,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','CreateTreeGDE',2,1,'Ordnerbaum konfigurieren','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',8,280,190,20,5,'','Ordnerbaum konfigurieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',0,0,180,20,0,'','','','mod_adminNavigation.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','deleteWMS',2,1,'!Vollständig löschen!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',8,100,190,20,5,'','!Vollständig löschen!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','delete_filteredGui',2,1,'GUI löschen','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',110,240,80,20,5,'','GUI löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editElements',2,1,'Oberflächenelemente editieren','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',8,260,190,20,5,'','GUI-Elemente editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editFilteredGroup',2,1,'Gruppe anlegen und editieren','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',8,400,190,20,10,'','Gruppe anlegen und editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editFilteredUser',2,1,'Benutzer anlegen und editieren','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',8,380,190,20,10,'','Benutzer anlegen und editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editGUI_WMS',2,1,'WMS GUI Einstellungen','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',8,180,190,20,5,'','WMS GUI Einstellungen','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','exportGUI',2,1,'Oberfläche (GUI) exportieren, SQL erzeugen','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',8,300,190,20,10,'','GUI exportieren (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGoup_filteredUser',2,1,'Gruppe mit Benutzern bestücken','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',8,440,190,20,10,'','Gruppe mit Benutzern bestücken ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGroup_filteredGui',2,1,'Einzelner Gruppe mehrere Oberflaechen zuordnen','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',8,570,190,25,10,'','Einzelner Gruppe mehrere <br>GUIs zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGui_filteredGroup',2,1,'Einzelner Oberfläche mehrere Gruppen zuordnen','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',8,605,190,25,10,'','Einzelner GUI mehrere<br> Gruppen zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGui_filteredUser',2,1,'Oberfläche mehreren Benutzer zuordnen ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',8,535,190,25,10,'','GUI mehreren Benutzern <br> zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredUser_filteredGroup',2,1,'Benutzer in Gruppen eintragen','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',8,420,190,20,10,'','Benutzer in Gruppen eintragen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredUser_filteredGui',2,1,'Einem Nutzer Zugriff auf mehrere Oberflächen erteilen','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',8,500,190,25,10,'','Einem Nutzer Zugriff auf <br> mehrere GUIs erteilen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','gui_owner',2,1,'GUI editieren Benutzer zuordnen','a','','href = "../php/mod_gui_owner.php?sessionID" target = "AdminFrame" ',8,640,190,20,10,'','GUI editieren Benutzer zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_0',3,1,'Hintergrund WMS Verwaltung Rahmen','div','','',3,35,193,90,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1',3,1,'Hintergrund WMS Management','div','','',5,37,193,86,2,'',' WMS Verwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1a',3,1,'Hintergrund WMS Zuordnung Rahmen','div','','',3,135,193,70,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1b',3,1,'Hintergrund WMS Zuordnung','div','','',5,137,193,66,2,'',' WMS Zuordnung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1c',3,1,'Hintergrund Oberflächenverwaltung Rahmen','div','','',3,215,193,130,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1d',3,1,'Hintergrund Oberflächenverwaltung','div','','',5,217,193,126,2,'',' GUI-Verwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_2',3,1,'Hintergrund Benutzerverwaltung Rahmen','div','','',3,355,193,110,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_3',3,1,'Hintergrund Benutzerverwaltung','div','','',5,357,193,106,2,'',' Benutzerverwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_4',3,1,'Hintergrund Benutzerzugriff erteilen Rahmen','div','','',3,475,193,200,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_5',3,1,'Hintergrund Benutzerzugriff erteilen','div','','',5,477,193,196,2,'',' Benutzerzugriff erteilen','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','loadWMS',2,1,'Capabilities hochladen','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',8,60,190,20,5,'','Capabilities hochladen','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','loadWMSList',2,1,'WMS in GUI einbinden','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',8,160,190,20,5,'','WMS in GUI einbinden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','myGUIlist',2,1,'Zurück zur eigenen GUI Liste','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','newGui',2,1,'GUI erzeugen','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',8,240,85,20,5,'','GUI erzeugen','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','rename_copy_Gui',2,1,'GUI umbenennen/ kopieren','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',8,320,190,20,10,'','GUI umbenennen/kopieren','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','showLoggedUser',2,1,'Anzeige des eingeloggten Benutzers','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','updateWMSs',2,1,'Hochgeladene aktualisieren','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',8,80,190,20,5,'','Hochgeladene aktualisieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'body', 'body_css_file', '../css/admin.css', 'css-file to define the style fo the admin-gui', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGoup_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredUser_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'gui_owner', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-
-Delete from gui_element where fkey_gui_id ='admin2_en';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','AdminFrame',2,1,'the frame for administration modules','iframe','','frameborder = "0"',200,20,800,800,0,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','CreateTreeGDE',2,1,'TreeGDE set up','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',8,280,190,20,5,'','TreeGDE set up','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','body',1,1,'navigation','body','','onload=''mod_adminNavigation_init()''',0,0,0,0,0,'','','','mod_adminNavigation.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','deleteWMS',2,1,'!Delete completely!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',8,100,190,20,5,'','!Delete completely!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','delete_filteredGui',2,1,'Delete GUI','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',120,240,80,20,5,'','Delete GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editElements',2,1,'Edit GUI elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',8,260,190,20,5,'','Edit GUI elements','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editFilteredGroup',2,1,'Create and edit group','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',8,400,190,20,10,'','Create and edit group','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editFilteredUser',2,1,'Create and edit user','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',8,380,190,20,10,'','Create and edit user','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editGUI_WMS',2,1,'WMS GUI settings','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',8,180,190,20,5,'','WMS GUI settings','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','exportGUI',2,1,'export GUI, create SQL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',8,300,190,20,10,'','Export GUI (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGoup_filteredUser',2,1,'Add several users to one group','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',8,440,190,20,10,'','Add several users to one group ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGroup_filteredGui',2,1,'Allow one group access to several GUIs','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',8,570,190,25,10,'','Allow one group access to <br> several GUIs','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGui_filteredGroup',2,1,'Allow several groups access to one GUI','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',8,605,190,25,10,'','Allow several groups access <br> to one GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGui_filteredUser',2,1,'Allow several users access to one GUI ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',8,535,190,25,10,'','Allow several users access to <br> one GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredUser_filteredGroup',2,1,'Add one user to serveral groups','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',8,420,190,20,10,'','Add one user to serveral groups','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredUser_filteredGui',2,1,'Allow one user to access several GUIs','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',8,500,190,25,10,'','Allow one user to access <br> several GUIs','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','gui_owner',2,1,'Edit GUI assign to user','a','','href = "../php/mod_gui_owner.php?sessionID" target = "AdminFrame" ',8,640,190,20,10,'','Edit GUI assign to user','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_0',3,1,'WMS Management border','div','','',3,35,193,90,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1',3,1,'WMS Management caption','div','','',5,37,193,86,2,'',' WMS Management','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1a',3,1,'Configure WMS Access border','div','','',3,135,193,70,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1b',3,1,'Configure WMS Access','div','','',5,137,193,66,2,'',' Configure WMS Access','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1c',3,1,'GUI Management border','div','','',3,215,193,130,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1d',3,1,'GUI Management caption','div','','',5,217,193,126,2,'',' GUI Management ','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_2',3,1,'User Management border','div','','',3,355,193,110,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_3',3,1,'User Management caption','div','','',5,357,193,106,2,'',' User Management ','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_4',3,1,'Authorization background','div','','',3,475,193,190,1,'','','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_5',3,1,'Authorization caption','div','','',5,477,193,186,2,'',' Authorization','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','loadWMS',2,1,'Load Capabilities','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',8,60,190,20,5,'','Load Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','loadWMSList',2,1,'Link WMS into GUI','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',8,160,190,20,5,'','Link WMS into GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','myGUIlist',2,1,'go back to your GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','newGui',2,1,'Create new GUI','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',8,240,110,20,5,'','Create new GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','rename_copy_Gui',2,1,'Rename/ copy GUI','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',8,320,190,20,10,'','Rename / copy GUI','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','showLoggedUser',2,1,'Logged User:','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','updateWMSs',2,1,'Update with Capabilities','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',8,80,190,20,5,'','Update Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'body', 'body_css_file', '../css/admin.css', 'css-file to define the style fo the admin-gui', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGoup_filteredUser', 'css_file_filteredGroup_filterdUser', '../css/administration_alloc.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredUser_filteredGroup', 'css_filteredUser_filteredGroup', '../css/administration_alloc.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'gui_owner', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-
-
-Delete from gui_element where fkey_gui_id ='admin_de_services';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','AdminFrame',2,1,'Bereich für Administrationsmodule','iframe','','frameborder = "0"',210,25,800,800,12,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','CreateTreeGDE',2,1,'Ordnerbaum konfigurieren','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,516,200,20,5,'','Ordnerbaum konfigurieren','a','','','','AdminFrame','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,275,200,20,5,'','WMS Metadaten','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_WMS_Metadata');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','mod_adminNavigation.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','deleteWFS',2,1,'WFS löschen','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,393,200,20,5,'','WFS löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','deleteWMS',2,1,'!Vollständig löschen!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,100,200,20,5,'','WMS löschen!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','delete_filteredGui',2,1,'GUI löschen','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,471,200,20,5,'','GUI löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','editElements',2,1,'Oberflächenelemente editieren','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,491,200,25,5,'','GUI editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','editGUI_WMS',2,1,'WMS GUI Einstellungen','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,218,200,20,5,'','WMS Einstellungen ändern','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','exportGUI',2,1,'GUI exportieren, SQL erzeugen','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,536,200,25,10,'x','GUI exportieren (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','filteredWms_layer_topic',2,1,'allocate topics to layers of wms of this user','a','','href = "../php/mod_filteredWms_layer_topic.php?sessionID&e_id_css=filteredWms_layer_topic" target = "AdminFrame" ',10,295,200,20,5,'','Kategoriezuordnung','a','','','','AdminFrame','http://www.mapbender.org/index.php/Topic_/_Category');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_Configure_WMS_Access',3,1,'Hintergrund WMS Zuordnung','div','','',1,175,210,63,2,'','WMS Zuordnung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_GUI_Management',3,1,'Oberflächenverwaltung','div','','',1,428,210,153,2,'','GUI Verwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_Metadata',3,1,'Metadateneditor Caption','div','','',1,252,210,63,2,'','Metadaten','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_WFS_Management',3,1,'WFS Verwaltung','div','','',1,330,210,82,2,'','WFS Verwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_WMS_Management',3,1,'Dienstverwaltung Beschriftung','div','','',0,37,210,123,2,'','WMS Verwaltung','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWFS',2,1,'WFS Capabilities in eine GUI laden','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,353,200,20,5,'','WFS laden','a','','','','AdminFrame','http://www.mapbender.org/index.php/LoadWFS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWMS',2,1,'Capabilities hochladen','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,60,200,20,5,'','WMS laden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWMSList',2,1,'WMS in GUI einbinden','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,198,200,20,5,'','WMS einbinden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','myGUIlist',2,1,'Zurück zur eigenen GUI Liste','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','newGui',2,1,'GUI erzeugen','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,451,200,20,5,'','GUI erzeugen','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','orphanWMS',2,1,'display orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID"
-target = "AdminFrame"',10,120,200,20,5,'','WMS ohne Zuordung löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,140,200,20,10,'','OWSPROXY','a','','','','AdminFrame','http://www.mapbender.org/index.php/Owsproxy');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','rename_copy_Gui',2,1,'GUI umbenennen/ kopieren','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,561,200,20,10,'','GUI umbenennen/kopieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/RenameGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','showLoggedUser',2,1,'Anzeige des eingeloggten Benutzers','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','updateWMSs',2,1,'Hochgeladene aktualisieren','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,80,200,20,5,'','WMS aktualisieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','wfs_conf',2,1,'WFS konfigurieren','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,373,200,20,5,'','WFS konfigurieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Wfs_conf');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'EditWMSMetadata', 'file_css', '../css/metadata.css', 'css-file to use for the metadata modul', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'body', 'body_file_css', '../css/admin_service.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'filteredWms_layer_topic', 'file css', '../css/administration_alloc_4.css', 'css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'filteredWms_layer_topic', 'language', 'de', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-
-Delete from gui_element where fkey_gui_id ='admin_en_services';
-
-
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','AdminFrame',2,1,'administration frame','iframe','','frameborder = "0"',210,25,1000,800,12,'','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','CreateTreeGDE',2,1,'Configure TreeGDE','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,513,200,20,5,'','Configure TreeGDE','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,275,200,20,5,'','WMS Metadata','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_WMS_Metadata');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','mod_adminNavigation.js','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','deleteWFS',2,1,'Delete WFS','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,393,200,20,5,'','Delete WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','deleteWMS',2,1,'!Delete completely!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,100,200,20,5,'','!Delete completely!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','delete_filteredGui',2,1,'Delete GUI','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,471,200,20,5,'','Delete GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','editElements',2,1,'Edit GUI Elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,491,200,20,5,'','Edit GUI Elements','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','editGUI_WMS',2,1,'WMS GUI settings','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,218,200,20,5,'','WMS GUI settings','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','exportGUI',2,1,'Export GUI (SQL), create SQL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,533,200,20,10,'x','Export GUI (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','filteredWms_layer_topic',2,1,'allocate topics to layers of wms of this user','a','','href = "../php/mod_filteredWms_layer_topic.php?sessionID&e_id_css=filteredWms_layer_topic" target = "AdminFrame" ',10,295,200,20,5,'','Allocate topics','a','','','','AdminFrame','http://www.mapbender.org/index.php/Topic_/_Category');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_Configure_WMS_Access',3,1,'WMS Assignment','div','','',1,175,210,63,2,'','WMS Assignment','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_GUI_Management',3,1,'GUI Management','div','','',1,428,210,148,2,'','GUI Management','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_Metadata',3,1,'Metadata','div','','',1,252,210,63,2,'','Metadata','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_WFS_Management',3,1,'WFS Management','div','','',1,330,210,82,2,'','WFS Management','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_WMS_Management',3,1,'WMS Management','div','','',0,37,210,123,2,'','WMS Management','div','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWFS',2,1,'Load WFS Capabilities into a GUI','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,353,200,20,5,'','Load WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/LoadWFS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWMS',2,1,'load Capabilities','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,60,200,20,5,'','Load Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWMSList',2,1,'assign WMS to a GUI','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,198,200,20,5,'','Assign WMS to a GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','myGUIlist',2,1,'back to GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','newGui',2,1,'New GUI','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,451,200,20,5,'','New GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','orphanWMS',2,1,'Delete orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID"
-target = "AdminFrame"',10,120,200,20,5,'','Delete orphaned WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,140,200,20,10,'','OWSPROXY','a','','','','AdminFrame','http://www.mapbender.org/index.php/Owsproxy');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','rename_copy_Gui',2,1,'Rename / copy GUI','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,556,200,20,10,'','Rename / copy GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/RenameGUI');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','showLoggedUser',2,1,'show logged in user','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','updateWMSs',2,1,'Update Capabilities','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,80,200,20,5,'','Update Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
-INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','wfs_conf',2,1,'Configure WFS','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,373,200,20,5,'','Configure WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Wfs_conf');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'EditWMSMetadata', 'file_css', '../css/metadata.css', 'css-file to use for the metadata modul', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'body', 'body_file_css', '../css/admin_service.css', 'file/css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'filteredWms_layer_topic', 'file css', '../css/administration_alloc_4.css', 'css', 'file/css');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'filteredWms_layer_topic', 'language', 'de', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
-INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
-
-
-
-
-
-
Copied: branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql (from rev 2219, branches/2.4.5/resources/db/update/update_guis_iso.sql)
===================================================================
--- branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql (rev 0)
+++ branches/2.4.5_rc1/resources/db/update/update_guis_iso.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,851 @@
+--
+-- update of mapbender guis
+--
+-- gui / gui1 / gui2 / gui_digitize
+--
+-- Mapbender (Version: 2.4.3)
+-- 2007-09-21
+
+
+Delete from gui_element where fkey_gui_id ='gui';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','FeatureInfoRedirect',2,1,'redirect featureInfoRequests in an iframe for each wms','iframe','../html/mod_blank.html','frameborder="0"',83,-17,1,1,0,'','','iframe','mod_featureInfoRedirect.php','','','','http://www.mapbender.org/index.php/FeatureInfoRedirect');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_gray/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',540,10,24,24,1,'','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','addWMS',2,1,'add a WMS to the running application','img','../img/button_gray/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',515,10,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',490,10,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','back',2,1,'History.back()','img','../img/button_gray/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',360,10,24,24,1,'','','','mod_back.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Back');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,NULL ,NULL ,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',425,10,24,24,1,'','','','mod_featureInfoTunnel.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfoTunnel');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','forward',2,1,'History.forward()','img','../img/button_gray/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',385,10,24,24,1,'','','','mod_forward.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Forward');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','gazetteerMetadata',2,1,'gazetteer for metadata','iframe','../php/mod_gazetteerMetadata.php?sessionID&target=mapframe1,overview','frameborder = "0"',1,1,1,1,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',620,10,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','highlightPOI',2,1,'highlight 1 to n pois in your gui with a Symbol and a special text','div','','',0,0,NULL ,NULL ,NULL ,'','','div','mod_highlightPOI.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_back',3,1,'layout, background for buttons','div','','',360,10,51,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_featureInfo',3,1,'layout, background for FeatureInfo','div','','',425,10,51,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_help',3,1,'layout, background for Help-button','div','','',620,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_logout',3,1,'layout, background for Logout-button','div','','',660,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_metadata',3,1,'layout, background for Metadata','div','','',580,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_wms',3,1,'layout, background for wms','div','','',490,10,76,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','layout_zoom',3,1,'layout, background for Zoom-button','div','','',220,10,126,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','logo',2,1,'Logo','img','../img/mapbender_logo.png','',20,20,180,26,5,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',660,10,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/Logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',230,55,500,450,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','meetingPoint',2,1,'create a meeting point','iframe','../php/mod_meetingPoint.php?sessionID','frameborder = "0" ',0,0,NULL ,NULL ,4,'visibility:hidden;','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_gray/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0'' onmouseover=''this.src="../img/button_gray/metadata_over.png"'' onmouseout=''this.src="../img/button_gray/metadata_off.png"'' title="Show service metadata"',580,10,24,24,1,'','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div> <div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div> <div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div> <div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div> <div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div> <div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div> <div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div> <div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div> ','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',30,65,150,130,100,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','pan1',2,1,'pan','img','../img/button_gray/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',270,10,24,24,1,'','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','http://www.mapbender.org/index.php/Print');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','selArea1',2,1,'zoombox','img','../img/button_gray/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',295,10,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','setBackground',2,1,'switch background-wms','form','','',30,210,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_gray/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',450,10,24,24,1,'','','','mod_coords_div.php','','mapframe1','dependendDiv','http://www.mapbender.org/index.php/ShowCoords_div');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','tabs',2,1,'vertical tabs to handle iframes','div','','',10,240,200,20,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
+for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomFull',2,1,'zoom to full extent button','img','../img/button_gray/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',320,10,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomIn1',2,1,'zoomIn button','img','../img/button_gray/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',220,10,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui','zoomOut1',2,1,'zoomOut button','img','../img/button_gray/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',245,10,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_all', '0', '1 enables option "load all wms"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_group', '0', '1 enables option "load wms from group"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'option_gui', '0', '1 enables option "load wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'gazetteerWFS', 'wfsConfIdString', '1', 'comma seperated list of WFS conf ids', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_height', '14', 'height of the poi_image', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_image', '../img/redball.gif', 'image to use to mark the poi(s)', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_style', 'background-color:white;font-weight: bold;color:blue;font-family:Arial;', 'style to display the poi text', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'highlightPOI', 'poi_width', '14', 'width of the poi_image', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'legendlink', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showlayertitle', 'false', 'show the layer title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'showwmstitle', 'false', 'show the wms title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_ccs_file', '../css/meetingPoint.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_export_format', 'prompt', 'decide which format to choose (email, prompt)', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_export_subject', 'Ein Treffpunkt wurde erzeugt. Folgen Sie dem Link!', 'if you choose format email, define the text for the subject', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_height', '14', 'height of the meetingPoint_icon', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_icon', '../img/redball.gif', 'path to meetingPoint image', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_max_characters', '70', 'define the maximum length of the text', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_please_click', 'Please click in the map to define the meeting point position!', 'text to show if no clickposition is set', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_style', 'background-color:white;font-weight: bold;color:red;font-family:Arial;', 'style to display the meetingPoint text', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'meetingPoint', 'meetingPoint_width', '14', 'width of the meetingPoint_icon', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'open_tab', '0', 'define which tab should be opened when a gui is opened', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[5]', '160', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_frameHeight[6]', '280', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[5]', 'meetingPoint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_ids[6]', 'gazetteerMetadata', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_prefix', ' ', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid white;font-size:12;color:#343434;background-color:#CFD2D4;cursor:pointer;', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[5]', 'Meeting Point', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'tabs', 'tab_titles[6]', 'Metadata search', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'menu', 'opacity_up,opacity_down,zoom,metainfo,hide,wms_up,wms_down,layer_up,layer_down,remove', 'context menu elements', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'metadatalink', 'false', 'link for layer-metadata', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui', 'treeGDE', 'wmsbuttons', 'false', 'wms management buttons', 'var');
+
+Delete from gui_element where fkey_gui_id ='gui1';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','WMS_preferences',2,1,'configure the preferences of each loaded wms','img','../img/button_blink_red/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',670,60,24,24,1,'','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMS',2,1,'add a WMS to the running application','img','../img/button_blink_red/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',645,60,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMSfromList',2,1,'add a WMS to the running application from a list','img','../img/button_blink_red/addlist_off.png','onclick=''window.open("../javascripts/mod_addWMSfromList.php?sessionID","printWin","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from List"',595,60,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_list');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',620,60,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','back',2,1,'History.back()','img','../img/button_blink_red/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',400,60,24,24,1,'','','','mod_back.php','','mapframe1,overview','','http://www.mapbender.org/index.php/Back');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','center1',2,1,'Center button','img','../img/button_blink_red/center_off.png','onmouseover = "mb_regButton(''init_gui1_center'')" title="Set map center"',310,60,24,24,1,'','','','mod_center1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','changeEPSG',2,1,'change EPSG, Postgres required, overview is targed for full extent','iframe','../php/mod_changeEPSG.php?sessionID','scrolling="no" frameborder=''0'' ',432,25,107,24,1,'','','iframe','','','overview','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','changePassword_button',2,1,'button: change password of logged user','img','../img/button_blink_red/change_password_off.png','onclick="window.open(''../php/mod_changePassword.php?sessionID'','''',''width=300, height=300, menubar=no,toolbar=no,location=no,status=no,resizable=yes'');" border=''0'' onmouseover=''this.src="../img/button_blink_red/change_password_over.png"'' onmouseout=''this.src="../img/button_blink_red/change_password_off.png"'' title="Change password"',750,60,24,24,1,'cursor:hand','','','','','','','http://www.mapbender.org/index.php/ChangePassword');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','closePolygon',3,1,'close Polygon ','div','',' title="Close Polygon"',0,0,0,0,0,'','','div','mod_closePolygon.js','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',-59,1,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','dragMapSize',2,1,'drag & drop Mapsize','div','','',-59,1,0,0,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','featureInfo1',2,1,'FeatureInfoRequest','img','../img/button_blink_red/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')" title="Query"',465,60,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','forward',2,1,'History.forward()','img','../img/button_blink_red/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',425,60,24,24,1,'','','','mod_forward.php','','mapframe1,overview','','http://www.mapbender.org/index.php/Forward');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','getArea',3,1,'Calculation of area, Postgis required','div','',' title="Get Area"',0,0,0,0,0,'','','div','mod_getArea.php','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','help',2,1,'button help','img','../img/button_blink_red/help_off.png','onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' onclick=''window.open("http://www.mapbender.org/index.php/Using_Mapbender","Hilfe","width=800, height=800, resizable=yes,scrollbars=yes, menubar=yes, toolbar=yes, location=yes")'' title="Help"',790,60,24,24,1,'','','','','','','','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','help1',2,1,'button help','img','../img/button_blink_red/help_off.png','onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' onclick=''window.open("http://www.mapbender.org/index.php/Using_Mapbender","Hilfe","width=800, height=800, resizable=yes,scrollbars=yes, menubar=yes, toolbar=yes, location=yes")'' title="Help"',790,60,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/help');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','highlightPOI',2,1,'highlight 1 to n pois in your gui with a Symbol and a special text','div','','',0,0,NULL ,NULL ,NULL ,'','','div','mod_highlightPOI.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','layout_1',3,1,'layout, background for buttons','div','','',208,58,670,28,0,'background-color:#FFFFFF;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&wms_legend = yes','frameborder=''0''',-59,200,180,600,3,'','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','loadData',2,1,'IFRAME to load data','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','loadwmc',2,1,'load workspace from WMC','img','../img/button_blink_red/wmc_load_off.png','onclick=''mod_loadwmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");''
+onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Load a web map context document"',895,60,24,24,1,'','','','mod_loadwmc.php','','mapframe1','','http://www.mapbender.org/index.php/LoadWMC');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','logout',2,1,'Logout','img','../img/button_blink_red/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_blink_red/logout_over.png"'' onmouseout=''this.src="../img/button_blink_red/logout_off.png"'' title="Logout"',830,60,24,24,1,'','','','','','','','http://www.mapbender.org/index.php/Logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',-59,1,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','mapframe1',2,1,'Frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',220,105,625,400,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','measure',2,1,'Measure','img','../img/button_blink_red/measure_off.png','onmouseover = "mb_regButton(''init_mod_measure'')" title="Measure distance"',515,60,24,24,1,'','','','mod_measure.php','','mapframe1','','http://www.mapbender.org/index.php/Measure');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_blink_red/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0'' onmouseover=''this.src="../img/button_blink_red/metadata_over.png"'' onmouseout=''this.src="../img/button_blink_red/metadata_off.png"'' title="Show WMS infos"',710,60,24,24,1,'','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,10,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div> <div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div> <div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div> <div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div> <div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div> <div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div> <div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div> <div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div> ','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',15,25,150,150,2,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','pan1',2,1,'pan','img','../img/button_blink_red/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',260,60,24,24,1,'','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','print1',2,0,'start print GUI','img','../img/button_blink_red/print_off.png','onclick=''window.open("../print/mod_printPDF.php?target=mapframe1&sessionID","printWin","width=300, height=400, resizable=yes ")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Print"',555,60,24,24,1,'','','','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','printPDF',2,1,'start print GUI','img','../img/button_blink_red/print_off.png','onclick=''window.open("../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF_b.conf","printWin","width=180, height=200, resizable=yes ")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Print"',555,60,24,24,1,'','','','','','mapframe1','','http://www.mapbender.org/index.php/Print');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','repaint',2,1,'refresh a mapobject','img','../img/button_blink_red/repaint_off.png','onclick=''mod_repaint()'' onmouseover=''mod_repaint_init(this)'' title="Redraw"',360,60,24,24,1,'','','','mod_repaint.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','rubber',3,1,'deletes temporary (digitized) objects','div','',' title="Rubber"',0,0,0,0,0,'','','div','mod_rubber.js','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',0,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','savewmc',2,1,'save workspace as WMC','img','../img/button_blink_red/wmc_save_off.png','onclick=''mod_savewmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Save workspace as web map context document"',870,60,24,24,1,'','','','mod_savewmc.php','','mapframe1','','http://www.mapbender.org/index.php/SaveWMC');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scaleSelect',2,1,'Scale-Selectbox','select','','onchange=''mod_scaleSelect(this)''',555,25,100,20,1,'','<option value = ''''>Scale</option> <option value=''100''>1 : 100</option> <option value=''250''>1 : 250</option> <option value=''500''>1 : 500</option> <option value=''1000''>1 : 1000</option> <option value=''2500''>1 : 2500</option> <option value=''5000''>1 : 5000</option> <option value=''10000''>1 : 10000</option> <option value=''25000''>1 : 25000</option> <option value=''30000''>1 : 30000</option> <option value=''50000''>1 : 50000</option> <option value=''75000''>1 : 75000</option> <option value=''100000''>1 : 100000</option> <option value=''200000''>1 : 200000</option> <option value=''300000''>1 : 300000</option> <option value=''400000''>1 : 400000</option> <option value=''500000''>1 : 500000</option> <option value=''600000''>1 : 600000</option> <option value=''700000''>1 : 700000</option> <option value=''800000''>1 : 800000</option> <option value=''900000''>1 : 900000</option> <option value=''1000000''>1 : 1000000</option>','select','mod_scaleSel.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scaleText',2,1,'Scale-description field','form','','onsubmit=''return mod_scaleText()''',672,25,100,30,0,'','<input type="text">','form','mod_scaleText.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','scalebar',2,1,'scalebar','div','','',0,0,0,0,0,'','','div','mod_scalebar.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','selArea1',2,1,'zoombox','img','../img/button_blink_red/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',285,60,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBBOX',2,0,'set Extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBackground',2,0,'switch background-wms','form','','',15,190,0,0,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setBackground_all',2,0,'switch all background-wms','form','','',157,190,40,20,1,'','<input type=''checkbox'' onclick=''mod_setBackground_all_init(this)''> <font face="Arial, sans-serif" size="2">all</font>','form','mod_setBackground_all.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setPOI2Scale',2,1,'zoom to a poi (get-parameter)','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_setPOI2Scale.php','','mapframe1','','http://www.mapbender.org/index.php/Mod_setPoi2Scale');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','setScaleHint',1,0,'set scaleHint for mapframes','div','','',1,1,1,1,0,'visibility:hidden;','','div','mod_scaleHint.php','','mapframe1,100,10000000','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','showCoords_div',2,1,'displays coordinates by onmouseover','img','../img/button_blink_red/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates"',490,60,24,24,1,'','','','mod_coords_div.php','','mapframe1','','http://www.mapbender.org/index.php/ShowCoords_div');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeConfGDE',2,0,'configurable directory tree','iframe','../php/mod_treefolderClient.php?sessionID','frameborder = "0" ',0,180,250,500,0,'visibility:visible','','iframe','mod_treeConf.js','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
+for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','treeGDE_1',2,0,'directory tree, checkbox for visible, checkbox for querylayer, no immediate refreshing, with nested layers','iframe','../html/mod_sync_treefolder_1.html','frameborder = "0" ',0,180,250,500,0,'visibility:visible','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','wfs_gazetteer',2,0,'gazetteer using wfs','iframe','../php/mod_wfs_gazetteer.php?sessionID&color=255,0,255','frameborder = "0" ',-50,490,250,300,0,'visibility:visible','','iframe','','','mapframe1,overview','wfs','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomCoords',2,1,'zoom to coordinate','iframe','../php/mod_zoomCoords_en.php?sessionID','frameborder = "0" ',205,7,220,45,0,'','','iframe','','','mapframe1,overview','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomFull',2,1,'zoom to full extent button','img','../img/button_blink_red/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',335,60,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomIn1',2,1,'zoomIn button','img','../img/button_blink_red/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',210,60,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui1','zoomOut1',2,1,'zoomOut button','img','../img/button_blink_red/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',235,60,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_db', '0', '1 enables option "load configured wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_height', '25', 'height of the poi_image', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_image', '../img/redball.gif', 'image to use to mark the poi(s)', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_style', 'background-color:white;font-weight: bold;color:blue;font-family:Arial;', 'style to display the poi text', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'highlightPOI', 'poi_width', '25', 'width of the poi_image', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'css_file_legend', '../css/legend.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'legendlink', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showlayertitle', 'true', 'show the layer title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'showwmstitle', 'true', 'show the wms title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'legend', 'stickylegend', 'true', 'parameter to decide wether the legend should stick on the mapframe1', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'logout', 'logout_location', 'http://www.mapbender.org/', 'webside to show after logout', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'setPOI2Scale', 'mod_setPOI2Scale_defScale', '5000', 'default scale', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'menu', '', 'context menu elements', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui1', 'treeGDE', 'wmsbuttons', 'true', 'wms management buttons', 'var');
+
+Delete from gui_element where fkey_gui_id ='gui2';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_blue/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',604,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','mapframe1,treeGDE','','http://www.mapbender.org/index.php/WMS_preferences');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','addWMS',2,1,'add a WMS to the running application','img','../img/button_blue/add_off.png','onclick=''mod_addWMS()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',580,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/AddWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blue/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',553,40,28,28,1,'filter:Chroma(color=#C2CBCF);','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','back',2,1,'History.back()','img','../img/button_blue/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',398,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_back.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Back');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','body',1,1,'body
+(obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'background-image:url(../img/background_yellow.jpg);background-repeat:repeat-x;','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','center1',2,1,'Center button','img','../img/button_blue/center_off.png','onmouseover = "mb_regButton(''init_gui1_center'')" title="Set map center"',308,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_center1.php','','mapframe1','','http://www.mapbender.org/index.php/ReCenter');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','changePassword_button',2,1,'button: change password of logged user','img','../img/button_blue/change_password_off.png','onclick="window.open(''../php/mod_changePassword.php?sessionID'','''',''width=300, height=300, menubar=no,toolbar=no,location=no,status=no,resizable=yes'');" border=''0''
+onmouseover=''this.src="../img/button_blue/change_password_over.png"'' onmouseout=''this.src="../img/button_blue/change_password_off.png"'' title="Change password"',668,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','','','http://www.mapbender.org/index.php/ChangePassword');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','closePolygon',3,1,'close Polygon ','div','','title="Close Polygon"',0,0,NULL ,NULL ,NULL ,'','','div','mod_closePolygon.js','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','http://www.mapbender.org/index.php/Copyright');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','http://www.mapbender.org/index.php/DependentDiv');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,NULL ,NULL ,2,'background-color:#799FEB; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','dynamicOverview',2,1,'oveview acts in accordance with main mapframe','div','','',NULL ,NULL ,NULL ,NULL ,NULL ,'','','div','mod_dynamicOverview.php','','mapframe1,overview','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_blue/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_featureInfo.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfo');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_blue/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',461,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_featureInfoTunnel.php','','mapframe1','','http://www.mapbender.org/index.php/FeatureInfoTunnel');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','forward',2,1,'History.forward()','img','../img/button_blue/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',423,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_forward.php','','mapframe1,overview0','','http://www.mapbender.org/index.php/Forward');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','getArea',3,1,'Calculation of area, Postgis required','div','','title="Get Area"',0,0,NULL ,NULL ,NULL ,'','','div','mod_getArea.php','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','header_yellow',2,0,'header','img','../img/header_yellow.jpg','',-1,-1,833,75,NULL ,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','help',2,1,'button help','img','../img/button_blue/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',693,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','layout_linie',3,0,'layout','div','','',1,70,830,1,1,'background-color:#799FEB;font-size:1px;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','layout_linie2',3,0,'layout','div','','',1,35,830,1,1,'background-color:#799FEB;font-size:1px;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','loadwmc',2,1,'load workspace from WMC','img','../img/button_blue/wmc_load_off.png','onclick=''mod_loadwmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");''
+onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Load a web map context document"',758,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_loadwmc.php','','mapframe1','','http://www.mapbender.org/index.php/LoadWMC');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','logo',2,1,'Logo','img','../img/mapbender_oo.png','',10,35,129,32,5,'filter:Chroma(color=#C2CBCF);','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','logout',2,1,'Logout','img','../img/button_blue/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_blue/logout_over.png"'' onmouseout=''this.src="../img/button_blue/logout_off.png"''',798,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','','','','','http://www.mapbender.org/index.php/Logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr> <script language="javascript"> mb_registerSubFunctions("mod_mapbender()"); function mod_mapbender(){ document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90; document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1; } </script>','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',213,90,608,467,2,'','','iframe','','','','','http://www.mapbender.org/index.php/Mapframe');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','measure',2,1,'Measure','img','../img/button_blue/measure_off.png','onmouseover = "mb_regButton(''init_mod_measure'')" title="Measure distance"',513,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_measure.php','','mapframe1','','http://www.mapbender.org/index.php/Measure');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_blue/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''" border=''0''
+onmouseover=''this.src="../img/button_blue/metadata_over.png"'' onmouseout=''this.src="../img/button_blue/metadata_off.png"''
+title="Show SQL"',643,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_displayObj.js','','','','http://www.mapbender.org/index.php/Metadata');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div>
+<div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div>
+<div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div>
+<div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div>
+<div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div>
+<div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div>
+<div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div>
+<div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#799FEB;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div>','div','mod_navFrame.php','','mapframe1','','http://www.mapbender.org/index.php/NavFrame');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',9,80,185,130,100,'','','iframe','','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/Overview');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','pan1',2,1,'pan','img','../img/button_blue/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',258,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_pan.php','','mapframe1','','http://www.mapbender.org/index.php/Pan');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','http://www.mapbender.org/index.php/Print');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','repaint',2,1,'refresh a mapobject','img','../img/button_blue/repaint_off.png','onclick=''mod_repaint()'' onmouseover=''mod_repaint_init(this)'' title="Redraw"',358,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_repaint.php','','mapframe1','','http://www.mapbender.org/index.php/Repaint');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','resizeMapsize',2,1,'resize mapsize to browser window size','img','../img/button_blink_red/resizemapsize_off.png','onclick = "adjustDimension()"
+onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="optimize mapsize to browser window"',838,40,24,24,3,'filter:Chroma(color=#C2CBCF);','','','mod_resize_mapsize.php','','mapframe1','','http://www.mapbender.org/index.php/ResizeMapsize');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','rubber',3,1,'deletes temporary (digitized) objects','div','','title="Rubber"',0,0,NULL ,NULL ,NULL ,'','','div','mod_rubber.js','','mapframe1','measure','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','savewmc',2,1,'save workspace as WMC','img','../img/button_blue/wmc_save_off.png','onclick=''mod_savewmc()'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Save workspace as web map context document"',733,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_savewmc.php','','mapframe1','','http://www.mapbender.org/index.php/SaveWMC');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','selArea1',2,1,'zoombox','img','../img/button_blue/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',283,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_selArea1.php','mod_box1.js','mapframe1','','http://www.mapbender.org/index.php/SelArea1');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','setBackground',2,1,'switch background-wms','form','','',10,218,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12'' name=''mod_setBackground_list'' onchange=''mod_setBackground_change(this)'' ><option value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_blue/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',488,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_coords_div.php','','mapframe1','dependendDiv','http://www.mapbender.org/index.php/ShowCoords_div');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','tabs',2,1,'vertical tabs to handle iframes','div','','',2,245,191,22,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
+for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomFull',2,1,'zoom to full extent button','img','../img/button_blue/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',333,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','img','mod_zoomFull.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomFull');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomIn1',2,1,'zoomIn button','img','../img/button_blue/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title=''Zoom in''',203,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_zoomIn1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomIn');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui2','zoomOut1',2,1,'zoomOut button','img','../img/button_blue/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',231,40,28,28,3,'filter:Chroma(color=#C2CBCF);','','','mod_zoomOut1.php','','mapframe1','','http://www.mapbender.org/index.php/ZoomOut');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'body', 'css_class_bg', 'body{background-color: #FEF8D4;}', 'to define the color of the body', 'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_minScale', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_startExtent', '-24.5,32,34.5,71', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_useMaxExtent', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_wmsIndex', '0', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'dynamicOverview', 'mod_dynamicOverview_zoomFactor', '5', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'gazetteerWFS', 'wfsConfIdString', '1', 'comma seperated list of WFS conf ids', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'legendlink', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showlayertitle', 'false', 'show the layer title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'showwmstitle', 'false', 'show the wms title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'adjust_height', '-35', 'to adjust the height of the mapframe on the bottom of the window', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'adjust_width', '-45', 'to adjust the width of the mapframe on the right side of the window', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'resizeMapsize', 'resize_option', 'button', 'auto (autoresize on load), button (resize by button)', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'sandclock', 'mod_sandclock_image', '../img/sandclock_oo.gif', 'define a sandclock image ', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'open_tab', '0', 'define which tab should be opened when a gui is opened', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_prefix', ' ', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid #FDCC1A;font-size:12;color:#FFFFFF;background-color:#799FEB;cursor:pointer;margin-top:-3px; padding-top:3px;padding-left:4px;', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'menu', 'opacity_up,opacity_down,zoom,metainfo,hide,wms_up,wms_down,layer_up,layer_down,remove', 'context menu elements', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui2', 'treeGDE', 'wmsbuttons', 'false', 'wms management buttons', 'var');
+
+Delete from gui_element where fkey_gui_id ='gui_digitize';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','FeatureInfoRedirect',2,0,'redirect featureInfoRequests in an iframe for each wms','iframe','../html/mod_blank.html','frameborder="0"',83,-17,1,1,NULL ,'','','iframe','mod_featureInfoRedirect.php','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','WMS_preferences',2,1,'configures the preferences of each loaded wms','img','../img/button_gray/preferences_off.png','onclick=''window.open("../php/mod_WMSpreferences.php?sessionID","","width=400, height=600, left=300, resizable=yes, scrollbars=yes")''
+onmouseover=''this.src = this.src.replace(/_off/,"_over");''
+onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="WMS preferences"',540,10,24,24,1,'','','','','','mapframe1,treeGDE','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','addWMS',2,1,'add a WMS to the running application','img','../img/button_gray/add_off.png','onclick=''mod_addWMS()''
+onmouseover=''this.src = this.src.replace(/_off/,"_over");''
+onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS"',515,10,24,24,1,'','','','mod_addWMS.php','','treeGDE,mapframe1','loadData','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','addWMSfromfilteredList_ajax',2,1,'add a WMS to the running application from a filtered list','img','../img/button_blink_red/add_filtered_list_off.png','onclick=''mod_addWMSfromfilteredList_win=window.open("../javascripts/mod_addWMSfromfilteredList_ajax.php?sessionID","mod_addWMSfromfilteredList_win","width=500, height=600, left=300, resizable=yes, scrollbars=yes")'' onmouseover=''this.src = this.src.replace(/_off/,"_over");'' onmouseout=''this.src = this.src.replace(/_over/, "_off");'' title="Adding WMS from filtered list"',490,10,24,24,1,'','','','','mod_addWMSgeneralFunctions.js','treeGDE,mapframe1','loadData','http://www.mapbender.org/index.php/Add_WMS_from_filtered_list');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','ajax',6,1,'ajax module','iframe','../frames/jquery.html','',1,1,1,1,1,'visibility:hidden','','iframe','../javascripts/mb_ajaxWrapper_jQuery.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','back',2,1,'History.back()','img','../img/button_gray/back_off_disabled.png','onmouseover="mod_back_over(this)" onmouseout="mod_back_out(this)" onclick = "mod_back_set()" title="Back"',360,10,24,24,1,'','','','mod_back.php','','mapframe1,overview0','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','body',1,1,'body (obligatory)','body','','onload="init()"',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','closePolygonExt',3,0,'close Polygon ','div','',' title="Close Polygon"',0,0,NULL ,NULL ,NULL ,'','','div','mod_closePolygonExt.js','','mapframe1','setExtRequest','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','copyright',2,1,'a Copyright in the map','div','','',0,0,0,0,0,'','','div','mod_copyright.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','dependentDiv',2,1,'displays infos in a sticky div-tag','div','','',81,-19,1,1,0,'visibility:visible;position:absolute;font-size: 11px;font-family: "Arial", sans-serif;','','div','mod_dependentDiv.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','digitize',2,1,'Digitize tool.','iframe','../javascripts/mod_digitize_tab.php?sessionID','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','dragMapSize',2,1,'drag & drop Mapsize','div','','',81,-19,0,0,2,'background-color:#B8C1C7; font-size:1px; cursor:move; width:10; height:10;','','div','mod_dragMapSize.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','featureInfo1',2,0,'FeatureInfoRequest','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfo1'')"',140,40,24,24,1,'','','','mod_featureInfo.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','featureInfoTunnel',2,1,'FeatureInfoRequest with local path','img','../img/button_gray/query_off.png','onmouseover = "mb_regButton(''init_featureInfoTunnel'')" title="Query"',425,10,24,24,1,'','','','mod_featureInfoTunnel.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','forward',2,1,'History.forward()','img','../img/button_gray/forward_off_disabled.png','onmouseover="mod_forward_over(this)" onmouseout="mod_forward_out(this)" onclick = "mod_forward_set()" title="Forward"',385,10,24,24,1,'','','','mod_forward.php','','mapframe1,overview0','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','gazetteerWFS',2,1,'a gazetteer for user in the mapbender user map','iframe','../javascripts/mod_wfs_gazetteer_client.php?sessionID&target=mapframe1,overview','frameborder = "0"',10,600,300,150,4,'visibility:hidden;','','iframe','','','mapframe1,overview','wz-graphics','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','geometry',1,1,'geometry library','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','geometry.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',620,10,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','imprint',2,1,'Information about the owner of the gui','iframe','../html/tab_imprint.html','frameborder = "0" ',1,1,1,1,5,'visibility:hidden;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','initWmc',2,0,'initialise client with wmc','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','mod_initWmc.php','','mapframe1,overview','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_1',3,0,'Warning notice','div','','',150,250,300,16,100,'font-family: Arial, Helvetica, sans-serif; font-size : 14px; text-decoration : none;','Development Version - Work in Progress!','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_back',3,1,'layout, background for buttons','div','','',360,10,51,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_featureInfo',3,1,'layout, background for FeatureInfo','div','','',425,10,51,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_help',3,1,'layout, background for Help-button','div','','',620,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_logout',3,1,'layout, background for Logout-button','div','','',660,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_metadata',3,1,'layout, background for Metadata','div','','',580,10,26,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_wms',3,1,'layout, background for wms','div','','',490,10,76,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','layout_zoom',3,1,'layout, background for Zoom-button','div','','',220,10,126,26,0,'background-color:#414547;','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','legend',2,1,'legend','iframe','../javascripts/mod_legend.php?sessionID&e_id_css=legend','frameborder=''0''',1,1,1,1,3,'visibility:hidden;','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','loadData',2,1,'IFRAME, um Daten zu laden','iframe','../html/mod_blank.html','frameborder = "0" ',0,0,1,1,0,'visibility:visible','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','loadwmc',2,0,'load workspace from WMC','img','../img/button_wmc/wmc_load.png','onclick=''mod_loadwmc()'' onmouseover=''mod_loadwmc_init(this)''
+title=''Load a web map context document''',760,10,24,24,1,'','','','mod_loadwmc.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','logo',2,1,'Logo','img','../img/mapbender_logo.png','',20,20,180,26,5,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0''
+onmouseover=''this.src="../img/button_gray/logout_over.png"''
+onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',660,10,24,24,1,'','','','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','mapbender',2,1,'Mapbender-Logo','div','','onclick="javascript:window.open(''http://www.mapbender.org'','''','''');"',81,-19,1,1,30,'font-size : 10px;font-weight : bold;font-family: Arial, Helvetica, sans-serif;color:white;cursor:help;','<nobr>Ma<span style="color: blue;">P</span><span style="color: red;">b</span>ender</nobr>
+<script language="javascript">
+mb_registerSubFunctions("mod_mapbender()");
+function mod_mapbender(){
+document.getElementById("mapbender").style.left = parseInt(document.getElementById("mapframe1").style.left) + parseInt(document.getElementById("mapframe1").style.width) - 90;
+document.getElementById("mapbender").style.top = parseInt(document.getElementById("mapframe1").style.top) + parseInt(document.getElementById("mapframe1").style.height) -1;
+}
+</script>','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','mapframe1',2,1,'frame for a map','iframe','../php/mod_map1.php?sessionID','scrolling="no" frameborder=''0'' ',230,55,500,450,2,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','metadata',2,1,'shows informations about the wms and the requests of the gui','img','../img/button_gray/metadata_off.png','onClick="window.location.href=''javascript:mod_displayObj()''"
+border=''0''
+onmouseover=''this.src="../img/button_gray/metadata_over.png"''
+onmouseout=''this.src="../img/button_gray/metadata_off.png"'' title="Show service metadata"',580,10,24,24,1,'','','','mod_displayObj.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','navFrame',2,1,'navigation mapborder','div','','',0,0,0,0,0,'font-size:1px;','<div id=''mbN'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("N")''><img id=''arrow_n'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_n.gif'' width=''15'' height=''10''></div>
+<div id=''mbNE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NE")''><img id=''arrow_ne'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_ne.gif'' width=''10'' height=''10''></div>
+<div id=''mbE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("E")''><img id=''arrow_e'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_e.gif'' width=''10'' height=''15''></div>
+<div id=''mbSE'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SE")''><img id=''arrow_se'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_se.gif'' width=''10'' height=''10''></div>
+<div id=''mbS'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("S")''><img id=''arrow_s'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_s.gif'' width=''15'' height=''10''></div>
+<div id=''mbSW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("SW")''><img id=''arrow_sw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_sw.gif'' width=''10'' height=''10''></div>
+<div id=''mbW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("W")''><img id=''arrow_w'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_w.gif'' width=''10'' height=''15''></div>
+<div id=''mbNW'' style=''position:absolute;width:0;height:0;top:0;left:0;background-color:#B8C1C7;'' onclick=''mod_navFrame("NW")''><img id=''arrow_nw'' style=''position:relative;top:0;left:0'' src=''../img/arrows/arrow_nw.gif'' width=''10'' height=''10''></div>
+','div','mod_navFrame.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','overview',2,1,'OverviewFrame','iframe','../php/mod_mapOV.php?wms=0&sessionID','scrolling="no" frameborder=''0'' ',30,65,150,130,100,'','','iframe','','mod_box1.js','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','pan1',2,1,'pan','img','../img/button_gray/pan_off.png','onmouseover = "mb_regButton(''init_mod_pan'')" title="Pan"',270,10,24,24,1,'','','','mod_pan.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','printPDF',2,1,'pdf print','iframe','../print/mod_printPDF.php?target=mapframe1&sessionID&conf=printPDF.conf','frameborder = "0" ',1,1,2,2,5,'visibility:hidden','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','rubberExt',3,1,'deletes temporary (digitized) objects','div','',' title="Rubber"',0,0,0,0,0,'','','div','mod_rubberExt.js','','mapframe1','setExtRequest','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','sandclock',2,1,'displays a sand clock while waiting for requests','div','','',80,0,0,0,0,'','','div','mod_sandclock.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','savewmc',2,0,'save workspace as WMC','img','../img/button_wmc/wmc_save.png','onclick=''mod_savewmc()'' onmouseover=''mod_savewmc_init(this)''
+title=''Save workspace as web map context document''',730,10,24,24,1,'','','','mod_savewmc.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','scaleSelect',2,0,'Scale-Selectbox','select','','onchange=''mod_scaleSelect(this)''',555,25,100,20,1,'','<option value = ''''>Scale</option>
+<option value=''100''>1 : 100</option>
+<option value=''250''>1 : 250</option>
+<option value=''500''>1 : 500</option>
+<option value=''1000''>1 : 1000</option>
+<option value=''2500''>1 : 2500</option>
+<option value=''5000''>1 : 5000</option>
+<option value=''10000''>1 : 10000</option>
+<option value=''25000''>1 : 25000</option>
+<option value=''30000''>1 : 30000</option>
+<option value=''50000''>1 : 50000</option>
+<option value=''75000''>1 : 75000</option>
+<option value=''100000''>1 : 100000</option>
+<option value=''200000''>1 : 200000</option>
+<option value=''300000''>1 : 300000</option>
+<option value=''400000''>1 : 400000</option>
+<option value=''500000''>1 : 500000</option>
+<option value=''600000''>1 : 600000</option>
+<option value=''700000''>1 : 700000</option>
+<option value=''800000''>1 : 800000</option>
+<option value=''900000''>1 : 900000</option>
+<option value=''1000000''>1 : 1000000</option>','select','mod_scaleSel.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','selArea1',2,1,'zoombox','img','../img/button_gray/selArea_off.png','onmouseover = "mb_regButton(''init_selArea1'')" title="Zoom by rectangle"',295,10,24,24,1,'','','','mod_selArea1.php','mod_box1.js','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setBBOX',2,0,'set extent for mapframe and overviewframe','div','','',0,0,0,0,0,'','','div','mod_setBBOX1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setBackground',2,1,'switch background-wms','form','','',30,210,NULL ,NULL ,1,'','<select style=''font-family: Arial, sans-serif; font-size:12''
+name=''mod_setBackground_list''
+onchange=''mod_setBackground_change(this)'' ><option
+value=''0''></option></select>','form','mod_setBackground.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','setSpatialRequest',2,1,'Spatial Request','div','','',1,1,1,1,1,'visibility:hidden;','','div','../javascripts/mod_wfs_SpatialRequest.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','showCoords_div',2,1,'displays coodinates by onmouseover','img','../img/button_gray/coords_off.png','onmouseover = "mb_regButton(''init_mod_showCoords_div'')" title="Coordinates" ',450,10,24,24,1,'','','','mod_coords_div.php','','mapframe1','dependendDiv','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','showLoggedUser',2,0,'Displays current user','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','tabs',1,1,'vertical tabs to handle iframes','div','','',10,240,200,20,2,'font-family: Arial,Helvetica;font-weight:bold;','','div','mod_tab.php','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','treeGDE',2,1,'new treegde2 - directory tree, checkbox for visible, checkbox for querylayer
+for more infos have a look at http://www.mapbender.org/index.php/TreeGDE2','iframe','../html/mod_treefolder2.php?sessionID','frameborder = "0" ',10,220,200,300,NULL ,'visibility:visible','','iframe','','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfs',2,1,'wfs request and result handling','div','','',1,1,1,1,NULL ,'visibility:hidden','','div','wfs.js','../extensions/wz_jsgraphics.js','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfs_conf',2,1,'get all wfs_conf-params','iframe','../php/mod_wfs.php','frameborder = "0"',1,1,1,1,0,'visibility:hidden','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','wfsresult',2,1,'display the list of wfs results','iframe','../html/mod_blank.html','frameborder = "0"',10,730,200,150,4,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomFull',2,1,'zoom to full extent button','img','../img/button_gray/zoomFull_off.png','onclick="mod_zoomFull()" onmouseover="mod_zoomFull_init(this)" title="Display complete map"',320,10,24,24,2,'','','img','mod_zoomFull.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomIn1',2,1,'zoomIn button','img','../img/button_gray/zoomIn2_off.png','onclick=''mod_zoomIn1()'' onmouseover=''mod_zoomIn1_init(this)'' title="Zoom in"',220,10,24,24,1,'','','','mod_zoomIn1.php','','mapframe1','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('gui_digitize','zoomOut1',2,1,'zoomOut button','img','../img/button_gray/zoomOut2_off.png','onclick=''mod_zoomOut1()'' onmouseover=''mod_zoomOut1_init(this)'' title="Zoom out"',245,10,24,24,1,'','','','mod_zoomOut1.php','','mapframe1','','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'groupAbstractText', 'group abstract', 'table header for group abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'groupNameText', 'group name', 'table header for group name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'guiAbstractText', 'GUI abstract', 'table header for GUI abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'guiNameText', 'GUI name', 'table header for gui name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'noResultText', 'No result.', 'text that explains that the search ended with an empty result set.', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_all', '1', '1 enables option "load all wms"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_db', '1', '1 enables option "load configured wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_group', '1', '1 enables option "load wms from group"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'option_gui', '1', '1 enables option "load wms from gui"', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectGroupText', 'Please select a group:', 'a text asking the user to select a group', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectGuiText', 'Please select a GUI:', 'a text asking the user to select a GUI', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'selectWmsText', 'Please select a WMS:', 'a text asking the user to select a WMS', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'wmsAbstractText', 'WMS abstract', 'table header for WMS abstract', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'addWMSfromfilteredList_ajax', 'wmsNameText', 'WMS name', 'table header for WMS name', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'body', 'css_class_bg', 'body{ background-color: #ffffff; }', 'to define the color of the body', 'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'body', 'css_file_body', '../css/mapbender.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'copyright', 'mod_copyright_text', 'mapbender.org', 'define a copyright text which should be displayed', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'cssUrl', '../css/digitize.css', 'url to the style sheet of the mapframe', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'digitize_conf_filename', 'digitize_default.conf', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'text css', ' body{
+ font-family: Arial, Helvetica, sans-serif;
+ font-size : 12px;
+ color: #ff00ff;
+ background-color: #ffffff;
+ margin-top: 0px;
+ margin-left: 0px;
+ }
+ .button{
+ height: 18px;
+ width: 32px;
+ }
+', 'text css', 'text/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'digitize', 'wfsCssUrl', '../css/mapbender.css', 'var', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'gazetteerWFS', 'wfsConfIdString', '1,2,3,4', 'comma seperated list of WFS conf ids', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'checkbox_on_off', 'false', 'display or hide the checkbox to set the legend on/off', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'css_file_legend', '../css/legend.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'legendlink', 'false', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showgroupedlayertitle', 'true', 'show the title of the grouped layers in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showlayertitle', 'true', 'show the layer title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'showwmstitle', 'true', 'show the wms title in the legend', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'legend', 'stickylegend', 'false', 'decide wether your legend should stick on the mapframe1', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'logout', 'logout_location', '', 'webside to show after logout', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'sandclock', 'mod_sandclock_image', '../img/sandclock.gif', 'define a sandclock image ', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'setSpatialRequest', 'useUsemap', '0', '"1" adds a usemap to each geometry; the geometry will be highlighted onMouseOver. Every other value will skip the usemap.', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'setSpatialRequest', 'wfs_conf_filename', 'wfs_default.conf', 'location and name of the WFS configuration file', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'open_tab', '5', 'define which tab should be opened when a gui is opened', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[0]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[1]', '260', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[2]', '200', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[3]', '340', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[4]', '180', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_frameHeight[5]', '250', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[0]', 'treeGDE', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[1]', 'legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[2]', 'printPDF', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[3]', 'gazetteerWFS', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[4]', 'imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_ids[5]', 'digitize', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_prefix', ' ', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_style', 'position:absolute;visibility:visible;border: 1px solid white;font-size:12;color:#343434;background-color:#CFD2D4;cursor:pointer;padding-left:8px;', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[0]', 'Maps', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[1]', 'Legend', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[2]', 'Print', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[3]', 'WFS Search', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[4]', 'Imprint', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'tabs', 'tab_titles[5]', 'Digitize', '', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'alerterror', 'true', 'alertbox for wms loading error', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'cssfile', '../css/treeGDE2.css', 'global stylesheets', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'ficheckbox', 'true', 'checkbox for featureInfo requests', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'imagedir', '../img/tree_new', 'image directory', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'menu', '', 'context menu elements', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'metadatalink', 'true', 'link for layer-metadata', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'openfolder', 'false', 'initial open folder', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'showstatus', 'true', 'show status in folderimages', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'treeGDE', 'wmsbuttons', 'true', 'wms management buttons', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('gui_digitize', 'wfs', 'displayWfsResultList', '1', '', 'var');
+
+Delete from gui_element where fkey_gui_id ='admin1';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','AdminFrame',2,1,'the frame for administration modules','iframe','','frameborder = "0"',220,20,800,800,NULL ,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','CreateTreeGDE',2,1,'create a foldertree for a individual geodataexplorer','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,810,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','CREATE TREE_GDE','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,950,250,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT WMS-METADATA','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_Gui',2,1,'allocate groups to guis','a','','href = "../php/mod_group_gui.php?sessionID&e_id_css=Group_Gui" target = "AdminFrame" ',10,610,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_User',2,1,'allocate groups to user','a','','href = "../php/mod_group_user.php?sessionID&e_id_css=Group_User" target = "AdminFrame" ',10,550,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','GROUP -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Group_filteredGui',2,1,'allocate Groups to the guis of this admin','a','','href = "../php/mod_group_filteredGui.php?sessionID&e_id_css=Group_filteredGui" target = "AdminFrame" ',10,710,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Gui_Group',2,1,'allocate guis to groups','a','','href = "../php/mod_gui_group.php?sessionID&e_id_css=Gui_Group" target = "AdminFrame" ',10,250,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','Gui_User',2,1,'allocate a gui to user','a','','href = "../php/mod_gui_user.php?sessionID&e_id_css=Gui_User" target = "AdminFrame" ',10,190,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','User_Group',2,1,'allocat user to groups','a','','href = "../php/mod_user_group.php?sessionID&e_id_css=User_Group" target = "AdminFrame" ',10,430,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','body',1,1,'navigation','body','','onload=''mod_adminNavigation_init()''',0,0,0,0,0,'','','','mod_adminNavigation.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteGui',2,1,'delete gui','a','','href = "../php/mod_deleteGUI.php?sessionID" target = "AdminFrame" ',10,150,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteWFS',2,1,'delete WFS','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,890,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','deleteWMS',2,1,'delete wms','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,110,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','delete_filteredGui',2,1,'delete guis of this admin','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,790,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','DELETE myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editElements',2,1,'edit gui elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,170,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','EDIT GUI-ELEMENTS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editFilteredGroup',2,1,'edit group of this admin','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',10,530,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editFilteredUser',2,1,'save, edit, delete user where this admin is owner','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',10,350,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editGUI_WMS',2,1,'edit the elements of the gui','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,90,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT GUI-WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editGroup',2,1,'edit group','a','','href = "../php/mod_editGroup.php?sessionID" target = "AdminFrame" ',10,510,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','editUser',2,1,'save, edit, delete user','a','','href = "../php/mod_editUser.php?sessionID" target="AdminFrame"',10,330,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EDIT USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','exportGUI',2,1,'export gui, create SQLL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,310,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','EXPORT GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGoup_filteredUser',2,1,'allocate the groups of this admin to user where the admin is owner','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',10,590,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> myUSER ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_Gui',2,1,'allocate groups of this admin to guis','a','','href = "../php/mod_filteredGroup_Gui.php?sessionID&e_id_css=filteredGroup_Gui" target = "AdminFrame" ',10,750,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_User',2,1,'allocate groups of this admin to user','a','','href = "../php/mod_filteredGroup_User.php?sessionID&e_id_css=filteredGroup_User" target = "AdminFrame" ',10,690,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> USER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGroup_filteredGui',2,1,'allocate groups of this admin to guis of this admin','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',10,730,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGROUP -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_Group',2,1,'allocate guis to groups','a','','href = "../php/mod_filteredGui_group.php?sessionID&e_id_css=filteredGui_Group" target = "AdminFrame" ',10,270,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> GROUP ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_filteredGroup',2,1,'allocate guis of this admin to groups where this admin is owner','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',10,290,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_filteredUser',2,1,'allocate the user where the admin is owner to his guis ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',10,230,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredGui_user',2,1,'allocate the guis of this admin to a user','a','','href = "../php/mod_filteredGui_User.php?sessionID&e_id_css=filteredGui_user" target = "AdminFrame" ',10,210,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myGUI -> USER ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_Group',2,1,'allocate user of this admin to groups','a','','href = "../php/mod_filteredUser_Group.php?sessionID&e_id_css=filteredUser_Group" target = "AdminFrame" ',10,670,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> GROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_Gui',2,1,'allocate user of this admin to guis','a','','href = "../php/mod_filteredUser_Gui.php?sessionID&e_id_css=filteredUser_Gui" target = "AdminFrame" ',10,770,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_filteredGroup',2,1,'allocate user where this admin is owner to groups where this admin is owner','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',10,490,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','filteredUser_filteredGui',2,1,'allocate admins user to guis of this admin','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',10,410,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','myUSER -> myGUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','getStyles',2,0,'load styles from wms','a','','href = "../php/mod_getStyles.php?sessionID" target = "AdminFrame" ',10,890,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GET_STYLES','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','group_filteredUser',2,1,'allocate groups to user where this admin is owner','a','','href = "../php/mod_group_filteredUser.php?sessionID&e_id_css=group_filteredUser" target = "AdminFrame" ',10,570,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GROUP -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_filteredGroup',2,1,'allocate guis to groups of this admin','a','','href = "../php/mod_gui_filteredGroup.php?sessionID&e_id_css=gui_filteredGroup" target = "AdminFrame" ',10,650,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> myGROUP','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_filteredUser',2,1,'allocate guis to user of this admin','a','','href = "../php/mod_gui_filteredUser.php?sessionID&e_id_css=gui_filteredUser" target = "AdminFrame" ',10,630,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> myUSER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','gui_owner',2,1,'set owner','a','','href = "../php/mod_gui_owner.php?sessionID&e_id_css=gui_owner" target = "AdminFrame" ',10,830,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','GUI -> OWNER','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWFS',2,1,'load capabilities in a gui','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,850,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/WFS_Konfiguration');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWMS',2,1,'load capabilities in a gui','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,30,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','loadWMSList',2,1,'load wms from a list','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,50,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','LOAD myWMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,1,'','','img','','','','','http://www.mapbender.org/index.php/logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','myGUIlist',2,1,'go back to your GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,1,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','newGui',2,1,'create a new gui','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,130,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none;color: #808080;','NEW GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','orphanWMS',2,1,'display orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID&&elementID=orphanWMS" target = "AdminFrame"',10,930,200,20,5,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','ORPHAN WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,910,200,20,1,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','OWSPROXY','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','rename_copy_Gui',2,1,'rename and copy gui','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,470,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','RENAME COPY GUI','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','showLoggedUser',2,1,'displays the logged admin','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,NULL ,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','updateWMSs',2,1,'edit the elements of the gui','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,70,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','UPDATE WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_filteredGroup',2,1,'allocate user to groups where this admin is owner','a','','href = "../php/mod_user_filteredGroup.php?sessionID&e_id_css=user_filteredGroup" target = "AdminFrame" ',10,450,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> myGROUP','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_filteredGui',2,1,'allocate guis of this admin to user','a','','href = "../php/mod_user_filteredGui.php?sessionID&e_id_css=user_filteredGui" target = "AdminFrame" ',10,390,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER-> myGUI','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','user_gui',2,1,'allocate guis to user','a','','href = "../php/mod_user_gui.php?sessionID&e_id_css=user_gui" target = "AdminFrame" ',10,370,200,20,0,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','USER -> GUI ','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin1','wfs_conf',2,1,'create and edit a gazetteer module','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,870,200,20,NULL ,'font-family: Arial, Helvetica, sans-serif; font-size : 12px; text-decoration : none; color: #808080;','WFS CONF','a','','','','AdminFrame','');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_Gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Group_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Gui_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'Gui_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'User_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'editGUI_WMS', 'file_css', '../css/edit_gui.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGoup_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_Gui', 'file css', '../css/administration_alloc.css', 'file', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_User', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredGui_user', 'file css', '../css/administration_alloc.css', 'a file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_Group', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_Gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'group_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'gui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'gui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin1', 'user_gui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+
+
+Delete from gui_element where fkey_gui_id ='admin2_de';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','AdminFrame',2,1,'Bereich für Administrationsmodule','iframe','','frameborder = "0"',200,20,800,800,0,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','CreateTreeGDE',2,1,'Ordnerbaum konfigurieren','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',8,280,190,20,5,'','Ordnerbaum konfigurieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',0,0,180,20,0,'','','','mod_adminNavigation.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','deleteWMS',2,1,'!Vollständig löschen!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',8,100,190,20,5,'','!Vollständig löschen!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','delete_filteredGui',2,1,'GUI löschen','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',110,240,80,20,5,'','GUI löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editElements',2,1,'Oberflächenelemente editieren','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',8,260,190,20,5,'','GUI-Elemente editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editFilteredGroup',2,1,'Gruppe anlegen und editieren','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',8,400,190,20,10,'','Gruppe anlegen und editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editFilteredUser',2,1,'Benutzer anlegen und editieren','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',8,380,190,20,10,'','Benutzer anlegen und editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','editGUI_WMS',2,1,'WMS GUI Einstellungen','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',8,180,190,20,5,'','WMS GUI Einstellungen','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','exportGUI',2,1,'Oberfläche (GUI) exportieren, SQL erzeugen','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',8,300,190,20,10,'','GUI exportieren (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGoup_filteredUser',2,1,'Gruppe mit Benutzern bestücken','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',8,440,190,20,10,'','Gruppe mit Benutzern bestücken ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGroup_filteredGui',2,1,'Einzelner Gruppe mehrere Oberflaechen zuordnen','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',8,570,190,25,10,'','Einzelner Gruppe mehrere <br>GUIs zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGui_filteredGroup',2,1,'Einzelner Oberfläche mehrere Gruppen zuordnen','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',8,605,190,25,10,'','Einzelner GUI mehrere<br> Gruppen zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredGui_filteredUser',2,1,'Oberfläche mehreren Benutzer zuordnen ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',8,535,190,25,10,'','GUI mehreren Benutzern <br> zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredUser_filteredGroup',2,1,'Benutzer in Gruppen eintragen','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',8,420,190,20,10,'','Benutzer in Gruppen eintragen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','filteredUser_filteredGui',2,1,'Einem Nutzer Zugriff auf mehrere Oberflächen erteilen','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',8,500,190,25,10,'','Einem Nutzer Zugriff auf <br> mehrere GUIs erteilen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','gui_owner',2,1,'GUI editieren Benutzer zuordnen','a','','href = "../php/mod_gui_owner.php?sessionID" target = "AdminFrame" ',8,640,190,20,10,'','GUI editieren Benutzer zuordnen','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_0',3,1,'Hintergrund WMS Verwaltung Rahmen','div','','',3,35,193,90,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1',3,1,'Hintergrund WMS Management','div','','',5,37,193,86,2,'',' WMS Verwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1a',3,1,'Hintergrund WMS Zuordnung Rahmen','div','','',3,135,193,70,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1b',3,1,'Hintergrund WMS Zuordnung','div','','',5,137,193,66,2,'',' WMS Zuordnung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1c',3,1,'Hintergrund Oberflächenverwaltung Rahmen','div','','',3,215,193,130,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_1d',3,1,'Hintergrund Oberflächenverwaltung','div','','',5,217,193,126,2,'',' GUI-Verwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_2',3,1,'Hintergrund Benutzerverwaltung Rahmen','div','','',3,355,193,110,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_3',3,1,'Hintergrund Benutzerverwaltung','div','','',5,357,193,106,2,'',' Benutzerverwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_4',3,1,'Hintergrund Benutzerzugriff erteilen Rahmen','div','','',3,475,193,200,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','layout_5',3,1,'Hintergrund Benutzerzugriff erteilen','div','','',5,477,193,196,2,'',' Benutzerzugriff erteilen','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','loadWMS',2,1,'Capabilities hochladen','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',8,60,190,20,5,'','Capabilities hochladen','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','loadWMSList',2,1,'WMS in GUI einbinden','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',8,160,190,20,5,'','WMS in GUI einbinden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','myGUIlist',2,1,'Zurück zur eigenen GUI Liste','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','newGui',2,1,'GUI erzeugen','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',8,240,85,20,5,'','GUI erzeugen','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','rename_copy_Gui',2,1,'GUI umbenennen/ kopieren','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',8,320,190,20,10,'','GUI umbenennen/kopieren','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','showLoggedUser',2,1,'Anzeige des eingeloggten Benutzers','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_de','updateWMSs',2,1,'Hochgeladene aktualisieren','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',8,80,190,20,5,'','Hochgeladene aktualisieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'body', 'body_css_file', '../css/admin.css', 'css-file to define the style fo the admin-gui', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGoup_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredUser_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'gui_owner', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_de', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+
+Delete from gui_element where fkey_gui_id ='admin2_en';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','AdminFrame',2,1,'the frame for administration modules','iframe','','frameborder = "0"',200,20,800,800,0,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','CreateTreeGDE',2,1,'TreeGDE set up','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',8,280,190,20,5,'','TreeGDE set up','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','body',1,1,'navigation','body','','onload=''mod_adminNavigation_init()''',0,0,0,0,0,'','','','mod_adminNavigation.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','deleteWMS',2,1,'!Delete completely!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',8,100,190,20,5,'','!Delete completely!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','delete_filteredGui',2,1,'Delete GUI','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',120,240,80,20,5,'','Delete GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editElements',2,1,'Edit GUI elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',8,260,190,20,5,'','Edit GUI elements','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editFilteredGroup',2,1,'Create and edit group','a','','href = "../php/mod_editFilteredGroup.php?sessionID" target = "AdminFrame" ',8,400,190,20,10,'','Create and edit group','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editFilteredUser',2,1,'Create and edit user','a','','href = "../php/mod_editFilteredUser.php?sessionID" target="AdminFrame"',8,380,190,20,10,'','Create and edit user','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','editGUI_WMS',2,1,'WMS GUI settings','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',8,180,190,20,5,'','WMS GUI settings','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','exportGUI',2,1,'export GUI, create SQL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',8,300,190,20,10,'','Export GUI (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGoup_filteredUser',2,1,'Add several users to one group','a','','href = "../php/mod_filteredGroup_filteredUser.php?sessionID&e_id_css=filteredGoup_filteredUser" target = "AdminFrame" ',8,440,190,20,10,'','Add several users to one group ','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGroup_filteredGui',2,1,'Allow one group access to several GUIs','a','','href = "../php/mod_filteredGroup_filteredGui.php?sessionID&e_id_css=filteredGroup_filteredGui" target = "AdminFrame" ',8,570,190,25,10,'','Allow one group access to <br> several GUIs','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGui_filteredGroup',2,1,'Allow several groups access to one GUI','a','','href = "../php/mod_filteredGui_filteredGroup.php?sessionID&e_id_css=filteredGui_filteredGroup" target = "AdminFrame" ',8,605,190,25,10,'','Allow several groups access <br> to one GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredGui_filteredUser',2,1,'Allow several users access to one GUI ','a','','href = "../php/mod_filteredGui_filteredUser.php?sessionID&e_id_css=filteredGui_filteredUser" target = "AdminFrame" ',8,535,190,25,10,'','Allow several users access to <br> one GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredUser_filteredGroup',2,1,'Add one user to serveral groups','a','','href = "../php/mod_filteredUser_filteredGroup.php?sessionID&e_id_css=filteredUser_filteredGroup" target = "AdminFrame" ',8,420,190,20,10,'','Add one user to serveral groups','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','filteredUser_filteredGui',2,1,'Allow one user to access several GUIs','a','','href = "../php/mod_filteredUser_filteredGui.php?sessionID&e_id_css=filteredUser_filteredGui" target = "AdminFrame" ',8,500,190,25,10,'','Allow one user to access <br> several GUIs','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','gui_owner',2,1,'Edit GUI assign to user','a','','href = "../php/mod_gui_owner.php?sessionID" target = "AdminFrame" ',8,640,190,20,10,'','Edit GUI assign to user','a','','','','AdminFrame','http://www.mapbender.org/index.php/user');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_0',3,1,'WMS Management border','div','','',3,35,193,90,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1',3,1,'WMS Management caption','div','','',5,37,193,86,2,'',' WMS Management','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1a',3,1,'Configure WMS Access border','div','','',3,135,193,70,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1b',3,1,'Configure WMS Access','div','','',5,137,193,66,2,'',' Configure WMS Access','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1c',3,1,'GUI Management border','div','','',3,215,193,130,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_1d',3,1,'GUI Management caption','div','','',5,217,193,126,2,'',' GUI Management ','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_2',3,1,'User Management border','div','','',3,355,193,110,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_3',3,1,'User Management caption','div','','',5,357,193,106,2,'',' User Management ','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_4',3,1,'Authorization background','div','','',3,475,193,190,1,'','','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','layout_5',3,1,'Authorization caption','div','','',5,477,193,186,2,'',' Authorization','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','loadWMS',2,1,'Load Capabilities','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',8,60,190,20,5,'','Load Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','loadWMSList',2,1,'Link WMS into GUI','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',8,160,190,20,5,'','Link WMS into GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','myGUIlist',2,1,'go back to your GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','newGui',2,1,'Create new GUI','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',8,240,110,20,5,'','Create new GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','rename_copy_Gui',2,1,'Rename/ copy GUI','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',8,320,190,20,10,'','Rename / copy GUI','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','showLoggedUser',2,1,'Logged User:','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin2_en','updateWMSs',2,1,'Update with Capabilities','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',8,80,190,20,5,'','Update Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'body', 'body_css_file', '../css/admin.css', 'css-file to define the style fo the admin-gui', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGoup_filteredUser', 'css_file_filteredGroup_filterdUser', '../css/administration_alloc.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGroup_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGui_filteredGroup', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredGui_filteredUser', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredUser_filteredGroup', 'css_filteredUser_filteredGroup', '../css/administration_alloc.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'filteredUser_filteredGui', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'gui_owner', 'file css', '../css/administration_alloc.css', 'file css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin2_en', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+
+
+Delete from gui_element where fkey_gui_id ='admin_de_services';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','AdminFrame',2,1,'Bereich für Administrationsmodule','iframe','','frameborder = "0"',210,25,800,800,12,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','CreateTreeGDE',2,1,'Ordnerbaum konfigurieren','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,516,200,20,5,'','Ordnerbaum konfigurieren','a','','','','AdminFrame','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,275,200,20,5,'','WMS Metadaten','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_WMS_Metadata');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','mod_adminNavigation.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','deleteWFS',2,1,'WFS löschen','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,393,200,20,5,'','WFS löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','deleteWMS',2,1,'!Vollständig löschen!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,100,200,20,5,'','WMS löschen!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','delete_filteredGui',2,1,'GUI löschen','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,471,200,20,5,'','GUI löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','editElements',2,1,'Oberflächenelemente editieren','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,491,200,25,5,'','GUI editieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','editGUI_WMS',2,1,'WMS GUI Einstellungen','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,218,200,20,5,'','WMS Einstellungen ändern','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','exportGUI',2,1,'GUI exportieren, SQL erzeugen','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,536,200,25,10,'x','GUI exportieren (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_Configure_WMS_Access',3,1,'Hintergrund WMS Zuordnung','div','','',1,175,210,63,2,'','WMS Zuordnung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_GUI_Management',3,1,'Oberflächenverwaltung','div','','',1,428,210,153,2,'','GUI Verwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_Metadata',3,1,'Metadateneditor Caption','div','','',1,252,210,63,2,'','Metadaten','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_WFS_Management',3,1,'WFS Verwaltung','div','','',1,330,210,82,2,'','WFS Verwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','headline_WMS_Management',3,1,'Dienstverwaltung Beschriftung','div','','',0,37,210,123,2,'','WMS Verwaltung','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWFS',2,1,'WFS Capabilities in eine GUI laden','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,353,200,20,5,'','WFS laden','a','','','','AdminFrame','http://www.mapbender.org/index.php/LoadWFS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWMS',2,1,'Capabilities hochladen','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,60,200,20,5,'','WMS laden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','loadWMSList',2,1,'WMS in GUI einbinden','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,198,200,20,5,'','WMS einbinden','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','myGUIlist',2,1,'Zurück zur eigenen GUI Liste','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','newGui',2,1,'GUI erzeugen','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,451,200,20,5,'','GUI erzeugen','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','orphanWMS',2,1,'display orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID"
+target = "AdminFrame"',10,120,200,20,5,'','WMS ohne Zuordung löschen','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,140,200,20,10,'','OWSPROXY','a','','','','AdminFrame','http://www.mapbender.org/index.php/Owsproxy');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','rename_copy_Gui',2,1,'GUI umbenennen/ kopieren','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,561,200,20,10,'','GUI umbenennen/kopieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/RenameGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','showLoggedUser',2,1,'Anzeige des eingeloggten Benutzers','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','updateWMSs',2,1,'Hochgeladene aktualisieren','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,80,200,20,5,'','WMS aktualisieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_de_services','wfs_conf',2,1,'WFS konfigurieren','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,373,200,20,5,'','WFS konfigurieren','a','','','','AdminFrame','http://www.mapbender.org/index.php/Wfs_conf');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'EditWMSMetadata', 'file_css', '../css/metadata.css', 'css-file to use for the metadata modul', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'body', 'body_file_css', '../css/admin_service.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
+
+
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_de_services', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+
+Delete from gui_element where fkey_gui_id ='admin_en_services';
+
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','AdminFrame',2,1,'administration frame','iframe','','frameborder = "0"',210,25,1000,800,12,'','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','CreateTreeGDE',2,1,'Configure TreeGDE','a','','href = "../php/nestedSets.php?sessionID" target = "AdminFrame" ',10,513,200,20,5,'','Configure TreeGDE','a','','','','AdminFrame','http://www.mapbender.org/index.php/ConfTreeGde');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','EditWMSMetadata',2,1,'edit the metadata of wms','a','','href = "../php/mod_editWMS_Metadata.php?show_wms_list=true&sessionID" target="AdminFrame"',10,275,200,20,5,'','WMS Metadata','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_WMS_Metadata');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','body',1,1,'Navigation','body','','onload=''mod_adminNavigation_init()''',NULL ,NULL ,NULL ,NULL ,NULL ,'','','','mod_adminNavigation.js','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','deleteWFS',2,1,'Delete WFS','a','','href = "../php/mod_deleteWFS.php?sessionID" target = "AdminFrame" ',10,393,200,20,5,'','Delete WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWFS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','deleteWMS',2,1,'!Delete completely!','a','','href = "../php/mod_deleteWMS.php?sessionID" target = "AdminFrame" ',10,100,200,20,5,'','!Delete completely!','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','delete_filteredGui',2,1,'Delete GUI','a','','href = "../php/mod_deleteFilteredGUI.php?sessionID" target = "AdminFrame" ',10,471,200,20,5,'','Delete GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/DeleteGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','editElements',2,1,'Edit GUI Elements','a','','href = "../php/mod_editElements.php?sessionID" target = "AdminFrame" ',10,491,200,20,5,'','Edit GUI Elements','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_Elements');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','editGUI_WMS',2,1,'WMS GUI settings','a','','href="../php/mod_editGuiWms.php?sessionID"'' target="AdminFrame"',10,218,200,20,5,'','WMS GUI settings','a','','','','AdminFrame','http://www.mapbender.org/index.php/Edit_GUI_WMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','exportGUI',2,1,'Export GUI (SQL), create SQL','a','','href = "../php/mod_exportGUI.php?sessionID" target = "AdminFrame" ',10,533,200,20,10,'x','Export GUI (SQL)','a','','','','AdminFrame','http://www.mapbender.org/index.php/Oberfläche_exportieren_%28SQL%29');
+
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_Configure_WMS_Access',3,1,'WMS Assignment','div','','',1,175,210,63,2,'','WMS Assignment','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_GUI_Management',3,1,'GUI Management','div','','',1,428,210,148,2,'','GUI Management','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_Metadata',3,1,'Metadata','div','','',1,252,210,63,2,'','Metadata','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_WFS_Management',3,1,'WFS Management','div','','',1,330,210,82,2,'','WFS Management','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','headline_WMS_Management',3,1,'WMS Management','div','','',0,37,210,123,2,'','WMS Management','div','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','help',2,1,'button help','img','../img/button_gray/help_off.png','onmouseover = "mb_regButton(''init_help'')" title="help"',210,2,24,24,1,'','','','mod_help.php','../extensions/wz_jsgraphics.js','','jsGraphics','http://www.mapbender.org');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWFS',2,1,'Load WFS Capabilities into a GUI','a','','href = "../php/mod_loadWFSCapabilities.php?sessionID" target="AdminFrame"',10,353,200,20,5,'','Load WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/LoadWFS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWMS',2,1,'load Capabilities','a','','href = "../php/mod_loadCapabilities.php?sessionID" target="AdminFrame"',10,60,200,20,5,'','Load Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','loadWMSList',2,1,'assign WMS to a GUI','a','','href = "../php/mod_loadCapabilitiesList.php?sessionID" target="AdminFrame"',10,198,200,20,5,'','Assign WMS to a GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/Add_new_maps_to_Mapbender');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','logout',2,1,'Logout','img','../img/button_gray/logout_off.png','onClick="window.location.href=''../php/mod_logout.php?sessionID''" border=''0'' onmouseover=''this.src="../img/button_gray/logout_over.png"'' onmouseout=''this.src="../img/button_gray/logout_off.png"'' title="Logout"',180,2,24,24,2,'','','img','','','','','http://www.mapbender.org/index.php/logout');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','myGUIlist',2,1,'back to GUI list','img','../img/button_gray/home_off.png','onClick="mod_home_init()" border=''0'' onmouseover=''this.src="../img/button_gray/home_over.png"'' onmouseout=''this.src="../img/button_gray/home_off.png"'' title="move back to your GUI list / zurück zur GUI Liste"',150,2,24,24,2,'','','img','mod_home.php','','','','http://www.mapbender.org/index.php/MyGUIlist');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','newGui',2,1,'New GUI','a','','href = "../php/mod_newGui.php?sessionID" target = "AdminFrame" ',10,451,200,20,5,'','New GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/newGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','orphanWMS',2,1,'Delete orphaned WMS','a','','href = "../php/mod_orphanWMS.php?sessionID"
+target = "AdminFrame"',10,120,200,20,5,'','Delete orphaned WMS','a','','','','AdminFrame','http://www.mapbender.org/index.php/OrphanWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','owsproxy',2,1,'secure services','a','','href="../php/mod_owsproxy_conf.php?sessionID"'' target="AdminFrame"',10,140,200,20,10,'','OWSPROXY','a','','','','AdminFrame','http://www.mapbender.org/index.php/Owsproxy');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','rename_copy_Gui',2,1,'Rename / copy GUI','a','','href = "../php/mod_renameGUI.php?sessionID" target = "AdminFrame" ',10,556,200,20,10,'','Rename / copy GUI','a','','','','AdminFrame','http://www.mapbender.org/index.php/RenameGUI');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','showLoggedUser',2,1,'show logged in user','iframe','../php/mod_showLoggedUser.php?sessionID','frameborder="0" scrolling=''no''',1,1,200,30,1,'background-color:lightgrey;','','iframe','','','','','');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','updateWMSs',2,1,'Update Capabilities','a','','href="../php/mod_updateWMS.php?sessionID"'' target="AdminFrame"',10,80,200,20,5,'','Update Capabilities','a','','','','AdminFrame','http://www.mapbender.org/index.php/UpdateWMS');
+INSERT INTO gui_element (fkey_gui_id, e_id, e_pos, e_public, e_comment, e_element,e_src, e_attributes, e_left, e_top, e_width, e_height, e_z_index, e_more_styles, e_content, e_closetag, e_js_file, e_mb_mod, e_target, e_requires,e_url) VALUES ('admin_en_services','wfs_conf',2,1,'Configure WFS','a','','href="../php/mod_wfs_conf.php?sessionID"'' target="AdminFrame"',10,373,200,20,5,'','Configure WFS','a','','','','AdminFrame','http://www.mapbender.org/index.php/Wfs_conf');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'EditWMSMetadata', 'file_css', '../css/metadata.css', 'css-file to use for the metadata modul', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'body', 'body_file_css', '../css/admin_service.css', 'file/css', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'editGUI_WMS', 'css_file', '../css/edit_gui.css', '', 'file/css');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_color', '#cc33cc', 'color for highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_text', 'click highlighted elements for help', '', 'php_var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'help', 'mod_help_thickness', '3', 'thickness of highlighting', 'var');
+INSERT INTO gui_element_vars(fkey_gui_id, fkey_e_id, var_name, var_value, context, var_type) VALUES ('admin_en_services', 'showLoggedUser', 'css_file_user_logged', '../css/administration_alloc.css', 'file/css', 'file/css');
+
+
+
+
+
+
Deleted: branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql
===================================================================
--- branches/2.4.5/resources/db/update/update_mysql_db.sql 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,9 +0,0 @@
---
--- database changes in version 2.4.3
---
-
---
--- table wms_format: http://trac.osgeo.org/mapbender/ticket/53
---
-ALTER TABLE wms_format CHANGE data_format data_format VARCHAR(100);
-
Copied: branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql (from rev 2157, branches/2.4.5/resources/db/update/update_mysql_db.sql)
===================================================================
--- branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql (rev 0)
+++ branches/2.4.5_rc1/resources/db/update/update_mysql_db.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,12 @@
+--
+-- database changes in version 2.4.5
+--
+
+--
+-- table gui_element: new column for translation
+--
+-- NOTICE:
+-- you may already have this column if you used the
+-- update SQL in Mapbender 2.4.4
+--
+ALTER TABLE gui_element ADD COLUMN e_title VARCHAR(255);
Deleted: branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql
===================================================================
--- branches/2.4.5/resources/db/update/update_postgresql_db.sql 2008-02-20 15:31:06 UTC (rev 2131)
+++ branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -1,9 +0,0 @@
---
--- database changes in version 2.4.3
---
-
---
--- table wms_format: http://trac.osgeo.org/mapbender/ticket/53
---
-ALTER TABLE wms_format ALTER COLUMN data_format TYPE varchar(100);
-
Copied: branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql (from rev 2157, branches/2.4.5/resources/db/update/update_postgresql_db.sql)
===================================================================
--- branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql (rev 0)
+++ branches/2.4.5_rc1/resources/db/update/update_postgresql_db.sql 2008-03-13 10:01:11 UTC (rev 2225)
@@ -0,0 +1,13 @@
+--
+-- database changes in version 2.4.5
+--
+
+--
+-- table gui_element: new column for translation
+--
+-- NOTICE:
+-- you may already have this column if you used the
+-- update SQL in Mapbender 2.4.4
+--
+ALTER TABLE gui_element ADD COLUMN e_title VARCHAR(255);
+
More information about the Mapbender_commits
mailing list