<?php
include 'header.php';
include('xcrud/xcrud.php');
echo Xcrud::load_css();
$xcrud=Xcrud::get_instance();
$xcrud->table('product');
$xcrud->validation_required('username,password,name,type');
$xcrud->change_type('type','select','admin','admin,user,app_user,restricted_user');
$xcrud->unset_title();
if($type!='admin'){
	$xcrud->where('user_id',$_SESSION['admin_id']);
	$xcrud->unset_add();
	$xcrud->unset_remove();
}
?>
<div class="row">
	<div class="col-sm-12"><button class="btn btn-blue btn-block">Product</button></div>
	<div class="col-sm-12">&nbsp</div>
	<div class="col-sm-12">
<?php
echo $xcrud->render();
?>
	</div>
</div>
</div>
</div>
</div>
<?php
include "footer.php";
echo Xcrud::load_js();
?>