00001 <?
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 include_once('/usr/share/php-adodb/adodb-exceptions.inc.php');
00022 include_once('/usr/share/php-adodb/adodb.inc.php');
00023
00024 include_once('TranslationProject.php');
00025 include_once('TranslationString.php');
00026 include_once('TranslationWordList.php');
00027 include_once('TranslationWord.php');
00028 include_once('ProjectIterator.php');
00029 include_once('StringIterator.php');
00030
00038 function fixstr($text)
00039 {
00040 return str_replace("'", "''", $text);
00041 }
00042
00051 function FixQuot($text)
00052 {
00053 $s = str_replace("&", "&", $text);
00054 $s = str_replace("\"", """, $s);
00055 $s = str_replace("<", "<", $s);
00056 $s = str_replace(">", ">", $s);
00057 return $s;
00058 }
00063 function &GetDbConn()
00064 {
00065 global $DB;
00066 return $DB;
00067 }
00068
00073 function &GetTables()
00074 {
00075 $tables["WordIndex"] = "WordIndex";
00076 $tables["SentenceIndex"] = "SentenceIndex";
00077 $tables["Strings"] = "Strings";
00078 $tables["Projects"] = "Projects";
00079 $tables["Locales"] = "Locales";
00080 return $tables;
00081 }
00082
00086 function GetConfigVar($varName)
00087 {
00088 global $CONFIG;
00089 return $CONFIG[$varName];
00090 }
00091
00096 function CacheIndexes()
00097 {
00098 TranslationString::InitSentenceLengthCache();
00099
00100 TranslationWordList::InitWordsCache();
00101 TranslationProject::InitLocaleIDCache();
00102 }
00103 ?>