File: index.php

package info (click to toggle)
iog 1.03-6
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 2,393; sh: 51; php: 24; makefile: 2
file content (43 lines) | stat: -rw-r--r-- 943 bytes parent folder | download | duplicates (6)
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
<html>
<head></head>
<body>
<?

// Index script for IOG (http://www.dynw.com/iog/) contributed by
// Preston Carter [preston@ashenet.net]


echo "<b>Click on host to view transfer stats</b><br><br>";

$directory = "./";
$handle = opendir('.');
closedir($handle);
$handle=opendir('.');
$counter = 0;
while ($file = readdir($handle)) {
// Filter by extension type
$the_type = strrchr($file, "."); 
$allow_file = eregi("html",$the_type);
if ($file != "." and $file != ".." and $allow_file) {
 // Get name without extension
 if ($a=strpos($file,'.')) {
     $ext=substr($file,$a); // . inside
     $file=substr($file,0,$a);
 $myfiles[$counter] = $file;
 // Test for presence of -days, -months
 $ok=(strpos($file,'-month')===FALSE);
 $ok=($ok AND (strpos($file,'-day')===FALSE));
 // if ok, memorize and print
 if ($ok) {
   echo "<a href=\"$directory$file$ext\">$file</a><br>";
   $counter++;
   }
  }
 }
}
closedir($handle);
?>

</body>
</html>