Beispiel #1
0
session_start();
is_login(DOCROOT . "admin/login/");
//checking whether admin logged in or not.
$userid = $_SESSION["userid"];
$shopid = $url_arr[3];
$obj = new EditShop();
$obj->editShopDetails($shopid);
if ($_POST) {
    $shopname = htmlentities($_POST['shopname'], ENT_QUOTES);
    $shopaddress = htmlentities($_POST['shopaddress'], ENT_QUOTES);
    $city = $_POST["city"];
    $country = $_POST['country'];
    $lat = htmlentities($_POST['lat'], ENT_QUOTES);
    $lang = htmlentities($_POST['lang'], ENT_QUOTES);
    $result = updateShop($shopid, $userid, $shopname, $shopaddress, $city, $country, $lat, $lang);
    $coopon_url = DOCROOT . "admin/view/rep/shops/";
    set_response_mes(1, $admin_language['changesmodified']);
    url_redirect($coopon_url);
}
?>

<script type="text/javascript">
/* validation */
$(document).ready(function(){ $("#form_editshop").validate();});
</script>

<div class="form">
<div class="form_top"></div>
      <div class="form_cent"> 
<?php

include '../../functions.php';
include '../../connectdb.php';
//Get data from the former page via POST method
$id = $_POST["id"];
$name = $_POST["name"];
$address = $_POST["address"];
//Update shop
updateShop($id, $name, $address);
//Go to the project detail page
header("Location: shop.php");