Changeset 158 for trunk/includes/global_function.php
- Timestamp:
- Mar 18, 2009, 8:35:25 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r148 r158 85 85 function WriteLanguagesWithoutSel($Selected) 86 86 { 87 if ($Selected == '0') echo('Původní verze jazyka'); 88 if ($Selected == '1') echo('Českého jazyka'); 89 if ($Selected == '2') echo('Slovenského jazyka'); 90 if ($Selected == '3') echo('Jiného jazyka'); 91 87 if($Selected == '0') echo('Původní verze jazyka'); 88 if($Selected == '1') echo('Českého jazyka'); 89 if($Selected == '2') echo('Slovenského jazyka'); 90 if($Selected == '3') echo('Jiného jazyka'); 92 91 } 93 92 … … 187 186 global $Database; 188 187 189 if ($Prev) { 190 $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND 191 NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) 192 AND ID < '.$TextID.' ORDER BY ID DESC LIMIT 1'; 193 } else { 194 $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND 195 NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) 196 AND ID > '.$TextID.' ORDER BY ID LIMIT 1'; 197 } 188 if($Prev) 189 { 190 $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) AND ID < '.$TextID.' ORDER BY ID DESC LIMIT 1'; 191 } else 192 { 193 $sql = 'SELECT ID FROM '.$Table.' as item WHERE Language = 0 AND NOT EXISTS(SELECT entry FROM '.$Table.' AS sub WHERE sub.Language <> 0 AND sub.entry = item.entry) AND ID > '.$TextID.' ORDER BY ID LIMIT 1'; 194 } 198 195 199 196 $Next = mysql_fetch_array($Database->SQLCommand($sql)); 200 if (!$Next) {} else { 201 if ($Prev) 202 echo('<a href="form.php?group='.$GroupId.'&ID='.$Next['ID'].'">Předcházející '.$Next['ID'].'</a> '); 203 else 204 echo('<a href="form.php?group='.$GroupId.'&ID='.$Next['ID'].'">Následující '.$Next['ID'].'</a> '); 205 206 } 207 197 if(!$Next) {} else 198 { 199 if($Prev) echo('<a href="form.php?group='.$GroupId.'&ID='.$Next['ID'].'">Předcházející '.$Next['ID'].'</a> '); 200 else echo('<a href="form.php?group='.$GroupId.'&ID='.$Next['ID'].'">Následující '.$Next['ID'].'</a> '); 201 } 208 202 } 209 203
Note:
See TracChangeset
for help on using the changeset viewer.