<?php

/**
 * This file generates the header for the back-end and also for the default
 * template.
 *
 * Other checks for user level are performed later to generate the different
 * menu items, and the content of the page that called this file.
 *
 * @package ProjectSend
 * @see check_for_session
 * @see check_for_admin
 * @see can_see_content
 */
/** Check for an active session or cookie */
check_for_session();
/** Check if the active account belongs to a system user or a client. */
//check_for_admin();
/** If no page title is defined, revert to a default one */
if (!isset($page_title)) {
    $page_title = __('System Administration', 'cftp_admin');
}
/**
 * Silent updates that are needed even if no user is logged in.
 */
require_once ROOT_DIR . '/includes/core.update.silent.php';
/**
 * Call the database update file to see if any change is needed,
 * but only if logged in as a system user.
 */
$core_update_allowed = array(9, 8, 7);
Example #2
0
<?php

/**
 * Edit a file name or description.
 * Files can only be edited by the uploader and level 9 or 8 users.
 *
 * @package ProjectSend
 */
$multiselect = 1;
$datepicker = 1;
$allowed_levels = array(9, 8, 7, 0);
require_once 'sys.includes.php';
//Add a session check here
if (!check_for_session()) {
    header("location:" . BASE_URI . "index.php");
}
$active_nav = 'files';
$page_title = __('Edit file', 'cftp_admin');
include 'header.php';
define('CAN_INCLUDE_FILES', true);
/**
 * The file's id is passed on the URI.
 */
if (!empty($_GET['file_id'])) {
    $this_file_id = $_GET['file_id'];
}
/** Fill the users array that will be used on the notifications process */
$users = array();
$statement = $dbh->prepare("SELECT id, name, level FROM " . TABLE_USERS . " ORDER BY name ASC");
$statement->execute();
$statement->setFetchMode(PDO::FETCH_ASSOC);