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