ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/i-scream/web/cgi-bin/cvslog.cgi
Revision: 1.1
Committed: Fri Mar 9 00:22:30 2001 UTC (23 years, 8 months ago) by tdb
Branch: MAIN
Log Message:
CGI scripts used in various places around the project.

File Contents

# Content
1 #!/usr/bin/perl
2
3 print "Content-type: text/html\n\n";
4
5 my($today) = `date \"+%Y/%m/%d\"`;
6 my($cvs2clpath) = "/home/cut/tdb1/bin/cvs2cl";
7 my($cvsroot) = "/usr/local/proj/co600_10/cvs";
8 my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$today'\" -g \"-d$cvsroot\" -g \"-Q\"";
9 my($cmd) = "cd /home/cut/tdb1/cvsscripttemp && $cvs2clpath $cvs2clargs *";
10
11 my(@lines) = `$cmd`;
12
13 print <<"END";
14 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
15
16 <html>
17
18 <head>
19 <title>The i-scream Project Logfile Tailer</title>
20 <meta name="description" content="The i-scream Project is a central
21 monitoring system for Unix, Linux and NT servers.">
22 <meta name="keywords" content="i-scream, project, central monitoring
23 system, unix, linux, nt, server, alert">
24 <meta name="generator" content="notepad on acid, aye.">
25 </head>
26
27 <body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc"
28 text="#000066">
29
30 <a href="http://www.i-scream.org.uk"><img border="0" src="../i-scream.gif"></a>
31
32 <h3>Today's i-scream CVS commits</h3>
33
34 <a href="cvsweb.cgi">Browse i-scream CVS repository</a>
35
36 <pre>
37 END
38
39 foreach my $line (@lines) {
40 print HTML_encode($line);
41 }
42
43 print <<"END";
44 </pre>
45 </body>
46
47 </html>
48 END
49
50 exit 0;
51
52 #------------------------------------------------------
53 # sub HTML_encode
54 #
55 # escape HTML characters that may cause problems when
56 # shown either in the <body> or within text fields.
57 #------------------------------------------------------
58 sub HTML_encode ($){
59 my ($encoded) = @_;
60 $encoded =~ s/&/&amp;/g;
61 $encoded =~ s/"/&quot;/g;
62 $encoded =~ s/</&lt;/g;
63 $encoded =~ s/>/&gt;/g;
64 return $encoded;
65 }
66