''); $fldArray = array("patient_gynocology_id" => $id); $orderArray=array(); $orderType=''; $arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); $patient_gynocology_status=$arr[0]['patient_gynocology_status']; $patient_gynocology_last_modified=$arr[0]['patient_gynocology_last_modified']; $patient_gynocology_title=$arr[0]['patient_gynocology_title']; $patient_gynocology_content=dataPrepare($arr[0]['patient_gynocology_content']); $patient_gynocology_status=$arr[0]['patient_gynocology_status']; $patient_gynocology_file=$arr[0]['patient_gynocology_file']; $patient_gynocology_image=$arr[0]['patient_gynocology_image']; if($_POST['submit']=='Save') { $table=TABLE_PATIENT_GYNOCOLOGY; $hidden_patient_gynocology_id=$_REQUEST['hidden_patient_gynocology_id']; $patient_gynocology_status=trim(strip_tags($_POST['patient_gynocology_status'],ENT_QUOTES)); $patient_gynocology_last_modified=DATETIME; $patient_gynocology_title=trim(strip_tags($_POST['patient_gynocology_title'],ENT_QUOTES)); $patient_gynocology_content=dataPrepare($_REQUEST['patient_gynocology_content']); $patient_gynocology_stat=trim(strip_tags($_POST['patient_gynocology_status'],ENT_QUOTES)); if($patient_gynocology_status=='') { $patient_gynocology_status='Active'; } else { $patient_gynocology_status=$patient_gynocology_stat; } $dataArray = array("patient_gynocology_status"=>$patient_gynocology_status,"patient_gynocology_last_modified"=>$patient_gynocology_last_modified,"patient_gynocology_title"=>$patient_gynocology_title,"patient_gynocology_content"=>$patient_gynocology_content,"patient_gynocology_status"=>$patient_gynocology_status); if($patient_gynocology_title!='' && $patient_gynocology_content!='') { /*Edit*/ if($hidden_patient_gynocology_id!='') { $fldArray = array("patient_gynocology_id" => $hidden_patient_gynocology_id); dataUpdate($table,$dataArray,$fldArray); $fileElementName = 'patient_gynocology_file'; if($_FILES[''.$fileElementName.'']['tmp_name']!='') { $msg = ""; //$idc=base64_decode(base64_decode($_SESSION[session_id()]['press_id'])); $table=TABLE_PATIENT_GYNOCOLOGY; $sql_del="delete from ".$table." where patient_gynocology_id='".$id."'"; $fileTempName=$_FILES[''.$fileElementName.'']['tmp_name']; $fileName=$_FILES[''.$fileElementName.'']['name']; $imginfo = pathinfo($fileName); $imgExt=$imginfo["extension"]; if(empty($_FILES['patient_gynocology_file']['tmp_name']) || $_FILES['patient_gynocology_file']['tmp_name'] == 'none'){ mysql_query($sql_del); $error = 'No File was uploaded'; }elseif($_SESSION[$_REQUEST['ssid']]['id']!=$_SESSION[session_id()]['id']){ mysql_query($sql_del); }elseif($imgExt!='pdf'){ mysql_query($sql_del); $error = "Allowed File Types : pdf
Your File Type : ".$imgExt; }else{ $fileName=$_FILES['patient_gynocology_file']['name']; $oldfileName=''; $fileSize=filesize($_FILES['patient_gynocology_file']['tmp_name']); $fileTempName=$_FILES['patient_gynocology_file']['tmp_name']; $folderPath="../".PATIENT_GYNOCOLOGY_FILE_PATH; $maxSize=20480000; //$codeArr=fileUpload($fileName,$oldfileName,$fileSize,$fileTempName,$folderPath,$maxSize,$imgExt); $codeArr=press_fileUpload($fileName,$oldfileName,$fileSize,$fileTempName,$folderPath,$maxSize,$imgExt); $dataArray=array("patient_gynocology_file"=>$codeArr[1]); $fldArray=array("patient_gynocology_id"=>$hidden_patient_gynocology_id); dataUpdate($table,$dataArray,$fldArray); } } redirect('show_patient_gynocology.php'); /***********image upload*************/ } } else { if($patient_gynocology_content=='') { $error= NO_DESC; } if($patient_gynocology_title=='') { $error= NO_TITLE; } } } ?>
Edit Patients gynocology
Date Time
Title
Description show(); ?>
   
Upload Pdf
Status