Changeset 38 for branches/3/class/translation.php
- Timestamp:
- Nov 25, 2008, 5:12:10 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3/class/translation.php
r35 r38 7 7 8 8 // constructor 9 function translation($id, $database, $Get Text = true)9 function translation($id, $database, $Gettext = true) 10 10 { // BEGIN constructor 11 11 $this->id = $id; 12 12 $this->database = $database; 13 13 $this->GetData(); 14 if ($Get Text and isset($this->data)) $this->GetText();14 if ($Gettext and isset($this->data)) $this->Gettext(); 15 15 } // END constructor 16 16 17 17 function GetData() 18 18 { // BEGIN function GetData 19 $Query = $this->database->query('SELECT *,(SELECT Id FROM ` TextGroup` WHERE19 $Query = $this->database->query('SELECT *,(SELECT Id FROM `textGroup` WHERE 20 20 `Index` = `cz`.`Index` AND `Group` = `cz`.`Group` AND `Language` = 1) 21 as en_Id FROM TextGroup as cz WHERE Id="'.$this->id.'"');21 as en_Id FROM textGroup as cz WHERE Id="'.$this->id.'"'); 22 22 if($Query->num_rows > 0) { 23 23 $Row = $Query->fetch_array(); … … 34 34 } // END function SetData 35 35 36 function Get Text()37 { // BEGIN function Get Text38 $Query = $this->database->query("SELECT ` Text`,`Translation`.`Name`, `Translation`.`MangosColumn` FROM `Text`39 JOIN ` Translation` ON `Translation`.`Id` = `Text`.`GroupItem`40 WHERE ` TranslationGroup` = ".$this->id."");36 function Gettext() 37 { // BEGIN function Gettext 38 $Query = $this->database->query("SELECT `text`,`translation`.`Name`, `translation`.`MangosColumn` FROM `text` 39 JOIN `translation` ON `translation`.`Id` = `text`.`GroupItem` 40 WHERE `translationGroup` = ".$this->id.""); 41 41 while ($Row = $Query->fetch_array()) { 42 $this->text[$Row['Name']] = $Row[' Text'];42 $this->text[$Row['Name']] = $Row['text']; 43 43 } 44 44 $this->data['text'] = $this->text; 45 } // END function Get Text45 } // END function Gettext 46 46 47 47 } // END class translation
Note:
See TracChangeset
for help on using the changeset viewer.