<?php
/**
 * Created by PhpStorm.
 * User: jaskokoyn
 * Date: 2/21/2015
 * Time: 9:47 PM
 */

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

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

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

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

$delEmoteQuery    =   $db->prepare("DELETE FROM emotes WHERE id = :id");
$delEmoteQuery->execute(array(
    ":id"        =>  $eid
));

die("SUCCESS");