[Openfirst-cvscommit] photogallery/admin newgallery.php,1.2,1.3 index.php,1.2,1.3 cleargallery.php,1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-08-22 02:41:54
|
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv19766 Modified Files: newgallery.php index.php cleargallery.php Log Message: Changes made to basic code placement. Index: newgallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/newgallery.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** newgallery.php 20 Aug 2003 19:04:07 -0000 1.2 --- newgallery.php 21 Aug 2003 17:53:12 -0000 1.3 *************** *** 32,37 **** include("galleryglobals.php"); ! // Check if user is an admin then allow processes ! if (isset($user->user)){ // Check if user initiates create option and run create options --- 32,39 ---- include("galleryglobals.php"); ! if(! ISSET($user->user)){ ! showlogin(); ! die(include($footer)); ! } // Check if user initiates create option and run create options *************** *** 81,89 **** </form> <?php - - }else{ - showlogin(); - } include($footer); - ?> --- 83,86 ---- Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/index.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** index.php 20 Aug 2003 19:04:07 -0000 1.2 --- index.php 21 Aug 2003 17:53:12 -0000 1.3 *************** *** 32,37 **** include("galleryglobals.php"); ! // Check if user is an admin then allow processes ! if (isset($user->user)){ ?> --- 32,39 ---- include("galleryglobals.php"); ! if(! ISSET($user->user)){ ! showlogin(); ! die(include($footer)); ! } ?> *************** *** 42,50 **** <tr> <th valign="top"> <div align="center"> </div></td> ! <th><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Gallery Name</strong></font></th> ! <th><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Description</font></strong></th> ! <th> <div align="left"><strong><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Option</font></strong></div></th> </tr> ! <?php // Retrieve galleries from database and list them accordingly --- 44,53 ---- <tr> <th valign="top"> <div align="center"> </div></td> ! ! <th><strong>Gallery Name</strong></th> ! <th><strong>Description</strong></th> ! <th> <div align="left"><strong>Option</strong></div></th> </tr> ! <?php // Retrieve galleries from database and list them accordingly *************** *** 54,61 **** ?> <tr> ! <td width="58" 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="145" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->GalleryName; ?></font></td> ! <td width="307" valign="top"><font size="2" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $gallery->Description; ?></font></td> ! <td width="75" valign="top">[ <a href="edit.php?ID=<?php echo $gallery->ID; ?>">Edit</a> ]<br> [ <a href="edit.php?DELETE=<?php echo $gallery->ID; ?>">Delete</a> ]</td> </tr> --- 57,65 ---- ?> <tr> ! <td width="58" valign="top"><a href="../gallery.php?ID=<?php echo $gallery->ID; ?>"><img src="../gallery.PNG" width="58" height="51" border="0"></a></td> ! <td width="145" valign="top"><?php echo $gallery->GalleryName; ?></td> ! <td width="307" valign="top"><?php echo $gallery->Description; ?></td> ! <td width="75" valign="top">[ <a href="edit.php?ID=<?php echo $gallery->ID; ?>">Edit</a> ! ]<br> [ <a href="edit.php?DELETE=<?php echo $gallery->ID; ?>">Delete</a> ]</td> </tr> *************** *** 69,79 **** ?> </table> ! <br> ! </p> <p align="center"> </p> <?php - }else{ - showlogin(); - } include($footer); ! ?> \ No newline at end of file --- 73,79 ---- ?> </table> ! <br></p> <p align="center"> </p> <?php include($footer); ! ?> Index: cleargallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/cleargallery.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** cleargallery.php 20 Aug 2003 19:04:07 -0000 1.2 --- cleargallery.php 21 Aug 2003 17:53:12 -0000 1.3 *************** *** 26,47 **** * */ ! ! // Import globals and estbalish database connection include("../../config/globals.php"); include($header); include("galleryglobals.php"); ! mysql_select_db($sqldatabase,$sqlconnection); ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); $gallery = mysql_fetch_object($query); // Check if user initiates the confirm of clearing the gallery if (ISSET($_GET['CONFIRM'])){ ! $dirlocate = $gallerydir.$gallery->GalleryName; $dir = opendir($dirlocate); ! while(! (($file = readdir($dir)) === false)){ if (is_file($dirlocate."/".$file)){ unlink($dirlocate."/".$file); --- 26,51 ---- * */ ! include("../../config/globals.php"); include($header); include("galleryglobals.php"); ! if(! ISSET($user->user)){ ! showlogin(); ! die(include($footer)); ! } ! $query = mysql_query("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['ID']."'"); $gallery = mysql_fetch_object($query); // Check if user initiates the confirm of clearing the gallery + if (ISSET($_GET['CONFIRM'])){ ! $dirlocate = "../".$gallerydir.$gallery->GalleryName; $dir = opendir($dirlocate); ! while(! (($file = readdir($dir) === false)){ ! if (is_file($dirlocate."/".$file)){ unlink($dirlocate."/".$file); *************** *** 50,56 **** } } ! echo "<br><br><center>The <b>".$gallery->GalleryName."</b> gallery has been reset. [ <a href='manage.php'>Manage</a> ]"; die(include($footer)); } } --- 54,61 ---- } } ! echo "<br><br><center>The <b>".$gallery->GalleryName."</b> gallery has been reset. [ <a href='index.php'>Manage</a> ]<br><br>"; die(include($footer)); } + } *************** *** 58,66 **** ?> <br><br><br> <br> You are trying to clear the entire <b><?php echo $gallery->GalleryName; ?></b> ! gallery! <a href="cleargallery.php?ID=<?php echo $_GET['ID']; ?>&CONFIRM=True">Confirm</a></p> ! <br> ! <br> ! <br> ! <br> ! <br> <?php include($footer); ?> --- 63,66 ---- ?> <br><br><br> <br> You are trying to clear the entire <b><?php echo $gallery->GalleryName; ?></b> ! gallery! <a href="cleargallery.php?ID=<?php echo $_GET['ID']; ?>&CONFIRM=True">Confirm</a></p><br><br><br><br><br> <?php include($footer); ?> |