<?php
//DB Data
include '../../ASEngine/AS.php';
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//variables
$city_id = $_GET['cityid'];
$city_status = $_GET['cstatus'];

mysqli_query($conn, "UPDATE cities SET city_active = '$city_status' WHERE city_id = '$city_id' ");
mysqli_query($conn, "UPDATE approved_inventory SET active = '$city_status' WHERE element_id = '$city_id' AND element_type = '2' ");

mysqli_close($conn);

header("Location: ../../cities.php?citymsn=$city_status");
?>