" Symbole vor Ordner-Name. | | + Sortier-Funktion für Name/Size/Date/Downloads. | | v1.35 2007.01.30 ! Ersetzt: "<" zu "<" und ">" zu ">" | | v1.36 2007.02.26 + Verstecke "robots.txt" Datei. | | v1.37 2007.03.01 ! Kleine HTML-Fehler entfernt. | | v1.38 2007.03.16 + rawurlencode() fuer Links hinzugefuegt. | | v1.39 2007.07.16 ! Zelle für Beschreibung vergroessert: ColSpan 2 -> 4 | | v1.40 2007.08.11 + Download-Link jetzt auch beim Klick aufs Bild. | | v1.41 2007.08.31 + Link-Datei (*.lnk) [Linie1=url, Linie2=href target] | | v1.42 2007.08.31 + Erweiterung ,.upload zum verstecken von Uploads. | | v1.43 2007.08.31 ! Link: Meta-Refresh Redirect, wenn Header nicht geht. | | v1.44 2007.08.31 ! Link: kleinere Fehler beseitigt. | | v1.45 2007.09.01 + History in Deutsch, weil mein English zu schlecht... | | v1.46 2007.09.09 ! Referer Log-File: Browser-Spalte von 90 > 140 Zeichen | | v1.47 2007.09.15 + Spy/AdWare-Warnung fuer SIMBAR hinzugefügt. | | v1.48 2007.09.22 + HostName in Referer Log-File hinzugefuegt. | | + Optional kann das Log-File im CSV gespeichert werden. | | ! Date() fuer Bildung des Datums / der Zeit verwendet. | | ! Referer Log-File: Browser-Spalte 120 Zeichen. | | v1.49 2007.09.23 + HostName in Referer Log-File auf Domain gekuertzt. | | v1.50 2007.10.01 ! Index.php Referer-File zu Log-File umbenannt (,.log) | | ! Prüft ob angeklickte Datei vorhanden ist. | | + Welche Datei/Link wurde geklickt? | | v1.51 2007.10.03 ! Fehler bei SIMBAR-Erkennung beseitigt. | | v1.52 2007.10.05 + Bilder Anzeigen hinzugefügt. $spic=true setzen! | | v1.53 2008.02.23 + $self als Parameter hinzugefuegt. | | v1.60 2008.10.10 + Support fuer FLV-Files. flvplayer.swf wird benoetigt. | | ! Fehler bei HTML-Code generierung von Links behoben. | | v1.61 2008.11.03 ! Fehler beim deaktivieren von FLV-Download beseitigt. | | v1.62 2009.02.27 + Ankter eingefuehrt (index.php#filename) | | v1.63 2009.04.11 ! Fehler bei FLV-Player beseitigt | | v1.64 2011.04.21 ! Globale Variabeln gegen GetEnv() ersetzt. | | v1.65 2011.10.12 + date_default_timezone_set hinzugefuegt. | | v1.70 2011.10.13 ! Diverse Optimierungen und Verbesserungen. | | ! Variablen Namen für FLVplayer geaendert. | | ! Name von des Players zu .player.swf geaendert. | | + Funktion zum Abspielen von MP3 eingebaut. | | + Optionaler Autostart des Player in grosser Ansicht. | | + Reihenfolge von Bild/Player und Text aenderbar. | | | | Legend: +: Add, -: Remove, !: Bugfix/Update | | | +---------------------------------------------------------------------------------------+ */ /// Special files: /// /// .message = Display included message if exists this file. /// .picture.png = Display picture if exists this file. /// /// file.ext = A file ... /// file.ext,.inf = Display included description if exists. /// file.ext,.png = Screenshot image. Display if exists. /// file.ext,.cnt = Counter file. Automatic generated! /// Attention: The commas on extension are recommanded! date_default_timezone_set('Europe/Berlin'); /// http://php.net/manual/de/function.date-default-timezone-set.php $dfmt = "Y.m.d"; /// Datums-Formatierung. Siehe: http://de.php.net/manual/de/function.date.php $tfmt = "H:i:s"; /// Zeit-Formatierung. $lcsv = false; /// Referer Log-File im CSV-Format speichern? /// False: Im Klartext und Spaltenorientiert speichern /// True: Im CSV [Comma Separated Values] speichern ("Wert1","Wert2","...") $ordr = 0; /// 0: Reihenfolge = Bild/Player, Beschreibungstext /// 1: Reihenfolge = Beschreibungstext, Bild/Player $spic = false; /// False: keine Bilder anzeigen /// True: Bilder anzeigen $prvv = true; /// False: normales ,.png als Vorschaubild für Player /// True: Video als Vorschaubild im Player anzeigen $mdwn = true; /// False: Media-Datei als normalen Download behandeln. /// True: Media-Datei im FLVplayer anzeigen. $plxh = 19; /// Hoehe der Bedienleiste des FLVplayers $plsw = 320; /// Breite fuer kleine Ansicht $plsh = 240; /// Hoehe fuer kleine Ansicht $plbw = 640; /// Breite fuer grosse Ansicht (YouTube = 430) $plbh = 480; /// Hoehe fuer grosse Ansicht (YouTube = 320) $plbc = "0x627188"; /// Player Hintergrund-Farbe $plfc = "0xEEEEEE"; /// Player Vordergrund-Farbe $pllc = "0xFFCC22"; /// Player helle Farbe $dwnl = true; /// True: Download der Media-Datei erlauben /// False: Media-Datei kann nur abgespielt werden $aapl = true; /// Audio Autoplay in grosser Ansicht $vapl = true; /// Video Autoplay in grosser Ansicht $eupl = ".upload"; /// Extension of upload file (for hide upload files) $einf = ".inf"; /// Extension of description file $epic = ".png"; /// Extension of screenshot image $ecnt = ".cnt"; /// Extension of counter file $eref = ".ref"; /// Extension of referer file $elog = ".log"; /// Extension of log file $elnk = ".lnk"; /// Extension of link file $plyr = ".player.swf"; /// Path of Media-Player .player.swf $aext = ".aac.mp3.ogg"; /// Extensions of Audio files $vext = ".flv.mov"; /// Extensions of Video files $pext = ".gif.jpg.jpeg.png.bmp"; /// Extensions of images /// -------------------------------------------------------------- $ver = "1.70"; $dat = "2011.10.13"; $self = $_GET["self"]; $send = $_GET["send"]; $link = $_GET["link"]; $play = $_GET["play"]; $sort = $_GET["sort"]; $w = $_GET["w"]; $h = $_GET["h"]; if ($self=="") { $self = $_SERVER["SCRIPT_NAME"]; } $host = GetEnv("HTTP_HOST"); $refe = GetEnv("HTTP_REFERER"); $ipnr = GetEnv("REMOTE_ADDR"); $hnam = GetHostByAddr($ipnr); $brid = GetEnv("HTTP_USER_AGENT"); $name = BaseName($self); $path = DirName($self); $pathx = str_replace("%20", " ", $path); if ($path == "\\") $path=""; if ($pathx == "\\") $pathx="/"; $datum = date($dfmt); $zeit = date($tfmt); $numbers = 5; // Numbers of counter digits in Referer-File $ninf = ",".$einf; $npic = ",".$epic; $ncnt = ",".$ecnt; $nref = ",".$eref; $nlog = ",".$elog; $nupl = ",".$eupl; $ls = $name; if (($send != "") & ($link == "") & ($play == "")) { $ls = $send; } if (($send == "") & ($link != "") & ($play == "")) { $ls = $link; } if (($send == "") & ($link == "") & ($play != "")) { $ls = $play; } if ($w != "") { $plbw = $w; } if ($h != "") { $plbh = $h; } if (!file_exists($plyr)) { $mdwn = false; $prvv = false; } if ($plsw == "") { $plsw = "320"; } if ($plsh == "") { $plsh = "240"; } if ($plbw == "") { $plbw = "640"; } if ($plbh == "") { $plbh = "480"; } if ($ipnr == $hnam) { $hnam = ""; } if ($hnam != "") { $hnax = explode (".", $hnam); $hnct = count($hnax) - 1; if ($hnct > 1) { $hnam = $hnax[$hnct-1].".".$hnax[$hnct]; } if ($hnct > 2) { $hnam = $hnax[$hnct-2].".".$hnam; } } if ($lcsv == false) { $lst1 = str_pad($datum, 10, " ")." ". str_pad($zeit, 8, " ")." ". str_pad($ipnr, 15, " ", STR_PAD_LEFT)." ". substr(str_pad($hnam, 25, " "), 0, 25)." "; if (strlen($ls) <= 30) { $lst2 = str_pad($ls, 35, " ")." "; } else { $lst2 = "... ".substr($ls, -31, 31)." "; } $lst3 = substr(str_pad($brid, 120, " "), 0, 120)." ". $refe; $lstr = rtrim($lst1.$lst2.$lst3).chr(13).chr(10); $lstx = rtrim($lst1.$lst3).chr(13).chr(10); $xst1 = ""; $xst2 = ": "; } else { $lst1 = '"'.$datum.'","'.$zeit.'","'.$ipnr.'","'.$hnam.'","'; $lst2 = $ls.'","'; $lst3 = $brid.'","'.$refe.'"'; $lstr = rtrim($lst1.$lst2.$lst3).chr(13).chr(10); $lstx = rtrim($lst1.$lst3).chr(13).chr(10); $xst1 = '"'; $xst2 = '",'; } if (strrchr($send, "/") != "") { die("\ERROR!"); } if (strrchr($link, "/") != "") { die("\ERROR!"); } if (strrchr($play, "/") != "") { die("\ERROR!"); } if ($send != "") { // Download-Counter/Log $fcnt = "0"; $ffile = $send.$ncnt; if (!file_exists($send)) { die("SEND ERROR!"); } if (file_exists($ffile)) { $fcnt = file_get_contents($ffile); } $fcnt++; if ($hcnt = fopen($ffile,"w")) { fputs($hcnt, $fcnt); fclose($hcnt); } if ($refe != "") { $ffile = $send.$nref; if ($href = fopen($ffile,"a")) { $fcntx = str_pad($fcnt, $numbers, "0", STR_PAD_LEFT); $refx = $xst1.$fcntx.$xst2.$lstx; // $refx = $fcntx.": ".$lstx; // $refx = $fcnt.": ".$refe."\r\n"; fwrite($href, $refx); fclose($href); } } $sendx = "http://".$host.$path."/".$send; header("Location: ".$sendx, true); exit; } else { // PHP-Counter/Log $ffile = $name.$ncnt; if (file_exists($ffile)) { $fcnt = file_get_contents($ffile); } $fcnt++; if ($hcnt = fopen($ffile,"w")) { fputs($hcnt, $fcnt); fclose($hcnt); } // if ($refe != "") { // index.php,.log $ffile = $name.$nlog; if ($href = fopen($ffile,"a")) { $fcntx = str_pad($fcnt, $numbers, "0", STR_PAD_LEFT); $refx = $xst1.$fcntx.$xst2.$lstr; // $refx = $fcnt.": ".$refe."\r\n"; fwrite($href, $refx); fclose($href); } // } } if (($send == "") & (($link != "") | (($play != "") & ($plyr == true)))) { // Download-Counter/Log if ($link != "") { $link .= $elnk; $ffile = $link.$ncnt; if (!file_exists($link)) { die("LINK ERROR!"); } } if ($play != "") { $ffile = $play.$ncnt; if (!file_exists($play)) { die("FILE NOT FOUND!"); } } $fcnt = "0"; if (file_exists($ffile)) { $fcnt = file_get_contents($ffile); } $fcnt++; if ($hcnt = fopen($ffile,"w")) { fputs($hcnt, $fcnt); fclose($hcnt); } /// LINK /// if ($link != "") { if ($refe != "") { $ffile = $link.$nref; if ($href = fopen($ffile,"a")) { $fcntx = str_pad($fcnt, $numbers, "0", STR_PAD_LEFT); $refx = $xst1.$fcntx.$xst2.$lstx; // $refx = $fcnt.": ".$refe."\r\n"; fwrite($href, $refx); fclose($href); } } if ($hlnk = @fopen($link,"r")) { $linkx = fgets($hlnk); $linkx = str_replace("\n", "", $linkx); $linkx = str_replace("\r", "", $linkx); fclose($hlnk); } if (strrchr($linkx, "://") != "") { if (@header("Location: ".$linkx, true) == false) { print "\n". " ". " \n". " \n". " \n". " Redirect: $linkx
\n". " \n". "\n"; } exit; } } /// PLAY /// if (($play != "") & ($mdwn == true)) { $plyi = $play.$npic; $plyf = $play; $fext = strtolower(substr($plyf, -4, 4)); if (strpos($vext, $fext) !== false) { $xtyp = "Video"; $xsh = $plsh + $plxh; $xbh = $plbh + $plxh; if ($vapl == true) { $aply = "true"; } else { $aply = "false"; } } if (strpos($aext, $fext) !== false) { $xtyp = "Audio"; $xsh = $plxh; $xbh = $plxh; if ($aapl == true) { $aply = "true"; } else { $aply = "false"; } } if (!file_exists($plyi)) { $plyi = ""; } print " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n\n"; exit; } } $dir = "."; $dh = @opendir ($dir); If ($width == "") { $width = "400"; } else { $widthy = "?width=$width"; } $widthx = " width=\"$width\""; $FCount = "0"; $BCount = "0"; $DCount = "0"; $pfile = ".picture$epic"; if (file_exists($pfile)) { $mtext .= " \n". " \n". " \n". " \n". "
\n". "
$nbsp\n". "
\n". "\n"; } $mfile = ".message"; if (file_exists($mfile)) { $ftext = file_get_contents($mfile); $mtext .= " \n". " \n". " \n". " \n". "
\n". "
\n".
      "$ftext".
      "     
\n". "
\n"; } $ACount = 0; while (false !== ($file = readdir($dh))) { $xinf = strpos(strtolower($file),strtolower($ninf)); $xpic = strpos(strtolower($file),strtolower($npic)); $xcnt = strpos(strtolower($file),strtolower($ncnt)); $xref = strpos(strtolower($file),strtolower($nref)); $xlog = strpos(strtolower($file),strtolower($nlog)); $xupl = strpos(strtolower($file),strtolower($nupl)); if (($file != ".") & ($file != $name) & ($file != $mfile) & ($file != $pfile) & ($file != $plyr) & ($file != "robots.txt") & ($xinf == 0) & ($xpic == 0) & ($xcnt == 0) & ($xref == 0) & ($xlog == 0) & ($xupl == 0) & (substr($file, 0, 3) != ".ht")) { $ACount++; if (is_file($file)) { $AFile[$ACount][FFile] = 1; } else { $AFile[$ACount][FFile] = 0; } $file = htmlspecialchars($file); if (file_exists($file.$ncnt)) { $mcnt = file_get_contents($file.$ncnt); $DCount += $mcnt; } else { $mcnt = "0"; } $AFile[$ACount][FName] = $file; $AFile[$ACount][FSize] = filesize($file); $AFile[$ACount][FTime] = date($tfmt,filectime($file)); $AFile[$ACount][FDate] = date($dfmt,filectime($file)); $AFile[$ACount][DLoad] = $mcnt; } } foreach ($AFile as $Key => $Row) { $AFFile[$Key] = $Row[FFile]; $AFName[$Key] = $Row[FName]; $AFSize[$Key] = $Row[FSize]; $AFTime[$Key] = $Row[FTime]; $AFDate[$Key] = $Row[FDate]; $AFLoad[$Key] = $Row[DLoad]; } $TFile = "Filename:"; $OFile = "a"; $TSize = "Size:"; $OSize = "a"; $TDate = "Date:"; $ODate = "a"; $TLoad = "DL#:"; $OLoad = "a"; $sort = strtolower($sort); $s = strtolower($s); $o = strtolower($o); if (strlen($sort) == 1) { $s = $sort; } if (strlen($sort) == 2) { $s = substr($sort, 0, 1); $o = substr($sort, 1, 1); } if ($sort != "") { $sortx = "?sort=".$sort; // Sort Sub-Directorys } if (($s == "") | ($s == "f")) { $TFile = "".$TFile.""; if (($o == "a") | ($o == "")) { $OFile = "d"; array_multisort($AFFile, SORT_ASC, $AFName, SORT_ASC, $AFile); } if ($o == "d") { $OFile = "a"; array_multisort($AFFile, SORT_ASC, $AFName, SORT_DESC, $AFile); } } if ($s == "s") { $TSize = "".$TSize.""; if (($o == "a") | ($o == "")) { $OSize = "d"; array_multisort($AFFile, SORT_ASC, $AFSize, SORT_ASC, $AFile); } if ($o == "d") { $OSize = "a"; array_multisort($AFFile, SORT_ASC, $AFSize, SORT_DESC, $AFile); } } if ($s == "d") { $TDate = "".$TDate.""; if (($o == "a") | ($o == "")) { $ODate = "d"; array_multisort($AFFile, SORT_ASC, $AFDate, SORT_ASC, $AFTime, SORT_ASC, $AFile); } if ($o == "d") { $ODate = "a"; array_multisort($AFFile, SORT_ASC, $AFDate, SORT_DESC, $AFTime, SORT_DESC, $AFile); } } if ($s == "l") { $TLoad = "".$TLoad.""; if (($o == "a") | ($o == "")) { $OLoad = "d"; array_multisort($AFFile, SORT_ASC, $AFLoad, SORT_ASC, $AFile); } if ($o == "d") { $OLoad = "a"; array_multisort($AFFile, SORT_ASC, $AFLoad, SORT_DESC, $AFile); } } reset ($AFile); if (strpos($brid, "SIMBAR={") > 0) { print ( "\n". " $brid\n". "
\n". "
\n". " WARNUNG: Sicherheitrisiko! Wir haben festgestellt, daß Ihr Browser mit der SpyWare/AdWare \"SIMBAR\" infiziert ist!
\n". " WARNING: Safty risk! We discovered that your Browser is infected with the SpyWare/AdWare \"SIMBAR\"!
\n". "

\n". "
\n" ); } print ( "\n". " \n". " \n". " \n". " \n". "
\n". " Index of:  $pathx

\n". "
\n". "\n". $mtext. "\n". " \n". " \n". " $TFile  \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n" ); For ($AFor = 0; $AFor < $ACount; $AFor++) { $fdir = $AFile[$AFor][FFile]; $file = $AFile[$AFor][FName]; if ($file != ".."){ $FSize = $AFile[$AFor][FSize]; $FTime = $AFile[$AFor][FTime]; $FDate = $AFile[$AFor][FDate]; $mcnt = $AFile[$AFor][DLoad]; $FSizeX = number_format($FSize, 0, ',', '.'); } else { $FSize = "" ; $FTime = ""; $FDate = ""; $FSizeX = ""; } $mx = 0; $ext3 = strtolower(substr($file, -3, 3)); $fext = strtolower(substr($file, -4, 4)); $filex = substr($file, 0, -4); if (strpos($vext, $fext) !== false) { $xtyp = "Video"; $xsh = $plsh + $plxh; $xbh = $plbh + $plxh; } if (strpos($aext, $fext) !== false) { $xtyp = "Audio"; $xsh = $plxh; $xbh = $plxh; } $ftyp = strtoupper($ext3)." ".$xtyp; if (is_file($file)) { $URL = $self."?send=".RawUrlEncode($file); if ($fext == $elnk) { $URL = $self."?link=".RawUrlEncode($filex); } if ((strpos($vext.$aext, $fext) !== false) & $mdwn == true) { $URL = $self."?play=".RawUrlEncode($file); } } if (file_exists($file.$ninf)) { if ($ordr == 0) { $nbsp = " "; } else { $nbsp = ""; } $finf = file_get_contents($file.$ninf); $minf = " \n". "
$finf$nbsp
\n". "
\n"; $mx = 1; } else { $finf = ""; $minf = ""; } $mpic = ""; if ($ordr == 1) { $nbsp = " "; } else { $nbsp = ""; } if (file_exists($file.$npic)) { $mpic = "
$nbsp\n"; $mx = 1; } else { if ($spic == true) { if (strpos($pext, $fext) !== false) { $mpic = "
$nbsp\n"; $mx = 1; } } } if (($mdwn == true) & ($prvv == true)) { if (strpos($vext.$aext, $fext) !== false) { if ($ordr == 1) { $nbsp = " "; } else { $nbsp = ""; } $plyi = $file.$npic; $plyf = $file; if (!file_exists($plyi)) { $plyi = ""; } $mpic = " \n". " \n". " \n". " \n". " \n". " \n". " \n". " $nbsp\n"; $mx = 1; } } if ($mx == 1) { $mhdr = " \n". " \n". " \n"; } else { $mhdr = ""; $mfot = ""; } // Ausgabe zusammensetzen if ($ordr == 0) { $mout = $mhdr.$mpic.$minf.$mfot; } if ($ordr == 1) { $mout = $mhdr.$minf.$mpic.$mfot; } if (is_file($file)) { if (($fext == $elnk) | (((strpos($vext.$aext, $fext) !== false)) & ($mdwn == true))) { if ($fext == $elnk) { if ($hlnk = fopen($file,"r")) { $linkx = fgets($hlnk); $linkx = str_replace("\n", "", $linkx); $linkx = str_replace("\r", "", $linkx); $target = fgets($hlnk); $target = str_replace("\n", "", $target); $target = str_replace("\r", "", $target); if ($target != "") { $target = "target=\"$target\""; } fclose($hlnk); } $LURL = $self."?link=".RawUrlEncode($filex); print ( " \n". " \n". " \n". " \n". " \n". " \n$mout" ); } if ((strpos($vext.$aext, $fext) !== false) & $mdwn == true) { $LURL = $self."?play=".RawUrlEncode($file); if ($dwnl == true) { $fdwn = " [Download]"; } print ( " \n". " \n". " \n". " \n". " \n". " \n$mout" ); } } else { print ( " \n". " \n". " \n". " \n". " \n". " \n$mout" ); $FCount++; $BCount += $FSize; } } else { if (file_exists("$file/$name")) { if ($file == "..") { $dirx = "<"; $fstr = ".. BACK"; } else { $dirx = ">"; $fstr = $file; } $URLi = RawUrlEncode($file)."/$name$sortx$widthy"; print ( " \n". " \n". " \n". " \n". " \n". " \n". "$mout" ); } } } $BCountX = number_format($BCount, 0, ',', '.'); print ( " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". " \n". "
$TSize  $TDate $TLoad

\n". " \n". " \n". " \n". " \n". " \n". "
\n"; $mfot = "
\n". "
".rtrim($filex)."  [LINK]  $FDate  $FTime $mcnt
".rtrim($filex)."$fdwn  [$ftyp]  $FDate  $FTime $mcnt
$file  $FSizeX  $FDate  $FTime $mcnt
$dirx $fstr  $dirx [DIR]  $FDate  $FTime

$FCount Files  $BCountX  Bytes  $DCount
\n" ); /*** Don't remove my Copyright! ***/ print ( "\n". " \n". " \n". " \n". " \n". "
\n". " \n". "
[ VD.phpFileList v$ver / Powered by V-NetWork / $dat ]\n". "
\n". "
\n". "\n" ); ?>