\n";
}
sub InterfaceWithMenu
{
ShowPinguinWithMenu();
InterChangePlusMinus($Request_{'p'});
InterfaceHeader();
print " ";
################################## MENU ###################################
print "";
print "";
print "";
print "";
print "";
print "";
if ($Request_{'l1'} eq '') {InterMenu0($Request_{'p'});}
elsif ($Request_{'l1'} eq '1') {InterMenu1($Request_{'p'});}
else {InterMenu2($Request_{'p'},$Request_{'l1'});}
print " ";
print " | ";
print " ";
print " | ";
print " ";
############################### NEWS ########################################
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "";
print "| ";
print "Последние статьи :";
print " | ";
print " ";
print " | ";
print " ";
@NNEWS=(
["p=1431&m=1&l1=4","SQL","30.07"],
["p=999&m=1&l1=3","JFS","10.06"],
["p=998&m=1&l1=3","B-trees","01.06"],
["p=997&m=1&l1=3","BTRFS","27.05"],
["p=996&m=1&l1=3","BFS","26.05"],
["p=659&t=0&m=1&l1=6","Test Python","12.10"],
["p=579&m=1&l1=2","Twisted","10.10"],
["p=578&m=1&l1=2","Django","01.10"],
["p=2292&m=1&l1=2","Pusher","14.09"],
["p=658&t=0&m=1&l1=6","Test Kernel","14.08"],
);
local $count=1;
foreach $nnews (@NNEWS)
{
print "";
print "";
print "";
if(($count == 5 ) or ($count == 9 ) or ($count == 10) )
{
print "| $nnews->[1] | ";
}
else
{
print " $nnews->[1] | ";
}
print "$nnews->[2] | ";
print " ";
print " | ";
print " ";
$count++;
}
print "";
print "| ";
print "";
print " | ";
print " ";
print " | ";
print " ";
print " | ";
print " ";
############################### TOP 10 ########################################
print "";
print "";
print "";
print "";
print "";
print "";
print "$RatingContent";
print "";
print "| ";
print "";
print " | ";
print " ";
print " | ";
print " ";
print " | ";
print " ";
############################### STAT ########################################
print " ";
print " ";
print " ";
print " | ";
print " 01.01.2010 : 500000 visitors ";
print " | ";
print " ";
print " | ";
print " ";
print " | \n";
}
sub InterfaceHeader2()
{
print " ";
local $count=1;
local $color="tableBorderLeft";
foreach $level (@Level_01)
{
$color="tableBorderLeft";
if ($count==$Request_{'l1'}) {$color="tableBorderGreen";}
print "| ";
print "";
print " | ";
$count++;
}
print "
";
}
sub InterfaceWithoutMenu
{
ShowPinguinWithoutMenu();
InterfaceHeader();
}
sub ShowPinguinWithMenu
{
if ($Request_{'f'} ne ''){$PinHref="forum.html?p=$Request_{'p'}\&f=1";}
elsif ($Request_{'t'} ne ''){$PinHref="test.html?p=$Request_{'p'}\&t=$Request_{'t'}";}
elsif ($Request_{'k'} ne ''){$PinHref="kernel_0.01.html?k=$Request_{'k'}\&p=333";}
elsif ($Request_{'l1'} ne '')
{
if (($Request_{'l1'} eq '8') and ($Request_{'l1'} ne ''))
{$PinHref="forum.html?p=$Request_{'p'}\&f=1&l1=$Request_{'l1'}";}
elsif ($Request_{'l1'} eq '6') {$PinHref="index.html?p=$Request_{'p'}\&l1=$Request_{'l1'}";}
else
{
{$PinHref="index.html?p=$Request_{'p'}\&l1=$Request_{'l1'}";}
}
}
elsif ($Request_{'text_search2'} eq '')
{
if ($Request_{'p'} ne ''){$PinHref="index.html?p=$Request_{'p'}";}
else{$PinHref="index.html";}
}
else {$PinHref="search.html?text_search2=$Request_{'text_search2'}";}
}
sub ShowPinguinWithoutMenu
{
if ($Request_{'f'} ne '') {$PinHref="forum.html?p=$Request_{'p'}\&f=1&m=1";}
elsif ($Request_{'t'} ne '')
{
if ($Request_{'l1'} ne '')
{$PinHref="test.html?p=$Request_{'p'}\&t=$Request_{'t'}&l1=$Request_{'l1'}";}
else
{$PinHref="index.html";}
}
elsif ($Request_{'k'} ne ''){$PinHref="kernel_0.01.html?k=$Request_{'k'}\&m=1&p=333";}
elsif ($Request_{'text_search2'} eq "")
{
if ($Request_{'p'} ne ""){$PinHref="index.html?p=$Request_{'p'}\&m=1";}
else{$PinHref="index.html?m=1";}
}
else {$PinHref="search.html?text_search2=$Request_{'text_search2'}\&m=1";}
}
#style='color:#023f6e;'
1;
|
#!/usr/bin/perl
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use lib './packages' ;
use arrays qw{@SSI_FILES};
require "./packages/local.pm";
$InterfaceParamMenu="";
$InterfaceParamL1="";
$InterfaceParamP="";
print "Content-type: text/html; charset=windows-1251\n\n";
my $input = $ENV{'QUERY_STRING'} if $ENV{'QUERY_STRING'};
if (($ENV{'QUERY_STRING_UNESCAPED'}) && ($input eq ''))
{
$input = $ENV{'QUERY_STRING_UNESCAPED'};
$input =~ s/\\&/\&/g;
}
if ($input =~ /=/g)
{
my @pairs = split(/&/, $input);
foreach $pair (@pairs)
{
($name, $value) = split(/=/, $pair);
$value =~ tr/+/ /;
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
$in{$name} = $value;
if ($name eq "m") {$InterfaceParamMenu=$value;}
if ($name eq "l1") {$InterfaceParamL1=$value;}
if ($name eq "p") {$InterfaceParamP=$value;}
}
}
if (($input eq 'l1=1')or ($input eq 'p=&l1=1&l1=1')) {print " | Linux | ";}
if (($input eq 'l1=2')or ($input eq 'p=&l1=2&l1=2')) {print "Language | ";}
if (($input eq 'l1=3')or ($input eq 'p=&l1=3&l1=3')) {print "Kernel | ";}
if (($input eq 'l1=4')or ($input eq 'p=&l1=4&l1=4')) {print "Package | ";}
if (($input eq 'l1=5')or ($input eq 'p=&l1=5&l1=5')) # Books
{
print "";
$my_file ="$Local::local_ssi"."template/Book/about.html";
open(SOMEFILE,"$my_file") or die;
@variable = ;
close(SOMEFILE);
print "@variable";
}
if (($input eq 'l1=6')or ($input eq 'p=&l1=6&l1=6')) {print "Test | ";}
if (($input eq 'l1=7')or ($input eq 'p=&l1=7&l1=7')) {print "Operation System | ";}
if (($input eq 'l1=8')or ($input eq 'p=&f=1&l1=8&l1=8')) {print "Forum | ";}
foreach $f (@SSI_FILES)
{
if (
($f->[0] eq "p=$InterfaceParamP")
or ($f->[0] eq $input)
or ("$f->[0]\&m=1" eq $input)
)
{
open(SOMEFILE,"$Local::local_ssi$f->[1]") or die;
@variable = ;
close(SOMEFILE);
print "@variable";
if ($f->[2] ne "") { require "comments.pl";}
last;
}
}
if ($input eq 'p=12345qwert')
{
require "comments_stat.pl";
}
if ($input eq 'p=12345qwerty')
{
require "comments_stat.pl";
}
1;
|
|