execute(array(WT_GED_ID, WT_SCRIPT_NAME, $page_parameter))->fetchOne(); // Only record one hit per session if ($page_parameter && empty($WT_SESSION->SESSION_PAGE_HITS[WT_SCRIPT_NAME . $page_parameter])) { $WT_SESSION->SESSION_PAGE_HITS[WT_SCRIPT_NAME . $page_parameter] = true; if (is_null($hitCount)) { $hitCount = 1; WT_DB::prepare( "INSERT INTO `##hit_counter` (gedcom_id, page_name, page_parameter, page_count) VALUES (?, ?, ?, ?)" )->execute(array(WT_GED_ID, WT_SCRIPT_NAME, $page_parameter, $hitCount)); } else { $hitCount++; WT_DB::prepare( "UPDATE `##hit_counter` SET page_count=?" . " WHERE gedcom_id=? AND page_name=? AND page_parameter=?" )->execute(array($hitCount, WT_GED_ID, WT_SCRIPT_NAME, $page_parameter)); } } } else { $hitCount = 1; } $hitCount = '' . WT_I18N::number($hitCount) . ''; unset($page_name, $page_parameter);