Beispiel #1
0
            echo " <input type=\"hidden\" name=\"wdir\" value=\"{$wdir}\" />\n";
            echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />\n";
            echo " <input type=\"hidden\" name=\"sesskey\" value=\"{$USER->sesskey}\" />\n";
            echo " <input type=\"submit\" value=\"{$strok}\" />\n";
            echo "</form>\n";
            echo "</center>\n";
        } else {
            displaydir($wdir);
        }
        html_footer();
        break;
    case "cancel":
        clearfilelist();
    default:
        html_header($course, $wdir);
        displaydir($wdir);
        html_footer();
        break;
}
/// FILE FUNCTIONS ///////////////////////////////////////////////////////////
function setfilelist($VARS)
{
    global $USER;
    $USER->filelist = array();
    $USER->fileop = "";
    $count = 0;
    foreach ($VARS as $key => $val) {
        if (substr($key, 0, 4) == "file") {
            $count++;
            $val = rawurldecode($val);
            if (!detect_munged_arguments($val, 0)) {
<div class="liste_fichier">
<?php 
displaydir($quiz->getOmrOutputDir());
?>
</div>
</div>


<div id="arborescence">
<h1>Fichiers du répertoire d'erreur</h1>
<?php 
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>
            echo " <input type=\"submit\" value=\"{$strok}\" />\n";
            echo "</form>\n";
            echo "</center>\n";
        } else {
            displaydir($wdir);
        }
        html_footer();
        break;
    case "cancel":
        clearfilelist();
    default:
        html_header($course, $wdir);
        if ($id != SITEID) {
            displaydir($uuid, $wdir, $id);
        } else {
            displaydir($uuid, $wdir);
        }
        html_footer();
        break;
}
/// FILE FUNCTIONS ///////////////////////////////////////////////////////////
function setfilelist($VARS)
{
    global $USER;
    $USER->filelist = array();
    $USER->fileop = "";
    $count = 0;
    foreach ($VARS as $key => $val) {
        if (substr($key, 0, 4) == "file") {
            $count++;
            $val = rawurldecode($val);
Beispiel #4
0
    if ($parent_info = $file_info->get_parent() and $parent_info->is_writable()) {
        if (!$file_info->delete()) {
            $error = "Could not delete file!";
            // TODO: localise
        }
        $params = $parent_info->get_params_rawencoded();
        $params = implode('&amp;', $params);
        redirect("index.php?{$params}", $error);
    }
}
/// print dir listing
html_header($context, $file_info);
if ($error !== '') {
    notify($error);
}
displaydir($file_info);
if ($file_info and $file_info->is_directory() and $file_info->is_writable()) {
    echo '<br />';
    echo '<form action="index.php" method="post"><div>';
    echo '<input type="hidden" name="contextid" value="' . $contextid . '" />';
    echo '<input type="hidden" name="filearea" value="' . $filearea . '" />';
    echo '<input type="hidden" name="itemid" value="' . $itemid . '" />';
    echo '<input type="hidden" name="filepath" value="' . s($filepath) . '" />';
    echo '<input type="hidden" name="filename" value="' . s($filename) . '" />';
    echo '<input type="hidden" name="sesskey" value="' . sesskey() . '" />';
    echo '<input type="text" name="newdirname" value="" />';
    echo '<input type="submit" value="' . get_string('makeafolder') . '" />';
    echo '</div></form>';
    echo '<br />';
    echo '<form enctype="multipart/form-data" method="post" action="index.php"><div>';
    echo '<input type="hidden" name="contextid" value="' . $contextid . '" />';
            echo " <input type=\"hidden\" name=\"sesskey\" value=\"{$USER->sesskey}\" />";
            echo " <input type=\"submit\" value=\"{$strcreate}\" />";
            echo "</fieldset>";
            echo "</form>";
            echo "</td><td>";
            echo "<form action=\"morslefiles.php\" method=\"get\">";
            echo "<div>";
            echo ' <input type="hidden" name="choose" value="' . $choose . '" />';
            echo " <input type=\"hidden\" name=\"courseid\" value=\"{$courseid}\" />";
            echo " <input type=\"hidden\" name=\"wdir\" value=\"{$wdir}\" />";
            echo " <input type=\"hidden\" name=\"action\" value=\"cancel\" />";
            echo " <input type=\"submit\" value=\"{$strcancel}\" />";
            echo "</div>";
            echo "</form>";
            echo "</td></tr></table>";
        }
        break;
    default:
        displaydir($wdir, $files);
        break;
}
echo $OUTPUT->footer();
function aminroot($wdir)
{
    $gdocsstr = 'Google-Docs-Storage-for-';
    if ($wdir == '' || strpos($wdir, $gdocsstr)) {
        return true;
    } else {
        return false;
    }
}
Beispiel #6
0
     $lastaction = "Created {$file}";
     html_header();
     #			if($convert == "yes")
     #   				{
     #				$code = str_replace ("\n", "<BR>");
     #				}
     $fp = fopen($basedir . $filelocation, "w");
     fputs($fp, stripslashes($code));
     fclose($fp);
     displaydir();
 } else {
     ############### The file allready exists
     if (file_exists($basedir . $filelocation)) {
         $lastaction = "{$file} allready exists.";
         html_header();
         displaydir();
     } else {
         $lastaction = "Creating {$file}";
         html_header();
         echo "<FORM METHOD=\"POST\" ACTION=\"{$PHP_SELF}\">\n";
         echo "<INPUT TYPE=\"HIDDEN\" NAME=\"file\" VALUE=\"{$file}\">\n";
         echo "<INPUT TYPE=\"HIDDEN\" NAME=\"action\" VALUE=\"createfile\">\n";
         echo "<INPUT TYPE=\"HIDDEN\" NAME=\"wdir\" VALUE=\"{$wdir}\">\n";
         echo "<INPUT TYPE=\"HIDDEN\" NAME=\"done\" VALUE=\"1\">\n";
         echo "<TEXTAREA NAME=\"code\" rows=\"{$textrows}\" cols=\"{$textcols}\">\n";
         ############### The user selected to use a html template. Put it inside the textarea
         if (isset($html)) {
             echo "<HTML><HEAD><title>תור-חיפה:  כותרת צריכה לבו כאן </title>\n";
             echo "<META NAME=\"description\" CONTENT=\"HAIFA: Mountain City By the Sea: The Official Haifa Tourism-Info Site.  all the Information you'll need about Haifa, Israel, Brought to you by the Haifa Tourists Board\">\n";
             echo "<META NAME=\"keywords\" CONTENT=\"Haifa, Israel, Bahai, Tours, Religions, tempel Green, Cafe, pubs, tourism, Beaches, sea, mountain, beautiful, zoo, hotels, B&B, What's new in Haifa, Mountain City By the Sea\">\n";
             echo "<?php // Include more Meta tags & some HEAD scripts \n";