[thelist] PHP and Perl
Jay Fitzgerald
jayfitz at bayou.com
Thu Dec 7 12:02:53 CST 2000
Here is the code taken from my FOO.PL file:
sub pagehead
{
my($text,$label);
$label = shift;
$text = "<html><head><title>$config{'server_name'} running halfStats
version $config{'version'}</title>\n";
$text .= "<link rel='STYLESHEET' type='text/css'
href='$config{'rel_html_dir'}/$config{'css_color'}.css'>\n";
$text .= "<style>\nBODY\n{\nmargin-top: 5;\nmargin-left:
20;\nbackground-color: #000000;\ntext:
#eeeeee;\n}\n</style>\n</head>\n";
$text .= "<body><center>\n";
$text .= banner() . "<br><br>\n";
$text .= "<table width='750' border='0' cellspacing='0'
cellpadding='5'>\n";
$text .= "<tr class='headerbg' valign='middle'>\n";
$text .= "<td align='left' width='400'>\n";
$text .= "<font class='header'> $label </font>\n";
$text .= "</td>\n";
$text .= "<td align='right'>\n";
$text .= "<font class='normal'>jump to:\n";
$text .= "<a href='$config{'rel_html_dir'}/index.html'>main</a> | <a
href='$config{'rel_html_dir'}/awards.html'>awards</a> | <a
href='$config{'rel_html_dir'}/skill.html'>players</a> | <a
href='$config{'rel_html_dir'}/server.html'>server</a> | <a
href='$config{'rel_html_dir'}/help.html'>help?</a> \n";
$text .= "</font>\n";
$text .= "</td>\n";
$text .= "</tr>\n";
$text .= "</table>\n";
return($text);
}
Now - I also need to add the code below (PHP authentication) to the
above FOO.PL file:
<?
$id = $HTTP_COOKIE_VARS["id"];
if (!isset($id))
{
print "<center>";
print "Authorization Failed!<p>";
print "Click here to <a
href=http://www.dagl.net/members/login.html>login</a>";
exit;
};
?>
So that it looks that it does this:
$text = "<?
$id = $HTTP_COOKIE_VARS["id"];
if (!isset($id))
{
print "<center>";
print "Authorization Failed!<p>";
print "Click here to <a
href=http://www.dagl.net/members/login.html>login</a>";
exit;
};
?>
<html><head><title>$config{'server_name'} running halfStats version
$config{'version'}</title>\n";
Does this make better sense now that you see the code?
--
Jay Fitzgerald - Web Development/Sales
=============================================
Bayou Internet
http://www.bayou.com
Mississippi Internet
http://www.mississippi.net
Vicksburg Online
http://www.vicksburg.com
Bama Online
http://www.bamaonline.net
=============================================
ICQ: 38823829 Phone: 888-302-2968 Fax: 877-329-2296
More information about the thelist
mailing list