[AppDB] Show heading when there are 0 rows in editAppFamily.php

Tony Lambregts tony_lambregts at telusplanet.net
Fri Nov 5 17:58:14 CST 2004


The headings for editing URLs did not show up untill ther was a URL in 
the database.
this fixes it.


Change log: Show heading when there are 0 URL rows.

Files Changed: admin/editAppFamily.php


-------------- next part --------------
Index: admin/editAppFamily.php
===================================================================
RCS file: /home/wine/appdb/admin/editAppFamily.php,v
retrieving revision 1.2
diff -u -r1.2 editAppFamily.php
--- admin/editAppFamily.php	4 May 2004 15:21:25 -0000	1.2
+++ admin/editAppFamily.php	5 Nov 2004 23:43:19 -0000
@@ -170,7 +170,8 @@
     $result = mysql_query("SELECT * FROM appData WHERE appId = $appId AND type = 'url' AND versionId = 0");
     if($result && mysql_num_rows($result) > 0)
     {
-        echo '<tr><td class=color1><b>Delete</b></td><td class=color1><b>Description</b></td><td class=color1><b>URL</b></td></tr>',"\n";
+        echo '<tr><td class=color1><b>Delete</b></td><td class=color1>',"\n";
+        echo '<b>Description</b></td><td class=color1><b>URL</b></td></tr>',"\n";
         while($ob = mysql_fetch_object($result))
         {
             $temp0 = "adelete[".$i."]";
@@ -187,9 +188,14 @@
             echo '<input type=hidden name="'.$temp5.'" value="'.$ob->url.'">',"\n";
             $i++;
 	}
+    } else
+    {
+        echo '<tr><td class=color1></td><td class=color1><b>Description</b></td>',"\n";
+        echo '<td class=color1><b>URL</b></td></tr>',"\n";
+    }
     echo "</td></tr>\n";
     echo '<input type=hidden name="rows" value='.$i.'>';
-    }
+
     echo '<tr><td class=color1>New</td><td class=color1><input size=45% name="url" type="text"></td>',"\n";
     echo '<td class=color1><input size=45% type="text" name="url_desc"></td></tr>',"\n";
      


More information about the wine-patches mailing list