[Mapbender-commits] r2227 - branches/2.5/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Thu Mar 13 06:06:28 EDT 2008
Author: verenadiewald
Date: 2008-03-13 06:06:28 -0400 (Thu, 13 Mar 2008)
New Revision: 2227
Modified:
branches/2.5/http/php/mod_loadCapabilitiesList.php
Log:
replaced with latest version from MB 2.4.5 with permission/session check ..
Modified: branches/2.5/http/php/mod_loadCapabilitiesList.php
===================================================================
--- branches/2.5/http/php/mod_loadCapabilitiesList.php 2008-03-13 10:05:49 UTC (rev 2226)
+++ branches/2.5/http/php/mod_loadCapabilitiesList.php 2008-03-13 10:06:28 UTC (rev 2227)
@@ -18,10 +18,11 @@
# 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__)."/../classes/class_administration.php");
+require(dirname(__FILE__)."/../php/mb_validatePermission.php");
?>
+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+
<html>
<head>
<?php
@@ -86,7 +87,7 @@
}
else{
var gui_id=document.form1.guiList.options[listIndex].value;
- document.form1.action='../php/mod_loadwms.php';
+ document.form1.action='../php/mod_loadwms.php<?php echo SID;?>';
document.form1.submit();
}
}
@@ -98,13 +99,13 @@
}
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+" ?");
+ 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;
+ document.form1.guiID_.selectedIndex = -1;
}
}
</script>
@@ -113,13 +114,14 @@
<?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)){
+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');
@@ -132,7 +134,7 @@
}
$sql = "SELECT * FROM gui_wms WHERE fkey_gui_id = $1 AND fkey_wms_id = $2";
- $v = array($guiID,$wmsID);
+ $v = array($guiID_,$wmsID);
$t = array('s','i');
$res = db_prep_query($sql,$v,$t);
$cnt = 0;
@@ -148,7 +150,7 @@
}
$sql = "SELECT * FROM gui_layer WHERE fkey_gui_id = $1 AND gui_layer_wms_id = $2";
- $v = array($guiID, $wmsID);
+ $v = array($guiID_, $wmsID);
$t = array("s", "i");
$res = db_prep_query($sql, $v, $t);
$cnt = 0;
@@ -165,7 +167,7 @@
}
}
-echo "<form name='form1' action='" . $PHP_SELF . "?".SID."' method='post'>";
+echo "<form name='form1' action='" . $self."' method='post'>";
echo "<table cellpadding='0' cellspacing='0' border='0'>";
echo "<tr>";
@@ -189,7 +191,6 @@
$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++;
@@ -272,7 +273,7 @@
$v = array($wmsID);
$t = array("s");
$res = db_prep_query($sql, $v, $t);
- echo "<select class='select2' name='guiID' size='20' onchange='load()'>";
+ 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"]."' ";
More information about the Mapbender_commits
mailing list