Exemplo n.º 1
0
function print_error($errstr, $predef)
{
    $exp_error['predef'] = $predef;
    $exp_error['errorstr'] = $errstr;
    display_directory($exp_error);
    page_close();
    exit;
}
Exemplo n.º 2
0
/**
 main process...
 NOTE: In order to add a file to the supported list below, apart from adding its extension to the list, you *MUST* supply a corresponding
 icon, and put it in the editor/icons folder
*/
function main_process($dir, $type, $lessons_ID)
{
    if ($type == "image") {
        $valid_file_types_temp = array("jpg", "gif", "png", "bmp");
    } elseif ($type == "files") {
        $valid_file_types_temp = array("zip", "html", "htm", "pdf", "doc", "xls", "ppt", "pps", "txt", "jpg", "gif", "png", "exe", "zip", "m", "mp3", "wav", "ra", "avi", "mov", "mpeg", "mid", "wma", "bmp", "wmv", "mp4");
        if ($_SESSION['s_type'] == "administrator") {
            $valid_file_types_temp[] = "php";
        }
    } elseif ($type == "flash") {
        $valid_file_types_temp = array("swf");
    } elseif ($type == "java") {
        $valid_file_types_temp = array("class");
    } elseif ($type == "videomusic") {
        $valid_file_types_temp = array("mp3", "wav", "ra", "avi", "mov", "mpeg", "mpg", "mid", "wma", "wmv", "mp4");
    } elseif ($type == 'all_files') {
        $valid_file_types_temp = array();
    } elseif ($type == "media") {
        $valid_file_types_temp = array("mp3", "wav", "ra", "avi", "mov", "mpeg", "mpg", "mid", "wma", "swf", "wmv", "avi", "mp4");
    }
    $valid_file_types = $valid_file_types_temp;
    // prostheto kai tis antistoixes katalikseis me kefalaia. makriria
    for ($i = 0; $i < sizeof($valid_file_types_temp); $i++) {
        $valid_file_types[] = mb_strtoupper($valid_file_types_temp[$i]);
    }
    //    $dir = preg_replace(G_RELATIVELESSONSLINK, "", $dir);
    //echo $dir;
    if (!$dir) {
        $dir = G_LESSONSPATH . $_SESSION['s_lessons_ID'];
    }
    display_directory($dir, $valid_file_types, $type, $lessons_ID);
}
Exemplo n.º 3
0
$kat = trim($kat);
$capabilities = get_caps($perm, $kat);
// this is used at many places
/*
 Mod_rewrite directs us all the queries to the directory to this file. Now
 we will have to find out whether we have to display a node, or a trail.
 
 If it's a trail, we must find out, if we can only redirect to the Trail-Window
 (we got called from the correct directory-node) or if we have to display
 the correct node (parent of Trail) and open the Trail in a new Window
*/
if (preg_match('/^\\/Experts\\/(.+)/', $kat, $found)) {
    display_mypage($found[1]);
} else {
    if (!is_trail($kat) or $kat == "/") {
        display_directory();
    } else {
        $autoopen = $kat;
        $sess->register("autoopen");
        header("Location: " . $sess->url(parent_path($kat)));
    }
}
page_close();
//echo("<p>");
/*foreach($auth->auth as $key => $value)
 echo("$key = $value<br>"); */
/*foreach($GLOBALS as $key => $value)
 echo("$key = $value<br>");*/
?>