<?php
/*  
	[Phpup.Net!] (C)2009-2011 Phpup.net.
	This is NOT a freeware, use is subject to license terms

	$Id: admin.class.php 2010-08-24 10:42 $
*/

if(!defined('IN_PHPUP')) {
	exit('Access Denied');
}
header("Content-type:text/html;charset=".$GLOBALS['charset']);
class index_controller
{
	function index_controller()
	{
		include ROOT_PATH.'/models/common.php';
	}
	function index_action()
	{
		$couponcate_mod=new common('plugin_coupon_cate');
		$cates = $couponcate_mod->GetPage ();
		$cateid=intval($_REQUEST['cateid']);
		$container='';
		$ext='';
		if($cateid)
		{
			$container.='and class='.$cateid;
			$ext.='&cateid='.$cateid;
		}
		$coupon_mod=new common('plugin_coupon');
		$showpage = array ('isshow' => 1, 'currentpage' => $_REQUEST ['page'], 'pagesize' => 20, 'url' => 'index.php?pluginid=coupon', 'example' => 2 );
		$coupons = $coupon_mod->GetPage ( $showpage,$container );
		
		include ROOT_PATH.'/plugins/coupon/views/default/index.php';
	}
}