<?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
$inventory_id = $_GET['inventoryid'];
$element_id = $_GET['elementid'];
$element_status = $_GET['elstatus'];
$pageorigin = $_GET['pageorigin'];

mysqli_query($conn, "UPDATE approved_inventory SET publish = '$element_status' WHERE inventory_id = '$element_id' ");

mysqli_close($conn);

header("Location: ../../$pageorigin?inventoryid=$inventory_id&message=$element_status");
?>