Changeset 365 for trunk/form.php
- Timestamp:
- Mar 9, 2010, 11:29:05 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/form.php
r321 r365 17 17 if(!$Line) die('Překlad nenalezen.'); 18 18 19 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE `Language` = 0 AND ` entry` = '.$Line['entry'].' AND `VersionEnd` = '.$Line['VersionEnd'].' LIMIT 1');19 $DbResult = $Database->SQLCommand('SELECT * FROM `'.$Table.'` WHERE `Language` = 0 AND `Entry` = '.$Line['Entry'].' AND `VersionEnd` = '.$Line['VersionEnd'].' LIMIT 1'); 20 20 $LineAJ = mysql_fetch_assoc($DbResult); 21 21 if(!$Line) die('Anglický originál k překladu nenalezen.'); 22 22 23 23 $User = @$_SESSION['User']; 24 $IDUser = $Database->SQLCommand('SELECT * FROM ` user` WHERE `id` = '.$Line['User']);24 $IDUser = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$Line['User']); 25 25 $LineUser = mysql_fetch_array($IDUser); 26 26 27 27 echo('Skupina: <strong>'.$TranslationTree[$GroupId]['Name'].'</strong><br />'); 28 28 29 if(($Line['Language'] <> 0) and ($LineUser[' user'] <> ''))30 echo('Přeložil: <strong>'.$LineUser[' user'].'</strong> <br />');29 if(($Line['Language'] <> 0) and ($LineUser['Name'] <> '')) 30 echo('Přeložil: <strong>'.$LineUser['Name'].'</strong> <br />'); 31 31 if(($Line['Take'] <> 0) and ($Line['Take'] <> $Line['ID'])) 32 32 { … … 47 47 echo('<br />'); 48 48 49 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `'.$Table.'` WHERE ` entry` = '.$Line['entry'].' AND `Language` <> 0');49 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `'.$Table.'` WHERE `Entry` = '.$Line['Entry'].' AND `Language` <> 0'); 50 50 $Version = mysql_fetch_row($DbResult); 51 51 $Version = $Version[0]; 52 52 if($Version > 0) 53 53 { 54 echo('<form action="comparison.php" method="get"><a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line[' entry'].'">Počet verzí: <strong>'.$Version.'</strong></a>54 echo('<form action="comparison.php" method="get"><a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['Entry'].'">Počet verzí: <strong>'.$Version.'</strong></a> 55 55 <input type="hidden" name="group" value="'.$GroupId.'" /> 56 <input type="hidden" name="entry" value="'.$Line[' entry'].'" />56 <input type="hidden" name="entry" value="'.$Line['Entry'].'" /> 57 57 <input type="hidden" name="ID2" value="'.$TextID.'" /> 58 58 <select onchange="this.form.submit();" name="ID1"> 59 59 <option value="-1">Vyberte text k porovnání</option> 60 60 <option value="-1">Zobrazit/porovnat všechny</option>'); 61 $DataID = $Database->SQLCommand('SELECT *, (SELECT ` user`.`user` FROM `user` WHERE `user`.`id` = `'.$Table.'`.`user`) AS `User` FROM `'.$Table.'` WHERE (`entry` = '.$Line['entry'].') AND (`ID` <> '.$Line['ID'].')');61 $DataID = $Database->SQLCommand('SELECT *, (SELECT `User`.`Name` AS `UserName` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`ID` <> '.$Line['ID'].')'); 62 62 while($version = mysql_fetch_array($DataID)) 63 63 { … … 65 65 else 66 66 { 67 if($version['Language'] == 0) $version['User '] = 'Předloha';68 echo('<option value="'.$version['ID'].'">'.$version['ID'].' - '.$Version['User '].' ('.GetVersionWOW($version['VersionStart']).' - '.GetVersionWOW($version['VersionEnd']).')</option>');67 if($version['Language'] == 0) $version['UserName'] = 'Předloha'; 68 echo('<option value="'.$version['ID'].'">'.$version['ID'].' - '.$Version['UserName'].' ('.GetVersionWOW($version['VersionStart']).' - '.GetVersionWOW($version['VersionEnd']).')</option>'); 69 69 } 70 70 } … … 72 72 } else 73 73 { 74 echo('<a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line[' entry'].'">Počet verzí: <strong>'.$Version.'</strong></a>');74 echo('<a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['Entry'].'">Počet verzí: <strong>'.$Version.'</strong></a>'); 75 75 } 76 76 … … 87 87 88 88 if($TranslationTree[$GroupId]['WowheadName'] != '') 89 $WowheadLink = '<a href="http://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].'='.$LineAJ[' entry'].'">'.$LineAJ['entry'].'</a>';90 else $WowheadLink = $LineAJ[' entry'];89 $WowheadLink = '<a href="http://www.wowhead.com/?'.$TranslationTree[$GroupId]['WowheadName'].'='.$LineAJ['Entry'].'">'.$LineAJ['Entry'].'</a>'; 90 else $WowheadLink = $LineAJ['Entry']; 91 91 92 echo('<input type="hidden" name="entry" value="'.$LineAJ[' entry'].'" />92 echo('<input type="hidden" name="entry" value="'.$LineAJ['Entry'].'" /> 93 93 <input type="hidden" name="user" value="'.$User.'" /> 94 94 <input type="hidden" name="ID" value="'.$TextID.'" /> … … 107 107 else if($_SESSION['UserID'] != '') 108 108 { 109 $IDUser = $Database->SQLCommand('SELECT * FROM ` user` WHERE `id` = '.$_SESSION['UserID']);109 $IDUser = $Database->SQLCommand('SELECT * FROM `User` WHERE `ID` = '.$_SESSION['UserID']); 110 110 $LineUser = mysql_fetch_array($IDUser); 111 $Language = $LineUser['Language']; // jiný user vyčítám111 $Language = $LineUser['Language']; // jiný user vyčítám 112 112 } else $Language = 0; 113 113 WriteLanguages($Language);
Note:
See TracChangeset
for help on using the changeset viewer.