rendered paste body<?PHP session_start(); require("access.php"); ?><?php include("top2.php"); ?><?phpif(isset($_POST['submit'])) { $title2 = $_POST['title'];$title = strip_tags($title2);$description2 = $_POST['description'];$descripton = strip_tags($description2);$image_name2 = $_POST['image_name'];$image_name = strip_tags($image_name2);$year = date("Y");$month = date("m");$day = date("d");$hours2 = date("H");if ($hours2 == "00") {$hours = "10";}elseif ($hours2 == "01") {$hours = "11";}elseif ($hours2 == "02") {$hours = "00";}else {$hours = $hours2;};$time = date("$hours:i");if ( eregi('^image/p?jpeg(;.*)?$', $_FILES['UPFIELD']['type']) ) $extension = '.jpg'; else $extension = '.gif'; $Img = $image_name. $extension; $imgdir = "/home/gerbitzo/public_html/gallery_images/"; $imgfile = "http://www.gerbitz.org/gallery_images/".$Img; if (is_uploaded_file($_FILES['UPFIELD']['tmp_name']) and copy($_FILES['UPFIELD']['tmp_name'], $imgdir . $Img)) { echo("<p>Uploading your image as $Img.<P>"); } else { echo("<p>Could Not Save file as $Img<P>"); } $photo = $imgfile; mysql_query("insert into gallery(owner, short_title, title, description, image_loc, day, month, year, active ) values('$_SESSION[UserName]', 'image_name', '$description', '$photo', '$day', '$month', '$year', '0')");echo "Uploading your images now... Please Wait..... ";echo "<META HTTP-EQUIV=\"refresh\" content=\"2;URL=index2.php\">";} else {function gethint($name) { $q = mysql_query("SELECT Setting_Value from settings WHERE Setting_Name = '$name' LIMIT 0,1"); $r = mysql_fetch_row($q); return $r[0];}?><center> <strong>Select your image that you would like to add to your gallery. </strong><br></center><form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" enctype="multipart/form-data"> <table> <tr> <td><strong>Photo Name </strong> <div align="center"></div></td> <td><a href="" onMouseOver="return escape(' <?php echo gethint('hint_photo_upload'); ?> ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td><input name="image_name" type="text" size="45"></td> </tr> <tr> <td><div align="center"><strong>Title</strong></div></td> <td><a href="" onMouseOver="return escape(' <?php echo gethint('hint_photo_upload'); ?> ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td><input name="title" type="text" size="45"></td> </tr> <tr> <td><div align="center"> <p><strong>Description</strong></p> </div></td> <td><a href="" onMouseOver="return escape(' <?php echo gethint('hint_photo_upload'); ?> ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td><textarea name="description" cols="45" rows="8"></textarea></td> </tr> <tr> <td><div align="center"> <p><strong>Photo</strong></p> </div></td> <td><a href="" onMouseOver="return escape(' <?php echo gethint('hint_photo_upload'); ?> ')"><img width="15" alt="" src="images/small_help.gif" hspace="3" height="15" border="0"></a></td> <td><p> <input name="UPFIELD" type="file" size="35"> </p></td> </tr> <tr> <td><center><input type="submit" name="submit" value="Submit"></center><td> </tr></table></form><?php}?><?php include("bottom2.php"); ?>