コード例 #1
0
ファイル: tools.php プロジェクト: m1has1k/Okay
function GetFiles($dir, $orderby)
{
    $files = array();
    if ($dh = @opendir($dir)) {
        while ($file = readdir($dh)) {
            if (!preg_match("/^\\.+\$/", $file)) {
                if (is_file($dir . $file) && (IsFileExt($file, "jpg") || IsFileExt($file, "jpeg") || IsFileExt($file, "gif") || IsFileExt($file, "png"))) {
                    $files[0][] = $file;
                    $files[1][] = filemtime($dir . $file);
                    $files[2][] = filesize($dir . $file);
                    $files[3][] = Image_GetWidth($dir . $file);
                }
            }
        }
        closedir($dh);
    }
    switch ($orderby) {
        case "0":
            @array_multisort($files[1], SORT_NUMERIC, SORT_DESC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "1":
            @array_multisort($files[0], SORT_STRING, SORT_ASC);
            break;
        case "2":
            @array_multisort($files[0], SORT_STRING, SORT_DESC);
            break;
        case "3":
            @array_multisort($files[2], SORT_NUMERIC, SORT_ASC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "4":
            @array_multisort($files[2], SORT_NUMERIC, SORT_DESC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "5":
            @array_multisort($files[3], SORT_NUMERIC, SORT_ASC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "6":
            @array_multisort($files[3], SORT_NUMERIC, SORT_DESC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "7":
            @array_multisort($files[1], SORT_NUMERIC, SORT_ASC, $files[0], SORT_STRING, SORT_DESC);
            break;
        case "8":
            @array_multisort($files[1], SORT_NUMERIC, SORT_DESC, $files[0], SORT_STRING, SORT_DESC);
            break;
    }
    // Server-Cache löschen
    clearstatcache();
    // Datei-Array zurückgeben
    return $files[0];
}
コード例 #2
0
ファイル: index.php プロジェクト: m1has1k/Okay
echo bin2hex(RC4("id=1&orderby=" . $orderby[0]["status"] . "&" . $GET3));
?>
\');', 'SMExplorer_Orderby(\'<?php 
echo bin2hex(RC4("id=1&orderby=" . $orderby[1]["status"] . "&" . $GET3));
?>
\');', 'SMExplorer_Orderby(\'<?php 
echo bin2hex(RC4("id=1&orderby=" . $orderby[2]["status"] . "&" . $GET3));
?>
\');'));
		
		// Tabellenzeile(n) hinzufügen
		<?php 
for ($i = 0; $i < count($FILES); $i++) {
    $icon = "";
    // Datei-Icon
    if (IsFileExt($FILES[$i], "jpg") || IsFileExt($FILES[$i], "jpeg") || IsFileExt($FILES[$i], "gif") || IsFileExt($FILES[$i], "png") || IsFileExt($FILES[$i], "bmp") || IsFileExt($FILES[$i], "tif") || IsFileExt($FILES[$i], "ico")) {
        if ($CONFIG["show_preview"] == 1) {
            $a = array();
            $a = GetNewImageSize($SESSION["dir"] . $FILES[$i], 200);
            // Bilddatei mit Thumbnail-Anzeige
            $icon = "<div id=\"th" . $i . "\" class=\"jsmpreview\"></div><img style=\"cursor:pointer;\" src=\"img/icon_image_16x16.png\" border=\"0\" onmouseover=\"jSMP.Show(\\'th" . $i . "\\', \\'" . $SESSION["dir"] . $FILES[$i] . "\\', \\'" . $a["width"] . "\\', \\'" . $a["height"] . "\\');\" onmouseout=\"jSMP.Close(\\'th" . $i . "\\');\" onclick=\"SMExplorer_Insert(\\'" . $SESSION["server"] . "\\', \\'" . $SESSION["dir"] . $FILES[$i] . "\\', \\'" . $SESSION["link_target"] . "\\');\" />";
            unset($a);
        } else {
            // Bilddatei ohne Thumbnail-Anzeige
            $icon = "<img style=\"cursor:pointer;\" src=\"img/icon_image_16x16.png\" border=\"0\" onclick=\"SMExplorer_Insert(\\'" . $SESSION["server"] . "\\', \\'" . $SESSION["dir"] . $FILES[$i] . "\\', \\'" . $SESSION["link_target"] . "\\');\" />";
        }
    } else {
        // Keine Bilddatei
        $icon = "<img style=\"cursor:pointer;\" src=\"img/icon_file_16x16.png\" border=\"0\" onclick=\"SMExplorer_Insert(\\'" . $SESSION["server"] . "\\', \\'" . $SESSION["dir"] . $FILES[$i] . "\\', \\'" . $SESSION["link_target"] . "\\');\" />";
    }
    if ($SESSION["show_file_menu"] == 1) {