<?php 
require("common_begin.php");

$userID = $_GET['id'];
if (!isset($userID))
  die("no user ID set");
$userStatus = $_GET['status'];
if (!isset($userStatus))
  die("no status set");
$userPriv = $_GET['priv'];
if (!isset($userPriv))
  die("no priv set");
  
$lst = Listopia::getInstance();

if ($lst->isLoggedIn() && $lst->isAdminUser())
{
  $userQuery = 'user_id='.$userID;
  $data = array(
    'user_status'           => $userStatus,
    'user_privilege'        => $userPriv,
  );
  $okA = $lst->Database()->update('users', $data, $userQuery);
 
  print("<pre>");
  print_r($okA );
  print("</pre>");
}