Linux altar53.supremepanel53.com 4.18.0-553.8.1.lve.el8.x86_64 #1 SMP Thu Jul 4 16:24:39 UTC 2024 x86_64
/ home/ bdapparelinfo/ electropackbd.com/ Wp-Administrator/ classes/ |
|
<?php require_once 'DB.class.php'; //// $db = new DB(); $db-> connect(); class MenuAndContent { /////////////end login and logout public function userFormValidation($Full_Name) { $error = array(); if($Full_Name == '') { $error['fName'] = 'Name field is required.'; } if($error) { return $error; } else return false; } public function addcat($cat_name, $cat_parent_name, $url_link, $cat_position, $sir_no){ $sql="insert into menu (`cat_name`, `parents_cat_id`, `url_link`, `url_name`, `position`, `sir_no`, `status`) VALUES('$cat_name', '$cat_parent_name', '$url_link', '$cat_name', '$cat_position', '$sir_no', '1')"; $this->result = mysql_query($sql); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=ins_Categories&msg=1>"; echo"</head>"; echo"</html> "; } else{return false;} } ////end function insert Cat public function editcat($cat_edit_id, $cat_parent_name, $cat_name, $cat_position, $sir_no){ $sql="UPDATE `menu` SET `cat_name`='$cat_name', `parents_cat_id`='$cat_parent_name' ,`position`='$cat_position', `sir_no`='$sir_no' WHERE id='$cat_edit_id'"; $this->result = mysql_query($sql); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=ins_Categories&msg=3&id=$cat_edit_id>"; echo"</head>"; echo"</html> "; } else{return false;} } ////end function Update Cat public function addcontent($pagescontent, $title, $price, $size, $model, $des, $post_position, $User_Img1, $User_Img2, $User_Img3, $User_Img4, $resized_file, $dob){ $sql="insert into pages_content (`content_pages_name`, `title`, `price`, `size`, `model`, `date`, `image`, `image_2`, `image_3`, `image_4`, `resized_file`, `post_position`, `description`) VALUES('$pagescontent', '$title', '$price', '$size', '$model', '$dob','$User_Img1','$User_Img2','$User_Img3','$User_Img4','$resized_file','$post_position','$des')"; $this->result = mysql_query($sql); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=ins_Pages_Content&msg=1>"; echo"</head>"; echo"</html> "; } else{return false;} } ////end function insert public function view_pages(){ $query = "SELECT * FROM `pages_content` ORDER BY `id` ASC"; $this->result = mysql_query($query); return $this->result; } public function delete_pages_id($DelID){ $query = "delete from pages_content where id='$DelID'"; $this->result = mysql_query($query); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=View_Pages&msg=3>"; echo"</head>"; echo"</html> "; } else{return false;} } public function delete_cat_id($DelID){ $query = "delete from menu where id='$DelID'"; $this->result = mysql_query($query); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=Categories&msg=3>"; echo"</head>"; echo"</html> "; } else{return false;} } public function edit_pages_id($ID){ $query = "Select * from `pages_content` where id='$ID'"; $this->result = mysql_query($query); return $this->result; } public function editpages($ID, $des, $title, $price, $size, $model, $dob, $pagescontent, $post_position, $User_Img1, $User_Img2, $User_Img3, $User_Img4){ $query = "Update pages_content SET content_pages_name='$pagescontent', title = '$title', price = '$price', size = '$size', model = '$model', image = '$User_Img1', image_2='$User_Img2', image_3='$User_Img3', image_4='$User_Img4', post_position='$post_position', description ='$des', date='$dob' where id='$ID'"; $this->result = mysql_query($query); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=ins_Pages_Content&id=".$ID."&msg=3>"; echo"</head>"; echo"</html> "; } else{return false;} } public function Password_update($Uuid_Pass, $Old_Pass, $New_Pass){ $sql="UPDATE `admin` SET `password` = '$New_Pass' where `id`= '$Uuid_Pass'"; $this->result = mysql_query($sql); if($this->result){ //echo"Successfully Update!"; echo"<html>"; echo"<head> <meta http-equiv=refresh content=0;url=dashboard.php?cid=Settings&msg=Settings_4>"; echo"</head>"; echo"</html> "; } else{return false;} } ////end function Update ////////////////////////////////end Settings management//////////////////////// }///////////end of top class DB ?>