2004-11-10 13:52:01 +00:00
|
|
|
<?
|
|
|
|
require("config.inc.php");
|
2004-11-30 17:46:39 +00:00
|
|
|
mysql_connect($DBHOST,$DBUSER,$DBPASS);
|
|
|
|
mysql_select_db($DBNAME);
|
|
|
|
|
|
|
|
|
|
|
|
function i18n($str)
|
|
|
|
{
|
|
|
|
if(!$str)
|
|
|
|
return "";
|
|
|
|
|
|
|
|
if($_SESSION['lang'])
|
|
|
|
{
|
|
|
|
if($_SESSION['lang']=="en")
|
|
|
|
return $str;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$q=mysql_query("SELECT * FROM languages WHERE lang='".$_SESSION['lang']."' AND str='".mysql_escape_string($str)."'");
|
|
|
|
if($r=@mysql_fetch_object($q))
|
|
|
|
{
|
|
|
|
if($r->val)
|
|
|
|
return $r->val;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return "<font color=red>($str)</font>";
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
mysql_query("INSERT INTO languages (lang,str) VALUES ('".$_SESSION['lang']."','".mysql_escape_string($str)."')");
|
|
|
|
echo mysql_error();
|
|
|
|
return "<font color=red>($str)</font>";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//no language set, assume english
|
|
|
|
return $str;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-10 13:52:01 +00:00
|
|
|
|
|
|
|
function send_header($title="")
|
|
|
|
{
|
2004-11-30 17:46:39 +00:00
|
|
|
global $FAIRYEAR;
|
|
|
|
$q=mysql_query("SELECT * FROM config WHERE year='$FAIRYEAR'");
|
|
|
|
while($r=mysql_fetch_object($q))
|
|
|
|
{
|
|
|
|
$config[$r->var]=$r->val;
|
|
|
|
}
|
|
|
|
|
2004-11-10 13:52:01 +00:00
|
|
|
?>
|
2004-11-10 15:31:30 +00:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
2004-11-30 17:46:39 +00:00
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >
|
2004-11-10 15:31:30 +00:00
|
|
|
<head><title><?=$title?></title>
|
2004-11-30 17:46:39 +00:00
|
|
|
<link rel="stylesheet" href="sfiab.css" type="text/css" />
|
2004-11-10 15:31:30 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2004-11-30 17:46:39 +00:00
|
|
|
|
|
|
|
<div id="header">
|
|
|
|
<?
|
|
|
|
echo "<h1>".i18n($config['fairname'])."</h1>";
|
|
|
|
?>
|
2004-11-10 15:31:30 +00:00
|
|
|
<hr />
|
2004-11-30 17:46:39 +00:00
|
|
|
</div>
|
2004-11-10 13:52:01 +00:00
|
|
|
|
2004-11-30 17:46:39 +00:00
|
|
|
<div id="left">
|
|
|
|
<ul class="mainnav">
|
|
|
|
<li><a href="register_participants.php">Participant Registration</a></li>
|
|
|
|
<li><a href="register_judges.php">Judges Registration</a></li>
|
|
|
|
</ul>
|
|
|
|
<br />
|
|
|
|
<ul class="mainnav">
|
|
|
|
<li><a href="admin/">Fair Administration</a></li>
|
|
|
|
<li><a href="config/">SFIAB Configuration</a></li>
|
|
|
|
</ul>
|
|
|
|
<br />
|
|
|
|
<p class="aligncenter">
|
|
|
|
<a href="http://www.sfiab.ca/">Return to SFIAB Development Page</a>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div id="main">
|
2004-11-10 13:52:01 +00:00
|
|
|
<?
|
|
|
|
}
|
|
|
|
|
|
|
|
function send_footer()
|
|
|
|
{
|
|
|
|
?>
|
2004-11-30 17:46:39 +00:00
|
|
|
</div>
|
|
|
|
<div id="footer">
|
|
|
|
</div>
|
|
|
|
|
2004-11-10 15:31:30 +00:00
|
|
|
</body>
|
|
|
|
</html>
|
2004-11-10 13:52:01 +00:00
|
|
|
|
|
|
|
<?
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
?>
|