include_once('components/product_category/model.php');
include_once('components/product_category/views/view.php');
class Controller
{
function doAction()
{
switch ($_REQUEST['p_sub'])
{
case 'list':
if($_REQUEST['opt_view'] =='insert')
{
Model::insert();
}
if($_REQUEST['opt_view'] =='delete')
{
Model::delete($_GET['del_id']);
}
if($_REQUEST['opt_view'] =='update')
{
Model::update($_GET['edit_id']);
}
$data=Model::getall(0);
View::showGrid($data);
break;
case 'form':
if($_REQUEST['opt_view'] =='edit')
{
$obj_ = Model::getSingleItem($_GET['edit_id']);
}
$cdata = Model::getParentCategory();
View::showForm($obj_,$cdata);
break;
}
}
}
?>
No comments:
Post a Comment