[Openfirst-cvscommit] photogallery/admin cleargallery.php,1.6,1.7 editphoto.php,1.4,1.5 edit.php,1.6
Brought to you by:
xtimg
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv30207/admin Modified Files: cleargallery.php editphoto.php edit.php index.php makethumb.php newgallery.php upload.php Log Message: Change include to include_once so that scripts may be easily included from other scripts without problems. Index: cleargallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/cleargallery.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** cleargallery.php 23 Aug 2003 20:32:49 -0000 1.6 --- cleargallery.php 13 Oct 2003 18:00:24 -0000 1.7 *************** *** 28,39 **** // Include important globals related to this module ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user)){ showlogin(); ! die(include($footer)); } --- 28,39 ---- // Include important globals related to this module ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user)){ showlogin(); ! die(include_once($footer)); } *************** *** 60,64 **** } echo "<br><br><center>The <b>".$gallery->GalleryName."</b> gallery has been reset. [ <a href='index.php'>Manage</a> ]<br><br>"; ! die(include($footer)); } --- 60,64 ---- } echo "<br><br><center>The <b>".$gallery->GalleryName."</b> gallery has been reset. [ <a href='index.php'>Manage</a> ]<br><br>"; ! die(include_once($footer)); } *************** *** 68,70 **** ?><p> 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> ! <?php include($footer); ?> --- 68,70 ---- ?><p> 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> ! <?php include_once($footer); ?> Index: editphoto.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/editphoto.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** editphoto.php 23 Aug 2003 20:32:49 -0000 1.4 --- editphoto.php 13 Oct 2003 18:00:26 -0000 1.5 *************** *** 28,39 **** // Import globals and estbalish database connection ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include($footer)); } --- 28,39 ---- // Import globals and estbalish database connection ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include_once($footer)); } *************** *** 89,93 **** } echo " [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; ! die(include($footer)); } --- 89,93 ---- } echo " [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; ! die(include_once($footer)); } *************** *** 96,100 **** ofirst_dbquery("DELETE FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); echo "<br><br>The description of this image has been removed! [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; ! die(include($footer)); } --- 96,100 ---- ofirst_dbquery("DELETE FROM ofirst_photogallery_image WHERE Gallery = '".$_GET['ID']."' AND Image = '".$_GET['PHOTO']."'"); echo "<br><br>The description of this image has been removed! [ <a href='editphoto.php?ID=".$_GET['ID']."&PHOTO=".$_GET['PHOTO']."'>Manage</a> ]<br><br>"; ! die(include_once($footer)); } *************** *** 165,168 **** </form> <?php ! include($footer); ?> --- 165,168 ---- </form> <?php ! include_once($footer); ?> Index: edit.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/edit.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** edit.php 23 Aug 2003 20:32:49 -0000 1.6 --- edit.php 13 Oct 2003 18:00:27 -0000 1.7 *************** *** 28,39 **** // Include important globals related to this module ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); // Check if user is an admin then allow processes if(! ISSET($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include($footer)); } --- 28,39 ---- // Include important globals related to this module ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); // Check if user is an admin then allow processes if(! ISSET($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include_once($footer)); } *************** *** 41,45 **** if(ISSET($_GET['DELETE']) == true && isset($_GET["CONFIRMED"]) == false) { echo("<p>Are you absolutely sure you want to delete this gallery? All pictures in the gallery will be removed from the server.</p> <a href='edit.php?DELETE=" . $_GET["DELETE"] . "&CONFIRMED=1'>Yes, I am sure</a> <a href='edit.php'>No, I've changed my mind</a>"); ! die(include($footer)); } elseif(isset($_GET["DELETE"]) == true && isset($_GET["CONFIRMED"]) == true) { $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); --- 41,45 ---- if(ISSET($_GET['DELETE']) == true && isset($_GET["CONFIRMED"]) == false) { echo("<p>Are you absolutely sure you want to delete this gallery? All pictures in the gallery will be removed from the server.</p> <a href='edit.php?DELETE=" . $_GET["DELETE"] . "&CONFIRMED=1'>Yes, I am sure</a> <a href='edit.php'>No, I've changed my mind</a>"); ! die(include_once($footer)); } elseif(isset($_GET["DELETE"]) == true && isset($_GET["CONFIRMED"]) == true) { $query = ofirst_dbquery("SELECT * FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); *************** *** 74,78 **** ofirst_dbquery("DELETE FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); echo "<br><br><center>The gallery has been deleted! [ <a href='index.php'>Manage</a> ]</center><br>"; ! die(include($footer)); } --- 74,78 ---- ofirst_dbquery("DELETE FROM ofirst_photogallery_galleries WHERE ID = '".$_GET['DELETE']."'") or die(ofirst_dberror()); echo "<br><br><center>The gallery has been deleted! [ <a href='index.php'>Manage</a> ]</center><br>"; ! die(include_once($footer)); } *************** *** 161,163 **** <br> </center> ! <?php include($footer); ?> \ No newline at end of file --- 161,163 ---- <br> </center> ! <?php include_once($footer); ?> \ No newline at end of file Index: index.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/index.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** index.php 23 Aug 2003 20:32:49 -0000 1.6 --- index.php 13 Oct 2003 18:00:27 -0000 1.7 *************** *** 28,39 **** // Import globals and estbalish database connection ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include($footer)); } --- 28,39 ---- // Import globals and estbalish database connection ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); // Check if user is an admin then allow processes if(! isset($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include_once($footer)); } *************** *** 76,79 **** </p> <?php ! include($footer); ?> --- 76,79 ---- </p> <?php ! include_once($footer); ?> Index: makethumb.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/makethumb.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** makethumb.php 26 Aug 2003 03:22:54 -0000 1.6 --- makethumb.php 13 Oct 2003 18:00:27 -0000 1.7 *************** *** 28,35 **** // Import globals and estbalish database connection ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); ! include("preview.php"); // Check if user is an admin then allow processes --- 28,35 ---- // Import globals and estbalish database connection ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); ! include_once("preview.php"); // Check if user is an admin then allow processes *************** *** 39,43 **** echo("<p>Cannot create thumbnails because your version of PHP was not compiled with GD support. [ <a href='index.php'>Manage</a> ]</p>"); ! die(include($footer)); } --- 39,43 ---- echo("<p>Cannot create thumbnails because your version of PHP was not compiled with GD support. [ <a href='index.php'>Manage</a> ]</p>"); ! die(include_once($footer)); } *************** *** 51,55 **** makethumb($dirlocate,$_GET['PHOTO'],$imgtypes); echo "<p>Thumbnail created! [ <a href='edit.php?ID=".$_GET['ID']."'>Edit</a> ]</p>"; ! die(include($footer)); } --- 51,55 ---- makethumb($dirlocate,$_GET['PHOTO'],$imgtypes); echo "<p>Thumbnail created! [ <a href='edit.php?ID=".$_GET['ID']."'>Edit</a> ]</p>"; ! die(include_once($footer)); } *************** *** 64,68 **** } echo "<p>Thumbnails created for gallery! [ <a href='edit.php?ID=".$_GET['ID']."'>Edit</a> ]</p>"; ! die(include($footer)); } --- 64,68 ---- } echo "<p>Thumbnails created for gallery! [ <a href='edit.php?ID=".$_GET['ID']."'>Edit</a> ]</p>"; ! die(include_once($footer)); } *************** *** 70,73 **** showlogin(); } ! include($footer); ?> --- 70,73 ---- showlogin(); } ! include_once($footer); ?> Index: newgallery.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/newgallery.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** newgallery.php 24 Aug 2003 15:34:47 -0000 1.7 --- newgallery.php 13 Oct 2003 18:00:27 -0000 1.8 *************** *** 28,38 **** // Import globals and estbalish database connection ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); if(! isset($user->user)){ showlogin(); ! die(include($footer)); } --- 28,38 ---- // Import globals and estbalish database connection ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); if(! isset($user->user)){ showlogin(); ! die(include_once($footer)); } *************** *** 48,52 **** '".$_POST['description']."')"); echo "<br><br><center>New gallery added! [ <a href='index.php'>Manage</a> ]</center><br><br>"; ! die(include($footer)); } --- 48,52 ---- '".$_POST['description']."')"); echo "<br><br><center>New gallery added! [ <a href='index.php'>Manage</a> ]</center><br><br>"; ! die(include_once($footer)); } *************** *** 80,83 **** </form> <?php ! include($footer); ?> --- 80,83 ---- </form> <?php ! include_once($footer); ?> Index: upload.php =================================================================== RCS file: /cvsroot/openfirst/photogallery/admin/upload.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** upload.php 23 Aug 2003 20:32:49 -0000 1.8 --- upload.php 13 Oct 2003 18:00:28 -0000 1.9 *************** *** 28,39 **** // Import globals and estbalish database connection ! include("../../config/globals.php"); ! include($header); ! include("galleryglobals.php"); // Check if user is an admin then allow processes if(! ISSET($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include($footer)); } --- 28,39 ---- // Import globals and estbalish database connection ! include_once("../../config/globals.php"); ! include_once($header); ! include_once("galleryglobals.php"); // Check if user is an admin then allow processes if(! ISSET($user->user) || $user->membertype != "administrator"){ showlogin(); ! die(include_once($footer)); } *************** *** 115,117 **** <input name="upload" type="submit" value="Upload To Gallery"> </form> ! <?php include($footer); ?> \ No newline at end of file --- 115,117 ---- <input name="upload" type="submit" value="Upload To Gallery"> </form> ! <?php include_once($footer); ?> \ No newline at end of file |