''); $fldArray = array("case_id" => $id); $orderArray=array(); $orderType=''; $arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); $case_status=$arr[0]['case_status']; $case_last_modified=$arr[0]['case_last_modified']; $case_title=$arr[0]['case_title']; $case_caption=$arr[0]['case_caption']; $case_content=$arr[0]['case_content']; $case_status=$arr[0]['case_status']; $case_image=$arr[0]['case_image']; $case_header=$arr[0]['case_type']; $case_url=$arr[0]['case_url']; $case_parent=$arr[0]['case_parent']; $case_id=$arr[0]['case_id']; $case_page=$arr[0]['case_page']; /*************array of parent****************************/ $parent_array[]=$case_parent; $count=$case_parent; for($i=$count;$i>0;$i--) { if($case_parent>0) { $table=TABLE_CASE; $dataArray = array("*" => ''); $fldArray = array("case_id" => $case_parent); $orderArray=array(); $orderType=''; $parent_arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); if(count($parent_arr)>0) { $parent_array[]=$parent_arr[0]['case_parent']; $case_parent=$parent_arr[0]['case_parent']; } } } /***********************total menu count**************************/ $table_count=TABLE_CASE; $dataArray_count = array("*"=>''); $fldArray_count = array(); $orderArray_count=array("case_id"=>''); $orderType_count=''; $extra_count=""; $arr_count=dataSelect($table_count,$dataArray_count,$fldArray_count,$extra_count,$orderArray_count,$orderType_count); /************************************************************************************************/ if($_POST['submit']=='Save') { $error = ""; $table=TABLE_CASE; $hidden_case_id=$_REQUEST['hidden_case_id']; $case_status=trim(strip_tags($_POST['case_status'],ENT_QUOTES)); $case_last_modified=DATETIME; $case_title=trim(strip_tags($_POST['case_title'],ENT_QUOTES)); $case_caption=trim(strip_tags($_POST['case_caption'],ENT_QUOTES)); //$case_content=dataPrepare($_REQUEST['case_content']); $case_content=dataPrepare($_REQUEST['case_content']); $case_stat=trim(strip_tags($_POST['case_status'],ENT_QUOTES)); $case_url=strtolower(trim(strip_tags($_POST['case_url'],ENT_QUOTES))); $case_parent=trim(strip_tags($_POST['p_val'],ENT_QUOTES)); $case_header=$_REQUEST['case_group']; $case_page=$_REQUEST['case_page']; if($case_status==''){ $case_status='Active'; }else{ $case_status=$case_stat; } if($hidden_case_id!='' && $case_header=='f'){ $case_parent='0'; } $dataArray = array("case_caption"=>$case_caption,"case_page"=>$case_page,"case_type"=>$case_header,"case_url"=>$case_url,"case_parent"=>$case_parent,"case_status"=>$case_status,"case_last_modified"=>$case_last_modified,"case_title"=>$case_title,"case_content"=>$case_content,"case_status"=>$case_status); if($case_title!='' && $case_content!='' && $case_header!='' && $case_url!='' && $case_page!=''){ /*Edit*/ if($hidden_case_id!=''){ $fldArray = array("case_id" => $hidden_case_id); dataUpdate($table,$dataArray,$fldArray); if($_FILES['case_image']['name']!='') { $msg = ""; $case_ID=$hidden_case_id; if($_REQUEST['hidden_file']!=''){ $fileElementName = 'case_image'; $hidden_file=$_REQUEST['hidden_file']; } $table=TABLE_CASE; $oldfileName=$hidden_file; $fileName=$_FILES['case_image']['name']; $fileSize=filesize($_FILES['case_image']['tmp_name']); $fileTempName=$_FILES['case_image']['tmp_name']; $folderPath="../".CASE_IMAGE_PATH; $maxSize=20480000; $width=''; $height=''; $tFlag=12; $folderT=THUMB; $widthT=CASE_THUMB_WIDTH; $heightT=CASE_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("case_image"=>$codeArr[1]); $fldArray=array("case_id"=>$case_ID); dataUpdate($table,$dataArray,$fldArray); redirect('show_case.php'); } } redirect('show_case.php'); } }else{ if($case_url==''){ $error='Enter Url'; } if($case_page=='') { $error='Select case page type'; } if($case_header==''){ $error='select case type'; } if($case_content==''){ $error=NO_DESC; } if($case_title==''){ $error=NO_TITLE; } } } /************************************************************************************************/ ?>
Edit Case
Date Time
For Page  
 
Link checked > Tab checked >
Select Parent Menu
''); $fldArray = array(); $orderArray=array("case_id"=>''); $orderType='desc'; $extra=" where case_parent='0' and case_status!='Deleted' "; $arr=dataSelectAdmin($table,$dataArray,$fldArray,$extra,$orderArray,$orderType,$limit,$offset); ?>
''); $fldArray = array(); $orderArray=array(); $orderType=''; $extra=" where case_parent='".$parent_array[$m]."'"; $arr=dataSelectAdmin($table,$dataArray,$fldArray,$extra,$orderArray,$orderType,$limit,$offset); ?>
Title
Caption
Case Url
Description show(); ?>
" height="100" width="100">
Case Image
   
Status
   
';}?>