[Mapbender-commits] r3662 - trunk/mapbender/http/php
svn_mapbender at osgeo.org
svn_mapbender at osgeo.org
Tue Mar 10 11:30:38 EDT 2009
Author: christoph
Date: 2009-03-10 11:30:37 -0400 (Tue, 10 Mar 2009)
New Revision: 3662
Modified:
trunk/mapbender/http/php/mb_listGUIs.php
Log:
please take a look at the Mapbender code conventions!!!!
http://www.mapbender.org/Code_conventions
^^
Modified: trunk/mapbender/http/php/mb_listGUIs.php
===================================================================
--- trunk/mapbender/http/php/mb_listGUIs.php 2009-03-10 12:59:34 UTC (rev 3661)
+++ trunk/mapbender/http/php/mb_listGUIs.php 2009-03-10 15:30:37 UTC (rev 3662)
@@ -22,7 +22,6 @@
echo "<h1>Error</h1>";
echo "<p>There are no GUIs available for this user.</p>";
printf("<p><a href=\"../php/mod_logout.php?%s\"><img src=\"../img/button_gray/logout_off.png\" onmouseover=\"this.src='../img/button_gray/logout_over.png'\" onmouseout=\"this.src='../img/button_gray/logout_off.png'\" alt=\"Logout\" title=\"Logout\"></a></p>",SID);
-
return;
}
@@ -60,52 +59,52 @@
echo "<ul class=\"gui_list\">\n";
- $num = pg_numrows($result);
+ $num = pg_numrows($result);
- for ($j=0; $j<$num; $j++){
-
- $row = pg_fetch_array ($result, $j);
- if($category !== $row["category_name"]) {
- $category = $row["category_name"];
+ for ($j = 0; $j < $num; $j++) {
+ $row = pg_fetch_array ($result, $j);
+
+ if ($category !== $row["category_name"]) {
+ $category = $row["category_name"];
- if(strlen($row["category_name"]) > 0) {
+ if (strlen($row["category_name"]) > 0) {
- printf("\t<li class=\"gui_category\" id=\"%s\"><h2>%s</h2>",$row["category_name"],$row["category_name"]);
- }
- else {
- //$category="NULL";
- printf("\t<li class=\"gui_category\" ><h2>Application(s) without category</h2>");
- }
+ printf("\t<li class=\"gui_category\" id=\"%s\"><h2>%s</h2>",$row["category_name"],$row["category_name"]);
+ }
+ else {
+ //$category="NULL";
+ printf("\t<li class=\"gui_category\" ><h2>Application(s) without category</h2>");
+ }
- if(strlen($row["category_description"]) > 0) {
- printf("<label for=\"%s\" class=\"gui_category_description\">%s</label>\n",$row["category_name"],$row["category_description"]);
-
- echo "\t\t<ul>\n";
- }
- else {
- echo "\n\t\t<ul>\n";
- }
- }
+ if(strlen($row["category_description"]) > 0) {
+ printf("<label for=\"%s\" class=\"gui_category_description\">%s</label>\n",$row["category_name"],$row["category_description"]);
+ echo "\t\t<ul>\n";
+ }
+ else {
+ echo "\n\t\t<ul>\n";
+ }
+ }
- $url = sprintf("index.php?%s&gui_id=%s",strip_tags(SID),$row["gui_id"]);
- if(($j % 2) == 0){$class= "class='alternate' ";}
- else {$class="class='normal'";}
- //printf("\t\t<li id=\"%s\" %s onclick=\"location.href='%s'\" ><a href=\"%s\">%s</a><label for=\"%s\">%s</label></li>\n",$row["gui_name"],$class,$url,$url,$row["gui_name"],$row["gui_name"],$row["gui_description"]);
+ $url = sprintf("index.php?%s&gui_id=%s",strip_tags(SID),$row["gui_id"]);
+
+ if (($j % 2) == 0) {
+ $class= "class='alternate' ";
+ }
+ else {
+ $class="class='normal'";
+ }
+ //printf("\t\t<li id=\"%s\" %s onclick=\"location.href='%s'\" ><a href=\"%s\">%s</a><label for=\"%s\">%s</label></li>\n",$row["gui_name"],$class,$url,$url,$row["gui_name"],$row["gui_name"],$row["gui_description"]);
- printf("\t\t<li id=\"%s\" %s onclick=\"location.href='%s'\" ><a href=\"%s\">%s</a> \n\t\t\t <ul><li>%s</li></ul></li>\n",$row["gui_name"],$class,$url,$url,$row["gui_name"],$row["gui_description"]);
-
- //checks next category or last category
- $nextrow = pg_fetch_array ($result, $j+1);
- if(($category !== $nextrow["category_name"]) ||($num==$j+1)) {
- echo "\t\t</ul>\n";
- echo "\t</li>\n";
- }
-
-
-
- }
-echo "</ul>\n";
-echo "</div>\n";
-}
+ printf("\t\t<li id=\"%s\" %s onclick=\"location.href='%s'\" ><a href=\"%s\">%s</a> \n\t\t\t <ul><li>%s</li></ul></li>\n",$row["gui_name"],$class,$url,$url,$row["gui_name"],$row["gui_description"]);
-?>
+ //checks next category or last category
+ $nextrow = pg_fetch_array ($result, $j+1);
+ if(($category !== $nextrow["category_name"]) ||($num==$j+1)) {
+ echo "\t\t</ul>\n";
+ echo "\t</li>\n";
+ }
+ }
+ echo "</ul>\n";
+ echo "</div>\n";
+}
+?>
\ No newline at end of file
More information about the Mapbender_commits
mailing list