top.phtml :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<?php
$htmlmeta[] = "HTTP-EQUIV=\"Content-Type\" CONTENT=\"text/html; charset=iso-8859-1\"";
if (is_array($htmlmeta))
while (list(,$value) = each($htmlmeta))
echo "<META $value>\n";
$show_source=$_REQUEST['show_source'];
if ($show_source) {
$source_list = array(
1 => basename($SCRIPT_FILENAME),
2 => "/home/www/www.sslug.dk/includes/top.phtml",
3 => "/home/www/www.sslug.dk/includes/bottom.phtml",
4 => "/home/www/www.sslug.dk/templates/template.php"
);
$file = $source_list[$show_source];
echo "<TITLE>",basename($file),"</TITLE>\n</HEAD>\n";
echo "<BODY BGCOLOR=\"#CCCCCC\" >\n";
echo "<h5>".basename($file)." :</h5>\n<code>\n";
show_source($file);
echo "\n</code>";
echo "\n</body>\n</html>\n";
exit;
}
?>
<?php
/* top.phtml sends html, and title according
to $htmltitle_sv/$htmltitle_da/$htmltitle_en :
<!-- DOCTYPE .....
....<TITLE>$htmltitle_xx</TITLE>.........
... [topmenu] ...
*/
/*
$bodyarg is added to <BODY ... >, and can be used for background image
and sets "SPROG" to "sv"/"da"/*"en"
sæt sprog udfra exktra apache "sprog" variabel
sprog er "dansk", "svensk" eller ikke sat. (engelsk?)
*/
$sprog= $_SERVER['sprog'];
if (!isset($SPROG))
if ($sprog == "svensk")
$SPROG = "sv";
else if ($sprog == "dansk")
$SPROG = "da";
else
$SPROG="en"; // default if not dansk==norsk or svensk
echo "<!-- REMOTE_HOST: $REMOTE_HOST - Using language: $sprog/$SPROG -->\n";
if ($SPROG=="sv" && isset($htmltitle_sv))
$htmltitle= $htmltitle_sv;
else if ($SPROG=="da" && isset($htmltitle_da))
$htmltitle= $htmltitle_da;
else if ($SPROG=="en" && isset($htmltitle_en))
$htmltitle= $htmltitle_en;
else
$htmltitle= "SSLUG - Skåne Sjælland Linux User Group";
echo "<TITLE>",$htmltitle,"</TITLE>\n";
echo "<LINK REL=\"STYLESHEET\" HREF=\"";
$BGCOL1="#4179ac";
$BGCOL2="#ffffff";
$GREY="#c0c0c0"; /* Opera has some problems with bgolort in CSS so... */
list($cookskin, $cookbackground) = explode("|", $_COOKIE["wwwsurprise"]);
/* if (!isset($cssfile))*/ {
if ( $cookskin == "" ) {
echo "/style/sslug.css";
$IMG="/includes/img";
} else if ( $cookskin == "pink" ) {
echo "/style/sslug_pink.css";
$BGCOL1="#ee3377";
$BGCOL2="#ffe8e8";
$GREY="#c0c0c0";
$IMG="/includes/img";
} else if ( $cookskin == "blackgreen" ) {
echo "/style/sslug_blackgreen.css";
$BGCOL1="#333333";
$BGCOL2="#333333";
$GREY="#003300";
$IMG="/includes/img/blackgreen";
//if (!isset($noTransparent))
$bodyarg= "background=\"/grafix/blackgreen-linux-tr2.png\"";
} else {
echo "/style/sslug_pink.css";
$BGCOL1="#ee3377";
$BGCOL2="#ffe8e8";
$GREY="#c0c0c0";
$IMG="/includes/img";
}
} /* else echo $cssfile; */
echo "\" TYPE=\"text/css\">\n";
if (isset($cssfile)) {
echo "<LINK REL=\"STYLESHEET\" HREF=\"";
echo $cssfile;
echo "\" TYPE=\"text/css\">\n";
}
if (isset($bodyarg)) {
if (!isset($background)) {
$background= eregi_replace("[ ]*background[ ]*=[ ]*\"([^\"]*)\"[ ]*","\\1",$bodyarg);
}
/* remove backround from bodyarg */
$bodyarg= eregi_replace("background[ ]*=[ ]*\"[^\"]*\"","",$bodyarg);
}
if ( $cookbackground != "background") {
unset($background);
}
if (isset($noTransparent)) {
echo "<!-- no transparent background since old browser... $background -->\n";
unset($background);
} else if (isset($background) ) {
echo " <style type=\"text/css\">\n";
echo "BODY {\n";
echo " background-image: url(\"$background\");\n";
echo " background-repeat:repeat;";
echo "}\n";
echo "</style>\n";
}
if (is_array($headarg))
while (list(,$value) = each($headarg))
echo "$value\n";
?>
</HEAD>
<?php
echo "<BODY ",$bodyarg," >\n";
//echo "SPROG=$SPROG sprog=$sprog<br>\n";
/* sprog 1
da der er relativ lidt tekst, så er der lavet en variabel per tekstmenu:
*/
if ($SPROG =="sv" && isset($htmltitle_sv)) {
/*<!-- #config timefmt="%H:%M den %d. %b %Y" -->*/
$timefmt="%Y-%m-%d, klockan %H:%M";
$menu1 ="Förstasida" ;
$menu2 = "Anmälning" ;
$menu3 = "Postarkiv";
$menu4 = "Översikt";
$menu5 = "Kalender";
$menu6 = "Sök";
$menu6a = "Sök på";
$maintainer = "Denna sidan underholds av";
$wwwadmincontact = "Fel och synpunkter angående webb-sidorna skickas till";
$lastmodifyby = "Senaste ändring";
} else if ($SPROG =="da" && isset($htmltitle_da)) {
$timefmt="%Y-%m-%d, klokken %H:%m";
$menu1 = "Forside" ;
$menu2 = "Tilmelding" ;
$menu3 = "Postarkiv" ;
$menu4 = "Oversigt" ;
$menu5 = "Kalender" ;
$menu6 = "Søg" ;
$menu6a = "Søg på" ;
$maintainer = "Denne side vedligeholdes af" ;
$wwwadmincontact = "Henvendelse vedrørende websiderne til" ;
$lastmodifyby = "Senest ændret" ;
} else {
$timefmt="%Y-%m-%d, %H:%M %Z";
$menu1 = "Home" ;
$menu2 = "Subscribe" ;
$menu3 = "Mail Archive" ;
$menu4 = "Index" ;
$menu5 = "Calendar" ;
$menu6 = "Search" ;
$menu6a = "Search" ;
$maintainer="This page is maintained by" ;
$wwwadmincontact = "Questions about the web-pages to" ;
$lastmodifyby = "Last modified" ;
}
if (!isset($username) ) $username = "tux" ;
if (!isset($useremail) ) $useremail = "www_admin@sslug.dk" ;
?>
<table width="100%" cellspacing="0" cellpadding="0" border="0" summary="top1">
<tr>
<td><img src="<?php echo $IMG; ?>/corner-ul.gif" width="10" height="10" border="0" alt=""></td>
<td align="center" width="100%" style="background-image: url('<?php echo $IMG; ?>/bg-top.gif'); background-repeat:repeat-x; "><img SRC="/grafix/space.gif" width="1" height="1" border="0" alt=""></td>
<td><img src="<?php echo $IMG; ?>/corner-ur.gif" width="10" height="10" border="0" alt=""></td>
</tr>
<tr>
<td style=" background-image: url(<?php echo $IMG; ?>/bg-left.gif);"> </td>
<td width="100%">
<TABLE WIDTH="100%" CELLPADDING="0"
CELLSPACING="0" BORDER="0" summary="top2">
<TR><TD valign="bottom" align="center">
<TABLE WIDTH="100%" CELLPADDING="0" CELLSPACING="0" BORDER=0 summary="top3">
<TR>
<TD valign="top" rowspan=1><A class=noul HREF="/" target="_top" ><img src="/grafix/sslug-button.gif"
BORDER="0"
ALT="Skåne Sjælland Linux User Group - http://www.sslug.dk" ></A></TD>
<TD align="center" > <b><A class=bigmenu HREF="/"><?php echo "$menu1" ; ?></A></b></td>
<TD> </TD>
<TD align="center" > <b><A class=bigmenu HREF="/tilmeld"><?php echo "$menu2" ; ?></A></b></td>
<TD> </TD>
<TD align="center" > <b><A class=bigmenu HREF="/emailarkiv/"><?php echo "$menu3" ; ?></A></b></td>
<TD> </TD>
<TD align="center" > <b><A class=bigmenu HREF="/oversigt"><?php echo "$menu4" ; ?></A></b></td>
<TD> </TD>
<TD align="center" > <b><A class=bigmenu HREF="/adict/mgroup.php?organizer=SSLUG"><?php echo "$menu5" ; ?></A></b></td>
<TD> </TD>
<TD align="center" > <b><A class=bigmenu HREF="/htdig/"><?php echo "$menu6" ; ?></A></b></td>
</TR>
</TABLE>
</TD></TR>
</TABLE>
</td>
<td style=" background-image: url(<?php echo $IMG; ?>/bg-right.gif);"> </td>
</tr>
<tr>
<td><img SRC="<?php echo $IMG; ?>/corner-ll.gif" width="10" height="10" border="0" alt=""></td>
<td align="center" width="100%" style=" background-image: url(<?php echo $IMG; ?>/bg-bottom.gif);"><img SRC="/grafix/space.gif" width="1" height="1" border="0" alt=""></td>
<td><img SRC="<?php echo $IMG; ?>/corner-lr.gif" width="10" height="10" border="0" alt=""></td>
</tr>
</table>
<?php //echo "<pre>"; print_r($_SERVER); echo "</pre><br>\n";
?>