Changeset 148 for trunk/includes
- Timestamp:
- Mar 8, 2009, 8:33:08 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global_function.php
r136 r148 183 183 } 184 184 185 function FollowingTran($TextID,$Table,$GroupId, $Prev = false) { 186 187 global $Database; 188 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 } 198 199 $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 208 } 185 209 186 210 ?>
Note:
See TracChangeset
for help on using the changeset viewer.