Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 5th Jan 2010, 06:49 PM   #1
Advanced Warrior
 
Join Date: 2008
Posts: 715
Thanks: 33
Thanked 6 Times in 5 Posts
Default
I Am Having Major Problems.... Can Someone Please Explain?
Share on: 
fb share twitter share gplus share more share

Alright Guys

I need major help please... I am in the process of setting up membership site.. This membership site is done in php, but the layout designs are in html file format...

I have created this layout all in php Untitled Document and would like my membership script to read the same layout format..

I have added the above php to the membership code that reads for that particular part..

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("Untitled Document");
 $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");
?>
I know that it can read the file... http://digitalresellersvault.com/mar...t&category=PLR but the whole layout is comepletly messed up... Why??

Can someone please explain in basic terms.. Thank you
Byron_Wells is offline  
Unread 6th Jan 2010, 05:10 AM   #2
Active Warrior
War Room Member
 
jwlnewsome's Avatar
 
Join Date: 2009
Location: UK
Posts: 51
Thanks: 0
Thanked 7 Times in 7 Posts
Default
Re: I Am Having Major Problems.... Can Someone Please Explain?
Share on: 
fb share twitter share gplus share more share

Looks to me like there is no style sheet attached. have you checked that it is the right url when you include it
John
jwlnewsome is offline  
The Following User Says Thank You to jwlnewsome For This Useful Post:
Unread 6th Jan 2010, 06:36 AM   #3
Lisa Dozois
War Room Member
 
lisag's Avatar
 
Join Date: 2006
Location: Florida, USA.
Posts: 608
Thanks: 107
Thanked 254 Times in 118 Posts
Default
Re: I Am Having Major Problems.... Can Someone Please Explain?
Share on: 
fb share twitter share gplus share more share

The echo content line is going to output the content at the exact point you call it in the script. It appears you have not included any logic in the template for controlling where that position is.

Consider making your html pages php pages instead. Put all of the logic to generate the content inbetween the php tags. then close the php tag and display the html. At the point in the template where you want to display $Content, put in php tags and echo $Content.

-- Lisa G
lisag is offline  
Unread 6th Jan 2010, 12:02 PM   #4
Advanced Warrior
 
Join Date: 2008
Posts: 715
Thanks: 33
Thanked 6 Times in 5 Posts
Default
Re: I Am Having Major Problems.... Can Someone Please Explain?
Share on: 
fb share twitter share gplus share more share

Originally Posted by jwlnewsome View Post

Looks to me like there is no style sheet attached. have you checked that it is the right url when you include it
John
Thank you for that one.. Never spotted that one...
Byron_Wells is offline  
Closed Thread


Bookmarks

Tags
explain, major, problems


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 04:50 AM.