[Mapbender-commits] r5867 - in branches/3_dev/http: . css frames img

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Apr 6 05:48:00 EDT 2010


Author: christoph
Date: 2010-04-06 05:47:59 -0400 (Tue, 06 Apr 2010)
New Revision: 5867

Added:
   branches/3_dev/http/css/mapbender.css
   branches/3_dev/http/frames/createUser.php
   branches/3_dev/http/img/OSGeo_logo.png
   branches/3_dev/http/index.php
Log:


Added: branches/3_dev/http/css/mapbender.css
===================================================================
--- branches/3_dev/http/css/mapbender.css	                        (rev 0)
+++ branches/3_dev/http/css/mapbender.css	2010-04-06 09:47:59 UTC (rev 5867)
@@ -0,0 +1,70 @@
+body, .body, td, form, input, select {
+  font-size: 12px;
+  font-family: "Verdana","Arial","Tahoma",sans-serif;
+}
+
+td h2, td h3, div h2, div h3, div h4 {
+  margin-top: 0px;
+}
+
+/* body colors */
+body, .body {
+  background-color:#FfFfFf;
+}
+body table, h1 {
+  margin:0px;
+  background-color:#ffffff;
+  margin-left: 15px;
+}
+body table tr td {
+  padding-left: 10px;
+  padding-right: 10px;
+}
+
+/* links */
+a {
+  text-decoration:none;
+  color:#000099;
+  font-size: 15px;
+}
+a:visited {
+  color:#555555;
+}
+a:active {
+  color:#4241DE;
+  background-color:#ce0000;
+}
+a:hover {
+  
+  color:#FF0000;
+}
+
+.a_small {
+  color:#000099;
+  font-size: 12px;
+}
+
+.mapbender_headline{
+	font-size: 32px; 
+	font-stretch:extra-expanded;
+	font-weight:bold;
+	margin-bottom:4px;
+}
+
+.mapbender_welcome{
+	font-size: 20px; 
+	font-weight:bold;
+	margin-top:3px;
+	margin-bottom:4px;
+}
+
+
+
+
+img{
+	border:0;
+	
+}
+label { 
+	cursor:pointer; 
+}

Added: branches/3_dev/http/frames/createUser.php
===================================================================
--- branches/3_dev/http/frames/createUser.php	                        (rev 0)
+++ branches/3_dev/http/frames/createUser.php	2010-04-06 09:47:59 UTC (rev 5867)
@@ -0,0 +1,273 @@
+<?php
+# License:
+# Copyright (c) 2009, Open Source Geospatial Foundation
+# This program is dual licensed under the GNU General Public License 
+# and Simplified BSD license.  
+# http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+
+require_once dirname(__FILE__) . "/../../conf/mapbender.conf";
+require_once dirname(__FILE__) . "/../../core/lib/class_Application.php";
+require_once dirname(__FILE__) . "/../../core/lib/class_Administration.php";
+
+if (PORTAL != true){
+	echo "This module is disabled. Please check your mapbender.conf.";
+	die;	
+}
+
+?>
+<!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' 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>";
+
+#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>";
+
+#description
+echo "<tr>";
+	echo "<td>Description: </td>";
+	echo "<td>";
+		echo "<input type='text' size='30' 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' 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>";
+
+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

Added: branches/3_dev/http/img/OSGeo_logo.png
===================================================================
(Binary files differ)


Property changes on: branches/3_dev/http/img/OSGeo_logo.png
___________________________________________________________________
Added: svn:mime-type
   + application/octet-stream

Added: branches/3_dev/http/index.php
===================================================================
--- branches/3_dev/http/index.php	                        (rev 0)
+++ branches/3_dev/http/index.php	2010-04-06 09:47:59 UTC (rev 5867)
@@ -0,0 +1,124 @@
+<?php
+# License:
+# Copyright (c) 2009, Open Source Geospatial Foundation
+# This program is dual licensed under the GNU General Public License 
+# and Simplified BSD license.  
+# http://svn.osgeo.org/mapbender/trunk/mapbender/license/license.txt
+
+include_once(dirname(__FILE__)."/../core/system.php");
+?>
+<!DOCTYPE HTML PUBLIC "-//W3C//Dtd HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta name="author" content="The Mapbender Development Team">
+<meta name="description" content="Initial start page for the geoportal software Mapbender">
+<meta name="keywords" content="Mapbender, Geoportal, GIS, SDI, GDI, OSGeo, Free Software, OGC, WMS, WFS, WFS Transactional, WMS Client, Digitizing"> 
+<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:0px #000000 solid;">
+	<tr>
+		<td COLSPAN="2">
+			<div class="mapbender_headline" >
+				<font align="left" color="#000000">Welcome to Ma</font><font color="#0000CE">p</font><font color="#C00000">b</font><font color="#000000">ender</font>
+			</div>
+		</td>
+	</tr>
+	<tr>
+		<td WIDTH="35%" 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/Tutorials" target="_blank"><b>Documentation</b></a><br />
+			<br />
+			<a href="http://www.mapbender.org/Mapbender_Gallery" target="_blank"><b>Application Gallery</b></a><br />
+			<br />
+			<a href="http://wms.wheregroup.com/mapbender/frames/login.php?name=mb&password=mb&mb_user_myGui=mapbender_user" target="_blank"><b>Mapbender User Map</b></a><br />
+			<br />
+			<a href="http://www.osgeo.org/mapbender" target="_blank"><b>OSGeo InfoSheet</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 &amp; 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_logo.png">
+			</a>
+			<br /><br />
+			Mapbender is an official OSGeo Project licensed under the <a class="a_small" href="http://www.gnu.org/licenses/licenses.html#GPL" title="GNU GPL license" alt="Link to the GNU license">GNU GPL</a>
+			<br />
+		</td>
+		<td WIDTH="65%" VALIGN="TOP" STYLE="line-height:133%">
+			<br />
+			<div>	
+				<font color="#ff0000" size="3">Mapbender Version <?php echo MB_VERSION_NUMBER." ".MB_VERSION_APPENDIX?> (<?php echo date("F jS, Y",MB_RELEASE_DATE);?>)</font>
+			</div>	
+			<br />
+			<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 has a data model to manage, display, navigate, query and catalog OGC compliant web map and feature services (WMS and transactional WFS). The basic authentication module can be connected with existing systems and allows multi client capable user manangement, authorization, group and service administration. <a class='a_small' href="http://www.mapbender.org/index.php/Mapbender_Security_Proxy" title="Mapbender OWS Security Proxy">OWS Security Proxy</a> acts as a facade for OGC services and controls access and logs operations on services and layers on user and group basis.
+			</p>
+			<br />
+			<table width="75%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #DFDFDF 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="75%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:1px #DFDFDF solid;">
+				<tr>
+					<td>		
+					Create new user (neuen Benutzer anlegen)
+
+					<iframe  id='createUser' name='createUser' scrolling="auto" frameborder='0' src ='frames/createUser.php' style ='width:400;height:242;' >
+					</iframe>
+			</table>
+			<br />
+			<table width="75%" cellspacing="1" cellpadding="4" STYLE="-moz-border-radius:6px; border:0px #808080 solid;">
+				<tr>
+					<td>
+						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>
+		</td>
+	</tr>
+</table>
+</body>
+</html>
\ No newline at end of file



More information about the Mapbender_commits mailing list