0) { $show = "keywords"; $keyurl = strtolower(str_replace(" ","-",$keyword)); $selectresult = mysql_query("SELECT * FROM `keywords` where `keyword` = '$keyword'"); $kfound = mysql_num_rows($selectresult); if ($kfound > 0) { $query = "SELECT * FROM `keywords` where `keyword` = '$keyword'"; $result = mysql_query($query) or die(mysql_error()); while ($line = mysql_fetch_array($result, MYSQL_ASSOC)) { foreach ($line as $col_value) { $x++; if ($x == 3) { $freq = $col_value; } } $x = 0; } $newfreq = $freq+1; mysql_query("UPDATE `keywords` SET `freq` = '$newfreq' WHERE `keyword` = '$keyword'") or die(mysql_error()); } else { mysql_query("INSERT INTO `keywords` VALUES ('', '$keyword', '1')"); } } } $listshow = "24"; if (!$show) { $show="new"; } if (!$page) { $page="1"; } if ($page > 1) { $pbit = " | Page $page"; } if ($show=="new") { $qby="id"; $qorder="desc"; $h2title="Recent Block Paving, Driveways & Patio Pictures"; $title="Recent Block Paving, Driveways & Patio Pictures"; $qex=""; $pagename="gallery/"; $pagequery = "SELECT * FROM `gallery`"; } elseif ($show=="keywords") { $qby="searchscore"; $qorder="desc"; $h2title="$keyword Pictures - Driveways & Block Paving"; $title="$keyword Pictures - Driveways & Block Paving"; $qex=""; $pagename="gallery/$keyurl-photos.html"; $pagequery = "SELECT *, MATCH(description, keywords) AGAINST ('$keyword' IN BOOLEAN MODE) AS `searchscore` FROM `gallery` WHERE MATCH(description, keywords) AGAINST ('$keyword' IN BOOLEAN MODE)"; } $st = 0; $tab = "gallery"; $title = "$title$pbit"; $desc = ""; $keywords = ""; include ('/home/mbdrive/public_html/inc/head.php'); $selectresult = mysql_query("$pagequery"); $filecount = mysql_num_rows($selectresult); $listshow2 = $listshow - 1; if ($page == 1) { $st = 0; } else { $st = ($page * $listshow) - $listshow; } $first = ($page * $listshow) - $listshow2; $last = ($page * $listshow); if ($last > $filecount) { $last = $filecount; } $pages = ceil($filecount/$listshow); ?>

1) { $prev = $page - 1; $next = $page + 1; if ($page != "1") { print "\"\" Previous\n"; if ($next <= $pages) { print "   |   "; } } if ($next <= $pages) { print "Next \"\"\n"; } } ?>