Location: PHPKode > projects > Arab Cart > arabCart/files/right.php
<?php
/*
  ArabCart, Free E-Commerce Solutions
  http://www.arabcart.info

  Copyright (c) 2005 Mhd Zaher Ghaibeh

  Released under the GNU General Public License
  This program is free software; you can redistribute it and/or
  modify it under the terms of the GNU General Public License
  as published by the Free Software Foundation; either version 2
  of the License, or (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
  USA.
*/


	//brings the products from the shoping cart database

		$cart=mysql_query("select cart.product_id , prod.name , cart.session from products prod , cart_temp cart where prod.id = cart.product_id AND cart.session='".$PHPSESSID."' AND prod.avaliable <> 0 Order by cart.id DESC limit 0,5") or die(mysql_error());

	if(mysql_num_rows($cart)!=0)

	{

		$template -> setAttribute("cartmenu", "visibility", "visible");

		while($row_cart=mysql_fetch_object($cart))

		{

			$template -> AddVar("cartmenu","PRO-NAME",$row_cart->name);

			$template -> AddVar("cartmenu","PRO-ID",$row_cart->product_id);

			$template -> AddVar("cartmenu","SID",$PHPSESSID); 

			$template -> parseTemplate("cartmenu","a");

		}

	}

	else

	{

		$template -> AddVar("right","SORRY",SorryC); 

	}

?>
Return current item: Arab Cart