forked from science-ation/science-ation
A few more cleanups, and unfortunately we cant convert the whole $config to javascript, so just do the SFIABDIRECTORY that we need for now, we can add more later
This commit is contained in:
parent
030f2030e8
commit
4143f289af
@ -124,6 +124,10 @@ else {
|
||||
$config[$r->var]=$r->val;
|
||||
}
|
||||
}
|
||||
//doh! we cant do it all, becuase it continains things like registration passwords! lets just add things as we need them i guess
|
||||
//this gets turned into a 'config' object that is accessible in javascript (and output directly to the browser, so dont put
|
||||
//anything in it that shouldnt be available to the public!
|
||||
$configjs['SFIABDIRECTORY']=$config['SFIABDIRECTORY'];
|
||||
|
||||
$dbdbversion=$config['DBVERSION'];
|
||||
$dbcodeversion=@file($prependdir."db/db.code.version.txt");
|
||||
|
@ -32,6 +32,7 @@ $HEADER_SENT=false;
|
||||
function send_header($title="", $nav=null, $icon=null, $titletranslated=false) {
|
||||
global $HEADER_SENT;
|
||||
global $config;
|
||||
global $configjs;
|
||||
global $roles;
|
||||
global $prependdir;
|
||||
global $conference;
|
||||
@ -48,11 +49,11 @@ function send_header($title="", $nav=null, $icon=null, $titletranslated=false) {
|
||||
<title><? if($title && !$titletranslated) echo i18n($title); else if($title) echo $title; else echo i18n($config['fairname']); ?></title>
|
||||
<?
|
||||
foreach($theme['css'] AS $cssfile) {
|
||||
echo "<link rel=\"stylesheet\" href=\"{$config['SFIABDIRECTORY']}/theme/{$config['theme']}/{$cssfile}\" type=\"text/css\" media=\"all\" />\n";
|
||||
echo " <link rel=\"stylesheet\" href=\"{$config['SFIABDIRECTORY']}/theme/{$config['theme']}/{$cssfile}\" type=\"text/css\" media=\"all\" />\n";
|
||||
}
|
||||
?>
|
||||
<link rel="stylesheet" href="<?=$config['SFIABDIRECTORY']?>/tableeditor.css" type="text/css" media="all" />
|
||||
<meta charset="UTF-8">
|
||||
<meta charset="utf-8">
|
||||
</head>
|
||||
<body>
|
||||
<script type="text/javascript" src="<?=$config['SFIABDIRECTORY']?>/js/jquery/1.3.2/jquery.min.js"></script>
|
||||
@ -67,8 +68,7 @@ $(document).ready(function(){
|
||||
if($("#importantdatesbox").length)
|
||||
$("#importantdatesbox").load("important_dates.php?display=box");
|
||||
});
|
||||
//and dump the whole PHP configuration into a Javascript Object, so we can use it anywhere we need to refer to config variables in javascript
|
||||
var config=<?=json_encode($config)?>;
|
||||
var config=<?=json_encode($configjs)?>;
|
||||
</script>
|
||||
<?
|
||||
//if we're under /admin or /config or /super we also want the translation editor
|
||||
|
Loading…
Reference in New Issue
Block a user