the code that needs to be moved is at lines 1001 - 1150:
<?php require_once('Connections/razorretail.php'); ?>
<?php
//WA Database Search Include
require_once("WADbSearch/HelperPHP.php");
?>
<?php
//WA Database Search (Copyright 2005, WebAssist.com)
//Recordset: WADAretailchart;
//Searchpage: Search.php;
//Form: WADASearchForm;
$WADbSearch1_DefaultWhere = "";
if (!session_id()) session_start();
if ((isset($_GET["Search_x"]) && $_GET["Search_x"] != "")) {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//keyword array declarations
//comparison list additions
$WADbSearch1->addComparisonFromEdit("Brand","S_Brand","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("RazorNumber","S_RazorNumber","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("Style","S_Style","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("OEMNumbers","S_OEMNumbers","AND","Includes",0);
$WADbSearch1->addComparisonFromEdit("Length","S_Length","AND","Includes",0);
//save the query in a session variable
if (1 == 1) {
$_SESSION["WADbSearch1_Results"]=$WADbSearch1->whereClause;
}
}
else {
$WADbSearch1 = new FilterDef;
$WADbSearch1->initializeQueryBuilder("MYSQL","1");
//get the filter definition from a session variable
if (1 == 1) {
if (isset($_SESSION["WADbSearch1_Results"]) && $_SESSION["WADbSearch1_Results"] != "") {
$WADbSearch1->whereClause = $_SESSION["WADbSearch1_Results"];
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
else {
$WADbSearch1->whereClause = $WADbSearch1_DefaultWhere;
}
}
$WADbSearch1->whereClause = str_replace("\\''", "''", $WADbSearch1->whereClause);
$WADbSearch1whereClause = '';
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
?>
<?php
$currentPage = $_SERVER["PHP_SELF"];
?>
<?php
$maxRows_WADAretailchart = 20;
$pageNum_WADAretailchart = 0;
if (isset($_GET['pageNum_WADAretailchart'])) {
$pageNum_WADAretailchart = $_GET['pageNum_WADAretailchart'];
}
$startRow_WADAretailchart = $pageNum_WADAretailchart * $maxRows_WADAretailchart;
mysql_select_db($database_razorretail, $razorretail);
$query_WADAretailchart = "SELECT Brand, RazorNumber, Style, OEMNumbers, Length, CenterHole, OuterHole, CtoC FROM retailchart";
setQueryBuilderSource($query_WADAretailchart,$WADbSearch1,false);
$query_limit_WADAretailchart = sprintf("%s LIMIT %d, %d", $query_WADAretailchart, $startRow_WADAretailchart, $maxRows_WADAretailchart);
$WADAretailchart = mysql_query($query_limit_WADAretailchart, $razorretail) or die(mysql_error());
$row_WADAretailchart = mysql_fetch_assoc($WADAretailchart);
if (isset($_GET['totalRows_WADAretailchart'])) {
$totalRows_WADAretailchart = $_GET['totalRows_WADAretailchart'];
} else {
$all_WADAretailchart = mysql_query($query_WADAretailchart);
$totalRows_WADAretailchart = mysql_num_rows($all_WADAretailchart);
}
$totalPages_WADAretailchart = ceil($totalRows_WADAretailchart/$maxRows_WADAretailchart)-1;
?>
<?php
$queryString_WADAretailchart = "";
if (!empty($_SERVER['QUERY_STRING'])) {
$params = explode("&", $_SERVER['QUERY_STRING']);
$newParams = array();
foreach ($params as $param) {
if (stristr($param, "pageNum_WADAretailchart") == false &&
stristr($param, "totalRows_WADAretailchart") == false) {
array_push($newParams, $param);
}
}
if (count($newParams) != 0) {
$queryString_WADAretailchart = "&" . htmlentities(implode("&", $newParams));
}
}
$queryString_WADAretailchart = sprintf("&totalRows_WADAretailchart=%d%s", $totalRows_WADAretailchart, $queryString_WADAretailchart);
?>
<?php
//WA AltClass Iterator
class WA_AltClassIterator {
var $DisplayIndex;
var $DisplayArray;
function WA_AltClassIterator($theDisplayArray = array(1)) {
$this->ClassCounter = 0;
$this->ClassArray = $theDisplayArray;
}
function getClass($incrementClass) {
if (sizeof($this->ClassArray) == 0) return "";
if ($incrementClass) {
if ($this->ClassCounter >= sizeof($this->ClassArray)) $this->ClassCounter = 0;
$this->ClassCounter++;
}
if ($this->ClassCounter > 0)
return $this->ClassArray[$this->ClassCounter-1];
else
return $this->ClassArray[0];
}
}
?><?php
//WA Alternating Class
$WARRT_AltClass1 = new WA_AltClassIterator(explode("|", "WADAResultsRowDark|"));
?>
i think that code being in the wrong place is part of the reason the details are empty
also, change the link to the details to us:
<a href="?S_RazorNumber=<?php echo(rawurlencode($row_WADAretailchart['RazorNumber'])); ?>&Search.x=53&Search.y=14&Search=Search#!/page_more27" >
the change for the other buttons will be the same change. Here is the original code for the next button:
<a href="<?php printf("%s?pageNum_WADAretailchart=%d%s", $currentPage, min($totalPages_WADAretailchart, $pageNum_WADAretailchart + 1), $queryString_WADAretailchart); ?>" title="Next">
the changes i made, where to remove the first %s, so:
<?php printf("%s?pageNum....
was changed to:
<?php printf("?pageNum
i then deleted the currentPage variable reference:
$currentPage,
and added #!/page_more26 after the closing php tag, so
...?>" title="Next"...
became"
...?>#!/page_more26" title="Next"...