Changeset 223
- Timestamp:
- Jul 1, 2009, 10:27:44 PM (15 years ago)
- Location:
- trunk/import
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/import/import_dbc.php
r216 r223 10 10 11 11 12 function ImportDBC($import_version )12 function ImportDBC($import_version,$GroupId) 13 13 { 14 14 global $Database, $TranslationTree, $Config; … … 16 16 17 17 echo('Načítání textů z DBC souborů...'); 18 foreach($TranslationTree as $Group) 19 { 18 $Group = $TranslationTree[$GroupId]; 20 19 if(($Group['DBCFileName'] != '') and ($Group['TablePrefix'] != '')) 21 20 { … … 64 63 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 65 64 echo('# '); 66 $NewCount++;67 65 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.$DbRow2['ID'].'">'.$DbRow2['ID'].'</a> ('.$DbRow2['entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', 11); 68 66 } … … 81 79 echo('+ '); 82 80 $NewCount++; 83 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'. $DbRow2['ID'].'</a> ('.$ItemId.') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' přidán.', 11);81 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$ItemId.') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' přidán.', 11); 84 82 85 83 } 86 84 $Count++; 87 } 85 } 88 86 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 89 }90 87 } 91 88 echo('<strong>Dokončeno.</strong>'); -
trunk/import/import_lua.php
r216 r223 34 34 $Columns = substr($Columns, 1); 35 35 36 $DbResult2 = $Database->SQLCommand('SELECT ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE ShortCut="'.$Value['ShortCut'].'" AND (Language=0) ORDER BY VersionStart DESC LIMIT 1');36 $DbResult2 = $Database->SQLCommand('SELECT VersionEnd, ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE ShortCut="'.$Value['ShortCut'].'" AND (Language=0) ORDER BY VersionStart DESC LIMIT 1'); 37 37 if(isset($DbResult2) and (mysql_num_rows($DbResult2) > 0)) 38 38 { … … 57 57 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 58 58 echo('# '); 59 $NewCount++;60 59 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.$DbRow2['ID'].'">'.$DbRow2['ID'].'</a> ('.$DbRow2['entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', 11); 61 60 } … … 80 79 echo('+ '); 81 80 $NewCount++; 82 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'. $DbRow2['ID'].'</a> ('.$Entry.') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' přidán.', 11);81 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$Entry.') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' přidán.', 11); 83 82 } 84 83 }; -
trunk/import/index.php
r216 r223 30 30 { 31 31 case 'sql_mangos': 32 ImportSQLMangos(); 32 foreach($TranslationTree as $Group) 33 { 34 if(($Group['MangosTable'] != '') and ($Group['TablePrefix'] != '')) 35 { 36 $tables[] = $Group['Id']; 37 } 38 } 39 if(!array_key_exists('group', $_GET)) 40 { 41 foreach($tables as $table) 42 { 43 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 44 if ($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 45 echo ('<br />'); 46 } 47 echo ('<br />'); echo ('<br />'); 48 ImportSQLMangos($Config['Web']['GameVersion'], $tables[0]); 49 if (isset($tables[1])) 50 { 51 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 52 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[1]).'\'", 3000)</script>'); 53 } else { 54 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 55 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 56 } 57 } else { 58 foreach($tables as $table) 59 { 60 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 61 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>'); 62 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>'); 63 echo ('<br />'); 64 } 65 echo ('<br />'); echo ('<br />'); 66 ImportSQLMangos($Config['Web']['GameVersion'], $_GET['group']); 67 if (isset($tables[array_search($_GET['group'],$tables)+1])) 68 { 69 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 70 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 71 } else { 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 } 33 76 break; 34 77 case 'dbc': 35 ImportDBC($Config['Web']['GameVersion']); 78 foreach($TranslationTree as $Group) 79 { 80 if(($Group['DBCFileName'] != '') and ($Group['TablePrefix'] != '')) 81 { 82 $tables[] = $Group['Id']; 83 } 84 } 85 if(!array_key_exists('group', $_GET)) 86 { 87 foreach($tables as $table) 88 { 89 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 90 if ($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 91 echo ('<br />'); 92 } 93 echo ('<br />'); echo ('<br />'); 94 ImportDBC($Config['Web']['GameVersion'], $tables[0]); 95 if (isset($tables[1])) 96 { 97 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 98 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[1]).'\'", 3000)</script>'); 99 } else { 100 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 101 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 102 } 103 } else { 104 foreach($tables as $table) 105 { 106 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 107 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>'); 108 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>'); 109 echo ('<br />'); 110 } 111 echo ('<br />'); echo ('<br />'); 112 ImportDBC($Config['Web']['GameVersion'], $_GET['group']); 113 if (isset($tables[array_search($_GET['group'],$tables)+1])) 114 { 115 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 116 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 117 } else { 118 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 119 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 120 } 121 } 36 122 break; 37 123 case 'update_version':
Note:
See TracChangeset
for help on using the changeset viewer.