FileName = $FN; $DOP = file_get_contents( $FN ); $this->Labels = json_decode( $DOP, true ); } function GetLabel($LabelKey){ if (isset($this->Labels[$LabelKey])){ $J = str_replace("'","\'",$this->Labels[$LabelKey]); $J = str_replace('"','\"',$J); return $J; } else return $LabelKey; } function AddLabel($LabelKey, $LabelText ){ $this->Labels[$LabelKey] = $LabelText; $FD = fopen( $this->FileName, "w+" ); fprintf( $FD, json_encode( $this->Labels ) ); fclose( $FD ); } }; ?>