ManagerJosh
Tue 16th Nov '04, 7:09am
Okay, so this is just odd. On one of my sites (which is on server a) this script works, however on my primary site (which is on server a) this script doesn't work
I downloaded and reuploaded the script and basic sql data over and over and over and the blasted thing doesn't work
in globals.php, I have this:
$get_lang = mysql_query("select `thetext`,`taginserts`,`name` from `ezdatabase_lang`"); $GLOBALS['query_count']++;
while ($lang_info = mysql_fetch_array($get_lang))
{
$GLOBALS['lang'][$lang_info['name']] = array("thetext"=>$lang_info['thetext'],"taginserts"=>$lang_info['taginserts']);
}
and in functions.php
function lang($name)
{
$text = $GLOBALS['lang'][$name]['thetext'];
$taginserts = $GLOBALS['lang'][$name]['taginserts'];
$taginserts_line = explode("\n",$taginserts);
foreach ($taginserts_line as $line)
{
$tag = explode("|", $line);
global $$tag[0];
}
$text = stripslashes($text);
$text = stripslashes($text);
$text = stripslashes($text);
$text = stripslashes($text);
$text = addslashes($text);
eval ("\$text = \"$text\";");
if($text)
return $text;
else
return '<b>Invalid Language Reference</b>';
}
Primary site gets a Invalid Language Reference while my other site doesn't
Argh! What's going wrong here!!
I downloaded and reuploaded the script and basic sql data over and over and over and the blasted thing doesn't work
in globals.php, I have this:
$get_lang = mysql_query("select `thetext`,`taginserts`,`name` from `ezdatabase_lang`"); $GLOBALS['query_count']++;
while ($lang_info = mysql_fetch_array($get_lang))
{
$GLOBALS['lang'][$lang_info['name']] = array("thetext"=>$lang_info['thetext'],"taginserts"=>$lang_info['taginserts']);
}
and in functions.php
function lang($name)
{
$text = $GLOBALS['lang'][$name]['thetext'];
$taginserts = $GLOBALS['lang'][$name]['taginserts'];
$taginserts_line = explode("\n",$taginserts);
foreach ($taginserts_line as $line)
{
$tag = explode("|", $line);
global $$tag[0];
}
$text = stripslashes($text);
$text = stripslashes($text);
$text = stripslashes($text);
$text = stripslashes($text);
$text = addslashes($text);
eval ("\$text = \"$text\";");
if($text)
return $text;
else
return '<b>Invalid Language Reference</b>';
}
Primary site gets a Invalid Language Reference while my other site doesn't
Argh! What's going wrong here!!