Fixed patient phone number problem.
[openemr.git] / interface / language / language.inc.php
bloba2510d473aed701b82547a6301884c5a8510faef
1 <?php
3 // gacl control
4 $thisauth = acl_check('admin', 'language');
6 if (!$thisauth) {
7 echo "<html>\n<body>\n";
8 echo "<p>You are not authorized for this.</p>\n";
9 echo "</body>\n</html>\n";
10 exit();
15 function check_pattern ($data,$pat) {
16 if (ereg ($pat, $data)) { return TRUE ; } else { RETURN FALSE; }
19 //$pat="^(19[0-9]{2}|20[0-1]{1}[0-9]{1})-(0[1-9]|1[0-2])-(0[1-9]{1}|1[0-9]{1}|2[0-9]{1}|3[0-1]{1})$";
22 // This function is kept here for information, but it is in a file called library/tranlation.inc.php
25 function xl($constant,$mode='r',$prepend='',$append='') {
26 $lang_id=LANGUAGE;
27 $sql="SELECT * FROM lang_definitions JOIN lang_constants ON lang_definitions.cons_id = lang_constants.cons_id WHERE lang_id='$lang_id' AND constant_name = '$constant' LIMIT 1";
28 $res=SqlStatement($sql);
29 $row=SqlFetchArray($res);
30 $string=$row['definition'];
31 if ($string=='') { $string="$constant"; }
32 $string=$prepend.$string.$append;
33 if ($mode=='r'){
34 return $string;
35 } else {
36 echo $string;