Changeset 58 for trunk/TranslationList.php
- Timestamp:
- Feb 3, 2009, 8:26:12 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TranslationList.php
r57 r58 67 67 global $Database, $order, $desc, $TranslationTree, $GroupId, $Table; 68 68 69 // Check if order column exists 70 $Items = $TranslationTree[$GroupId]['Items']; 71 $I = 0; 72 while(($I < count($Items)) and ($Items[$I]['MangosColumn'] != $order)) $I++; 73 if($I >= count($Items)) $order = 'ID'; 74 69 75 if($limit <> '') $limit = 'LIMIT '.$limit; 70 76 … … 78 84 $desc = ''; 79 85 } 80 86 81 87 echo('<table border="1" cellpadding="2" cellspacing="0"><tr> 82 88 <th><a href="?group='.$GroupId.'&action='.$address.'&order=ID&desc='.$desc.'">Pořadové číslo</a></th> 83 89 <th><a href="?group='.$GroupId.'&action='.$address.'&order=entry&desc='.$desc.'">Identifikační číslo</a></th> 84 <th><a href="?group='.$GroupId.'&action='.$address.'&order= Title&desc='.$desc.'">Název</a></th>');90 <th><a href="?group='.$GroupId.'&action='.$address.'&order='.$TranslationTree[$GroupId]['Items'][0]['Column'].'&desc='.$desc.'">Název</a></th>'); 85 91 if ($address == 'selection') echo('<th><a href="?group='.$GroupId.'&action='.$address.'&order=CountQuests&desc='.$desc.'">Výskyt</a></th>'); 86 92 else if($address <> 'notran') echo('<th><a href="?group='.$GroupId.'&action='.$address.'&order=user&desc='.$desc.'">Uživatel</a></th> … … 112 118 <strong>Vypsání nepřeložených textů s limitem na stránku</strong><br /><br />'); 113 119 114 WritePages('?group='.$GroupId.'&action=notran', ' items WHERE items.Language = 0 AND115 NOT EXISTS(SELECT 1 FROM '.$Table.' sub WHERE sub.Language <> 0 AND sub.entry = items.entry)');116 117 WriteQuests('SELECT * FROM '.$Table.' items WHERE items.Language = 0AND118 NOT EXISTS(SELECT 1 FROM '.$Table.' sub WHERE sub.Language <> 0 AND sub.entry = items.entry) ', $_SESSION['limitx'].','.$_SESSION['limity'], 'notran');120 WritePages('?group='.$GroupId.'&action=notran', 'AS items WHERE items.Language = 0 AND 121 NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = items.entry)'); 122 123 WriteQuests('SELECT * FROM '.$Table.' AS items WHERE (items.Language = 0) AND 124 NOT EXISTS(SELECT 1 FROM '.$Table.' AS sub WHERE (sub.Language <> 0) AND (sub.entry = items.entry)) ', $_SESSION['limitx'].','.$_SESSION['limity'], 'notran'); 119 125 } 120 126 … … 151 157 152 158 WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User 153 FROM '.$Table.' WHERE Language <> 0 AND '.$Table.'.Complete = 1 AND admin_check = 1', $_SESSION['limitx'].','.$_SESSION['limity'], 'admin_check');159 FROM '.$Table.' WHERE (Language <> 0) AND ('.$Table.'.Complete = 1) AND (admin_check = 1)', $_SESSION['limitx'].','.$_SESSION['limity'], 'admin_check'); 154 160 } 155 161 … … 162 168 163 169 WriteQuests('SELECT *, (SELECT user.user FROM user WHERE user.id = '.$Table.'.user) as User 164 FROM '.$Table.' WHERE Language <> 0 AND '.$Table.'.Complete = 1 AND admin_check <> 1', $_SESSION['limitx'].','.$_SESSION['limity'], 'admin_nocheck');170 FROM '.$Table.' WHERE (Language <> 0) AND ('.$Table.'.Complete = 1) AND (admin_check <> 1)', $_SESSION['limitx'].','.$_SESSION['limity'], 'admin_nocheck'); 165 171 } 166 172
Note:
See TracChangeset
for help on using the changeset viewer.