<?php
/**
* Browses directory contents
* 
* This file is used by the editor, to display a lesson's folder contents
* @package eFront
* @version 1.0
*/

//General initializations and parameters
session_cache_limiter('none');
session_start();

$path = "../../libraries/";

/** The configuration file.*/
include_once $path."configuration.php";

eF_printHeader(); 

?>
<html>
<head>
<style type="text/css">
<!--
body {font-family:Verdana, Arial, sans-serif; font-size: 10pt;}
-->
</style>
</head>
<body bgcolor="white">
<font size="1">
<?php
    $size = 43;
    $tree = eF_getContentTree($nouse, $_SESSION['s_lessons_ID'], 0, false, true);
    for ($i = 0; $i < sizeof($tree); $i++) {
        $pre = eF_printContentPrestring($tree[$i]);
		if (mb_strlen($pre.$tree[$i]['name']) > $size) {
            $name = mb_substr($tree[$i]['name'], 0, $size - 3 - mb_strlen($pre))."...";
        } else {
            $name = $tree[$i]['name'];
        }
        $pre = str_replace("  ", "&nbsp;&nbsp;&nbsp;", $pre);
        //$url = G_SERVERNAME.'student.php?ctg='.$tree[$i]['ctg_type'].'&content_ID='.$tree[$i]['id'];
        $url = G_SERVERNAME.'##EFRONTINNERLINK##.php?ctg=content&view_unit='.$tree[$i]['id']; 
    
            $tree_data .= '&nbsp;&nbsp;'.$pre.'
            <a href = "#" title = "'.$tree[$i]['name'].'" 
                onClick = "top.document.getElementById(\'href\').value=\''.$url.'\'; 
                           top.document.getElementById(\'title\').value=\''.$tree[$i]['name'].'\';" 
                class = "tree_'.$tree[$i]['ctg_type'].'">'.$name.'</a>
            <br/>';
    
    
    
    
    }
    print $tree_data;
?>
</font>
</body>
</html>



