Migrate 1320 from branch into HEAD

This commit is contained in:
james 2008-11-02 02:35:46 +00:00
parent b45ef040bb
commit fde29e7a91
4 changed files with 14 additions and 9 deletions

View File

@ -358,7 +358,7 @@ function happy($str,$type="normal")
}
$HEADER_SENT=false;
function send_header($title="", $nav=null, $icon=null)
function send_header($title="", $nav=null, $icon=null, $titletranslated=false)
{
global $HEADER_SENT;
global $config;
@ -373,7 +373,7 @@ function send_header($title="", $nav=null, $icon=null)
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
<head><title><? if($title) echo i18n($title); else echo i18n($config['fairname']); ?></title>
<head><title><? if($title && !$titletranslated) echo i18n($title); else if($title) echo $title; else echo i18n($config['fairname']); ?></title>
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/theme/<?=$config['theme']?>/sfiab.css" type="text/css" media="all" />
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/tableeditor.css" type="text/css" media="all" />
</head>
@ -588,7 +588,10 @@ if(is_array($nav)) {
foreach($nav as $t=>$l) {
echo "<a href=\"{$config['SFIABDIRECTORY']}/$l\">".i18n($t).'</a> &raquo; ';
}
echo i18n($title);
if(!$titletranslated)
echo i18n($title);
else
echo $title;
echo '</div>';
}
?>
@ -613,8 +616,10 @@ if($icon && theme_icon($icon)) {
else
echo "<td>";
if($title)
if($title && !$titletranslated)
echo "<h2>".i18n($title)."</h2>";
else if($title)
echo "<h2>".$title."</h2>";
//if we're under /admin or /config then we want to show the ? help icon
if(substr(getcwd(),-6)=="/admin" || substr(getcwd(),-7)=="/config")
@ -1024,7 +1029,7 @@ function output_page_cms($filename)
if(mysql_num_rows($q))
{
$r=mysql_fetch_object($q);
send_header($r->title);
send_header($r->title,null,null,true);
if(file_exists("data/logo-200.gif") && $r->showlogo==1)
echo "<img align=\"right\" src=\"".$config['SFIABDIRECTORY']."/data/logo-200.gif\" border=\"0\">";
@ -1036,7 +1041,7 @@ function output_page_cms($filename)
echo $r->text;
}
else {
send_header(i18n("Error: File not found"));
send_header("Error: File not found");
echo error(i18n("The file you have requested (%1), does not exist on the server.",array($filename)));
return;
//not defined, lets grab the default text

View File

@ -23,7 +23,7 @@
?>
<?
include "common.inc.php";
send_header(i18n("Important Dates"),null,"important_dates");
send_header("Important Dates",null,"important_dates");
echo "<table>";

View File

@ -20,7 +20,7 @@ if($_GET['action']=="logout")
unset($_SESSION['schoolaccesscode']);
$happymsg=i18n("You have been logged out from the school access page");
}
send_header(i18n("School Access"));
send_header("School Access");

View File

@ -3,7 +3,7 @@ include "common.inc.php";
if($_SESSION['schoolid'] && $_SESSION['schoolaccesscode'])
{
send_header(i18n("School Participant Invitations"));
send_header("School Participant Invitations");
echo "<a href=\"schoolaccess.php\">&lt;&lt; ".i18n("Return to school access main page")."</a><br />";
echo "<br />";