function fsize($size)
{
    if ($size == 0) {
        return "0 Bytes";
    }
    $filesizename = array(" bytes", " kB", " MB", " GB", " TB");
    return round($size / pow(1024, $i = floor(log($size, 1024))), 1) . $filesizename[$i];
}
// Setup template object, parse vars to it, then parse it
// Create new template object
$template = new Template(dirname($admin->correct_theme_source('media_browse.htt')));
$template->set_file('page', 'media_browse.htt');
$template->set_block('page', 'main_block', 'main');
// Get the current dir
$currentHome = $admin->get_home_folder();
$directory = ($currentHome and !array_key_exists('dir', $_GET)) ? $currentHome : $admin->strip_slashes($admin->get_get('dir'));
if ($directory == '/' or $directory == '\\') {
    $directory = '';
}
$dir_backlink = 'browse.php?dir=' . $directory;
// Check to see if it contains ../
if (!check_media_path($directory)) {
    // $admin->print_header();
    $admin->print_error($MESSAGE['MEDIA']['DIR_DOT_DOT_SLASH']);
}
if (!file_exists(WB_PATH . MEDIA_DIRECTORY . $directory)) {
    // $admin->print_header();
    $admin->print_error($MESSAGE['MEDIA']['DIR_DOES_NOT_EXIST']);
}
// Check to see if the user wanted to go up a directory into the parent folder
if ($admin->get_get('up') == 1) {
Beispiel #2
0
}
// end include class.secure.php
// Get page id
if (!isset($_GET['page_id']) || !is_numeric($_GET['page_id'])) {
    header("Location: index.php");
    exit(0);
} else {
    $page_id = $_GET['page_id'];
}
require_once LEPTON_PATH . '/framework/class.admin.php';
$admin = new admin('Pages', 'pages_modify');
// Get perms
if (!$admin->get_page_permission($page_id, 'admin')) {
    $admin->print_error($MESSAGE['PAGES_INSUFFICIENT_PERMISSIONS']);
}
$sectionId = isset($_GET['wysiwyg']) ? htmlspecialchars($admin->get_get('wysiwyg')) : NULL;
// Get page details
$results_array = $admin->get_page_details($page_id);
// Get display name of person who last modified the page
$user = $admin->get_user_details($results_array['modified_by']);
// Convert the unix ts for modified_when to human a readable form
$modified_ts = $results_array['modified_when'] != 0 ? $modified_ts = date(TIME_FORMAT . ', ' . DATE_FORMAT, $results_array['modified_when']) : 'Unknown';
// Include page info script
$template = new Template(THEME_PATH . '/templates');
$template->set_file('page', 'pages_modify.htt');
$template->set_block('page', 'main_block', 'main');
$template->set_var(array('PAGE_ID' => $results_array['page_id'], 'PAGE_TITLE' => $results_array['page_title'], 'MENU_TITLE' => $results_array['menu_title'], 'ADMIN_URL' => ADMIN_URL, 'LEPTON_URL' => LEPTON_URL, 'LEPTON_PATH' => LEPTON_PATH, 'THEME_URL' => THEME_URL));
$template->set_var(array('MODIFIED_BY' => $user['display_name'], 'MODIFIED_BY_USERNAME' => $user['username'], 'MODIFIED_WHEN' => $modified_ts, 'LAST_MODIFIED' => $MESSAGE['PAGES_LAST_MODIFIED']));
$template->set_block('main_block', 'show_modify_block', 'show_modify');
if ($modified_ts == 'Unknown') {
    $template->set_block('show_modify', '');
/**
 * WebsiteBaker Community Edition (WBCE)
 * Way Better Content Editing.
 * Visit http://wbce.org to learn more and to join the community.
 *
 * @copyright Ryan Djurovich (2004-2009)
 * @copyright WebsiteBaker Org. e.V. (2009-2015)
 * @copyright WBCE Project (2015-)
 * @license GNU GPL2 (or any later version)
 */
// Create admin object
require '../../config.php';
$admin = new admin('Media', 'media_rename', false);
// Include the WB functions file
// Get the current dir
$directory = $admin->get_get('dir');
$directory = $directory == '/' ? '' : $directory;
$dirlink = 'browse.php?dir=' . $directory;
$rootlink = 'browse.php?dir=';
// $file_id = intval($admin->get_get('id'));
// first Check to see if it contains ..
if (!check_media_path($directory)) {
    $admin->print_error($MESSAGE['MEDIA_DIR_DOT_DOT_SLASH'], $rootlink, false);
}
// Get the temp id
$file_id = intval($admin->checkIDKEY('id', false, $_SERVER['REQUEST_METHOD']));
if (!$file_id) {
    $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], $dirlink, false);
}
// Get home folder not to show
$home_folders = get_home_folders();
 * @platform        WebsiteBaker 2.8.3
 * @requirements    PHP 5.3.6 and higher
 * @version         $Id: index.php 5 2015-04-27 08:02:19Z luisehahne $
 * @filesource      $HeadURL: https://localhost:8443/svn/wb283Sp4/SP4/branches/wb/admin/users/index.php $
 * @lastmodified    $Date: 2015-04-27 10:02:19 +0200 (Mo, 27. Apr 2015) $
 *
 */
if (!defined('WB_PATH')) {
    require dirname(dirname(__DIR__)) . '/config.php';
}
if (!class_exists('admin', false)) {
    require WB_PATH . '/framework/class.admin.php';
}
$admin = new admin('Access', 'users');
$iUserStatus = 1;
$iUserStatus = $admin->get_get('status') == 1 ? 0 : $iUserStatus;
unset($_GET);
// Setup template object, parse vars to it, then parse it
// Create new template object
$template = new Template(dirname($admin->correct_theme_source('users.htt')));
// $template->debug = true;
$template->set_file('page', 'users.htt');
$template->set_block('page', 'main_block', 'main');
$template->set_block("main_block", "manage_groups_block", "groups");
$template->set_var('ADMIN_URL', ADMIN_URL);
$template->set_var('FTAN', $admin->getFTAN());
$template->set_var('USER_STATUS', $iUserStatus);
$UserStatusActive = 'url(' . THEME_URL . '/images/user.png)';
$UserStatusInactive = 'url(' . THEME_URL . '/images/user_red.png)';
$sUserTitle = $iUserStatus == 0 ? $MENU['USERS'] . ' ' . strtolower($TEXT['ACTIVE']) : $MENU['USERS'] . ' ' . strtolower($TEXT['DELETED']);
$template->set_var('TEXT_USERS', $sUserTitle . ' ' . $TEXT['SHOW']);