Ignore:
Timestamp:
Aug 25, 2009, 1:47:56 PM (15 years ago)
Author:
maron
Message:

Souvislosti u překladů

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/TranslationList.php

    r254 r279  
    77$TranslationItemPerPage = 200;
    88if(array_key_exists('group', $_GET)) $GroupId = $_GET['group'] * 1; else $GroupId = 1;
     9if(array_key_exists('connexion_id', $_GET)) {
     10  $_SESSION['connexion_id'] = $_GET['connexion_id'];
     11}
    912$DbResult = $Database->SQLCommand('SELECT Id FROM `group` WHERE `Id`='.$GroupId);
    1013if(mysql_num_rows($DbResult) == 0)
     
    133136
    134137  WritePages('?group='.$GroupId.'&action=notran', 'AS items WHERE items.Language = 0 AND
    135     NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = items.entry AND VersionEnd = "'.$BuildNumber_max.'")  AND VersionEnd = "'.$BuildNumber_max.'"');
     138    NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = items.entry AND VersionEnd = "'.$BuildNumber_max.'"  AND VersionEnd = "'.$BuildNumber_max.'")');
    136139
    137140  WriteQuests('SELECT * FROM '.$Table.' AS items WHERE (items.Language = 0) AND
    138     NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = items.entry)  AND VersionEnd = "'.$BuildNumber_max.'") AND VersionEnd = "'.$BuildNumber_max.'"', $_SESSION['limitx'].','.$_SESSION['limity'], 'notran');
     141    NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = items.entry)  AND VersionEnd = "'.$BuildNumber_max.'" AND VersionEnd = "'.$BuildNumber_max.'")', $_SESSION['limitx'].','.$_SESSION['limity'], 'notran');
     142} else
     143if($Action == 'connexion')
     144{ //SELECT * FROM spell WHERE entry IN(SELECT entry FROM connexion_item WHERE connexion = 1)
     145        $Line = mysql_fetch_assoc($Database->SQLCommand('SELECT Name FROM connexion WHERE `Id` = '.$_SESSION['connexion_id']));
     146    echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> ->
     147        <a title="Zde je seznam souvislostí" href="?group='.$GroupId.'&amp;action=connexion">Souvislosti</a> - >
     148        <strong>Vypsání souvislostí ze skupiny '.$Line['Name'].'</strong><br /><br />');
     149
     150    WritePages('?group='.$GroupId.'&amp;action=connexion', ' WHERE Language = 0 AND entry IN(SELECT entry FROM connexion_item WHERE connexion = '.$_SESSION['connexion_id'].') AND VersionEnd = "'.$BuildNumber_max.'" AND VersionEnd = "'.$BuildNumber_max.'"');
     151    WriteQuests('SELECT * 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.'"', $_SESSION['limitx'].','.$_SESSION['limity'], 'connexion');
     152
     153} else
     154if($Action == 'connexion_list')
     155{ //SELECT * FROM spell WHERE entry IN(SELECT entry FROM connexion_item WHERE connexion = 1)
     156    echo('<a title="Zobrazit texty podle vlastního filtru" href="?group='.$GroupId.'&amp;action=filter">Filtr textů</a> ->
     157        <a title="Zde je seznam souvislostí" href="?group='.$GroupId.'&amp;action=connexion">Souvislosti</a> - >
     158        <strong>Vypsání souvislostí</strong><br /><br />');
     159    echo('<table class="BaseTable"><tr><th>Pořadové číslo</th><th>Název</th>');
     160    echo('</tr>');
     161    $ID = $Database->SQLCommand('SELECT * FROM connexion WHERE  `Group` = '.$GroupId);       
     162    while($Line = mysql_fetch_assoc($ID))
     163    {
     164      echo('<tr><td><a href="?group='.$GroupId.'&amp;action=connexion&amp;connexion_id='.$Line['Id'].'">'.$Line['Id'].'</a></td>
     165      <td>'.$Line['Name'].'</td>');
     166    }
     167        echo ('</table>');
    139168} else
    140169if($Action == 'nocomplete')
Note: See TracChangeset for help on using the changeset viewer.