cvs: php-gtk-web /apps apps.php /include apps.inc
| From: | Christian Weiske | Date: | Thu, 13 Jul 2006 06:10:12 +0000 |
| Subject: | cvs: php-gtk-web /apps apps.php /include apps.inc | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-3254@lists.php.net to get a copy of this message | ||
cweiske Thu Jul 13 06:10:12 2006 UTC
Modified files:
/php-gtk-web/include apps.inc
/php-gtk-web/apps apps.php
Log:
Making appsdb validate
http://cvs.php.net/viewvc.cgi/php-gtk-web/include/apps.inc?r1=1.14&r2=1.15&diff_format=u Index: php-gtk-web/include/apps.inc diff -u php-gtk-web/include/apps.inc:1.14 php-gtk-web/include/apps.inc:1.15 --- php-gtk-web/include/apps.inc:1.14 Thu Apr 15 16:24:54 2004 +++ php-gtk-web/include/apps.inc Thu Jul 13 06:10:12 2006 @@ -76,7 +76,7 @@ function appHeader($the_cat = false, $the_subcat = false) { global $appCats, $MAGIC_COOKIE; - if( $_SERVER[SCRIPT_NAME] == "/apps/admin-apps.php" ) { + if( $_SERVER['SCRIPT_NAME'] == "/apps/admin-apps.php" ) { $script = "/apps/admin-apps.php"; }else { $script = "/apps/"; @@ -96,22 +96,22 @@ <table width="170" cellpadding="4" cellspacing="0"> <tr valign="top"> <td class="sidebar"> - <table border="0" CELLPADDING="4" CELLSPACING="0" WIDTH="160"> + <table border="0" cellpadding="4" cellspacing="0" width="160"> <tr valign="top"> - <td><a href="./"><img src="/gifs/caret-t.gif" border="0" width="11" height="7" ALT="Applications">Applications</a><br></td> + <td><a href="./"><img src="/gifs/caret-t.gif" border="0" width="11" height="7" alt="Applications"/>Applications</a><br/></td> </tr> <tr valign="top"> - <td nowrap><small> + <td style="white-space: nowrap"><small> <?php if( isset($MAGIC_COOKIE) ) { ?> - <a href="admin-apps.php?key=modified"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Modified Applications</a><br> - <a href="admin-apps.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Pending Applications</a><br> - <br> + <a href="admin-apps.php?key=modified"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Modified Applications</a><br/> + <a href="admin-apps.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Pending Applications</a><br/> + <br/> <?php } ?> - <a href="add.php?cat_id=<?php print($this_cat) ?>"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Add Application</a><br> - <a href="edit.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Edit Your Application</a><br> - <br> - <a href="<?php print($script) ?>?key=new"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Newest Applications</a><br> - <a href="<?php print($script) ?>?key=rating"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Highest Rated Applications</a><br> + <a href="add.php?cat_id=<?php print($this_cat) ?>"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Add Application</a><br/> + <a href="edit.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Edit Your Application</a><br/> + <br/> + <a href="<?php print($script) ?>?key=new"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Newest Applications</a><br/> + <a href="<?php print($script) ?>?key=rating"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Highest Rated Applications</a><br/> </small></td> </tr> <tr bgcolor="#cccccc"><td></td></tr> @@ -129,19 +129,19 @@ }else { $img = "/gifs/box-0.gif"; } - print("<td nowrap><a href=\"$script?the_cat=$cat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" ALT=\"$catObj->name\" >$catObj->name</a><br></td>"); + print("<td style='white-space: nowrap'><a href=\"$script?the_cat=$cat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" alt=\"$catObj->name\" />$catObj->name</a><br/></td>"); print("</tr>"); if( $_GET['the_cat'] == $cat_id && is_array($catObj->sub) ) { print("<tr valign=\"top\">"); - print("<td nowrap><small>"); + print("<td style='white-space: nowrap'><small>"); foreach( $catObj->sub as $subcat_id => $subcatObj ) { if( $_GET['the_subcat'] == $subcat_id ) { $img = "/gifs/box-1.gif"; }else { $img = "/gifs/box-0.gif"; } - print(" <a href=\"$script?the_cat=$cat_id&the_subcat=$subcat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" ALT=\"$subcatObj->name\" >$subcatObj->name</a><br>"); + print(" <a href=\"$script?the_cat=$cat_id&the_subcat=$subcat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" alt=\"$subcatObj->name\" />$subcatObj->name</a><br/>"); } print("</small></td>"); print("</tr>"); @@ -156,7 +156,7 @@ </tr> </table> </td> - <td bgcolor="#cccccc" background="/gifs/checkerboard.gif"><img src="/gifs/spacer.gif" width="1" height="1" border="0" alt="" ><br></td> + <td bgcolor="#cccccc" style="background-image: url(/gifs/checkerboard.gif)"><img src="/gifs/spacer.gif" width="1" height="1" border="0" alt="" /><br/></td> <td> <table width="600" cellpadding="10" cellspacing="0"> <tr> @@ -172,7 +172,7 @@ // function appFooter() { ?> - <br> + <br/> </td> </tr> </table> @@ -199,7 +199,7 @@ } if( $app->has_screenshot == 'Y' ) { - $screenshot = "<a href='screenshot.php/$app->id.jpg' target='apppop'><img src='screenshot.php/$app->id-thumb.jpg' alt='' align=right border=0></a>"; + $screenshot = "<a href='screenshot.php/$app->id.jpg' target='apppop'><img src='screenshot.php/$app->id-thumb.jpg' alt='' align='right' border='0'/></a>"; }else { $screenshot = ""; } @@ -208,17 +208,17 @@ print(" <tr valign=top bgcolor='#e0e0e0'> <td><b>$app->name</b></td> - <td align=right nowrap> + <td align='right' style='white-space: nowrap'> "); if( isset($MAGIC_COOKIE) ) { if( $app->status == 'P' || $app->status == "M" ) { - print("<a href='admin-apps.php?action=approve&app_id=$app->id' title='Approve'><img src='/gifs/notes-add.gif' width=13 height=13 border=0 alt='Approve'></a> "); + print("<a href='admin-apps.php?action=approve&app_id=$app->id' title='Approve'><img src='/gifs/notes-add.gif' width=13 height=13 border=0 alt='Approve'/></a> "); } - print("<a href='admin-apps.php?action=edit&app_id=$app->id' title='Edit'><img src='/gifs/notes-edit.gif' width=13 height=13 border=0 alt='Edit'></a> "); + print("<a href='admin-apps.php?action=edit&app_id=$app->id' title='Edit'><img src='/gifs/notes-edit.gif' width=13 height=13 border=0 alt='Edit'/></a> "); if( $app->status == 'P' || $app->status == "M" ) { - print("<a href='admin-apps.php?action=reject&app_id=$app->id' title='Reject' onclick=\"return confirm('Are you sure you want to reject this app?')\"><img src='/gifs/notes-reject.gif' width=13 height=13 border=0 alt='Reject'></a> "); + print("<a href='admin-apps.php?action=reject&app_id=$app->id' title='Reject' onclick=\"return confirm('Are you sure you want to reject this app?')\"><img src='/gifs/notes-reject.gif' width='13' height='13' border='0' alt='Reject'/></a> "); } - print("<a href='admin-apps.php?action=delete&app_id=$app->id' title='Delete' onclick=\"return confirm('Are you sure you want to delete this app?')\"><img src='/gifs/notes-delete.gif' width=13 height=13 border=0 alt='Delete'></a> "); + print("<a href='admin-apps.php?action=delete&app_id=$app->id' title='Delete' onclick=\"return confirm('Are you sure you want to delete this app?')\"><img src='/gifs/notes-delete.gif' width='13' height=13 border='0' alt='Delete'/></a> "); }else if( $user_edit_mode == true ) { print("<a href='edit.php?action=edit&app_id=$app->id'>edit this application</a>"); }else { @@ -226,15 +226,15 @@ <small> rating: <b>$rating</b> | rate: - <a href='rate.php?app_id=$app->id&rate=1&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>1</a> + <a href='rate.php?app_id=$app->id&rate=1&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>1</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=2&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>2</a> + <a href='rate.php?app_id=$app->id&rate=2&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>2</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=3&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>3</a> + <a href='rate.php?app_id=$app->id&rate=3&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>3</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=4&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>4</a> + <a href='rate.php?app_id=$app->id&rate=4&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>4</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=5&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>5</a> + <a href='rate.php?app_id=$app->id&rate=5&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>5</a> </small> "); } @@ -261,7 +261,7 @@ $app->blurb </td> </tr> - <tr><td colspan=2><br></td></tr> + <tr><td colspan=2><br/></td></tr> "); } http://cvs.php.net/viewvc.cgi/php-gtk-web/apps/apps.php?r1=1.10&r2=1.11&diff_format=u Index: php-gtk-web/apps/apps.php diff -u php-gtk-web/apps/apps.php:1.10 php-gtk-web/apps/apps.php:1.11 --- php-gtk-web/apps/apps.php:1.10 Thu Jan 15 16:34:40 2004 +++ php-gtk-web/apps/apps.php Thu Jul 13 06:10:12 2006 @@ -66,14 +66,14 @@ $num_rows = mysql_num_rows($res); if( $res && $num_rows > 0 ) { - print("<table border=0 cellpadding=2 cellspacing=0 width=100%>"); + print("<table border='0' cellpadding='2' cellspacing='0' width='100%'>"); while( $row = mysql_fetch_object($res) ) { displayApp($row, $_GET['the_cat'], $_GET['the_subcat'], $_GET['offset']); } print("</table>"); if( $num_rows >= $limit ) { - print("<br>"); + print("<br/>"); print("<p align=right>"); print("<small>"); @@ -87,16 +87,16 @@ print("</small>"); print("</p>"); - print("<br>"); - print("<br>"); + print("<br/>"); + print("<br/>"); } }else { if( $offset > 0 ) { print("There are no more applications in this category."); }else { print("There are not any applications in this category."); - print("<br>"); - print("<br>"); + print("<br/>"); + print("<br/>"); print("Maybe you'd like to <a href='add.php?cat_id=$this_cat'>add one</a>?"); }
http://cvs.php.net/viewvc.cgi/php-gtk-web/include/apps.inc?r1=1.14&r2=1.15&diff_format=u Index: php-gtk-web/include/apps.inc diff -u php-gtk-web/include/apps.inc:1.14 php-gtk-web/include/apps.inc:1.15 --- php-gtk-web/include/apps.inc:1.14 Thu Apr 15 16:24:54 2004 +++ php-gtk-web/include/apps.inc Thu Jul 13 06:10:12 2006 @@ -76,7 +76,7 @@ function appHeader($the_cat = false, $the_subcat = false) { global $appCats, $MAGIC_COOKIE; - if( $_SERVER[SCRIPT_NAME] == "/apps/admin-apps.php" ) { + if( $_SERVER['SCRIPT_NAME'] == "/apps/admin-apps.php" ) { $script = "/apps/admin-apps.php"; }else { $script = "/apps/"; @@ -96,22 +96,22 @@ <table width="170" cellpadding="4" cellspacing="0"> <tr valign="top"> <td class="sidebar"> - <table border="0" CELLPADDING="4" CELLSPACING="0" WIDTH="160"> + <table border="0" cellpadding="4" cellspacing="0" width="160"> <tr valign="top"> - <td><a href="./"><img src="/gifs/caret-t.gif" border="0" width="11" height="7" ALT="Applications">Applications</a><br></td> + <td><a href="./"><img src="/gifs/caret-t.gif" border="0" width="11" height="7" alt="Applications"/>Applications</a><br/></td> </tr> <tr valign="top"> - <td nowrap><small> + <td style="white-space: nowrap"><small> <?php if( isset($MAGIC_COOKIE) ) { ?> - <a href="admin-apps.php?key=modified"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Modified Applications</a><br> - <a href="admin-apps.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Pending Applications</a><br> - <br> + <a href="admin-apps.php?key=modified"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Modified Applications</a><br/> + <a href="admin-apps.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Pending Applications</a><br/> + <br/> <?php } ?> - <a href="add.php?cat_id=<?php print($this_cat) ?>"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Add Application</a><br> - <a href="edit.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Edit Your Application</a><br> - <br> - <a href="<?php print($script) ?>?key=new"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Newest Applications</a><br> - <a href="<?php print($script) ?>?key=rating"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt="">Highest Rated Applications</a><br> + <a href="add.php?cat_id=<?php print($this_cat) ?>"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Add Application</a><br/> + <a href="edit.php"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Edit Your Application</a><br/> + <br/> + <a href="<?php print($script) ?>?key=new"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Newest Applications</a><br/> + <a href="<?php print($script) ?>?key=rating"><img src="/gifs/box-0.gif" border="0" width="11" height="7" alt=""/>Highest Rated Applications</a><br/> </small></td> </tr> <tr bgcolor="#cccccc"><td></td></tr> @@ -129,19 +129,19 @@ }else { $img = "/gifs/box-0.gif"; } - print("<td nowrap><a href=\"$script?the_cat=$cat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" ALT=\"$catObj->name\" >$catObj->name</a><br></td>"); + print("<td style='white-space: nowrap'><a href=\"$script?the_cat=$cat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" alt=\"$catObj->name\" />$catObj->name</a><br/></td>"); print("</tr>"); if( $_GET['the_cat'] == $cat_id && is_array($catObj->sub) ) { print("<tr valign=\"top\">"); - print("<td nowrap><small>"); + print("<td style='white-space: nowrap'><small>"); foreach( $catObj->sub as $subcat_id => $subcatObj ) { if( $_GET['the_subcat'] == $subcat_id ) { $img = "/gifs/box-1.gif"; }else { $img = "/gifs/box-0.gif"; } - print(" <a href=\"$script?the_cat=$cat_id&the_subcat=$subcat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" ALT=\"$subcatObj->name\" >$subcatObj->name</a><br>"); + print(" <a href=\"$script?the_cat=$cat_id&the_subcat=$subcat_id\"><img src=\"$img\" border=\"0\" width=\"11\" height=\"7\" alt=\"$subcatObj->name\" />$subcatObj->name</a><br/>"); } print("</small></td>"); print("</tr>"); @@ -156,7 +156,7 @@ </tr> </table> </td> - <td bgcolor="#cccccc" background="/gifs/checkerboard.gif"><img src="/gifs/spacer.gif" width="1" height="1" border="0" alt="" ><br></td> + <td bgcolor="#cccccc" style="background-image: url(/gifs/checkerboard.gif)"><img src="/gifs/spacer.gif" width="1" height="1" border="0" alt="" /><br/></td> <td> <table width="600" cellpadding="10" cellspacing="0"> <tr> @@ -172,7 +172,7 @@ // function appFooter() { ?> - <br> + <br/> </td> </tr> </table> @@ -199,7 +199,7 @@ } if( $app->has_screenshot == 'Y' ) { - $screenshot = "<a href='screenshot.php/$app->id.jpg' target='apppop'><img src='screenshot.php/$app->id-thumb.jpg' alt='' align=right border=0></a>"; + $screenshot = "<a href='screenshot.php/$app->id.jpg' target='apppop'><img src='screenshot.php/$app->id-thumb.jpg' alt='' align='right' border='0'/></a>"; }else { $screenshot = ""; } @@ -208,17 +208,17 @@ print(" <tr valign=top bgcolor='#e0e0e0'> <td><b>$app->name</b></td> - <td align=right nowrap> + <td align='right' style='white-space: nowrap'> "); if( isset($MAGIC_COOKIE) ) { if( $app->status == 'P' || $app->status == "M" ) { - print("<a href='admin-apps.php?action=approve&app_id=$app->id' title='Approve'><img src='/gifs/notes-add.gif' width=13 height=13 border=0 alt='Approve'></a> "); + print("<a href='admin-apps.php?action=approve&app_id=$app->id' title='Approve'><img src='/gifs/notes-add.gif' width=13 height=13 border=0 alt='Approve'/></a> "); } - print("<a href='admin-apps.php?action=edit&app_id=$app->id' title='Edit'><img src='/gifs/notes-edit.gif' width=13 height=13 border=0 alt='Edit'></a> "); + print("<a href='admin-apps.php?action=edit&app_id=$app->id' title='Edit'><img src='/gifs/notes-edit.gif' width=13 height=13 border=0 alt='Edit'/></a> "); if( $app->status == 'P' || $app->status == "M" ) { - print("<a href='admin-apps.php?action=reject&app_id=$app->id' title='Reject' onclick=\"return confirm('Are you sure you want to reject this app?')\"><img src='/gifs/notes-reject.gif' width=13 height=13 border=0 alt='Reject'></a> "); + print("<a href='admin-apps.php?action=reject&app_id=$app->id' title='Reject' onclick=\"return confirm('Are you sure you want to reject this app?')\"><img src='/gifs/notes-reject.gif' width='13' height='13' border='0' alt='Reject'/></a> "); } - print("<a href='admin-apps.php?action=delete&app_id=$app->id' title='Delete' onclick=\"return confirm('Are you sure you want to delete this app?')\"><img src='/gifs/notes-delete.gif' width=13 height=13 border=0 alt='Delete'></a> "); + print("<a href='admin-apps.php?action=delete&app_id=$app->id' title='Delete' onclick=\"return confirm('Are you sure you want to delete this app?')\"><img src='/gifs/notes-delete.gif' width='13' height=13 border='0' alt='Delete'/></a> "); }else if( $user_edit_mode == true ) { print("<a href='edit.php?action=edit&app_id=$app->id'>edit this application</a>"); }else { @@ -226,15 +226,15 @@ <small> rating: <b>$rating</b> | rate: - <a href='rate.php?app_id=$app->id&rate=1&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>1</a> + <a href='rate.php?app_id=$app->id&rate=1&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>1</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=2&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>2</a> + <a href='rate.php?app_id=$app->id&rate=2&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>2</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=3&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>3</a> + <a href='rate.php?app_id=$app->id&rate=3&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>3</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=4&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>4</a> + <a href='rate.php?app_id=$app->id&rate=4&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>4</a> <font color='#999999'>|</font> - <a href='rate.php?app_id=$app->id&rate=5&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>5</a> + <a href='rate.php?app_id=$app->id&rate=5&the_cat={$_GET['the_cat']}&the_subcat={$_GET['the_subcat']}&offset=$offset'>5</a> </small> "); } @@ -261,7 +261,7 @@ $app->blurb </td> </tr> - <tr><td colspan=2><br></td></tr> + <tr><td colspan=2><br/></td></tr> "); } http://cvs.php.net/viewvc.cgi/php-gtk-web/apps/apps.php?r1=1.10&r2=1.11&diff_format=u Index: php-gtk-web/apps/apps.php diff -u php-gtk-web/apps/apps.php:1.10 php-gtk-web/apps/apps.php:1.11 --- php-gtk-web/apps/apps.php:1.10 Thu Jan 15 16:34:40 2004 +++ php-gtk-web/apps/apps.php Thu Jul 13 06:10:12 2006 @@ -66,14 +66,14 @@ $num_rows = mysql_num_rows($res); if( $res && $num_rows > 0 ) { - print("<table border=0 cellpadding=2 cellspacing=0 width=100%>"); + print("<table border='0' cellpadding='2' cellspacing='0' width='100%'>"); while( $row = mysql_fetch_object($res) ) { displayApp($row, $_GET['the_cat'], $_GET['the_subcat'], $_GET['offset']); } print("</table>"); if( $num_rows >= $limit ) { - print("<br>"); + print("<br/>"); print("<p align=right>"); print("<small>"); @@ -87,16 +87,16 @@ print("</small>"); print("</p>"); - print("<br>"); - print("<br>"); + print("<br/>"); + print("<br/>"); } }else { if( $offset > 0 ) { print("There are no more applications in this category."); }else { print("There are not any applications in this category."); - print("<br>"); - print("<br>"); + print("<br/>"); + print("<br/>"); print("Maybe you'd like to <a href='add.php?cat_id=$this_cat'>add one</a>?"); }