korsygfhrtzangaiide
Elepffwdsff
/
home3
/
nmslyumy
/
www
/
odishaexpress
/
oe-admin
/
model
/
Upload FileeE
HOME
<?php class Footermenu extends CommonAll { public function Addfootermenu() { $sp="home.php?page=foot-menu"; $ep="home.php?page=add-footermenu"; $its_footercat=trim($_POST["ftcat"]); $its_footermenu=trim($_POST["submnu"]); $its_posit=trim($_POST["pos"]); $its_status=1; $its_pagelink=trim($_POST["pglnk"]); $its_url=trim($_POST["url"]); $its_file=$_FILES["docc"]["name"]; $its_date=date("Y-m-d"); $tab="its_footmenu"; move_uploaded_file($_FILES["docc"]["tmp_name"],"@upload_file/menu/".$its_file); $col="its_fcat,its_footermenu,its_position,its_status,its_pagelink,its_date,its_url,its_file"; $chcol="its_footermenu"; $val="'".$its_footercat."','".$its_footermenu."','".$its_posit."','".$its_status."','".$its_pagelink."','".its_date."','".$its_url."','".$its_file."'"; $cond="its_footercat='".$its_footercat."' && its_footermenu='".$its_footermenu."'"; $this->AddUniqRecordCond($tab,$col,$val,$cond,$sp,$ep); } public function updatefoot() { $sp="home.php?page=foot-menu"; $ep="home.php?page=add-footermenu"; $its_footercat=trim($_POST["ftcat"]); $its_footermenu=trim($_POST["submnu"]); $its_posit=trim($_POST["pos"]); $its_status=1; $its_pagelink=trim($_POST["pglnk"]); $its_url=trim($_POST["url"]); $its_file=$_FILES["docc"]["name"]; $its_date=date("Y-m-d"); $tab="its_footmenu"; $ucolname="its_mid "; $uval="'".$_GET['eid']."'"; move_uploaded_file($_FILES["docc"]["tmp_name"],"@upload_file/menu/".$its_file); $colval="its_fcat='".$its_footercat."',its_footermenu='".$its_footermenu."',its_position='".$its_posit."',its_status='".$its_status."',its_pagelink='".$its_pagelink."',its_date='".$its_date."',its_url='".$its_url."',its_file='".$its_file."'"; $this->UpdateRecord($tab,$colval,$ucolname,$uval,$sp,$ep); } } $gprs=new Footermenu; if(isset($_POST["save"])) { $ins=$gprs->Addfootermenu(); } //get footer category name $getfootervalue=$conn->query("select * from its_foot"); //GET PAGE NAME $getpage=$conn->query("select * from its_page"); //GET aLL rECORD $spd=$conn->query("select * from its_footmenu"); //GET EDIT DETAILS if(!empty($_GET["eid"])) { $tab="its_footmenu"; $wh="its_mid='".$_REQUEST['eid']."'"; $ed=$conn->query("select * from $tab where $wh"); $edt = $ed->fetch_array(); } //CODE FOR UPDATE RECORD if(isset($_POST["update"])) { $upd=$gprs->updatefoot(); } //CODE FOR DELETE RECORD if(!empty($_GET['did'])) { $sp="home.php?page=foot-menu"; $ep="home.php?page=add-footermenu"; $col="its_mid"; $val="'".$_GET['did']."'"; $upg=$gprs->DeleteRecord("its_footmenu",$col,$val,$sp,$ep); } ?>