// Get number of menu entries
$max = SQL_NUMROWS($result);
- if ($max > 0)
- {
+ if ($max > 0) {
// Set sub value
define('__SUB_VALUE', $SUB);
- $SW = 2; $cnt = 0; $OUT = "";
- while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result))
- {
+ // Init variables
+ $SW = 2;
+ $cnt = 0;
+ $OUT = "";
+
+ while (list($id, $act, $wht, $title, $sort) = SQL_FETCHROW($result)) {
$cnt++;
if (($sort == 0) || (($sort == 1) && (!empty($SUB)))) {
// Is highest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
} elseif ($cnt == $max) {
// Is lowest position
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>";
} elseif ($sort > 0) {
// Anything else between highest and lowest
- $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{!HIGHER!}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub=".__SUB_VALUE."&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{!LOWER!}</a>";
+ $NAVI = "<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort-1)."&fid=".$sort."\">{--HIGHER--}</a>/<a href=\"{!URL!}/modules.php?module=admin&what=guestedit&sub={!__SUB_VALUE!}&act=".$act."&w=".$wht."&tid=".($sort+1)."&fid=".$sort."\">{--LOWER--}</a>";
}
- if (empty($act)) $act = " ";
+ if (empty($act)) $act = " ";
if (empty($wht)) $wht = " ";
- if (empty($title)) $title = " ";
+ if (empty($title)) $title = " ";
$content = array(
'sw' => $SW,
'id' => $id,