";
$bgcolor = "white";
$bgcolor = "black" if ($INPUT{'background'} eq "white");
print "";
if ($notpop == 1) {
print "Back to MiddleEast.org | " if ($INPUT{'c'} eq "2");
print "";
}
if (!($desc =~ /<\/b>/)) {
if (($INPUT{'c'} eq "2") || ($INPUT{'c'} eq "3")) { print "Comment "; }
else { print "MER Comment "; }
print "$desc
";
}
print "
";
}
sub right {
print "";
print "";
open(IN, "news.txt");
@indata=;
close(IN);
print <
endofhtml
;
$total=@indata;
$stop = $total-20;
$cnt2=0;
foreach $line (@indata) {
if ($line ne "") {
($title, $url, $desc, $head, $preview, $date) = split(/\|/, $line);
if (($head ne "off") && ($head ne "hidden")) {
$url =~ s/\?/QUESTIONMARK/g;
$url =~ s/\&/AND/g;
$url =~ s/\=/EQUAL/g;
if ($INPUT{'c'} eq "3") {
if (!($preview =~ /wash/)) {
print "$title
\n";
}
} elsif ($INPUT{'c'} eq "2") {
if (!($preview =~ /me/)) {
print "$title
\n";
}
} else {
print "$title
\n";
}
last if ($cnt2 == 40);
$cnt2++;
}
$total--;
}
}
print < |
endofhtml
;
}
sub normal {
$arcnum = $INPUT{'a'} if ($INPUT{'a'} ne "");
$arcnum = $INPUT{'archive'} if ($INPUT{'archive'} ne "");
$theminute = (localtime(time()))[1];
$thehour = (localtime(time()))[2];
$theday = (localtime(time()))[3];
$thedayyear = (localtime(time()))[7];
$themonth = (localtime(time()))[4];
$themonth++;
$theyear = (localtime(time()))[5];
$theyear = $theyear + 1900;
if ($INPUT{'t'} eq "p") {
open(OUT, ">>../promote/h_logs.txt");
print OUT "$ENV{'HTTP_REFERER'}|$themonth $theday $theyear|$INPUT{'archive'}|$INPUT{'num'}\n";
close(OUT);
}
if ($INPUT{'t'} eq "f") {
open(OUT, ">>../promote/f_logs.txt");
print OUT "$ENV{'HTTP_REFERER'}|$themonth $theday $theyear|$INPUT{'archive'}|$INPUT{'num'}\n";
close(OUT);
}
open(IN, "archives/counter.txt");
@indata=;
close(IN);
if (($arcnum eq $indata[0]) || ($arcnum eq "")) {
open(IN, "news.txt");
@indata=;
close(IN);
}
else {
$filename = "archives/" . $arcnum . ".txt";
open(IN, "$filename");
@indata=;
close(IN);
}
$record = @indata-$INPUT{'num'};
($title, $url, $desc, $head) = split(/\|/, $indata[$record]);
($junk, $showtitle) = split(/-->/, $title);
$showtitle = $title if ($showtitle eq "");
$url =~ s/QUESTIONMARK/\?/g;
$url =~ s/AND/\&/g;
$url =~ s/EQUAL/=/g;
$INPUT{'location'} =~ s/QUESTIONMARK/\?/g;
$INPUT{'location'} =~ s/AND/\&/g;
$INPUT{'location'} =~ s/EQUAL/=/g;
open(IN, "framebusters.txt");
@in = ;
close(IN);
$framebuster=0;
foreach $line (@in) {
chop $line;
if ($url =~ /$line/) {
$framebuster=1;
}
}
if ($framebuster == 0) {
if ($url eq "") {
print "MER - $showtitle";
print " |