[Mapbender-commits] r3422 - branches/beck_dev/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Mon Jan 12 02:21:20 EST 2009
Author: beck
Date: 2009-01-12 02:21:20 -0500 (Mon, 12 Jan 2009)
New Revision: 3422
Added:
branches/beck_dev/http/php/mb_listGUIs.php.BAK
Log:
Added: branches/beck_dev/http/php/mb_listGUIs.php.BAK
===================================================================
--- branches/beck_dev/http/php/mb_listGUIs.php.BAK (rev 0)
+++ branches/beck_dev/http/php/mb_listGUIs.php.BAK 2009-01-12 07:21:20 UTC (rev 3422)
@@ -0,0 +1,67 @@
+<?php
+# $Id: mb_listGUIs.php 2602 2008-07-08 12:33:55Z christoph $
+# http://www.mapbender.org/index.php/mb_listGUIs.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.
+
+# list of user-guis after login:
+function mb_listGUIs($arrayGUIs){
+ echo "<form name='listGUIsForm' target='_blank'>";
+ echo "<table width = '50%' ><tr><td>";
+ echo "<h2><font align='left' color='#000000'>Ma</font><font color='#0000CE'>p</font><font color='#C00000'>b</font><font color='#000000'>ender GUI list </font> </h2>";
+ echo "</td><td>";
+
+ if (count($arrayGUIs)>0){
+ $v = array();
+ $t = array();
+ $sql_list_guis = "SELECT DISTINCT gui_id,gui_name,gui_description FROM gui WHERE gui_id IN (";
+ for($i=0; $i<count($arrayGUIs); $i++){
+ if($i>0){$sql_list_guis .= ",";}
+ $sql_list_guis .= "$".($i+1);
+ array_push($v,$arrayGUIs[$i]);
+ array_push($t,'s');
+ }
+ $sql_list_guis .= ") ORDER BY gui_name";
+ $res_list_guis = db_prep_query($sql_list_guis,$v,$t);
+ if ($_SESSION["mb_user_name"] != "test" && $_SESSION["mb_user_name"] != "demo" && $_SESSION["mb_user_name"] != "guest") {
+ echo "<a href=\"../php/mod_editSelf.php?".SID."\" class='list_guis' target=_blank>Change personal settings</a>";
+ }
+ echo "</td><td align = 'right'>";
+ echo "<a href=\"../php/mod_logout.php?".SID."\"><img src =\"../img/button_gray/logout_off.png\" border='0' onmouseover='this.src=\"../img/button_gray/logout_over.png\"' onmouseout='this.src=\"../img/button_gray/logout_off.png\"' title=\"Logout\"></a>";
+ echo "</td></tr></table>";
+ echo "<table width='50%' class='list_guis' border='1' cellpadding='3' rules='rows'><tr style='background-color:#F0F0F0;' width='80px'><td ><b>GUI name</b></td><td><b>GUI description</b></td></tr>";
+ $cnt_list_guis = 0;
+ while($row = db_fetch_array($res_list_guis)){
+ echo "<tr ";
+ if(($cnt_list_guis % 2) == 0){ echo " style='background-color:#ffffff;' ";}
+ echo ">";
+ echo "<td><b><a href='index.php?".strip_tags (SID)."&gui_id=".$row["gui_id"]."'>".$row["gui_name"]."</a><b></td>";
+ echo "<td>".$row["gui_description"]."</td>";
+ echo "</tr>";
+ $cnt_list_guis++;
+ }
+ }
+ else{
+ echo "<a href=\"../php/mod_editSelf.php?".SID."\" class='list_guis' target=_blank>Change personal settings</a>";
+ echo "</td><td align = 'right'>";
+ echo "<a href=\"../php/mod_logout.php?".SID."\"><img src =\"../img/button_gray/logout_off.png\" border='0' onmouseover='this.src=\"../img/button_gray/logout_over.png\"' onmouseout='this.src=\"../img/button_gray/logout_off.png\"' title=\"Logout\"></a>";
+ echo "</td><tr>" ;
+ echo "<td><br>There are no guis available for this user</td></tr>";
+ echo "</table>";
+ }
+ echo "</form>";
+}
+?>
More information about the Mapbender_commits
mailing list