Changeset 286 for trunk/dictionary.php
- Timestamp:
- Dec 22, 2009, 10:22:38 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dictionary.php
r284 r286 41 41 foreach($TablesColumn as $Table => $Column) 42 42 { 43 $sql = 'SELECT ID,'.$Column.',(SELECT Name FROM '.$Table.' as T WHERE O.entry = T.entry AND Language <> 0 LIMIT 1) as tran FROM '.$Table.' as OWHERE ';44 $groupby = ' GROUP BY '.$Column;43 $sql = 'SELECT `ID`,'.$Column.',(SELECT `Name` FROM '.$Table.' AS `T` WHERE `O`.`entry` = `T`.`entry` AND `Language` <> 0 LIMIT 1) AS `tran` FROM `'.$Table.'` AS `O` WHERE '; 44 $groupby = ' GROUP BY `'.$Column.'`'; 45 45 46 46 $ArrStr = explode(' ', $Text); … … 87 87 } 88 88 89 if(array_key_exists('Page', $_GET)) $_SESSION['Page'] = $_GET['Page']; 90 else if(!array_key_exists('Page', $_SESSION)) $_SESSION['Page'] = 1; 89 ShowPage(); 91 90 92 91 if(!isset($_SESSION['language'])) … … 94 93 if(Licence(LICENCE_USER)) 95 94 { 96 $DbResult = $Database->SQLCommand('SELECT Language FROM user WHERE ID='.$_SESSION['UserID']);95 $DbResult = $Database->SQLCommand('SELECT `Language` FROM `user` WHERE `ID`='.$_SESSION['UserID']); 97 96 $User = mysql_fetch_assoc($DbResult); 98 97 $_SESSION['language'] = $User['Language']; 99 98 } else $_SESSION['language'] = 1; 100 99 } 101 if(array_key_exists('language', $_GET)) $_SESSION['language'] = $_GET['language']; 102 103 ShowPage(); 100 if(array_key_exists('language', $_GET)) $_SESSION['language'] = LoadLanguageIdParameter(); 104 101 105 102 echo('<h3>Slovníček</h3>'); 106 103 107 104 if(array_key_exists('group', $_GET)) 108 105 { 109 if(array_key_exists('group', $_GET)) $GroupId = $_GET['group']; else $GroupId = 1;106 $GroupId = LoadGroupIdParameter(); 110 107 if(array_key_exists('mode', $_GET)) $mode = $_GET['mode']; else $mode = 0; //0 = přesné názvy, 1=všechny názvy, 2=nepřeložené 111 108 $Table = $TranslationTree[$GroupId]['TablePrefix']; … … 227 224 echo($PageList['Output']); 228 225 echo('<table width="98%" class="BaseTable"> 229 <tr><th> '.$LanguageList[0]['Name'].'</th>226 <tr><th>Angličtina</th> 230 227 <th>'.$LanguageList[$_SESSION['language']]['Name'].'</th> 231 228 <th>Popis</th><th>Překladatel</th>'); … … 233 230 echo('</tr>'); 234 231 $ID = $Database->SQLCommand($sql_page); 235 while 232 while($Line = mysql_fetch_assoc($ID)) 236 233 { 237 234 echo('<tr>
Note:
See TracChangeset
for help on using the changeset viewer.