moodle/theme/poweraid/header.html
gregb_cc 08b3606390 This is a first attempt to make moodle frame safe.
I've added the variable CFG->main_frame to config-dist.php, and replaced _top
targets with the variable in all the php files.  HTML files, like those in the
documentation, have not been modified, as they are not (yet) parsed.

The variable should probably get moved into the config table, and get some
documentation.

I've also included, but commented out, a slight change in weblib.php, which
would guarantee that messages would be seen before redirecting the user (unless
delay intentionally set to 0 when redirect is used).
2003-03-11 21:35:12 +00:00

148 lines
8.2 KiB
HTML

<?php
/*
Filename: header.html
Purpose of file: Printing out the Moodle theme header
Author of file: Bjarne Varoystrand aka Black Skorpio
E-mail: webmaster@postnuke-sweden.com
Web: www.postnuke-sweden.com
ICQ: 1194177
---------------------------------------------------------------------
LICENSE
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License (GPL)
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
To read the license please visit http://www.gnu.org/copyleft/gpl.html
*/
?>
<HTML<?=$direction?>>
<HEAD>
<TITLE><?=$title ?></TITLE>
<META NAME="keywords" CONTENT="Moodle, <?=$title ?> " />
<?=$meta ?>
<meta name="ROBOTS" content="INDEX,FOLLOW" />
<meta name="resource-type" content="document" />
<meta http-equiv="expires" content="0" />
<meta name="author" content="<?=$title ?>" />
<meta name="copyright" content="Copyright (c) 2003 by <?=$title ?>" />
<meta name="revisit-after" content="1 days" />
<meta name="distribution" content="Global" />
<meta name="generator" content="Moodle - http://moodle.com" />
<meta name="rating" content="General" />
<LINK REL="stylesheet" HREF="<?=$styles ?>" />
<LINK REL="SHORTCUT ICON" HREF="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/favicon.ico" />
</script>
<? include("$CFG->javascript"); ?>
</HEAD>
<BODY <? if ($focus) { echo "onLoad=setfocus()"; } echo " bgcolor=\"$THEME->body\" topmargin=\"$THEME->topmargin\" leftmargin=\"$THEME->leftmargin\" marginheight=\"$THEME->marginheight\" marginwidth=\"$THEME->marginwidth\" />"; ?>
<? if ($home) { // This is what gets printed on the home page only ?>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="6" ><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_corner_top.jpg" width="6" height="9" /></td>
<td valign="bottom" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg" width="1" height="9" /></td>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_corner_top.jpg" width="6" height="9" /></td>
</tr>
<tr>
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="left" valign="top"><A TARGET=\"{$CFG->main_frame}\" HREF="<? echo $CFG->wwwroot?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->frontlogo" ?>" border="0" /></A></td>
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg" width="6" height="100%" /></td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="center" valign="middle" width="100%">
<TABLE WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=LEFT VALIGN=middle>&nbsp;<FONT SIZE=4><B><?=$heading?></B></FONT></TD>
<TD ALIGN=RIGHT VALIGN=middle><?=$menu ?>&nbsp;</TD>
</TR>
</TABLE>
</td>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_right.gif" width="2" height="100%" /></td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="center" valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_corner_top.jpg" width="6" height="9" /></td>
<td valign="bottom" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg" width="1" height="9" /></td>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_corner_top.jpg" width="6" height="9" /></td>
</tr><tr>
<td width="6" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_sidebar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_sidebar.jpg" width="6" height="100" /></td>
<td align="left" valign="top">
<? } else if ($heading) { // This is what gets printed on any other page with a heading ?>
<div align="center">
<table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_corner_top.jpg" width="6" height="9" /></td>
<td valign="bottom" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg" width="1" height="9" /></td>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_corner_top.jpg" width="6" height="9" /></td>
</tr>
<tr>
<td width="6" bgcolor="<? echo $THEME->body?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="left" valign="top"><A TARGET="<?=$CFG->main_frame?>" HREF="<? echo $CFG->wwwroot ?>"><img src="<? echo "$CFG->wwwroot/theme/$CFG->theme/$THEME->smalllogo" ?>" border="0" /></A></td>
<td width="6" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_sidebar.jpg" width="6" height="100%" /></td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="center" valign="middle">
<table WIDTH=100% CELLPADDING=0 CELLSPACING=0 BORDER=0>
<TR>
<TD ALIGN=LEFT VALIGN=middle>&nbsp;<FONT SIZE=4><B><?=$heading?></B></FONT></TD>
<TD ALIGN=RIGHT VALIGN=middle><?=$menu ?>&nbsp;</TD>
</TR>
</table>
<? if ($navigation) { // This is the navigation table with breadcrumbs ?>
<table BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR>
<TD BGCOLOR="<?=$THEME->cellheading?>" CLASS="navbar" VALIGN=middle>&nbsp;<FONT SIZE=2><B><? print_navigation("$navigation"); ?></B></FONT></TD>
<TD BGCOLOR="<?=$THEME->cellheading?>" CLASS="navbar" ALIGN=RIGHT WIDTH=20 VALIGN=TOP><?=$button ?></TD>
</TR>
</table>
<? } ?>
</td>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_right.gif" width="2" height="100%" /></td>
</tr>
</table><table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="1" bgcolor="<? echo $THEME->themeborders?>"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/side_left.gif" width="2" height="100%" /></td>
<td align="center" valign="top">
<table border="0" cellspacing="0" cellpadding="0" width="<? echo $THEME->themewidth?>">
<tr>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_corner_top.jpg" width="6" height="9" /></td>
<td valign="bottom" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/top_bar.jpg" width="1" height="9" /></td>
<td width="6"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/left_corner_top.jpg" width="6" height="9" /></td>
</tr><tr>
<td width="6" background="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_sidebar.jpg"><img src="<?=$CFG->wwwroot?>/theme/<?=$CFG->theme ?>/images/right_sidebar.jpg" width="6" height="100" /></td>
<td align="left" valign="top">
<? } else { // This is what gets printed on any other page (no heading, not home page) ?>
<BLOCKQUOTE>
<? } ?>
<!-- End of header -->