Changeset 381 for trunk/import
- Timestamp:
- Mar 13, 2010, 9:42:12 PM (15 years ago)
- Location:
- trunk/import
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import/import_lua.php
r366 r381 13 13 { 14 14 echo('<br />'.$Group['Name'].'<br />'); 15 if($Group['LastVersion'] < $BuildNumber) 16 { 15 17 $File = new FileStream(); 16 18 $File->OpenFile('../source/'.$import_version.'/lua/'.$Group['LuaFileName'].'.lua'); … … 22 24 if(strpos($Line, '=') !== false) 23 25 { 24 $LineParts = explode(';', $Line); 25 $LineParts2 = explode('=', $LineParts[0]); 26 $Value['ShortCut'] = trim($LineParts2[0]); 27 $Value['Text'] = addslashes(stripslashes(substr(trim($LineParts2[1]), 1, -1))); 28 $Value['Comment'] = addslashes(stripslashes(substr(trim($LineParts[1]), 3))); 26 $LineParts = explode('=', $Line, 2); 27 $Value['ShortCut'] = trim($LineParts[0]); 28 $Line = substr(trim($LineParts[1]), 1); 29 $TempLine = str_replace('\"', ' ', $Line); // Temporary remove slashed quotes 30 $Value['Text'] = addslashes(stripslashes(substr($Line, 0, strpos($TempLine, '"')))); 31 $Line = trim(substr($Line, strpos($TempLine, '"') + 2)); // Skip closing quote and semicolon 32 $Value['Comment'] = addslashes(stripslashes(substr($Line, 3))); // Skip " --" 33 print_r($Value); 29 34 30 35 $Columns = ''; … … 88 93 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 89 94 $Database->SQLCommand('UPDATE `Group` SET `LastVersion` = "'.$BuildNumber.'", `LastImport` = NOW() WHERE `Id`='.$Group['Id']); 95 } else echo('Již importován pro verzi '.$import_version); 90 96 } 91 97 } -
trunk/import/index.php
r367 r381 10 10 ShowPage(); 11 11 12 if(! Licence(LICENCE_ADMIN))12 if(!$User->Licence(LICENCE_ADMIN)) 13 13 { 14 14 echo('Nemáte oprávnění'); … … 57 57 foreach($tables as $table) 58 58 { 59 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 60 if ($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 61 echo ('<br />'); 62 } 63 echo ('<br />'); echo ('<br />'); 59 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name']. '</a>'); 60 if($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 61 echo('<br />'); 62 } 63 echo('<br />'); 64 echo('<br />'); 64 65 ImportSQLMangos($Config['Web']['GameVersion'], $tables[0]); 65 if(isset($tables[1]))66 {66 if(isset($tables[1])) 67 { 67 68 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 68 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[1]).'\'", 3000)</script>'); 69 } else { 69 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[1]).'\'", 3000)</script>'); 70 } else 71 { 72 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 73 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 74 } 75 } else 76 { 77 foreach($tables as $table) 78 { 79 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 80 if($table < $_GET['group']) echo(' <strong>Hotovo</strong>'); 81 if($table == $_GET['group']) echo(' <strong>Pracuje</strong>'); 82 echo('<br />'); 83 } 84 echo('<br />'); 85 echo('<br />'); 86 ImportSQLMangos($Config['Web']['GameVersion'], $_GET['group']); 87 if(isset($tables[array_search($_GET['group'],$tables) + 1])) 88 { 89 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 90 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 91 } else 92 { 70 93 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 71 94 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 95 } 72 96 } 73 } else {74 foreach($tables as $table)75 {76 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>');77 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>');78 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>');79 echo ('<br />');80 }81 echo ('<br />'); echo ('<br />');82 ImportSQLMangos($Config['Web']['GameVersion'], $_GET['group']);83 if (isset($tables[array_search($_GET['group'],$tables)+1]))84 {85 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.86 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>');87 } else {88 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.89 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>');90 }91 }92 97 break; 93 98 case 'dbc': … … 103 108 foreach($tables as $table) 104 109 { 105 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>');106 if($table == $tables[0]) echo(' <strong>Pracuje</strong>');107 echo('<br />');108 }109 echo('<br />'); echo ('<br />');110 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 111 if($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 112 echo('<br />'); 113 } 114 echo('<br />'); echo ('<br />'); 110 115 ImportDBC($Config['Web']['GameVersion'], $tables[0]); 111 if(isset($tables[1]))112 {116 if(isset($tables[1])) 117 { 113 118 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 114 119 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=dbc&group='.$tables[1]).'\'", 3000)</script>'); 115 } else { 120 } else 121 { 122 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 123 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 124 } 125 } else 126 { 127 foreach($tables as $table) 128 { 129 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 130 if($table < $_GET['group']) echo (' <strong>Hotovo</strong>'); 131 if($table == $_GET['group']) echo (' <strong>Pracuje</strong>'); 132 echo('<br />'); 133 } 134 echo('<br />'); 135 echo('<br />'); 136 ImportDBC($Config['Web']['GameVersion'], $_GET['group']); 137 if(isset($tables[array_search($_GET['group'], $tables) + 1])) 138 { 139 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 140 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=dbc&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 141 } else 142 { 116 143 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 117 144 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 145 } 118 146 } 119 } else {120 foreach($tables as $table)121 {122 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>');123 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>');124 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>');125 echo ('<br />');126 }127 echo ('<br />'); echo ('<br />');128 ImportDBC($Config['Web']['GameVersion'], $_GET['group']);129 if (isset($tables[array_search($_GET['group'],$tables)+1]))130 {131 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.132 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=dbc&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>');133 } else {134 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'.135 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>');136 }137 }138 147 break; 139 148 case 'update_version':
Note:
See TracChangeset
for help on using the changeset viewer.