예제 #1
0
<?php

/**
 * Created by JetBrains PhpStorm.
 * User: ron
 * Date: 7/4/15
 * Time: 4:14 AM
 * To change this template use File | Settings | File Templates.
 */
require_once 'functions.php';
$data = sort_data(load_data('testdata.tsv'), 'id', SORT_DESC);
print_r($data);
예제 #2
0
     }
 }
 // needed for browsing - we check if a [..] is possible - it is never allowed to go higher as the defined root!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 if (isset($_GET['changedir'])) {
     // Change a directory
     $dir = change_folder($dir, $show_root, $enable_folder_browsing, $exclude_directories, $sort_directores_by_date);
 }
 // needed for browsing - we check again because folder could have changed!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 // I reset the status cache before I read the directory and check the restrictions
 clearstatcache();
 // Read all files and folders
 $size = read_dir($dir, $myFiles, $myDirs, $fix_utf8, $exclude_directories, $sort_files_by_date, $sort_directores_by_date);
 // Sort files and folders
 sort_data($myFiles, $myDirs, $sort_files_by_date, $sort_directores_by_date);
 if ($show_root) {
     array_unshift($myDirs, "..");
 }
 $nrFiles = count($myFiles);
 // check restrictions like if files can be deleted or folders created or of the folder does exists
 $status = check_restrictions($dir, $show_root, $myFiles, $fix_utf8, $status);
 // we check if we have an error in the upload!
 if (isset($_SESSION["upload_memory_limit"]) && isset($_GET['check_upload'])) {
     $mem_errors = "&upload_mem_errors=" . $_SESSION["upload_memory_limit"];
     unset($_SESSION["upload_memory_limit"]);
 } else {
     $mem_errors = "";
 }
 $upload_ok = '&upload_ok=' . (isset($_SESSION["TFU_LAST_UPLOADS"]) ? count($_SESSION['TFU_LAST_UPLOADS']) : '0');
 // This is not optimized! Because if you use sorting by date this is done twice! But this call is cached
예제 #3
0
             $status = delete_folder($dir, $enable_folder_deletion, $fix_utf8);
         }
     }
 }
 // needed for browsing - we check if a [..] is possible - it is never allowed to go higher as the defined root!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 if (isset($_GET['changedir'])) {
     // Change a directory
     $dir = change_folder($dir, $show_root, $enable_folder_browsing, $exclude_directories);
 }
 // needed for browsing - we check again because folder could have changed!
 $show_root = isset($_SESSION["TFU_ROOT_DIR"]) ? $dir != $_SESSION["TFU_ROOT_DIR"] : false;
 // Read all files and folders
 $size = read_dir($dir, $myFiles, $myDirs, $fix_utf8, $exclude_directories, $sort_files_by_date);
 // Sort files and folders
 sort_data($myFiles, $myDirs, $sort_files_by_date);
 if ($show_root) {
     array_unshift($myDirs, "..");
 }
 $nrFiles = count($myFiles);
 // check restrictions like if files can be deleted or folders created or of the folder does exists
 $status = check_restrictions($dir, $show_root, $myFiles, $fix_utf8, $status);
 // we check if we have an error in the upload!
 if (isset($_SESSION["upload_memory_limit"]) && isset($_GET['check_upload'])) {
     $mem_errors = "&upload_mem_errors=" . $_SESSION["upload_memory_limit"];
     unset($_SESSION["upload_memory_limit"]);
 } else {
     $mem_errors = "";
 }
 $upload_ok = '&upload_ok=' . (isset($_SESSION["TFU_LAST_UPLOADS"]) ? count($_SESSION['TFU_LAST_UPLOADS']) : '0');
 $files = implode('|', $myFiles);
예제 #4
0
    $pos = strpos($pieces[$ii], '<?xml');
    $output = substr($pieces[$ii], $pos);
    $g_xml = simplexml_load_string($output);
    //echo $schedd,' has ',count( $g_xml->c ),' jobs.<br />';
    if ($g_xml !== false) {
        read_data($g_schedds[$ii - 1]);
    } else {
        echo '<h2>Error getting xml data from schedd: ', $schedd, '</h2>';
        echo '<h3>', $cmd, '</h3>';
        echo '<pre>', htmlentities($output), '</pre>';
    }
}
data_accounting();
print_accounting();
echo '<hr />';
sort_data();
format_data();
print_data();
?>

		<hr>
		<p>Last update: <?php 
echo date(DATE_RFC822);
?>
</p>


		<?php 
do_refresh_button();
?>