svn commit: r572 - trunk/mapbender/http/php/mod_deleteWFS.php

astrid_emde at osgeo.org astrid_emde at osgeo.org
Tue Jun 20 05:06:12 EDT 2006


Author: astrid_emde
Date: 2006-06-20 09:06:12+0000
New Revision: 572

Added:
   trunk/mapbender/http/php/mod_deleteWFS.php

Log:
new modul to delete a wfs

Added: trunk/mapbender/http/php/mod_deleteWFS.php
Url: https://mapbender.osgeo.org/source/browse/mapbender/trunk/mapbender/http/php/mod_deleteWFS.php?view=auto&rev=572
==============================================================================
--- (empty file)
+++ trunk/mapbender/http/php/mod_deleteWFS.php	2006-06-20 09:06:12+0000
@@ -0,0 +1,102 @@
+<?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("../php/mb_validateSession.php");
+require_once("../../conf/mapbender.conf");
+$con = db_connect($DBSERVER,$OWNER,$PW);
+db_select_db(DB,$con);
+require_once("../classes/class_administration.php");
+#$admin = new administration();
+#$ownguis = $admin->getGuisByOwner($_SESSION["mb_user_id"]);
+$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 = '".$wfsList."'";
+	 $res = db_query($sql);
+}
+
+$sql_wfs = "SELECT * FROM wfs ";
+$sql_wfs .= " ORDER BY wfs_name";
+$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_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>




More information about the Mapbender_commits mailing list