/[clipping]/clipping-list.php
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /clipping-list.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (hide annotations)
Sat Nov 3 11:06:36 2001 UTC (22 years, 5 months ago) by dpavlin
Branch: MAIN
Changes since 1.1: +1 -1 lines
use new log format

1 dpavlin 1.1 <?
2    
3     require("cyclic_arr.class.php");
4     require("bg_color.class.php");
5    
6     $nr_lines = 30;
7    
8     $a=new Cyclic_Arr;
9     $a->set_size($nr_lines);
10    
11     $b=new Bg_Color;
12     //$b->colors("#ff8888","#88ff88");
13    
14     // read file in cyclic array
15     $fd = fopen("/data/store/mimex.log", "r");
16     while (!feof ($fd)) {
17     $line=fgets($fd, 4096);
18     if ($line != "") $a->push($line);
19     }
20     fclose ($fd);
21    
22     // generate html
23     print "<html><head><title>Press clipping - last $nr_lines items</title></head>
24     </body><table>\n";
25     $a->next; // move to next (oldest one)
26     for ($i=0; $i<$nr_lines; $i++) {
27     $url=$a->fetch();
28 dpavlin 1.2 print "<tr".$b->bgcolor()."><td><a href=\"http://store.pliva.hr/$url\">$url</a></td></tr>\n";
29 dpavlin 1.1 }
30     print "</table></body></html>\n";
31    
32     ?>

  ViewVC Help
Powered by ViewVC 1.1.26