[Openfirst-cvscommit] photogallery viewphoto.php,1.3,1.4
Brought to you by:
xtimg
From: <dav...@us...> - 2003-08-22 04:58:23
|
Update of /cvsroot/openfirst/photogallery In directory sc8-pr-cvs1:/tmp/cvs-serv27940 Modified Files: viewphoto.php Log Message: Added commenting system and changed design of viewing images. Index: viewphoto.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/viewphoto.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** viewphoto.php 20 Aug 2003 19:03:31 -0000 1.3 --- viewphoto.php 20 Aug 2003 21:40:43 -0000 1.4 *************** *** 32,48 **** include($header); include("admin/galleryglobals.php"); ! ! ?> ! <h2>View Photo</h2> ! <table width="588" align="center"> ! <tr bgcolor="#999999"> ! <td valign="top"> <div align="center"> </div></td> ! <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Gallery ! Name</strong></font></td> ! <td><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Author</font></strong></td> ! <td> <div align="left"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Date ! Created </font></strong></div></td> </tr> ! <?php // Retrieve information about the photos related gallery --- 32,66 ---- include($header); include("admin/galleryglobals.php"); ! ! if(ISSET($_POST['addcomment'])){ ! mysql_query("INSERT INTO ofirst_photogallery_comments SET ! Image = '".$_GET['PHOTO']."', ! Gallery = '".$_GET['ID']."', ! Author = '".$_POST['name']."', ! EMail = '".$_POST['email']."', ! Comment = '".$_POST['comment']."', ! Date = '".time()."'") or die(mysql_error()); ! ! echo "<br><br>Your comment has been successfully posted! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; ! die(include($footer)); ! } ! ! if(ISSET($_GET['COMMENT'])){ ! if(ISSET($user->user)){ ! mysql_query("DELETE FROM ofirst_photogallery_comments WHERE ID = '".$_GET['COMMENT']."'"); ! echo "<br><br>Comment has been deleted, thank you! [ <a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>View Image</a> ]<br><br>"; ! die(include($footer)); ! } ! } ! ! ?> ! <h2>View Photo From Gallery</h2> ! <form action='viewphoto.php?ID=<?php echo $_GET['ID']; ?>&PHOTO=<?php echo $_GET['PHOTO']; ?>' method='POST'> ! <table width="753"> ! <tr> ! <th valign="top">Photo Information</th> ! <th>Photo</th> </tr> ! <?php // Retrieve information about the photos related gallery *************** *** 52,81 **** ?> <tr> ! <td width="78" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" width="58" height="51" border="0"></a></font></td> ! <td width="127" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->GalleryName; ?></font></td> ! <td width="150" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->Author; ?></font></td> ! <td width="185" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo date("F j, Y, g:i a",$gallery->Dates); ?></font></td> ! </tr> ! </table> ! <div align="center"> ! <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font><br> ! <br> ! </p> ! </div> ! <div align="center"></div> ! <table width="75" border="0" align="center" cellpadding="5" cellspacing="0"> ! <?php // Declare dir location $dirlocate = $gallerydir.$gallery->GalleryName."/"; ! echo "<img src='".$dirlocate.$_GET['PHOTO']."'>"; ?> </table> ! <p align="center"> ! </p> ! <p align="center"><font size="2">The content within the galleries are copyright ! of this website and its ownering team.<br> ! In order to use or copy its content please contact the teams webmaster.</font></p> ! <p align="center"> </p> ! <?php include($footer); ?> \ No newline at end of file --- 70,156 ---- ?> <tr> ! <td width="308" valign="top"><table width="100%"> ! <tr> ! <td width="20%"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" width="58" height="51" border="0"></a></td> ! <td width="80%"><?php echo $_GET['PHOTO']; ?></td> ! </tr> ! <tr> ! <td><div align="right"><strong>Gallery:</strong></div></td> ! <td><?php echo $gallery->GalleryName; ?></td> ! </tr> ! <tr> ! <td><div align="right"><strong>Author:</strong></div></td> ! <td><?php echo $gallery->Author; ?></td> ! </tr> ! </table> ! <table width="100%"> ! <tr> ! <td width="37%"><div align="center"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="comment.PNG" width="23" height="25" border="0"></a></div></td> ! <td width="63%"><strong>You May Comment</strong></td> ! </tr> ! <tr> ! <td><div align="right"><strong>Name:</strong></div></td> ! <td><input name="name" type="text" id="name"></td> ! </tr> ! <tr> ! <td><div align="right"><strong>E-Mail:</strong></div></td> ! <td><input name="email" type="text" id="email"></td> ! </tr> ! <tr> ! <td> </td> ! <td><textarea name="comment" id="comment"></textarea> ! <br> ! (HTML and Emoticons enabled)</td> ! </tr> ! <tr> ! <td> </td> ! <td><input name="addcomment" type="submit" id="addcomment" value="Submit Comment"></td> ! </tr> ! </table> ! </form> ! </td> ! <td width="433" valign="top"> ! <?php // Declare dir location $dirlocate = $gallerydir.$gallery->GalleryName."/"; ! echo "<img height='400' width='500' src='".$dirlocate.$_GET['PHOTO']."'>"; ?> + </td> + </tr> </table> ! <br> ! <table width="53%"> ! <tr> ! <th> </th> ! <th valign="top">Comments for this image:</th> ! </tr> ! <?php ! $query = mysql_query("SELECT * FROM ofirst_photogallery_comments WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); ! while($comment = mysql_fetch_object($query)){ ! ?> ! <tr> ! <td width="33%"><strong><?php echo $comment->Author; ?><br></strong><a href='mailto:<?php echo $comment->EMail; ?>'>E-Mail Now</a><br> ! <?php ! if(ISSET($user->user)){ ! echo "<a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."&COMMENT=".$comment->ID."'>Delete</a>"; ! } ! ?></td> ! <td width="67%" valign="top"> ! <?php echo slur_block(emoticon_translate($comment->Comment)); ?> ! </td> ! </tr> ! <?php ! } ! ! if(mysql_num_rows($query) == 0){ ! echo "<tr><td>--</td><td>There are no comments for this image!</td></tr>"; ! } ! ?> ! </table> ! <p> </p> ! <p>The content within the galleries are copyright of this website and its ownering ! team.<br> ! In order to use or copy its content please contact the teams webmaster.</p></p> ! <?php include($footer); ?> |