Ignore:
Timestamp:
Apr 8, 2010, 8:49:29 PM (15 years ago)
Author:
george
Message:
  • Opraveno: Zobrazovat v nabídce ostatních variant překladů jen dokončené a nezobrazovat vlastní překlad.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r430 r431  
    263263function SearchEntry()
    264264{
    265   global $Table;
     265  global $Table, $System;
    266266 
    267267  if(array_key_exists('ID', $_GET) and is_numeric($_GET['ID'])) $Search = $_GET['ID'];
    268268  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
    273277   
    274   WriteQuests($sql);
     278    WriteQuests($sql);
     279  } else echo('Položka nenalezena');
    275280}
    276281
Note: See TracChangeset for help on using the changeset viewer.