", "\n", $newsletters_desc); $newsletters_date=dataPrepare($_REQUEST['newsletters_date']); $newsletters_status=dataPrepare($_REQUEST['newsletters_status']); $hidden_file=dataPrepare($_REQUEST['hidden_image']); $dataArray = array("newsletters_title" => $newsletters_title, "newsletters_date"=>$newsletters_date, "newsletters_desc" => $newsletters_desc, "newsletters_status" => $newsletters_status); $fldArray = array("newsletters_id" => $newsletters_id); dataUpdate($table,$dataArray,$fldArray); //var_dump($up_id);exit; //for image if($_FILES['newsletters_image']['tmp_name']!='' && isset($_FILES['newsletters_image']['tmp_name'])) { $table=TABLE_NEWSLETTER; $oldfileName=$hidden_file; $fileName=$_FILES['newsletters_image']['name']; $fileSize=filesize($_FILES['newsletters_image']['tmp_name']); $fileTempName=$_FILES['newsletters_image']['tmp_name']; $folderPath="../".NEWSLETTERS_IMAGE_PATH; $maxSize=20480000; $width=''; $height=''; $tFlag=1; $folderT=THUMB; $widthT=NEWSLETTERS_THUMB_WIDTH; $heightT=NEWSLETTERS_THUMB_HEIGHT; $f_width=20; $f_height=20; $logoUpload=false; list($widthI, $heightI, $type, $attr) = getimagesize($fileTempName); $imginfo = pathinfo($fileName); $imgExt=$imginfo["extension"]; if($imgExt!='png' && $imgExt!='x-png' && $imgExt!='jpg' && $imgExt!='jpeg' && $imgExt!='gif' && $imgExt!='bmp' && $imgExt!='PNG' && $imgExt!='JPG' && $imgExt!='JPEG' && $imgExt!='GIF' && $fileName!=''){ $error = "Allowed File Types : png, jpg, gif
Your File Type : ".$imgExt; }else{ $codeArr=imageUpload($fileName,$oldfileName,$fileSize,$fileTempName,$folderPath,$maxSize=20480000,$width,$height,$tFlag,$folderT,$widthT,$heightT,$f_width,$f_height,$logoUpload=false); $dataArray=array("newsletters_image"=>$codeArr[1]); $fldArray=array("newsletters_id"=>$newsletters_id); dataUpdate($table,$dataArray,$fldArray); } } //for image //for pdf if($_FILES['newsletters_file']['name']!='') { if($_REQUEST['hidden_file']!=''){ $hidden_file=$_REQUEST['hidden_file']; } $fileTempName=$_FILES['newsletters_file']['tmp_name']; $fileName=$_FILES['newsletters_file']['name']; $imginfo = pathinfo($fileName); $imgExt=$imginfo["extension"]; $table=TABLE_NEWSLETTER; //$oldfileName=$hidden_file; $fileSize=filesize($_FILES['newsletters_file']['tmp_name']); $fileTempName=$_FILES['newsletters_file']['tmp_name']; $folderPath="../".NEWSLETTERS_FILE_PATH; $maxSize=20480000; if($imgExt!='pdf'){ $error = "Allowed File Types : pdf
Your File Type : ".$fileName; }else{ $codeArr=press_fileUpload($fileName,$fileName,$fileSize,$fileTempName,$folderPath,$maxSize,$imgExt); $dataArray=array("newsletters_file"=>$codeArr[1]); $fldArray=array("newsletters_id"=>$newsletters_id); dataUpdate($table,$dataArray,$fldArray); } } //for pdf reDirect('show_newsletters.php'); } if(isset($_REQUEST['id'])){ $id=$_REQUEST['id']; }else{ reDirect('show_newsletters.php'); } $table=TABLE_NEWSLETTER; $dataArray = array("*" => ''); $fldArray = array("newsletters_id" => $id); $orderArray=array(); $orderType=''; $arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); $newsletters_title=$arr[0]['newsletters_title']; $newsletters_desc=$arr[0]['newsletters_desc']; $newsletters_status=$arr[0]['newsletters_status']; $newsletters_image=$arr[0]['newsletters_image']; $newsletters_file=$arr[0]['newsletters_file']; $newsletters_date=$arr[0]['newsletters_date']; ?>
Edit Newsletter
Title
Year
Newsletter Body
">
show(); ?>
Status
Upload Image
Image Dimensions Must Be 145px X 127px
Upload Pdf