1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151
| <?PHP
//********************* RecurciveDIR 1.2 - Recursive PHP File List With Interactive & Visual Effects
//error_reporting(1);
function DirContent($Path,$Level=0){
$DEBUG=false;//***** For DEBUGGING
$ind=str_repeat(" ",$Level);
$FisrtLevel=$Level<1;
$Folders2Show=array("JPN");//***** CUSTOMIZE: Root Folders To Show
if($folder=opendir($Path)){
if($FisrtLevel){
echo "<H1>Sam's Files : ".date("Y.m.d")."</H1>\n";//Main Title
}
while(false!==($file=readdir($folder))){
$PathS=$Path."/".$file;
//Recursive Traitement For Sub-Folders
if(is_dir($Path."/".$file) && $file!='.' && $file!='..'){
if((in_array($file,$Folders2Show) && $FisrtLevel) || !$FisrtLevel){
$Fid=rand(100000,999999);
$BoderW=max(1,3-$Level);
$Hn=min(6,$Level+2);
$atH=" id='h$Fid'";
$inH2=substr($PathS,strrpos($PathS,"/")+1);
echo $ind."<H$Hn $atH>".$inH2."</H$Hn>\n";
$atD="style='border-width:".$BoderW."Px'";
$atD.=" id='d".$Fid."' class='on'";
echo $ind."<DIV ".$atD.">\n";
DirContent($PathS,$Level+1);
echo $ind."</DIV>\n";
}
}
if(!is_dir($PathS) && $file!="." && $file!=".."){
if(!$FisrtLevel){
$Ext2Hide=array("PHP","HTM","HTML"); //Extensions To Hide = Viewable Files
$Ext=strtoupper(substr($file,strrpos($file,".")+1));
$Title="";
if(in_array($Ext,$Ext2Hide)){
$Filename=substr($file,0,strrpos($file,"."));//Hide The Extension
//$Title="title=' View ".$file."'";
}else{
$Filename=$file; //Show The Extension
$Title="title=' Download ".$file."'";
}
$href=$DEBUG?"#":$PathS;
echo $ind."<P><a href='".$href."' $Title>".$Filename."</a></P>\n";//Link To The File
}
}
}
closedir($folder);
}
}
//*************************************************************************************** Link List!
function LinksLIST(){
$LinkFN="LiNKS.LOG";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Sam's Files</title>
<style type="text/css">
<!--
HTML,*{margin:0Px;padding:0Px}
BODY {font-family:"Trebuchet MS",Arial,sans-serif;font-size:13Px;margin:20Px;cursor:default;}
H1,H2,H3,H4,H5,H6 {margin-top:5Px;}
H2,H3,H4,H5,H6 {cursor:pointer;}
H1{font-size:20Px;margin-bottom:15Px}
H2{font-size:17Px;}
H3{font-size:16Px;}
H4{font-size:15Px;}
H5{font-size:14Px;}
H6{font-size:13Px;}
HR{height:1Px;color:#666666;}
P {padding:4Px 0 0 0;}
A {text-decoration:none;color:#0000CC;}
A:hover {color:#993300;}
DIV {padding-left:8Px;border-color:#979748;border-left-style:solid;}
DIV.on {display:block;font-weight:normal}
DIV.off {display:none; font-weight:bold ;}
DIV.over{background-color:#F1F1E2;}
DIV.out {}
DIV#foot a#SP{display:none;}
DIV#foot a{margin:0 0 0 9Px;vertical-align:top;}
DIV#foot{font-size:14Px;text-align:right;border:solid #999999;border-width:1Px 0 0 0;margin-top:8Px}
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
//Interactive Sub-Folders FX
function SwitchDIV(){
var Elems=new Array("H2","H3","H4","H5","H6");//Elements To Affect Rollover FX
var HideS=" Hide this folder's content ! ";
var ShowS=" Show this folder's content ! ";
if(document.getElementsByTagName){
for(n=0;n<Elems.length;n++){
var el=document.getElementsByTagName(Elems[n]);
for(var i=0;i<el.length;i++){
el[i].show=true;
el[i].title=HideS;
el[i].Fname=el[i].innerHTML;
el[i].innerHTML="- "+el[i].Fname;
el[i].cible=document.getElementById("d"+el[i].id.substr(1));//Sub-Folder's DIV
el[i].onmouseover=function(){//Rollover FX
if(this.show){
this.cible.className="over";
}
}
el[i].onmouseout=function(){//Rollout FX
if(this.show){
this.cible.className="out";
}
}
el[i].onclick=function(){//Hide/Show Sub-Folders Content
if(this.show){
this.show=false;
this.title=ShowS;
this.cible.className="off";
this.innerHTML="+ "+this.Fname;
}else{
this.show=true;
this.title=HideS;
this.cible.className="on over";
this.innerHTML="- "+this.Fname;
}
}
}
}
}
}
//Blur All Links OnCLICK To Hide Dotted Borders
function BlurLNK(){
var linkE=document.getElementsByTagName("a");
if(document.getElementsByTagName){
for(i=0;i<linkE.length;i++){
linkE[i].onclick=function(){this.blur();}
}
}
}
// -->
</script>
</head>
<body onload="SwitchDIV();BlurLNK()">
<?PHP DirContent("."); ?>
<div id="foot">
<a href="mailto:%41%6c%66%2e%30%32%32%40%47%6d%61%69%6c%2e%63%6f%6d"> Comment ?! </a>
<a id="SP" href="http://french-145495639767.spampoison.com"><img src="http://pics4.inxhost.com/images/sticker.gif" border="0"/></a>
</div>
</body>
</html> |
Partager