Beispiel #1
0
        break;
    case 'medialib_showfiles':
        $dir = $_GET['dir'];
        $page = $_GET['page'];
        if (empty($page)) {
            $page = 1;
        }
        $files = $db->fetch('uploads', 'dir', $dir, 'id', 'DESC', $page, 45);
        $pages_array = $db->pages_array('uploads', 'dir', $dir, $page, 45);
        include '../classes/uploads.php';
        $uploads = new Uploads();
        if (empty($files)) {
            echo $lang->get_phrase('directory_contains_no_files');
        } else {
            foreach ($files as $file) {
                $this_thumb = $uploads->get_thumb($file['id'], 'control');
                echo '
				<span>
				<div id="file_' . $file['id'] . '" class="file" title="' . $file['file_name'] . '" style="background:url(' . $this_thumb . ') no-repeat;background-size:110px 90px;" onmouseover="file_mouseover(' . $file['id'] . ');" onmouseout="file_mouseout(' . $file['id'] . ');">
				<input type="checkbox" onclick="checkbox_clicked(' . $file['id'] . ')" value="' . $file['id'] . '" id="tobeselected" />
				<br /><br />
				<button id="select" style="display:none" onclick="choose_photo(' . $file['id'] . ',\'' . $this_thumb . '\');">' . $lang->get_phrase('select') . '</button>
				
				<div id="title">' . mb_substr($file['file_name'], 0, 13) . '...</div>
				</div>
				</span>
				';
            }
        }
        $smarty->assign('current_page', $page);
        $smarty->assign('pages_array', $pages_array);