function showDirFiles($dir)
{
    global $quiz;
    $files = array();
    $i = 0;
    $d = dir($dir);
    $short_dir = str_replace($quiz->getDir(), "", $dir);
    while (false !== ($entry = $d->read())) {
        if ($entry[0] != '.') {
            $files[$i++] = $entry;
        }
    }
    sort($files);
    foreach ($files as $nb => $file) {
        showFile($short_dir, $file);
    }
}
include "files_control.php.inc";
?>
<div class="liste_fichier">
<?php 
displaydir($quiz->getOmrErrorDir());
?>
</div>
</div>

<div id="arborescence">
<h1>Autres fichiers</h1>
<div class="liste_fichier">
<ul>
<?php 
showFile("./", "omr.log");
showFile("./", "omr_rotate.log");
?>
</ul>
</div>
</div>

<br><br>

<?php 
doFilesMenu();
?>
</form>
<br><br>
<br>
<hr>
<?php 
showDirFiles($quiz->getCorrectionDir());
?>
</ul>

<h1>Fichiers de correction</h1>
<ul>
<?php 
$files = array();
$i = 0;
$d = dir($quiz->getDir());
while (false !== ($entry = $d->read())) {
    if (endsWith($entry, ".marking")) {
        $files[$i++] = $entry;
    }
}
sort($files);
foreach ($files as $nb => $file) {
    showFile("", $file);
}
?>
</ul>

<?php 
doFilesMenu();
?>
</form>
<br><br>
<br>
<?php 
doMainMenu();
include 'footer.html';
<?php

require 'includes.inc.php';
$file = "somethin.txt";
$text = "Have Something...\nTem Algo...";
if (createAndWrite($file, $text)) {
    echo "<pre>" . showFile($file);
    "</pre>";
} else {
    trigger_error($errorWriteFile, E_WARNING);
}
//or oriented object option(uncoment) / ou a opção orientada a objetos(descomentar):
/*
$txt = new file;
if( $txt-> createFile( $file ) ){
	$txt-> writeToFile( $text );
	$txt-> getFile( $file );
	echo "<pre>".
		$txt-> getFileStr().
		"</pre>";
} else {
	echo $errorWriteFile;
}
*/
Example #5
0
     showContactadress($_GET['id']);
     break;
 case 'editTevent':
     editTevent($_GET['id']);
     break;
 case 'geteventlist':
     listTevents($_GET['id'], $_GET['fid'], $_GET['tab']);
     break;
 case 'getCustomTermin':
     getCustomTermin($_GET['id'], $_GET['tab'], $_GET['day'], $_GET['month'], $_GET['year']);
     break;
 case 'showDir':
     showDir($_GET['id'], $_GET['dir']);
     break;
 case 'showFile':
     showFile($_GET['pfad'], $_GET['file']);
     break;
 case 'lockFile':
     lockFile($_GET['file'], $_GET['pfad'], $_GET['id']);
     break;
 case 'moveFile':
     moveFile($_GET['file'], $_GET['pfadleft']);
     break;
 case 'saveAttribut':
     saveAttribut($_GET['name'], $_GET['oldname'], $_GET['pfad'], $_GET['komment'], $_GET['id']);
     break;
 case 'newDir':
     newDir($_GET['pfad'], $_GET['newdir']);
     break;
 case 'delFile':
     delFile($_GET['id'], $_GET['pfad'], $_GET['file']);
Example #6
0
 function viewFile($file)
 {
     global $associations, $fileInfo;
     $fileInfo->getInfo($file);
     if (!$associations[$fileInfo->extension] || $associations[$fileInfo->extension]["function"] == "") {
         showFile($file);
     } else {
         $associations[$fileInfo->extension]["function"]($file);
     }
 }