<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Create SEO Friendly URLs With Mod Rewrite and PHP &#8211; Part II</title>
	<atom:link href="http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html/feed" rel="self" type="application/rss+xml" />
	<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html?utm_source=subscriber&amp;utm_medium=rss&amp;utm_campaign=rss</link>
	<description>Know your technology head on</description>
	<lastBuildDate>Sun, 22 Nov 2009 20:43:15 -0500</lastBuildDate>
	
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com" />
		<item>
		<title>By: Keith Dsouza</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-45871</link>
		<dc:creator>Keith Dsouza</dc:creator>
		<pubDate>Sun, 11 Oct 2009 22:39:21 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-45871</guid>
		<description>@Sergio The problem will be seen, if you are using an external CSS stylesheet using relative path like /style.css or ../style.css, try changing the stylesheet to use a full path starting with http:// this should solve your problem.</description>
		<content:encoded><![CDATA[<p>@Sergio The problem will be seen, if you are using an external CSS stylesheet using relative path like /style.css or ../style.css, try changing the stylesheet to use a full path starting with http:// this should solve your problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sergio</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-45869</link>
		<dc:creator>Sergio</dc:creator>
		<pubDate>Sun, 11 Oct 2009 21:32:58 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-45869</guid>
		<description>Having problems, i&#039;m getting the urls to work, but the page shows up with no styles 

Other than that, the article was great</description>
		<content:encoded><![CDATA[<p>Having problems, i&#8217;m getting the urls to work, but the page shows up with no styles </p>
<p>Other than that, the article was great</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: omer</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-43489</link>
		<dc:creator>omer</dc:creator>
		<pubDate>Wed, 09 Sep 2009 09:10:37 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-43489</guid>
		<description>hi i am using your code for seo friendly urls but some how when i click the link that i have made it goes to that page and makes the url; friendly but the CSS appears to be missing when i visit through the lik that i have made as per your suggested method what should i do</description>
		<content:encoded><![CDATA[<p>hi i am using your code for seo friendly urls but some how when i click the link that i have made it goes to that page and makes the url; friendly but the CSS appears to be missing when i visit through the lik that i have made as per your suggested method what should i do</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandip</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-33150</link>
		<dc:creator>sandip</dc:creator>
		<pubDate>Wed, 18 Feb 2009 18:47:01 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-33150</guid>
		<description>Right now below script is giving me url like this

http://www.mysite.com/bb/cat_sell.php?cid=1

where as i am looking for url like this

http://www.mysite.com/bb/1/agriculture.html
where 1 is cid of agriculture

looking forward for your reply

include_once &quot;myconnect.php&quot;;
include_once &quot;date_time_format.php&quot;;

if(isset($_REQUEST[&quot;cid&quot;]))
{
  $cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_pid=&quot; . $_REQUEST[&quot;cid&quot;]);
	$rs=mysql_num_rows($cat_query);
	
	if(($rs&lt;=0)&#124;&#124;($_REQUEST[&quot;cid&quot;]==0))
	{
	header(&quot;Location:&quot;.&quot;selloffers.php?cid=&quot;.$_REQUEST[&quot;cid&quot;]);
	die();
	}

}

function main()
{
$keyword=&quot;&quot;;
	if(isset($_REQUEST[&quot;keyword&quot;])&amp;&amp;($_REQUEST[&quot;keyword&quot;]&quot;&quot;))
	{
		$keyword=$_REQUEST[&quot;keyword&quot;];
	}

$config=mysql_fetch_array(mysql_query(&quot;select * from sbbleads_config&quot;));
if(($config[&quot;sb_image_magik&quot;]==&quot;enable&quot;))
{
$img_path=&quot;thumbs1/&quot;;
$img_pmt=&quot;&quot;;
}
else
{
$img_path=&quot;uploadedimages/&quot;;
$img_pmt=&quot;width=&quot;.$config[&quot;sb_th_width&quot;].&quot; height=&quot;.$config[&quot;sb_th_width&quot;];
}

$cid=0;
if(isset($_REQUEST[&quot;cid&quot;])&amp;&amp;($_REQUEST[&quot;cid&quot;]&quot;&quot;))
{
$cid=$_REQUEST[&quot;cid&quot;];
	$sbqu_off=&quot;update sbbleads_categories set sb_visit_sell=sb_visit_sell+1 where sb_id=$cid&quot;;
	mysql_query($sbqu_off);
}

/*$sell_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_offers where sb_approved=&#039;yes&#039;&quot;));
$buy_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_offers_buy where sb_approved=&#039;yes&#039;&quot;));
$product_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_products where sb_approved=&#039;yes&#039;&quot;));
$profile_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_companyprofiles where sb_approved=&#039;yes&#039;&quot;));*/

	$catname=&quot;&quot;;
	$category=0;
  
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $cid );
	if ($cat=mysql_fetch_array($cat_query))
	{
	$catname=$cat[&quot;sb_cat_name&quot;];
	$category=$cat[&quot;sb_id&quot;];
	}

	$catpath=&quot;&quot;;
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $cid );
	while ($rs=mysql_fetch_array($cat_query))
    {
    $catpath =&quot; &gt; &lt;a&gt;&quot; .$rs[&quot;sb_cat_name&quot;].&quot;&lt;/a&gt;&quot;.$catpath; 
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $rs[&quot;sb_pid&quot;] );
	}
?&gt; 

   
    
         
          
             &lt;input name=&quot;keyword&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;40&quot;&gt; 
              &#160;&#160; 
                Sell Offers
                Buy Offers
                Products Catalogs
                Company Profiles
              
              &#160;
              
              &#160; 
               
              &#160;&lt;a href=&quot;advance_search.php&quot; rel=&quot;nofollow&quot;&gt;Advance Search&lt;/a&gt;  &#160; 
            
          
        
      
  
  
    
        
          &#160;&lt;a href=&quot;index.php&quot; rel=&quot;nofollow&quot;&gt;Home&lt;/a&gt;
        
        
          
               
                &#8595; &#160;Sell Offers
                &#8594; &#160;&lt;a href=&quot;cat_buy.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Buy 
                  Offers&lt;/a&gt;
                &#8594; &#160;&lt;a href=&quot;cat_products.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Products&lt;/a&gt;
                &#8594; &#160;&lt;a href=&quot;cat_profiles.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Companies&lt;/a&gt;
              
            
        
      
      
    
  
   
    
	
         
          &lt;b&gt;Browse Sell Offers&lt;/b&gt;
        
        
          
               NOW() $sbcat_str&quot;;
	$sboff_count=mysql_num_rows(mysql_query($sbq_off_cat));

	$sbq_buy_cat=&quot;select * from sbbleads_offer_cats_buy, sbbleads_offers_buy where sb_approved=&#039;yes&#039; and sbbleads_offers_buy.sb_id=sbbleads_offer_cats_buy.sb_offer_id and DATE_ADD(sb_postedon,INTERVAL &quot;.$config[&quot;sb_expiry_buy&quot;].&quot; MONTH) &gt; NOW() $sbcat_str&quot;;
	$sbbuy_count=mysql_num_rows(mysql_query($sbq_buy_cat));
	
	$sbq_product_cat=&quot;select * from sbbleads_product_cats, sbbleads_products where sb_approved=&#039;yes&#039; and sbbleads_products.sb_id=sbbleads_product_cats.sb_offer_id $sbcat_str&quot;;
	$sbproduct_count=mysql_num_rows(mysql_query($sbq_product_cat));
	
	$sbq_profile_cat=&quot;select * from sbbleads_profile_cats, sbbleads_companyprofiles where sb_approved=&#039;yes&#039; and sbbleads_companyprofiles.sb_id=sbbleads_profile_cats.sb_profile_id $sbcat_str&quot;;
	$sbprofile_count=mysql_num_rows(mysql_query($sbq_profile_cat));
	$sbtotal=$sboff_count;//$sboff_count+$sbbuy_count+$sbproduct_count+$sbprofile_count;
//die();
	if($cnt%3==1)
	{
  ?&gt;
              &#160;
  
                 &lt;a href=&quot;index.php?cid=&quot;&gt; 
                  &lt;/a&gt;&lt;a href=&quot;cat_sell.php?cid=&quot;&gt;&lt;/a&gt;()
                
  
            
        
      
  
   
    
         
          &#160;Featured Offers 
        
		 NOW() order by sb_id desc&quot;;
	$sbrs_off=mysql_query($sbq_off); 
	$num_rows=mysql_num_rows($sbrs_off);
	$max_allowed=$config[&quot;sb_cat_featured&quot;];

	$number[0]=-1;
	if($num_rows&gt;$max_allowed)
	{
		for($i=0;$i&lt;$max_allowed;$i++)
		{
			$unique=0;
			while($unique==0)
			{
				$j=rand(0,$num_rows-1);
				for($k=0;$k(count($number)-1))
				{
					$unique=1;
				}
			}
			$number[$i]=$j;
					
		}
	}// end if num &gt; no_allowed
					/*for($k=0;$k&lt;count($number);$k++)
							{
								echo $number[$k].&quot; &quot;;
							}*/
	$row=0;
	$cnt=0;
	$offer=mysql_fetch_array($sbrs_off);
	while (($offer)&amp;&amp;($cnt$max_allowed)
		{
			for($k=0;$k
               
           
               
                 
                  &lt;? if ($images) {echo &quot;&lt;a&gt;&lt;/a&gt;&quot;; }  else
			   {
			   ?&gt;
                  &lt;img src=&quot;images/nopic.gif&quot; &gt; 
                  
                
                &#160;&lt;a 
                                href=&quot;view_offer.php?id=&quot;&gt; 
                  50)
					{
					 echo substr($offer[&quot;sb_title&quot;], 0,  strrpos( substr($offer[&quot;sb_title&quot;], 0, 50),&#039; &#039; ));  
					}
					else
					{
					 echo $offer[&quot;sb_title&quot;];  
					}
					?&gt;
                  &lt;/a&gt; [ 
                  
                  ]
              
               
                 &#160;Posted by &lt;strong&gt; 
                  
                  &lt;/strong&gt;&lt;strong&gt;[ 
                  
                  ]&lt;/strong&gt; on  
                  
              
               
                 &#160; 
                  100)
					{
					 echo substr(strip_tags($offer[&quot;sb_description&quot;]), 0,  strrpos( substr(strip_tags($offer[&quot;sb_description&quot;]), 0, 100),&#039; &#039; )) . &quot;..&quot;;  
					}
					else
					{
					 echo strip_tags($offer[&quot;sb_description&quot;]);  
					}
					?&gt;
                  
              
            
        =$max_allowed))
		{
		?&gt; 
                    
                      &#160;
                      &lt;strong&gt;Default Ad 
                        &lt;/strong&gt;&#160;
                    
                    
                      &#160;
                      Become a Gold member and your 
                        Offer will appear here. 
                    
                   
                     
                      &lt;strong&gt;Default Ad 
                        &lt;/strong&gt;&#160;
                    
                     
                      Become a Gold member and your 
                        Offer will appear here. 
                    
                  
		  
      
  

</description>
		<content:encoded><![CDATA[<p>Right now below script is giving me url like this</p>
<p><a href="http://www.mysite.com/bb/cat_sell.php?cid=1" rel="nofollow">http://www.mysite.com/bb/cat_sell.php?cid=1</a></p>
<p>where as i am looking for url like this</p>
<p><a href="http://www.mysite.com/bb/1/agriculture.html" rel="nofollow">http://www.mysite.com/bb/1/agriculture.html</a><br />
where 1 is cid of agriculture</p>
<p>looking forward for your reply</p>
<p>include_once &#8220;myconnect.php&#8221;;<br />
include_once &#8220;date_time_format.php&#8221;;</p>
<p>if(isset($_REQUEST["cid"]))<br />
{<br />
  $cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_pid=&#8221; . $_REQUEST["cid"]);<br />
	$rs=mysql_num_rows($cat_query);</p>
<p>	if(($rs&lt;=0)||($_REQUEST["cid"]==0))<br />
	{<br />
	header(&#8221;Location:&#8221;.&#8221;selloffers.php?cid=&#8221;.$_REQUEST["cid"]);<br />
	die();<br />
	}</p>
<p>}</p>
<p>function main()<br />
{<br />
$keyword=&#8221;";<br />
	if(isset($_REQUEST["keyword"])&amp;&amp;($_REQUEST["keyword"]&#8220;&#8221;))<br />
	{<br />
		$keyword=$_REQUEST["keyword"];<br />
	}</p>
<p>$config=mysql_fetch_array(mysql_query(&#8221;select * from sbbleads_config&#8221;));<br />
if(($config["sb_image_magik"]==&#8221;enable&#8221;))<br />
{<br />
$img_path=&#8221;thumbs1/&#8221;;<br />
$img_pmt=&#8221;";<br />
}<br />
else<br />
{<br />
$img_path=&#8221;uploadedimages/&#8221;;<br />
$img_pmt=&#8221;width=&#8221;.$config["sb_th_width"].&#8221; height=&#8221;.$config["sb_th_width"];<br />
}</p>
<p>$cid=0;<br />
if(isset($_REQUEST["cid"])&amp;&amp;($_REQUEST["cid"]&#8220;&#8221;))<br />
{<br />
$cid=$_REQUEST["cid"];<br />
	$sbqu_off=&#8221;update sbbleads_categories set sb_visit_sell=sb_visit_sell+1 where sb_id=$cid&#8221;;<br />
	mysql_query($sbqu_off);<br />
}</p>
<p>/*$sell_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_offers where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$buy_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_offers_buy where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$product_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_products where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$profile_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_companyprofiles where sb_approved=&#8217;yes&#8217;&#8221;));*/</p>
<p>	$catname=&#8221;";<br />
	$category=0;</p>
<p>  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $cid );<br />
	if ($cat=mysql_fetch_array($cat_query))<br />
	{<br />
	$catname=$cat["sb_cat_name"];<br />
	$category=$cat["sb_id"];<br />
	}</p>
<p>	$catpath=&#8221;";<br />
  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $cid );<br />
	while ($rs=mysql_fetch_array($cat_query))<br />
    {<br />
    $catpath =&#8221; &gt; <a>&#8221; .$rs["sb_cat_name"].&#8221;</a>&#8220;.$catpath;<br />
  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $rs["sb_pid"] );<br />
	}<br />
?&gt; </p>
<p>             &lt;input name=&#8221;keyword&#8221; type=&#8221;text&#8221; value=&#8221;" size=&#8221;40&#8243;&gt;<br />
              &nbsp;&nbsp;<br />
                Sell Offers<br />
                Buy Offers<br />
                Products Catalogs<br />
                Company Profiles</p>
<p>              &nbsp;</p>
<p>              &nbsp; </p>
<p>              &nbsp;<a href="advance_search.php" rel="nofollow">Advance Search</a>  &nbsp; </p>
<p>          &nbsp;<a href="index.php" rel="nofollow">Home</a></p>
<p>                &#8595; &nbsp;Sell Offers<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_buy.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Buy<br />
                  Offers<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_products.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Products<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_profiles.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Companies</p>
<p>          <b>Browse Sell Offers</b></p>
<p>               NOW() $sbcat_str&#8221;;<br />
	$sboff_count=mysql_num_rows(mysql_query($sbq_off_cat));</p>
<p>	$sbq_buy_cat=&#8221;select * from sbbleads_offer_cats_buy, sbbleads_offers_buy where sb_approved=&#8217;yes&#8217; and sbbleads_offers_buy.sb_id=sbbleads_offer_cats_buy.sb_offer_id and DATE_ADD(sb_postedon,INTERVAL &#8220;.$config["sb_expiry_buy"].&#8221; MONTH) &gt; NOW() $sbcat_str&#8221;;<br />
	$sbbuy_count=mysql_num_rows(mysql_query($sbq_buy_cat));</p>
<p>	$sbq_product_cat=&#8221;select * from sbbleads_product_cats, sbbleads_products where sb_approved=&#8217;yes&#8217; and sbbleads_products.sb_id=sbbleads_product_cats.sb_offer_id $sbcat_str&#8221;;<br />
	$sbproduct_count=mysql_num_rows(mysql_query($sbq_product_cat));</p>
<p>	$sbq_profile_cat=&#8221;select * from sbbleads_profile_cats, sbbleads_companyprofiles where sb_approved=&#8217;yes&#8217; and sbbleads_companyprofiles.sb_id=sbbleads_profile_cats.sb_profile_id $sbcat_str&#8221;;<br />
	$sbprofile_count=mysql_num_rows(mysql_query($sbq_profile_cat));<br />
	$sbtotal=$sboff_count;//$sboff_count+$sbbuy_count+$sbproduct_count+$sbprofile_count;<br />
//die();<br />
	if($cnt%3==1)<br />
	{<br />
  ?&gt;<br />
              &nbsp;</p>
<p>                 &lt;a href=&#8221;index.php?cid=&#8221;&gt;<br />
                  &lt;a href=&#8221;cat_sell.php?cid=&#8221;&gt;()</p>
<p>          &nbsp;Featured Offers </p>
<p>		 NOW() order by sb_id desc&#8221;;<br />
	$sbrs_off=mysql_query($sbq_off);<br />
	$num_rows=mysql_num_rows($sbrs_off);<br />
	$max_allowed=$config["sb_cat_featured"];</p>
<p>	$number[0]=-1;<br />
	if($num_rows&gt;$max_allowed)<br />
	{<br />
		for($i=0;$i&lt;$max_allowed;$i++)<br />
		{<br />
			$unique=0;<br />
			while($unique==0)<br />
			{<br />
				$j=rand(0,$num_rows-1);<br />
				for($k=0;$k(count($number)-1))<br />
				{<br />
					$unique=1;<br />
				}<br />
			}<br />
			$number[$i]=$j;</p>
<p>		}<br />
	}// end if num &gt; no_allowed<br />
					/*for($k=0;$k&lt;count($number);$k++)<br />
							{<br />
								echo $number[$k].&#8221; &#8220;;<br />
							}*/<br />
	$row=0;<br />
	$cnt=0;<br />
	$offer=mysql_fetch_array($sbrs_off);<br />
	while (($offer)&amp;&amp;($cnt$max_allowed)<br />
		{<br />
			for($k=0;$k</p>
<p>                  &lt;? if ($images) {echo &#8220;<a></a>&#8220;; }  else<br />
			   {<br />
			   ?&gt;<br />
                  &lt;img src=&#8221;images/nopic.gif&#8221; &gt; </p>
<p>                &nbsp;&lt;a<br />
                                href=&#8221;view_offer.php?id=&#8221;&gt;<br />
                  50)<br />
					{<br />
					 echo substr($offer["sb_title"], 0,  strrpos( substr($offer["sb_title"], 0, 50),&#8217; &#8216; ));<br />
					}<br />
					else<br />
					{<br />
					 echo $offer["sb_title"];<br />
					}<br />
					?&gt;<br />
                   [ </p>
<p>                  ]</p>
<p>                 &nbsp;Posted by <strong> </p>
<p>                  </strong><strong>[ </p>
<p>                  ]</strong> on  </p>
<p>                 &nbsp;<br />
                  100)<br />
					{<br />
					 echo substr(strip_tags($offer["sb_description"]), 0,  strrpos( substr(strip_tags($offer["sb_description"]), 0, 100),&#8217; &#8216; )) . &#8220;..&#8221;;<br />
					}<br />
					else<br />
					{<br />
					 echo strip_tags($offer["sb_description"]);<br />
					}<br />
					?&gt;</p>
<p>        =$max_allowed))<br />
		{<br />
		?&gt; </p>
<p>                      &nbsp;<br />
                      <strong>Default Ad<br />
                        </strong>&nbsp;</p>
<p>                      &nbsp;<br />
                      Become a Gold member and your<br />
                        Offer will appear here. </p>
<p>                      <strong>Default Ad<br />
                        </strong>&nbsp;</p>
<p>                      Become a Gold member and your<br />
                        Offer will appear here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sandip</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-33149</link>
		<dc:creator>sandip</dc:creator>
		<pubDate>Wed, 18 Feb 2009 18:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-33149</guid>
		<description>include_once &quot;myconnect.php&quot;;
include_once &quot;date_time_format.php&quot;;

if(isset($_REQUEST[&quot;cid&quot;]))
{
  $cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_pid=&quot; . $_REQUEST[&quot;cid&quot;]);
	$rs=mysql_num_rows($cat_query);
	
	if(($rs&lt;=0)&#124;&#124;($_REQUEST[&quot;cid&quot;]==0))
	{
	header(&quot;Location:&quot;.&quot;selloffers.php?cid=&quot;.$_REQUEST[&quot;cid&quot;]);
	die();
	}

}

function main()
{
$keyword=&quot;&quot;;
	if(isset($_REQUEST[&quot;keyword&quot;])&amp;&amp;($_REQUEST[&quot;keyword&quot;]&quot;&quot;))
	{
		$keyword=$_REQUEST[&quot;keyword&quot;];
	}

$config=mysql_fetch_array(mysql_query(&quot;select * from sbbleads_config&quot;));
if(($config[&quot;sb_image_magik&quot;]==&quot;enable&quot;))
{
$img_path=&quot;thumbs1/&quot;;
$img_pmt=&quot;&quot;;
}
else
{
$img_path=&quot;uploadedimages/&quot;;
$img_pmt=&quot;width=&quot;.$config[&quot;sb_th_width&quot;].&quot; height=&quot;.$config[&quot;sb_th_width&quot;];
}

$cid=0;
if(isset($_REQUEST[&quot;cid&quot;])&amp;&amp;($_REQUEST[&quot;cid&quot;]&quot;&quot;))
{
$cid=$_REQUEST[&quot;cid&quot;];
	$sbqu_off=&quot;update sbbleads_categories set sb_visit_sell=sb_visit_sell+1 where sb_id=$cid&quot;;
	mysql_query($sbqu_off);
}

/*$sell_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_offers where sb_approved=&#039;yes&#039;&quot;));
$buy_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_offers_buy where sb_approved=&#039;yes&#039;&quot;));
$product_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_products where sb_approved=&#039;yes&#039;&quot;));
$profile_num=mysql_num_rows(mysql_query(&quot;select * from sbbleads_companyprofiles where sb_approved=&#039;yes&#039;&quot;));*/

	$catname=&quot;&quot;;
	$category=0;
  
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $cid );
	if ($cat=mysql_fetch_array($cat_query))
	{
	$catname=$cat[&quot;sb_cat_name&quot;];
	$category=$cat[&quot;sb_id&quot;];
	}

	$catpath=&quot;&quot;;
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $cid );
	while ($rs=mysql_fetch_array($cat_query))
    {
    $catpath =&quot; &gt; &lt;a&gt;&quot; .$rs[&quot;sb_cat_name&quot;].&quot;&lt;/a&gt;&quot;.$catpath; 
  	$cat_query=mysql_query(&quot;Select * from sbbleads_categories where sb_id=&quot; . $rs[&quot;sb_pid&quot;] );
	}
?&gt; 

   
    
         
          
             &lt;input name=&quot;keyword&quot; type=&quot;text&quot; value=&quot;&quot; size=&quot;40&quot;&gt; 
              &#160;&#160; 
                Sell Offers
                Buy Offers
                Products Catalogs
                Company Profiles
              
              &#160;
              
              &#160; 
               
              &#160;&lt;a href=&quot;advance_search.php&quot; rel=&quot;nofollow&quot;&gt;Advance Search&lt;/a&gt;  &#160; 
            
          
        
      
  
  
    
        
          &#160;&lt;a href=&quot;index.php&quot; rel=&quot;nofollow&quot;&gt;Home&lt;/a&gt;
        
        
          
               
                &#8595; &#160;Sell Offers
                &#8594; &#160;&lt;a href=&quot;cat_buy.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Buy 
                  Offers&lt;/a&gt;
                &#8594; &#160;&lt;a href=&quot;cat_products.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Products&lt;/a&gt;
                &#8594; &#160;&lt;a href=&quot;cat_profiles.php&lt;?php if($cid0) echo &quot;?cid=&quot;.$cid;?&gt;&quot;&gt;Companies&lt;/a&gt;
              
            
        
      
      
    
  
   
    
	
         
          &lt;b&gt;Browse Sell Offers&lt;/b&gt;
        
        
          
               NOW() $sbcat_str&quot;;
	$sboff_count=mysql_num_rows(mysql_query($sbq_off_cat));

	$sbq_buy_cat=&quot;select * from sbbleads_offer_cats_buy, sbbleads_offers_buy where sb_approved=&#039;yes&#039; and sbbleads_offers_buy.sb_id=sbbleads_offer_cats_buy.sb_offer_id and DATE_ADD(sb_postedon,INTERVAL &quot;.$config[&quot;sb_expiry_buy&quot;].&quot; MONTH) &gt; NOW() $sbcat_str&quot;;
	$sbbuy_count=mysql_num_rows(mysql_query($sbq_buy_cat));
	
	$sbq_product_cat=&quot;select * from sbbleads_product_cats, sbbleads_products where sb_approved=&#039;yes&#039; and sbbleads_products.sb_id=sbbleads_product_cats.sb_offer_id $sbcat_str&quot;;
	$sbproduct_count=mysql_num_rows(mysql_query($sbq_product_cat));
	
	$sbq_profile_cat=&quot;select * from sbbleads_profile_cats, sbbleads_companyprofiles where sb_approved=&#039;yes&#039; and sbbleads_companyprofiles.sb_id=sbbleads_profile_cats.sb_profile_id $sbcat_str&quot;;
	$sbprofile_count=mysql_num_rows(mysql_query($sbq_profile_cat));
	$sbtotal=$sboff_count;//$sboff_count+$sbbuy_count+$sbproduct_count+$sbprofile_count;
//die();
	if($cnt%3==1)
	{
  ?&gt;
              &#160;
  
                 &lt;a href=&quot;index.php?cid=&quot;&gt; 
                  &lt;/a&gt;&lt;a href=&quot;cat_sell.php?cid=&quot;&gt;&lt;/a&gt;()
                
  
            
        
      
  
   
    
         
          &#160;Featured Offers 
        
		 NOW() order by sb_id desc&quot;;
	$sbrs_off=mysql_query($sbq_off); 
	$num_rows=mysql_num_rows($sbrs_off);
	$max_allowed=$config[&quot;sb_cat_featured&quot;];

	$number[0]=-1;
	if($num_rows&gt;$max_allowed)
	{
		for($i=0;$i&lt;$max_allowed;$i++)
		{
			$unique=0;
			while($unique==0)
			{
				$j=rand(0,$num_rows-1);
				for($k=0;$k(count($number)-1))
				{
					$unique=1;
				}
			}
			$number[$i]=$j;
					
		}
	}// end if num &gt; no_allowed
					/*for($k=0;$k&lt;count($number);$k++)
							{
								echo $number[$k].&quot; &quot;;
							}*/
	$row=0;
	$cnt=0;
	$offer=mysql_fetch_array($sbrs_off);
	while (($offer)&amp;&amp;($cnt$max_allowed)
		{
			for($k=0;$k
               
           
               
                 
                  &lt;? if ($images) {echo &quot;&lt;a&gt;&lt;/a&gt;&quot;; }  else
			   {
			   ?&gt;
                  &lt;img src=&quot;images/nopic.gif&quot; &gt; 
                  
                
                &#160;&lt;a 
                                href=&quot;view_offer.php?id=&quot;&gt; 
                  50)
					{
					 echo substr($offer[&quot;sb_title&quot;], 0,  strrpos( substr($offer[&quot;sb_title&quot;], 0, 50),&#039; &#039; ));  
					}
					else
					{
					 echo $offer[&quot;sb_title&quot;];  
					}
					?&gt;
                  &lt;/a&gt; [ 
                  
                  ]
              
               
                 &#160;Posted by &lt;strong&gt; 
                  
                  &lt;/strong&gt;&lt;strong&gt;[ 
                  
                  ]&lt;/strong&gt; on  
                  
              
               
                 &#160; 
                  100)
					{
					 echo substr(strip_tags($offer[&quot;sb_description&quot;]), 0,  strrpos( substr(strip_tags($offer[&quot;sb_description&quot;]), 0, 100),&#039; &#039; )) . &quot;..&quot;;  
					}
					else
					{
					 echo strip_tags($offer[&quot;sb_description&quot;]);  
					}
					?&gt;
                  
              
            
        =$max_allowed))
		{
		?&gt; 
                    
                      &#160;
                      &lt;strong&gt;Default Ad 
                        &lt;/strong&gt;&#160;
                    
                    
                      &#160;
                      Become a Gold member and your 
                        Offer will appear here. 
                    
                   
                     
                      &lt;strong&gt;Default Ad 
                        &lt;/strong&gt;&#160;
                    
                     
                      Become a Gold member and your 
                        Offer will appear here. 
                    
                  
		  
      
  

</description>
		<content:encoded><![CDATA[<p>include_once &#8220;myconnect.php&#8221;;<br />
include_once &#8220;date_time_format.php&#8221;;</p>
<p>if(isset($_REQUEST["cid"]))<br />
{<br />
  $cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_pid=&#8221; . $_REQUEST["cid"]);<br />
	$rs=mysql_num_rows($cat_query);</p>
<p>	if(($rs&lt;=0)||($_REQUEST["cid"]==0))<br />
	{<br />
	header(&#8221;Location:&#8221;.&#8221;selloffers.php?cid=&#8221;.$_REQUEST["cid"]);<br />
	die();<br />
	}</p>
<p>}</p>
<p>function main()<br />
{<br />
$keyword=&#8221;";<br />
	if(isset($_REQUEST["keyword"])&amp;&amp;($_REQUEST["keyword"]&#8220;&#8221;))<br />
	{<br />
		$keyword=$_REQUEST["keyword"];<br />
	}</p>
<p>$config=mysql_fetch_array(mysql_query(&#8221;select * from sbbleads_config&#8221;));<br />
if(($config["sb_image_magik"]==&#8221;enable&#8221;))<br />
{<br />
$img_path=&#8221;thumbs1/&#8221;;<br />
$img_pmt=&#8221;";<br />
}<br />
else<br />
{<br />
$img_path=&#8221;uploadedimages/&#8221;;<br />
$img_pmt=&#8221;width=&#8221;.$config["sb_th_width"].&#8221; height=&#8221;.$config["sb_th_width"];<br />
}</p>
<p>$cid=0;<br />
if(isset($_REQUEST["cid"])&amp;&amp;($_REQUEST["cid"]&#8220;&#8221;))<br />
{<br />
$cid=$_REQUEST["cid"];<br />
	$sbqu_off=&#8221;update sbbleads_categories set sb_visit_sell=sb_visit_sell+1 where sb_id=$cid&#8221;;<br />
	mysql_query($sbqu_off);<br />
}</p>
<p>/*$sell_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_offers where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$buy_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_offers_buy where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$product_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_products where sb_approved=&#8217;yes&#8217;&#8221;));<br />
$profile_num=mysql_num_rows(mysql_query(&#8221;select * from sbbleads_companyprofiles where sb_approved=&#8217;yes&#8217;&#8221;));*/</p>
<p>	$catname=&#8221;";<br />
	$category=0;</p>
<p>  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $cid );<br />
	if ($cat=mysql_fetch_array($cat_query))<br />
	{<br />
	$catname=$cat["sb_cat_name"];<br />
	$category=$cat["sb_id"];<br />
	}</p>
<p>	$catpath=&#8221;";<br />
  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $cid );<br />
	while ($rs=mysql_fetch_array($cat_query))<br />
    {<br />
    $catpath =&#8221; &gt; <a>&#8221; .$rs["sb_cat_name"].&#8221;</a>&#8220;.$catpath;<br />
  	$cat_query=mysql_query(&#8221;Select * from sbbleads_categories where sb_id=&#8221; . $rs["sb_pid"] );<br />
	}<br />
?&gt; </p>
<p>             &lt;input name=&#8221;keyword&#8221; type=&#8221;text&#8221; value=&#8221;" size=&#8221;40&#8243;&gt;<br />
              &nbsp;&nbsp;<br />
                Sell Offers<br />
                Buy Offers<br />
                Products Catalogs<br />
                Company Profiles</p>
<p>              &nbsp;</p>
<p>              &nbsp; </p>
<p>              &nbsp;<a href="advance_search.php" rel="nofollow">Advance Search</a>  &nbsp; </p>
<p>          &nbsp;<a href="index.php" rel="nofollow">Home</a></p>
<p>                &#8595; &nbsp;Sell Offers<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_buy.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Buy<br />
                  Offers<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_products.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Products<br />
                &#8594; &nbsp;&lt;a href=&#8221;cat_profiles.php&lt;?php if($cid0) echo &#8220;?cid=&#8221;.$cid;?&gt;&#8221;&gt;Companies</p>
<p>          <b>Browse Sell Offers</b></p>
<p>               NOW() $sbcat_str&#8221;;<br />
	$sboff_count=mysql_num_rows(mysql_query($sbq_off_cat));</p>
<p>	$sbq_buy_cat=&#8221;select * from sbbleads_offer_cats_buy, sbbleads_offers_buy where sb_approved=&#8217;yes&#8217; and sbbleads_offers_buy.sb_id=sbbleads_offer_cats_buy.sb_offer_id and DATE_ADD(sb_postedon,INTERVAL &#8220;.$config["sb_expiry_buy"].&#8221; MONTH) &gt; NOW() $sbcat_str&#8221;;<br />
	$sbbuy_count=mysql_num_rows(mysql_query($sbq_buy_cat));</p>
<p>	$sbq_product_cat=&#8221;select * from sbbleads_product_cats, sbbleads_products where sb_approved=&#8217;yes&#8217; and sbbleads_products.sb_id=sbbleads_product_cats.sb_offer_id $sbcat_str&#8221;;<br />
	$sbproduct_count=mysql_num_rows(mysql_query($sbq_product_cat));</p>
<p>	$sbq_profile_cat=&#8221;select * from sbbleads_profile_cats, sbbleads_companyprofiles where sb_approved=&#8217;yes&#8217; and sbbleads_companyprofiles.sb_id=sbbleads_profile_cats.sb_profile_id $sbcat_str&#8221;;<br />
	$sbprofile_count=mysql_num_rows(mysql_query($sbq_profile_cat));<br />
	$sbtotal=$sboff_count;//$sboff_count+$sbbuy_count+$sbproduct_count+$sbprofile_count;<br />
//die();<br />
	if($cnt%3==1)<br />
	{<br />
  ?&gt;<br />
              &nbsp;</p>
<p>                 &lt;a href=&#8221;index.php?cid=&#8221;&gt;<br />
                  &lt;a href=&#8221;cat_sell.php?cid=&#8221;&gt;()</p>
<p>          &nbsp;Featured Offers </p>
<p>		 NOW() order by sb_id desc&#8221;;<br />
	$sbrs_off=mysql_query($sbq_off);<br />
	$num_rows=mysql_num_rows($sbrs_off);<br />
	$max_allowed=$config["sb_cat_featured"];</p>
<p>	$number[0]=-1;<br />
	if($num_rows&gt;$max_allowed)<br />
	{<br />
		for($i=0;$i&lt;$max_allowed;$i++)<br />
		{<br />
			$unique=0;<br />
			while($unique==0)<br />
			{<br />
				$j=rand(0,$num_rows-1);<br />
				for($k=0;$k(count($number)-1))<br />
				{<br />
					$unique=1;<br />
				}<br />
			}<br />
			$number[$i]=$j;</p>
<p>		}<br />
	}// end if num &gt; no_allowed<br />
					/*for($k=0;$k&lt;count($number);$k++)<br />
							{<br />
								echo $number[$k].&#8221; &#8220;;<br />
							}*/<br />
	$row=0;<br />
	$cnt=0;<br />
	$offer=mysql_fetch_array($sbrs_off);<br />
	while (($offer)&amp;&amp;($cnt$max_allowed)<br />
		{<br />
			for($k=0;$k</p>
<p>                  &lt;? if ($images) {echo &#8220;<a></a>&#8220;; }  else<br />
			   {<br />
			   ?&gt;<br />
                  &lt;img src=&#8221;images/nopic.gif&#8221; &gt; </p>
<p>                &nbsp;&lt;a<br />
                                href=&#8221;view_offer.php?id=&#8221;&gt;<br />
                  50)<br />
					{<br />
					 echo substr($offer["sb_title"], 0,  strrpos( substr($offer["sb_title"], 0, 50),&#8217; &#8216; ));<br />
					}<br />
					else<br />
					{<br />
					 echo $offer["sb_title"];<br />
					}<br />
					?&gt;<br />
                   [ </p>
<p>                  ]</p>
<p>                 &nbsp;Posted by <strong> </p>
<p>                  </strong><strong>[ </p>
<p>                  ]</strong> on  </p>
<p>                 &nbsp;<br />
                  100)<br />
					{<br />
					 echo substr(strip_tags($offer["sb_description"]), 0,  strrpos( substr(strip_tags($offer["sb_description"]), 0, 100),&#8217; &#8216; )) . &#8220;..&#8221;;<br />
					}<br />
					else<br />
					{<br />
					 echo strip_tags($offer["sb_description"]);<br />
					}<br />
					?&gt;</p>
<p>        =$max_allowed))<br />
		{<br />
		?&gt; </p>
<p>                      &nbsp;<br />
                      <strong>Default Ad<br />
                        </strong>&nbsp;</p>
<p>                      &nbsp;<br />
                      Become a Gold member and your<br />
                        Offer will appear here. </p>
<p>                      <strong>Default Ad<br />
                        </strong>&nbsp;</p>
<p>                      Become a Gold member and your<br />
                        Offer will appear here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Keith Dsouza</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30371</link>
		<dc:creator>Keith Dsouza</dc:creator>
		<pubDate>Sat, 01 Nov 2008 07:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30371</guid>
		<description>@Shantanu @shubhodeep Thanks for the heads up, the issue has been fixed now</description>
		<content:encoded><![CDATA[<p>@Shantanu @shubhodeep Thanks for the heads up, the issue has been fixed now</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shubhodeep</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30370</link>
		<dc:creator>shubhodeep</dc:creator>
		<pubDate>Sat, 01 Nov 2008 06:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30370</guid>
		<description>yeah, as shantanu pointed out, the post is a bit cut off on the right hand side. I&#039;m suing FF3 under Vista.</description>
		<content:encoded><![CDATA[<p>yeah, as shantanu pointed out, the post is a bit cut off on the right hand side. I&#8217;m suing FF3 under Vista.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shubhodeep</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30369</link>
		<dc:creator>shubhodeep</dc:creator>
		<pubDate>Sat, 01 Nov 2008 06:56:29 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30369</guid>
		<description>thanks for the article. I emailed you and got a reply so early. thanks once again.</description>
		<content:encoded><![CDATA[<p>thanks for the article. I emailed you and got a reply so early. thanks once again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shantanu Goel</title>
		<link>http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30355</link>
		<dc:creator>Shantanu Goel</dc:creator>
		<pubDate>Fri, 31 Oct 2008 18:08:40 +0000</pubDate>
		<guid isPermaLink="false">http://techie-buzz.com/tips-and-tricks/create-seo-friendly-urls-with-mod-rewrite-and-php-part-ii.html#comment-30355</guid>
		<description>Keith, your posts appears cut off/hidden slightly on the right side to me. Am using FF3 under linux..</description>
		<content:encoded><![CDATA[<p>Keith, your posts appears cut off/hidden slightly on the right side to me. Am using FF3 under linux..</p>
]]></content:encoded>
	</item>
</channel>
</rss>
