- Timestamp:
- Feb 2, 2009, 7:14:45 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/client_files/export_fo_file.php
r40 r52 1 1 <?php 2 2 3 4 5 6 3 session_start(); 4 include('../includes/config.php'); 5 include('../includes/databaseconection.php'); 6 include('../includes/global_function.php'); 7 7 8 8 //připojení do databáze 9 10 11 9 $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password']); 10 $Database->SQLCommand('SET NAMES '.$Config['Database']['Charset']); 11 $Database->SelectDatabase($Config['Database']['Database']); 12 12 13 if (Licence(2)) { // echo 'Přístup povolen'; 14 } else { die('Přístup zamítnut!'); } 13 if(Licence(LICENCE_ADMIN)) 14 { 15 } else die('Přístup zamítnut!'); 15 16 16 //const 17 $save_filename = '_export/LocalizationStrings.lua'; 17 $save_filename = '_export/LocalizationStrings.lua'; 18 18 19 //funkce 20 function RepairText($text) 21 { // BEGIN function RepairText 22 $text = mysql_escape_string($text); 23 return $text; 24 } // END function RepairText 19 function RepairText($text) 20 { 21 $text = mysql_escape_string($text); 22 return $text; 23 } 25 24 25 $Buffer = "local f=function(name, en, ru) RuWoW_interface[name]=ru; RuWoW_interface_entoname[en]=name; end; RuWoW_interface={ };RuWoW_interface_entoname={ };\n"; 26 $sql = "SELECT * FROM client_text WHERE Language = '0' AND File = 0"; 27 $ID = $Database->SQLCommand($sql); 28 while($Line = mysql_fetch_array($ID)) 29 { 30 $id_text = RepairText($Line['id_text']); 31 $text = RepairText($Line['text']); 32 33 $Buffer .= 'f("'.$id_text.'", "'.$text.'", "test");'."\n"; 34 } 26 35 36 $file_handle = fopen($save_filename, 'w'); 37 $write_result = fwrite($file_handle, $Buffer); 38 fclose($file_handle); 27 39 28 $Buffer = "local f=function(name, en, ru) RuWoW_interface[name]=ru; RuWoW_interface_entoname[en]=name; end; RuWoW_interface={ };RuWoW_interface_entoname={ }; 29 "; 30 $sql = "SELECT * FROM client_text WHERE Language = '0' AND File = 0"; 31 $ID = $Database->SQLCommand($sql); 32 while ($Line = mysql_fetch_array($ID)) { 33 34 $id_text = RepairText($Line['id_text']); 35 $text = RepairText($Line['text']); 36 37 $Buffer .= 'f("'.$id_text.'", "'.$text.'", "test"); 38 '; 39 } 40 41 $file_handle = fopen($save_filename, 'w'); 42 $write_result = fwrite($file_handle, $Buffer); 43 fclose($file_handle); 44 45 echo 'Exportování LocalizationStrings.lua: <b>hotovo</b>'; 46 40 echo('Exportování LocalizationStrings.lua: <b>hotovo</b>'); 47 41 48 42 ?> -
trunk/statistic.php
r49 r52 46 46 47 47 $Query = 'SELECT ID,user, LastLogin, GM, ('; 48 foreach($TranslationTree as $Group) ;48 foreach($TranslationTree as $Group) 49 49 if($Group['TablePrefix'] != '') 50 50 $Query .= '(SELECT count(*) FROM `'.$Group['TablePrefix'].'` WHERE User = user.ID AND Complete = 1 AND Language <> 0) + ';
Note:
See TracChangeset
for help on using the changeset viewer.