<?php
/**
 * Created by PhpStorm.
 * User: jaskokoyn
 * Date: 4/25/2015
 * Time: 9:34 PM
 */

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

$params                 =   getParams();

if( !isReady($params, 'id') ){
    die();
}

$filesQuery             =   $db->prepare("DELETE FROM user_files WHERE id = :id AND uid = :uid");
$filesQuery->execute(array(
    ":id"               =>  intval($params['id']),
    ":uid"              =>  $_SESSION['uid']
));

die();