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

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

$output                 =   array('status' => 1);

if(!isset($_SESSION['loggedin'])){
    dj($output);
}

$filesQuery             =   $db->prepare("SELECT * FROM user_files WHERE uid = :uid ORDER BY `id` DESC");
$filesQuery->execute(array(
    ":uid"              =>  $_SESSION['uid']
));

$output['status']       =   2;
$output['files']        =   $filesQuery->fetchAll(PDO::FETCH_ASSOC);
dj($output);