101 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			101 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| $files=scandir(".");
 | |
| $fn=sizeof($files);
 | |
| $c=0;
 | |
| 
 | |
| while ($c<$fn)
 | |
| {
 | |
| $f=$files[$c];
 | |
| 
 | |
| if (strpos($f,".")!==false)
 | |
| {
 | |
| $fx=explode(".",$f);
 | |
| if ($f!="index.php" && substr($f,0,1)!="_" && ($fx[1]=="htm" || $fx[1]=="php"))
 | |
| {
 | |
| $fo=fopen($f,"r");
 | |
| $fr=fread($fo,filesize($f));
 | |
| fclose($fo);
 | |
| $fr=explode("<title>",$fr);
 | |
| $fr=explode("</title>",$fr[1]);
 | |
| $fr=$fr[0];
 | |
| 
 | |
| if (strpos($fr,"?>")!==false) {
 | |
| $fr=explode("?>",$fr);
 | |
| $fr=$fr[1];
 | |
| }
 | |
| 
 | |
| $fw=$fw.$fr."&".$f."/";
 | |
| }
 | |
| }
 | |
| $c++;
 | |
| }
 | |
| $fw=explode("/",$fw);
 | |
| sort($fw);
 | |
| $fn=sizeof($fw)-2;
 | |
| $c=0;
 | |
| 
 | |
| while ($c<$fn)
 | |
| {
 | |
| $fa=$fw[$c+1];
 | |
| $fa=explode("&",$fa);
 | |
| $fp=$fp."<a href='".$fa[1]."'>".$fa[0]."</a>";
 | |
| $c++;
 | |
| }
 | |
| ?>
 | |
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 | |
| <html xmlns="http://www.w3c.org/1999/xhtml" xml:lang="da">
 | |
| <head>
 | |
| <title>Experiments</title>
 | |
| <style type='text/css'>
 | |
| * {
 | |
| 	text-decoration:none
 | |
| 	}
 | |
| 
 | |
| body {
 | |
| 	background-color:#000;
 | |
| 	font-family:verdana;
 | |
| 	}
 | |
| 	
 | |
| #wrapper {
 | |
| 	margin:0 auto;
 | |
| 	width:250px;
 | |
| 	}
 | |
| 
 | |
| #h {
 | |
| 	font-size:32px;
 | |
| 	color:#fff;
 | |
| 	text-align:center;
 | |
| 	}
 | |
| 
 | |
| #s {
 | |
| 	
 | |
| 	background-color:#fff;
 | |
| 	font-size:16px;
 | |
| 	margin:5px 0 0 0;
 | |
| 	padding:2px;
 | |
| 	}
 | |
| 
 | |
| a {
 | |
| 	display:block;
 | |
| 	}
 | |
| 
 | |
| a:link,a:visited {
 | |
| 	color:#000;
 | |
| 	background-color:#fff;
 | |
| 	}
 | |
| 
 | |
| a:hover {
 | |
| 	color:#fff;
 | |
| 	background-color:#000;
 | |
| 	}
 | |
| </style>
 | |
| </head>
 | |
| <body>
 | |
| <div id='wrapper'>
 | |
| <div id='h'>Experiments</div>
 | |
| <div id='s'>
 | |
| <?php echo $fp; ?>
 | |
| </div>
 | |
| </div>
 | |
| </body>
 | |
| </html>
 | 
