/
list_products.php
41 lines (33 loc) · 1.15 KB
/
list_products.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
/**
* @version $Header$
* @package warehouse
* @subpackage functions
*/
/**
* required setup
*/
require_once( '../kernel/setup_inc.php' );
$gBitSystem->verifyPackage( 'warehouse' );
if ( !$gBitUser->hasUserPermission('p_warehouse_view') ) {
$gBitSystem->fatalError( 'You do not have prermission to view this package' );
}
require_once( WAREHOUSE_PKG_PATH.'Product.php');
global $gBitSystem, $gBitSmarty;
$gProduct = new Product();
/* Process the input parameters this page accepts */
if ( !empty($_REQUEST['product_id']) ) {
$gBitSmarty->assign_by_ref('gProductId', $_REQUEST['product_id']);
}
if ( !empty($_REQUEST['client_id']) ) {
$gBitSmarty->assign_by_ref('gClientId', $_REQUEST['client_id']);
}
$productList = $gProduct->getList( $_REQUEST );
// Pagination Data
$gBitSmarty->assign_by_ref( 'listInfo', $_REQUEST['listInfo'] );
$gBitSmarty->assign( 'productList', $productList );
// Display the template
$gDefaultCenter = "bitpackage:warehouse/list_products.tpl";
$gBitSmarty->assign_by_ref( 'gDefaultCenter', $gDefaultCenter );
$gBitSystem->display( 'bitpackage:kernel/dynamic.tpl', 'List Product Descriptions' , array( 'display_mode' => 'list' ));
?>