#!/usr/bin/perl use CGI; use IO::File; my $q = new CGI; print $q->header; #my $script = $0; #$script =~ s/infopage/index.php/; my $script = "/home/httpd/vhosts/default/htdocs/index.php"; my $f = new IO::File; $f->open( $script ); my @lines = <$f>; $f->close; my $footer = "/home/httpd/vhosts/default/htdocs/footer.php"; my $f = new IO::File; $f->open( $footer ); my @lines2 = <$f>; $f->close; my $footer = join("",@lines2); my $path_info = $q->path_info; $path_info =~ s/^\///; @_ = split(/\//, $path_info); my $action = shift @_; while ($_ = shift @_) { $q->param($_, shift @_) if $_; } $action ||= $q->param('action'); $action =~ tr/A-Z/a-z/; my $nextlink = $action; $nextlink++; if( $nextlink > 100) { $nextlink = ""; } else { $nextlink .= "cst/copyright/"; } $nextlink = qq@ home | @. 'links' . q@ | (C) 1997~2008 @; my $lines = join("", @lines); $lines =~ s/<%.*?%>//gs; $lines =~ s/<\? echo \$svr \?>/$ENV{HTTP_HOST}/gs; $lines =~ s/<\?.*?\?>//gs; $lines =~ s//$footer<\/font>/; print $lines; print $nextlink; undef $q; undef $f;