require ("config.inc"); ?> # Set starting value $iOffset = 20; if ($start == "" || $start < 0) : $start = 0; endif; if ($searchwhat <> "") : $sqlSearchResult = mysql_query("select * from Jobs where $searchwhat like '%$searchfor%' and active = '1' order by date_submitted desc"); $sqlSearchRowNum = mysql_numrows($sqlSearchResult); $sqlSearchResultSet = mysql_query("select * from Jobs where $searchwhat like '%$searchfor%' and active = '1' order by date_submitted desc limit $start, $iOffset"); $sqlSearchRowNumSet = mysql_numrows($sqlSearchResultSet); else : $sqlSearchResult = mysql_query("select * from Jobs where active = '1' order by date_submitted desc"); $sqlSearchRowNum = mysql_numrows($sqlSearchResult); $sqlSearchResultSet = mysql_query("select * from Jobs where active = '1' order by date_submitted desc limit $start, $iOffset"); $sqlSearchRowNumSet = mysql_numrows($sqlSearchResultSet); endif; $iJumpForward = $start + $iOffset; $iJumpBackward = $start - $iOffset; if ($sqlSearchRowNum == $sqlSearchRowNumSet) : $iLastPage = 1; endif; if ($start + $iOffset == $sqlSearchRowNum) : $iLastPage = 1; endif; if ($start + $iOffset - 1 >= $sqlSearchRowNum) : $iLastPage = 1; endif; ?>
|
|||||||||||||||||||||||||||||||||||