<?php
/**
 * Created by PhpStorm.
 * User: jaskokoyn
 * Date: 2/20/2015
 * Time: 12:35 PM
 */

include( '../../inc/db.php' );
include( '../../inc/functions.php' );

if(!isset($_SESSION['loggedin']) || $user['mem_level'] != 2){
    die("AYYYYYY");
}

if( !isReady($_POST, array( "uid" ) ) ){
    die( "EMPTY" );
}

$uid  =   secure($_POST['uid']);

$delUserQuery    =   $db->prepare("DELETE FROM users WHERE id = :id");
$delUserQuery->execute(array(
    ":id"        =>  $uid
));

die("SUCCESS");