Changeset 376
- Timestamp:
- Mar 11, 2010, 8:40:32 AM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 21 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Options.php
r374 r376 4 4 ShowPage(); 5 5 6 if( Licence(LICENCE_USER))6 if($User->Licence(LICENCE_USER)) 7 7 { 8 $User = @$_SESSION['User'];9 10 8 if(array_key_exists('Email', $_POST)) 11 9 { … … 15 13 $NewPass2 = $_POST['NewPass2']; 16 14 $Language = $_POST['Language']; 17 $ redirecting = $_POST['redirecting'];15 $Redirecting = $_POST['redirecting']; 18 16 19 if( ($_SESSION['Pass'] == $OldPass) and ($NewPass == $NewPass2))17 if($NewPass == $NewPass2) 20 18 { 21 // Update password 22 $Salt = GetPasswordSalt(); 23 $Database->SQLCommand('UPDATE `User` SET `Pass` = sha1(CONCAT(sha1("'.$NewPass.'"), "'.$Salt.'")), `Salt`="'.$Salt.'" WHERE `ID` = '.$_SESSION['UserID']); 24 echo('Heslo změněno!<br />'); 19 $DbResult = $Database->SQLCommand('SELECT `Pass`, '.$User->CryptPasswordSQL('"'.$OldPass.'"', '`Salt`').' AS `Hash` FROM `User` WHERE `ID`= '.$User->Id); 20 $DbRow = mysql_fetch_assoc($DbResult); 21 if($DbRow['Hash'] == $DbRow['Pass']) 22 { 23 // Update password 24 $Salt = $User->GetPasswordSalt(); 25 $Database->SQLCommand('UPDATE `User` SET `Pass` = '.$User->CryptPasswordSQL('"'.$NewPass.'"', '"'.$Salt.'"').', `Salt`="'.$Salt.'" WHERE `ID` = '.$User->Id); 26 echo('Heslo změněno!<br />'); 27 } else echo('<br />Staré heslo neodpovídá!<br />'); 25 28 } else echo('<br />Hesla se neshodují!<br />'); 26 29 27 $Database->SQLCommand('UPDATE `User` SET `Email` = "'.$Email.'", `Language` = "'.$Language.'", `Redirecting` = "'.$ redirecting.'" WHERE `ID` = '.$_SESSION['UserID']);28 echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User .'</b><br />');30 $Database->SQLCommand('UPDATE `User` SET `Email` = "'.$Email.'", `Language` = "'.$Language.'", `Redirecting` = "'.$Redirecting.'" WHERE `ID` = '.$User->Id); 31 echo('Úprava nastavení proběhla v pořádku, Email: <b>'.$Email.'</b> Uživatel: <b>'.$User->Name.'</b><br />'); 29 32 WriteLog('Úprava nastavení!', LOG_TYPE_USER); 30 33 } else 31 34 { 32 $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$_SESSION['UserID']));33 35 echo('<form action="Options.php" method="post"> 34 36 <fieldset><legend>Nastavení uživatele</legend> … … 36 38 <tr> 37 39 <td>Email: </td> 38 <td><input type="text" name="Email" value="'.$ Line['Email'].'" /></td>40 <td><input type="text" name="Email" value="'.$User->Email.'" /></td> 39 41 </tr> 40 42 <tr> … … 53 55 <td>Normálně budu překládat do: </td> 54 56 <td>'); 55 WriteLanguages($ Line['Language']);57 WriteLanguages($User->Language); 56 58 echo('</td> 57 59 </tr> … … 62 64 echo('<select name="redirecting">'); 63 65 echo('<option value="0">Nikam</option>'); 64 echo('<option value="1"'); if ($Line['Redirecting'] == '1') echo(' selected="selected"'); echo('>Na nepřeložené</option>'); 65 echo('<option value="2"'); if ($Line['Redirecting'] == '2') echo(' selected="selected"'); echo('>Na další překlad</option>'); 66 echo('<option value="3"'); if ($Line['Redirecting'] == '3') echo(' selected="selected"'); echo('>Na předchozí překlad</option>'); 66 echo('<option value="1"'); 67 if($User->Redirecting == '1') echo(' selected="selected"'); 68 echo('>Na nepřeložené</option>'); 69 echo('<option value="2"'); 70 if($User->Redirecting == '2') echo(' selected="selected"'); 71 echo('>Na další překlad</option>'); 72 echo('<option value="3"'); 73 if($User->Redirecting == '3') echo(' selected="selected"'); 74 echo('>Na předchozí překlad</option>'); 67 75 echo('</select>'); 68 76 69 77 echo('</td> 70 78 </tr> 71 79 <tr> … … 85 93 { 86 94 echo('<option value="'.$LineTeam['Id'].'"'); 87 if ($LineTeam['Id'] == $ Line['Team']) echo(' selected="selected"');95 if ($LineTeam['Id'] == $User->Team) echo(' selected="selected"'); 88 96 echo('>'.$LineTeam['Name'].'</option>'); 89 97 } -
trunk/TranslationList.php
r366 r376 111 111 function UserTranslated() 112 112 { 113 global $GroupId, $Table ;113 global $GroupId, $Table, $User; 114 114 115 115 echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&action=filter">Filtr textů</a> -> 116 116 <a title="Přeložené questy přilášeného uživatele" href="?group='.$GroupId.'&action=my">Moje překlady</a><br /><br />'); 117 WriteQuests('SELECT `'.$Table.'`.*, `User`.`Name` AS `UserName` FROM `'.$Table.'` JOIN `User` ON `User`.`id` = `'.$Table.'`.`User` WHERE `'.$Table.'`.`User` = '.$ _SESSION['UserID']);117 WriteQuests('SELECT `'.$Table.'`.*, `User`.`Name` AS `UserName` FROM `'.$Table.'` JOIN `User` ON `User`.`id` = `'.$Table.'`.`User` WHERE `'.$Table.'`.`User` = '.$User->Id); 118 118 } 119 119 120 120 function UserUnfinished() 121 121 { 122 global $GroupId, $Table ;122 global $GroupId, $Table, $User; 123 123 124 124 echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&action=filter">Filtr textů</a> -> 125 125 <a title="Nedokončené texty" href="?group='.$GroupId.'&action=mydevelop">Rozepsané překlady</a><br /><br />'); 126 WriteQuests('SELECT *, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE `User` = '.$ _SESSION['UserID'].' AND `Complete` = 0');126 WriteQuests('SELECT *, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE `User` = '.$User->Id.' AND `Complete` = 0'); 127 127 } 128 128 … … 281 281 function TranslatedFilter() 282 282 { 283 global $Table, $GroupId, $Database ;283 global $Table, $GroupId, $Database, $User; 284 284 285 285 echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&action=filter">Filtr textů</a><br /><br /><br />'. … … 294 294 '<td>Texty označené jako rozpracované.</td></tr>'); 295 295 296 if( Licence(LICENCE_USER))296 if($User->Licence(LICENCE_USER)) 297 297 { 298 298 echo('<tr><td><a title="Nedokončené texty" href="?group='.$GroupId.'&action=mydevelop">Rozepsané texty</a></td> … … 350 350 else if($Action == 'nocomplete') Noncomplete(); 351 351 else if($Action == 'Translate') Translate(); 352 else if(($Action == 'my') and Licence(LICENCE_USER)) UserTranslated();353 else if(($Action == 'mydevelop') and Licence(LICENCE_USER)) UserUnfinished();352 else if(($Action == 'my') and $User->Licence(LICENCE_USER)) UserTranslated(); 353 else if(($Action == 'mydevelop') and $User->Licence(LICENCE_USER)) UserUnfinished(); 354 354 else if($Action == 'users') UserSelected(); 355 355 else if($Action == 'userall') UserAll(); -
trunk/action.php
r366 r376 27 27 } 28 28 29 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `User` WHERE ` User` LIKE "%'.$Search.'%"'));29 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `User` WHERE `Name` LIKE "%'.$Search.'%"')); 30 30 echo('<tr><td><a href="userlist.php?search='.$Search.'">Uživatelé</a></td><td>'.$Line[0].'</td></tr>'); 31 31 $Line = mysql_fetch_row($Database->SQLCommand('SELECT count(*) FROM `Team` WHERE `Name` LIKE "%'.$Search.'%" OR `Description` LIKE "%'.$Search.'%"')); … … 42 42 function DatabaseKit() 43 43 { 44 global $Database, $TranslationTree ;45 46 if( Licence(LICENCE_ADMIN))44 global $Database, $TranslationTree, $User; 45 46 if($User->Licence(LICENCE_ADMIN)) 47 47 { 48 48 echo('<form action="?action=dbkit" method="post">'); … … 172 172 function Delete() 173 173 { 174 global $Database ;175 176 if( Licence(LICENCE_MODERATOR))174 global $Database, $User; 175 176 if($User->Licence(LICENCE_MODERATOR)) 177 177 { 178 178 $TextID = $_GET['ID']; … … 185 185 function ShoutBox() 186 186 { 187 global $Database ;187 global $Database, $User; 188 188 189 189 if(array_key_exists('shoutbox', $_GET)) $shoutbox = $_GET['shoutbox']; … … 193 193 echo('<form action="action.php?action=shoutbox&shoutbox=1" method="post"><fieldset><legend>Nová zpráva kecátka</legend> 194 194 Uživatel: '); 195 if( Licence(LICENCE_USER)) echo('<b>'.$_SESSION['User'].'</b><br />');195 if($User->Licence(LICENCE_USER)) echo('<b>'.$User->Name.'</b><br />'); 196 196 else echo('<input type="text" name="user" /><br />'); 197 197 echo('Text zprávy: <br> … … 201 201 } else 202 202 { 203 if( Licence(LICENCE_USER)) $user = $_SESSION['User'];204 else die('Pro vkládaní musíte byt registrováni!');205 $text = $_POST['text'];206 $Database->SQLCommand('INSERT INTO `ShoutBox` ( `User` , `Text` , `Date` , `IP` )207 VALUES ("'.$user.'", "'.$text.'", NOW(), "'.$_SERVER['REMOTE_ADDR'].'")');208 echo('Zpráva vložena!<br>Budete přesměrováni...');209 echo('203 if($User->Licence(LICENCE_USER)) 204 { 205 $Text = $_POST['text']; 206 $Database->SQLCommand('INSERT INTO `ShoutBox` ( `User` , `Text` , `Date` , `IP` ) '. 207 ' VALUES ("'.$User->Name.'", "'.$Text.'", NOW(), "'.$_SERVER['REMOTE_ADDR'].'")'); 208 echo('Zpráva vložena!<br>Budete přesměrováni...'); 209 echo(' 210 210 <script type="text/javascript" language="JavaScript" charset="utf-8"> 211 211 setTimeout("parent.location.href=\'index.php\'",1000) 212 212 </script>'); 213 } else echo('Pro vkládaní musíte byt registrováni!'); 213 214 } 214 215 } … … 216 217 function ShoutBoxView() 217 218 { 218 global $Database ;219 global $Database, $User; 219 220 220 221 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `ShoutBox`'); … … 224 225 echo('<h3>Kecátko</h3>'); 225 226 echo($PageList['Output']); 226 if( Licence(LICENCE_USER)) echo(' <a href="action.php?action=shoutbox">Vložit</a>');227 if($User->Licence(LICENCE_USER)) echo(' <a href="action.php?action=shoutbox">Vložit</a>'); 227 228 echo('<div class="shoutbox">'); 228 229 $ID = $Database->SQLCommand('SELECT * FROM `ShoutBox` ORDER BY `ID` DESC '.$PageList['SQLLimit']); … … 235 236 function ShowNewsHistory() 236 237 { 237 global $Database ;238 global $Database, $User; 238 239 239 240 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `News`'); … … 243 244 echo('<h3>Novinky</h3>'); 244 245 echo($PageList['Output']); 245 if( Licence(LICENCE_USER)) echo(' <a href="admin.php?action=addnew">Vložit</a>');246 if($User->Licence(LICENCE_USER)) echo(' <a href="admin.php?action=addnew">Vložit</a>'); 246 247 echo('<div class="shoutbox">'); 247 248 $ID = $Database->SQLCommand('SELECT `News`.`Time`, `News`.`Text`, `User`.`Name` AS `User` FROM `News` JOIN `User` ON `User`.`ID`=`News`.`User` ORDER BY `News`.`Time` DESC '.$PageList['SQLLimit']); -
trunk/admin.php
r365 r376 30 30 function ShowNewForm() 31 31 { 32 //global $User; 32 global $User; 33 33 34 echo ('<form action="admin.php?action=addnew" method="POST">'. 34 'Uživatel: '.$ _SESSION['User'].'('.$_SESSION['UserID'].')<br/> '.35 'Uživatel: '.$User->Name.'('.$User->Id.')<br/> '. 35 36 '<input type="submit" value="Uložit"/><br/>'. 36 37 '<textarea rows="8" cols="40" onkeydown="ResizeTextArea(this)" class="textedit" id="Text" name="text"></textarea>'. … … 40 41 function SaveNew() 41 42 { 42 global $Database, $Config ;43 global $Database, $Config, $User; 43 44 44 45 if(array_key_exists('text', $_POST)) 45 46 { 46 $querty = 'INSERT INTO `News` ( `Time` ,`User` ,`Text`) VALUES ( NOW( ) , '.$ _SESSION['UserID'].', "'.$_POST['text'].'")';47 $querty = 'INSERT INTO `News` ( `Time` ,`User` ,`Text`) VALUES ( NOW( ) , '.$User->Id.', "'.$_POST['text'].'")'; 47 48 $Database->SQLCommand($querty); 48 49 echo('Aktualita uložena!'); … … 64 65 ' AND (NOT EXISTS (SELECT `ID` FROM `Dictionary` WHERE `User`.`ID` = `Dictionary`.`User`))'. // Without dictionary words 65 66 ' AND (NOT EXISTS (SELECT `Id` FROM `News` WHERE `User`.`ID` = `News`.`User`))'. // Without news 66 ' AND (NOT EXISTS (SELECT `ID` FROM `ShoutBox` WHERE `User`.` User` = `ShoutBox`.`User`))'. // Without shoutbox messages67 ' AND (NOT EXISTS (SELECT `ID` FROM `ShoutBox` WHERE `User`.`Name` = `ShoutBox`.`User`))'. // Without shoutbox messages 67 68 ''; 68 69 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `User`'.$Condition); … … 112 113 } 113 114 114 if( Licence(LICENCE_ADMIN))115 if($User->Licence(LICENCE_ADMIN)) 115 116 { 116 117 if(array_key_exists('action', $_GET)) -
trunk/dictionary.php
r366 r376 91 91 if(!isset($_SESSION['language'])) 92 92 { 93 if(Licence(LICENCE_USER)) 94 { 95 $DbResult = $Database->SQLCommand('SELECT `Language` FROM `User` WHERE `ID`='.$_SESSION['UserID']); 96 $User = mysql_fetch_assoc($DbResult); 97 $_SESSION['language'] = $User['Language']; 93 if($User->Licence(LICENCE_USER)) 94 { 95 $_SESSION['language'] = $User->Language; 98 96 } else $_SESSION['language'] = 1; 99 97 } … … 127 125 if(array_key_exists('action', $_GET)) 128 126 { 129 if(($_GET['action'] == 'insert') and Licence(LICENCE_USER))127 if(($_GET['action'] == 'insert') and $User->Licence(LICENCE_USER)) 130 128 { 131 129 echo('<form action="dictionary.php?action=save" method="post">'. … … 140 138 '</form>'); 141 139 } else 142 if(($_GET['action'] == 'save') and Licence(LICENCE_USER))140 if(($_GET['action'] == 'save') and $User->Licence(LICENCE_USER)) 143 141 { 144 142 if(array_key_exists('Original', $_POST) and array_key_exists('Translated', $_POST) and array_key_exists('Description', $_POST)) … … 157 155 } 158 156 159 $DbResult = $Database->SQLCommand('SELECT `Id` FROM `Dictionary` WHERE `Entry` = '.$Entry.' AND `Language`='.$_SESSION['language'].' AND `User`='.$ _SESSION['UserID']);157 $DbResult = $Database->SQLCommand('SELECT `Id` FROM `Dictionary` WHERE `Entry` = '.$Entry.' AND `Language`='.$_SESSION['language'].' AND `User`='.$User->Id); 160 158 if(mysql_num_rows($DbResult) > 0) 161 159 { … … 163 161 $Database->SQLCommand('UPDATE `Dictionary` SET `Text`="'.$_POST['Translated'].'", `Description` = "'.$_POST['Description'].'" WHERE Id='.$DbRow['Id']); 164 162 } else 165 $Database->SQLCommand('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$ _SESSION['UserID'].', '.$_SESSION['language'].')');163 $Database->SQLCommand('INSERT INTO `Dictionary` ( `Text` , `Entry` , `Description` , `User`, `Language` ) VALUES ("'.$_POST['Translated'].'", "'.$Entry.'", "'.$_POST['Description'].'", '.$User->Id.', '.$_SESSION['language'].')'); 166 164 echo('Záznam byl uložen!'); 167 165 } else echo('Nebyly zaslány všechny položky formuláře.'); 168 166 } else 169 if(($_GET['action'] == 'remove') and Licence(LICENCE_USER))170 { 171 $Database->SQLCommand('DELETE FROM `Dictionary` WHERE `User`='.$ _SESSION['UserID'].' AND `Language`='.$_SESSION['language'].' AND `Entry`='.$_GET['entry']);167 if(($_GET['action'] == 'remove') and $User->Licence(LICENCE_USER)) 168 { 169 $Database->SQLCommand('DELETE FROM `Dictionary` WHERE `User`='.$User->Id.' AND `Language`='.$_SESSION['language'].' AND `Entry`='.$_GET['entry']); 172 170 } else 173 if(($_GET['action'] == 'modify') and Licence(LICENCE_USER))174 { 175 $DbResult = $Database->SQLCommand('SELECT * FROM `Dictionary` WHERE `User`='.$ _SESSION['UserID'].' AND `Entry`='.$_GET['entry'].' AND `Language`='.$_SESSION['language']);171 if(($_GET['action'] == 'modify') and $User->Licence(LICENCE_USER)) 172 { 173 $DbResult = $Database->SQLCommand('SELECT * FROM `Dictionary` WHERE `User`='.$User->Id.' AND `Entry`='.$_GET['entry'].' AND `Language`='.$_SESSION['language']); 176 174 $DbRow = mysql_fetch_assoc($DbResult); 177 175 $DbResult = $Database->SQLCommand('SELECT * FROM `Dictionary` WHERE `User`=0 AND `Entry`='.$_GET['entry'].' AND `Language`=0'); … … 199 197 <input type="text" value="'.$Search.'" name="search" size="30" /> 200 198 <input type="submit" value="Vyhledat" />'); 201 if( Licence(LICENCE_USER)) echo(' <a href="dictionary.php?action=insert">Vložit slovo</a>');199 if($User->Licence(LICENCE_USER)) echo(' <a href="dictionary.php?action=insert">Vložit slovo</a>'); 202 200 203 201 echo('</td></tr>'); … … 231 229 array('Name' => 'UserName', 'Title' => 'Překladatel'), 232 230 ); 233 if( Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce');231 if($User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Akce'); 234 232 $Order = GetOrderTableHeader($TableColumns, 'Original'); 235 233 echo('<table width="98%" class="BaseTable">'); … … 245 243 <td>'.$Line['Description'].'</td> 246 244 <td>'.$Line['UserName'].'</td>'); 247 if( Licence(LICENCE_USER))248 { 249 if($Line['UserID'] == $ _SESSION['UserID'])245 if($User->Licence(LICENCE_USER)) 246 { 247 if($Line['UserID'] == $User->Id) 250 248 echo('<td><a href="?action=remove&entry='.$Line['Entry'].'">Smazat</a> <a href="?action=modify&entry='.$Line['Entry'].'">Upravit</a></td>'); 251 249 else echo('<td></td>'); -
trunk/download.php
r366 r376 29 29 30 30 /* 31 if (array_key_exists('createverse', $_GET) and Licence(LICENCE_ADMIN)) {31 if (array_key_exists('createverse', $_GET) and $User->Licence(LICENCE_ADMIN)) { 32 32 if (array_key_exists('verse', $_POST)) { //ukládání 33 33 $Database->SQLCommand('INSERT INTO `CzWoWPackageVersion` (`Version` ,`Date` ,`Text` ,`User`) -
trunk/export/create_addon.php
r366 r376 174 174 $Group = $TranslationTree[14]; // client table 175 175 $Column['Column'] = 'Text'; 176 $Query = 'SELECT T2.'.$Column['Column'].' AS Translation, T3.'.$Column['Column'].' as Original, T3.ShortCut FROM (SELECT T1.entry, T1.'.$Column['Column'].' FROM (SELECT entry,'.$Column['Column'].' FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND VersionStart <= '.$this->ClientVersion['BuildNumber'].' AND VersionEnd >= '.$this->ClientVersion['BuildNumber'].' AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS T1 GROUP BY T1.entry) as T2 JOIN '.$Group['TablePrefix'].' AS T3 ON (T2.entry = T3.entry) AND (T3.Language= 0)';176 $Query = 'SELECT `T2`.`'.$Column['Column'].'` AS `Translation`, `T3`.`'.$Column['Column'].'` AS `Original`, `T3`.`ShortCut` FROM (SELECT `T1`.`Entry`, `T1`.`'.$Column['Column'].'` FROM (SELECT `Entry`,`'.$Column['Column'].'` FROM '.$Group['TablePrefix'].' WHERE (`Complete` = 1) AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].') AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.') AS `T1` GROUP BY `T1`.`Entry`) AS `T2` JOIN `'.$Group['TablePrefix'].'` AS `T3` ON (`T2`.`Entry` = `T3`.`Entry`) AND (`T3`.`Language` = 0)'; 177 177 $DbResult = $this->Database->query($Query); 178 178 while($Line = $DbResult->fetch_array()) -
trunk/export/export.php
r375 r376 11 11 var $SelectedUsers; 12 12 var $UserNames; 13 var $User;14 13 var $ClientVersion; 15 14 var $OrderByUserList; … … 38 37 $this->UserNames = ''; 39 38 $DbResult = $this->Database->query('SELECT `ExportUser`.*, `User`.`Name`, `User`.`ID` FROM `ExportUser` LEFT JOIN `User` ON `User`.`ID`=`ExportUser`.`User` WHERE `ExportUser`.`Export`='.$this->Id.' ORDER BY `ExportUser`.`Sequence`'); 40 while($User = $DbResult->fetch_assoc())41 { 42 $this->SelectedUsers .= ','.$User ['ID'];43 $this->UserNames .= ','.$User ['Name'];39 while($UserLine = $DbResult->fetch_assoc()) 40 { 41 $this->SelectedUsers .= ','.$UserLine['ID']; 42 $this->UserNames .= ','.$UserLine['Name']; 44 43 } 45 44 $this->SelectedUsers = substr($this->SelectedUsers, 1); … … 56 55 } 57 56 58 // Load logged user59 if(isset($_SESSION) and ($_SESSION['UserID'] != ''))60 {61 $DbResult = $this->Database->query('SELECT `Name` FROM `User` WHERE `ID`='.$_SESSION['UserID']);62 $this->User = $DbResult->fetch_assoc();63 } else $this->User = array('User' => 'Neznámý');64 65 66 57 $DbResult = $this->Database->query('SELECT * FROM `ClientVersion` WHERE `Id`='.$this->Export['ClientVersion']); 67 58 $this->ClientVersion = $DbResult->fetch_assoc(); … … 70 61 function ExportToMangosSQL() 71 62 { 72 global $TranslationTree, $LanguageList ;63 global $TranslationTree, $LanguageList, $User, $Config; 73 64 74 65 $this->LoadFilters(); … … 82 73 "-- Znaková sada: ".$this->Config['Database']['Charset']." / ".$this->Config['Web']['Charset']."\n". 83 74 "-- Diakritika: ".$this->AnoNe[$this->Export['WithDiacritic']]."\n". 84 "-- Vygeneroval uživatel: ".$ this->User['Name']."\n".75 "-- Vygeneroval uživatel: ".$User->Name."\n". 85 76 "-- Vzato od uživatelů: ".$this->UserNames."\n". 86 77 "-- Generované tabulky: "; … … 89 80 while($Group = $DbResult->fetch_assoc()) 90 81 { 91 $Buffer .= $Group['MangosTable'].', ';82 $Buffer .= $Group['TablePrefix'].', '; 92 83 } 93 84 $Buffer .= "\n\n"; … … 146 137 { 147 138 $Ori_text = $Line['name']; 148 $DbResult2 = $Database2->query('SELECT ` text` AS en,149 (SELECT ` text` FROM `'.$Config['Database']['Database'].'`.`global_strings` AS `tabletran`150 WHERE ` tableen`.`entry` = `tabletran`.`entry` AND (`Complete` = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS `tran`151 FROM `'.$Config['Database']['Database'].'`.` global_strings` AS `tableen` WHERE152 ` text` = "'.addslashes($Ori_text).'" LIMIT 1');139 $DbResult2 = $Database2->query('SELECT `Text` AS `En`, 140 (SELECT `Text` FROM `'.$Config['Database']['Database'].'`.`TextGlobalString` AS `TableTran` 141 WHERE `TableEn`.`Entry` = `TableTran`.`Entry` AND (`Complete` = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS `Tran` 142 FROM `'.$Config['Database']['Database'].'`.`TextGlobalString` AS `TableEn` WHERE 143 `Text` = "'.addslashes($Ori_text).'" LIMIT 1'); 153 144 $Tran = $DbResult2->fetch_assoc(); 154 145 //echo ($Line['name'].'='.$Tran['tran']); 155 if($Tran[' tran'] == '')146 if($Tran['Tran'] == '') 156 147 { 157 $DbResult2 = $Database2->query('SELECT `OptionText` AS ` en`,158 (SELECT `OptionText` FROM `'.$this->Config['Database']['Database'].'`.` npc_option` AS `tabletran`159 WHERE ` tableen`.`entry` = `tabletran`.`entry` AND (`Complete` = 1) AND '.$this->WhereLang.'160 AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS ` tran`161 FROM `'.$this->Config['Database']['Database'].'`.` npc_option` AS `tableen` WHERE148 $DbResult2 = $Database2->query('SELECT `OptionText` AS `En`, 149 (SELECT `OptionText` FROM `'.$this->Config['Database']['Database'].'`.`TextNPCOption` AS `TableTran` 150 WHERE `TableEn`.`Entry` = `TableTran`.`Entry` AND (`Complete` = 1) AND '.$this->WhereLang.' 151 AND '.$this->WhereUsers.$this->OrderByUserList.' LIMIT 1) AS `Tran` 152 FROM `'.$this->Config['Database']['Database'].'`.`TextNPCOption` AS `TableEn` WHERE 162 153 `OptionText` = "'.addslashes($Ori_text).'" LIMIT 1'); 163 154 $Tran = $DbResult2->fetch_assoc(); 164 155 } 165 156 166 if($Tran[' tran'] <> '')167 $Buffer .= 'UPDATE `'.$AoWoWTable.'` SET `name` = "'.addslashes($Tran[' tran']).'" WHERE '.$IndexColum.' = '.$Line[$IndexColum].' ;'."\n";157 if($Tran['Tran'] <> '') 158 $Buffer .= 'UPDATE `'.$AoWoWTable.'` SET `name` = "'.addslashes($Tran['Tran']).'" WHERE '.$IndexColum.' = '.$Line[$IndexColum].' ;'."\n"; 168 159 } 169 160 $Buffer .= "\n\n"; … … 176 167 function ExportToXML() 177 168 { 178 global $TranslationTree, $LanguageList ;169 global $TranslationTree, $LanguageList, $User; 179 170 180 171 $this->LoadFilters($this->Id); … … 186 177 " <time>".date('r')."</time>\n". 187 178 " <diacritics mode=".'"'.$this->Export['WithDiacritic'].'"'." />\n". 188 " <author>".$ this->User['Name']."</author>\n".179 " <author>".$User->Name."</author>\n". 189 180 " <contributors>\n"; 190 181 foreach(explode(',', $this->UserNames) as $UserName) … … 209 200 while($Line = $DbResult2->fetch_assoc()) 210 201 { 211 $Buffer .= ' <item id="'.$Line[' entry'].'" user="'.$Line['UserName'].'">'."\n";202 $Buffer .= ' <item id="'.$Line['Entry'].'" user="'.$Line['UserName'].'">'."\n"; 212 203 $Values = ''; 213 204 foreach($TranslationTree[$Group['Id']]['Items'] as $GroupItem) … … 242 233 $columns = ''; 243 234 foreach($TranslationTree[$Group['Id']]['Items'] as $Column) { 244 $columns .= ' T.'.$Column['Column'].' as text'.$i.',';235 $columns .= ' `T`.`'.$Column['Column'].'` AS `Text`'.$i.','; 245 236 $i = $i+1; 246 237 } 247 238 248 $querty = '"SELECT '.$columns.' T.Entry as entry FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (Complete = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.' AND VersionStart <= '.$this->ClientVersion['BuildNumber'].' AND VersionEnd >= '.$this->ClientVersion['BuildNumber'].') AS T GROUP BY T.Entry"';239 $querty = '"SELECT '.$columns.' `T`.`Entry` AS `Entry` FROM (SELECT * FROM '.$Group['TablePrefix'].' WHERE (`Complete` = 1) AND '.$this->WhereLang.' AND '.$this->WhereUsers.' AND (`VersionStart` <= '.$this->ClientVersion['BuildNumber'].') AND (`VersionEnd` >= '.$this->ClientVersion['BuildNumber'].')) AS `T` GROUP BY `T`.`Entry`"'; 249 240 250 241 $params = '-u '.$Config['Database']['User'].' -p '.$Config['Database']['Password'].' -f ../source/'.$this->ClientVersion['Version'].'/dbc/'.$Group['DBCFileName'].'.dbc -n '.$this->TempDir.'dbc/'.$Group['DBCFileName'].'.dbc -c '.GetDBCColumns($this->ClientVersion['Version'], $Group['DBCFileName']).' -q '.$querty; -
trunk/export/index.php
r366 r376 6 6 function ExportList() 7 7 { 8 global $Database ;8 global $Database, $User; 9 9 10 10 echo('<a href="?Action=ViewList">Všechny</a>'); 11 if( Licence(LICENCE_USER))11 if($User->Licence(LICENCE_USER)) 12 12 { 13 13 echo(' <a href="?Action=ViewList&Filter=Others">Ostatních</a>'); … … 18 18 if(array_key_exists('Filter', $_GET)) 19 19 { 20 if($_GET['Filter'] == 'My') $Filter = ' WHERE `Export`.`User` = '.$ _SESSION['UserID'];21 if($_GET['Filter'] == 'Others') $Filter = ' WHERE `Export`.`User` != '.$ _SESSION['UserID'];20 if($_GET['Filter'] == 'My') $Filter = ' WHERE `Export`.`User` = '.$User->Id; 21 if($_GET['Filter'] == 'Others') $Filter = ' WHERE `Export`.`User` != '.$User->Id; 22 22 } 23 23 … … 46 46 { 47 47 $Action = '<a href="?Action=View&ExportId='.$Export['Id'].'">Zobrazit</a> <a href="?Action=View&ExportId='.$Export['Id'].'&Tab=6">Exportovat</a>'; 48 if($Export['User'] == $ _SESSION['UserID']) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>';48 if($Export['User'] == $User->Id) $Action .= ' <a href="?Action=Delete&ExportId='.$Export['Id'].'" onclick="return confirmAction(\'Opravdu smazat položku?\');">Smazat</a>'; 49 49 echo('<tr><td>'.HumanDate($Export['TimeCreate']).'</td><td>'.$Export['UserName'].'</td><td>'.$Export['Title'].'</td><td>'.$Export['UsedCount'].'</td><td>'.$Export['UserCount'].'</td><td>'.$Export['GroupCount'].'</td><td>'.$Action.'</td></tr>'); 50 50 } … … 52 52 echo($PageList['Output']); 53 53 54 if( Licence(LICENCE_USER)) echo('<br/><div style="text-align: center;"><a href="?Action=Create">Vytvořit nový export</a></div>');54 if($User->Licence(LICENCE_USER)) echo('<br/><div style="text-align: center;"><a href="?Action=Create">Vytvořit nový export</a></div>'); 55 55 } 56 56 57 57 function ExportCreate() 58 58 { 59 global $Database, $Config ;60 61 if( Licence(LICENCE_USER))59 global $Database, $Config, $User; 60 61 if($User->Licence(LICENCE_USER)) 62 62 { 63 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM Export WHERE User='.$_SESSION['UserID']);63 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Export` WHERE `User`='.$User->Id); 64 64 $DbRow = mysql_fetch_row($DbResult); 65 65 if($DbRow[0] < $Config['MaxExportPerUser']) … … 77 77 function ExportCreateFinish() 78 78 { 79 global $Database, $Config ;80 81 if( Licence(LICENCE_USER))79 global $Database, $Config, $User; 80 81 if($User->Licence(LICENCE_USER)) 82 82 { 83 83 if(array_key_exists('Title', $_POST) and array_key_exists('Description', $_POST)) 84 84 { 85 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Export` WHERE `User`='.$ _SESSION['UserID']);85 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `Export` WHERE `User`='.$User->Id); 86 86 $DbRow = mysql_fetch_row($DbResult); 87 87 if($DbRow[0] < $Config['MaxExportPerUser']) 88 88 { 89 $Database->SQLCommand('INSERT INTO `Export` (`Title`, `User`, `TimeCreate`, `WithDiacritic`, `Description`) VALUES ("'.$_POST['Title'].'", '.$ _SESSION['UserID'].', NOW(), 1, "'.$_POST['Description'].'")');89 $Database->SQLCommand('INSERT INTO `Export` (`Title`, `User`, `TimeCreate`, `WithDiacritic`, `Description`) VALUES ("'.$_POST['Title'].'", '.$User->Id.', NOW(), 1, "'.$_POST['Description'].'")'); 90 90 $ExportId = mysql_insert_id(); 91 91 echo('Nový export vytvořen.<br/>Přímý odkaz na tento export: <a href="?Action=View&ExportId='.$ExportId.'">zde</a><br/><br/>'); … … 100 100 function ExportDelete() 101 101 { 102 global $Database ;103 104 if( Licence(LICENCE_USER))102 global $Database, $User; 103 104 if($User->Licence(LICENCE_USER)) 105 105 { 106 106 if(array_key_exists('ExportId', $_GET)) 107 107 { 108 $DbResult = $Database->SQLCommand('SELECT * FROM Export WHERE Id='.$_GET['ExportId'].' AND User='.$_SESSION['UserID']);108 $DbResult = $Database->SQLCommand('SELECT * FROM `Export` WHERE `Id`='.$_GET['ExportId'].' AND `User`='.$User->Id); 109 109 if(mysql_num_rows($DbResult) > 0) 110 110 { 111 $Database->SQLCommand('DELETE FROM Export WHERE Id='.$_GET['ExportId']);111 $Database->SQLCommand('DELETE FROM `Export` WHERE `Id`='.$_GET['ExportId']); 112 112 DeleteDirectory('../tmp/Export/'.$_GET['ExportId'].'/'); 113 113 echo('Export smazán.<br/><br/>'); … … 122 122 function ExportViewTranslators() 123 123 { 124 global $Database, $TranslationTree, $Config ;124 global $Database, $TranslationTree, $Config, $User; 125 125 126 126 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 131 131 { 132 132 $Export = mysql_fetch_assoc($DbRows); 133 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;133 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 134 134 else $Editable = false; 135 135 … … 204 204 $Database->SQLCommand('SET @I = 0'); 205 205 $DbResult = $Database->SQLCommand($Query); 206 while($User = mysql_fetch_assoc($DbResult))207 { 208 $Checked = $User ['Sequence'] != '';209 $Selection = CheckBox('sel'.$User ['ID'], $Checked, '', 'CheckBox', !$Editable);210 $Sequence = '<input type="text" name="seq'.$User ['ID'].'" style="text-align: center; width: 40px;" value="'.$User['Sequence2'].'"'.$DisabledInput[$Editable].'/>';206 while($UserLine = mysql_fetch_assoc($DbResult)) 207 { 208 $Checked = $UserLine['Sequence'] != ''; 209 $Selection = CheckBox('sel'.$UserLine['ID'], $Checked, '', 'CheckBox', !$Editable); 210 $Sequence = '<input type="text" name="seq'.$UserLine['ID'].'" style="text-align: center; width: 40px;" value="'.$UserLine['Sequence2'].'"'.$DisabledInput[$Editable].'/>'; 211 211 echo('<tr> 212 <td><a href="'.$Config['Web']['BaseURL'].'/TranslationList.php?user='.$User ['ID'].'&action=userall" title="Zobrazit všechny jeho přeložené texty">'.$User['Name'].'</a></td>213 <td>'.$User ['TranslatedCount'].'</td>214 <td><img src="'.$Config['Web']['TempFolder'].'/user/'.$User ['Name'].'/level.png" alt="Úroveň uživatele" /></td>212 <td><a href="'.$Config['Web']['BaseURL'].'/TranslationList.php?user='.$UserLine['ID'].'&action=userall" title="Zobrazit všechny jeho přeložené texty">'.$UserLine['Name'].'</a></td> 213 <td>'.$UserLine['TranslatedCount'].'</td> 214 <td><img src="'.$Config['Web']['TempFolder'].'/user/'.$UserLine['Name'].'/level.png" alt="Úroveň uživatele" /></td> 215 215 <td>'.$Selection.'</td><td>'.$Sequence.'</td></tr>'); 216 216 } … … 224 224 function ExportViewGeneral() 225 225 { 226 global $Database ;226 global $Database, $User; 227 227 228 228 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 235 235 { 236 236 $Export = mysql_fetch_assoc($DbRows); 237 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;237 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 238 238 else $Editable = false; 239 239 if($Editable and array_key_exists('Title', $_POST) and array_key_exists('Description', $_POST)) … … 264 264 function ExportViewLanguages() 265 265 { 266 global $Database, $TranslationTree, $Config ;266 global $Database, $TranslationTree, $Config, $User; 267 267 268 268 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 273 273 { 274 274 $Export = mysql_fetch_assoc($DbRows); 275 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;275 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 276 276 else $Editable = false; 277 277 … … 357 357 function ExportViewGroups() 358 358 { 359 global $Database, $TranslationTree, $Config ;359 global $Database, $TranslationTree, $Config, $User; 360 360 361 361 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 366 366 { 367 367 $Export = mysql_fetch_assoc($DbRows); 368 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;368 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 369 369 else $Editable = false; 370 370 … … 446 446 function ExportViewOutputFormat() 447 447 { 448 global $Database ;448 global $Database, $User; 449 449 450 450 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 455 455 { 456 456 $Export = mysql_fetch_assoc($DbRows); 457 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;457 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 458 458 else $Editable = false; 459 459 … … 485 485 function ExportViewVersion() 486 486 { 487 global $Database, $Config ;487 global $Database, $Config, $User; 488 488 489 489 $DisabledInput = array(false => ' disabled="disabled"', true => ''); … … 494 494 { 495 495 $Export = mysql_fetch_assoc($DbRows); 496 if( Licence(LICENCE_USER) and ($_SESSION['UserID']== $Export['User'])) $Editable = true;496 if($User->Licence(LICENCE_USER) and ($User->Id == $Export['User'])) $Editable = true; 497 497 else $Editable = false; 498 498 … … 572 572 $Export = mysql_fetch_assoc($DbResult); 573 573 $DbResult = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID`='.$Export['User']); 574 $User = mysql_fetch_assoc($DbResult);575 echo('Export <strong><a href="?Action=View&Tab=6&ExportId='.$Export['Id'].'">'.$_GET['ExportId'].'</a></strong> překladatele <strong>'.$User ['Name'].'</strong> s označením <strong>'.$Export['Title'].'</strong>');574 $UserLine = mysql_fetch_assoc($DbResult); 575 echo('Export <strong><a href="?Action=View&Tab=6&ExportId='.$Export['Id'].'">'.$_GET['ExportId'].'</a></strong> překladatele <strong>'.$UserLine['Name'].'</strong> s označením <strong>'.$Export['Title'].'</strong>'); 576 576 ShowTabs(array('Obecné', 'Překladatelé', 'Překlady', 'Jazyky', 'Formát', 'Verze', 'Výstup')); 577 577 echo('<div id="content">'); -
trunk/form.php
r365 r376 21 21 if(!$Line) die('Anglický originál k překladu nenalezen.'); 22 22 23 $User = @$_SESSION['User'];24 23 $IDUser = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$Line['User']); 25 24 $LineUser = mysql_fetch_array($IDUser); … … 77 76 // Speciální znaky: $B - Odřádkování, $N - Jméno, $C - povolání 78 77 echo('<form action="save.php?group='.$GroupId.'" method="post"><div>'); 79 if( Licence(LICENCE_USER))78 if($User->Licence(LICENCE_USER)) 80 79 { 81 80 if(($GroupId < 4) or ($GroupId == 10) or ($GroupId == 11)) echo('<a href="dictionary.php?group='.$GroupId.'&ID='.$LineAJ['ID'].'" target="_blank" title="Zobrazit přeložené názvy věci, postav, a herních objektů k tomuto překladu">Vyhledat v názvech</a>'); … … 91 90 92 91 echo('<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" /> 93 <input type="hidden" name="user" value="'.$User .'" />92 <input type="hidden" name="user" value="'.$User->Id.'" /> 94 93 <input type="hidden" name="ID" value="'.$TextID.'" /> 95 94 <table class="BaseTable"> … … 105 104 Přeloženo do:'); 106 105 if($Line['Language'] <> 0) $Language = $Line['Language']; 107 else if($ _SESSION['UserID'] != '')106 else if($User->Id != 0) 108 107 { 109 $IDUser = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$_SESSION['UserID']); 110 $LineUser = mysql_fetch_array($IDUser); 111 $Language = $LineUser['Language']; // jiný user vyčítám 108 $Language = $User->Language; 112 109 } else $Language = 0; 113 110 WriteLanguages($Language); -
trunk/includes/config.sample.php
r319 r376 14 14 'Style' => 'maron', 15 15 'Web' => array( 16 'Title' => 'Projekt překládání textů WoW', 16 17 'Charset' => 'utf-8', 17 18 'BaseURL' => 'http://localhost/', … … 23 24 'ItemsPerPage' => 40, 24 25 'TempFolder' => '../tmp/', 25 'GameVersion' => '3. 0.3',26 'GameVersion' => '3.3.2', 26 27 'VisiblePagingItems' => 20, 27 28 ), -
trunk/includes/global.php
r365 r376 14 14 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($_GET[$Index]); 15 15 16 include_once('config.php'); 17 include_once('error.php'); 18 include_once('databaseconection.php'); 19 include_once('global_function.php'); 20 include_once('rss.php'); 21 include_once('system.php'); 16 include_once(dirname(__FILE__).'/config.php'); 17 include_once(dirname(__FILE__).'/error.php'); 18 include_once(dirname(__FILE__).'/databaseconection.php'); 19 include_once(dirname(__FILE__).'/global_function.php'); 20 include_once(dirname(__FILE__).'/rss.php'); 21 include_once(dirname(__FILE__).'/system.php'); 22 include_once(dirname(__FILE__).'/user.php'); 22 23 23 24 $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password']); … … 30 31 $System = new System(); 31 32 $System->Init(); 33 $User = new User(); 34 $User->Restore(); 32 35 33 36 function GetMicrotime() … … 39 42 function ShowShoutbox() 40 43 { 41 global $Database, $Config ;44 global $Database, $Config, $User; 42 45 43 46 echo('<strong><a href="'.$Config['Web']['BaseURL'].'action.php?action=ShoutBoxView">Kecátko:</a></strong>'); 44 if(Licence(LICENCE_USER)) echo(' <a href="'.$Config['Web']['BaseURL'].'action.php?action=shoutbox">Vložit</a>'); 47 if($User->Licence(LICENCE_USER)) 48 echo(' <a href="'.$Config['Web']['BaseURL'].'action.php?action=shoutbox">Vložit</a>'); 45 49 echo('<div class="box"><table>'); 46 50 $ID = $Database->SQLCommand('SELECT * FROM `ShoutBox` ORDER BY `ID` DESC LIMIT 20'); … … 52 56 function ShowTopBar() 53 57 { 54 global $Config, $Database ;58 global $Config, $Database, $User; 55 59 56 60 echo('<div class="Menu">'); 57 echo('<span class="MenuItem"></span>'); 58 if(Licence(LICENCE_USER)) 59 { 60 $DbResult = $Database->SQLCommand('SELECT `Team`, `Name` FROM `User` WHERE ID='.$_SESSION['UserID']); 61 $User = mysql_fetch_assoc($DbResult); 62 $DbResult = $Database->SQLCommand('SELECT `Id`, `Name` FROM `Team` WHERE Id='.$User['Team']); 61 echo('<span class="MenuItem"></span>'); 62 if($User->Licence(LICENCE_USER)) 63 { 64 $DbResult = $Database->SQLCommand('SELECT `Id`, `Name` FROM `Team` WHERE `Id`='.$User->Team); 63 65 $Team = mysql_fetch_assoc($DbResult); 64 66 65 67 //echo('<span class="MenuItem">Moje překlady: <a href="">Dokončené</a> <a href="">Rozpracované</a> <a href="">Exporty</a> Tým: <a href="">'.$Team['name'].'</a></span>'); 66 echo('<span class="MenuItem2">'.$User ['Name'].' <a href="'.$Config['Web']['BaseURL'].'?Logout">Odhlášení</a> <a href="'.$Config['Web']['BaseURL'].'Options.php">Nastavení</a></span>');68 echo('<span class="MenuItem2">'.$User->Name.' <a href="'.$Config['Web']['BaseURL'].'?action=logout">Odhlášení</a> <a href="'.$Config['Web']['BaseURL'].'Options.php">Nastavení</a></span>'); 67 69 } else 68 70 { 69 echo('<span class="MenuItem2"><form action="? " method="post"> Jméno: <input type="text" name="LoginUser" size="8 " /> Heslo: <td><input type="password" name="LoginPass" size="8" /> <input type="submit" value="Přihlásit" /></form> <a href="'.$Config['Web']['BaseURL'].'registrace.php">Registrace</a></span>');71 echo('<span class="MenuItem2"><form action="?action=login" method="post"> Jméno: <input type="text" name="LoginUser" size="8 " /> Heslo: <td><input type="password" name="LoginPass" size="8" /> <input type="submit" value="Přihlásit" /></form> <a href="'.$Config['Web']['BaseURL'].'registrace.php">Registrace</a></span>'); 70 72 } 71 73 echo('</div>'); … … 74 76 function ShowLoginBox() 75 77 { 76 if(Licence(LICENCE_USER)) 77 { 78 // echo 'Jste přihlášen jako: <b>'.$_SESSION['User'].'</b> <a href="index.php?Logout">Odhlásit</a>'; 78 global $User; 79 80 if($User->Licence(LICENCE_USER)) 81 { 82 // echo 'Jste přihlášen jako: <b>'.$User->Id.'</b> <a href="index.php?Logout">Odhlásit</a>'; 79 83 } else 80 84 { … … 116 120 function ShowMainMenu() 117 121 { 118 global $TranslationTree, $Config ;122 global $TranslationTree, $Config, $User; 119 123 120 124 $Menu = array … … 140 144 141 145 echo('<strong>Hlavní menu:</strong>'. 142 '<div class="verticalmenu"><ul>'); 143 146 '<div class="verticalmenu"><ul>'); 144 147 foreach($Menu as $MenuTarget => $MenuItem) 145 148 { 146 if(isset($MenuItem[3])) $OnClick = ' onclick="'.$MenuItem[3].'"'; else $OnClick = ''; 147 if(Licence($MenuItem[0])) echo('<li><a class="verticalmenua" title="'.$MenuItem[1].'" href="'.$MenuTarget.'"'.$OnClick.'>'.$MenuItem[2].'</a></li>'); 149 if(isset($MenuItem[3])) $OnClick = ' onclick="'.$MenuItem[3].'"'; 150 else $OnClick = ''; 151 if($User->Licence($MenuItem[0])) echo('<li><a class="verticalmenua" title="'.$MenuItem[1].'" href="'.$MenuTarget.'"'.$OnClick.'>'.$MenuItem[2].'</a></li>'); 148 152 } 149 153 echo('</ul></div>'); … … 152 156 function ShowTranslatedMenu() 153 157 { 154 global $TranslationTree, $Config, $Database ;158 global $TranslationTree, $Config, $Database, $User; 155 159 156 160 echo('<strong>Překladové skupiny:</strong><br /><div id="TranslationMenu">'); 157 if( Licence(LICENCE_USER))158 { 159 echo ('<a title="Všechny překlady, které jste přeložil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&action=userall">Všechny moje texty</a><br />');160 echo ('<a title="Všechny překlady, které jste rozepsal a nedokončil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$_SESSION['UserID'].'&not&action=userall">Rozpracované texty</a>');161 if($User->Licence(LICENCE_USER)) 162 { 163 echo('<a title="Všechny překlady, které jste přeložil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$User->Id.'&action=userall">Všechny moje texty</a><br />'); 164 echo('<a title="Všechny překlady, které jste rozepsal a nedokončil" href="'.$Config['Web']['BaseURL'].'TranslationList.php?user='.$User->Id.'&not&action=userall">Rozpracované texty</a>'); 161 165 //TODO: počet nedokončených 162 echo 166 echo('<br /><br />'); 163 167 } 164 168 foreach($TranslationTree as $Group) … … 169 173 echo(' <a title="Zde můžete začít překládat" href="'.$Config['Web']['BaseURL'].'TranslationList.php?group='.$Group['Id'].'&action=notran">Nepřeložené</a><br /> 170 174 <a title="Přeložené texty, můžete zde hlasovat, nebo opravovat překlady" href="'.$Config['Web']['BaseURL'].'TranslationList.php?group='.$Group['Id'].'&action=Translate">Přeložené</a><br />'); 171 $ID = $Database->SQLCommand('SELECT * FROM connexion WHERE `Group` = '.$Group['Id']);175 $ID = $Database->SQLCommand('SELECT * FROM connexion WHERE `Group` = '.$Group['Id']); 172 176 if (mysql_num_rows($ID) > 0) 173 177 echo(' <a title="Vypsání souvislostí" href="'.$Config['Web']['BaseURL'].'TranslationList.php?group='.$Group['Id'].'&action=connexion_list">Souvislosti</a><br />'); 174 178 175 if(Licence(LICENCE_USER))179 if($User->Licence(LICENCE_USER)) 176 180 { 177 181 echo(' <a title="Nedokončené překlady" href="'.$Config['Web']['BaseURL'].'TranslationList.php?group='.$Group['Id'].'&action=mydevelop">Rozepsané</a><br /> … … 186 190 function ShowOnlineUserList() 187 191 { 188 global $Database, $Moderators ;192 global $Database, $Moderators, $User; 189 193 190 194 echo('Online překladatelé:<br />'); 191 195 $ID = $Database->SQLCommand('SELECT `Name`, `GM`, `ID` FROM `User` WHERE `LastLogin` >= NOW() - 300 AND ((`LastLogout` < `LastLogin`) OR (ISNULL(`LastLogout`)))'); 192 while($ User = mysql_fetch_assoc($ID))193 { 194 if( Licence(LICENCE_MODERATOR)) $Name = '<a href="user.php?user='.$User['ID'].'">'.$User['Name'].'</a>';195 else $Name = $ User['Name'];196 while($DbUser = mysql_fetch_assoc($ID)) 197 { 198 if($User->Licence(LICENCE_MODERATOR)) $Name = '<a href="user.php?user='.$DbUser['ID'].'">'.$DbUser['Name'].'</a>'; 199 else $Name = $DbUser['Name']; 196 200 $TextGM = ''; 197 201 echo('<strong>'.$Name.'</strong>'.$TextGM.'<br />'); … … 199 203 } 200 204 201 function CheckLogin()202 {203 global $Database;204 205 if(!array_key_exists('UserID', $_SESSION)) $_SESSION['UserID'] = '';206 if(!array_key_exists('User', $_SESSION)) $_SESSION['User'] = 'NotRegistred';207 if(!array_key_exists('Pass', $_SESSION)) $_SESSION['Pass'] = '';208 209 // Přihlášení210 if(array_key_exists('LoginUser', $_POST))211 {212 $_SESSION['User'] = $_POST['LoginUser'];213 $_SESSION['Pass'] = $_POST['LoginPass'];214 215 $DbResult = $Database->SQLCommand('SELECT * FROM `User` WHERE LOWER(`Name`) = LOWER("'.$_SESSION['User'].'") AND `Pass` = sha1(CONCAT(sha1("'.$_SESSION['Pass'].'"), `Salt`))');216 if(mysql_num_rows($DbResult) == 0)217 {218 echo('<script> alert("Jméno nebo heslo bylo zadáno špatně!"); </script>');219 $_SESSION['UserID'] = '';220 $_SESSION['User'] = '';221 $_SESSION['Pass'] = '';222 } else223 {224 $User = mysql_fetch_assoc($DbResult);225 $_SESSION['UserID'] = $User['ID'];226 $_SESSION['User'] = $User['Name'];227 WriteLog('Login: '.$_SESSION['User'], LOG_TYPE_USER);228 }229 }230 231 // Odhlášení232 if(array_key_exists('Logout', $_GET) and ($_SESSION['User'] != ''))233 {234 WriteLog('Odhlášení', LOG_TYPE_USER);235 if(is_numeric($_SESSION['UserID']))236 $Database->SQLCommand('UPDATE `User` SET `LastLogout` = NOW() WHERE `ID` = '.$_SESSION['UserID']);237 $_SESSION['User'] = '';238 $_SESSION['Pass'] = '';239 $_SESSION['UserID'] = '';240 }241 242 // Záznam o aktivitě243 if(Licence(LICENCE_USER) and array_key_exists('REMOTE_ADDR', $_SERVER))244 $Database->SQLCommand('UPDATE `User` SET `LastIP` = "'.$_SERVER['REMOTE_ADDR'].'", `LastLogin` = NOW() WHERE `ID` = '.$_SESSION['UserID']);245 }246 247 205 function ShowPage() 248 206 { 249 global $ Config, $Database, $RSSChannels, $PageFooterRequested;207 global $User, $Config, $Database, $RSSChannels, $PageFooterRequested; 250 208 251 209 echo('<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?> … … 263 221 foreach($RSSChannels as $Channel) 264 222 echo(' <link rel="alternate" title="'.$Channel['Title'].'" href="'.$Channel['URL'].'" type="application/rss+xml" />'); 265 echo('<title> Projekt překládání textů WoW</title>223 echo('<title>'.$Config['Web']['Title'].'</title> 266 224 </head> 267 225 <body> 268 226 <table id="bannertable"><tr> 269 227 <td id="banner1"></td> 270 <td id="banner"><div id="bannertitle"> Projekt překládání textů WoW</div></td>228 <td id="banner"><div id="bannertitle">'.$Config['Web']['Title'].'</div></td> 271 229 <td id="banner2"></td></tr> 272 230 </table>'); 273 231 274 CheckLogin(); 232 if(array_key_exists('action', $_GET)) 233 { 234 if($_GET['action'] == 'login') 235 { 236 $User->Login($_POST['LoginUser'], $_POST['LoginPass']); 237 if($User->Role == LICENCE_ANONYMOUS) echo('<script> alert("Jméno nebo heslo bylo zadáno špatně!"); </script>'); 238 } else 239 if($_GET['action'] == 'logout') 240 { 241 if($User->Role != LICENCE_ANONYMOUS) 242 { 243 $User->Logout(); 244 WriteLog('Odhlášení', LOG_TYPE_USER); 245 } 246 } 247 } 275 248 ShowTopBar(); 276 249 277 250 echo('<table class="page"><tr><td class="menu">'); 278 251 ShowMainMenu(); 279 280 // echo('<br />');281 //ShowLoginBox();282 //echo('<br />');283 252 ShowOnlineUserList(); 284 253 echo('<br />'); … … 305 274 function ShowFooter() 306 275 { 307 global $Database, $Config, $ScriptStartTime, $PageFooterRequested ;276 global $Database, $Config, $ScriptStartTime, $PageFooterRequested, $User; 308 277 309 278 if(isset($PageFooterRequested)) … … 333 302 '</html>'); 334 303 $Database->Disconnect(); 304 $User->Store(); 335 305 } 336 306 } -
trunk/includes/global_function.php
r369 r376 1 1 <?php 2 3 // User licence levels4 define('LICENCE_ANONYMOUS', -1);5 define('LICENCE_USER', 0);6 define('LICENCE_MODERATOR', 1);7 define('LICENCE_ADMIN', 2);8 2 9 3 // Log types … … 213 207 } 214 208 215 function Licence($Licence)216 {217 global $Database;218 219 if($Licence == -1) return(true);220 else221 if(isset($_SESSION['User']) and ($_SESSION['User'] <> '') and ($_SESSION['UserID'] != ''))222 {223 // $User = $_SESSION['User'];224 $Pass = $_SESSION['Pass'];225 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$_SESSION['UserID'].' AND `GM` >= '.$Licence.' AND `Pass` = sha1(CONCAT(sha1("'.$Pass.'"), `Salt`))'));226 return($Line);227 } else228 {229 return(!isset($_SERVER['REMOTE_ADDR']));230 }231 }232 233 209 function MysqlDateTimeToTime($Time) 234 210 { … … 274 250 function WriteLog($Text, $Type) 275 251 { 276 global $Database, $Config ;252 global $Database, $Config, $User; 277 253 278 if(!isset($_SERVER['REMOTE_ADDR'])) 279 { 280 $user = 0; 281 $ip = 'Konzole'; 282 } else 283 { 284 if(array_key_exists('UserID', $_SESSION)) $user = $_SESSION['UserID']; 285 else $user = 0; 286 $ip = addslashes($_SERVER['REMOTE_ADDR']); 287 } 254 if(!isset($_SERVER['REMOTE_ADDR'])) $IP = 'Konzole'; 255 else $IP = addslashes($_SERVER['REMOTE_ADDR']); 288 256 289 257 $Database->SelectDatabase($Config['Database']['Database']); 290 258 $Query = 'INSERT INTO `Log` ( `User` , `Type` , `Text` , `Date` , `IP` ) 291 VALUES ('.$ user.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$ip.'")';259 VALUES ('.$User->Id.', '.$Type.', "'.addslashes($Text).'", NOW(), "'.$IP.'")'; 292 260 $Database->SQLCommand($Query); 293 261 } … … 535 503 } 536 504 537 function GetPasswordSalt()538 {539 return(substr(sha1(mt_rand()), 0, 8));540 }541 542 505 function ErrorMessage($Text) 543 506 { -
trunk/log.php
r365 r376 45 45 ShowPage(); 46 46 47 if( Licence(LICENCE_MODERATOR))47 if($User->Licence(LICENCE_MODERATOR)) 48 48 { 49 49 echo('<strong>Filtr: </strong>'); -
trunk/registrace.php
r365 r376 2 2 3 3 include('includes/global.php'); 4 5 ShowPage(); 6 4 7 5 if(array_key_exists('user', $_POST)) 8 6 { … … 14 12 $Language = $_POST['Language']; 15 13 16 if($User == '') die('Nelze použít prázdné jméno'); 17 if($User == 'Addon') die('To jméno uživatele nemůžete použít'); 14 if($UserName != '') 15 { 16 if($UserName != 'Addon') 17 { 18 18 19 19 if($Pass == $Pass2) 20 20 { 21 $Line = mysql_fetch_row($Database->SQLCommand('SELECT * FROM `User` WHERE ` User` = "'.$User.'"'));21 $Line = mysql_fetch_row($Database->SQLCommand('SELECT * FROM `User` WHERE `Name` = "'.$UserName.'"')); 22 22 if(!$Line) 23 23 { 24 $Address = $_SERVER['REMOTE_ADDR']; 25 $Salt = GetPasswordSalt(); 24 $Salt = $User->GetPasswordSalt(); 26 25 $Database->SQLCommand('INSERT INTO `User` (`Name` , `Pass` , `Salt`, `LastIP` , `LastLogin` , `Email` , `Language` , `Team` , `NeedUpdate`, `RegistrationTime` ) 27 VALUES ("'.$UserName.'", sha1(CONCAT(sha1("'.$Pass.'"), "'.$Salt.'")), "'.$Salt.'", "'.$Address.'", NOW(), "'.$Email.'", '.$Language.', '.$Team.', 1, NOW())'); 28 echo('Registrace proběhla úspěšně.<br />'); 29 30 $_SESSION['User'] = $UserName; 31 $_SESSION['Pass'] = $Pass; 32 33 $Line = mysql_fetch_array($Database->SQLCommand('SELECT `ID` FROM `User` WHERE `Name` = "'.$_SESSION['User'].'"')); 34 $_SESSION['UserID'] = $Line['ID']; 35 WriteLog('Uživatel se zaregistroval: '.$User, LOG_TYPE_USER); 36 37 // echo $Database->id_connection; 38 } else echo('Uživatel s touto přezdívkou již existuje. <a href="?">Zpět</a>'); 39 } else echo('Hesla se neshodují. <a href="?">Zpět</a>'); 26 VALUES ("'.$UserName.'", '.$User->CryptPasswordSQL('"'.$Pass.'"', '"'.$Salt.'"').', "'.$Salt.'", "'.$_SERVER['REMOTE_ADDR'].'", NOW(), "'.$Email.'", '.$Language.', '.$Team.', 1, NOW())'); 27 $Message = 'Registrace proběhla úspěšně.<br />'; 28 $User->Login($UserName, $Pass); 29 WriteLog('Uživatel se zaregistroval: '.$UserName, LOG_TYPE_USER); 30 } else $Message = 'Uživatel se zadanou přezdívkou již existuje. <a href="?">Zpět</a>'; 31 } else $Message = 'Hesla se neshodují. <a href="?">Zpět</a>'; 32 } else $Message = 'To jméno uživatele nemůžete použít'; 33 } else $Message = 'Nelze použít prázdné jméno'; 34 ShowPage(); 35 echo($Message); 36 ShowFooter(); 40 37 } else 41 38 { 39 ShowPage(); 42 40 echo('<form action="?" method="post"> 43 41 <fieldset><legend>Registrace nového uživatele</legend> -
trunk/save.php
r373 r376 6 6 7 7 // Ochrana proti neoprávněnému přístupu 8 // if(Licence(LICENCE_USER) == false) die('Nemáte přístup do této sekce! Je nutné se přihásit.');8 // if($User->Licence(LICENCE_USER) == false) die('Nemáte přístup do této sekce! Je nutné se přihásit.'); 9 9 10 10 $GroupId = LoadGroupIdParameter(); 11 11 $Table = $TranslationTree[$GroupId]['TablePrefix']; 12 if(array_key_exists('entry', $_POST) and Licence(LICENCE_USER))12 if(array_key_exists('entry', $_POST) and $User->Licence(LICENCE_USER)) 13 13 { 14 $entry = $_POST['entry'] * 1; // Make numeric 15 $UserID = $_SESSION['UserID']; 14 $Entry = $_POST['entry'] * 1; // Make numeric 16 15 $TextID = $_POST['ID'] * 1; 17 16 $Language = $_POST['Language'] * 1; 18 if(array_key_exists('End', $_POST)) $ complete = 1;17 if(array_key_exists('End', $_POST)) $Complete = 1; 19 18 else $complete = 0; 20 19 21 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` = '.$ entry.')');20 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` = '.$Entry.')'); 22 21 if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky'); 23 22 $LineAJ = mysql_fetch_array($DbResult); 24 23 $LineTake = mysql_fetch_array($Database->SQLCommand('SELECT `VersionEnd`, `VersionStart` FROM `'.$Table.'` WHERE `ID` = '.$TextID)); 25 24 if(mysql_num_rows($DbResult) == 0) ErrorMessage('Neznámé Id položky'); 26 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$User ID.') AND (`Entry` = '.$entry.') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')');25 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$User->Id.') AND (`Entry` = '.$Entry.') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')'); 27 26 $Line = mysql_fetch_array($DbResult); 28 27 if(!$Line) 29 28 { 30 29 $Columns = '`Language` , `User` , `Complete` , `Take` , `VersionStart` , `VersionEnd`'; 31 $Values = $Language.','.$User ID.','.$complete.','.$TextID.','.$LineTake['VersionStart'].','.$LineTake['VersionEnd'];30 $Values = $Language.','.$User->Id.','.$Complete.','.$TextID.','.$LineTake['VersionStart'].','.$LineTake['VersionEnd']; 32 31 foreach($TranslationTree[$GroupId]['Items'] as $GroupItem) 33 32 { … … 42 41 } 43 42 //echo('INSERT INTO `'.$Table.'` ('.$Columns.') VALUES ('.$Values.')'); 44 // $Database->SQLCommand('INSERT INTO `'.$Table.'` (` entry`, '.$Columns.') VALUES ('.$entry.','.$Values.')');43 // $Database->SQLCommand('INSERT INTO `'.$Table.'` (`Entry`, '.$Columns.') VALUES ('.$Entry.','.$Values.')'); 45 44 // $LastID = mysql_insert_id(); 46 45 … … 69 68 while($SameTranLine = mysql_fetch_assoc($SameTranID)) 70 69 { 71 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$User ID.') AND (`Entry` = '.$SameTranLine['Entry'].') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')'));70 $Line = mysql_fetch_array($Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE (`User`='.$User->Id.') AND (`Entry` = '.$SameTranLine['Entry'].') AND (`VersionStart` = '.$LineTake['VersionStart'].') AND (`VersionEnd` = '.$LineTake['VersionEnd'].')')); 72 71 if(!$Line) 73 72 { … … 94 93 // Konec kontrolování stejných textů 95 94 96 echo('Překlad <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$ entry.') uložen!<br />');95 echo('Překlad <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$Entry.') uložen!<br />'); 97 96 foreach($LastIDs as $LastID) 98 97 { … … 102 101 } else 103 102 { 104 $sql = 'UPDATE '.$Table.' SET `Complete` = '.$ complete;103 $sql = 'UPDATE '.$Table.' SET `Complete` = '.$Complete; 105 104 foreach($TranslationTree[$GroupId]['Items'] as $GroupItem) 106 105 if(array_key_exists($GroupItem['Column'], $_POST)) … … 110 109 $Database->SQLCommand($sql); 111 110 // echo $sql.'<br />'; 112 echo('Změny v překladu <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$ entry.') uloženy!<br />');113 WriteLog('Změny v překladu <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$ entry.') uloženy!', LOG_TYPE_TRANSLATION);111 echo('Změny v překladu <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$Entry.') uloženy!<br />'); 112 WriteLog('Změny v překladu <a href="form.php?group='.$GroupId.'&ID='.$TextID.'">'.$TextID.'</a> ('.$Entry.') uloženy!', LOG_TYPE_TRANSLATION); 114 113 } 115 114 // Address and redirecting … … 119 118 $next = FollowingTran($TextID, $Table, $GroupId); 120 119 echo('<br /><br />'); 121 $redirecting = mysql_fetch_assoc($Database->SQLCommand('SELECT `Redirecting` FROM `User` WHERE `ID`='.$User ID));120 $redirecting = mysql_fetch_assoc($Database->SQLCommand('SELECT `Redirecting` FROM `User` WHERE `ID`='.$User->Id)); 122 121 123 122 switch($redirecting['Redirecting']) … … 145 144 146 145 // Aktualizace informace o nutnosti načíst XP 147 $Database->SQLCommand('UPDATE `User` SET `NeedUpdate` = 1 WHERE `ID` = '.$User ID);146 $Database->SQLCommand('UPDATE `User` SET `NeedUpdate` = 1 WHERE `ID` = '.$User->Id); 148 147 } else 149 148 { -
trunk/sql/structure.sql
r351 r376 4 4 -- 5 5 -- Počítač: localhost 6 -- Vygenerováno: Středa 03. března 2010, 12:566 -- Vygenerováno: Čtvrtek 11. března 2010, 08:27 7 7 -- Verze MySQL: 5.1.42 8 8 -- Verze PHP: 5.3.1 … … 17 17 18 18 -- 19 -- Struktura tabulky `achievement` 20 -- 21 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', 26 `User` int(11) NOT NULL, 27 `Complete` int(11) NOT NULL, 28 `Take` int(11) NOT NULL, 29 `Name` text NOT NULL, 30 `Description` text NOT NULL, 31 `Reward` text NOT NULL, 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=2718 ; 43 44 -- -------------------------------------------------------- 45 46 -- 47 -- Struktura tabulky `achievement_category` 48 -- 49 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', 54 `User` int(11) NOT NULL, 55 `Complete` int(11) NOT NULL, 56 `Take` int(11) NOT NULL, 57 `Name` text NOT NULL, 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=205 ; 69 70 -- -------------------------------------------------------- 71 72 -- 73 -- Struktura tabulky `achievement_criteria` 74 -- 75 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', 80 `User` int(11) NOT NULL, 81 `Complete` int(11) NOT NULL, 82 `Take` int(11) NOT NULL, 83 `Text` text NOT NULL, 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=10523 ; 95 96 -- -------------------------------------------------------- 97 98 -- 99 -- Struktura tabulky `areatrigger_tavern` 100 -- 101 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', 106 `User` int(11) NOT NULL, 107 `Complete` int(11) NOT NULL, 108 `Take` int(11) NOT NULL, 109 `Name` text NOT NULL, 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 122 -- -------------------------------------------------------- 123 124 -- 125 -- Struktura tabulky `areatrigger_teleport` 126 -- 127 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', 132 `User` int(11) NOT NULL, 133 `Complete` int(11) NOT NULL, 134 `Take` int(11) NOT NULL, 135 `Name` text NOT NULL, 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=454 ; 147 148 -- -------------------------------------------------------- 149 150 -- 151 -- Struktura tabulky `banner` 152 -- 153 154 CREATE TABLE IF NOT EXISTS `banner` ( 19 -- Struktura tabulky `Banner` 20 -- 21 22 CREATE TABLE IF NOT EXISTS `Banner` ( 155 23 `DateFirst` datetime NOT NULL, 156 24 `DateLast` datetime NOT NULL, … … 166 34 167 35 -- 168 -- Struktura tabulky `connexion` 169 -- 170 171 CREATE TABLE IF NOT EXISTS `connexion` ( 172 `Id` int(11) NOT NULL AUTO_INCREMENT, 173 `Name` text NOT NULL, 174 `Group` int(11) NOT NULL, 175 PRIMARY KEY (`Id`), 176 KEY `Group` (`Group`) 177 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1502 ; 178 179 -- -------------------------------------------------------- 180 181 -- 182 -- Struktura tabulky `connexion_item` 183 -- 184 185 CREATE TABLE IF NOT EXISTS `connexion_item` ( 186 `Id` int(11) NOT NULL AUTO_INCREMENT, 187 `connexion` int(11) NOT NULL, 188 `entry` int(11) NOT NULL, 189 PRIMARY KEY (`Id`), 190 KEY `connexion` (`connexion`,`entry`) 191 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7029 ; 192 193 -- -------------------------------------------------------- 194 195 -- 196 -- Struktura tabulky `creature` 197 -- 198 199 CREATE TABLE IF NOT EXISTS `creature` ( 200 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 201 `entry` int(11) NOT NULL, 202 `name` text NOT NULL, 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 (`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=58460 ; 219 220 -- -------------------------------------------------------- 221 222 -- 223 -- Struktura tabulky `dictionary` 224 -- 225 226 CREATE TABLE IF NOT EXISTS `dictionary` ( 227 `ID` int(11) NOT NULL AUTO_INCREMENT, 228 `Entry` int(11) NOT NULL, 229 `Text` varchar(255) NOT NULL, 230 `Language` int(11) NOT NULL, 231 `Description` text NOT NULL, 232 `User` int(11) NOT NULL, 233 PRIMARY KEY (`ID`), 234 KEY `Language` (`Language`), 235 KEY `Entry` (`Entry`), 236 KEY `User` (`User`) 237 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=411 ; 238 239 -- -------------------------------------------------------- 240 241 -- 242 -- Struktura tabulky `Export` 243 -- 244 245 CREATE TABLE IF NOT EXISTS `Export` ( 246 `Id` int(11) NOT NULL AUTO_INCREMENT, 247 `User` int(11) NOT NULL, 248 `TimeCreate` datetime NOT NULL, 249 `Title` varchar(255) NOT NULL, 250 `WithDiacritic` tinyint(1) NOT NULL, 251 `UsedCount` int(11) NOT NULL, 252 `ClientVersion` int(11) NOT NULL, 253 `OutputType` int(11) NOT NULL, 254 `Description` text NOT NULL, 255 PRIMARY KEY (`Id`), 256 KEY `User` (`User`), 257 KEY `TimeCreate` (`TimeCreate`) 258 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=55 ; 259 260 -- -------------------------------------------------------- 261 262 -- 263 -- Struktura tabulky `ExportGroup` 264 -- 265 266 CREATE TABLE IF NOT EXISTS `ExportGroup` ( 267 `Id` int(11) NOT NULL AUTO_INCREMENT, 268 `Export` int(11) NOT NULL, 269 `Group` int(11) NOT NULL, 270 PRIMARY KEY (`Id`), 271 KEY `Export` (`Export`) 272 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=527 ; 273 274 -- -------------------------------------------------------- 275 276 -- 277 -- Struktura tabulky `ExportLanguage` 278 -- 279 280 CREATE TABLE IF NOT EXISTS `ExportLanguage` ( 281 `Id` int(11) NOT NULL AUTO_INCREMENT, 282 `Export` int(11) NOT NULL, 283 `Language` int(11) NOT NULL, 284 `Sequence` int(11) NOT NULL, 285 PRIMARY KEY (`Id`) 286 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ; 287 288 -- -------------------------------------------------------- 289 290 -- 291 -- Struktura tabulky `ExportOutputType` 292 -- 293 294 CREATE TABLE IF NOT EXISTS `ExportOutputType` ( 295 `Id` int(11) NOT NULL AUTO_INCREMENT, 296 `Name` varchar(255) NOT NULL, 297 PRIMARY KEY (`Id`) 298 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; 299 300 -- -------------------------------------------------------- 301 302 -- 303 -- Struktura tabulky `ExportTask` 304 -- 305 306 CREATE TABLE IF NOT EXISTS `ExportTask` ( 307 `Id` int(11) NOT NULL AUTO_INCREMENT, 308 `TimeStart` datetime NOT NULL, 309 `TimeFinish` datetime DEFAULT NULL, 310 `Export` int(11) NOT NULL, 311 PRIMARY KEY (`Id`), 312 KEY `Export` (`Export`) 313 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; 314 315 -- -------------------------------------------------------- 316 317 -- 318 -- Struktura tabulky `ExportUser` 319 -- 320 321 CREATE TABLE IF NOT EXISTS `ExportUser` ( 322 `Id` int(11) NOT NULL AUTO_INCREMENT, 323 `Export` int(11) NOT NULL, 324 `User` int(11) NOT NULL, 325 `Sequence` int(11) NOT NULL, 326 PRIMARY KEY (`Id`), 327 KEY `Export` (`Export`), 328 KEY `User` (`User`) 329 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=3926 ; 330 331 -- -------------------------------------------------------- 332 333 -- 334 -- Struktura tabulky `ExportVersion` 335 -- 336 337 CREATE TABLE IF NOT EXISTS `ExportVersion` ( 338 `Id` int(11) NOT NULL AUTO_INCREMENT, 339 `ExportType` int(11) NOT NULL, 340 `ClientVersion` int(11) NOT NULL, 341 PRIMARY KEY (`Id`), 342 KEY `ExportType` (`ExportType`), 343 KEY `ClientVersion` (`ClientVersion`) 344 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ; 345 346 -- -------------------------------------------------------- 347 348 -- 349 -- Struktura tabulky `gameobject` 350 -- 351 352 CREATE TABLE IF NOT EXISTS `gameobject` ( 353 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 354 `entry` int(11) NOT NULL, 355 `Name` text NOT NULL, 356 `castbarcaption` text NOT NULL, 357 `Language` int(11) NOT NULL DEFAULT '0', 358 `User` int(11) NOT NULL, 359 `Complete` int(11) NOT NULL, 360 `Take` int(11) NOT NULL, 361 `VersionStart` int(11) NOT NULL DEFAULT '8606', 362 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 363 PRIMARY KEY (`ID`), 364 KEY `entry` (`entry`), 365 KEY `User` (`User`), 366 KEY `Take` (`Take`), 367 KEY `Complete` (`Complete`), 368 KEY `Language` (`Language`), 369 KEY `VersionStart` (`VersionStart`), 370 KEY `VersionEnd` (`VersionEnd`) 371 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=96122 ; 372 373 -- -------------------------------------------------------- 374 375 -- 376 -- Struktura tabulky `gametips` 377 -- 378 379 CREATE TABLE IF NOT EXISTS `gametips` ( 380 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 381 `entry` int(11) NOT NULL, 382 `Text` text NOT NULL, 383 `Language` int(11) NOT NULL DEFAULT '0', 384 `User` int(11) NOT NULL, 385 `Complete` int(11) NOT NULL, 386 `Take` int(11) NOT NULL, 387 `VersionStart` int(11) NOT NULL DEFAULT '8606', 388 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 389 PRIMARY KEY (`ID`), 390 KEY `entry` (`entry`), 391 KEY `User` (`User`), 392 KEY `Take` (`Take`), 393 KEY `Language` (`Language`), 394 KEY `Complete` (`Complete`), 395 KEY `VersionStart` (`VersionStart`), 396 KEY `VersionEnd` (`VersionEnd`) 397 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=416 ; 398 399 -- -------------------------------------------------------- 400 401 -- 402 -- Struktura tabulky `global_strings` 403 -- 404 405 CREATE TABLE IF NOT EXISTS `global_strings` ( 406 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 407 `entry` int(11) NOT NULL, 408 `Language` int(11) NOT NULL DEFAULT '0', 409 `User` int(11) NOT NULL, 410 `Complete` int(11) NOT NULL, 411 `Take` int(11) NOT NULL, 412 `ShortCut` varchar(255) NOT NULL, 413 `Text` text NOT NULL, 414 `Comment` text NOT NULL, 415 `VersionStart` int(11) NOT NULL DEFAULT '8606', 416 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 417 PRIMARY KEY (`ID`), 418 KEY `entry` (`entry`), 419 KEY `User` (`User`), 420 KEY `Take` (`Take`), 421 KEY `Language` (`Language`), 422 KEY `Complete` (`Complete`), 423 KEY `ShortCut` (`ShortCut`), 424 KEY `VersionStart` (`VersionStart`), 425 KEY `VersionEnd` (`VersionEnd`) 426 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=26671 ; 427 428 -- -------------------------------------------------------- 429 430 -- 431 -- Struktura tabulky `glue_strings` 432 -- 433 434 CREATE TABLE IF NOT EXISTS `glue_strings` ( 435 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 436 `entry` int(11) NOT NULL, 437 `Language` int(11) NOT NULL DEFAULT '0', 438 `User` int(11) NOT NULL, 439 `Complete` int(11) NOT NULL, 440 `Take` int(11) NOT NULL, 441 `ShortCut` varchar(255) NOT NULL, 442 `Text` text NOT NULL, 443 `Comment` text NOT NULL, 444 `VersionStart` int(11) NOT NULL DEFAULT '8606', 445 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 446 PRIMARY KEY (`ID`), 447 KEY `entry` (`entry`), 448 KEY `User` (`User`), 449 KEY `Take` (`Take`), 450 KEY `Language` (`Language`), 451 KEY `Complete` (`Complete`), 452 KEY `ShortCut` (`ShortCut`), 453 KEY `VersionStart` (`VersionStart`), 454 KEY `VersionEnd` (`VersionEnd`) 455 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2068 ; 456 457 -- -------------------------------------------------------- 458 459 -- 460 -- Struktura tabulky `group` 461 -- 462 463 CREATE TABLE IF NOT EXISTS `group` ( 464 `Id` int(11) NOT NULL AUTO_INCREMENT, 465 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 466 `TablePrefix` varchar(255) COLLATE utf8_czech_ci NOT NULL, 467 `MangosDatabase` varchar(255) COLLATE utf8_czech_ci NOT NULL, 468 `MangosTable` varchar(255) COLLATE utf8_czech_ci NOT NULL, 469 `MangosTableIndex` varchar(255) COLLATE utf8_czech_ci NOT NULL, 470 `DBCFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 471 `DBCColumns` text COLLATE utf8_czech_ci NOT NULL, 472 `WowheadName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 473 `LuaFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 474 `LuaMPQFolder` varchar(255) COLLATE utf8_czech_ci NOT NULL, 475 `LastImport` datetime NOT NULL, 476 `LastVersion` int(11) NOT NULL, 477 PRIMARY KEY (`Id`) 478 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=23 ; 479 480 -- -------------------------------------------------------- 481 482 -- 483 -- Struktura tabulky `group_item` 484 -- 485 486 CREATE TABLE IF NOT EXISTS `group_item` ( 487 `Id` int(11) NOT NULL AUTO_INCREMENT, 488 `Group` int(11) NOT NULL, 489 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 490 `Column` varchar(255) COLLATE utf8_czech_ci NOT NULL, 491 `Visible` tinyint(1) NOT NULL DEFAULT '1', 492 `MangosColumn` varchar(255) COLLATE utf8_czech_ci NOT NULL, 493 `AddonFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 494 `DBCColumnIndex` int(11) NOT NULL DEFAULT '0', 495 PRIMARY KEY (`Id`), 496 KEY `Group` (`Group`), 497 KEY `Visible` (`Visible`) 498 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=63 ; 499 500 -- -------------------------------------------------------- 501 502 -- 503 -- Struktura tabulky `item` 504 -- 505 506 CREATE TABLE IF NOT EXISTS `item` ( 507 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 508 `entry` int(11) NOT NULL, 509 `Name` text NOT NULL, 510 `Description` text NOT NULL, 511 `Language` int(11) NOT NULL DEFAULT '0', 512 `User` int(11) NOT NULL, 513 `Complete` int(11) NOT NULL, 514 `Take` int(11) NOT NULL, 515 `VersionStart` int(11) NOT NULL DEFAULT '8606', 516 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 517 PRIMARY KEY (`ID`), 518 KEY `entry` (`entry`), 519 KEY `User` (`User`), 520 KEY `Take` (`Take`), 521 KEY `Complete` (`Complete`), 522 KEY `Language` (`Language`), 523 KEY `VersionStart` (`VersionStart`), 524 KEY `VersionEnd` (`VersionEnd`) 525 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=70300 ; 526 527 -- -------------------------------------------------------- 528 529 -- 530 -- Struktura tabulky `language` 531 -- 532 533 CREATE TABLE IF NOT EXISTS `language` ( 534 `Id` int(11) NOT NULL AUTO_INCREMENT, 535 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 536 `Enabled` tinyint(1) NOT NULL DEFAULT '1', 537 PRIMARY KEY (`Id`), 538 KEY `Enabled` (`Enabled`) 539 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 540 541 -- -------------------------------------------------------- 542 543 -- 544 -- Struktura tabulky `log` 545 -- 546 547 CREATE TABLE IF NOT EXISTS `log` ( 548 `ID` int(11) NOT NULL AUTO_INCREMENT, 549 `user` int(11) NOT NULL, 550 `type` int(11) NOT NULL, 551 `text` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 552 `date` datetime NOT NULL, 553 `IP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 554 PRIMARY KEY (`ID`), 555 KEY `user` (`user`), 556 KEY `type` (`type`), 557 KEY `date` (`date`) 558 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=532628 ; 559 560 -- -------------------------------------------------------- 561 562 -- 563 -- Struktura tabulky `mangos_command` 564 -- 565 566 CREATE TABLE IF NOT EXISTS `mangos_command` ( 567 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 568 `entry` int(11) NOT NULL, 569 `help` text NOT NULL, 570 `Language` int(11) NOT NULL DEFAULT '0', 571 `User` int(11) NOT NULL, 572 `Complete` int(11) NOT NULL, 573 `Take` int(11) NOT NULL, 574 `Name` varchar(255) NOT NULL, 575 `VersionStart` int(11) NOT NULL DEFAULT '8606', 576 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 577 PRIMARY KEY (`ID`), 578 KEY `entry` (`entry`), 579 KEY `User` (`User`), 580 KEY `Take` (`Take`), 581 KEY `Complete` (`Complete`), 582 KEY `Language` (`Language`), 583 KEY `Name` (`Name`), 584 KEY `VersionStart` (`VersionStart`), 585 KEY `VersionEnd` (`VersionEnd`) 586 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=853 ; 587 588 -- -------------------------------------------------------- 589 590 -- 591 -- Struktura tabulky `mangos_string` 592 -- 593 594 CREATE TABLE IF NOT EXISTS `mangos_string` ( 595 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 596 `entry` int(11) NOT NULL, 597 `content_default` text NOT NULL, 598 `Language` int(11) NOT NULL DEFAULT '0', 599 `User` int(11) NOT NULL, 600 `Complete` int(11) NOT NULL, 601 `Take` int(11) NOT NULL, 602 `VersionStart` int(11) NOT NULL DEFAULT '8606', 603 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 604 PRIMARY KEY (`ID`), 605 KEY `entry` (`entry`), 606 KEY `User` (`User`), 607 KEY `Take` (`Take`), 608 KEY `Complete` (`Complete`), 609 KEY `Language` (`Language`), 610 KEY `VersionStart` (`VersionStart`), 611 KEY `VersionEnd` (`VersionEnd`) 612 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2404 ; 613 614 -- -------------------------------------------------------- 615 616 -- 617 -- Struktura tabulky `news` 618 -- 619 620 CREATE TABLE IF NOT EXISTS `news` ( 621 `Id` int(11) NOT NULL AUTO_INCREMENT, 622 `Time` datetime NOT NULL, 623 `User` int(11) NOT NULL, 624 `Text` text NOT NULL, 625 PRIMARY KEY (`Id`), 626 KEY `Time` (`Time`) 627 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ; 628 629 -- -------------------------------------------------------- 630 631 -- 632 -- Struktura tabulky `npc` 633 -- 634 635 CREATE TABLE IF NOT EXISTS `npc` ( 636 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 637 `entry` int(11) NOT NULL, 638 `Text0_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 639 `Text0_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 640 `Text1_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 641 `Text1_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 642 `Text2_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 643 `Text2_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 644 `Text3_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 645 `Text3_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 646 `Text4_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 647 `Text4_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 648 `Text5_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 649 `Text5_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 650 `Text6_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 651 `Text6_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 652 `Text7_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 653 `Text7_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 654 `Language` int(11) NOT NULL DEFAULT '0', 655 `User` int(11) NOT NULL, 656 `Complete` int(11) NOT NULL, 657 `Take` int(11) NOT NULL, 658 `VersionStart` int(11) NOT NULL DEFAULT '8606', 659 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 660 PRIMARY KEY (`ID`), 661 KEY `entry` (`entry`), 662 KEY `User` (`User`), 663 KEY `Take` (`Take`), 664 KEY `Complete` (`Complete`), 665 KEY `Language` (`Language`), 666 KEY `VersionStart` (`VersionStart`), 667 KEY `VersionEnd` (`VersionEnd`) 668 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16781037 ; 669 670 -- -------------------------------------------------------- 671 672 -- 673 -- Struktura tabulky `npc_option` 674 -- 675 676 CREATE TABLE IF NOT EXISTS `npc_option` ( 677 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 678 `entry` int(11) NOT NULL, 679 `Language` int(11) NOT NULL DEFAULT '0', 680 `User` int(11) NOT NULL, 681 `Complete` int(11) NOT NULL, 682 `Take` int(11) NOT NULL, 683 `OptionText` text NOT NULL, 684 `VersionStart` int(11) NOT NULL DEFAULT '8606', 685 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 686 PRIMARY KEY (`ID`), 687 KEY `entry` (`entry`), 688 KEY `User` (`User`), 689 KEY `Take` (`Take`), 690 KEY `Language` (`Language`), 691 KEY `Complete` (`Complete`), 692 KEY `VersionStart` (`VersionStart`), 693 KEY `VersionEnd` (`VersionEnd`) 694 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=129 ; 695 696 -- -------------------------------------------------------- 697 698 -- 699 -- Struktura tabulky `page` 700 -- 701 702 CREATE TABLE IF NOT EXISTS `page` ( 703 `ID` int(11) NOT NULL AUTO_INCREMENT, 704 `entry` int(11) unsigned NOT NULL DEFAULT '0', 705 `Text` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 706 `Language` int(11) NOT NULL, 707 `User` int(11) NOT NULL, 708 `Complete` int(11) NOT NULL, 709 `Take` int(11) NOT NULL, 710 `VersionStart` int(11) NOT NULL DEFAULT '8606', 711 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 712 PRIMARY KEY (`ID`), 713 KEY `entry` (`entry`), 714 KEY `User` (`User`), 715 KEY `Take` (`Take`), 716 KEY `Complete` (`Complete`), 717 KEY `Language` (`Language`), 718 KEY `VersionStart` (`VersionStart`), 719 KEY `VersionEnd` (`VersionEnd`) 720 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System' AUTO_INCREMENT=2469 ; 721 722 -- -------------------------------------------------------- 723 724 -- 725 -- Struktura tabulky `quests` 726 -- 727 728 CREATE TABLE IF NOT EXISTS `quests` ( 729 `ID` int(11) NOT NULL AUTO_INCREMENT, 730 `entry` int(11) NOT NULL DEFAULT '0', 731 `Title` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 732 `Details` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 733 `Objectives` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 734 `OfferRewardText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 735 `RequestItemsText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 736 `EndText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 737 `ObjectiveText1` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 738 `ObjectiveText2` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 739 `ObjectiveText3` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 740 `ObjectiveText4` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 741 `Language` int(11) NOT NULL DEFAULT '1', 742 `User` int(11) NOT NULL, 743 `Complete` int(11) NOT NULL DEFAULT '1', 744 `Take` int(11) NOT NULL, 745 `VersionStart` int(11) NOT NULL DEFAULT '8606', 746 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 747 PRIMARY KEY (`ID`), 748 KEY `entry` (`entry`), 749 KEY `User` (`User`), 750 KEY `complete` (`Complete`), 751 KEY `Language` (`Language`), 752 KEY `VersionStart` (`VersionStart`), 753 KEY `VersionEnd` (`VersionEnd`) 754 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14408 ; 755 756 -- -------------------------------------------------------- 757 758 -- 759 -- Struktura tabulky `sd2_eventai_texts` 760 -- 761 762 CREATE TABLE IF NOT EXISTS `sd2_eventai_texts` ( 763 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 764 `entry` int(11) NOT NULL, 765 `content_default` text NOT NULL, 766 `comment` text NOT NULL, 767 `Language` int(11) NOT NULL DEFAULT '0', 768 `User` int(11) NOT NULL, 769 `Complete` int(11) NOT NULL, 770 `Take` int(11) NOT NULL, 771 `VersionStart` int(11) NOT NULL DEFAULT '8606', 772 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 773 PRIMARY KEY (`ID`), 774 KEY `entry` (`entry`), 775 KEY `User` (`User`), 776 KEY `Take` (`Take`), 777 KEY `Complete` (`Complete`), 778 KEY `Language` (`Language`), 779 KEY `VersionStart` (`VersionStart`), 780 KEY `VersionEnd` (`VersionEnd`) 781 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; 782 783 -- -------------------------------------------------------- 784 785 -- 786 -- Struktura tabulky `sd2_script_texts` 787 -- 788 789 CREATE TABLE IF NOT EXISTS `sd2_script_texts` ( 790 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 791 `entry` int(11) NOT NULL, 792 `content_default` text NOT NULL, 793 `comment` text NOT NULL, 794 `Language` int(11) NOT NULL DEFAULT '0', 795 `User` int(11) NOT NULL, 796 `Complete` int(11) NOT NULL, 797 `Take` int(11) NOT NULL, 798 `VersionStart` int(11) NOT NULL DEFAULT '8606', 799 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 800 PRIMARY KEY (`ID`), 801 KEY `entry` (`entry`), 802 KEY `User` (`User`), 803 KEY `Take` (`Take`), 804 KEY `Complete` (`Complete`), 805 KEY `Language` (`Language`), 806 KEY `VersionStart` (`VersionStart`), 807 KEY `VersionEnd` (`VersionEnd`) 808 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1969 ; 809 810 -- -------------------------------------------------------- 811 812 -- 813 -- Struktura tabulky `shoutbox` 814 -- 815 816 CREATE TABLE IF NOT EXISTS `shoutbox` ( 817 `ID` int(11) NOT NULL AUTO_INCREMENT, 818 `user` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 819 `text` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 820 `date` datetime NOT NULL, 821 `IP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 822 PRIMARY KEY (`ID`), 823 KEY `date` (`date`) 824 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1086 ; 825 826 -- -------------------------------------------------------- 827 828 -- 829 -- Struktura tabulky `spell` 830 -- 831 832 CREATE TABLE IF NOT EXISTS `spell` ( 833 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 834 `entry` int(11) NOT NULL, 835 `Name` text NOT NULL, 836 `Description` text NOT NULL, 837 `ToolTip` text NOT NULL, 838 `Rank` text NOT NULL, 839 `Language` int(11) NOT NULL DEFAULT '0', 840 `User` int(11) NOT NULL, 841 `Complete` int(11) NOT NULL, 842 `Take` int(11) NOT NULL, 843 `VersionStart` int(11) NOT NULL DEFAULT '8606', 844 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 845 PRIMARY KEY (`ID`), 846 KEY `entry` (`entry`), 847 KEY `User` (`User`), 848 KEY `Take` (`Take`), 849 KEY `Language` (`Language`), 850 KEY `Complete` (`Complete`), 851 KEY `VersionStart` (`VersionStart`), 852 KEY `VersionEnd` (`VersionEnd`) 853 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=67580 ; 854 855 -- -------------------------------------------------------- 856 857 -- 858 -- Struktura tabulky `Team` 859 -- 860 861 CREATE TABLE IF NOT EXISTS `Team` ( 862 `Id` int(11) NOT NULL AUTO_INCREMENT, 863 `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 864 `Description` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 865 `URL` varchar(255) NOT NULL, 866 `TimeCreate` datetime NOT NULL, 867 `Leader` int(11) NOT NULL, 868 PRIMARY KEY (`Id`), 869 KEY `Leader` (`Leader`), 870 KEY `TimeCreate` (`TimeCreate`) 871 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ; 872 873 -- -------------------------------------------------------- 874 875 -- 876 -- Struktura tabulky `transports` 877 -- 878 879 CREATE TABLE IF NOT EXISTS `transports` ( 880 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 881 `entry` int(11) NOT NULL, 882 `Language` int(11) NOT NULL DEFAULT '0', 883 `User` int(11) NOT NULL, 884 `Complete` int(11) NOT NULL, 885 `Take` int(11) NOT NULL, 886 `Name` text NOT NULL, 887 `VersionStart` int(11) NOT NULL DEFAULT '8606', 888 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 889 PRIMARY KEY (`ID`), 890 KEY `entry` (`entry`), 891 KEY `User` (`User`), 892 KEY `Take` (`Take`), 893 KEY `Language` (`Language`), 894 KEY `Complete` (`Complete`), 895 KEY `VersionStart` (`VersionStart`), 896 KEY `VersionEnd` (`VersionEnd`) 897 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ; 898 899 -- -------------------------------------------------------- 900 901 -- 902 -- Struktura tabulky `user` 903 -- 904 905 CREATE TABLE IF NOT EXISTS `user` ( 906 `ID` int(11) NOT NULL AUTO_INCREMENT, 907 `user` varchar(64) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 908 `pass` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 909 `Salt` varchar(255) COLLATE utf8_czech_ci NOT NULL, 910 `gm` int(11) NOT NULL DEFAULT '0', 911 `LastIP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 912 `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 913 `LastLogout` datetime DEFAULT NULL, 914 `Email` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 915 `Language` int(11) NOT NULL DEFAULT '1', 916 `XP` int(11) NOT NULL, 917 `TranslatedCount` int(11) NOT NULL, 918 `NeedUpdate` int(11) NOT NULL, 919 `team` int(11) NOT NULL, 920 `redirecting` int(11) NOT NULL, 921 `RegistrationTime` datetime DEFAULT NULL, 922 PRIMARY KEY (`ID`), 923 KEY `team` (`team`), 924 KEY `user` (`user`) 925 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=881 ; 926 927 -- -------------------------------------------------------- 928 929 -- 930 -- Struktura tabulky `verseclient` 931 -- 932 933 CREATE TABLE IF NOT EXISTS `verseclient` ( 934 `ID` int(11) NOT NULL AUTO_INCREMENT, 935 `verse` text COLLATE utf8_czech_ci NOT NULL, 936 `date` datetime NOT NULL, 937 `text` text COLLATE utf8_czech_ci NOT NULL, 938 `user` int(11) NOT NULL, 939 PRIMARY KEY (`ID`), 940 KEY `user` (`user`) 941 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; 942 943 -- -------------------------------------------------------- 944 945 -- 946 -- Struktura tabulky `wow_client_version` 947 -- 948 949 CREATE TABLE IF NOT EXISTS `wow_client_version` ( 36 -- Struktura tabulky `ClientVersion` 37 -- 38 39 CREATE TABLE IF NOT EXISTS `ClientVersion` ( 950 40 `Id` int(11) NOT NULL AUTO_INCREMENT, 951 41 `Version` varchar(16) NOT NULL, … … 973 63 KEY `ReleaseDate` (`ReleaseDate`) 974 64 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=81 ; 65 66 -- -------------------------------------------------------- 67 68 -- 69 -- Struktura tabulky `connexion` 70 -- 71 72 CREATE TABLE IF NOT EXISTS `connexion` ( 73 `Id` int(11) NOT NULL AUTO_INCREMENT, 74 `Name` text NOT NULL, 75 `Group` int(11) NOT NULL, 76 PRIMARY KEY (`Id`), 77 KEY `Group` (`Group`) 78 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1502 ; 79 80 -- -------------------------------------------------------- 81 82 -- 83 -- Struktura tabulky `connexion_item` 84 -- 85 86 CREATE TABLE IF NOT EXISTS `connexion_item` ( 87 `Id` int(11) NOT NULL AUTO_INCREMENT, 88 `connexion` int(11) NOT NULL, 89 `entry` int(11) NOT NULL, 90 PRIMARY KEY (`Id`), 91 KEY `connexion` (`connexion`,`entry`) 92 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7029 ; 93 94 -- -------------------------------------------------------- 95 96 -- 97 -- Struktura tabulky `CzWoWPackageVersion` 98 -- 99 100 CREATE TABLE IF NOT EXISTS `CzWoWPackageVersion` ( 101 `ID` int(11) NOT NULL AUTO_INCREMENT, 102 `Version` text COLLATE utf8_czech_ci NOT NULL, 103 `Date` datetime NOT NULL, 104 `Text` text COLLATE utf8_czech_ci NOT NULL, 105 `User` int(11) NOT NULL, 106 PRIMARY KEY (`ID`), 107 KEY `user` (`User`) 108 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=11 ; 109 110 -- -------------------------------------------------------- 111 112 -- 113 -- Struktura tabulky `Dictionary` 114 -- 115 116 CREATE TABLE IF NOT EXISTS `Dictionary` ( 117 `ID` int(11) NOT NULL AUTO_INCREMENT, 118 `Entry` int(11) NOT NULL, 119 `Text` varchar(255) NOT NULL, 120 `Language` int(11) NOT NULL, 121 `Description` text NOT NULL, 122 `User` int(11) NOT NULL, 123 PRIMARY KEY (`ID`), 124 KEY `Language` (`Language`), 125 KEY `Entry` (`Entry`), 126 KEY `User` (`User`) 127 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=413 ; 128 129 -- -------------------------------------------------------- 130 131 -- 132 -- Struktura tabulky `Export` 133 -- 134 135 CREATE TABLE IF NOT EXISTS `Export` ( 136 `Id` int(11) NOT NULL AUTO_INCREMENT, 137 `User` int(11) NOT NULL, 138 `TimeCreate` datetime NOT NULL, 139 `Title` varchar(255) NOT NULL, 140 `WithDiacritic` tinyint(1) NOT NULL, 141 `UsedCount` int(11) NOT NULL, 142 `ClientVersion` int(11) NOT NULL, 143 `OutputType` int(11) NOT NULL, 144 `Description` text NOT NULL, 145 PRIMARY KEY (`Id`), 146 KEY `User` (`User`), 147 KEY `TimeCreate` (`TimeCreate`) 148 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=58 ; 149 150 -- -------------------------------------------------------- 151 152 -- 153 -- Struktura tabulky `ExportGroup` 154 -- 155 156 CREATE TABLE IF NOT EXISTS `ExportGroup` ( 157 `Id` int(11) NOT NULL AUTO_INCREMENT, 158 `Export` int(11) NOT NULL, 159 `Group` int(11) NOT NULL, 160 PRIMARY KEY (`Id`), 161 KEY `Export` (`Export`) 162 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=580 ; 163 164 -- -------------------------------------------------------- 165 166 -- 167 -- Struktura tabulky `ExportLanguage` 168 -- 169 170 CREATE TABLE IF NOT EXISTS `ExportLanguage` ( 171 `Id` int(11) NOT NULL AUTO_INCREMENT, 172 `Export` int(11) NOT NULL, 173 `Language` int(11) NOT NULL, 174 `Sequence` int(11) NOT NULL, 175 PRIMARY KEY (`Id`) 176 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=44 ; 177 178 -- -------------------------------------------------------- 179 180 -- 181 -- Struktura tabulky `ExportOutputType` 182 -- 183 184 CREATE TABLE IF NOT EXISTS `ExportOutputType` ( 185 `Id` int(11) NOT NULL AUTO_INCREMENT, 186 `Name` varchar(255) NOT NULL, 187 PRIMARY KEY (`Id`) 188 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10 ; 189 190 -- -------------------------------------------------------- 191 192 -- 193 -- Struktura tabulky `ExportTask` 194 -- 195 196 CREATE TABLE IF NOT EXISTS `ExportTask` ( 197 `Id` int(11) NOT NULL AUTO_INCREMENT, 198 `TimeStart` datetime NOT NULL, 199 `TimeFinish` datetime DEFAULT NULL, 200 `Export` int(11) NOT NULL, 201 PRIMARY KEY (`Id`), 202 KEY `Export` (`Export`) 203 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ; 204 205 -- -------------------------------------------------------- 206 207 -- 208 -- Struktura tabulky `ExportUser` 209 -- 210 211 CREATE TABLE IF NOT EXISTS `ExportUser` ( 212 `Id` int(11) NOT NULL AUTO_INCREMENT, 213 `Export` int(11) NOT NULL, 214 `User` int(11) NOT NULL, 215 `Sequence` int(11) NOT NULL, 216 PRIMARY KEY (`Id`), 217 KEY `Export` (`Export`), 218 KEY `User` (`User`) 219 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=4280 ; 220 221 -- -------------------------------------------------------- 222 223 -- 224 -- Struktura tabulky `ExportVersion` 225 -- 226 227 CREATE TABLE IF NOT EXISTS `ExportVersion` ( 228 `Id` int(11) NOT NULL AUTO_INCREMENT, 229 `ExportType` int(11) NOT NULL, 230 `ClientVersion` int(11) NOT NULL, 231 PRIMARY KEY (`Id`), 232 KEY `ExportType` (`ExportType`), 233 KEY `ClientVersion` (`ClientVersion`) 234 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=50 ; 235 236 -- -------------------------------------------------------- 237 238 -- 239 -- Struktura tabulky `Group` 240 -- 241 242 CREATE TABLE IF NOT EXISTS `Group` ( 243 `Id` int(11) NOT NULL AUTO_INCREMENT, 244 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 245 `TablePrefix` varchar(255) COLLATE utf8_czech_ci NOT NULL, 246 `MangosDatabase` varchar(255) COLLATE utf8_czech_ci NOT NULL, 247 `MangosTable` varchar(255) COLLATE utf8_czech_ci NOT NULL, 248 `MangosTableIndex` varchar(255) COLLATE utf8_czech_ci NOT NULL, 249 `DBCFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 250 `DBCColumns` text COLLATE utf8_czech_ci NOT NULL, 251 `WowheadName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 252 `LuaFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 253 `LuaMPQFolder` varchar(255) COLLATE utf8_czech_ci NOT NULL, 254 `LastImport` datetime NOT NULL, 255 `LastVersion` int(11) NOT NULL, 256 PRIMARY KEY (`Id`) 257 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=23 ; 258 259 -- -------------------------------------------------------- 260 261 -- 262 -- Struktura tabulky `GroupItem` 263 -- 264 265 CREATE TABLE IF NOT EXISTS `GroupItem` ( 266 `Id` int(11) NOT NULL AUTO_INCREMENT, 267 `Group` int(11) NOT NULL, 268 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 269 `Column` varchar(255) COLLATE utf8_czech_ci NOT NULL, 270 `Visible` tinyint(1) NOT NULL DEFAULT '1', 271 `MangosColumn` varchar(255) COLLATE utf8_czech_ci NOT NULL, 272 `AddonFileName` varchar(255) COLLATE utf8_czech_ci NOT NULL, 273 `DBCColumnIndex` int(11) NOT NULL DEFAULT '0', 274 PRIMARY KEY (`Id`), 275 KEY `Group` (`Group`), 276 KEY `Visible` (`Visible`) 277 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=63 ; 278 279 -- -------------------------------------------------------- 280 281 -- 282 -- Struktura tabulky `Language` 283 -- 284 285 CREATE TABLE IF NOT EXISTS `Language` ( 286 `Id` int(11) NOT NULL AUTO_INCREMENT, 287 `Name` varchar(255) COLLATE utf8_czech_ci NOT NULL, 288 `Enabled` tinyint(1) NOT NULL DEFAULT '1', 289 PRIMARY KEY (`Id`), 290 KEY `Enabled` (`Enabled`) 291 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=4 ; 292 293 -- -------------------------------------------------------- 294 295 -- 296 -- Struktura tabulky `Log` 297 -- 298 299 CREATE TABLE IF NOT EXISTS `Log` ( 300 `ID` int(11) NOT NULL AUTO_INCREMENT, 301 `User` int(11) NOT NULL, 302 `Type` int(11) NOT NULL, 303 `Text` text NOT NULL, 304 `Date` datetime NOT NULL, 305 `IP` text NOT NULL, 306 PRIMARY KEY (`ID`), 307 KEY `user` (`User`), 308 KEY `type` (`Type`), 309 KEY `date` (`Date`) 310 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=570788 ; 311 312 -- -------------------------------------------------------- 313 314 -- 315 -- Struktura tabulky `LogType` 316 -- 317 318 CREATE TABLE IF NOT EXISTS `LogType` ( 319 `Id` int(11) NOT NULL AUTO_INCREMENT, 320 `Name` varchar(255) NOT NULL, 321 `Color` varchar(255) NOT NULL, 322 `Description` varchar(255) NOT NULL, 323 PRIMARY KEY (`Id`) 324 ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=15 ; 325 326 -- -------------------------------------------------------- 327 328 -- 329 -- Struktura tabulky `News` 330 -- 331 332 CREATE TABLE IF NOT EXISTS `News` ( 333 `Id` int(11) NOT NULL AUTO_INCREMENT, 334 `Time` datetime NOT NULL, 335 `User` int(11) NOT NULL, 336 `Text` text NOT NULL, 337 PRIMARY KEY (`Id`), 338 KEY `Time` (`Time`) 339 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=41 ; 340 341 -- -------------------------------------------------------- 342 343 -- 344 -- Struktura tabulky `ShoutBox` 345 -- 346 347 CREATE TABLE IF NOT EXISTS `ShoutBox` ( 348 `ID` int(11) NOT NULL AUTO_INCREMENT, 349 `User` text NOT NULL, 350 `Text` text NOT NULL, 351 `Date` datetime NOT NULL, 352 `IP` text NOT NULL, 353 PRIMARY KEY (`ID`), 354 KEY `date` (`Date`) 355 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1087 ; 356 357 -- -------------------------------------------------------- 358 359 -- 360 -- Struktura tabulky `Team` 361 -- 362 363 CREATE TABLE IF NOT EXISTS `Team` ( 364 `Id` int(11) NOT NULL AUTO_INCREMENT, 365 `Name` varchar(255) CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 366 `Description` text CHARACTER SET utf8 COLLATE utf8_czech_ci NOT NULL, 367 `URL` varchar(255) NOT NULL, 368 `TimeCreate` datetime NOT NULL, 369 `Leader` int(11) NOT NULL, 370 PRIMARY KEY (`Id`), 371 KEY `Leader` (`Leader`), 372 KEY `TimeCreate` (`TimeCreate`) 373 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=38 ; 374 375 -- -------------------------------------------------------- 376 377 -- 378 -- Struktura tabulky `TextAchievement` 379 -- 380 381 CREATE TABLE IF NOT EXISTS `TextAchievement` ( 382 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 383 `Entry` int(11) NOT NULL, 384 `Language` int(11) NOT NULL DEFAULT '0', 385 `User` int(11) NOT NULL, 386 `Complete` int(11) NOT NULL, 387 `Take` int(11) NOT NULL, 388 `Name` text NOT NULL, 389 `Description` text NOT NULL, 390 `Reward` text NOT NULL, 391 `VersionStart` int(11) NOT NULL DEFAULT '8606', 392 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 393 PRIMARY KEY (`ID`), 394 KEY `entry` (`Entry`), 395 KEY `User` (`User`), 396 KEY `Take` (`Take`), 397 KEY `Language` (`Language`), 398 KEY `Complete` (`Complete`), 399 KEY `VersionStart` (`VersionStart`), 400 KEY `VersionEnd` (`VersionEnd`) 401 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2767 ; 402 403 -- -------------------------------------------------------- 404 405 -- 406 -- Struktura tabulky `TextAchievementCategory` 407 -- 408 409 CREATE TABLE IF NOT EXISTS `TextAchievementCategory` ( 410 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 411 `Entry` int(11) NOT NULL, 412 `Language` int(11) NOT NULL DEFAULT '0', 413 `User` int(11) NOT NULL, 414 `Complete` int(11) NOT NULL, 415 `Take` int(11) NOT NULL, 416 `Name` text NOT NULL, 417 `VersionStart` int(11) NOT NULL DEFAULT '8606', 418 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 419 PRIMARY KEY (`ID`), 420 KEY `entry` (`Entry`), 421 KEY `User` (`User`), 422 KEY `Take` (`Take`), 423 KEY `Language` (`Language`), 424 KEY `Complete` (`Complete`), 425 KEY `VersionStart` (`VersionStart`), 426 KEY `VersionEnd` (`VersionEnd`) 427 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=205 ; 428 429 -- -------------------------------------------------------- 430 431 -- 432 -- Struktura tabulky `TextAchievementCriteria` 433 -- 434 435 CREATE TABLE IF NOT EXISTS `TextAchievementCriteria` ( 436 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 437 `Entry` int(11) NOT NULL, 438 `Language` int(11) NOT NULL DEFAULT '0', 439 `User` int(11) NOT NULL, 440 `Complete` int(11) NOT NULL, 441 `Take` int(11) NOT NULL, 442 `Text` text NOT NULL, 443 `VersionStart` int(11) NOT NULL DEFAULT '8606', 444 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 445 PRIMARY KEY (`ID`), 446 KEY `entry` (`Entry`), 447 KEY `User` (`User`), 448 KEY `Take` (`Take`), 449 KEY `Language` (`Language`), 450 KEY `Complete` (`Complete`), 451 KEY `VersionStart` (`VersionStart`), 452 KEY `VersionEnd` (`VersionEnd`) 453 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10589 ; 454 455 -- -------------------------------------------------------- 456 457 -- 458 -- Struktura tabulky `TextAreaTriggerTavern` 459 -- 460 461 CREATE TABLE IF NOT EXISTS `TextAreaTriggerTavern` ( 462 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 463 `Entry` int(11) NOT NULL, 464 `Language` int(11) NOT NULL DEFAULT '0', 465 `User` int(11) NOT NULL, 466 `Complete` int(11) NOT NULL, 467 `Take` int(11) NOT NULL, 468 `Name` text NOT NULL, 469 `VersionStart` int(11) NOT NULL DEFAULT '8606', 470 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 471 PRIMARY KEY (`ID`), 472 KEY `entry` (`Entry`), 473 KEY `User` (`User`), 474 KEY `Take` (`Take`), 475 KEY `Language` (`Language`), 476 KEY `Complete` (`Complete`), 477 KEY `VersionStart` (`VersionStart`), 478 KEY `VersionEnd` (`VersionEnd`) 479 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=210 ; 480 481 -- -------------------------------------------------------- 482 483 -- 484 -- Struktura tabulky `TextAreaTriggerTeleport` 485 -- 486 487 CREATE TABLE IF NOT EXISTS `TextAreaTriggerTeleport` ( 488 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 489 `Entry` int(11) NOT NULL, 490 `Language` int(11) NOT NULL DEFAULT '0', 491 `User` int(11) NOT NULL, 492 `Complete` int(11) NOT NULL, 493 `Take` int(11) NOT NULL, 494 `Name` text NOT NULL, 495 `VersionStart` int(11) NOT NULL DEFAULT '8606', 496 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 497 PRIMARY KEY (`ID`), 498 KEY `entry` (`Entry`), 499 KEY `User` (`User`), 500 KEY `Take` (`Take`), 501 KEY `Language` (`Language`), 502 KEY `Complete` (`Complete`), 503 KEY `VersionStart` (`VersionStart`), 504 KEY `VersionEnd` (`VersionEnd`) 505 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=454 ; 506 507 -- -------------------------------------------------------- 508 509 -- 510 -- Struktura tabulky `TextCreature` 511 -- 512 513 CREATE TABLE IF NOT EXISTS `TextCreature` ( 514 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 515 `Entry` int(11) NOT NULL, 516 `name` text NOT NULL, 517 `subname` text NOT NULL, 518 `Language` int(11) NOT NULL DEFAULT '0', 519 `User` int(11) NOT NULL, 520 `Complete` int(11) NOT NULL, 521 `Take` int(11) NOT NULL, 522 `VersionStart` int(11) NOT NULL DEFAULT '8606', 523 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 524 PRIMARY KEY (`ID`), 525 KEY `entry` (`Entry`), 526 KEY `User` (`User`), 527 KEY `Take` (`Take`), 528 KEY `Complete` (`Complete`), 529 KEY `Language` (`Language`), 530 KEY `VersionStart` (`VersionStart`), 531 KEY `VersionEnd` (`VersionEnd`) 532 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=58460 ; 533 534 -- -------------------------------------------------------- 535 536 -- 537 -- Struktura tabulky `TextGameObject` 538 -- 539 540 CREATE TABLE IF NOT EXISTS `TextGameObject` ( 541 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 542 `Entry` int(11) NOT NULL, 543 `Name` text NOT NULL, 544 `castbarcaption` text NOT NULL, 545 `Language` int(11) NOT NULL DEFAULT '0', 546 `User` int(11) NOT NULL, 547 `Complete` int(11) NOT NULL, 548 `Take` int(11) NOT NULL, 549 `VersionStart` int(11) NOT NULL DEFAULT '8606', 550 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 551 PRIMARY KEY (`ID`), 552 KEY `entry` (`Entry`), 553 KEY `User` (`User`), 554 KEY `Take` (`Take`), 555 KEY `Complete` (`Complete`), 556 KEY `Language` (`Language`), 557 KEY `VersionStart` (`VersionStart`), 558 KEY `VersionEnd` (`VersionEnd`) 559 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=99412 ; 560 561 -- -------------------------------------------------------- 562 563 -- 564 -- Struktura tabulky `TextGameTip` 565 -- 566 567 CREATE TABLE IF NOT EXISTS `TextGameTip` ( 568 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 569 `Entry` int(11) NOT NULL, 570 `Text` text NOT NULL, 571 `Language` int(11) NOT NULL DEFAULT '0', 572 `User` int(11) NOT NULL, 573 `Complete` int(11) NOT NULL, 574 `Take` int(11) NOT NULL, 575 `VersionStart` int(11) NOT NULL DEFAULT '8606', 576 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 577 PRIMARY KEY (`ID`), 578 KEY `entry` (`Entry`), 579 KEY `User` (`User`), 580 KEY `Take` (`Take`), 581 KEY `Language` (`Language`), 582 KEY `Complete` (`Complete`), 583 KEY `VersionStart` (`VersionStart`), 584 KEY `VersionEnd` (`VersionEnd`) 585 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=416 ; 586 587 -- -------------------------------------------------------- 588 589 -- 590 -- Struktura tabulky `TextGlobalString` 591 -- 592 593 CREATE TABLE IF NOT EXISTS `TextGlobalString` ( 594 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 595 `Entry` int(11) NOT NULL, 596 `Language` int(11) NOT NULL DEFAULT '0', 597 `User` int(11) NOT NULL, 598 `Complete` int(11) NOT NULL, 599 `Take` int(11) NOT NULL, 600 `ShortCut` varchar(255) NOT NULL, 601 `Text` text NOT NULL, 602 `Comment` text NOT NULL, 603 `VersionStart` int(11) NOT NULL DEFAULT '8606', 604 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 605 PRIMARY KEY (`ID`), 606 KEY `entry` (`Entry`), 607 KEY `User` (`User`), 608 KEY `Take` (`Take`), 609 KEY `Language` (`Language`), 610 KEY `Complete` (`Complete`), 611 KEY `ShortCut` (`ShortCut`), 612 KEY `VersionStart` (`VersionStart`), 613 KEY `VersionEnd` (`VersionEnd`) 614 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=26762 ; 615 616 -- -------------------------------------------------------- 617 618 -- 619 -- Struktura tabulky `TextGlueString` 620 -- 621 622 CREATE TABLE IF NOT EXISTS `TextGlueString` ( 623 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 624 `Entry` int(11) NOT NULL, 625 `Language` int(11) NOT NULL DEFAULT '0', 626 `User` int(11) NOT NULL, 627 `Complete` int(11) NOT NULL, 628 `Take` int(11) NOT NULL, 629 `ShortCut` varchar(255) NOT NULL, 630 `Text` text NOT NULL, 631 `Comment` text NOT NULL, 632 `VersionStart` int(11) NOT NULL DEFAULT '8606', 633 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 634 PRIMARY KEY (`ID`), 635 KEY `entry` (`Entry`), 636 KEY `User` (`User`), 637 KEY `Take` (`Take`), 638 KEY `Language` (`Language`), 639 KEY `Complete` (`Complete`), 640 KEY `ShortCut` (`ShortCut`), 641 KEY `VersionStart` (`VersionStart`), 642 KEY `VersionEnd` (`VersionEnd`) 643 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2098 ; 644 645 -- -------------------------------------------------------- 646 647 -- 648 -- Struktura tabulky `TextItem` 649 -- 650 651 CREATE TABLE IF NOT EXISTS `TextItem` ( 652 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 653 `Entry` int(11) NOT NULL, 654 `Name` text NOT NULL, 655 `Description` text NOT NULL, 656 `Language` int(11) NOT NULL DEFAULT '0', 657 `User` int(11) NOT NULL, 658 `Complete` int(11) NOT NULL, 659 `Take` int(11) NOT NULL, 660 `VersionStart` int(11) NOT NULL DEFAULT '8606', 661 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 662 PRIMARY KEY (`ID`), 663 KEY `entry` (`Entry`), 664 KEY `User` (`User`), 665 KEY `Take` (`Take`), 666 KEY `Complete` (`Complete`), 667 KEY `Language` (`Language`), 668 KEY `VersionStart` (`VersionStart`), 669 KEY `VersionEnd` (`VersionEnd`) 670 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=70332 ; 671 672 -- -------------------------------------------------------- 673 674 -- 675 -- Struktura tabulky `TextMangosCommand` 676 -- 677 678 CREATE TABLE IF NOT EXISTS `TextMangosCommand` ( 679 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 680 `Entry` int(11) NOT NULL, 681 `help` text NOT NULL, 682 `Language` int(11) NOT NULL DEFAULT '0', 683 `User` int(11) NOT NULL, 684 `Complete` int(11) NOT NULL, 685 `Take` int(11) NOT NULL, 686 `Name` varchar(255) NOT NULL, 687 `VersionStart` int(11) NOT NULL DEFAULT '8606', 688 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 689 PRIMARY KEY (`ID`), 690 KEY `entry` (`Entry`), 691 KEY `User` (`User`), 692 KEY `Take` (`Take`), 693 KEY `Complete` (`Complete`), 694 KEY `Language` (`Language`), 695 KEY `Name` (`Name`), 696 KEY `VersionStart` (`VersionStart`), 697 KEY `VersionEnd` (`VersionEnd`) 698 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=853 ; 699 700 -- -------------------------------------------------------- 701 702 -- 703 -- Struktura tabulky `TextMangosString` 704 -- 705 706 CREATE TABLE IF NOT EXISTS `TextMangosString` ( 707 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 708 `Entry` int(11) NOT NULL, 709 `content_default` text NOT NULL, 710 `Language` int(11) NOT NULL DEFAULT '0', 711 `User` int(11) NOT NULL, 712 `Complete` int(11) NOT NULL, 713 `Take` int(11) NOT NULL, 714 `VersionStart` int(11) NOT NULL DEFAULT '8606', 715 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 716 PRIMARY KEY (`ID`), 717 KEY `entry` (`Entry`), 718 KEY `User` (`User`), 719 KEY `Take` (`Take`), 720 KEY `Complete` (`Complete`), 721 KEY `Language` (`Language`), 722 KEY `VersionStart` (`VersionStart`), 723 KEY `VersionEnd` (`VersionEnd`) 724 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=2404 ; 725 726 -- -------------------------------------------------------- 727 728 -- 729 -- Struktura tabulky `TextNPC` 730 -- 731 732 CREATE TABLE IF NOT EXISTS `TextNPC` ( 733 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 734 `Entry` int(11) NOT NULL, 735 `Text0_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 736 `Text0_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 737 `Text1_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 738 `Text1_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 739 `Text2_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 740 `Text2_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 741 `Text3_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 742 `Text3_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 743 `Text4_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 744 `Text4_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 745 `Text5_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 746 `Text5_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 747 `Text6_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 748 `Text6_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 749 `Text7_0` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 750 `Text7_1` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 751 `Language` int(11) NOT NULL DEFAULT '0', 752 `User` int(11) NOT NULL, 753 `Complete` int(11) NOT NULL, 754 `Take` int(11) NOT NULL, 755 `VersionStart` int(11) NOT NULL DEFAULT '8606', 756 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 757 PRIMARY KEY (`ID`), 758 KEY `entry` (`Entry`), 759 KEY `User` (`User`), 760 KEY `Take` (`Take`), 761 KEY `Complete` (`Complete`), 762 KEY `Language` (`Language`), 763 KEY `VersionStart` (`VersionStart`), 764 KEY `VersionEnd` (`VersionEnd`) 765 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=16781038 ; 766 767 -- -------------------------------------------------------- 768 769 -- 770 -- Struktura tabulky `TextNPCOption` 771 -- 772 773 CREATE TABLE IF NOT EXISTS `TextNPCOption` ( 774 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 775 `Entry` int(11) NOT NULL, 776 `Language` int(11) NOT NULL DEFAULT '0', 777 `User` int(11) NOT NULL, 778 `Complete` int(11) NOT NULL, 779 `Take` int(11) NOT NULL, 780 `OptionText` text NOT NULL, 781 `VersionStart` int(11) NOT NULL DEFAULT '8606', 782 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 783 PRIMARY KEY (`ID`), 784 KEY `entry` (`Entry`), 785 KEY `User` (`User`), 786 KEY `Take` (`Take`), 787 KEY `Language` (`Language`), 788 KEY `Complete` (`Complete`), 789 KEY `VersionStart` (`VersionStart`), 790 KEY `VersionEnd` (`VersionEnd`) 791 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=129 ; 792 793 -- -------------------------------------------------------- 794 795 -- 796 -- Struktura tabulky `TextPage` 797 -- 798 799 CREATE TABLE IF NOT EXISTS `TextPage` ( 800 `ID` int(11) NOT NULL AUTO_INCREMENT, 801 `Entry` int(11) NOT NULL, 802 `Text` text CHARACTER SET latin2 COLLATE latin2_czech_cs, 803 `Language` int(11) NOT NULL, 804 `User` int(11) NOT NULL, 805 `Complete` int(11) NOT NULL, 806 `Take` int(11) NOT NULL, 807 `VersionStart` int(11) NOT NULL DEFAULT '8606', 808 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 809 PRIMARY KEY (`ID`), 810 KEY `entry` (`Entry`), 811 KEY `User` (`User`), 812 KEY `Take` (`Take`), 813 KEY `Complete` (`Complete`), 814 KEY `Language` (`Language`), 815 KEY `VersionStart` (`VersionStart`), 816 KEY `VersionEnd` (`VersionEnd`) 817 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Item System' AUTO_INCREMENT=2469 ; 818 819 -- -------------------------------------------------------- 820 821 -- 822 -- Struktura tabulky `TextQuest` 823 -- 824 825 CREATE TABLE IF NOT EXISTS `TextQuest` ( 826 `ID` int(11) NOT NULL AUTO_INCREMENT, 827 `Entry` int(11) NOT NULL, 828 `Title` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 829 `Details` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 830 `Objectives` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 831 `OfferRewardText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 832 `RequestItemsText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 833 `EndText` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 834 `ObjectiveText1` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 835 `ObjectiveText2` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 836 `ObjectiveText3` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 837 `ObjectiveText4` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 838 `Language` int(11) NOT NULL DEFAULT '1', 839 `User` int(11) NOT NULL, 840 `Complete` int(11) NOT NULL DEFAULT '1', 841 `Take` int(11) NOT NULL, 842 `VersionStart` int(11) NOT NULL DEFAULT '8606', 843 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 844 PRIMARY KEY (`ID`), 845 KEY `entry` (`Entry`), 846 KEY `User` (`User`), 847 KEY `complete` (`Complete`), 848 KEY `Language` (`Language`), 849 KEY `VersionStart` (`VersionStart`), 850 KEY `VersionEnd` (`VersionEnd`) 851 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=14411 ; 852 853 -- -------------------------------------------------------- 854 855 -- 856 -- Struktura tabulky `TextSD2EventAI` 857 -- 858 859 CREATE TABLE IF NOT EXISTS `TextSD2EventAI` ( 860 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 861 `Entry` int(11) NOT NULL, 862 `content_default` text NOT NULL, 863 `comment` text NOT NULL, 864 `Language` int(11) NOT NULL DEFAULT '0', 865 `User` int(11) NOT NULL, 866 `Complete` int(11) NOT NULL, 867 `Take` int(11) NOT NULL, 868 `VersionStart` int(11) NOT NULL DEFAULT '8606', 869 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 870 PRIMARY KEY (`ID`), 871 KEY `entry` (`Entry`), 872 KEY `User` (`User`), 873 KEY `Take` (`Take`), 874 KEY `Complete` (`Complete`), 875 KEY `Language` (`Language`), 876 KEY `VersionStart` (`VersionStart`), 877 KEY `VersionEnd` (`VersionEnd`) 878 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=767 ; 879 880 -- -------------------------------------------------------- 881 882 -- 883 -- Struktura tabulky `TextSD2Script` 884 -- 885 886 CREATE TABLE IF NOT EXISTS `TextSD2Script` ( 887 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 888 `Entry` int(11) NOT NULL, 889 `content_default` text NOT NULL, 890 `comment` text NOT NULL, 891 `Language` int(11) NOT NULL DEFAULT '0', 892 `User` int(11) NOT NULL, 893 `Complete` int(11) NOT NULL, 894 `Take` int(11) NOT NULL, 895 `VersionStart` int(11) NOT NULL DEFAULT '8606', 896 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 897 PRIMARY KEY (`ID`), 898 KEY `entry` (`Entry`), 899 KEY `User` (`User`), 900 KEY `Take` (`Take`), 901 KEY `Complete` (`Complete`), 902 KEY `Language` (`Language`), 903 KEY `VersionStart` (`VersionStart`), 904 KEY `VersionEnd` (`VersionEnd`) 905 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1969 ; 906 907 -- -------------------------------------------------------- 908 909 -- 910 -- Struktura tabulky `TextSpell` 911 -- 912 913 CREATE TABLE IF NOT EXISTS `TextSpell` ( 914 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 915 `Entry` int(11) NOT NULL, 916 `Name` text NOT NULL, 917 `Description` text NOT NULL, 918 `ToolTip` text NOT NULL, 919 `Rank` text NOT NULL, 920 `Language` int(11) NOT NULL DEFAULT '0', 921 `User` int(11) NOT NULL, 922 `Complete` int(11) NOT NULL, 923 `Take` int(11) NOT NULL, 924 `VersionStart` int(11) NOT NULL DEFAULT '8606', 925 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 926 PRIMARY KEY (`ID`), 927 KEY `entry` (`Entry`), 928 KEY `User` (`User`), 929 KEY `Take` (`Take`), 930 KEY `Language` (`Language`), 931 KEY `Complete` (`Complete`), 932 KEY `VersionStart` (`VersionStart`), 933 KEY `VersionEnd` (`VersionEnd`) 934 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=67832 ; 935 936 -- -------------------------------------------------------- 937 938 -- 939 -- Struktura tabulky `TextTransport` 940 -- 941 942 CREATE TABLE IF NOT EXISTS `TextTransport` ( 943 `ID` int(11) unsigned NOT NULL AUTO_INCREMENT, 944 `Entry` int(11) NOT NULL, 945 `Language` int(11) NOT NULL DEFAULT '0', 946 `User` int(11) NOT NULL, 947 `Complete` int(11) NOT NULL, 948 `Take` int(11) NOT NULL, 949 `Name` text NOT NULL, 950 `VersionStart` int(11) NOT NULL DEFAULT '8606', 951 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 952 PRIMARY KEY (`ID`), 953 KEY `entry` (`Entry`), 954 KEY `User` (`User`), 955 KEY `Take` (`Take`), 956 KEY `Language` (`Language`), 957 KEY `Complete` (`Complete`), 958 KEY `VersionStart` (`VersionStart`), 959 KEY `VersionEnd` (`VersionEnd`) 960 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=43 ; 961 962 -- -------------------------------------------------------- 963 964 -- 965 -- Struktura tabulky `User` 966 -- 967 968 CREATE TABLE IF NOT EXISTS `User` ( 969 `ID` int(11) NOT NULL AUTO_INCREMENT, 970 `Name` varchar(64) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 971 `Pass` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 972 `Salt` varchar(255) COLLATE utf8_czech_ci NOT NULL, 973 `GM` int(11) NOT NULL DEFAULT '0', 974 `LastIP` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 975 `LastLogin` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', 976 `LastLogout` datetime DEFAULT NULL, 977 `Email` text CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL, 978 `Language` int(11) NOT NULL DEFAULT '1', 979 `XP` int(11) NOT NULL, 980 `TranslatedCount` int(11) NOT NULL, 981 `NeedUpdate` int(11) NOT NULL, 982 `Team` int(11) NOT NULL, 983 `Redirecting` int(11) NOT NULL, 984 `RegistrationTime` datetime DEFAULT NULL, 985 PRIMARY KEY (`ID`), 986 UNIQUE KEY `user` (`Name`), 987 KEY `team` (`Team`) 988 ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_czech_ci AUTO_INCREMENT=891 ; -
trunk/sql/text_table_init_structure.sql
r119 r376 1 CREATE TABLE IF NOT EXISTS ` text` (1 CREATE TABLE IF NOT EXISTS `Text` ( 2 2 `ID` int(11) unsigned NOT NULL auto_increment, 3 ` entry` int(11) NOT NULL,3 `Entry` int(11) NOT NULL, 4 4 `Language` int(11) NOT NULL default '0', 5 5 `User` int(11) NOT NULL, 6 6 `Complete` int(11) NOT NULL, 7 7 `Take` int(11) NOT NULL, 8 `VersionStart` int(11) NOT NULL DEFAULT '8606', 9 `VersionEnd` int(11) NOT NULL DEFAULT '8606', 8 10 PRIMARY KEY (`ID`), 9 KEY ` entry` (`entry`),11 KEY `Entry` (`Entry`), 10 12 KEY `User` (`User`), 11 13 KEY `Take` (`Take`), 12 14 KEY `Language` ( `Language` ), 13 15 KEY `Complete` ( `Complete` ) 16 KEY `VersionStart` (`VersionStart`), 17 KEY `VersionEnd` (`VersionEnd`) 14 18 ) ENGINE=MyISAM DEFAULT CHARSET=utf8; -
trunk/team.php
r365 r376 8 8 function ShowTeamList() 9 9 { 10 global $Config, $Database ;10 global $Config, $Database, $User; 11 11 12 12 echo('<h3>Seznam překladatelských týmů</h3>'); … … 26 26 array('Name' => 'TimeCreate', 'Title' => 'Datum založení'), 27 27 ); 28 if( Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce');28 if($User->Licence(LICENCE_USER)) $TableColumns[] = array('Name' => '', 'Title' => 'Uživatelské akce'); 29 29 30 30 $Order = GetOrderTableHeader($TableColumns, 'NumberUser', 1); 31 31 echo($Order['Output']); 32 32 33 if(array_key_exists('search', $_GET)) 33 if(array_key_exists('search', $_GET)) $_SESSION['search'] = ' WHERE `Name` LIKE "%'.$_GET['search'].'%" OR `Description` LIKE "%'.$_GET['search'].'%"'; 34 34 else if(!array_key_exists('search', $_SESSION)) $_SESSION['search'] = ''; 35 35 if (array_key_exists('search', $_GET) and ($_GET['search'] == '')) $_SESSION['search'] = ''; 36 /*37 if(array_key_exists('team', $_GET))38 {39 $_SESSION['team'] = $_GET['team'];40 if($_GET['team'] == '') $_SESSION['team'] = '';41 } else if(!array_key_exists('team', $_SESSION)) $_SESSION['team'] = '';42 43 if(is_numeric($_SESSION['team'])) $Where = ' WHERE '.$_SESSION['team'];44 else $Where = '';45 46 if(!is_numeric($_SESSION['team'])) echo(' <a href="?Where">Zrušit filtr týmů</a><br />');47 */48 $DbResult = $Database->SQLCommand('SELECT `Team` FROM `User` WHERE `ID`='.$_SESSION['UserID']);49 $User = mysql_fetch_assoc($DbResult);50 36 51 37 $ID = $Database->SQLCommand('SELECT *, (SELECT COUNT(*) FROM `User` WHERE `User`.`Team` = `Team`.`Id`) AS `NumberUser`, (SELECT `Name` FROM `User` WHERE `User`.`ID`=`Team`.`Leader`) AS `LeaderName` FROM `Team` '.$_SESSION['search'].$Order['SQL'].$PageList['SQLLimit']); … … 58 44 '<td><a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a></td>'. 59 45 '<td>'.HumanDate($Team['TimeCreate']).'</td>'); 60 if( Licence(LICENCE_USER))61 { 62 if($Team['Leader'] == $ _SESSION['UserID']) $Action = ' <a href="?action=modify&id='.$Team['Id'].'">Upravit</a>';46 if($User->Licence(LICENCE_USER)) 47 { 48 if($Team['Leader'] == $User->Id) $Action = ' <a href="?action=modify&id='.$Team['Id'].'">Upravit</a>'; 63 49 else $Action = ''; 64 if($Team['Id'] == $User ['Team']) $Action = ' <a href="?action=leave">Opustit</a>';50 if($Team['Id'] == $User->Team) $Action = ' <a href="?action=leave">Opustit</a>'; 65 51 echo('<td><a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit</a>'.$Action.'</td>'); 66 52 } … … 70 56 echo($PageList['Output']); 71 57 72 if( Licence(LICENCE_USER)) echo('<br /><div style="text-align: center;"><a href="?action=create">Vytvořit překladatelský tým</a></div>');58 if($User->Licence(LICENCE_USER)) echo('<br /><div style="text-align: center;"><a href="?action=create">Vytvořit překladatelský tým</a></div>'); 73 59 } 74 60 75 61 function TeamJoin() 76 62 { 77 global $Database ;78 79 if( Licence(LICENCE_USER))63 global $Database, $User; 64 65 if($User->Licence(LICENCE_USER)) 80 66 { 81 67 if(array_key_exists('id', $_GET)) 82 68 { 83 $Database->SQLCommand('UPDATE `User` SET `Team` = '.$_GET['id'].' WHERE `ID` = '.$ _SESSION['UserID']);69 $Database->SQLCommand('UPDATE `User` SET `Team` = '.$_GET['id'].' WHERE `ID` = '.$User->Id); 84 70 echo('<strong>Vstoupil jsi do týmu</strong><br /><br />'); 85 71 WriteLog('Uživatel vstoupil do týmu '.$_GET['id'], LOG_TYPE_USER); … … 98 84 function TeamCreateFinish() 99 85 { 100 global $Database ;101 102 if( Licence(LICENCE_USER))86 global $Database, $User; 87 88 if($User->Licence(LICENCE_USER)) 103 89 { 104 90 if(array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST)) … … 109 95 if(($Count == 0) and ($_POST['Name'] != '')) 110 96 { 111 $Database->SQLCommand('INSERT INTO `Team` (`Name` ,`Description`, `URL`, `TimeCreate`,`Leader`) VALUES ("'.trim($_POST['Name']).'", "'.trim($_POST['Description']).'", "'.$_POST['URL'].'", NOW(), '.$ _SESSION['UserID'].')');112 $Database->SQLCommand('UPDATE `User` SET `Team` = '.mysql_insert_id().' WHERE `ID` = '.$ _SESSION['UserID']);97 $Database->SQLCommand('INSERT INTO `Team` (`Name` ,`Description`, `URL`, `TimeCreate`,`Leader`) VALUES ("'.trim($_POST['Name']).'", "'.trim($_POST['Description']).'", "'.$_POST['URL'].'", NOW(), '.$User->Id.')'); 98 $Database->SQLCommand('UPDATE `User` SET `Team` = '.mysql_insert_id().' WHERE `ID` = '.$User->Id); 113 99 echo('<strong>Překladatelský tým vytvořen</strong><br /><br />'); 114 100 WriteLog('Překladatelský tým vytvořen '.$_POST['Name'], LOG_TYPE_USER); … … 124 110 function TeamModify() 125 111 { 126 global $Database ;127 128 if( Licence(LICENCE_USER))112 global $Database, $User; 113 114 if($User->Licence(LICENCE_USER)) 129 115 { 130 116 if(array_key_exists('id', $_GET)) 131 117 { 132 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$ _SESSION['UserID']);118 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$User->Id); 133 119 if(mysql_num_rows($DbResult) > 0) 134 120 { … … 148 134 function TeamModifyFinish() 149 135 { 150 global $Database ;151 152 if( Licence(LICENCE_USER))136 global $Database, $User; 137 138 if($User->Licence(LICENCE_USER)) 153 139 { 154 140 if(array_key_exists('id', $_GET) and array_key_exists('Name', $_POST) and array_key_exists('Description', $_POST) and array_key_exists('URL', $_POST)) 155 141 { 156 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$ _SESSION['UserID']);142 $DbResult = $Database->SQLCommand('SELECT * FROM `Team` WHERE `Id`='.$_GET['id'].' AND `Leader`='.$User->Id); 157 143 if(mysql_num_rows($DbResult) > 0) 158 144 { … … 175 161 function TeamCreate() 176 162 { 177 if(Licence(LICENCE_USER)) 163 global $User; 164 165 if($User->Licence(LICENCE_USER)) 178 166 { 179 167 echo('<form action="?action=finish_create" method="post">'. … … 189 177 function TeamShow() 190 178 { 191 global $Database, $TranslationTree ;179 global $Database, $TranslationTree, $User; 192 180 193 181 if(array_key_exists('id', $_GET)) … … 208 196 $Team['Description'].'<br /><br />'); 209 197 //echo('<a href="export/?team='.$Team['Id'].'">Exportovat překlad týmu</a> '); 210 if( Licence(LICENCE_USER)) echo('<a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit do týmu</a><br /><br />');198 if($User->Licence(LICENCE_USER)) echo('<a href="?action=gointeam&id='.$Team['Id'].'">Vstoupit do týmu</a><br /><br />'); 211 199 echo('<fieldset><legend>Statistika</legend>'. 212 200 'Počet členů týmu: <a href="userlist.php?team='.$Team['Id'].'" title="Zobrazit členy týmu">'.$Team['NumberUser'].'</a><br />'. … … 223 211 function TeamLeave() 224 212 { 225 global $Database ;226 227 if( Licence(LICENCE_USER))228 { 229 $Database->SQLCommand('UPDATE `User` SET `Team` = 0 WHERE `ID` = '.$ _SESSION['UserID']);213 global $Database, $User; 214 215 if($User->Licence(LICENCE_USER)) 216 { 217 $Database->SQLCommand('UPDATE `User` SET `Team` = 0 WHERE `ID` = '.$User->Id); 230 218 echo('<strong>Nyní nejste členem žádného týmu</strong><br /><br />'); 231 219 WriteLog('Uživatel vystoupil z týmu', LOG_TYPE_USER); -
trunk/user.php
r365 r376 5 5 ShowPage(); 6 6 7 if(array_key_exists('text', $_POST) and Licence(LICENCE_ADMIN))7 if(array_key_exists('text', $_POST) and $User->Licence(LICENCE_ADMIN)) 8 8 { 9 $ text = $_POST['text'];10 $ email = $_POST['email'];11 $ subject = $_POST['subject'];12 echo('Email: <strong>'.$ email.'</strong><br />');13 echo('Předmět: <strong>'.$ subject.'</strong><br />');14 echo('Text: <strong>'.$ text.'</strong><br />');9 $Text = $_POST['text']; 10 $Email = $_POST['email']; 11 $Subject = $_POST['subject']; 12 echo('Email: <strong>'.$Email.'</strong><br />'); 13 echo('Předmět: <strong>'.$Subject.'</strong><br />'); 14 echo('Text: <strong>'.$Text.'</strong><br />'); 15 15 16 if(@mail($ email, $subject, $text, 'From: '.$Config['Web']['AdminEmail'].'\nReply-To: '.$Config['Web']['AdminEmail'].'\nX-Mailer: PHP/'))16 if(@mail($Email, $Subject, $Text, 'From: '.$Config['Web']['AdminEmail'].'\nReply-To: '.$Config['Web']['AdminEmail'].'\nX-Mailer: PHP/')) 17 17 { 18 18 echo('Zpráva byla odeslána.<br /><br />'); 19 19 } 20 else 21 { 22 echo('Nepodařilo se odesat E-mail.<br /><br />'); 23 } 20 else echo('Nepodařilo se odesat E-mail.<br /><br />'); 24 21 } 25 22 26 if(array_key_exists('user', $_GET) and Licence(LICENCE_MODERATOR))23 if(array_key_exists('user', $_GET) and $User->Licence(LICENCE_MODERATOR)) 27 24 { 28 25 $Query = 'SELECT * FROM `User` WHERE `ID` = '.$_GET['user']; 29 $User = mysql_fetch_array($Database->SQLCommand($Query));26 $UserLine = mysql_fetch_array($Database->SQLCommand($Query)); 30 27 31 echo('ID: <strong>'.$User ['ID'].'</strong><br />');32 echo('Jméno: <strong>'.$User ['Name'].'</strong><br />');33 echo('Výchozí jazyk: <strong>'.$LanguageList[$User ['Language']]['Name'].'</strong><br />');34 echo('Poslední připojení: <strong>'.$User ['LastLogin'].'</strong><br />');35 echo('Poslední IP: <strong>'.$User ['LastIP'].'</strong><br />');36 echo('Počet přeložených: <a href="TranslationList.php?user='.$User ['ID'].'&action=userall" title="Zobrazit Všechny jeho přeložené texty"><strong>'.$User['TranslatedCount'].'</strong></a><br />');37 echo('Email: <strong>'.$User ['Email'].'</strong><br />');28 echo('ID: <strong>'.$UserLine['ID'].'</strong><br />'); 29 echo('Jméno: <strong>'.$UserLine['Name'].'</strong><br />'); 30 echo('Výchozí jazyk: <strong>'.$LanguageList[$UserLine['Language']]['Name'].'</strong><br />'); 31 echo('Poslední připojení: <strong>'.$UserLine['LastLogin'].'</strong><br />'); 32 echo('Poslední IP: <strong>'.$UserLine['LastIP'].'</strong><br />'); 33 echo('Počet přeložených: <a href="TranslationList.php?user='.$UserLine['ID'].'&action=userall" title="Zobrazit Všechny jeho přeložené texty"><strong>'.$UserLine['TranslatedCount'].'</strong></a><br />'); 34 echo('Email: <strong>'.$UserLine['Email'].'</strong><br />'); 38 35 echo('<br /> 39 36 40 37 <form action="user.php" method="post"><div> 41 38 Napsat E-mail: 42 <input type="text" name="email" value="'.$User ['Email'].'" />39 <input type="text" name="email" value="'.$UserLine['Email'].'" /> 43 40 Předmět: 44 41 <input type="text" name="subject" value="Projekt překládání textů WoW" /> … … 47 44 <textarea name="text" rows="20" cols="62"> 48 45 49 S pozdravem '.$ _SESSION['User'].'46 S pozdravem '.$User->Name.' 50 47 -------------------------------------------------------- 51 48 Projekt překládání textů WoW '.$Config['Web']['BaseURL'].' -
trunk/userlist.php
r365 r376 49 49 while($Line = mysql_fetch_assoc($ID)) 50 50 { 51 if( Licence(LICENCE_MODERATOR))51 if($User->Licence(LICENCE_MODERATOR)) 52 52 $Name = '<a href="user.php?user='.$Line['ID'].'">'.$Line['Name'].'</a>'; 53 53 else $Name = $Line['Name'];
Note:
See TracChangeset
for help on using the changeset viewer.