We are hosted by WP Engine, so I tested our dev site's compatibility with PHP8 to comply with the upcoming requirement, and ran into a problem. We have listing pages that are automatically generated using a custom coded repeater template within the Wordpress Ajax Load More plugin, in conjunction with ACF. I've picked through it line by line, but can't figure out what's causing the pages to break.
At first, when I tested PHP8 compatibility earlier this year, the repeater pages returned a fatal error. Now I get a partial listing on some, and just a Load More button on others, and the Load More button doesn't work in any instance.
Everything works just fine with PHP 7.4, FWIW.
Here is one of our listing pages for reference:
https://smartorg.com/resources/principles-strategic-portfolio-management/
Here is the custom code:
<?php
$article_link = get_permalink( $post->ID );
$article_time = get_post_meta(get_the_ID(), 'length', TRUE);
$article_time = str_replace( array("min"), '', $article_time);
$article_type = get_post_meta(get_the_ID(), 'type', TRUE);
$article_val = '';
$timer = 'min';
if($article_type == 'Article') {
$article_val = 'read';
$content = get_post_field( 'post_content', $post->ID );
$word_count = str_word_count( strip_tags( $content ) );
$Words = str_replace(' ', $word_count);
$readingtime = ceil($word_count / 280);
$timer = " min";
$totalreadingtime = $readingtime . $timer;
$article_time = $totalreadingtime;
} else if($article_type == 'Video') {
$article_val = $timer . ' watch';
} else if($article_type == 'Webinar') {
$article_val = $timer . ' watch';
} else if($article_type == 'Audio') {
$article_val = $timer . ' listen';
} else{
$article_val = '';
}
$category = get_the_category( $post->ID );
// echo $atts['is_archive'];
$yoast_meta = get_post_meta(get_the_ID(), '_yoast_wpseo_metadesc', true);
if ($yoast_meta) {
$meta = $yoast_meta;
} else{
$meta = '';
}
?>
<div class="pm-main-cont">
<div class="pm-col-1">
<div class="pm-red-box"></div>
<div class="pm-article-img">
<a href="<?php echo $article_link; ?>">
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?>
<img src='<?php echo $image[0]; ?>' alt="post thumbnail" />
</a>
</div>
</div>
<div class="pm-col-2">
<div class="pm-article-content">
<h5><?php echo the_title(); ?></h5>
<!-- <p><?php echo the_excerpt(); ?></p> -->
<p><?php echo $meta; ?></p>
<p class="pm-time-type"><img src="http://smartorg.com/wp-content/uploads/2020/09/<?php echo $article_type; ?>.png" alt="<?php echo $article_type; ?>-icon" />
<span><?php
echo $article_time; ?>
<?php echo $article_val; ?>
</span></p>
</div>
</div>
</div>
Hey anyone can help me with this problem ?
I have this issue with my code, two files:
1 - test.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Documento sin tÃtulo</title>
<script>
var url = "getagentids.php?param=";
function handleHttpResponse() {
if (http.readyState == 4) {
results = http.responseText.split(",");
document.getElementById('formality').value = results[0];
document.getElementById('fullname').value = results[1];
document.getElementById('sex').value = results[2];
document.getElementById('id').value = results[3];
document.getElementById('joindate').value = results[4];
document.getElementById('jobtitle').value = results[5];
document.getElementById('city').value = results[6];
document.getElementById('typeofsalary').value = results[7];
document.getElementById('contract_type').value = results[8];
}
}
function getagentids() {
var idValue = document.getElementById("email").value;
var myRandom=parseInt(Math.random()*99999999); // cache buster
http.open("GET", url + escape(idValue) + "&rand=" + myRandom, true);
http.onreadystatechange = handleHttpResponse;
http.send(null);
}
function getHTTPObject() {
var xmlhttp;
if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
try {
xmlhttp = new XMLHttpRequest();
} catch (e) {
xmlhttp = false;
}
}
return xmlhttp;
}
var http = getHTTPObject();
</script>
</head>
<body>
<form name="schform">
<table bgcolor="#dddddd">
<tbody>
<?php
echo $param;
include '../../../connect.php';
$db =& JFactory::getDBO();
$query = "SELECT email FROM dbemployeekpw";
$db->setQuery($query);
$result = $db->loadObjectList();
$email = $result[0];
echo " <select size='1' name='email' id='email' onChange='getagentids()' required >
<option value=''> Seleccione </option>";
foreach($result as $email)
{
echo "<option value='".$email->email."'>".$email->email."</option>";
}
echo "</select>"
?>
<tr><td>Formality</td><td><input id="formality" type="text" name="formality"></td></tr>
<tr><td>Fullname</td><td><input id="fullname" type="text" name="fullname"></td></tr>
<tr><td>Sex</td><td><input id="sex" type="text" name="sex"></td></tr>
<tr><td>Id</td><td><input id="id" type="text" name="id"></td></tr>
<tr><td>Joindate</td><td><input id="joindate" type="text" name="joindate"></td></tr>
<tr><td>Jobtitle</td><td><input id="jobtitle" type="text" name="jobtitle"></td></tr>
<tr><td>City</td><td><input id="city" type="text" name="city"></td></tr>
<tr><td>Typesalary</td><td><input id="typeofsalary" type="text" name="typeofsalary"></td></tr>
<tr><td>Contract Type</td><td><input id="contract_type" type="text" name="contract_type"> </td></tr>
<tr><td><input size="60" type="reset" value="Clear"></td><td></td>
</tr>
</tbody></table>
</form>
</body>
</html>
and..
2 - getagentids.php
<?php
//$param = $_GET["param"];
include '../../../connect.php';
$db =& JFactory::getDBO();
$query = $db->getQuery(true);
$query = "SELECT * FROM dbemployeekpw WHERE email = 'camilo.uribe#kantarworldpanel.com'";
$db->setQuery($query);
$results = $db->loadObjectList();
foreach ( $results as $result )
{
$formality = $result->formality;
$fullname = $result->fullname;
$sex = $result->sex;
$id = $result->id;
$joindate = $result->joindate;
$jobtitle = $result->jobtitle;
$city = $result->city;
$typeofsalary = $result->typeofsalary;
$contract_type = $result->contract_type;
$textout = $formality.",".$fullname.",".$sex.",".$id.",".$joindate.",".$jobtitle.",".$city.",".$typeofsalary.",".$contract_type;
}
echo $textout;
?>
But ajax dont works, only works if I put this :
$query = "SELECT * FROM dbemployeekpw WHERE email = 'camilo.uribe#kantarworldpanel.com'";
instead this:
$query = "SELECT * FROM dbemployeekpw WHERE email = '".$param."'";
But I need that the code works with second one :(
Anyone can help me with this problem ?
Thanks !!
SOLVED (works like a charm!!):
I change this:
$jinput = JFactory::getApplication()->input;
$param = $jinput->get('param', 'param', 'filter');
instead this:
$param = $_GET["param"];
and I'm still with:
$query = "SELECT * FROM dbemployeekpw WHERE email = '".$param."'";
because this code don't works for me:
$query->select($db->quoteName('*'))
->from($db->quoteName('dbemployeekpw'))
->where($db->quoteName('email') . ' = '. $db->quote($param));
Many Thanks #lodder
Before anything, lets see if the $param variable is correct and gets the value. Add the following which one the form is processed, will display the value. If the result is NULL then you firstly need to ensure you get the correct value. If you do get the correct value, then carry on reading.
Just on a side note, I would recommend looking at the following link rather than using $_GET:
http://docs.joomla.org/Retrieving_request_data_using_JInput
Lets now use up to date coding standards for you database query:
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('*'))
->from($db->quoteName('dbemployeekpw'))
->where($db->quoteName('email') . ' = '. $db->quote($param));
$db->setQuery($query);
$results = $db->loadObjectList();
Hope this helps
I had a script that was working perfectly up until a couple of hours ago. This script authorizes a user, checks to see if the user is logged in, and inserts data into my database.
As of now, it fails to both identify a user or insert any data. Any help will be appreciated.
<style type="text/css">
<!--
#apDiv1 {
position:absolute;
width:200px;
height:198px;
z-index:1;
left: 757px;
top: 18px;
}
-->
</style>
<div id="apDiv1"><img src="../Downloads/tree06_small.png" width="188" height="250" alt="" /></div>
<?php
require ("santatree/facebook.php");
include('login.php');
$facebook = new Facebook(array(
'appId' => 'id',
'secret' => 'secret',
));
$db_select=mysql_select_db($db_database);
if (!$db_select)
{
die ("Impossible Function". mysql_error());
}
$user = $facebook->getUser();
if ($user) {
try {
// Proceed knowing you have a logged in user who's authenticated.
$user_profile = $facebook->api('/me');
} catch (FacebookApiException $e) {
if ($user) {
$token = $facebook->getAccessToken();
$friends = $facebook->api('/me/friends');
$friendsData = $friends['data'];
$User = $user['data'];
for ($i = 0; $i < sizeof($friendsData); $i++)
{
$friend = $friendsData[$i];
echo $friend['name'] . ", ";
echo $friend['id'];
echo $user['id'];
$sq1 = "INSERT into tbl_Friends (Name, FriendID, Access_ID) VALUES ('".$friend['name']."', '" .$friend['id']."', '".$user_profile['id']."')";
error_log($e);
$user = null;
}
}
mysql_query($sq1);
}
$logoutUrl = $facebook->getLogoutUrl();
} else {
$loginUrl = $facebook->getLoginUrl();
}
$access_token = $_SESSION['fb_276853929000834_access_token'];
if (!$access_token) {
echo '<script>';
echo 'top.location.href = "'.$loginUrl.'";';
echo '</script>';
} else {
// ------ Create Drop Down Name List from Friends Table ------
$myuserid = $user_profile['id'];
echo "<html>";
echo "<form enctype='multipart/form-data' method='post' action='uploadpicture1.php' name='Giftgiver'>";
$result= #mysql_query("select Friend_ID, tbl_Friends.Name from tbl_Friends inner join tbl_Users on tbl_Friends.Access_ID=tbl_Users.Access_ID where tbl_Friends.Access_ID = $myuserid");
print "<p> Select a Friend: \n";
print "<Select name=\"Friend_ID\">\n";
while ($row=mysql_fetch_assoc($result)){
$Friend_ID=$row['Friend_ID'];
$Name =$row['Name'];
print "<option value=$Friend_ID>$Name \n";
}
print "</select>\n";
print "</p>\n";
echo "Choose a gift!";
echo "<input type='file' name='GiftChoice' value='1'>";
}
echo "</form>";
echo "</html>";
?>
Have you checked to make you you have updated to Facebook's oAuth 2.0?
All FB apps and apps using the FB api are required to upgrade to oAuth 2.0 by October 1st, 2011.
I need the API to fetch the top selling books on Amazon. By default it only fetches the top 10 items, but I need more than 10, near about 1000 items content by using single hit.
OR
I need the way to scrape the 1000 top selling books using the Amazon ECS API.
OR
Is there any way except the Amazon API to scrape all of the top selling books on Amazon?
To get the 100 bestselling books you have to specify the ItemPage parameter:
http://ecs.amazonaws.com/onca/xml?
Service=AWSECommerceService&
AWSAccessKeyId=[AWS Access Key ID]&
Operation=ItemSearch&
BrowseNode=17&
SearchIndex=Books&
ItemPage=2
&Sort=salesrank
&Timestamp=[YYYY-MM-DDThh:mm:ssZ]
&Signature=[Request Signature]
Problem: The maximum ItemPage number that can be returned is 10. So you cant get past 100 books.
Reference: http://docs.amazonwebservices.com/AWSECommerceService/latest/DG/index.html?ItemSearch.html
here's how I do it - but it won't work for more than 100 items after the end of this month as Amazon are limiting ItemPage to 10.
rescheck = Amazon::Ecs.item_search("search term here", :response_group => 'Large', :country => 'uk')
n=0
rescheck.total_pages.times do |n|
n=n+1
if n <= rescheck.total_pages
res = Amazon::Ecs.item_search("search term here", :response_group => 'Large', :item_page =>n, :country => 'uk')
res.items.each do |item|
asin = item.get('ASIN')
title = item.get('ItemAttributes/Title')
brand = item.get('ItemAttributes/Brand')
#etc
Using previous comment, I scrap from DOM of documentation for IN this categories:
[
{
"index":"All",
"node":""
},
{
"index":"Baby",
"node":"1571275031"
},
{
"index":"Beauty",
"node":"1355017031"
},
{
"index":"Books",
"node":"976390031"
},
{
"index":"Automotive",
"node":"4772061031"
},
{
"index":"Apparel",
"node":"1571272031"
},
{
"index":"PCHardware",
"node":"976393031"
},
{
"index":"Electronics",
"node":"976420031"
},
{
"index":"GiftCards",
"node":"3704983031"
},
{
"index":"Grocery",
"node":"2454179031"
},
{
"index":"HealthPersonalCare",
"node":"1350385031"
},
{
"index":"HomeGarden",
"node":"2454176031"
},
{
"index":"Industrial",
"node":"5866079031"
},
{
"index":"Jewelry",
"node":"1951049031"
},
{
"index":"KindleStore",
"node":"1571278031"
},
{
"index":"Luggage",
"node":"2454170031"
},
{
"index":"DVD",
"node":"976417031"
},
{
"index":"Music",
"node":"976446031"
},
{
"index":"MusicalInstruments",
"node":"3677698031"
},
{
"index":"OfficeProducts",
"node":"2454173031"
},
{
"index":"PetSupplies",
"node":"4740420031"
},
{
"index":"Shoes",
"node":"1571284031"
},
{
"index":"Software",
"node":"976452031"
},
{
"index":"SportingGoods",
"node":"1984444031"
},
{
"index":"Toys",
"node":"1350381031"
},
{
"index":"VideoGames",
"node":"976461031"
},
{
"index":"Watches",
"node":"1350388031"
}
]
<?php
namespace MarcL;
use MarcL\CurlHttpRequest;
use MarcL\AmazonUrlBuilder;
use MarcL\Transformers\DataTransformerFactory;
class AmazonAPI
{
private $urlBuilder = NULL;
private $dataTransformer = NULL;
public $item=0;
public $perRequest=0;
public function IND_money_format($money)
{
$len = strlen($money);
$m = '';
$money = strrev($money);
for($i=0;$i<$len;$i++){
if(( $i==3 || ($i>3 && ($i-1)%2==0) )&& $i!=$len){
$m .=',';
}
$m .=$money[$i];
}
return strrev($m);
}
// Valid names that can be used for search
private $mValidSearchNames = array(
'All',
'Apparel',
'Appliances',
'Automotive',
'Baby',
'Beauty',
'Blended',
'Books',
'Classical',
'DVD',
'Electronics',
'Grocery',
'HealthPersonalCare',
'HomeGarden',
'HomeImprovement',
'Jewelry',
'KindleStore',
'Kitchen',
'Lighting',
'Marketplace',
'MP3Downloads',
'Music',
'MusicTracks',
'MusicalInstruments',
'OfficeProducts',
'OutdoorLiving',
'Outlet',
'PetSupplies',
'PCHardware',
'Shoes',
'Software',
'SoftwareVideoGames',
'SportingGoods',
'Tools',
'Toys',
'VHS',
'Video',
'VideoGames',
'Watches'
);
private $mErrors = array();
public function __construct($urlBuilder, $outputType) {
$this->urlBuilder = $urlBuilder;
$this->dataTransformer = DataTransformerFactory::create($outputType);
}
public function GetValidSearchNames() {
return $this->mValidSearchNames;
}
/**
* Search for items
*
* #param keywords Keywords which we're requesting
* #param searchIndex Name of search index (category) requested. NULL if searching all.
* #param sortBy Category to sort by, only used if searchIndex is not 'All'
* #param condition Condition of item. Valid conditions : Used, Collectible, Refurbished, All
*
* #return mixed SimpleXML object, array of data or false if failure.
*/
public function ItemSearch($keywords,$itemPage, $searchIndex = NULL, $sortBy = NULL, $condition = 'All',$minPrice=50000,$maxPrice=55000) {
?>
<table cellpadding="5">
<thead>
<tr>
<td>Title</td>
<td>List Price</td>
<td>Offer Price</td>
<td>Offer Selling Price</td>
<td>Amount Saved</td>
<td>Brand Name</td>
<td>Size</td>
<td>Color</td>
<td>Manufacturer</td>
</tr>
</thead>
<tbody>
<?php
$totalPages=0;
while($maxPrice<=100000)
{
$finished=false;
$itemPage=0;
while(!$finished)
{
$itemPage=$itemPage+1;
sleep(1);
$mer="MerchantId";
$merVal="Amazon";
$params = array(
'Operation' => 'ItemSearch',
'ResponseGroup' => 'Small,ItemAttributes,Offers,OfferSummary',
'Keywords' => $keywords,
'Condition' => $condition,
'ItemPage' => $itemPage,
'ListPrice' => $itemPage,
'MinimumPrice' => $minPrice,
'MaximumPrice' => $maxPrice,
'SearchIndex' => empty($searchIndex) ? 'All' : $searchIndex,
'Sort' => $sortBy && ($searchIndex != 'All') ? $sortBy : NULL
);
$totalPages=$this->FetchItems($params,$itemPage,$maxPrice,false);
if(($itemPage)==1)
{
$finished=true;
$itemPage=0;
}
}
$minPrice=$maxPrice;
$maxPrice=$maxPrice+5000;
}
//echo "<br/>total Records : ".$this->item;
?>
</tbody>
</table>
<br/><br/>
<?php
$style="";
for($looper=1;$looper<=$totalPages;$looper++)
{
if($looper>($itemPage-3) && $looper<($itemPage+3))
{
if($looper==$itemPage)
{
$style="style='color:red;'";
echo "".$looper." ";
}
else
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}
}else if($looper>($totalPages-3))
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}else if($looper>(($totalPages/2)-3) && $looper<(($totalPages/2)+3))
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}
}
die();
//return $this->MakeAndParseRequest($params,$itemPage);
}
/**
* Lookup items from ASINs
*
* #param asinList Either a single ASIN or an array of ASINs
* #param onlyFromAmazon True if only requesting items from Amazon and not 3rd party vendors
*
* #return mixed SimpleXML object, array of data or false if failure.
*/
public function ItemLookup($asinList,$itemPage, $onlyFromAmazon = false) {
$asinList="B01D0XDW1C";
if (is_array($asinList)) {
$asinList = implode(',', $asinList);
}
$params = array(
'Operation' => 'ItemLookup',
'ResponseGroup' => 'ItemAttributes,Offers,Images',
'ReviewSort' => '-OverallRating',
'ItemId' => $asinList,
'MerchantId' => ($onlyFromAmazon == true) ? 'Amazon' : 'All'
);
return $this->MakeAndParseRequest($params,$itemPage,true);
}
public function GetErrors() {
return $this->mErrors;
}
private function AddError($error) {
array_push($this->mErrors, $error);
}
public function FetchItems($params,$itemPage,$maxPrice,$lookup=false)
{
$signedUrl = $this->urlBuilder->generate($params);
if($lookup)
{
try
{
$request = new CurlHttpRequest();
$response = $request->execute($signedUrl);
$fileContents = str_replace(array("\n", "\r", "\t"), '', $response);
$fileContents = trim(str_replace('"', "'", $fileContents));
$simpleXml = simplexml_load_string($fileContents);
$json = json_encode($simpleXml);
$decodedJson=json_decode($json,true);
//print_r($decodedJson);
print_r($decodedJson);
die();
$parsedXml = simplexml_load_string($response);
if ($parsedXml === false) {
return false;
}
return $this->dataTransformer->execute($parsedXml);
} catch(\Exception $error) {
$this->AddError("Error downloading data : $signedUrl : " . $error->getMessage());
return false;
}
}
else
{
try
{
$request = new CurlHttpRequest();
$response = $request->execute($signedUrl);
$fileContents = str_replace(array("\n", "\r", "\t"), '', $response);
$fileContents = trim(str_replace('"', "'", $fileContents));
$simpleXml = simplexml_load_string($fileContents);
$json = json_encode($simpleXml);
$decodedJson=json_decode($json,true);
//print_r($decodedJson);
//die();
if(isset($decodedJson['Items']))
{
$this->perRequest=0;
foreach($decodedJson['Items']['Item'] as $itm)
{
if(isset($itm['ItemAttributes']['ListPrice']['FormattedPrice']))
{
$this->item=$this->item+1;
$this->perRequest=$this->perRequest+1;
?>
<tr>
<td>
<?php
if(isset($itm['ItemAttributes']['Title']))
echo $itm['ItemAttributes']['Title'];
else
echo "N/A";
?>
</td>
<td>
<?php
if(isset($itm['ItemAttributes']['ListPrice']['FormattedPrice']))
echo $itm['ItemAttributes']['ListPrice']['FormattedPrice'];
else
echo "N/A";
?>
</td>
<?php
$savedAmount=0;
if(isset($itm['Offers']['Offer']['OfferListing']['Price']['FormattedPrice']))
{
?>
<td><?php echo $itm['Offers']['Offer']['OfferListing']['Price']['FormattedPrice']; ?></td>
<?php
if(isset($itm['Offers']['Offer']['OfferListing']['SalePrice']['FormattedPrice']))
{
$total=(int)($itm['ItemAttributes']['ListPrice']['Amount']);
$offer=(int)($itm['Offers']['Offer']['OfferListing']['SalePrice']['Amount']);
$savedAmount=$total-$offer;
$savedAmount=$savedAmount/100;
$savedAmount=$this->IND_money_format($savedAmount);
$savedAmount="INR ".$savedAmount.".00";
?>
<td><?php echo $itm['Offers']['Offer']['OfferListing']['SalePrice']['FormattedPrice']; ?></td>
<td><?php echo $savedAmount; ?></td>
<?php
}
else
{
$total=(int)($itm['ItemAttributes']['ListPrice']['Amount']);
$offer=(int)($itm['Offers']['Offer']['OfferListing']['Price']['Amount']);
$savedAmount=$total-$offer;
$savedAmount=$savedAmount/100;
$savedAmount=$this->IND_money_format($savedAmount);
$savedAmount="INR ".$savedAmount.".00";
?>
<td><?php echo $itm['Offers']['Offer']['OfferListing']['Price']['FormattedPrice']; ?></td>
<td><?php echo $savedAmount; ?></td>
<?php
}
}
else if(isset($itm['OfferSummary']['LowestNewPrice']['FormattedPrice']))
{
$total=(int)($itm['ListPrice']['Amount']);
$offer=(int)($itm['Offers']['Offer']['OfferListing']['SalePrice']['Amount']);
$savedAmount=$total-$offer;
$savedAmount=$savedAmount/100;
$savedAmount=$this->IND_money_format($savedAmount);
$savedAmount="INR ".$savedAmount.".00";
?>
<td><?php echo $itm['OfferSummary']['LowestNewPrice']['FormattedPrice']; ?></td>
<td><?php echo $itm['OfferSummary']['LowestNewPrice']['FormattedPrice']; ?></td>
<td><?php echo $savedAmount; ?></td>
<?php
}
else
{
?>
<td>N/A</td>
<td>N/A</td>
<td>N/A</td>
<?php
}
?>
<td>
<?php
if(isset($itm['ItemAttributes']['Brand']))
echo $itm['ItemAttributes']['Brand'];
else
echo "N/A";
?>
</td>
<td>
<?php
if(isset($itm['ItemAttributes']['Size']))
echo $itm['ItemAttributes']['Size'];
else
echo "N/A";
?>
</td>
<td>
<?php
if(isset($itm['ItemAttributes']['Color']))
echo $itm['ItemAttributes']['Color'];
else
echo "N/A";
?>
</td>
<td>
<?php
if(isset($itm['ItemAttributes']['Manufacturer']))
echo $itm['ItemAttributes']['Manufacturer'];
else
echo "N/A";
?>
</td>
</tr>
<?php
}
}
//return
//echo $maxPrice." : ".$decodedJson['Items']['TotalPages']."<br/>";
}
//echo "PerRequest : ".$this->perRequest."<br/>";
//die();
//$parsedXml = simplexml_load_string($response);
//if ($parsedXml === false) {
// return false;
//}
//return $this->dataTransformer->execute($parsedXml);
} catch(\Exception $error) {
$this->AddError("Error downloading data : $signedUrl : " . $error->getMessage());
return false;
}
}
}
private function MakeAndParseRequest($params,$itemPage,$lookup=false)
{
$this->item=0;
/*$style="";
for($looper=1;$looper<=$totalPages;$looper++)
{
if($looper>($itemPage-3) && $looper<($itemPage+3))
{
if($looper==$itemPage)
{
$style="style='color:red;'";
echo "".$looper." ";
}
else
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}
}else if($looper>($totalPages-3))
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}else if($looper>(($totalPages/2)-3) && $looper<(($totalPages/2)+3))
{
echo "<a href='examples.php?itemPage=".$looper."'>".$looper."</a> ";
}
}
*/
}
}
?>