* @copyright Copyright (c) 2009-2011 Moc 10 Media, LLC. (http://www.moc10media.com) * @license https://phirecms.org/LICENSE.TXT New BSD License * @version 1.1 */ require_once '../bootstrap.php'; require_once '../core/process/session.check.php'; include_once '../core/process/init.php'; include_once '../core/includes/header.php'; if (!isset($_GET['fid'])) { if (isset($_GET['plugin'])) { header('Location: ' . BASE_PATH . CONTENT_PATH . '/extensions/plugins/' . $_GET['plugin'] .'/'); } else { header('Location: ./files.php'); } } else { // Get the user data. $file = new Phire_Table_Files(); $file->findById($_GET['fid']); if ((!isset($file->file_id)) || (!in_array($file->site_id, $sess->sites)) || (($sess->access != 'Admin') && ($sess->open_authoring[$file->site_id] == 'Off') && ($file->user_id != 0) && ($sess->user_id != $file->user_id))) { if (isset($_GET['plugin'])) { header('Location: ' . BASE_PATH . CONTENT_PATH . '/extensions/plugins/' . $_GET['plugin'] .'/'); } else { header('Location: ./files.php'); } } else { ?>