Ignore:
Timestamp:
Jun 19, 2009, 7:48:46 PM (16 years ago)
Author:
george
Message:
  • Přidáno: Kontrola správnosti zadaného id uživatele ve výpise úřekladů uživatele.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r192 r206  
    245245if($Action == 'userid')
    246246{
    247   $ID = $Database->SQLCommand('SELECT user FROM user WHERE id = '.$_GET['user']);
    248   $Line = mysql_fetch_row($ID);
    249   echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> ->
    250         <strong>Vypis překladů uživatele '.$Line[0].': </strong><br /><br />');
    251   if(array_key_exists('not', $_GET))
    252           WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User FROM '.$Table.' Where Complete = 0 AND user = '.$_GET['user'], '', 'userid');
    253   else
    254           WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User FROM '.$Table.' Where user = '.$_GET['user'], '', 'userid');
     247  $ID = $Database->SQLCommand('SELECT user FROM user WHERE id = '.($_GET['user'] * 1));
     248  if(mysql_num_rows($ID) > 0)
     249  {
     250    $Line = mysql_fetch_row($ID);
     251    echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> -> '.
     252      '<strong>Vypis překladů uživatele '.$Line[0].': </strong><br /><br />');
     253    if(array_key_exists('not', $_GET))
     254      WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User FROM '.$Table.' Where Complete = 0 AND user = '.$_GET['user'], '', 'userid');
     255    else WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User FROM '.$Table.' Where user = '.$_GET['user'], '', 'userid');
     256  } else echo('Nebyl nalezen uživatel se zadaným id');
    255257} else
    256258if($Action == 'search')
Note: See TracChangeset for help on using the changeset viewer.