Four pane rx printing.
[openemr.git] / library / translation.inc.php
blob2d5be0f6588a72018f4a4872fd2ff6748f6a07b6
1 <?php
2 // include_once($GLOBALS['srcdir'] . '/sql.inc');
3 include_once(dirname(__FILE__) . '/sql.inc'); // fixes vulnerability with register_globals
5 // this function is related to the interface/language module.
7 function xl($constant,$mode='r',$prepend='',$append='') {
8 $lang_id=LANGUAGE;
9 $sql="SELECT * FROM lang_definitions JOIN lang_constants ON " .
10 "lang_definitions.cons_id = lang_constants.cons_id WHERE " .
11 "lang_id='$lang_id' AND constant_name = '" .
12 addslashes($constant) . "' LIMIT 1";
13 $res=SqlStatement($sql);
14 $row=SqlFetchArray($res);
15 $string=$row['definition'];
16 if ($string=='') { $string="$constant"; }
17 $string="$prepend"."$string"."$append";
18 if ($mode=='e'){
19 echo $string;
20 } else {
21 return $string;