[Openfirst-cvscommit] photogallery gallery.php,1.1.1.1,1.2 index.php,1.1.1.1,1.2
Brought to you by:
xtimg
From: <dav...@us...> - 2003-06-01 22:54:54
|
Update of /cvsroot/openfirst/photogallery In directory sc8-pr-cvs1:/tmp/cvs-serv29542 Modified Files: gallery.php index.php Log Message: gallery.php and index.php are now completely written to allow for gallery viewing. Index: gallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/gallery.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** gallery.php 1 Jun 2003 04:17:15 -0000 1.1.1.1 --- gallery.php 1 Jun 2003 22:54:49 -0000 1.2 *************** *** 1,5 **** <?php /* ! * openFIRST.photogallery - index.php * * Copyright (C) 2003, --- 1,5 ---- <?php /* ! * openFIRST.photogallery - gallery.php * * Copyright (C) 2003, *************** *** 26,42 **** * */ - include("../config/globals.php"); - include($header); - include("galleryglobals.php"); ! mysql_select_db($sqldatabase,$sqlconnection); ! if(! ISSET($_GET['MAX']) && ! ISSET($_GET['MIN'])){ ! $min = 0; ! $max = 9; ! }else{ ! $min = $_GET['MIN']; ! $max = $_GET['MAX']; ! } ?> --- 26,43 ---- * */ ! include("../config/globals.php"); ! include($header); ! include("galleryglobals.php"); ! mysql_select_db($sqldatabase,$sqlconnection); ! ! if(! ISSET($_GET['MAX']) && ! ISSET($_GET['MIN'])){ ! $min = 0; ! $max = 9; ! }else{ ! $min = $_GET['MIN']; ! $max = $_GET['MAX']; ! } ?> *************** *** 54,63 **** </tr> <?php - $query = mysql_query("SELECT * FROM ofirst_galleries WHERE ID = '".$_GET['ID']."'"); - $gallery = mysql_fetch_object($query); ! if (! is_dir($gallerydir.$gallery->GalleryName)){ ! die("<h2><br><br><center>Gallery not setup!</h2><br>"); ! } ?> --- 55,65 ---- </tr> <?php ! $query = mysql_query("SELECT * FROM ofirst_galleries WHERE ID = '".$_GET['ID']."'"); ! $gallery = mysql_fetch_object($query); ! ! if (! is_dir($gallerydir.$gallery->GalleryName)){ ! die("<h2><br><br><center>Gallery not setup!</h2><br>"); ! } ?> *************** *** 68,86 **** <td width="185" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->Date; ?></font></td> </tr> - <?php - - $dirlocate = $gallerydir.$gallery->GalleryName; - $dir = opendir($dirlocate); - - while(! (($file = readdir($dir)) === false)){ - if (! is_dir($dirlocate."/".$file)){ - echo "<img height=40 width=30 src=".$dirlocate."/".$file.">"; - } - } - ?> </table> <div align="center"> ! <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><b>Current ! Pictures <?php echo $min."-".$max; ?> / <?php echo $gallery->NumPhotos; ?> Total</b></font><br> <br> </p> --- 70,76 ---- <td width="185" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->Date; ?></font></td> </tr> </table> <div align="center"> ! <p><font size="2" face="Verdana, Arial, Helvetica, sans-serif"></font><br> <br> </p> *************** *** 88,120 **** <div align="center"></div> <table width="75" border="0" align="center" cellpadding="5" cellspacing="0"> - <tr> - <td width="34%"><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td width="34%"><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td width="32%"><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - </tr> - <tr> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - </tr> - <tr> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - <td><div align="center"><img src="gallery/funnies/A000010.jpg" width="162" height="112"></div></td> - </tr> - </table> - <p align="center"> - <form action="gallery.php" method="GET"> - <input type="hidden" value="<?php echo $_GET['ID']; ?>" name="ID"> <?php ! if ($min < 0){ ! echo "<a href=gallery.php?ID=".$_GET['ID']."&MIN=".($min-9)."&MAX=".$min."><- Previous</a>"; ! } ! ! if ($max < $gallery->NumPhotos){ ! echo "<a href=gallery.php?ID=".$_GET['ID']."&MIN=".$max."&MAX=".($max+9).">Next -></a>"; ! } ?> ! </form> </p> <p align="center"><font size="2">The content within the galleries are copyright --- 78,102 ---- <div align="center"></div> <table width="75" border="0" align="center" cellpadding="5" cellspacing="0"> <?php ! ! $dirlocate = $gallerydir.$gallery->GalleryName; ! $dir = opendir($dirlocate); ! ! $num = 1; ! echo "<tr>"; ! while(! (($file = readdir($dir)) === false)){ ! if (! is_dir($dirlocate."/".$file)){ ! if ($num > 3){ ! echo "</tr><tr>"; ! $num = 1; ! } ! echo "<td width='34%'><a target='_blank' href='viewphoto.php?ID=".$_GET['ID']."&PHOTO=".$file."'><center><img height=100 width=152 src=".$dirlocate."/".$file."></center></a></td>"; ! $num++; ! } ! } ! ?> ! </table> ! <p align="center"> </p> <p align="center"><font size="2">The content within the galleries are copyright Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/index.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** index.php 1 Jun 2003 04:17:15 -0000 1.1.1.1 --- index.php 1 Jun 2003 22:54:49 -0000 1.2 *************** *** 26,34 **** * */ - include("../config/globals.php"); - include($header); - include("galleryglobals.php"); ! mysql_select_db($sqldatabase,$sqlconnection); ?> --- 26,35 ---- * */ ! include("../config/globals.php"); ! include($header); ! include("galleryglobals.php"); ! ! mysql_select_db($sqldatabase,$sqlconnection); ?> *************** *** 43,52 **** <td> <div align="center"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Description</font></strong></div></td> </tr> - - - <?php ! $query = mysql_query("SELECT * FROM ofirst_galleries"); ! while($gallery = mysql_fetch_object($query)){ ?> <tr> --- 44,52 ---- <td> <div align="center"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Description</font></strong></div></td> </tr> <?php ! ! $query = mysql_query("SELECT * FROM ofirst_galleries"); ! while($gallery = mysql_fetch_object($query)){ ! ?> <tr> *************** *** 56,63 **** </tr> <?php ! } ! if (mysql_num_rows($query) == 0){ ! echo "<tr><td>--</td><td><br>There are no galleries uploaded<br><br></td>"; ! } ?> </table> --- 56,65 ---- </tr> <?php ! } ! ! if (mysql_num_rows($query) == 0){ ! echo "<tr><td>--</td><td><br>There are no galleries uploaded<br><br></td>"; ! } ! ?> </table> |