Thread: [Openfirst-cvscommit] photogallery/admin galleryglobals.php,NONE,1.1 newgallery.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-08-20 17:49:46
|
Update of /cvsroot/openfirst/photogallery/admin In directory sc8-pr-cvs1:/tmp/cvs-serv8128 Added Files: galleryglobals.php newgallery.php Log Message: initial upload --- NEW FILE: galleryglobals.php --- <?php /* * openFIRST.photogallery - galleryglobals.php * * Copyright (C) 2003, * openFIRST Project * Original Author: David Di Biase <dav...@ea...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Declare gallery location compared to galleryglobals.php $gallerydir = "gallery/"; //Declare image types allowed for uploading/previewing $imgtypes = "gif,jpg,peg,png,bmp"; // Note that any extensions that you have beyond // 4 characters must be added to this variable // only as the last three digits. ie. jpeg = peg // Declare maximum execution time for the galleries $gallery_execution_time = "1200"; // Declare SMTP to use when sending photo's by e-mail $SMTP = "smtp.localhost.com"; ?> --- NEW FILE: newgallery.php --- <?php /* * openFIRST.photogallery - newgallery.php * * Copyright (C) 2003, * openFIRST Project * Original Author: David Di Biase <dav...@ea...> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Import globals and estbalish database connection include("../config/globals.php"); include($header); include("galleryglobals.php"); mysql_select_db($sqldatabase,$sqlconnection); // Check if user is an admin then allow processes if (isset($user->user)){ // Check if user initiates create option and run create options if(ISSET($_POST['create'])){ mkdir($gallerydir.$_POST['galleryname'],0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); mkdir($gallerydir.$_POST['galleryname']."/thumbs",0777) or die("<br><br><center>Can't create folder! [ <a href='manage.php'>Manage</a> ]"); mysql_query("INSERT INTO ofirst_galleries (GalleryName, Author, Date, Description) values( '".$_POST['galleryname']."' ,'".$_POST['author']."' ,'".time()."' ,'".$_POST['description']."')") or die(mysql_error()); die("<br><br><center>New gallery added! [ <a href='manage.php'>Manage</a> ]</center>"); } ?> <h2>New Gallery</h2> <p><a href="manage.php">Manager</a> <a href="newgallery.php">Add New Gallery</a><?php membersmenu($user->membertype); ?></p> <form method="POST" action="newgallery.php"> <table width="499" 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"><strong>Gallery Name</strong></font></td> </tr> <tr> <td width="135" valign="top"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Gallery Name:</font></div></td> <td width="275" valign="top"><input name="galleryname" type="text" id="galleryname"></td> </tr> <tr> <td valign="top"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Author:</font></div></td> <td valign="top"><font size="2"> <input name="author" type="text" id="author"> (Temporarily an option until openfirst.members is released)</font></td> </tr> <tr> <td valign="top"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Date:</font></div></td> <td valign="top"><?php echo date("F j, Y, g:i a",time()); ?></td> </tr> <tr> <td valign="top"><div align="right"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">Description:</font></div></td> <td valign="top"> <textarea name="description" cols="40" rows="10" id="description"></textarea></td> </tr> <tr> <td valign="top"> </td> <td valign="top"><input name="create" type="submit" id="create" value="Create Gallery"></td> </tr> </table> </form> <?php }else{ showlogin(); } include($footer); ?> |