Jump to content

I need To Add THis Code, But how/where?


byronwells

Recommended Posts

Alright Guys

 

I am using a membership script, called simplememberpro..  Please see here http://www.ultimateresalegiveaway.com/marketplace.php?cat=t&category=1

 

For some reason when you click on page 2 on the same category..  You get a new page, but no categories are displayed on it..

 

I have spoken to the owener of the script and he has said the following...

 

"I can see what the error is, the &category= tag is missing from the code in marketplace.php."

 

He will try and fix it himself over the weekend..  Or it will get done on Monday..  It cant really waiti that long :)

 

Here is the full marketplace.php code

 

<?php
include_once ("header.php");
$cat = $_GET["cat"];
$link = $_GET["category"];
$search = $_GET["search"];
$cat_title = str_replace("_"," ",$link);

if($cat != "t")
{
$GetFile = file("html/categories.html");
$Content = join("", $GetFile);
$categories=$common->categories($db);
$content=str_replace("{categories}",$categories,$content);	
$Pat = "/<{Begin}>(.*?)<{End}>/s";
preg_match($Pat,$Content,$Output);
$SelectedContent = $Output[1];
$q = "select * from ".$prefix."products where show_product = '1' ORDER BY Rand() LIMIT 1";
$r = $db->get_a_line($q);
$id = $r[id];
$imageurl = $r[imageurl];
$prod_description = $r[prod_description];
$salesprice = $r[price];
$product_name = $r[product_name];
$salespage_link='<a href="prods.php?pid='.$id.'">Click Here For More Information</a>';


$prod_image ='<img src="images/'.$imageurl.'" border="0">';

$Content = preg_replace($Pat,$ToReplace,$Content);
$Content = preg_replace("/{{(.*?)}}/e", "$$1", $Content);
echo $Content;
include_once ("footer.php");		
exit();		
}


elseif($cat == "t")
{
$search = $_GET["search"];
$link = $_GET["category"];
$cat_title = str_replace("_"," ",$link);
$GetFile = file("html/marketplace.html");
$Content = join("", $GetFile);
$categories=$common->categories($db);
$content=str_replace("{categories}",$categories,$content);	
$Pat = "/<{Begin}>(.*?)<{End}>/s";
preg_match($Pat,$Content,$Output);
$SelectedContent = $Output[1];

if($search_txt != "")
	{
	$cond	= "where product_name like '%".$search_txt."%' && show_product = '1'";		
	}
else
	{
	$cond	= "where category = '$cat_title' && show_product = '1'";
	}

########## pagination ###########
$q = "select count(*) as cnt from ".$prefix."products $cond";
$r = $db->get_a_line($q);
$count = $r[cnt];
if($count == "0")
	{
	$warning = "No Results Found";
	}
$records=10;
$links="marketplace.php?cat=t&search_txt=$search_txt&";
if($page=="")
	{
	$page=1;
	}
$start=($page-1)*$records;
$Content=$common->print_page_break3($db,$Content,$count,$records,$links,$page);
########## pagination ###########

$ChangeColor = 1;
$ToReplace = "";
$GetProduct = $db->get_rsltset("select * from ".$prefix."products $cond order by id asc limit $start, $records");
for($i = 0; $i < count($GetProduct); $i++)
	{
	$bgcolor = "#FFFFFF";
	@extract($GetProduct[$i]);
	if($period3_interval == "D"){$interval = "Day(s)";}
	if($period3_interval == "W"){$interval = "Week(s)";}
	if($period3_interval == "M"){$interval = "Month(s)";}
	if($period3_interval == "Y"){$interval = "Year(s)";}

	if($subscription_active == "1")
		{
		$salesprice = $amount3." every ".$period3_value." ".$interval;
		}
	else
		{
		$salesprice = $price;
		}	
	$prod_image ='<img src="images/'.$imageurl.'" border="0">';
	$salespage_link='<a href="prods.php?pid='.$id.'">Click Here For More Information</a>';
	$ToReplace .= preg_replace($Ptn,"$$1",$SelectedContent);
	}
}	

$Content = preg_replace($Pat,$ToReplace,$Content);
$Content = preg_replace("/{{(.*?)}}/e", "$$1", $Content);
echo $Content;
include_once ("footer.php");
?>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.