]> i-scream Git - www.i-scream.org.git/commitdiff
CGI scripts used in various places around the project.
authorTim Bishop <tim@bishnet.net>
Fri, 9 Mar 2001 00:22:30 +0000 (00:22 +0000)
committerTim Bishop <tim@bishnet.net>
Fri, 9 Mar 2001 00:22:30 +0000 (00:22 +0000)
cgi-bin/cvslog.cgi [new file with mode: 0755]

diff --git a/cgi-bin/cvslog.cgi b/cgi-bin/cvslog.cgi
new file mode 100755 (executable)
index 0000000..e822a31
--- /dev/null
@@ -0,0 +1,66 @@
+#!/usr/bin/perl
+
+print "Content-type: text/html\n\n";
+
+my($today) = `date \"+%Y/%m/%d\"`;
+my($cvs2clpath) = "/home/cut/tdb1/bin/cvs2cl";
+my($cvsroot) = "/usr/local/proj/co600_10/cvs";
+my($cvs2clargs) = "--stdout -r -b -t -w -U $cvsroot/CVSROOT/users -l \"-d'\>$today'\" -g \"-d$cvsroot\" -g \"-Q\"";
+my($cmd) = "cd /home/cut/tdb1/cvsscripttemp && $cvs2clpath $cvs2clargs *";
+
+my(@lines) = `$cmd`;
+
+print <<"END";
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+
+<html>
+
+<head>
+ <title>The i-scream Project Logfile Tailer</title>
+ <meta name="description" content="The i-scream Project is a central 
+monitoring system for Unix, Linux and NT servers.">
+ <meta name="keywords" content="i-scream, project, central monitoring 
+system, unix, linux, nt, server, alert">
+ <meta name="generator" content="notepad on acid, aye.">
+</head>
+
+<body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" 
+text="#000066">
+
+<a href="http://www.i-scream.org.uk"><img border="0" src="../i-scream.gif"></a>
+
+<h3>Today's i-scream CVS commits</h3>
+
+<a href="cvsweb.cgi">Browse i-scream CVS repository</a>
+
+<pre>
+END
+
+foreach my $line (@lines) {
+    print HTML_encode($line);
+}
+
+print <<"END";
+</pre>
+</body>
+
+</html>
+END
+
+exit 0;
+
+#------------------------------------------------------
+# sub HTML_encode
+#
+# escape HTML characters that may cause problems when
+# shown either in the <body> or within text fields.
+#------------------------------------------------------
+sub HTML_encode ($){
+    my ($encoded) = @_;
+    $encoded =~ s/&/&amp;/g;
+    $encoded =~ s/"/&quot;/g;
+    $encoded =~ s/</&lt;/g;
+    $encoded =~ s/>/&gt;/g;
+    return $encoded;
+}
+