Esempio n. 1
0
function item_infos($path, $elements_array)
{
    if (!is_object($GLOBALS["USERMENUS"])) {
        $users = new usersMenus();
        $GLOBALS["USERMENUS"] = $users;
    } else {
        $users = $GLOBALS["USERMENUS"];
    }
    if (!is_object($GLOBALS["SMBCLASS"])) {
        $smb = new samba();
        $GLOBALS["SMBCLASS"] = $smb;
    } else {
        $smb = $GLOBALS["SMBCLASS"];
    }
    $title = basename($path);
    $elements = count($elements_array);
    $img = "folder-96.png";
    if ($GLOBALS["USERMENUS"]->deduplication_installed) {
        $sock = new sockets();
        $mounted = unserialize(base64_decode($sock->getFrameWork("cmd.php?lessfs-mounts=yes")));
        if ($mounted[$path]) {
            $img = "folder-dedup-96.png";
        }
    }
    if (strlen($title) > 20) {
        $title = substr($title, 0, 17) . "...";
    }
    if ($users->SAMBA_INSTALLED) {
        if ($smb->main_shared_folders[$path] != null) {
            $img = "folder-granted-96.png";
        }
    }
    $smb = SambaInfos($path, $elements);
    $title = utf8_encode($title);
    $html = "\n<input type='hidden' value='{$_GET["id"]}' id='mem_id'>\n<div id='picture-title'>\n\t\t<img src='img/{$img}'>\n\t</div>\n\t<span style='font-size:16px'>{$title}</span><br>\n\t{$elements} {items}\n\t<hr>\n\t{$smb}\n\t</div>\n\t";
    return $html;
}
Esempio n. 2
0
function item_infos($path, $elements_array)
{
    if (!is_object($GLOBALS["USERMENUS"])) {
        $users = new usersMenus();
        $GLOBALS["USERMENUS"] = $users;
    } else {
        $users = $GLOBALS["USERMENUS"];
    }
    if (!is_object($GLOBALS["SMBCLASS"])) {
        $smb = new samba();
        $GLOBALS["SMBCLASS"] = $smb;
    } else {
        $smb = $GLOBALS["SMBCLASS"];
    }
    $title = basename($path);
    $elements = count($elements_array);
    $img = "folder-96.png";
    if (strlen($title) > 20) {
        $title = substr($title, 0, 17) . "...";
    }
    if ($users->SAMBA_INSTALLED) {
        if ($smb->main_shared_folders[$path] != null) {
            $img = "folder-granted-96.png";
        }
    }
    $smb = SambaInfos($path);
    $html = "\n<input type='hidden' value='{$_GET["id"]}' id='mem_id'>\n<div id='picture-title'>\n\t\t<img src='img/{$img}'>\n\t</div>\n\t<span style='font-size:16px'>{$title}</span><br>\n\t{$elements} {items}\n\t<hr>\n\t{$smb}\n\t</div>\n\t";
    return $html;
}