include '../model/processaccount.php';
include '../model/seller.php';
$msg_register = 0;
if (isset($_POST['btn-edit'])) {
    $users = new User();
    $seller = new Seller();
    $processaccount = new Processaccount();
    $users->setFullname(mysql_real_escape_string($_POST['fname']));
    $users->setUsername(mysql_real_escape_string($_POST['uname']));
    $users->setEmail(mysql_real_escape_string($_POST['email']));
    $users->setPhone(mysql_real_escape_string($_POST['phone']));
    $seller->setCompany(mysql_real_escape_string($_POST['company']));
    $seller->setAddress(mysql_real_escape_string($_POST['address']));
    $seller->setCity(mysql_real_escape_string($_POST['city']));
    $seller->setPostalcode(mysql_real_escape_string($_POST['postalcode']));
    $seller->setDescription(mysql_real_escape_string($_POST['description']));
    $objs = array();
    $objs[] = $users;
    $objs[] = $seller;
    $msg_register = $processaccount->editAdminProfile($objs);
    if ($msg_register == 0) {
        header("Location: adminaccount.php");
    }
}
?>

	
	<section id="form" style="margin-top: 0px"><!--form-->
		<div class="container">
			
			<label class="error-label col-xs-12" id="error"></label>
 public function getProduct($f)
 {
     $id = $f->getId();
     $res = mysql_query("SELECT *,food.id AS fid, seller.id AS sid FROM food INNER JOIN seller ON seller.id=food.seller_id WHERE food.id='" . $id . "'");
     $userRow = mysql_fetch_array($res);
     $food = new Foods();
     $seller = new Seller();
     $review = new Review();
     $food->setId($userRow['fid']);
     $food->setFood($userRow['food']);
     $food->setImgs($userRow['imgs']);
     $food->setPrice($userRow['price']);
     $food->setIngredients($userRow['ingredients']);
     $food->setDescription($userRow['description']);
     $food->setType($userRow['type']);
     $food->setMeal($userRow['meal']);
     $food->setVeg($userRow['veg']);
     $food->setSpicy($userRow['spices']);
     $food->setStock($userRow['stock']);
     $food->setDelivery($userRow['delivery']);
     $food->setDtime($userRow['dtime']);
     $seller->setId($userRow['sid']);
     $seller->setCompany($userRow['company']);
     $seller->setAddress($userRow['address']);
     $seller->setCity($userRow['city']);
     $seller->setPostalcode($userRow['postalcode']);
     $seller->setDescription($userRow['description']);
     $seller->setLogo($userRow['logo']);
     $seller->setUser_id($userRow['user_id']);
     $resR = mysql_query("SELECT * FROM review WHERE food_id='" . $f->getId() . "'");
     $userRowR = mysql_fetch_array($resR);
     $review->setId($userRowR['id']);
     $review->setName($userRowR['name']);
     $review->setEmail($userRowR['email']);
     $review->setComment($userRowR['comment']);
     $review->setRtime($userRowR['rtime']);
     $review->setRday($userRowR['rday']);
     $review->setFood_id($userRowR['food_id']);
     $objs = array();
     $objs[] = $food;
     $objs[] = $seller;
     $objs[] = $review;
     return $objs;
 }