$deviceLines)?$deviceLines:$limitLeft; } $eventsSql .= " limit $limitStart, $limitAmount"; } elseif ( !empty( $_REQUEST['limit'] ) ) { $eventsSql .= " limit 0, ".$_REQUEST['limit']; } $nEvents = dbFetchOne( $countSql, 'EventCount' ); if ( !empty($limit) && $nEvents > $_REQUEST['limit'] ) { $nEvents = $_REQUEST['limit']; } $pages = (int)ceil($nEvents/$deviceLines); $maxShortcuts = 3; $pagination = getPagination( $pages, $_REQUEST['page'], $maxShortcuts, $filterQuery.$sortQuery.'&limit='.$_REQUEST['limit'], '&' ); xhtmlHeaders( __FILE__, $SLANG['Events'] ); ?>