Changeset 302
- Timestamp:
- Dec 29, 2009, 12:58:13 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Options.php
r191 r302 19 19 // $Line = mysql_fetch_assoc($Database->SQLCommand("SELECT * FROM user WHERE ID = ".$_SESSION['UserID'])); 20 20 if(($_SESSION['Pass'] == $OldPass) and ($NewPass == $NewPass2)) 21 21 { 22 22 $Database->SQLCommand('UPDATE user SET pass = sha1("'.$NewPass.'") WHERE ID = '.$_SESSION['UserID']); 23 23 echo('Heslo změněno!<br />'); 24 24 } else echo('<br />Hesla se neshodují!<br />'); 25 $Database->SQLCommand( "UPDATE user SET Email = '$Email', Language = '$Language', redirecting = '$redirecting' WHERE ID = ".$_SESSION['UserID']);26 27 25 $Database->SQLCommand('UPDATE user SET Email = "'.$Email.'", Language = "'.$Language.'", redirecting = "'.$redirecting.'" WHERE ID = '.$_SESSION['UserID']); 26 echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User.'</b><br />'); 27 WriteLog('Úprava nastavení!', 3); 28 28 } else 29 29 { 30 $Line = mysql_fetch_assoc($Database->SQLCommand( "SELECT * FROM user WHERE ID = ".$_SESSION['UserID']));30 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM user WHERE ID = '.$_SESSION['UserID'])); 31 31 echo('<form action="Options.php" method="post"> 32 32 <fieldset><legend>Nastavení uživatele</legend> 33 33 <table> 34 34 <tr> … … 51 51 <td>Normálně budu překládat do: </td> 52 52 <td>'); 53 54 53 WriteLanguages($Line['Language']); 54 echo('</td> 55 55 </tr> 56 56 <tr> 57 57 <td>Po uložení překladu přesměrovat: </td> 58 58 <td>'); 59 59 60 60 echo('<select name="redirecting">'); 61 61 echo('<option value="0">Nikam</option>'); … … 63 63 echo('<option value="2"'); if ($Line['redirecting'] == '2') echo(' selected="selected"'); echo('>Na další překlad</option>'); 64 64 echo('<option value="3"'); if ($Line['redirecting'] == '3') echo(' selected="selected"'); echo('>Na předchozí překlad</option>'); 65 echo('</select>'); 66 67 65 echo('</select>'); 66 67 echo('</td> 68 68 </tr> 69 69 <tr> … … 73 73 </form>'); 74 74 75 echo (' <fieldset><legend>Překladatelský tým</legend>'); 76 $ID = $Database->SQLCommand("SELECT * FROM team"); 77 echo('<a href="team.php?create">Vytvořit překladatelský tým</a><br /><br /> 78 <form action="team.php" method="get"><select name="gointeam">'); 79 While($LineTeam = mysql_fetch_assoc($ID)) { 80 echo('<option value="'.$LineTeam['ID'].'"'); 81 if ($LineTeam['ID'] == $Line['team']) echo(' selected="selected"'); 82 echo('>'.$LineTeam['name'].'</option>'); 83 } 84 echo('</select> <input type="submit" value="Vstoupit" /> 85 </form>'); 86 echo ('</fieldset> '); 75 echo(' <fieldset><legend>Překladatelský tým</legend>'); 76 $ID = $Database->SQLCommand('SELECT * FROM `Team`'); 77 echo('<a href="team.php?create">Vytvořit překladatelský tým</a><br /><br /> 78 <form action="team.php" method="get">'. 79 '<input type="hidden" name="action" value="gointeam"/>'. 80 '<select name="id">'); 81 while($LineTeam = mysql_fetch_assoc($ID)) 82 { 83 echo('<option value="'.$LineTeam['Id'].'"'); 84 if ($LineTeam['Id'] == $Line['team']) echo(' selected="selected"'); 85 echo('>'.$LineTeam['Name'].'</option>'); 86 } 87 echo('</select> <input type="submit" value="Vstoupit" /> 88 </form>'); 89 echo('</fieldset>'); 90 } 91 } else echo('Nejste přihlášený!'); 92 ShowFooter(); 87 93 88 }89 } else echo 'Nejste přihlášený!';90 ShowFooter();91 94 ?> 92 95 -
trunk/action.php
r300 r302 29 29 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `user` WHERE `user` LIKE "%'.$Search.'%"')); 30 30 echo('<tr><td><a href="userlist.php?search='.$Search.'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>'); 31 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM ` team` WHERE `name` LIKE "%'.$Search.'%" OR `description` LIKE "%'.$Search.'%"'));31 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `Team` WHERE `Name` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%"')); 32 32 echo('<tr><td><a href="team.php?search='.$Search.'">Týmy</a></td><td>'.$Line[0].'</td></tr>'); 33 33 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `verseclient` WHERE `text` LIKE "%'.$Search.'%"')); -
trunk/img_level.php
r292 r302 118 118 119 119 // Hlavní kod pro překladatelské týmy 120 if($nothide) $ID = $Database->SQLCommand('SELECT ID,name,(SELECT avg(XP) FROM user WHERE team = team.ID) as average FROM team');121 else $ID = $Database->SQLCommand('SELECT ID,name,(SELECT avg(XP) FROM user WHERE team = team.ID) as average FROM team WHERE ID IN (SELECT Team FROM user WHERE NeedUpdate = 1)');120 if($nothide) $ID = $Database->SQLCommand('SELECT ID,name,(SELECT avg(XP) FROM user WHERE team = Team.Id) as average FROM Team'); 121 else $ID = $Database->SQLCommand('SELECT ID,name,(SELECT avg(XP) FROM user WHERE team = Team.Id) as average FROM Team WHERE ID IN (SELECT Team FROM user WHERE NeedUpdate = 1)'); 122 122 while($LineTeam = mysql_fetch_array($ID)) 123 123 { -
trunk/import/generatecodeXML.php
r195 r302 5 5 function startElement($parser, $name, $attrs) 6 6 { 7 global $depth,$xml_buffer; 8 for ($i = 0; $i < $depth[$parser]; $i++) { 9 echo " "; 10 } 7 global $depth, $xml_buffer; 8 9 for ($i = 0; $i < $depth[$parser]; $i++) 10 { 11 echo " "; 12 } 11 13 // echo "<BR />$name\n"; 12 14 // print_r( $attrs); … … 20 22 function endElement($parser, $name) 21 23 { 22 global $depth; 23 $depth[$parser]--; 24 global $depth; 25 26 $depth[$parser]--; 24 27 } 25 28 //TODO '.$Config['Web']['GameVersion'].' … … 27 30 28 31 $files = scandir($verze); 29 foreach($files as $file) { 30 $end = substr($file,strlen($file)-3); 31 if ($end == 'xml'){ 32 echo '<br />--'.$file.'<br /><br />'; 33 $file = $verze.'/'.$file; 34 $xml_buffer = array(); //mazání 35 32 foreach($files as $file) 33 { 34 $end = substr($file, strlen($file) - 3); 35 if($end == 'xml') 36 { 37 echo('<br />--'.$file.'<br /><br />'); 38 $file = $verze.'/'.$file; 39 $xml_buffer = array(); //mazání 40 41 $xml_parser = xml_parser_create(); 42 xml_set_element_handler($xml_parser, 'startElement', 'endElement'); 43 if (!($fp = fopen($file, 'r'))) 44 { 45 die('could not open XML input'); 46 } 36 47 37 $xml_parser = xml_parser_create(); 38 xml_set_element_handler($xml_parser, "startElement", "endElement"); 39 if (!($fp = fopen($file, "r"))) { 40 die("could not open XML input"); 41 } 42 43 while ($data = fread($fp, 4096)) { 44 if (!xml_parse($xml_parser, $data, feof($fp))) { 45 die(sprintf("XML error: %s at line %d", 48 while ($data = fread($fp, 4096)) 49 { 50 if (!xml_parse($xml_parser, $data, feof($fp))) 51 { 52 die(sprintf("XML error: %s at line %d", 46 53 xml_error_string(xml_get_error_code($xml_parser)), 47 54 xml_get_current_line_number($xml_parser))); 48 } 49 } 50 xml_parser_free($xml_parser); 51 52 for ($i = 0; $i < count($xml_buffer); $i++) { 53 $line = $xml_buffer[$i]; 54 if (isset($line[1]['TEXT'])) { 55 $name = $line[1]['NAME']; 55 } 56 } 57 xml_parser_free($xml_parser); 58 59 for ($i = 0; $i < count($xml_buffer); $i++) 60 { 61 $line = $xml_buffer[$i]; 62 if (isset($line[1]['TEXT'])) 63 { 64 $name = $line[1]['NAME']; 56 65 57 if ($name == '') { //u FontString 58 $j = 1; 59 while (substr($name,0,1) == '') { 60 if (isset($xml_buffer[$i-$j][1]['NAME'])) { 61 $name = $xml_buffer[$i-$j][1]['NAME'].$name; 62 } 63 $j++; 64 } 65 } 66 if ($name == '') 67 { //u FontString 68 $j = 1; 69 while (substr($name,0,1) == '') 70 { 71 if (isset($xml_buffer[$i-$j][1]['NAME'])) 72 { 73 $name = $xml_buffer[$i-$j][1]['NAME'].$name; 74 } 75 $j++; 76 } 77 } 66 78 67 if (substr($name,0,1) == '$') { //zjišťování potomků 68 $j = 1; 69 while (substr($name,0,1) == '$') { 70 if (($xml_buffer[$i-$j][0] < $line[0]) and (isset($xml_buffer[$i-$j][1]['NAME']))) { 71 $name = substr($name,strlen('$parent')); 72 $name = $xml_buffer[$i-$j][1]['NAME'].$name; 73 } 74 $j++; 75 } 76 } 77 if ((' - ' <> $line[1]['TEXT']) and ('' <> $line[1]['TEXT'])) 78 echo $name.':SetText(i["'.$line[1]['TEXT'].'"]);<br />'; 79 } 79 if (substr($name,0,1) == '$') 80 { //zjišťování potomků 81 $j = 1; 82 while (substr($name,0,1) == '$') 83 { 84 if (($xml_buffer[$i-$j][0] < $line[0]) and (isset($xml_buffer[$i-$j][1]['NAME']))) 85 { 86 $name = substr($name,strlen('$parent')); 87 $name = $xml_buffer[$i-$j][1]['NAME'].$name; 88 } 89 $j++; 90 } 91 } 92 if ((' - ' <> $line[1]['TEXT']) and ('' <> $line[1]['TEXT'])) 93 echo $name.':SetText(i["'.$line[1]['TEXT'].'"]);<br />'; 94 } 95 } 96 } 97 } 80 98 81 }82 }83 }84 99 ?> -
trunk/import/import_sql_mangos.php
r250 r302 1 1 <?php 2 2 3 function ImportSQLMangos($import_version, $GroupId)3 function ImportSQLMangos($import_version, $GroupId) 4 4 { 5 5 global $Database, $TranslationTree, $PatchVersion, $Config; 6 6 7 $BuildNumber = GetBuildNumber($import_version); 7 8 8 9 $Group = $TranslationTree[$GroupId]; 9 10 10 11 12 11 $files = scandir('../source/'.$import_version.'/sql/', 1); 12 unset($files[count($files) - 1]); 13 unset($files[count($files) - 1]); 13 14 14 $File = new FileStream(); 15 $File->OpenFile('../source/'.$import_version.'/sql/'.$files[0]); 16 $NewCount = 0; 17 $Count = 0; 18 $folow_structure = False; 19 $i = 0; 20 while((!$File->EOF())) 15 $File = new FileStream(); 16 $File->OpenFile('../source/'.$import_version.'/sql/'.$files[0]); 17 $NewCount = 0; 18 $Count = 0; 19 $folow_structure = False; 20 $i = 0; 21 while((!$File->EOF())) 22 { 23 $Line = $File->ReadLine(); 24 //Struktura 25 if(strpos($Line, 'CREATE TABLE `'.$Group['MangosTable'].'`') !== false) 26 { 27 $Line = ''; 28 $folow_structure = True; 29 $i = 0; 30 } 31 if((strpos($Line, ';') !== false) and ($folow_structure == true)) 32 { 33 $folow_structure = False; 34 // echo ('Struktura: <br />'); 35 // print_r($structure); 36 // echo ('<br /><br />'); 37 } 38 if(($folow_structure == true) and ($Line != '')) 39 { 40 $str = substr($Line, 0, strpos($Line, '`')); 41 $Line = substr($Line, strpos($Line, '`') + 1); 42 $Line = substr($Line, 0, strpos($Line, '`')); 43 if(strlen($str) < 3) $structure[$i] = $Line; 44 $i++; 45 } 46 47 //data 48 if((strpos($Line, 'INSERT INTO `'.$Group['MangosTable'].'`') !== false) and (isset($structure))) 49 { 50 $Line = substr($Line, strpos($Line, '(') + 1); 51 $Line = substr($Line, 0, strpos($Line, ');')); 52 $LineParts = explode('),(', $Line); 53 unset($Line); 54 55 foreach($LineParts as $LinePart) 21 56 { 22 $Line = $File->ReadLine(); 23 //Struktura 24 if(strpos($Line, 'CREATE TABLE `'.$Group['MangosTable'].'`') !== false) 25 { 26 $Line = ''; 27 $folow_structure = True; 28 $i = 0; 29 } 30 if((strpos($Line, ';') !== false) and ($folow_structure == true)) 31 { 32 $folow_structure = False; 33 // echo ('Struktura: <br />'); 34 // print_r($structure); 35 // echo ('<br /><br />'); 36 } 37 if (($folow_structure == True) and ($Line != '')) 38 { 39 $str = substr($Line,0, strpos($Line,'`')); 40 $Line = substr($Line, strpos($Line,'`')+1); 41 $Line = substr($Line,0, strpos($Line,'`')); 42 if (strlen($str) < 3) 43 $structure[$i] = $Line; 44 $i++; 45 } 46 47 //data 48 if ((strpos($Line, 'INSERT INTO `'.$Group['MangosTable'].'`') !== false) and (isset($structure))) 49 { 50 $Line = substr($Line, strpos($Line,'(')+1); 51 $Line = substr($Line,0, strpos($Line,');')); 52 $LineParts = explode('),(', $Line); 53 unset($Line); 54 55 foreach($LineParts as $LinePart) 56 { 57 unset($Value,$value_buff); 58 foreach($structure as $i => $column) 57 unset($Value, $value_buff); 58 foreach($structure as $i => $column) 59 { 60 if (substr($LinePart, 0, 1) != "'") 61 { 62 $value_buff = substr($LinePart, 0, strpos($LinePart, ',')); 63 $LinePart = substr($LinePart, strlen($value_buff) + 1); 64 } else 65 { 66 $LinePart = substr($LinePart, 1); 67 $value_buff = substr($LinePart, 0, strpos($LinePart, "'")); 68 while(substr($value_buff, strlen($value_buff) - 1, 1) == "\\") 59 69 { 60 if (substr($LinePart,0, 1) != "'") 61 { 62 $value_buff = substr($LinePart,0, strpos($LinePart,',')); 63 $LinePart = substr($LinePart,strlen($value_buff)+1); 64 } else { 65 $LinePart = substr($LinePart,1); 66 $value_buff = substr($LinePart,0, strpos($LinePart,"'")); 67 while(substr($value_buff,strlen($value_buff)-1,1) == "\\") 68 { 69 $str = substr($LinePart,strlen($value_buff)); 70 $str2 = substr($str,0, strpos($str,"'",1)); 71 $value_buff = $value_buff.$str2; 72 $str = substr($str,strlen($str2)); 73 } 74 $LinePart = substr($LinePart,strlen($value_buff)+2); 75 } 76 if (($value_buff != 'null') and ($value_buff != 'NULL')) 77 { 78 $str = ''; 79 while(substr($value_buff,strlen($value_buff)-1,1) == " ") 80 { 81 $value_buff = substr($value_buff,0,strlen($value_buff)-1); 82 $str .= ' '; 83 } 84 $str2 = ''; 85 while(substr($value_buff,0,1) == " ") 86 { 87 $value_buff = substr($value_buff,1,strlen($value_buff)-1); 88 $str2 .= ' '; 89 } 90 $Value[$column] = $str2.trim($value_buff).$str; 91 } else { 92 $Value[$column] = ''; 93 } 94 // echo ($column.'-"'.$Value[$column].'"<br>'); 95 } 70 $str = substr($LinePart, strlen($value_buff)); 71 $str2 = substr($str, 0, strpos($str, "'", 1)); 72 $value_buff = $value_buff.$str2; 73 $str = substr($str, strlen($str2)); 74 } 75 $LinePart = substr($LinePart, strlen($value_buff) + 2); 76 } 77 if (($value_buff != 'null') and ($value_buff != 'NULL')) 78 { 79 $str = ''; 80 while(substr($value_buff, strlen($value_buff) - 1,1) == " ") 81 { 82 $value_buff = substr($value_buff, 0, strlen($value_buff) - 1); 83 $str .= ' '; 84 } 85 $str2 = ''; 86 while(substr($value_buff, 0, 1) == ' ') 87 { 88 $value_buff = substr($value_buff, 1, strlen($value_buff) - 1); 89 $str2 .= ' '; 90 } 91 $Value[$column] = $str2.trim($value_buff).$str; 92 } else 93 { 94 $Value[$column] = ''; 95 } 96 // echo ($column.'-"'.$Value[$column].'"<br>'); 97 } 98 99 $Columns = ''; 100 foreach($Group['Items'] as $GroupItem) 101 { 102 $Columns .= ', '.$GroupItem['Column'].' '; 103 } 104 $Columns = substr($Columns, 1); 96 105 97 //************************************************ 98 99 $Columns = ''; 100 foreach($Group['Items'] as $GroupItem) 106 if($Group['Id'] == 8)$DbResult2 = $Database->SQLCommand('SELECT VersionEnd, ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE Name="'.$Value['name'].'" AND (Language=0) ORDER BY VersionStart DESC LIMIT 1'); 107 else $DbResult2 = $Database->SQLCommand('SELECT VersionEnd, ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE entry='.$Value[$Group['MangosTableIndex']].' AND (Language=0) ORDER BY VersionStart DESC LIMIT 1'); 108 if(isset($DbResult2) and (mysql_num_rows($DbResult2) > 0)) 109 { 110 // Update existed text 111 $DbRow2 = mysql_fetch_assoc($DbResult2); 112 if(HaveSameText($Group, $DbRow2, $Value)) 113 { 114 if ($DbRow2['VersionEnd'] <> $BuildNumber) 101 115 { 102 $Columns .= ', '.$GroupItem['Column'].' '; 116 $Database->SQLCommand('UPDATE `'.$Group['TablePrefix'].'` SET VersionEnd = "'.$BuildNumber.'" WHERE ID='.$DbRow2['ID']); 117 echo(', '); 118 } else echo('. '); 119 } else 120 { 121 $Columns = 'entry, language, VersionStart, VersionEnd'; 122 $Values = $DbRow2['entry'].', 0, '.$BuildNumber.', '.$BuildNumber; 123 foreach($Group['Items'] as $GroupItem) 124 { 125 $Columns .= ', `'.$GroupItem['Column'].'`'; 126 $Values .= ', "'.$Value[$GroupItem['MangosColumn']].'"'; 103 127 } 104 $Columns = substr($Columns, 1);105 128 106 if ($Group['Id'] == 8) 107 $DbResult2 = $Database->SQLCommand('SELECT VersionEnd, ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE Name="'.$Value['name'].'" AND (Language=0) ORDER BY VersionStart DESC LIMIT 1'); 108 else 109 $DbResult2 = $Database->SQLCommand('SELECT VersionEnd, ID, entry, '.$Columns.' FROM '.$Group['TablePrefix'].' WHERE entry='.$Value[$Group['MangosTableIndex']].' AND (Language=0) ORDER BY VersionStart DESC LIMIT 1'); 110 if(isset($DbResult2) and (mysql_num_rows($DbResult2) > 0)) 129 if ($DbRow2['VersionEnd'] <> $BuildNumber) 111 130 { 112 // Update existed text 113 $DbRow2 = mysql_fetch_assoc($DbResult2); 114 if(HaveSameText($Group, $DbRow2, $Value)) 115 { 116 if ($DbRow2['VersionEnd'] <> $BuildNumber) { 117 $Database->SQLCommand('UPDATE `'.$Group['TablePrefix'].'` SET VersionEnd = "'.$BuildNumber.'" WHERE ID='.$DbRow2['ID']); 118 echo(', '); 119 } else 120 echo('. '); 121 } else 122 { 123 $Columns = 'entry, language, VersionStart, VersionEnd'; 124 $Values = $DbRow2['entry'].', 0, '.$BuildNumber.', '.$BuildNumber; 125 foreach($Group['Items'] as $GroupItem) 126 { 127 $Columns .= ', `'.$GroupItem['Column'].'`'; 128 $Values .= ', "'.$Value[$GroupItem['MangosColumn']].'"'; 129 } 131 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 132 echo('# '); 133 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$DbRow2['entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', 11); 134 } else echo('. '); 135 } 136 } else 137 { 138 // Insert new text 130 139 131 if ($DbRow2['VersionEnd'] <> $BuildNumber) { 132 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 133 echo('# '); 134 WriteLog('Text <a href="form.php?group='.$Group['Id'].'&ID='.mysql_insert_id().'">'.mysql_insert_id().'</a> ('.$DbRow2['entry'].') ze skupiny '.$Group['Name'].' byl v nové verzi '.$import_version.' změněn.', 11); 135 } else echo('. '); 136 } 137 } else 140 if($Group['Id'] == 8) 141 { 142 $Entry = 1; 143 $DbResult = $Database->SQLCommand('SELECT MAX(`entry`) FROM `'.$Group['TablePrefix'].'`'); 144 if(mysql_num_rows($DbResult) > 0) 138 145 { 139 // Insert new text 146 $DbRow = mysql_fetch_row($DbResult); 147 $Entry += $DbRow[0]; 148 } 149 } else { 150 $Entry = $Value[$Group['MangosTableIndex']]; 151 } 140 152 141 if ($Group['Id'] == 8) 142 { 143 $Entry = 1; 144 $DbResult = $Database->SQLCommand('SELECT MAX(`entry`) FROM `'.$Group['TablePrefix'].'`'); 145 if(mysql_num_rows($DbResult) > 0) 146 { 147 $DbRow = mysql_fetch_row($DbResult); 148 $Entry += $DbRow[0]; 149 } 150 } else { 151 $Entry = $Value[$Group['MangosTableIndex']]; 152 } 153 $Columns = 'entry, language, VersionStart, VersionEnd'; 154 $Values = $Entry.', 0, '.$BuildNumber.', '.$BuildNumber; 155 foreach($Group['Items'] as $GroupItem) 156 { 157 $Columns .= ', `'.$GroupItem['Column'].'`'; 158 $Values .= ', "'.$Value[$GroupItem['MangosColumn']].'"'; 159 } 160 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')'); 161 echo('+ '); 162 $NewCount++; 163 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); 164 } 165 $Count++; 166 } 167 } 168 } 169 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />'); 170 $Database->SQLCommand('UPDATE `group` SET LastVersion = "'.$BuildNumber.'", LastImport = NOW() WHERE Id='.$GroupId); 171 } 153 172 154 $Columns = 'entry, language, VersionStart, VersionEnd';155 $Values = $Entry.', 0, '.$BuildNumber.', '.$BuildNumber;156 foreach($Group['Items'] as $GroupItem)157 {158 $Columns .= ', `'.$GroupItem['Column'].'`';159 $Values .= ', "'.$Value[$GroupItem['MangosColumn']].'"';160 }161 $Database->SQLCommand('INSERT `'.$Group['TablePrefix'].'` ('.$Columns.') VALUES ('.$Values.')');162 echo('+ ');163 $NewCount++;164 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);165 }166 167 //********************************************168 $Count++;169 }170 }171 }172 echo('<br />Celkem: '.$Count.' Nových: '.$NewCount.'<br />');173 $Database->SQLCommand('UPDATE `group` SET LastVersion = "'.$BuildNumber.'", LastImport = NOW() WHERE Id='.$GroupId);174 }175 173 ?> -
trunk/import/index.php
r226 r302 1 1 <?php 2 2 3 include ('../includes/global.php');4 include ('../includes/dbc.php');5 include ('import_lua.php');6 include ('import_sql_mangos.php');7 include ('import_dbc.php');8 include ('update_version.php');3 include_once('../includes/global.php'); 4 include_once('../includes/dbc.php'); 5 include_once('import_lua.php'); 6 include_once('import_sql_mangos.php'); 7 include_once('import_dbc.php'); 8 include_once('update_version.php'); 9 9 10 10 ShowPage(); … … 14 14 echo('Nemáte oprávnění'); 15 15 ShowFooter(); 16 die(); 16 17 } 17 18 … … 41 42 foreach($tables as $table) 42 43 { 43 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 44 45 46 47 44 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 45 if ($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 46 echo ('<br />'); 47 } 48 echo ('<br />'); echo ('<br />'); 48 49 ImportSQLMangos($Config['Web']['GameVersion'], $tables[0]); 49 50 50 if (isset($tables[1])) 51 { 51 52 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 52 53 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[1]).'\'", 3000)</script>'); 53 54 } else { 54 55 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 55 56 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 56 57 57 } 58 } else { 58 59 foreach($tables as $table) 59 60 { 60 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 61 62 63 64 65 61 echo('<a href="?source=sql_mangos&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 62 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>'); 63 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>'); 64 echo ('<br />'); 65 } 66 echo ('<br />'); echo ('<br />'); 66 67 ImportSQLMangos($Config['Web']['GameVersion'], $_GET['group']); 67 68 68 if (isset($tables[array_search($_GET['group'],$tables)+1])) 69 { 69 70 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 70 71 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=sql_mangos&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 71 72 } else { 72 73 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 73 74 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 74 75 75 } 76 } 76 77 break; 77 78 case 'dbc': … … 87 88 foreach($tables as $table) 88 89 { 89 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 90 91 92 93 90 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 91 if ($table == $tables[0]) echo(' <strong>Pracuje</strong>'); 92 echo ('<br />'); 93 } 94 echo ('<br />'); echo ('<br />'); 94 95 ImportDBC($Config['Web']['GameVersion'], $tables[0]); 95 96 96 if (isset($tables[1])) 97 { 97 98 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 98 99 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=dbc&group='.$tables[1]).'\'", 3000)</script>'); 99 100 } else { 100 101 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 101 102 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 102 103 103 } 104 } else { 104 105 foreach($tables as $table) 105 106 { 106 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 107 108 109 110 111 107 echo('<a href="?source=dbc&group='.$table.'">'.$TranslationTree[$table]['Name'].'</a>'); 108 if ($table < $_GET['group']) echo (' <strong>Hotovo</strong>'); 109 if ($table == $_GET['group']) echo (' <strong>Pracuje</strong>'); 110 echo ('<br />'); 111 } 112 echo ('<br />'); echo ('<br />'); 112 113 ImportDBC($Config['Web']['GameVersion'], $_GET['group']); 113 114 114 if (isset($tables[array_search($_GET['group'],$tables)+1])) 115 { 115 116 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 116 117 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=dbc&group='.$tables[array_search($_GET['group'],$tables)+1]).'\'", 3000)</script>'); 117 118 } else { 118 119 echo('<script type="text/javascript" language="JavaScript" charset="utf-8">'. 119 120 'setTimeout("parent.location.href=\''.htmlspecialchars_decode('?source=update_version').'\'", 3000)</script>'); 120 121 121 } 122 } 122 123 break; 123 124 case 'update_version': -
trunk/includes/global.php
r297 r302 58 58 if(Licence(LICENCE_USER)) 59 59 { 60 $DbResult = $Database->SQLCommand('SELECT team, userFROM `user` WHERE ID='.$_SESSION['UserID']);60 $DbResult = $Database->SQLCommand('SELECT `team`, `user` FROM `user` WHERE ID='.$_SESSION['UserID']); 61 61 $User = mysql_fetch_assoc($DbResult); 62 $DbResult = $Database->SQLCommand('SELECT ID, name FROM `team` WHERE ID='.$User['team']);62 $DbResult = $Database->SQLCommand('SELECT `Id`, `Name` FROM `Team` WHERE Id='.$User['team']); 63 63 $Team = mysql_fetch_assoc($DbResult); 64 64 -
trunk/registrace.php
r300 r302 68 68 <td><select name="Team"><option value="0">Žádného</option> 69 69 '); 70 $ID = $Database->SQLCommand('SELECT name,ID FROM team');70 $ID = $Database->SQLCommand('SELECT `name`, `Id` FROM `Team`'); 71 71 while($Line = mysql_fetch_assoc($ID)) 72 72 { 73 echo('<option value="0'.$Line['I D'].'">'.$Line['name'].'</option>');73 echo('<option value="0'.$Line['Id'].'">'.$Line['Name'].'</option>'); 74 74 } 75 75 echo('</select></td> -
trunk/sql/structure.sql
r284 r302 4 4 -- 5 5 -- Počítač: localhost 6 -- Vygenerováno: P átek 11. prosince 2009, 11:267 -- Verze MySQL: 5. 0.848 -- Verze PHP: 5. 2.96 -- Vygenerováno: Pondělí 28. prosince 2009, 19:41 7 -- Verze MySQL: 5.1.41 8 -- Verze PHP: 5.3.1 9 9 10 10 SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO"; … … 21 21 22 22 CREATE TABLE IF NOT EXISTS `achievement` ( 23 `ID` int(11) unsigned NOT NULL auto_increment,24 `entry` int(11) NOT NULL, 25 `Language` int(11) NOT NULL default'0',23 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 24 `entry` int(11) NOT NULL, 25 `Language` int(11) NOT NULL DEFAULT '0', 26 26 `User` int(11) NOT NULL, 27 27 `Complete` int(11) NOT NULL, … … 30 30 `Description` text NOT NULL, 31 31 `Reward` text NOT NULL, 32 `VersionStart` int(11) NOT NULL default'8606',33 `VersionEnd` int(11) NOT NULL default'8606',34 PRIMARY KEY 35 KEY `entry` (`entry`), 36 KEY `User` (`User`), 37 KEY `Take` (`Take`), 38 KEY `Language` (`Language`), 39 KEY `Complete` (`Complete`), 40 KEY `VersionStart` (`VersionStart`), 41 KEY `VersionEnd` (`VersionEnd`) 42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;32 `VersionStart` int(11) NOT NULL DEFAULT '8606', 33 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 34 PRIMARY KEY (`ID`), 35 KEY `entry` (`entry`), 36 KEY `User` (`User`), 37 KEY `Take` (`Take`), 38 KEY `Language` (`Language`), 39 KEY `Complete` (`Complete`), 40 KEY `VersionStart` (`VersionStart`), 41 KEY `VersionEnd` (`VersionEnd`) 42 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2452 ; 43 43 44 44 -- -------------------------------------------------------- … … 49 49 50 50 CREATE TABLE IF NOT EXISTS `achievement_category` ( 51 `ID` int(11) unsigned NOT NULL auto_increment,52 `entry` int(11) NOT NULL, 53 `Language` int(11) NOT NULL default'0',51 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 52 `entry` int(11) NOT NULL, 53 `Language` int(11) NOT NULL DEFAULT '0', 54 54 `User` int(11) NOT NULL, 55 55 `Complete` int(11) NOT NULL, 56 56 `Take` int(11) NOT NULL, 57 57 `Name` text NOT NULL, 58 `VersionStart` int(11) NOT NULL default'8606',59 `VersionEnd` int(11) NOT NULL default'8606',60 PRIMARY KEY 61 KEY `entry` (`entry`), 62 KEY `User` (`User`), 63 KEY `Take` (`Take`), 64 KEY `Language` (`Language`), 65 KEY `Complete` (`Complete`), 66 KEY `VersionStart` (`VersionStart`), 67 KEY `VersionEnd` (`VersionEnd`) 68 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;58 `VersionStart` int(11) NOT NULL DEFAULT '8606', 59 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 60 PRIMARY KEY (`ID`), 61 KEY `entry` (`entry`), 62 KEY `User` (`User`), 63 KEY `Take` (`Take`), 64 KEY `Language` (`Language`), 65 KEY `Complete` (`Complete`), 66 KEY `VersionStart` (`VersionStart`), 67 KEY `VersionEnd` (`VersionEnd`) 68 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=192 ; 69 69 70 70 -- -------------------------------------------------------- … … 75 75 76 76 CREATE TABLE IF NOT EXISTS `achievement_criteria` ( 77 `ID` int(11) unsigned NOT NULL auto_increment,78 `entry` int(11) NOT NULL, 79 `Language` int(11) NOT NULL default'0',77 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 78 `entry` int(11) NOT NULL, 79 `Language` int(11) NOT NULL DEFAULT '0', 80 80 `User` int(11) NOT NULL, 81 81 `Complete` int(11) NOT NULL, 82 82 `Take` int(11) NOT NULL, 83 83 `Text` text NOT NULL, 84 `VersionStart` int(11) NOT NULL default'8606',85 `VersionEnd` int(11) NOT NULL default'8606',86 PRIMARY KEY 87 KEY `entry` (`entry`), 88 KEY `User` (`User`), 89 KEY `Take` (`Take`), 90 KEY `Language` (`Language`), 91 KEY `Complete` (`Complete`), 92 KEY `VersionStart` (`VersionStart`), 93 KEY `VersionEnd` (`VersionEnd`) 94 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;84 `VersionStart` int(11) NOT NULL DEFAULT '8606', 85 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 86 PRIMARY KEY (`ID`), 87 KEY `entry` (`entry`), 88 KEY `User` (`User`), 89 KEY `Take` (`Take`), 90 KEY `Language` (`Language`), 91 KEY `Complete` (`Complete`), 92 KEY `VersionStart` (`VersionStart`), 93 KEY `VersionEnd` (`VersionEnd`) 94 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10075 ; 95 95 96 96 -- -------------------------------------------------------- … … 101 101 102 102 CREATE TABLE IF NOT EXISTS `areatrigger_tavern` ( 103 `ID` int(11) unsigned NOT NULL auto_increment,104 `entry` int(11) NOT NULL, 105 `Language` int(11) NOT NULL default'0',103 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 104 `entry` int(11) NOT NULL, 105 `Language` int(11) NOT NULL DEFAULT '0', 106 106 `User` int(11) NOT NULL, 107 107 `Complete` int(11) NOT NULL, 108 108 `Take` int(11) NOT NULL, 109 109 `Name` text NOT NULL, 110 `VersionStart` int(11) NOT NULL default'8606',111 `VersionEnd` int(11) NOT NULL default'8606',112 PRIMARY KEY 113 KEY `entry` (`entry`), 114 KEY `User` (`User`), 115 KEY `Take` (`Take`), 116 KEY `Language` (`Language`), 117 KEY `Complete` (`Complete`), 118 KEY `VersionStart` (`VersionStart`), 119 KEY `VersionEnd` (`VersionEnd`) 120 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 72;110 `VersionStart` int(11) NOT NULL DEFAULT '8606', 111 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 112 PRIMARY KEY (`ID`), 113 KEY `entry` (`entry`), 114 KEY `User` (`User`), 115 KEY `Take` (`Take`), 116 KEY `Language` (`Language`), 117 KEY `Complete` (`Complete`), 118 KEY `VersionStart` (`VersionStart`), 119 KEY `VersionEnd` (`VersionEnd`) 120 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=210 ; 121 121 122 122 -- -------------------------------------------------------- … … 127 127 128 128 CREATE TABLE IF NOT EXISTS `areatrigger_teleport` ( 129 `ID` int(11) unsigned NOT NULL auto_increment,130 `entry` int(11) NOT NULL, 131 `Language` int(11) NOT NULL default'0',129 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 130 `entry` int(11) NOT NULL, 131 `Language` int(11) NOT NULL DEFAULT '0', 132 132 `User` int(11) NOT NULL, 133 133 `Complete` int(11) NOT NULL, 134 134 `Take` int(11) NOT NULL, 135 135 `Name` text NOT NULL, 136 `VersionStart` int(11) NOT NULL default'8606',137 `VersionEnd` int(11) NOT NULL default'8606',138 PRIMARY KEY 139 KEY `entry` (`entry`), 140 KEY `User` (`User`), 141 KEY `Take` (`Take`), 142 KEY `Language` (`Language`), 143 KEY `Complete` (`Complete`), 144 KEY `VersionStart` (`VersionStart`), 145 KEY `VersionEnd` (`VersionEnd`) 146 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 162 ;136 `VersionStart` int(11) NOT NULL DEFAULT '8606', 137 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 138 PRIMARY KEY (`ID`), 139 KEY `entry` (`entry`), 140 KEY `User` (`User`), 141 KEY `Take` (`Take`), 142 KEY `Language` (`Language`), 143 KEY `Complete` (`Complete`), 144 KEY `VersionStart` (`VersionStart`), 145 KEY `VersionEnd` (`VersionEnd`) 146 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=442 ; 147 147 148 148 -- -------------------------------------------------------- … … 155 155 `DateFirst` datetime NOT NULL, 156 156 `DateLast` datetime NOT NULL, 157 `Web` varchar(255) collateutf8_czech_ci NOT NULL,158 `Show` int(11) NOT NULL default'1',159 `Description` text collate utf8_czech_ciNOT NULL,160 `LastURL` varchar(255) collate utf8_czech_ciNOT NULL,157 `Web` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 158 `Show` int(11) NOT NULL DEFAULT '1', 159 `Description` text NOT NULL, 160 `LastURL` varchar(255) NOT NULL, 161 161 UNIQUE KEY `Web` (`Web`), 162 162 KEY `Show` (`Show`) 163 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci;163 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; 164 164 165 165 -- -------------------------------------------------------- … … 170 170 171 171 CREATE TABLE IF NOT EXISTS `connexion` ( 172 `Id` int(11) NOT NULL auto_increment,172 `Id` int(11) NOT NULL AUTO_INCREMENT, 173 173 `Name` text NOT NULL, 174 174 `Group` int(11) NOT NULL, 175 PRIMARY KEY 175 PRIMARY KEY (`Id`), 176 176 KEY `Group` (`Group`) 177 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;177 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1502 ; 178 178 179 179 -- -------------------------------------------------------- … … 184 184 185 185 CREATE TABLE IF NOT EXISTS `connexion_item` ( 186 `Id` int(11) NOT NULL auto_increment,186 `Id` int(11) NOT NULL AUTO_INCREMENT, 187 187 `connexion` int(11) NOT NULL, 188 188 `entry` int(11) NOT NULL, 189 PRIMARY KEY 189 PRIMARY KEY (`Id`), 190 190 KEY `connexion` (`connexion`,`entry`) 191 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;191 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7029 ; 192 192 193 193 -- -------------------------------------------------------- … … 198 198 199 199 CREATE TABLE IF NOT EXISTS `creature` ( 200 `ID` int(11) unsigned NOT NULL auto_increment,200 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 201 201 `entry` int(11) NOT NULL, 202 202 `name` text NOT NULL, 203 203 `subname` text NOT NULL, 204 `Language` int(11) NOT NULL default'0',205 `User` int(11) NOT NULL, 206 `Complete` int(11) NOT NULL, 207 `Take` int(11) NOT NULL, 208 `VersionStart` int(11) NOT NULL default'8606',209 `VersionEnd` int(11) NOT NULL default'8606',210 PRIMARY KEY 211 KEY `entry` (`entry`), 212 KEY `User` (`User`), 213 KEY `Take` (`Take`), 214 KEY `Complete` (`Complete`), 215 KEY `Language` (`Language`), 216 KEY `VersionStart` (`VersionStart`), 217 KEY `VersionEnd` (`VersionEnd`) 218 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 2811;204 `Language` int(11) NOT NULL DEFAULT '0', 205 `User` int(11) NOT NULL, 206 `Complete` int(11) NOT NULL, 207 `Take` int(11) NOT NULL, 208 `VersionStart` int(11) NOT NULL DEFAULT '8606', 209 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 210 PRIMARY KEY (`ID`), 211 KEY `entry` (`entry`), 212 KEY `User` (`User`), 213 KEY `Take` (`Take`), 214 KEY `Complete` (`Complete`), 215 KEY `Language` (`Language`), 216 KEY `VersionStart` (`VersionStart`), 217 KEY `VersionEnd` (`VersionEnd`) 218 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=57187 ; 219 219 220 220 -- -------------------------------------------------------- … … 225 225 226 226 CREATE TABLE IF NOT EXISTS `dictionary` ( 227 `ID` int(11) NOT NULL auto_increment,227 `ID` int(11) NOT NULL AUTO_INCREMENT, 228 228 `Entry` int(11) NOT NULL, 229 229 `Text` varchar(255) NOT NULL, … … 231 231 `Description` text NOT NULL, 232 232 `User` int(11) NOT NULL, 233 PRIMARY KEY (`ID`), 234 KEY `Entry` (`Entry`), 235 KEY `Language` (`Language`) 236 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=157 ; 233 PRIMARY KEY (`ID`), 234 KEY `Language` (`Language`), 235 KEY `Entry` (`Entry`) 236 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=411 ; 237 238 -- -------------------------------------------------------- 239 240 -- 241 -- Struktura tabulky `Export` 242 -- 243 244 CREATE TABLE IF NOT EXISTS `Export` ( 245 `Id` int(11) NOT NULL AUTO_INCREMENT, 246 `User` int(11) NOT NULL, 247 `TimeCreate` datetime NOT NULL, 248 `Title` varchar(255) NOT NULL, 249 `WithDiacritic` tinyint(1) NOT NULL, 250 `UsedCount` int(11) NOT NULL, 251 `ClientVersion` int(11) NOT NULL, 252 `OutputType` int(11) NOT NULL, 253 `Description` text NOT NULL, 254 PRIMARY KEY (`Id`), 255 KEY `User` (`User`), 256 KEY `TimeCreate` (`TimeCreate`) 257 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=24 ; 258 259 -- -------------------------------------------------------- 260 261 -- 262 -- Struktura tabulky `ExportGroup` 263 -- 264 265 CREATE TABLE IF NOT EXISTS `ExportGroup` ( 266 `Id` int(11) NOT NULL AUTO_INCREMENT, 267 `Export` int(11) NOT NULL, 268 `Group` int(11) NOT NULL, 269 PRIMARY KEY (`Id`), 270 KEY `Export` (`Export`) 271 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=69 ; 272 273 -- -------------------------------------------------------- 274 275 -- 276 -- Struktura tabulky `ExportLanguage` 277 -- 278 279 CREATE TABLE IF NOT EXISTS `ExportLanguage` ( 280 `Id` int(11) NOT NULL AUTO_INCREMENT, 281 `Export` int(11) NOT NULL, 282 `Language` int(11) NOT NULL, 283 `Sequence` int(11) NOT NULL, 284 PRIMARY KEY (`Id`) 285 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ; 286 287 -- -------------------------------------------------------- 288 289 -- 290 -- Struktura tabulky `ExportOutputType` 291 -- 292 293 CREATE TABLE IF NOT EXISTS `ExportOutputType` ( 294 `Id` int(11) NOT NULL AUTO_INCREMENT, 295 `Name` varchar(255) NOT NULL, 296 PRIMARY KEY (`Id`) 297 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; 298 299 -- -------------------------------------------------------- 300 301 -- 302 -- Struktura tabulky `ExportTask` 303 -- 304 305 CREATE TABLE IF NOT EXISTS `ExportTask` ( 306 `Id` int(11) NOT NULL AUTO_INCREMENT, 307 `TimeStart` datetime NOT NULL, 308 `TimeFinish` datetime DEFAULT NULL, 309 `Export` int(11) NOT NULL, 310 PRIMARY KEY (`Id`), 311 KEY `Export` (`Export`) 312 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 ; 313 314 -- -------------------------------------------------------- 315 316 -- 317 -- Struktura tabulky `ExportUser` 318 -- 319 320 CREATE TABLE IF NOT EXISTS `ExportUser` ( 321 `Id` int(11) NOT NULL AUTO_INCREMENT, 322 `Export` int(11) NOT NULL, 323 `User` int(11) NOT NULL, 324 `Sequence` int(11) NOT NULL, 325 PRIMARY KEY (`Id`), 326 KEY `Export` (`Export`), 327 KEY `User` (`User`) 328 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=77 ; 329 330 -- -------------------------------------------------------- 331 332 -- 333 -- Struktura tabulky `ExportVersion` 334 -- 335 336 CREATE TABLE IF NOT EXISTS `ExportVersion` ( 337 `Id` int(11) NOT NULL AUTO_INCREMENT, 338 `ExportType` int(11) NOT NULL, 339 `ClientVersion` int(11) NOT NULL, 340 PRIMARY KEY (`Id`), 341 KEY `ExportType` (`ExportType`), 342 KEY `ClientVersion` (`ClientVersion`) 343 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ; 237 344 238 345 -- -------------------------------------------------------- … … 243 350 244 351 CREATE TABLE IF NOT EXISTS `gameobject` ( 245 `ID` int(11) unsigned NOT NULL auto_increment,352 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 246 353 `entry` int(11) NOT NULL, 247 354 `Name` text NOT NULL, 248 355 `castbarcaption` text NOT NULL, 249 `Language` int(11) NOT NULL default'0',250 `User` int(11) NOT NULL, 251 `Complete` int(11) NOT NULL, 252 `Take` int(11) NOT NULL, 253 `VersionStart` int(11) NOT NULL default'8606',254 `VersionEnd` int(11) NOT NULL default'8606',255 PRIMARY KEY 256 KEY `entry` (`entry`), 257 KEY `User` (`User`), 258 KEY `Take` (`Take`), 259 KEY `Complete` (`Complete`), 260 KEY `Language` (`Language`), 261 KEY `VersionStart` (`VersionStart`), 262 KEY `VersionEnd` (`VersionEnd`) 263 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 58959;356 `Language` int(11) NOT NULL DEFAULT '0', 357 `User` int(11) NOT NULL, 358 `Complete` int(11) NOT NULL, 359 `Take` int(11) NOT NULL, 360 `VersionStart` int(11) NOT NULL DEFAULT '8606', 361 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 362 PRIMARY KEY (`ID`), 363 KEY `entry` (`entry`), 364 KEY `User` (`User`), 365 KEY `Take` (`Take`), 366 KEY `Complete` (`Complete`), 367 KEY `Language` (`Language`), 368 KEY `VersionStart` (`VersionStart`), 369 KEY `VersionEnd` (`VersionEnd`) 370 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=91956 ; 264 371 265 372 -- -------------------------------------------------------- … … 270 377 271 378 CREATE TABLE IF NOT EXISTS `gametips` ( 272 `ID` int(11) unsigned NOT NULL auto_increment,379 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 273 380 `entry` int(11) NOT NULL, 274 381 `Text` text NOT NULL, 275 `Language` int(11) NOT NULL default'0',276 `User` int(11) NOT NULL, 277 `Complete` int(11) NOT NULL, 278 `Take` int(11) NOT NULL, 279 `VersionStart` int(11) NOT NULL default'8606',280 `VersionEnd` int(11) NOT NULL default'8606',281 PRIMARY KEY 282 KEY `entry` (`entry`), 283 KEY `User` (`User`), 284 KEY `Take` (`Take`), 285 KEY `Language` (`Language`), 286 KEY `Complete` (`Complete`), 287 KEY `VersionStart` (`VersionStart`), 288 KEY `VersionEnd` (`VersionEnd`) 289 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 262;382 `Language` int(11) NOT NULL DEFAULT '0', 383 `User` int(11) NOT NULL, 384 `Complete` int(11) NOT NULL, 385 `Take` int(11) NOT NULL, 386 `VersionStart` int(11) NOT NULL DEFAULT '8606', 387 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 388 PRIMARY KEY (`ID`), 389 KEY `entry` (`entry`), 390 KEY `User` (`User`), 391 KEY `Take` (`Take`), 392 KEY `Language` (`Language`), 393 KEY `Complete` (`Complete`), 394 KEY `VersionStart` (`VersionStart`), 395 KEY `VersionEnd` (`VersionEnd`) 396 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=343 ; 290 397 291 398 -- -------------------------------------------------------- … … 296 403 297 404 CREATE TABLE IF NOT EXISTS `global_strings` ( 298 `ID` int(11) unsigned NOT NULL auto_increment,299 `entry` int(11) NOT NULL, 300 `Language` int(11) NOT NULL default'0',405 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 406 `entry` int(11) NOT NULL, 407 `Language` int(11) NOT NULL DEFAULT '0', 301 408 `User` int(11) NOT NULL, 302 409 `Complete` int(11) NOT NULL, … … 305 412 `Text` text NOT NULL, 306 413 `Comment` text NOT NULL, 307 `VersionStart` int(11) NOT NULL default'8606',308 `VersionEnd` int(11) NOT NULL default'8606',309 PRIMARY KEY 414 `VersionStart` int(11) NOT NULL DEFAULT '8606', 415 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 416 PRIMARY KEY (`ID`), 310 417 KEY `entry` (`entry`), 311 418 KEY `User` (`User`), … … 316 423 KEY `VersionStart` (`VersionStart`), 317 424 KEY `VersionEnd` (`VersionEnd`) 318 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 8126;425 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=25831 ; 319 426 320 427 -- -------------------------------------------------------- … … 325 432 326 433 CREATE TABLE IF NOT EXISTS `glue_strings` ( 327 `ID` int(11) unsigned NOT NULL auto_increment,328 `entry` int(11) NOT NULL, 329 `Language` int(11) NOT NULL default'0',434 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 435 `entry` int(11) NOT NULL, 436 `Language` int(11) NOT NULL DEFAULT '0', 330 437 `User` int(11) NOT NULL, 331 438 `Complete` int(11) NOT NULL, … … 334 441 `Text` text NOT NULL, 335 442 `Comment` text NOT NULL, 336 `VersionStart` int(11) NOT NULL default'8606',337 `VersionEnd` int(11) NOT NULL default'8606',338 PRIMARY KEY 443 `VersionStart` int(11) NOT NULL DEFAULT '8606', 444 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 445 PRIMARY KEY (`ID`), 339 446 KEY `entry` (`entry`), 340 447 KEY `User` (`User`), … … 345 452 KEY `VersionStart` (`VersionStart`), 346 453 KEY `VersionEnd` (`VersionEnd`) 347 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 773 ;454 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1843 ; 348 455 349 456 -- -------------------------------------------------------- … … 354 461 355 462 CREATE TABLE IF NOT EXISTS `group` ( 356 `Id` int(11) NOT NULL auto_increment, 357 `Name` varchar(255) collate utf8_czech_ci NOT NULL, 358 `TablePrefix` varchar(255) collate utf8_czech_ci NOT NULL, 359 `MangosDatabase` varchar(255) collate utf8_czech_ci NOT NULL, 360 `MangosTable` varchar(255) collate utf8_czech_ci NOT NULL, 361 `MangosTableIndex` varchar(255) collate utf8_czech_ci NOT NULL, 362 `DBCFileName` varchar(255) collate utf8_czech_ci NOT NULL, 363 `WowheadName` varchar(255) collate utf8_czech_ci NOT NULL, 364 `LuaFileName` varchar(255) collate utf8_czech_ci NOT NULL, 365 `LuaMPQFolder` varchar(255) collate utf8_czech_ci NOT NULL, 463 `Id` int(11) NOT NULL AUTO_INCREMENT, 464 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 465 `TablePrefix` varchar(255) COLLATE utf8_czech_ci NOT NULL, 466 `MangosDatabase` varchar(255) COLLATE utf8_czech_ci NOT NULL, 467 `MangosTable` varchar(255) COLLATE utf8_czech_ci NOT NULL, 468 `MangosTableIndex` varchar(255) COLLATE utf8_czech_ci NOT NULL, 469 `DBCFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 470 `DBCColumns` text COLLATE utf8_czech_ci NOT NULL, 471 `WowheadName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 472 `LuaFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 473 `LuaMPQFolder` varchar(255) COLLATE utf8_czech_ci NOT NULL, 366 474 `LastImport` datetime NOT NULL, 367 475 `LastVersion` int(11) NOT NULL, 368 PRIMARY KEY 476 PRIMARY KEY (`Id`) 369 477 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=23 ; 370 478 … … 376 484 377 485 CREATE TABLE IF NOT EXISTS `group_item` ( 378 `Id` int(11) NOT NULL auto_increment,486 `Id` int(11) NOT NULL AUTO_INCREMENT, 379 487 `Group` int(11) NOT NULL, 380 `Name` varchar(255) collate utf8_czech_ci NOT NULL, 381 `Column` varchar(255) collate utf8_czech_ci NOT NULL, 382 `Visible` tinyint(1) NOT NULL default '1', 383 `MangosColumn` varchar(255) collate utf8_czech_ci NOT NULL, 384 `AddonFileName` varchar(255) collate utf8_czech_ci NOT NULL, 385 PRIMARY KEY (`Id`) 488 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 489 `Column` varchar(255) COLLATE utf8_czech_ci NOT NULL, 490 `Visible` tinyint(1) NOT NULL DEFAULT '1', 491 `MangosColumn` varchar(255) COLLATE utf8_czech_ci NOT NULL, 492 `AddonFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 493 `DBCColumnIndex` int(11) NOT NULL DEFAULT '0', 494 PRIMARY KEY (`Id`) 386 495 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=63 ; 387 496 … … 393 502 394 503 CREATE TABLE IF NOT EXISTS `item` ( 395 `ID` int(11) unsigned NOT NULL auto_increment,504 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 396 505 `entry` int(11) NOT NULL, 397 506 `Name` text NOT NULL, 398 507 `Description` text NOT NULL, 399 `Language` int(11) NOT NULL default'0',400 `User` int(11) NOT NULL, 401 `Complete` int(11) NOT NULL, 402 `Take` int(11) NOT NULL, 403 `VersionStart` int(11) NOT NULL default'8606',404 `VersionEnd` int(11) NOT NULL default'8606',405 PRIMARY KEY 406 KEY `entry` (`entry`), 407 KEY `User` (`User`), 408 KEY `Take` (`Take`), 409 KEY `Complete` (`Complete`), 410 KEY `Language` (`Language`), 411 KEY `VersionStart` (`VersionStart`), 412 KEY `VersionEnd` (`VersionEnd`) 413 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=6 3050 ;508 `Language` int(11) NOT NULL DEFAULT '0', 509 `User` int(11) NOT NULL, 510 `Complete` int(11) NOT NULL, 511 `Take` int(11) NOT NULL, 512 `VersionStart` int(11) NOT NULL DEFAULT '8606', 513 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 514 PRIMARY KEY (`ID`), 515 KEY `entry` (`entry`), 516 KEY `User` (`User`), 517 KEY `Take` (`Take`), 518 KEY `Complete` (`Complete`), 519 KEY `Language` (`Language`), 520 KEY `VersionStart` (`VersionStart`), 521 KEY `VersionEnd` (`VersionEnd`) 522 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=67080 ; 414 523 415 524 -- -------------------------------------------------------- … … 420 529 421 530 CREATE TABLE IF NOT EXISTS `language` ( 422 `Id` int(11) NOT NULL auto_increment,423 `Name` varchar(255) collateutf8_czech_ci NOT NULL,424 `Enabled` tinyint(1) NOT NULL default'1',425 PRIMARY KEY 531 `Id` int(11) NOT NULL AUTO_INCREMENT, 532 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 533 `Enabled` tinyint(1) NOT NULL DEFAULT '1', 534 PRIMARY KEY (`Id`) 426 535 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 427 536 … … 433 542 434 543 CREATE TABLE IF NOT EXISTS `log` ( 435 `ID` int(11) NOT NULL auto_increment,544 `ID` int(11) NOT NULL AUTO_INCREMENT, 436 545 `user` int(11) NOT NULL, 437 546 `type` int(11) NOT NULL, 438 `text` text character set latin2 collatelatin2_czech_cs NOT NULL,547 `text` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 439 548 `date` datetime NOT NULL, 440 `IP` text character set latin2 collatelatin2_czech_cs NOT NULL,441 PRIMARY KEY 549 `IP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 550 PRIMARY KEY (`ID`), 442 551 KEY `user` (`user`), 443 552 KEY `type` (`type`), 444 553 KEY `date` (`date`) 445 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 5181;554 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=429858 ; 446 555 447 556 -- -------------------------------------------------------- … … 452 561 453 562 CREATE TABLE IF NOT EXISTS `mangos_command` ( 454 `ID` int(11) unsigned NOT NULL auto_increment,563 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 455 564 `entry` int(11) NOT NULL, 456 565 `help` text NOT NULL, 457 `Language` int(11) NOT NULL default'0',566 `Language` int(11) NOT NULL DEFAULT '0', 458 567 `User` int(11) NOT NULL, 459 568 `Complete` int(11) NOT NULL, 460 569 `Take` int(11) NOT NULL, 461 570 `Name` varchar(255) NOT NULL, 462 `VersionStart` int(11) NOT NULL default'8606',463 `VersionEnd` int(11) NOT NULL default'8606',464 PRIMARY KEY 571 `VersionStart` int(11) NOT NULL DEFAULT '8606', 572 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 573 PRIMARY KEY (`ID`), 465 574 KEY `entry` (`entry`), 466 575 KEY `User` (`User`), … … 471 580 KEY `VersionStart` (`VersionStart`), 472 581 KEY `VersionEnd` (`VersionEnd`) 473 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 297;582 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=759 ; 474 583 475 584 -- -------------------------------------------------------- … … 480 589 481 590 CREATE TABLE IF NOT EXISTS `mangos_string` ( 482 `ID` int(11) unsigned NOT NULL auto_increment,591 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 483 592 `entry` int(11) NOT NULL, 484 593 `content_default` text NOT NULL, 485 `Language` int(11) NOT NULL default'0',486 `User` int(11) NOT NULL, 487 `Complete` int(11) NOT NULL, 488 `Take` int(11) NOT NULL, 489 `VersionStart` int(11) NOT NULL default'8606',490 `VersionEnd` int(11) NOT NULL default'8606',491 PRIMARY KEY 492 KEY `entry` (`entry`), 493 KEY `User` (`User`), 494 KEY `Take` (`Take`), 495 KEY `Complete` (`Complete`), 496 KEY `Language` (`Language`), 497 KEY `VersionStart` (`VersionStart`), 498 KEY `VersionEnd` (`VersionEnd`) 499 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 045 ;594 `Language` int(11) NOT NULL DEFAULT '0', 595 `User` int(11) NOT NULL, 596 `Complete` int(11) NOT NULL, 597 `Take` int(11) NOT NULL, 598 `VersionStart` int(11) NOT NULL DEFAULT '8606', 599 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 600 PRIMARY KEY (`ID`), 601 KEY `entry` (`entry`), 602 KEY `User` (`User`), 603 KEY `Take` (`Take`), 604 KEY `Complete` (`Complete`), 605 KEY `Language` (`Language`), 606 KEY `VersionStart` (`VersionStart`), 607 KEY `VersionEnd` (`VersionEnd`) 608 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2285 ; 500 609 501 610 -- -------------------------------------------------------- … … 506 615 507 616 CREATE TABLE IF NOT EXISTS `news` ( 508 `Id` int(11) NOT NULL auto_increment,617 `Id` int(11) NOT NULL AUTO_INCREMENT, 509 618 `Time` datetime NOT NULL, 510 619 `User` int(11) NOT NULL, 511 620 `Text` text NOT NULL, 512 PRIMARY KEY 513 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 17;621 PRIMARY KEY (`Id`) 622 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=32 ; 514 623 515 624 -- -------------------------------------------------------- … … 520 629 521 630 CREATE TABLE IF NOT EXISTS `npc` ( 522 `ID` int(11) unsigned NOT NULL auto_increment,523 `entry` int(11) NOT NULL, 524 `Text0_0` text character set latin2 collatelatin2_czech_cs,525 `Text0_1` text character set latin2 collatelatin2_czech_cs,526 `Text1_0` text character set latin2 collatelatin2_czech_cs,527 `Text1_1` text character set latin2 collatelatin2_czech_cs,528 `Text2_0` text character set latin2 collatelatin2_czech_cs,529 `Text2_1` text character set latin2 collatelatin2_czech_cs,530 `Text3_0` text character set latin2 collatelatin2_czech_cs,531 `Text3_1` text character set latin2 collatelatin2_czech_cs,532 `Text4_0` text character set latin2 collatelatin2_czech_cs,533 `Text4_1` text character set latin2 collatelatin2_czech_cs,534 `Text5_0` text character set latin2 collatelatin2_czech_cs,535 `Text5_1` text character set latin2 collatelatin2_czech_cs,536 `Text6_0` text character set latin2 collatelatin2_czech_cs,537 `Text6_1` text character set latin2 collatelatin2_czech_cs,538 `Text7_0` text character set latin2 collatelatin2_czech_cs,539 `Text7_1` text character set latin2 collatelatin2_czech_cs,540 `Language` int(11) NOT NULL default'0',541 `User` int(11) NOT NULL, 542 `Complete` int(11) NOT NULL, 543 `Take` int(11) NOT NULL, 544 `VersionStart` int(11) NOT NULL default'8606',545 `VersionEnd` int(11) NOT NULL default'8606',546 PRIMARY KEY 547 KEY `entry` (`entry`), 548 KEY `User` (`User`), 549 KEY `Take` (`Take`), 550 KEY `Complete` (`Complete`), 551 KEY `Language` (`Language`), 552 KEY `VersionStart` (`VersionStart`), 553 KEY `VersionEnd` (`VersionEnd`) 554 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=167 79127;631 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 632 `entry` int(11) NOT NULL, 633 `Text0_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 634 `Text0_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 635 `Text1_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 636 `Text1_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 637 `Text2_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 638 `Text2_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 639 `Text3_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 640 `Text3_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 641 `Text4_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 642 `Text4_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 643 `Text5_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 644 `Text5_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 645 `Text6_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 646 `Text6_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 647 `Text7_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 648 `Text7_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 649 `Language` int(11) NOT NULL DEFAULT '0', 650 `User` int(11) NOT NULL, 651 `Complete` int(11) NOT NULL, 652 `Take` int(11) NOT NULL, 653 `VersionStart` int(11) NOT NULL DEFAULT '8606', 654 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 655 PRIMARY KEY (`ID`), 656 KEY `entry` (`entry`), 657 KEY `User` (`User`), 658 KEY `Take` (`Take`), 659 KEY `Complete` (`Complete`), 660 KEY `Language` (`Language`), 661 KEY `VersionStart` (`VersionStart`), 662 KEY `VersionEnd` (`VersionEnd`) 663 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16780693 ; 555 664 556 665 -- -------------------------------------------------------- … … 561 670 562 671 CREATE TABLE IF NOT EXISTS `npc_option` ( 563 `ID` int(11) unsigned NOT NULL auto_increment,564 `entry` int(11) NOT NULL, 565 `Language` int(11) NOT NULL default'0',672 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 673 `entry` int(11) NOT NULL, 674 `Language` int(11) NOT NULL DEFAULT '0', 566 675 `User` int(11) NOT NULL, 567 676 `Complete` int(11) NOT NULL, 568 677 `Take` int(11) NOT NULL, 569 678 `OptionText` text NOT NULL, 570 `VersionStart` int(11) NOT NULL default'8606',571 `VersionEnd` int(11) NOT NULL default'8606',572 PRIMARY KEY 573 KEY `entry` (`entry`), 574 KEY `User` (`User`), 575 KEY `Take` (`Take`), 576 KEY `Language` (`Language`), 577 KEY `Complete` (`Complete`), 578 KEY `VersionStart` (`VersionStart`), 579 KEY `VersionEnd` (`VersionEnd`) 580 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 50;679 `VersionStart` int(11) NOT NULL DEFAULT '8606', 680 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 681 PRIMARY KEY (`ID`), 682 KEY `entry` (`entry`), 683 KEY `User` (`User`), 684 KEY `Take` (`Take`), 685 KEY `Language` (`Language`), 686 KEY `Complete` (`Complete`), 687 KEY `VersionStart` (`VersionStart`), 688 KEY `VersionEnd` (`VersionEnd`) 689 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=123 ; 581 690 582 691 -- -------------------------------------------------------- … … 587 696 588 697 CREATE TABLE IF NOT EXISTS `page` ( 589 `ID` int(11) NOT NULL auto_increment,590 `entry` int(11) unsigned NOT NULL default'0',591 `Text` text character set latin2 collatelatin2_czech_cs,698 `ID` int(11) NOT NULL AUTO_INCREMENT, 699 `entry` int(11) unsigned NOT NULL DEFAULT '0', 700 `Text` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 592 701 `Language` int(11) NOT NULL, 593 702 `User` int(11) NOT NULL, 594 703 `Complete` int(11) NOT NULL, 595 704 `Take` int(11) NOT NULL, 596 `VersionStart` int(11) NOT NULL default'8606',597 `VersionEnd` int(11) NOT NULL default'8606',598 PRIMARY KEY 599 KEY `entry` (`entry`), 600 KEY `User` (`User`), 601 KEY `Take` (`Take`), 602 KEY `Complete` (`Complete`), 603 KEY `Language` (`Language`), 604 KEY `VersionStart` (`VersionStart`), 605 KEY `VersionEnd` (`VersionEnd`) 606 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System' AUTO_INCREMENT= 1783;705 `VersionStart` int(11) NOT NULL DEFAULT '8606', 706 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 707 PRIMARY KEY (`ID`), 708 KEY `entry` (`entry`), 709 KEY `User` (`User`), 710 KEY `Take` (`Take`), 711 KEY `Complete` (`Complete`), 712 KEY `Language` (`Language`), 713 KEY `VersionStart` (`VersionStart`), 714 KEY `VersionEnd` (`VersionEnd`) 715 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System' AUTO_INCREMENT=2400 ; 607 716 608 717 -- -------------------------------------------------------- … … 613 722 614 723 CREATE TABLE IF NOT EXISTS `quests` ( 615 `ID` int(11) NOT NULL auto_increment,616 `entry` int(11) NOT NULL default'0',617 `Title` text character set latin2 collatelatin2_czech_cs NOT NULL,618 `Details` text character set latin2 collatelatin2_czech_cs NOT NULL,619 `Objectives` text character set latin2 collatelatin2_czech_cs NOT NULL,620 `OfferRewardText` text character set latin2 collatelatin2_czech_cs NOT NULL,621 `RequestItemsText` text character set latin2 collatelatin2_czech_cs NOT NULL,622 `EndText` text character set latin2 collatelatin2_czech_cs NOT NULL,623 `ObjectiveText1` text character set latin2 collatelatin2_czech_cs NOT NULL,624 `ObjectiveText2` text character set latin2 collatelatin2_czech_cs NOT NULL,625 `ObjectiveText3` text character set latin2 collatelatin2_czech_cs NOT NULL,626 `ObjectiveText4` text character set latin2 collatelatin2_czech_cs NOT NULL,627 `Language` int(11) NOT NULL default'1',628 `User` int(11) NOT NULL, 629 `Complete` int(11) NOT NULL default'1',630 `Take` int(11) NOT NULL, 631 `VersionStart` int(11) NOT NULL default'8606',632 `VersionEnd` int(11) NOT NULL default'8606',633 PRIMARY KEY 724 `ID` int(11) NOT NULL AUTO_INCREMENT, 725 `entry` int(11) NOT NULL DEFAULT '0', 726 `Title` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 727 `Details` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 728 `Objectives` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 729 `OfferRewardText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 730 `RequestItemsText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 731 `EndText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 732 `ObjectiveText1` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 733 `ObjectiveText2` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 734 `ObjectiveText3` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 735 `ObjectiveText4` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 736 `Language` int(11) NOT NULL DEFAULT '1', 737 `User` int(11) NOT NULL, 738 `Complete` int(11) NOT NULL DEFAULT '1', 739 `Take` int(11) NOT NULL, 740 `VersionStart` int(11) NOT NULL DEFAULT '8606', 741 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 742 PRIMARY KEY (`ID`), 634 743 KEY `entry` (`entry`), 635 744 KEY `User` (`User`), … … 638 747 KEY `VersionStart` (`VersionStart`), 639 748 KEY `VersionEnd` (`VersionEnd`) 640 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 0862;749 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=13648 ; 641 750 642 751 -- -------------------------------------------------------- … … 647 756 648 757 CREATE TABLE IF NOT EXISTS `sd2_eventai_texts` ( 649 `ID` int(11) unsigned NOT NULL auto_increment,758 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 650 759 `entry` int(11) NOT NULL, 651 760 `content_default` text NOT NULL, 652 761 `comment` text NOT NULL, 653 `Language` int(11) NOT NULL default'0',654 `User` int(11) NOT NULL, 655 `Complete` int(11) NOT NULL, 656 `Take` int(11) NOT NULL, 657 `VersionStart` int(11) NOT NULL default'8606',658 `VersionEnd` int(11) NOT NULL default'8606',659 PRIMARY KEY 660 KEY `entry` (`entry`), 661 KEY `User` (`User`), 662 KEY `Take` (`Take`), 663 KEY `Complete` (`Complete`), 664 KEY `Language` (`Language`), 665 KEY `VersionStart` (`VersionStart`), 666 KEY `VersionEnd` (`VersionEnd`) 667 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 413;762 `Language` int(11) NOT NULL DEFAULT '0', 763 `User` int(11) NOT NULL, 764 `Complete` int(11) NOT NULL, 765 `Take` int(11) NOT NULL, 766 `VersionStart` int(11) NOT NULL DEFAULT '8606', 767 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 768 PRIMARY KEY (`ID`), 769 KEY `entry` (`entry`), 770 KEY `User` (`User`), 771 KEY `Take` (`Take`), 772 KEY `Complete` (`Complete`), 773 KEY `Language` (`Language`), 774 KEY `VersionStart` (`VersionStart`), 775 KEY `VersionEnd` (`VersionEnd`) 776 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; 668 777 669 778 -- -------------------------------------------------------- … … 674 783 675 784 CREATE TABLE IF NOT EXISTS `sd2_script_texts` ( 676 `ID` int(11) unsigned NOT NULL auto_increment,785 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 677 786 `entry` int(11) NOT NULL, 678 787 `content_default` text NOT NULL, 679 788 `comment` text NOT NULL, 680 `Language` int(11) NOT NULL default'0',681 `User` int(11) NOT NULL, 682 `Complete` int(11) NOT NULL, 683 `Take` int(11) NOT NULL, 684 `VersionStart` int(11) NOT NULL default'8606',685 `VersionEnd` int(11) NOT NULL default'8606',686 PRIMARY KEY 687 KEY `entry` (`entry`), 688 KEY `User` (`User`), 689 KEY `Take` (`Take`), 690 KEY `Complete` (`Complete`), 691 KEY `Language` (`Language`), 692 KEY `VersionStart` (`VersionStart`), 693 KEY `VersionEnd` (`VersionEnd`) 694 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 149;789 `Language` int(11) NOT NULL DEFAULT '0', 790 `User` int(11) NOT NULL, 791 `Complete` int(11) NOT NULL, 792 `Take` int(11) NOT NULL, 793 `VersionStart` int(11) NOT NULL DEFAULT '8606', 794 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 795 PRIMARY KEY (`ID`), 796 KEY `entry` (`entry`), 797 KEY `User` (`User`), 798 KEY `Take` (`Take`), 799 KEY `Complete` (`Complete`), 800 KEY `Language` (`Language`), 801 KEY `VersionStart` (`VersionStart`), 802 KEY `VersionEnd` (`VersionEnd`) 803 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1965 ; 695 804 696 805 -- -------------------------------------------------------- … … 701 810 702 811 CREATE TABLE IF NOT EXISTS `shoutbox` ( 703 `ID` int(11) NOT NULL auto_increment,704 `user` text character set latin2 collatelatin2_czech_cs NOT NULL,705 `text` text character set latin2 collatelatin2_czech_cs NOT NULL,812 `ID` int(11) NOT NULL AUTO_INCREMENT, 813 `user` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 814 `text` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 706 815 `date` datetime NOT NULL, 707 `IP` text character set latin2 collatelatin2_czech_cs NOT NULL,708 PRIMARY KEY 709 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT= 460;816 `IP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 817 PRIMARY KEY (`ID`) 818 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1059 ; 710 819 711 820 -- -------------------------------------------------------- … … 716 825 717 826 CREATE TABLE IF NOT EXISTS `spell` ( 718 `ID` int(11) unsigned NOT NULL auto_increment,827 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 719 828 `entry` int(11) NOT NULL, 720 829 `Name` text NOT NULL, … … 722 831 `ToolTip` text NOT NULL, 723 832 `Rank` text NOT NULL, 724 `Language` int(11) NOT NULL default '0', 725 `User` int(11) NOT NULL, 726 `Complete` int(11) NOT NULL, 727 `Take` int(11) NOT NULL, 728 `VersionStart` int(11) NOT NULL default '8606', 729 `VersionEnd` int(11) NOT NULL default '8606', 730 PRIMARY KEY (`ID`), 731 KEY `entry` (`entry`), 732 KEY `User` (`User`), 733 KEY `Take` (`Take`), 734 KEY `Language` (`Language`), 735 KEY `Complete` (`Complete`), 736 KEY `VersionStart` (`VersionStart`), 737 KEY `VersionEnd` (`VersionEnd`) 738 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=42268 ; 739 740 -- -------------------------------------------------------- 741 742 -- 743 -- Struktura tabulky `tasks` 744 -- 745 746 CREATE TABLE IF NOT EXISTS `tasks` ( 747 `id` int(11) NOT NULL auto_increment, 748 `User` int(11) NOT NULL, 749 `ExportSetting` text NOT NULL, 750 `Active` int(11) NOT NULL default '1', 751 `Downloaded` int(11) NOT NULL default '0', 752 `Date` datetime NOT NULL, 753 PRIMARY KEY (`id`), 754 KEY `User` (`User`) 755 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ; 833 `Language` int(11) NOT NULL DEFAULT '0', 834 `User` int(11) NOT NULL, 835 `Complete` int(11) NOT NULL, 836 `Take` int(11) NOT NULL, 837 `VersionStart` int(11) NOT NULL DEFAULT '8606', 838 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 839 PRIMARY KEY (`ID`), 840 KEY `entry` (`entry`), 841 KEY `User` (`User`), 842 KEY `Take` (`Take`), 843 KEY `Language` (`Language`), 844 KEY `Complete` (`Complete`), 845 KEY `VersionStart` (`VersionStart`), 846 KEY `VersionEnd` (`VersionEnd`) 847 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=63528 ; 756 848 757 849 -- -------------------------------------------------------- … … 762 854 763 855 CREATE TABLE IF NOT EXISTS `team` ( 764 `ID` int(11) NOT NULL auto_increment,765 `name` text character set utf8 collateutf8_czech_ci NOT NULL,766 `description` text character set utf8 collateutf8_czech_ci NOT NULL,767 PRIMARY KEY 768 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT= 15;856 `ID` int(11) NOT NULL AUTO_INCREMENT, 857 `name` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 858 `description` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 859 PRIMARY KEY (`ID`) 860 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=33 ; 769 861 770 862 -- -------------------------------------------------------- … … 775 867 776 868 CREATE TABLE IF NOT EXISTS `transports` ( 777 `ID` int(11) unsigned NOT NULL auto_increment,778 `entry` int(11) NOT NULL, 779 `Language` int(11) NOT NULL default'0',869 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 870 `entry` int(11) NOT NULL, 871 `Language` int(11) NOT NULL DEFAULT '0', 780 872 `User` int(11) NOT NULL, 781 873 `Complete` int(11) NOT NULL, 782 874 `Take` int(11) NOT NULL, 783 875 `Name` text NOT NULL, 784 `VersionStart` int(11) NOT NULL default'8606',785 `VersionEnd` int(11) NOT NULL default'8606',786 PRIMARY KEY 787 KEY `entry` (`entry`), 788 KEY `User` (`User`), 789 KEY `Take` (`Take`), 790 KEY `Language` (`Language`), 791 KEY `Complete` (`Complete`), 792 KEY `VersionStart` (`VersionStart`), 793 KEY `VersionEnd` (`VersionEnd`) 794 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT= 10;876 `VersionStart` int(11) NOT NULL DEFAULT '8606', 877 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 878 PRIMARY KEY (`ID`), 879 KEY `entry` (`entry`), 880 KEY `User` (`User`), 881 KEY `Take` (`Take`), 882 KEY `Language` (`Language`), 883 KEY `Complete` (`Complete`), 884 KEY `VersionStart` (`VersionStart`), 885 KEY `VersionEnd` (`VersionEnd`) 886 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ; 795 887 796 888 -- -------------------------------------------------------- … … 801 893 802 894 CREATE TABLE IF NOT EXISTS `user` ( 803 `ID` int(11) NOT NULL auto_increment, 804 `user` varchar(64) character set latin2 collate latin2_czech_cs NOT NULL, 805 `pass` text character set latin2 collate latin2_czech_cs NOT NULL, 806 `gm` int(11) NOT NULL default '0', 807 `LastIP` text character set latin2 collate latin2_czech_cs NOT NULL, 808 `LastLogin` datetime NOT NULL default '0000-00-00 00:00:00', 809 `LastLogout` datetime default NULL, 810 `Email` text character set latin2 collate latin2_czech_cs NOT NULL, 811 `Language` int(11) NOT NULL default '1', 812 `ExportSetting` text collate utf8_czech_ci NOT NULL, 895 `ID` int(11) NOT NULL AUTO_INCREMENT, 896 `user` varchar(64) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 897 `pass` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 898 `gm` int(11) NOT NULL DEFAULT '0', 899 `LastIP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 900 `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 901 `LastLogout` datetime DEFAULT NULL, 902 `Email` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 903 `Language` int(11) NOT NULL DEFAULT '1', 813 904 `XP` int(11) NOT NULL, 814 905 `NeedUpdate` int(11) NOT NULL, 815 906 `team` int(11) NOT NULL, 816 907 `redirecting` int(11) NOT NULL, 817 PRIMARY KEY 908 PRIMARY KEY (`ID`), 818 909 KEY `team` (`team`), 819 910 KEY `user` (`user`) 820 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 564;911 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=827 ; 821 912 822 913 -- -------------------------------------------------------- … … 827 918 828 919 CREATE TABLE IF NOT EXISTS `verseclient` ( 829 `ID` int(11) NOT NULL auto_increment,830 `verse` text collateutf8_czech_ci NOT NULL,920 `ID` int(11) NOT NULL AUTO_INCREMENT, 921 `verse` text COLLATE utf8_czech_ci NOT NULL, 831 922 `date` datetime NOT NULL, 832 `text` text collateutf8_czech_ci NOT NULL,923 `text` text COLLATE utf8_czech_ci NOT NULL, 833 924 `user` int(11) NOT NULL, 834 PRIMARY KEY 925 PRIMARY KEY (`ID`), 835 926 KEY `user` (`user`) 836 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT= 2;927 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; 837 928 838 929 -- -------------------------------------------------------- … … 843 934 844 935 CREATE TABLE IF NOT EXISTS `wow_client_version` ( 845 `Id` int(11) NOT NULL auto_increment,936 `Id` int(11) NOT NULL AUTO_INCREMENT, 846 937 `Version` varchar(16) NOT NULL, 847 938 `BuildNumber` int(11) NOT NULL, … … 863 954 `Achievement_Category_Name` int(11) NOT NULL, 864 955 `Achievement_Criteria_Text` int(11) NOT NULL, 865 PRIMARY KEY (`Id`) 866 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=75 ; 956 PRIMARY KEY (`Id`), 957 KEY `BuildNumber` (`BuildNumber`), 958 KEY `Version` (`Version`), 959 KEY `ReleaseDate` (`ReleaseDate`) 960 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=79 ; -
trunk/team.php
r292 r302 10 10 11 11 echo('<h3>Seznam překladatelských týmů</h3>'); 12 13 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM ` team`');12 echo('Týmy jsou seskupení překladatelů, kteří se hlásí k něčemu společnému jako např. WoW serveru, způsobu překladu, ke stejnému hernímu spolku, aj. Být členem týmu samo o sobě nemá žádný zásadní důsledek a spíše to může pomoci se lépe orientovat mezi překladateli někomu, kdo sestavuje export.<br/>'); 13 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Team`'); 14 14 $DbRow = mysql_fetch_row($DbResult); 15 15 $PageList = GetPageList($DbRow[0]); … … 19 19 20 20 $TableColumns = array( 21 array('Name' => 'name', 'Title' => 'Jméno'), 22 array('Name' => 'numberuser', 'Title' => 'Počet členů'), 21 array('Name' => 'Name', 'Title' => 'Jméno'), 22 array('Name' => 'URL', 'Title' => 'Webové stránky'), 23 array('Name' => 'LeaderName', 'Title' => 'Vedoucí'), 24 array('Name' => 'NumberUser', 'Title' => 'Počet členů'), 25 array('Name' => 'TimeCreate', 'Title' => 'Datum založení'), 23 26 ); 24 27 if(Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce'); 25 28 26 $Order = GetOrderTableHeader($TableColumns, ' numberuser', 1);29 $Order = GetOrderTableHeader($TableColumns, 'NumberUser', 1); 27 30 echo($Order['Output']); 28 31 … … 43 46 */ 44 47 45 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM user WHERE user.team = team.ID) AS numberuser FROM team'.$_SESSION['search'].$Order['SQL'].$PageList['SQLLimit']);46 while($ Line= mysql_fetch_assoc($ID))48 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) AS `NumberUser`, (SELECT `user` FROM `user` WHERE `user`.`ID`=`Team`.`Leader`) AS `LeaderName` FROM `Team` '.$_SESSION['search'].$Order['SQL'].$PageList['SQLLimit']); 49 while($Team = mysql_fetch_assoc($ID)) 47 50 { 48 51 echo('<tr>'. 49 '<td><a href="?action=team&id='.$Line['ID'].'">'.$Line['name'].'</a></td>'. 50 '<td><a href="userlist.php?team='.$Line['ID'].'" title="Zobrazit členy týmu">'.$Line['numberuser'].'</a></td>'); 51 if(Licence(LICENCE_USER)) echo ('<td><a href="?action=gointeam&id='.$Line['ID'].'">Vstoupit do týmu</a></td>'); 52 '<td><a href="?action=team&id='.$Team['Id'].'">'.$Team['Name'].'</a></td>'. 53 '<td><a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a></td>'. 54 '<td>'.$Team['LeaderName'].'</td>'. 55 '<td><a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'. 56 '<td>'.HumanDate($Team['TimeCreate']).'</td>'); 57 if(Licence(LICENCE_USER)) 58 { 59 if($Team['Leader'] == $_SESSION['UserID']) $Action = ' <a href="?action=modify&id='.$Team['Id'].'">Upravit</a>'; 60 else $Action = ''; 61 echo('<td><a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit</a>'.$Action.'</td>'); 62 } 52 63 echo('</tr>'); 53 64 } … … 66 77 if(array_key_exists('id', $_GET)) 67 78 { 68 $ID = $Database->SQLCommand('UPDATE user SET team = '.$_GET['id'].' WHERE ID= '.$_SESSION['UserID']);79 $ID = $Database->SQLCommand('UPDATE `user` SET `team` = '.$_GET['id'].' WHERE `ID` = '.$_SESSION['UserID']); 69 80 echo('<strong>Vstoupil jsi do týmu</strong><br /><br />'); 70 81 WriteLog('Uživatel vstoupil do týmu '.$_GET['id'], 3); 71 82 72 83 // Delete all teams without users 73 $Database->SQLCommand('DELETE FROM ` team` WHERE (SELECT COUNT(*) FROM user WHERE user.team = team.ID) = 0');84 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 74 85 75 86 ShowTeamList(); … … 81 92 if(Licence(LICENCE_USER)) 82 93 { 83 if(array_key_exists(' name', $_POST) and array_key_exists('description', $_POST))84 { 85 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM ` team` WHERE `name` = "'.trim($_POST['name']).'"');94 if(array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST)) 95 { 96 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Team` WHERE `Name` = "'.trim($_POST['Name']).'"'); 86 97 $DbRow = mysql_fetch_row($DbResult); 87 98 $Count = $DbRow[0]; 88 if( $Count == 0)99 if(($Count == 0) and ($_POST['Name'] != '')) 89 100 { 90 $ID = $Database->SQLCommand('INSERT INTO ` team` (`name` ,`description` ) VALUES ( \''.trim($_POST['name']).'\', \''.trim($_POST['description']).'\');');91 $Database->SQLCommand('UPDATE user SET team = '.mysql_insert_id().' WHERE ID= '.$_SESSION['UserID']);101 $ID = $Database->SQLCommand('INSERT INTO `Team` (`Name` ,`Description`, `URL`, `TimeCreate`,`Leader`) VALUES ("'.trim($_POST['Name']).'", "'.trim($_POST['Description']).'", "'.$_POST['URL'].'", NOW(), '.$_SESSION['UserID'].')'); 102 $Database->SQLCommand('UPDATE `user` SET `team` = '.mysql_insert_id().' WHERE `ID` = '.$_SESSION['UserID']); 92 103 echo('<strong>Překladatelský tým vytvořen</strong><br /><br />'); 93 WriteLog('Překladatelský tým vytvořen '.$_POST[' name'], 3);104 WriteLog('Překladatelský tým vytvořen '.$_POST['Name'], 3); 94 105 95 106 // Delete all teams without users 96 $Database->SQLCommand('DELETE FROM ` team` WHERE (SELECT COUNT(*) FROM user WHERE user.team = team.ID) = 0');107 $Database->SQLCommand('DELETE FROM `Team` WHERE (SELECT COUNT(*) FROM `user` WHERE `user`.`team` = `Team`.`Id`) = 0'); 97 108 } else echo('Již existuje tým se stejným jménem'); 98 109 } else echo('Chybí údaje formuláře'); … … 100 111 ShowTeamList(); 101 112 } else 113 if($_GET['action'] == 'modify') 114 { 115 if(Licence(LICENCE_USER)) 116 { 117 if(array_key_exists('id', $_GET)) 118 { 119 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$_SESSION['UserID']); 120 if(mysql_num_rows($DbResult) > 0) 121 { 122 $Team = mysql_fetch_assoc($DbResult); 123 echo('<form action="?action=finish_modify&id='.$_GET['id'].'" method="post">'. 124 '<fieldset><legend>Nastavení týmu</legend>'. 125 '<table><tr><td>Jméno:</td><td><input type="text" name="Name" value="'.$Team['Name'].'"/></td></tr>'. 126 '<tr><td>Webové stránky:</td><td>http://<input type="text" name="URL" value="'.$Team['URL'].'"/></td></tr>'. 127 '<tr><td>Popis:</td><td><input type="text" name="Description" value="'.$Team['Description'].'"/></td></tr>'. 128 '<tr><td colspan="2"><input type="submit" value="Uložit" /></td></tr>'. 129 '</table></fieldset></form>'); 130 } else echo('Tým nenalezen nebo nemáte oprávnění'); 131 } else echo('Nezadáno id týmu'); 132 } else echo('Nemáte oprávnění'); 133 } else 134 if($_GET['action'] == 'finish_modify') 135 { 136 if(Licence(LICENCE_USER)) 137 { 138 if(array_key_exists('id', $_GET) and array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST) and array_key_exists('URL', $_POST)) 139 { 140 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$_SESSION['UserID']); 141 if(mysql_num_rows($DbResult) > 0) 142 { 143 $Team = mysql_fetch_assoc($DbResult); 144 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Team` WHERE `Name` = "'.trim($_POST['Name']).'"'); 145 $DbRow = mysql_fetch_row($DbResult); 146 $Count = $DbRow[0]; 147 if(($Count == 0) and ($_POST['Name'] != '')) 148 { 149 $Database->SQLCommand('UPDATE `Team` SET `Name`="'.$_POST['Name'].'", `Description`="'.$_POST['Description'].'", `URL`="'.$_POST['URL'].'" WHERE Id='.$Team['Id']); 150 echo('Nastavení týmu uloženo.<br/>'); 151 WriteLog('Překladatelský tým upraven '.$_POST['Name'], 3); 152 } else echo('Již existuje tým se stejným jménem'); 153 } else echo('Tým nenalezen nebo nemáte oprávnění'); 154 } else echo('Nezadáno id týmu nebo některé položky formuláře'); 155 } else echo('Nemáte oprávnění'); 156 ShowTeamList(); 157 } else 102 158 if($_GET['action'] == 'create') 103 159 { … … 106 162 echo('<form action="?action=finish_create" method="post">'. 107 163 '<fieldset><legend>Vytvoření nového týmu</legend>'. 108 '<table><tr><td>Jméno:</td><td><input type="text" name="name" /></td></tr>'. 109 '<tr><td>Popis:</td><td><input type="text" name="description" /></td></tr>'. 164 '<table><tr><td>Jméno:</td><td><input type="text" name="Name" /></td></tr>'. 165 '<tr><td>Webové stránky:</td><td>http://<input type="text" name="URL" value=""/></td></tr>'. 166 '<tr><td>Popis:</td><td><input type="text" name="Description" /></td></tr>'. 110 167 '<tr><td colspan="2"><input type="submit" value="Vytvořit a vstoupit" /></td></tr>'. 111 168 '</table></fieldset></form>'); … … 126 183 } 127 184 128 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT *,(SELECT count(*) FROM user WHERE team = team.ID) as numberuser, (SELECT sum('.substr($Columns, 0, -3).') FROM user '.$Joins.' WHERE team = team.ID) as NumberTranslate FROM team WHERE ID='.$_GET['id'])); 185 $Team = mysql_fetch_assoc($Database->SQLCommand('SELECT *, (SELECT count(*) FROM `user` WHERE `team` = `Team`.`Id`) as `NumberUser`, (SELECT SUM('.substr($Columns, 0, -3).') FROM user '.$Joins.' WHERE `team` = `Team`.`Id`) as `NumberTranslate` FROM `Team` WHERE `Id`='.$_GET['id'])); 186 $DbResult = $Database->SQLCommand('SELECT user FROM user WHERE ID='.$Team['Leader']); 187 if(mysql_num_rows($DbResult) > 0) $Leader = mysql_fetch_assoc($DbResult); 188 else $Leader = ''; 129 189 130 echo('<strong>Překladatelský tým '.$Line['name'].'</strong><br />'. 131 $Line['description'].'<br /><br />'. 132 '<a href="export/?team='.$_GET['id'].'">Exportovat překlad týmu</a> '); 133 if(Licence(LICENCE_USER)) echo('<a href="?action=gointeam&id='.$Line['ID'].'">Vstoupit do týmu</a><br /><br />'); 190 echo('<strong>Překladatelský tým '.$Team['Name'].'</strong><br />'. 191 'Webové stránky: <a href="http://'.$Team['URL'].'">'.$Team['URL'].'</a><br/>'. 192 'Vedoucí: '.$Leader.'<br/>'. 193 $Team['Description'].'<br /><br />'. 194 '<a href="export/?team='.$Team['Id'].'">Exportovat překlad týmu</a> '); 195 if(Licence(LICENCE_USER)) echo('<a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit do týmu</a><br /><br />'); 134 196 echo('<fieldset><legend>Statistika</legend>'. 135 'Počet členů týmu: <a href="userlist.php?team='.$ Line['ID'].'" title="Zobrazit členy týmu">'.$Line['numberuser'].'</a><br />'.136 'Počet přeložených textů týmu: <strong>'.$ Line['NumberTranslate'].'</strong><br />'.137 'Průměrná úroveň překladatelů v týmu: <img src="tmp/team/'.$ Line['name'].'/level.png" /><br /><br />'.197 'Počet členů týmu: <a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a><br />'. 198 'Počet přeložených textů týmu: <strong>'.$Team['NumberTranslate'].'</strong><br />'. 199 'Průměrná úroveň překladatelů v týmu: <img src="tmp/team/'.$Team['Name'].'/level.png" /><br /><br />'. 138 200 '<strong>Stav dokončení pro tým:</strong><br />'); 139 201 foreach($TranslationTree as $Group) 140 202 if($Group['TablePrefix'] != '') 141 echo('<div class="state-image"><img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].'&team='.$ _GET['id'].'" title="statistika překladů '.$Group['Name'].'"/></div>');203 echo('<div class="state-image"><img alt="'.$Group['TablePrefix'].'" src="img_statistic.php?group='.$Group['Id'].'&team='.$Team['Id'].'" title="statistika překladů '.$Group['Name'].'"/></div>'); 142 204 echo('</fieldset>'); 143 205 } else echo('Musíte zadat id týmu');
Note:
See TracChangeset
for help on using the changeset viewer.