Changeset 405 for trunk


Ignore:
Timestamp:
Mar 25, 2010, 6:51:11 AM (15 years ago)
Author:
george
Message:
  • Opraveno: Kontrola správnosti connexion id.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r378 r405  
    5959 
    6060  if(array_key_exists('connexion_id', $_GET)) $_SESSION['connexion_id'] = $_GET['connexion_id'];
    61 
    62   $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT `Name` FROM `connexion` WHERE `Id` = '.$_SESSION['connexion_id']));
    63     echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> ->
     61  if(array_key_exists('connexion_id', $_SESSION) and is_numeric($_SESSION['connexion_id']))
     62  {
     63    $DbResult = $Database->SQLCommand('SELECT `Name` FROM `connexion` WHERE `Id` = '.$_SESSION['connexion_id']);
     64    if(mysql_num_rows($DbResult) > 0)
     65    {
     66      $Line = mysql_fetch_assoc($DbResult);
     67      echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> ->
    6468        <a title="Zde je seznam souvislostí" href="?group='.$GroupId.'&amp;action=connexion">Souvislosti</a> - >
    6569        <strong>Vypsání souvislostí ze skupiny '.$Line['Name'].'</strong><br /><br />');
    6670
    67    WriteQuests('SELECT *, (SELECT `Sub`.`User` FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Entry` = `'.$Table.'`.`Entry`) AND (`Language` <> 0) LIMIT 1) AS `UserID`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `UserID`) AS `UserName` FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` IN(SELECT `Entry` FROM `connexion_item` WHERE `connexion` = '.$_SESSION['connexion_id'].')) AND (`VersionEnd` = "'.$BuildNumber_max.'") AND (`VersionEnd` = "'.$BuildNumber_max.'")');
     71       WriteQuests('SELECT *, (SELECT `Sub`.`User` FROM `'.$Table.'` AS `Sub` WHERE (`Sub`.`Entry` = `'.$Table.'`.`Entry`) AND (`Language` <> 0) LIMIT 1) AS `UserID`, (SELECT `User`.`Name` FROM `User` WHERE `User`.`ID` = `UserID`) AS `UserName` FROM `'.$Table.'` WHERE (`Language` = 0) AND (`Entry` IN(SELECT `Entry` FROM `connexion_item` WHERE `connexion` = '.$_SESSION['connexion_id'].')) AND (`VersionEnd` = "'.$BuildNumber_max.'") AND (`VersionEnd` = "'.$BuildNumber_max.'")');
     72    } else echo('Chybné id');
     73  } else echo('Chybné id');
    6874}
    6975
Note: See TracChangeset for help on using the changeset viewer.