Location: PHPKode > projects > XplainCart > xplaincart-1.0/index.php
<?php
ob_start();
require_once '../../mainfile.php';
require_once('library/define.php');
require_once 'library/init_class.php';
require_once 'library/cart_func_class.php';
class plaincart_index_class{
	function plaincart(){
		global $xoopsTpl;
		global $xoopsModuleConfig;
		$init=new init_class;	//trim POST,GET construction
		$shopConfig=$init->getShopConfig();		//for footer only and for troubleshoot values display in the footer
		static $pageTitle;
		$_SESSION['shop_return_url'] = $_SERVER['REQUEST_URI'];
		$catId  = (isset($_GET['c']) && $_GET['c'] != '1') ? $_GET['c'] : 0;
		$pdId   = (isset($_GET['p']) && $_GET['p'] != '') ? $_GET['p'] : 0;
		if ($pdId) {
			$pageTitle="Product Detail Page";
		} else if ($catId) {
			$pageTitle="Product List Page";
		} else {
			$pageTitle="Category List Page";
		}
		$xoopsTpl->assign('pdId',$pdId);
		$xoopsTpl->assign('catId',$catId);
		////////////////header
		include 'include/header.php';
		////////////////top
		include 'include/top.php';
		////////////////leftNav
		include 'include/leftNav.php';
		////////////////content
		if ($pdId) {
			////////////pd_detail
			//if(isset($_GET['action']))
			//	if($_GET['action']=='add'){
			//		$cart_func=new cart_func_class;
			//		$cart_func->addToCart();
			//}
			include 'include/pd_detail.php';
		} else if ($catId) {
			////////////pd_list
			include 'include/pd_list.php';
		} else {
			////////////cat_list
			include 'include/cat_list.php';
		}
		////////////////miniCart
		include 'include/miniCart.php';
		////////////////footer
		include 'include/footer.php';
	}
}
$xoopsOption['template_main']='plaincart_index.html';
include XOOPS_ROOT_PATH.'/header.php';
$plaincart_index=new plaincart_index_class;
$plaincart_index->plaincart();
include XOOPS_ROOT_PATH.'/footer.php';
ob_end_flush();
?>
Return current item: XplainCart