[Openfirst-cvscommit] news comments.php,1.1,1.2
Brought to you by:
xtimg
From: <xt...@us...> - 2003-11-23 15:39:25
|
Update of /cvsroot/openfirst/news In directory sc8-pr-cvs1:/tmp/cvs-serv25146 Modified Files: comments.php Log Message: Style changes for the sake of uniformity, quoting of attributes within HTML. Index: comments.php =================================================================== RCS file: /cvsroot/openfirst/news/comments.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** comments.php 23 Oct 2003 22:31:12 -0000 1.1 --- comments.php 23 Nov 2003 15:39:20 -0000 1.2 *************** *** 48,53 **** $redirect=ofirst_dbfetch_object($q); header("Location: ".$redirect->Website); ! } ! else{ $q=ofirst_dbquery("SELECT * FROM ofirst_news WHERE ID='$id'"); $newspost=ofirst_dbfetch_object($q); --- 48,52 ---- $redirect=ofirst_dbfetch_object($q); header("Location: ".$redirect->Website); ! } else { $q=ofirst_dbquery("SELECT * FROM ofirst_news WHERE ID='$id'"); $newspost=ofirst_dbfetch_object($q); *************** *** 58,69 **** header("Location: ".$basepath."/forum/thread.php?id=".$news->ID); } ! } ! else{ include_once($header); ?> <h2>Comments</h2> ! <table width=500> ! <tr><th colspan=2> <?php $q=ofirst_dbquery("SELECT title FROM ofirst_news WHERE ID='$id'"); --- 57,67 ---- header("Location: ".$basepath."/forum/thread.php?id=".$news->ID); } ! } else { include_once($header); ?> <h2>Comments</h2> ! <table width='500'> ! <tr><th colspan='2'> <?php $q=ofirst_dbquery("SELECT title FROM ofirst_news WHERE ID='$id'"); *************** *** 75,119 **** if(ofirst_dbnum_rows($q)!=0){ while($post=ofirst_dbfetch_object($q)){ ! echo("<tr valign=top><td class=sub width=200>"); if($post->EMail!=""){ echo("<a href=\"=$post->EMail\">$post->Author</a>"); ! } ! else{ echo("<b>$post->Author</b>"); } if($post->Website!=""){ echo("<br />Website: <a href=\"$post->Website\">$post->Website</a>"); ! } echo("<div><i>".$post->Date."</i></div>"); ! echo("</td><td width=300>".$post->Comment); if($admin){ ! echo("<br /><div align=right><a href=\"admin/delcomment.php?id=$post->ID\">Delete</a></div></td>"); } echo("</td></tr>"); } ! } ! else{ ! echo("<tr><td colspan=2 align=center>No comments have been posted</td></tr>"); } ?> </table><br /> <form action="newcomment.php" method=POST> ! <input type="hidden" name=id value="<?php echo($id); ?>" /> <table> ! <tr><th colspan=2>Post Comment</th></tr> ! <tr><td class=sub><label for=uname><b>Name</b></label></td> ! <td><input name=uname id=uname /></td></tr> ! <tr><td class=sub><label for=email><b>E-Mail</b><br />(optional)</label></td> ! <td><input name=email id=email /></td></tr> ! <tr><td class=sub><label for=web><b>Web site</b><br />(optional)</label></td> ! <td><input name=web id=web /></td></tr> ! <tr><td class=sub><label for=comment><b>Comment</b></label></td> ! <td><textarea name=comment id=comment rows=5 cols=25></textarea></td></tr> ! <tr><td colspan=2 align=center><input type=submit value="Post" /></td></tr> </table> </form><br /> <?php ! } ! else{ echo("This news item does not exist</th></tr></table><br />"); } --- 73,114 ---- if(ofirst_dbnum_rows($q)!=0){ while($post=ofirst_dbfetch_object($q)){ ! echo("<tr valign='top'><td class='sub' width='200'>"); if($post->EMail!=""){ echo("<a href=\"=$post->EMail\">$post->Author</a>"); ! } else { echo("<b>$post->Author</b>"); } if($post->Website!=""){ echo("<br />Website: <a href=\"$post->Website\">$post->Website</a>"); ! } echo("<div><i>".$post->Date."</i></div>"); ! echo("</td><td width='300'>".$post->Comment); if($admin){ ! echo("<br /><div align='right'><a href=\"admin/delcomment.php?id=$post->ID\">Delete</a></div></td>"); } echo("</td></tr>"); } ! } else { ! echo("<tr><td colspan='2' align='center'>No comments have been posted</td></tr>"); } ?> </table><br /> <form action="newcomment.php" method=POST> ! <input type="hidden" name="id" value="<?php echo($id); ?>" /> <table> ! <tr><th colspan="2">Post Comment</th></tr> ! <tr><td class="sub"><label for="uname"><b>Name</b></label></td> ! <td><input name="uname" id="uname" /></td></tr> ! <tr><td class="sub"><label for="email"><b>E-Mail</b><br />(optional)</label></td> ! <td><input name="email" id="email" /></td></tr> ! <tr><td class="sub"><label for="web"><b>Web site</b><br />(optional)</label></td> ! <td><input name="web" id="web" /></td></tr> ! <tr><td class="sub"><label for="comment"><b>Comment</b></label></td> ! <td><textarea name="comment" id="comment" rows="5" cols="25"></textarea></td></tr> ! <tr><td colspan="2" align="center"><input type="submit" value="Post" /></td></tr> </table> </form><br /> <?php ! } else { echo("This news item does not exist</th></tr></table><br />"); } |