function main() { include "config.php"; $main_type='Exhibition'; extract($_REQUEST); $type=$_REQUEST['type']; $Addeddate=date('Y-m-d h:i:s',time()); // to upload images in folder and image path in table $filename1 = $_FILES['image']['name']; $filesize1 = $_FILES['image']['size']; $ext1 = strtolower(substr(strrchr($filename1, "."), 1)); $image_size1 = ($filesize1 / 1024); if($filename1 != '') { if($ext1 == 'jpg' or $ext1 == 'jpeg' or $ext1 == 'gif' or $ext1 == 'png') { $path1 = $txtcity.'_'.time().'_'.str_replace(" ","_",$filename1); $image_path1 = "exhibition-images/".$path1; $bikeup_path1 = "exhibition-images/".$path1; copy($_FILES['image']['tmp_name'],$image_path1); chmod($image_path1,0777); } } // image upload ends if($Submit=='Upload') { if(empty($_SESSION['letters_code'] ) || strcasecmp($_SESSION['letters_code'], $_POST['letters_code']) != 0) { //Note: the captcha code is compared case insensitively. //if you want case sensitive match, update the check above to // strcmp() ?> } else { //inserting added values to boutique table $boutique_add=mysql_query("insert into `exhibitionidea` (`ex_id`,`main_type`,`type`,`name`,`class`,`medium_used`,`school`,`contact`,`email`,`video`,`main_image`,`main_image_caption`,`title`,`image1`,`image2` , `image3` , `image4` , `image5` , `image6` , `image7` , `image8`, `image9` , `image10` , `status` , `get_date` , `approved_date`) values ('' ,'$main_type' ,'$type','$name' , '$class', '$medium_used' , '$school','$contact' , '$email' ,'' , '$image_path1','$description' , '' ,'','','','','','','','','','', 'I' , '$Addeddate' , '')"); if($boutique_add) { ?> } else echo "Cant add details.Try again."; } } /*--------------------------------pagination------------------------*/ include "exhibition-pagination.php"; $entries_per_page=9; $page = (isset($_GET['page'])?$_GET['page']:1); $result = mysql_query("select * from exhibitionidea where status = 'A' and type='$type' order by ex_id desc"); $num_rows = mysql_num_rows($result); $total_pages = ceil($num_rows/$entries_per_page); $pagination = pagination_six($total_pages,$page); $offset = (($page * $entries_per_page) - $entries_per_page); ?>
Home » Exhibition details » |