16 |
|
$site=$query->param('site'); |
17 |
|
|
18 |
|
# Settings |
19 |
< |
if(-e "/usr/local/proj/co600_10" && -d "/usr/local/proj/co600_10"){ |
20 |
< |
# Assuming on Raptor |
21 |
< |
my ($left) = "../webpages/left.inc"; |
22 |
< |
my ($title) = "../webpages/title.inc"; |
23 |
< |
my ($bottom) = "../webpages/bottom.inc"; |
24 |
< |
} |
25 |
< |
elsif (-e "/home/sites/www.i-scream.org.uk" && -d "/home/sites/www.i-scream.org.uk"){ |
26 |
< |
# Assuming on Main Site |
27 |
< |
my ($left) = "../left.inc"; |
28 |
< |
my ($title) = "../title.inc"; |
29 |
< |
my ($bottom) = "../bottom.inc"; |
30 |
< |
} |
19 |
> |
my ($left) = "http://www.i-scream.org.uk/left.inc"; |
20 |
> |
my ($title) = "http://www.i-scream.org.uk/title.inc"; |
21 |
> |
my ($bottom) = "http://www.i-scream.org.uk/bottom.inc"; |
22 |
|
|
23 |
|
print "Content-type: text/html\n\n"; |
24 |
|
|
29 |
|
cvswww-extract.cgi |
30 |
|
Script to extract webpages onto webserver |
31 |
|
Created by tdb1 20/10/2000 |
32 |
< |
Last modified 20/10/2000 |
32 |
> |
Last modified 25/11/2000 |
33 |
|
--> |
34 |
|
|
35 |
|
<html> |
36 |
|
|
37 |
|
<head> |
38 |
< |
<title>The i-Scream Project CVS Website Extracter!</title> |
38 |
> |
<title>The i-Scream Project CVS Website Extracter</title> |
39 |
|
</head> |
40 |
|
|
41 |
|
<body bgcolor="#ffffff" link="#0000ff" alink="#3333cc" vlink="#3333cc" text="#000066"> |
45 |
|
<td valign="top"> |
46 |
|
EOF |
47 |
|
|
48 |
< |
&print_file($left); |
48 |
> |
print `wget -O - -q $left`; |
49 |
|
|
50 |
|
print << "EOF"; |
51 |
|
|
53 |
|
<td valign="top"> |
54 |
|
EOF |
55 |
|
|
56 |
< |
&print_file($title); |
56 |
> |
print `wget -O - -q $title`; |
57 |
|
|
58 |
|
print "<pre>\n"; |
59 |
|
|
79 |
|
|
80 |
|
print "</pre>\n"; |
81 |
|
|
82 |
< |
&print_file($bottom); |
82 |
> |
print `wget -O - -q $bottom`; |
83 |
|
|
84 |
|
print << "EOF"; |
85 |
|
|
93 |
|
EOF |
94 |
|
|
95 |
|
exit 0; |
105 |
– |
|
106 |
– |
sub print_file ($) { |
107 |
– |
my ($filename) = @_; |
108 |
– |
print `cat $filename`; |
109 |
– |
} |
110 |
– |
|
111 |
– |
sub print_file_old ($) { |
112 |
– |
my ($filename) = @_; |
113 |
– |
open(FILE, $filename) or die "Cannot open $filename: $!\n"; |
114 |
– |
while (my ($line) = <FILE>) { |
115 |
– |
print $line; |
116 |
– |
} |
117 |
– |
} |