1
0
Fork 0
my_site_mk3/common.pl

44 lines
1.8 KiB
Raku

my $charset="windows-1251";
$version="1.50.12";
$debug=1;
sub showwarning(){
print "Content-type: text/html\n\n";
print "<html><meta http-equiv=\"Content-Type\" content='text/html; charset=$charset'>";
print "<script language=\"javascript\">";
print "window.onload=function() {document.getElementById(\"in\").focus();};";
print "</script>";
if ($cookieHash{'light'}){print '<link type="text/css" rel="stylesheet" href="white.css">';}
else {print '<link type="text/css" rel="stylesheet" href="black.css">';}
print "<body>";
print @_;
print "<div id=\"hint\"><noscript>Ïîñòàâüòå êóðñîð â ïîëå âíèçó è </noscript>íàæìèòå Enter.</div><br>";
print "<FORM NAME='input' ACTION='$location.pl' METHOD='GET'>\n";
print "&gt; <input type=text id=\"in\" size=64 maxlength=32>\n</form>";
print "<br><a href='$to'>Âåðíóòüñÿ îáðàòíî</a>";
print "</body></html>";
}
sub printHeader{#common header - CSS style and so on
my($title) = shift;
my($white) = shift;
print "Content-type: text/html\n\n";
print "<html><meta http-equiv=\"Content-Type\" content='text/html; charset=$charset'><head>";
if ($white){print '<link type="text/css" rel="stylesheet" href="white.css">';}
else{
if ($cookieHash{'light'}){print '<link type="text/css" rel="stylesheet" href="white.css">';}
else {print '<link type="text/css" rel="stylesheet" href="black.css">';}
}
print"\n<title>$title</title>\n</head>\n<body>\n";
}
sub printFooter{#common footer - enclosures
print <<"END";
<h3 align="center"><a href="gostinaya.pl">Âûéòè èç áëîãà</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="?random">Ñëó÷àéíûé ïîñò</a></h3>
<p><em>
<a href="mailto:oreolek\@gmail.com">Àëåêñàíäð ßêîâëåâ,2008 ãîä </a></em><br />Jabber: oreolek\@jabber.ru<br />ICQ: 207-138-403</p>
</body>
</html>
END
}