Subversion Repositories cryptochat

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
<?php
2
 
3
if ($_GET['show'] != 'all') {
4
        echo '<meta http-equiv="refresh" content="2">';
5
}
6
 
7
echo '<style type="text/css">BODY{font-family:Verdana, Arial, Helvetica, sans-serif}</style>';
8
 
9
$fileRead = file_get_contents("messages.txt");
10
 
11
$expl = explode("\n", $fileRead);
12
 
13
$e = count($expl);
14
 
15
// -1, da am Dateiende immer "\n" (Leerzeile)
16
 
17
if ($_GET['show'] == 'all') {
18
        $s = count($expl);
19
} else {
20
        $s = $_GET['show'];
21
}
22
 
23
$s = count($expl)-$s-1;
24
if ($s < 0) $s = 0;
25
 
26
for ($i=$s; $i<count($expl)-1; $i++) {
6 daniel-mar 27
        echo "[".str_pad((string)($i+1), 4, '0', STR_PAD_LEFT)."] ".$expl[$i];
2 daniel-mar 28
}
29
 
30
?>
31
 
32
<!-- <script>
33
scrollto(0,2048);
34
</script> -->