''); $fldArray = array("page_id" => $id); $orderArray=array(); $orderType=''; $arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); $page_status=$arr[0]['page_status']; $page_last_modified=$arr[0]['page_last_modified']; $page_title=$arr[0]['page_title']; $page_content=$arr[0]['page_content']; $page_status=$arr[0]['page_status']; $page_image=$arr[0]['page_image']; $page_header=$arr[0]['page_mark']; $page_url=$arr[0]['page_url']; $page_parent=$arr[0]['page_parent']; $page_id=$arr[0]['page_id']; //echo $page_parent; /*************array of parent****************************/ $parent_array[]=$page_parent; $count=$page_parent; for($i=$count;$i>0;$i--) { if($page_parent>0) { $table=TABLE_PAGE; $dataArray = array("*" => ''); $fldArray = array("page_id" => $page_parent); $orderArray=array(); $orderType=''; $parent_arr=dataSelect($table,$dataArray,$fldArray,$extra="",$orderArray,$orderType); if(count($parent_arr)>0) { $parent_array[]=$parent_arr[0]['page_parent']; $page_parent=$parent_arr[0]['page_parent']; } } } /***********************total menu count**************************/ $table_count=TABLE_PAGE; $dataArray_count = array("*"=>''); $fldArray_count = array("page_mark"=>'h'); $orderArray_count=array("page_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_PAGE; $hidden_page_id=$_REQUEST['hidden_page_id']; $page_status=trim(strip_tags($_POST['page_status'],ENT_QUOTES)); $page_last_modified=DATETIME; $page_title=trim(strip_tags($_POST['page_title'],ENT_QUOTES)); //$page_content=dataPrepare($_REQUEST['page_content']); $page_content=dataPrepare(addslashes($_REQUEST['page_content'])); $page_stat=trim(strip_tags($_POST['page_status'],ENT_QUOTES)); $page_url=strtolower(trim(strip_tags($_POST['page_url'],ENT_QUOTES))); $page_parent=trim(strip_tags($_POST['p_val'],ENT_QUOTES)); $page_image=$_POST['page_image_hid']; $page_header=$_REQUEST['page_group']; if($page_status==''){ $page_status='Active'; }else{ $page_status=$page_stat; } if($hidden_page_id!='' && $page_header=='f'){ $page_parent='0'; } $dataArray = array("page_mark"=>$page_header,"page_url"=>$page_url,"page_parent"=>$page_parent,"page_status"=>$page_status,"page_last_modified"=>$page_last_modified,"page_title"=>$page_title,"page_content"=>$page_content,"page_status"=>$page_status); if($page_title!='' && $page_content!='' && $page_header!=''){ /*Edit*/ if($hidden_page_id!=''){ $fldArray = array("page_id" => $hidden_page_id); dataUpdate($table,$dataArray,$fldArray); if($_FILES['page_image']['name']=='' && $_FILES['page_menu_image']['name']=='') { redirect('show_page.php'); } /*************image upload****************************/ if($_FILES['page_image']['name']!='') { $msg = ""; $page_ID=$hidden_page_id; if($_REQUEST['hidden_file']!=''){ $fileElementName = 'page_image'; $hidden_file=$_REQUEST['hidden_file']; } $table=TABLE_PAGE; $oldfileName=$hidden_file; $fileName=$_FILES['page_image']['name']; $fileSize=filesize($_FILES['page_image']['tmp_name']); $fileTempName=$_FILES['page_image']['tmp_name']; $folderPath="../".PAGE_IMAGE_PATH; $maxSize=20480000; 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=pageimageupload($fileName,$oldfileName,$fileSize,$fileTempName,$folderPath,$maxSize=20480000); $dataArray=array("page_image"=>$codeArr[1]); $fldArray=array("page_id"=>$page_ID); dataUpdate($table,$dataArray,$fldArray); if($_FILES['page_menu_image']['name']=='') { redirect('show_page.php'); } } } /*****************image upload**********************************/ if($_FILES['page_menu_image']['name']!='') { $msg = ""; $page_ID=$hidden_page_id; if($_REQUEST['hidden_file']!=''){ $fileElementName = 'page_menu_image'; $hidden_file=$_REQUEST['hidden_file']; } $table=TABLE_PAGE; $oldfileName=$hidden_file; $fileName=$_FILES['page_menu_image']['name']; $fileSize=filesize($_FILES['page_menu_image']['tmp_name']); $fileTempName=$_FILES['page_menu_image']['tmp_name']; $folderPath="../".PAGE_MENU_IMAGE_PATH; $maxSize=20480000; 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=pageimageupload($fileName,$oldfileName,$fileSize,$fileTempName,$folderPath,$maxSize=20480000); $dataArray=array("page_menu_image"=>$codeArr[1]); $fldArray=array("page_id"=>$page_ID); dataUpdate($table,$dataArray,$fldArray); redirect('show_page.php'); } } } }else{ if($page_content==''){ $error=NO_DESC; } if($page_title==''){ $error=NO_TITLE; } if($page_header==''){ $error=NO_PAGE_DEFINER; } } } ?>
Edit Page
">
Date Time
 
Header checked > Footer checked >
Select Parent Menu style="display:none;" >
''); $fldArray = array(); $orderArray=array("page_id"=>''); $orderType='desc'; $extra=" where page_parent='0' and page_status!='Deleted' and page_mark!='f' "; $arr=dataSelectAdmin($table,$dataArray,$fldArray,$extra,$orderArray,$orderType,$limit,$offset); ?>
''); $fldArray = array(); $orderArray=array(); $orderType=''; $extra=" where page_parent='".$parent_array[$m]."'"; $arr=dataSelectAdmin($table,$dataArray,$fldArray,$extra,$orderArray,$orderType,$limit,$offset); ?>
Title
Title Image
Menu Image
Page Url
Description show(); ?>
 
   
Status
   
';}?>