Changeset 431
- Timestamp:
- Apr 8, 2010, 8:49:29 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r430 r431 263 263 function SearchEntry() 264 264 { 265 global $Table ;265 global $Table, $System; 266 266 267 267 if(array_key_exists('ID', $_GET) and is_numeric($_GET['ID'])) $Search = $_GET['ID']; 268 268 else if(array_key_exists('ID', $_POST) and is_numeric($_POST['ID'])) $Search = $_POST['ID']; 269 else $Search = ''; 270 271 $sql = 'SELECT *, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` LIKE "'.$Search.'")'. 272 ' AND ((`Language` = 0) OR ((`Complete` = 1) AND (`Language` != 0)))'; // Do not show uncompleted user translation 269 else ErrorMessage('Nebylo zadáno ID položky'); 270 271 $DbResult = $System->Database->query('SELECT `Entry` FROM `'.$Table.'` WHERE `ID`='.$Search); 272 if($DbResult->num_rows > 0) 273 { 274 $DbRow = $DbResult->fetch_assoc(); 275 $sql = 'SELECT *, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `'.$Table.'`.`User`) AS `UserName` FROM `'.$Table.'` WHERE (`Entry` = '.$DbRow['Entry'].')'. 276 ' AND (`Complete` = 1) AND (`Language` != 0) AND (`ID` != '.$Search.')'; // Do not show uncompleted user translation 273 277 274 WriteQuests($sql); 278 WriteQuests($sql); 279 } else echo('Položka nenalezena'); 275 280 } 276 281 -
trunk/form.php
r420 r431 63 63 echo('<br />'); 64 64 65 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `'.$Table.'` WHERE `Entry` = '.$Line['Entry'].' AND `Language` <> 0');65 $DbResult = $Database->SQLCommand('SELECT COUNT(*) FROM `'.$Table.'` WHERE (`Entry` = '.$Line['Entry'].') AND (`Language` <> 0) AND (`Complete` = 1) AND (`ID` <> '.$Line['ID'].')'); 66 66 $Version = mysql_fetch_row($DbResult); 67 67 $Version = $Version[0]; 68 68 if($Version > 0) 69 69 { 70 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>70 echo('<form action="comparison.php" method="get"><a href="TranslationList.php?group='.$GroupId.'&action=searchentry&ID='.$Line['ID'].'">Počet verzí: <strong>'.$Version.'</strong></a> 71 71 <input type="hidden" name="group" value="'.$GroupId.'" /> 72 72 <input type="hidden" name="entry" value="'.$Line['Entry'].'" /> … … 75 75 <option value="-1">Vyberte text k porovnání</option> 76 76 <option value="-1">Zobrazit/porovnat všechny</option>'); 77 $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'].') ');77 $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'].') AND (`Complete` = 1)'); 78 78 while($version = mysql_fetch_array($DataID)) 79 79 {
Note:
See TracChangeset
for help on using the changeset viewer.