From: <jac...@us...> - 2011-06-19 22:59:40
|
Revision: 1321 http://openlcb.svn.sourceforge.net/openlcb/?rev=1321&view=rev Author: jacobsen Date: 2011-06-19 22:59:34 +0000 (Sun, 19 Jun 2011) Log Message: ----------- little better diagnostics Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2011-06-19 21:50:35 UTC (rev 1320) +++ trunk/web/viewuid.php 2011-06-19 22:59:34 UTC (rev 1321) @@ -20,7 +20,7 @@ // open DB global $opts; mysql_connect($opts['hn'],$opts['un'],$opts['pw']); -@mysql_select_db($opts['db']) or die( "Unable to select database"); +@mysql_select_db($opts['db']) or die( "Unable to select database. Error (" . mysql_errno() . ") " . mysql_error()); function value($result, $j, $index) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2011-07-22 17:56:03
|
Revision: 1386 http://openlcb.svn.sourceforge.net/openlcb/?rev=1386&view=rev Author: jacobsen Date: 2011-07-22 17:55:57 +0000 (Fri, 22 Jul 2011) Log Message: ----------- better heading Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2011-07-22 16:35:50 UTC (rev 1385) +++ trunk/web/viewuid.php 2011-07-22 17:55:57 UTC (rev 1386) @@ -42,7 +42,7 @@ echo '<table border="1">'; echo "<tr><th colspan='6'>Range. '*' means that any values are accepted in that byte.</th>"; -echo "<th>Organization or person name</th><th>URL</th><th>Comment</th></tr>"; +echo "<th>Delegating organization or person</th><th>URL</th><th>Comment</th></tr>"; for ($j = 0; $j < mysql_numrows($result); $j++) { echo '<tr>'; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2011-07-23 17:45:48
|
Revision: 1391 http://openlcb.svn.sourceforge.net/openlcb/?rev=1391&view=rev Author: jacobsen Date: 2011-07-23 17:45:42 +0000 (Sat, 23 Jul 2011) Log Message: ----------- John Plocher suggested format Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2011-07-23 01:28:07 UTC (rev 1390) +++ trunk/web/viewuid.php 2011-07-23 17:45:42 UTC (rev 1391) @@ -36,7 +36,17 @@ } $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) - ORDER BY uniqueid_byte0_value, uniqueid_byte1_value, uniqueid_byte2_value, uniqueid_byte3_value, uniqueid_byte4_value, uniqueid_byte5_value + WHERE uniqueid_byte1_mask = 255 + AND uniqueid_byte2_mask = 255 + AND uniqueid_byte3_mask = 255 + AND uniqueid_byte4_mask = 255 + AND uniqueid_byte5_mask = 255 + ORDER BY uniqueid_byte0_value, uniqueid_byte0_mask, + uniqueid_byte1_value, uniqueid_byte1_mask, + uniqueid_byte2_value, uniqueid_byte2_mask, + uniqueid_byte3_value, uniqueid_byte3_mask, + uniqueid_byte4_value, uniqueid_byte4_mask, + uniqueid_byte5_value, uniqueid_byte5_mask ;"; $result=mysql_query($query); @@ -64,6 +74,48 @@ echo '</table>'; +for ($i = 0; $i < mysql_numrows($result); $i++) { + + $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) + WHERE uniqueid_byte0_value = ".mysql_result($result,$i,"uniqueid_byte0_value")." + AND NOT ( uniqueid_byte1_mask = 255 AND uniqueid_byte2_mask = 255 AND uniqueid_byte3_mask = 255 + AND uniqueid_byte4_mask = 255 AND uniqueid_byte5_mask = 255 ) + ORDER BY uniqueid_byte1_value, uniqueid_byte1_mask, + uniqueid_byte2_value, uniqueid_byte2_mask, + uniqueid_byte3_value, uniqueid_byte3_mask, + uniqueid_byte4_value, uniqueid_byte4_mask, + uniqueid_byte5_value, uniqueid_byte5_mask + ;"; + $table=mysql_query($query); + + if (mysql_numrows($table) > 0) { + echo "<h3>Range ".mysql_result($result,$i,"uniqueid_byte0_value")." ".mysql_result($result,$i,"uniqueid_user_comment")."</h3>\n"; + echo '<table border="1">'; + echo "<tr><th colspan='6'>Range. '*' means that any values are accepted in that byte.</th>"; + echo "<th>Delegating organization or person</th><th>URL</th><th>Comment</th></tr>"; + + for ($j = 0; $j < mysql_numrows($table); $j++) { + echo '<tr>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"0").'</td>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"1").'</td>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"2").'</td>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"3").'</td>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"4").'</td>'; + echo '<td WIDTH="20" ALIGN="CENTER">'.value($table,$j,"5").'</td>'; + if (mysql_result($table,$j,"person_organization") != '') { + echo '<td>'.mysql_result($table,$j,"person_organization").'</td>'; + } else { + echo '<td>'.mysql_result($table,$j,"person_first_name").' '.mysql_result($table,$j,"person_last_name").'</td>'; + } + echo '<td>'.mysql_result($table,$j,"uniqueid_url").'</td>'; + echo '<td>'.mysql_result($table,$j,"uniqueid_user_comment").'</td>'; + echo '</tr>'; + } + + echo '</table>'; + } +} + ?> </body></html> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2011-07-23 19:01:26
|
Revision: 1396 http://openlcb.svn.sourceforge.net/openlcb/?rev=1396&view=rev Author: jacobsen Date: 2011-07-23 19:01:20 +0000 (Sat, 23 Jul 2011) Log Message: ----------- better headings Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2011-07-23 19:00:59 UTC (rev 1395) +++ trunk/web/viewuid.php 2011-07-23 19:01:20 UTC (rev 1396) @@ -89,7 +89,7 @@ $table=mysql_query($query); if (mysql_numrows($table) > 0) { - echo "<h3>Range ".mysql_result($result,$i,"uniqueid_byte0_value")." ".mysql_result($result,$i,"uniqueid_user_comment")."</h3>\n"; + echo "<h3>".mysql_result($result,$i,"uniqueid_user_comment")."</h3>\n"; echo '<table border="1">'; echo "<tr><th colspan='6'>Range. '*' means that any values are accepted in that byte.</th>"; echo "<th>Delegating organization or person</th><th>URL</th><th>Comment</th></tr>"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2013-03-26 00:55:42
|
Revision: 3098 http://openlcb.svn.sourceforge.net/openlcb/?rev=3098&view=rev Author: jacobsen Date: 2013-03-26 00:55:29 +0000 (Tue, 26 Mar 2013) Log Message: ----------- hexadecimal numbers Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2013-03-25 23:56:44 UTC (rev 3097) +++ trunk/web/viewuid.php 2013-03-26 00:55:29 UTC (rev 3098) @@ -16,6 +16,7 @@ <h1>View OpenLCB Unique ID Ranges</h1> This page shows the ranges of OpenLCB Unique ID's that have been assigned to date. +The numbers below are in hexadecimal. <P> For more information on OpenLCB, please see the <a href="../documents/index.html">documentation page</a>. For more information on OpenLCB unique ID assignment, please see the current draft @@ -32,7 +33,7 @@ function value($result, $j, $index) { if (255 == mysql_result($result,$j,"uniqueid_byte".$index."_mask")) return "*"; - else return mysql_result($result,$j,"uniqueid_byte".$index."_value"); + else return dechex( int mysql_result($result,$j,"uniqueid_byte".$index."_value")); } $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2013-03-26 00:59:49
|
Revision: 3099 http://openlcb.svn.sourceforge.net/openlcb/?rev=3099&view=rev Author: jacobsen Date: 2013-03-26 00:59:42 +0000 (Tue, 26 Mar 2013) Log Message: ----------- hexadecimal numbers Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2013-03-26 00:55:29 UTC (rev 3098) +++ trunk/web/viewuid.php 2013-03-26 00:59:42 UTC (rev 3099) @@ -33,7 +33,7 @@ function value($result, $j, $index) { if (255 == mysql_result($result,$j,"uniqueid_byte".$index."_mask")) return "*"; - else return dechex( int mysql_result($result,$j,"uniqueid_byte".$index."_value")); + else return dechex( int(mysql_result($result,$j,"uniqueid_byte".$index."_value"))); } $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2013-03-26 01:00:45
|
Revision: 3100 http://openlcb.svn.sourceforge.net/openlcb/?rev=3100&view=rev Author: jacobsen Date: 2013-03-26 01:00:35 +0000 (Tue, 26 Mar 2013) Log Message: ----------- hexadecimal numbers Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2013-03-26 00:59:42 UTC (rev 3099) +++ trunk/web/viewuid.php 2013-03-26 01:00:35 UTC (rev 3100) @@ -33,7 +33,7 @@ function value($result, $j, $index) { if (255 == mysql_result($result,$j,"uniqueid_byte".$index."_mask")) return "*"; - else return dechex( int(mysql_result($result,$j,"uniqueid_byte".$index."_value"))); + else return strtoupper(dechex( int(mysql_result($result,$j,"uniqueid_byte".$index."_value")))); } $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jac...@us...> - 2013-03-26 01:05:15
|
Revision: 3101 http://openlcb.svn.sourceforge.net/openlcb/?rev=3101&view=rev Author: jacobsen Date: 2013-03-26 01:05:08 +0000 (Tue, 26 Mar 2013) Log Message: ----------- for hex, formatting still Modified Paths: -------------- trunk/web/viewuid.php Modified: trunk/web/viewuid.php =================================================================== --- trunk/web/viewuid.php 2013-03-26 01:00:35 UTC (rev 3100) +++ trunk/web/viewuid.php 2013-03-26 01:05:08 UTC (rev 3101) @@ -33,7 +33,7 @@ function value($result, $j, $index) { if (255 == mysql_result($result,$j,"uniqueid_byte".$index."_mask")) return "*"; - else return strtoupper(dechex( int(mysql_result($result,$j,"uniqueid_byte".$index."_value")))); + else return strtoupper(dechex(mysql_result($result,$j,"uniqueid_byte".$index."_value"))); } $query = "SELECT * FROM UniqueIDs LEFT JOIN Person USING (person_id) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |