[Mapbender-commits] r3330 - branches/astroidex_25/http/php

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Mon Dec 15 19:11:47 EST 2008


Author: astrid_emde
Date: 2008-12-15 19:11:47 -0500 (Mon, 15 Dec 2008)
New Revision: 3330

Modified:
   branches/astroidex_25/http/php/mb_listGUIs.php
Log:
category integrated

Modified: branches/astroidex_25/http/php/mb_listGUIs.php
===================================================================
--- branches/astroidex_25/http/php/mb_listGUIs.php	2008-12-16 00:07:11 UTC (rev 3329)
+++ branches/astroidex_25/http/php/mb_listGUIs.php	2008-12-16 00:11:47 UTC (rev 3330)
@@ -21,35 +21,53 @@
 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 "<h2><font align='left' color='#000000'>xxxxx Categories 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 (";
+
+		$sql_list_guis = "SELECT DISTINCT gui_id,gui_name,gui_description, ggc.*,gc.category_name,gc.category_description FROM gui g ";
+		$sql_list_guis .= "Left JOIN gui_gui_category ggc ON ";
+		$sql_list_guis .= "g.gui_id = ggc.fkey_gui_id ";
+		$sql_list_guis .= "Left Join gui_category gc On (ggc.fkey_gui_category_id = gc.category_id) ";
+		$sql_list_guis .= "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";
+
+		$sql_list_guis .= ") ORDER BY gc.category_name, gui_name";
+		
 		$res_list_guis = db_prep_query($sql_list_guis,$v,$t);
 
-		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 "Category<br>";
-		echo "Category description";
-		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>";
+		
+		
+#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;
+		$tempCategory = '';
+
 		while($row = db_fetch_array($res_list_guis)){
+				if($tempCategory != $row["category_name"]){
+				$tempCategory = $row["category_name"];
+				if ($cnt_list_guis != 0){echo "</table>";}
+					echo "<p><b>".$tempCategory."</b>";
+					echo "<br><label><em>".$row["category_description"]."</em></label></p>";
+					echo "<table width='50%' class='list_guis' border='0' cellpadding='3'>"; # rules='rows'
+					echo "<tr style='background-color:#F0F0F0;' width='80px'><td ><b>GUI name</b></td><td><b>GUI description</b></td></tr>";
+				}
+			
 			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 "<td><a href='index.php?".strip_tags (SID)."&gui_id=".$row["gui_id"]."'>".$row["gui_description"]."</a></td>";
 			echo "</tr>";
 			$cnt_list_guis++;
 		}



More information about the Mapbender_commits mailing list