//********************************************
//** DYNAMIC PAGE TITLES **
//********************************************
switch ($page)
{
case "home" :
$page_title='Fish Captures - The Worlds Largest Free Online Fishing Diary and Fishing Photos Database';
//$h1='Log fish capture data, upload fish photos and search the world’s largest FREE online fishing diary';
$h1='Upload fishing photos, keep your own fishing journal, find fishing venues, create fishing reports and more';
$keywords=$default_keywords;
$description=$default_description;
$page_title=$default_page_title;
$h1=$default_h1;
break;
case "capture_details" :
if (GetFromDB('c_bait_brand','captures','c_ID',$_GET['c_ID']))
$ifBait=' on '.GetFromDB('c_bait_brand','captures','c_ID',$_GET['c_ID']);
$keywords=$default_keywords;
$description=$default_description;
$page_title=GetFromDB('full_name','users','user_ID',GetFromDB('c_user_ID','captures','c_ID',$_GET['c_ID'])).'’s Fishing Diary - '.GetFromDB('c_species','captures','c_ID',$_GET['c_ID']).' Fishing at '.GetFromDB('c_venue','captures','c_ID',$_GET['c_ID']).', '.GetFromDB('c_town','captures','c_ID',$_GET['c_ID']).$ifBait;
//$page_title=htmlspecialchars($page_title);
$h1=GetFromDB('full_name','users','user_ID',GetFromDB('c_user_ID','captures','c_ID',$_GET['c_ID'])).'’s Fishing Diary - '.GetFromDB('c_species','captures','c_ID',$_GET['c_ID']).' Fishing at '.GetFromDB('c_venue','captures','c_ID',$_GET['c_ID']).', '.GetFromDB('c_town','captures','c_ID',$_GET['c_ID']);
//$h1=htmlspecialchars($h1);
break;
case "listing_details" :
$listing_ID=$_GET['listing_ID'];
$keywords=GetFromDB('keywords','bus_list','listing_ID',$listing_ID);
$page_title=GetFromDB('bus_name','bus_list','listing_ID',$listing_ID).' - '.GetFromDB('bus_tagline','bus_list','listing_ID',$listing_ID).' in '.GetFromDB('full_town','bus_list','listing_ID',$listing_ID).', '.GetCountryName(GetFromDB('venue_country','bus_list','listing_ID',$listing_ID));
$page_title=htmlspecialchars($page_title);
$description=$page_title.' - '.GetFromDB('blurb','bus_list','listing_ID',$listing_ID);
$h1=$page_title;
break;
case "listing_preview" :
$listing_ID=$_GET['listing_ID'];
$keywords=GetFromDB('keywords','bus_list','listing_ID',$listing_ID);
$page_title=GetFromDB('bus_name','bus_list','listing_ID',$listing_ID).' - '.GetFromDB('bus_tagline','bus_list','listing_ID',$listing_ID).' in '.GetFromDB('full_town','bus_list','listing_ID',$listing_ID).', '.GetCountryName(GetFromDB('venue_country','bus_list','listing_ID',$listing_ID));
$page_title=htmlspecialchars($page_title);
$description=$page_title.' - '.GetFromDB('blurb','bus_list','listing_ID',$listing_ID);
$h1=$page_title;
break;
case "listing_request" :
$keywords='Advertise Fishing Venues and Fishing Related Businesses, Business Listing, Fishing Business Directory, Business Listing Order Form';
$query = 'SELECT cat_name FROM bus_categories ORDER BY cat_name ASC';
mysql_select_db($db_name, $con);
$result = mysql_query($query) or die (mysql_error());
$num_rows = mysql_num_rows($result);
$count=0;
while ($row = mysql_fetch_assoc($result)){
$keywords.=', ';
$keywords.=$row['cat_name'];
$count+=1;
}
$page_title='Advertise Fishing Venues and Fishing Related Businesses - Business Listing Order Form';
$description='Advertise Fishing Venues and Fishing Related Businesses on Fish Captures, Business Listing Order Form';
$h1=$page_title;
break;
case "costs" :
$keywords='Advertise Fishing Venues and Fishing Related Businesses, Business Listing, Fishing Business Directory, Advertising Rates, Banners';
$query = 'SELECT cat_name FROM bus_categories ORDER BY cat_name ASC';
mysql_select_db($db_name, $con);
$result = mysql_query($query) or die (mysql_error());
$num_rows = mysql_num_rows($result);
$count=0;
while ($row = mysql_fetch_assoc($result)){
$keywords.=', ';
$keywords.=$row['cat_name'];
$count+=1;
}
$page_title='Advertise Fishing Venues and Fishing Related Businesses - Advertising Rates Business Directory and Banners';
$description='Advertise Fishing Venues and Fishing Related Businesses on Fish Captures, Advertising Rates';
$h1=$page_title;
break;
case "forgot" :
$noindex='';
$keywords=$default_keywords;
$description=$default_description;
$page_title=$default_page_title;
$h1=$default_h1;
break;
default:
$keywords=$default_keywords;
$description=$default_description;
$page_title=$default_page_title;
$h1=$default_h1;
break;
}
?>
//********************************************
//** DYNAMICALLY INCLUDED STYLES **
//********************************************
switch ($page)
{
case "home" : echo'';
break;
case "" : echo'';
break;
default: echo'';
break;
}
?>
Upload your own Fish Captures and Photos
Welcome to Fish Captures - The best FREE Fishing Database available! Keep your own fishing journal, save and manage who sees your capture details and fishing photos. Search via the powerful search features and click chart to see graphical fishing reports
/**
* The intention of the Paginated class is to manage the iteration of records
* based on a specified page number usually addressed by a get parameter in the query string
* and to use a layout interface to produce number pages based on the amount of elements
*/
require_once "PageLayout.php";
class Paginated {
private $rs; //result set
private $pageSize; //number of records to display
private $pageNumber; //the page to be displayed
private $rowNumber; //the current row of data which must be less than the pageSize in keeping with the specified size
private $offSet;
private $layout;
function __construct($obj, $displayRows = 10, $pageNum = 1) {
$this->setRs($obj);
$this->setPageSize($displayRows);
$this->assignPageNumber($pageNum);
$this->setRowNumber(0);
$this->setOffSet(($this->getPageNumber() - 1) * ($this->getPageSize()));
}
//implement getters and setters
public function setOffSet($offSet) {
$this->offSet = $offSet;
}
public function getOffSet() {
return $this->offSet;
}
public function getRs() {
return $this->rs;
}
public function setRs($obj) {
$this->rs = $obj;
}
public function getPageSize() {
return $this->pageSize;
}
public function setPageSize($pages) {
$this->pageSize = $pages;
}
//accessor and mutator for page numbers
public function getPageNumber() {
return $this->pageNumber;
}
public function setPageNumber($number) {
$this->pageNumber = $number;
}
//fetches the row number
public function getRowNumber() {
return $this->rowNumber;
}
public function setRowNumber($number) {
$this->rowNumber = $number;
}
public function fetchNumberPages() {
if (!$this->getRs()) {
return false;
}
$pages = ceil(count($this->getRs()) / (float)$this->getPageSize());
return $pages;
}
//sets the current page being viewed to the value of the parameter
public function assignPageNumber($page) {
if(($page <= 0) || ($page > $this->fetchNumberPages()) || ($page == "")) {
$this->setPageNumber(1);
}
else {
$this->setPageNumber($page);
}
//upon assigning the current page, move the cursor in the result set to (page number minus one) multiply by the page size
//example (2 - 1) * 10
}
public function fetchPagedRow() {
if((!$this->getRs()) || ($this->getRowNumber() >= $this->getPageSize())) {
return false;
}
$this->setRowNumber($this->getRowNumber() + 1);
$index = $this->getOffSet();
$this->setOffSet($this->getOffSet() + 1);
return $this->rs[$index];
}
public function isFirstPage() {
return ($this->getPageNumber() <= 1);
}
public function isLastPage() {
return ($this->getPageNumber() >= $this->fetchNumberPages());
}
/**
*
* @return PageLayout
*/
public function getLayout() {
return $this->layout;
}
/**
*
* @param PageLayout
*/
public function setLayout(PageLayout $layout) {
$this->layout = $layout;
}
//returns a string with the base navigation for the page
//if queryVars are to be added then the first parameter should be preceeded by a ampersand
public function fetchPagedNavigation($queryVars = "") {
return $this->getLayout()->fetchPagedLinks($this, $queryVars);
}//end writeNavigation
}//end Paginated
?> Fatal error: Uncaught Error: Interface "PageLayout" not found in /home/gf4bhcm3/public_html/scripts/paging/DoubleBarLayout.php:2
Stack trace:
#0 /home/gf4bhcm3/public_html/cms_pages/home.php(7): require_once()
#1 /home/gf4bhcm3/public_html/scripts/dynamic_includes.php(32): include('/home/gf4bhcm3/...')
#2 /home/gf4bhcm3/public_html/index.php(301): include('/home/gf4bhcm3/...')
#3 {main}
thrown in /home/gf4bhcm3/public_html/scripts/paging/DoubleBarLayout.php on line 2