[Openfirst-cvscommit] photogallery email.php,1.6,1.7 gallery.php,1.7,1.8 index.php,1.5,1.6 photogall
Brought to you by:
xtimg
From: <xt...@us...> - 2003-08-22 15:49:16
|
Update of /cvsroot/openfirst/photogallery In directory sc8-pr-cvs1:/tmp/cvs-serv5277 Modified Files: email.php gallery.php index.php photogallery.php viewphoto.php Log Message: Commit largely minor auditing changes, add some function_exists checking where required Index: email.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/email.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** email.php 22 Aug 2003 14:57:28 -0000 1.6 --- email.php 22 Aug 2003 15:49:12 -0000 1.7 *************** *** 26,30 **** * */ - // Include important globals related to this module include("../config/globals.php"); --- 26,29 ---- *************** *** 36,43 **** $gallery = mysql_fetch_object($query); - // If user has hit the send option then ! if(ISSET($_POST['send'])){ // Set the max execution time for the script so that it will not time out, then set the SMTP server to send with ini_set("MAX_EXECUTION_TIME",$gallery_execution_time); --- 35,82 ---- $gallery = mysql_fetch_object($query); // If user has hit the send option then ! if(isset($_POST['send'])){ ! ! ini_set("MAX_EXECUTION_TIME",$gallery_execution_time); ! ini_set("SMTP",$SMTP); ! ! $from = $_POST['name']; ! $email = $_POST['email']; ! ! $recipient = $_POST['recipient']; ! $recipientemail = $_POST['recipientemail']; ! ! $comment = $_POST['comment']; + $headers = "MIME-Version: 1.0\r\n"; + $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; + $headers .= "From: ".$title." Photo Gallery <".$mailfrom.">\r\n"; + $headers .= "Reply-To: ".$mailfrom."\r\n"; + $headers .= "X-Priority: 1\r\n"; + $headers .= "X-MSMail-Priority: High\r\n"; + + $message = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'> + <html><head><meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'> + </head><body><div align='center'> + <table width='550' border='0' cellspacing='0' cellpadding='0'> + <tr> + <td height='23'><p>Hello ".$recipient.",</p> + <p>This is a message from the <b>".$title."</b> photo + gallery mailing system. <b>".$from." (".$email.")</b> + has requested that you peview this image. Here are his comments:</p> + <table width='400' border='1' align='center' cellpadding='6' cellspacing='0' bordercolor='#333333'> + <tr> + <td height='23'><p>".$comment."<br> + </p> + </td> + </tr> + </table> + <p align='center'><img src='".$home.$basepath."/photogallery/gallery/$gallery->GalleryName".$_POST['photo']."' width='300' height='200'></p> + <p align='left'>Thank you for your time,</p> + <p align='left'>The <b>".$title."</b> photo gallery.<br> + </p></td> + </tr> + </table> + </div></body></html>"; // Set the max execution time for the script so that it will not time out, then set the SMTP server to send with ini_set("MAX_EXECUTION_TIME",$gallery_execution_time); *************** *** 80,95 **** <p align='left'>Thank you for your time,</p> <p align='left'>The <b>".$title."</b> photo gallery.<br></p> ! </td> </tr> </table></div></body></html>"; // Check if multipartmail is declared or else use regular mailing function ! if(function_exists("multipartmail")){ ! multipartmail($recipientemail, $title."Gallery Photo Sender", $message); ! }else{ ! mail($recipientemail,$title." Gallery Photo Sender",$message,$headers) or die("<br><br><br><center>E-Mail was <b>not</b> successfully sent!</center>"); } ! ! // Print out the completion of the e-mailing then die out echo "<br><br><br>Photo was successfully sent to the recipient, thank you! [ <a href='index.php'>Galleries</a> ]<br><br><br>"; die(include($footer)); --- 119,134 ---- <p align='left'>Thank you for your time,</p> <p align='left'>The <b>".$title."</b> photo gallery.<br></p> ! </td> </tr> </table></div></body></html>"; // Check if multipartmail is declared or else use regular mailing function ! if(funcion_exists("multipartmail")){ ! multipartmail($recipientemail, $title."Gallery Photo Sender", $message); ! } else { ! mail($recipientemail,$title." Gallery Photo Sender",$message,$headers) or die("<br><br><br><center>E-Mail was <b>not</b> successfully sent!</center>"); } ! ! // Print out the completion of the e-mailing then die out echo "<br><br><br>Photo was successfully sent to the recipient, thank you! [ <a href='index.php'>Galleries</a> ]<br><br><br>"; die(include($footer)); *************** *** 108,152 **** <table width="521" border="0" align="center" cellpadding="6" cellspacing="0"> ! <tr bgcolor="#999999"> ! <td valign="top"> <div align="center"> </div></td> ! <td><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Gallery ! Name</b></font></td> </tr> ! <tr> ! <td width="140" valign="top"> <div align="right">Your Name: </div> ! <div align="right"></div></td> ! <td width="266" valign="top"><div align="left"> ! <input name="name" type="text" id="name"> ! </div></td> </tr> ! <tr> ! <td valign="top"><div align="right">Your E-Mail:</div></td> ! <td valign="top"><div align="left"> ! <input name="email" type="text" id="email" size="40"> ! </div></td> </tr> ! <tr> ! <td valign="top"><div align="right">Recipients Name:</div></td> ! <td valign="top"><div align="left"> ! <input name="recipient" type="text" id="recipient"> ! </div></td> </tr> ! <tr> ! <td valign="top"><div align="right">Recipients E-Mail:</div></td> ! <td valign="top"><div align="left"> ! <input name="recipientemail" type="text" id="recipientemail" size="40"> ! </div></td> </tr> ! <tr> ! <td valign="top"><div align="right">Comments:</div></td> ! <td valign="top"><div align="left"> ! <textarea name="comment" cols="35" rows="9" id="comment"></textarea> ! </div></td> </tr> <tr> ! <td valign="top"> </td> ! <td valign="top"><input name="send" type="submit" id="send" value="Send E-Mail"></td> </tr> </table> </form> ! <?php include($footer); ?> --- 147,188 ---- <table width="521" border="0" align="center" cellpadding="6" cellspacing="0"> ! <tr bgcolor="#999999"> ! <th> </th> ! <th>Gallery Name</th> </tr> ! <tr> ! <th>Your Name</th> ! <td width="266"><input name="name" type="text" id="name"></td> </tr> ! <tr> ! <th>Your E-Mail</th> ! <td> ! <input name="email" type="text" id="email" size="40"> ! </td> </tr> ! <tr> ! <th>Recipients Name</th> ! <td> ! <input name="recipient" type="text" id="recipient"> ! </td> </tr> ! <tr> ! <th>Recipients E-Mail</th> ! <td> ! <input name="recipientemail" type="text" id="recipientemail" size="40"> ! </td> </tr> ! <tr> ! <th>Comments</th> ! <td> ! <textarea name="comment" cols="35" rows="9" id="comment"></textarea> ! </td> </tr> <tr> ! <th> </th> ! <td><input name="send" type="submit" id="send" value="Send E-Mail"></td> </tr> </table> </form> ! ! <?php include($footer); ?> Index: gallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/gallery.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** gallery.php 22 Aug 2003 14:57:28 -0000 1.7 --- gallery.php 22 Aug 2003 15:49:12 -0000 1.8 *************** *** 26,43 **** * */ - // Include important globals related to this module include("../config/globals.php"); include($header); include("admin/galleryglobals.php"); ! // Retrieve gallery information $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); $gallery = mysql_fetch_object($query); ! ?> <h2>Gallery Viewer</h2> <table width="497"> ! <tr> <td><b>Description:</b> <?php echo $gallery->Description; ?></td> </tr> --- 26,42 ---- * */ // Include important globals related to this module include("../config/globals.php"); include($header); include("admin/galleryglobals.php"); ! // Retrieve gallery information $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); $gallery = mysql_fetch_object($query); ! ?> <h2>Gallery Viewer</h2> <table width="497"> ! <tr> <td><b>Description:</b> <?php echo $gallery->Description; ?></td> </tr> *************** *** 47,52 **** <tr> <th width="150"> </th> ! <th width="150"><?php echo $gallery->GalleryName; ?></th> ! <th width="150"> </th> </tr> <?php --- 46,51 ---- <tr> <th width="150"> </th> ! <th width="150"><?php echo $gallery->GalleryName; ?></th> ! <th width="150"> </th> </tr> <?php *************** *** 63,121 **** // Begin reading the directory for images while(! (($file = readdir($dir)) === false)){ ! ! // If the directory is not a dir then continue the process if (! is_dir($dirlocate."/".$file)){ ! ! // Explode file type then check if the file is allowed by the photogallery globals ! $imgtype = explode(",",$imgtypes); ! $continue = false; ! foreach($imgtype As $type){ ! $extension = substr($file,-3); ! if(strtoupper($extension) == strtoupper($type)){ ! $continue = true; ! continue; ! } } - - // If continue, which is set true/false above, is false then stop the loop for this image - if($continue){ ! // If the current loop if greater then three then create a new row and set value back to 1 ! if ($num > 3){ ! echo " </tr>\n <tr>\n"; ! $num = 1; ! } ! ! // Setup column for the next image echo " <td width='34%'><center><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'>"; // Check if there is a thumb available for this image, if so then use it or else preview the actual reduced image ! if(file_exists($dirlocate."/thumbs/".$file)){ ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/thumbs/".$file."'>"; ! }else{ ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/".$file."'>"; ! } // Add e-mail and image expand buttons as well as close column ! echo "</a><br><a href='email.php?PHOTO=$file&ID=".$_GET['ID']."'><img border='0' src=email.PNG alt='Email to a friend'></a> ! <img border='0' src='spacer.PNG'><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'><img border='0' alt='Enlarge' src='enlarge.PNG'></a> ! </center></td>\n"; ! ! // Add number for amount of images previewed ! $num++; ! $photo++; } } } ! // If no photos have been found then preview a no photos message if($photo == 0){ echo "<td> </td>\n <td><br><br>No photos in gallery!<br><br><br></td>\n <td> </td>\n </tr>"; } - ?> ! </table><br> ! The content within the galleries are copyright by the owners of this website.<br> ! In order to use or copy its content please contact the teams webmaster or team leader.</p> <?php include($footer); ?> --- 62,134 ---- // Begin reading the directory for images while(! (($file = readdir($dir)) === false)){ ! ! // If the directory is not a dir then continue the process if (! is_dir($dirlocate."/".$file)){ ! if ($num > 3){ ! echo "</tr><tr>"; ! $num = 1; ! } ! echo "<td width='34%'><center><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'>"; ! if(file_exists($dirlocate."/thumbs/".$file)){ ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/thumbs/".$file."'>"; ! } else { ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/".$file."'>"; ! } ! ! echo "</a><br><a href='email.php?PHOTO=".$dirlocate."/".$file."'><img border='0' src=email.PNG alt='Email to a friend'></a><img border='0' src='spacer.PNG'><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'><img border='0' alt='Enlarge' src='enlarge.PNG'> ! </a></center></a></td>"; ! ! // Explode file type then check if the file is allowed by the photogallery globals ! $imgtype = explode(",",$imgtypes); ! $continue = false; ! ! foreach($imgtype As $type){ ! $extension = substr($file,-3); ! if(strtoupper($extension) == strtoupper($type)){ ! $continue = true; ! continue; ! } } ! // If continue, which is set true/false above, is false then stop the loop for this image ! if($continue){ ! ! // If the current loop if greater then three then create a new row and set value back to 1 ! if ($num > 3){ ! echo " </tr>\n <tr>\n"; ! $num = 1; ! } ! ! // Setup column for the next image echo " <td width='34%'><center><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'>"; // Check if there is a thumb available for this image, if so then use it or else preview the actual reduced image ! if(file_exists($dirlocate."/thumbs/".$file)){ ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/thumbs/".$file."'>"; ! } else { ! echo "<img border='1px' height=100 width=152 src='".$dirlocate."/".$file."'>"; ! } // Add e-mail and image expand buttons as well as close column ! echo "</a><br><a href='email.php?PHOTO=$file&ID=".$_GET['ID']."'><img border='0' src=email.PNG alt='Email to a friend'></a> ! <img border='0' src='spacer.PNG'><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'><img border='0' alt='Enlarge' src='enlarge.PNG'></a> ! </center></td>\n"; ! ! // Add number for amount of images previewed ! $num++; ! $photo++; } } } ! // If no photos have been found then preview a no photos message if($photo == 0){ echo "<td> </td>\n <td><br><br>No photos in gallery!<br><br><br></td>\n <td> </td>\n </tr>"; } ?> ! </table> ! <p>The content within the galleries is copyright. ! In order to use or copy content contained within the galleries please contact the team's webmaster ! or leader.</p> <?php include($footer); ?> Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 22 Aug 2003 14:57:28 -0000 1.5 --- index.php 22 Aug 2003 15:49:12 -0000 1.6 *************** *** 32,43 **** include("admin/galleryglobals.php"); ! ?> ! <h2>View Galleries</h2>Welcome to the gallery viewer. Please select a gallery from the list below:<br><br> ! <table width="701" align="center"> ! <tr> ! <th valign="top"> <div align="center"> </div></th> ! <th><strong>Gallery Name</strong></th> ! <th> <div align="center"><strong>Description</strong></div></th> ! <th width="176"><b>Date</b></th> </tr> <?php --- 32,45 ---- include("admin/galleryglobals.php"); ! ?> ! <h2>View Galleries</h2> ! <p>Welcome to the gallery viewer. Please select a gallery from the list below:<br> ! </p> ! <table width="701"> ! <tr> ! <th> </th> ! <th>Gallery Name</th> ! <th>Description</th> ! <th width="176">Date</th> </tr> <?php *************** *** 49,56 **** ?> <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> ! <td width="61" valign="top"><div align="center"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></div></td> ! <td width="147" valign="top"><a href='gallery.php?ID=<?php echo $gallery->ID; ?>'><?php echo $gallery->GalleryName; ?></a></td> ! <td width="297" valign="top"><?php echo $gallery->Description; ?></td> ! <td width="176" valign="top"><?php echo date("F j, Y, g:i a",$gallery->Dates); ?></td> </tr> <?php --- 51,58 ---- ?> <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> ! <td width="61"><div align="center"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></div></td> ! <td width="147"><a href='gallery.php?ID=<?php echo $gallery->ID; ?>'><?php echo $gallery->GalleryName; ?></a></td> ! <td width="297"><?php echo $gallery->Description; ?></td> ! <td width="176"><?php echo date("F j, Y, g:i a",$gallery->Dates); ?></td> </tr> <?php *************** *** 59,68 **** // If there are no galleries then say there are none if (mysql_num_rows($query) == 0){ ! echo "<tr><td> </td><td><br>There are no galleries uploaded<br><br></td>"; } ?> </table> ! <p align="center">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> ! <?php include($footer); ?> \ No newline at end of file --- 61,71 ---- // If there are no galleries then say there are none if (mysql_num_rows($query) == 0){ ! echo "<tr><td>--</td><td><br>There are no galleries uploaded<br><br></td>"; } ?> </table> ! <p>The content within the galleries is copyright. ! In order to use or copy content contained within the galleries please contact the team's webmaster ! or leader.</p> ! <?php include($footer); ?> Index: photogallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/photogallery.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** photogallery.php 22 Aug 2003 14:57:28 -0000 1.3 --- photogallery.php 22 Aug 2003 15:49:12 -0000 1.4 *************** *** 33,50 **** function galleryimage($gallery,$image,$option = true,$height = "",$width = ""){ ! // Call global basepath variable for use in this function ! global $basepath; ! // If option is true then preview the image as a thumb else no thumb ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '$gallery'"); ! $thisgallery = mysql_fetch_object($query); ! if($option){ ! echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/thumbs/$image'></a>"; ! }else{ ! echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/$image'></a>"; ! } ! } ! ?> \ No newline at end of file --- 33,50 ---- function galleryimage($gallery,$image,$option = true,$height = "",$width = ""){ ! // Call global basepath variable for use in this function ! global $basepath; ! // If option is true then preview the image as a thumb else no thumb ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '$gallery'"); ! $thisgallery = mysql_fetch_object($query); ! if($option){ ! echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/thumbs/$image'></a>"; ! } else { ! echo "<a href='$basepath/photogallery/viewphoto.php?ID=$gallery&PHOTO=$image'><img border='0' alt='Gallery Image' height='$height' width='$width' src='$basepath/photogallery/gallery/$thisgallery->GalleryName/$image'></a>"; ! } ! } ! ?> Index: viewphoto.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/viewphoto.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** viewphoto.php 22 Aug 2003 14:57:28 -0000 1.6 --- viewphoto.php 22 Aug 2003 15:49:12 -0000 1.7 *************** *** 32,51 **** include($header); include("admin/galleryglobals.php"); ! // If a comment is being added then run process 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 a comment is being deleted then check if the user is looged in then delete if(ISSET($_GET['COMMENT'])){ --- 32,51 ---- include($header); include("admin/galleryglobals.php"); ! // If a comment is being added then run process 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 a comment is being deleted then check if the user is looged in then delete if(ISSET($_GET['COMMENT'])){ *************** *** 53,62 **** 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)); ! } } ! // Retrieve image data from the database $imgquery = mysql_query("SELECT * FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); --- 53,62 ---- 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)); ! } } ! // Retrieve image data from the database $imgquery = mysql_query("SELECT * FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); *************** *** 67,128 **** $gallery = mysql_fetch_object($query); ! ?> <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> ! <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" border="0"></a></td> <td width="80%"><?php if(mysql_num_rows($imgquery) == 0){ echo $_GET['PHOTO']; }else{ echo $image->ImageName; } ?></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> ! <?php ! // If there are values for the query then preview the image ! if(! mysql_num_rows($imgquery) == 0){ ! ?> ! <tr> ! <td valign="top"><div align="right"><strong>Description:</strong></div></td> <td><?php echo $image->Description; ?></td> </tr> ! <tr> ! <td valign="top"><div align="right"><strong>Date:</strong></div></td> <td><?php echo date("F j, Y, g:i a",$image->Dates); ?></td> </tr> ! <?php ! } ! ?> ! <tr> <td> </td> ! <td><a href="email.php?ID=<?php echo $_GET['ID']; ?>&PHOTO=<?php echo $_GET['PHOTO']; ?>">Send To A Friend</a></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> --- 67,128 ---- $gallery = mysql_fetch_object($query); ! ?> <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>Photo Information</th> <th>Photo</th> </tr> ! <tr> ! <td width="308"><table width="100%"> ! <tr> <td width="20%"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="gallery.PNG" border="0"></a></td> <td width="80%"><?php if(mysql_num_rows($imgquery) == 0){ echo $_GET['PHOTO']; }else{ echo $image->ImageName; } ?></td> </tr> ! <tr> ! <th>Gallery</th> <td><?php echo $gallery->GalleryName; ?></td> </tr> ! <tr> ! <th>Author</th> <td><?php echo $gallery->Author; ?></td> </tr> ! <?php ! // If there are values for the query then preview the image ! if(! mysql_num_rows($imgquery) == 0){ ! ?> ! <tr> ! <th>Description</th> <td><?php echo $image->Description; ?></td> </tr> ! <tr> ! <tth>Date</th> <td><?php echo date("F j, Y, g:i a",$image->Dates); ?></td> </tr> ! <?php ! } ! ?> ! <tr> <td> </td> ! <td><a href="email.php?ID=<?php echo $_GET['ID']; ?>&PHOTO=<?php echo $_GET['PHOTO']; ?>">Send To A Friend</a></td> </tr> </table> <table width="100%"> ! <tr> ! <th width="37%"><a href="gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="comment.PNG" width="23" height="25" border="0"></a></td> ! <th width="63%">You May Comment</td> </tr> ! <tr> ! <th>Name</th> <td><input name="name" type="text" id="name"></td> </tr> ! <tr> ! <th>E-Mail</th> <td><input name="email" type="text" id="email"></td> </tr> ! <tr> ! <th> </th> <td><textarea name="comment" id="comment"></textarea> <br> *************** *** 130,134 **** </tr> <tr> ! <td> </td> <td><input name="addcomment" type="submit" id="addcomment" value="Submit Comment"></td> </tr> --- 130,134 ---- </tr> <tr> ! <th> </th> <td><input name="addcomment" type="submit" id="addcomment" value="Submit Comment"></td> </tr> *************** *** 136,140 **** </form> </td> ! <td width="433" valign="top"> <?php --- 136,140 ---- </form> </td> ! <td width="433"> <?php *************** *** 149,189 **** <br> <table width="53%"> ! <tr> <th> </th> ! <th valign="top">Comments for this image:</th> </tr> <?php // Check if there are comments in the database $query = mysql_query("SELECT * FROM ofirst_photogallery_comments WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); ! ! // Run through the comments and display them ! while($comment = mysql_fetch_object($query)){ ?> <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> <td width="33%"><strong><?php echo $comment->Author; ?><br></strong><a href='mailto:<?php echo $comment->EMail; ?>'>E-Mail Now</a><br> ! <?php ! // If user is logged in then offer the option of deleting the comment ! 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 there are no values then preview no comments text ! 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); ?> --- 149,191 ---- <br> <table width="53%"> ! <tr> <th> </th> ! <th>Comments for this image:</th> </tr> <?php // Check if there are comments in the database $query = mysql_query("SELECT * FROM ofirst_photogallery_comments WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); ! ! // Run through the comments and display them ! while($comment = mysql_fetch_object($query)){ ?> <tr onMouseOver="this.style.backgroundColor='#cccccc'" onMouseOut="this.style.backgroundColor='#ffffff'" bgcolor="#ffffff"> <td width="33%"><strong><?php echo $comment->Author; ?><br></strong><a href='mailto:<?php echo $comment->EMail; ?>'>E-Mail Now</a><br> ! <?php ! // If user is logged in then offer the option of deleting the comment ! if(ISSET($user->user)){ ! echo "<a href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."&COMMENT=".$comment->ID."'>Delete</a>"; ! } ! ?></td> ! <td width="67%"> ! <?php if(function_exists("slur_block") { $comment = slur_block($comment->Comment); } ! if(function_exists("emoticon_translate") { $comment = emoticon_translate($comment->Comment); } ! echo ($comment->Comment); ?> ! </td> </tr> <?php } ! ! // If there are no values then preview no comments text ! 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 is copyright. ! In order to use or copy content contained within the galleries please contact the team's webmaster ! or leader.</p> <?php include($footer); ?> |