File: contents.php

package info (click to toggle)
moodle 1.4.4.dfsg.1-3sarge1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 57,876 kB
  • ctags: 29,496
  • sloc: php: 271,617; sql: 5,084; xml: 702; perl: 638; sh: 403; java: 283; makefile: 42; pascal: 21
file content (27 lines) | stat: -rwxr-xr-x 786 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?PHP  // $Id: contents.php,v 1.6.8.1 2005/01/27 05:24:35 defacer Exp $

    require("../config.php");

    if (! $info = document_file("files.php", false)) {
        error("404 - File Not Found");
    }

    $string = array();
    if ($CFG->forcelogin) {
        require_login();
    }

    include($info->filepath);

    print_header();

    foreach ($string as $file => $filename) {
        if (substr($file,0,1) == "-") {
            echo '<p style="font-size:small;margin-bottom:0px;font-family:Trebuchet MS, Verdana, Arial, Helvetica, sans-serif;">'.
                  $filename.'</p>';
        } else {
            echo "<li style=\"font-size:small\"><a target=\"main\" href=\"$CFG->wwwroot/doc/?file=$file\">$filename</a></li>";
        }
    }
    
?>