Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

27 lines
707 B

<?php
class Language{
var $Labels;
function Language($LangID=1, $_module = ''){
global $DATABASE;
$this->Labels=array();
$QS="SELECT key, label FROM labels" . $_module . " WHERE language_id='{$LangID}'";
$result= $DATABASE->Query($QS);
foreach ( $result as $array) $this->Labels[$array['key']]=$array['label'];
}
function GetLabel($LabelKey){
//global $Labels;
if (isset($this->Labels[$LabelKey])){
return $this->Labels[$LabelKey];
} else return $LabelKey;
}
function AddLabel($LabelKey, $LabelText, $LanguageID)
{
global $DATABASE;
$QS="INSERT INTO labels SET key='$LabelKey', label='$LabelText', language_id=$LanguageID";
$result= $DATABASE->Query($QS, false);
}
};
?>