$offsetKey = 'offset_' . $type; $method = 'get_' . $type; $offset = isset($_REQUEST[$offsetKey]) ? intval($_REQUEST[$offsetKey]) : 0; $max = intval($prefs['maxRecords']); $forUser = ''; if (!$globalperms->payment_admin && (($type == 'outstanding' || $type == 'overdue') && $prefs['payment_user_only_his_own'] == 'y' || $type != 'outstanding' && $type != 'overdue' && $prefs['payment_user_only_his_own_past'] == 'y')) { $forUser = $user; } $data = $paymentlib->{$method}($offset, $max, $forUser); $data['offset'] = $offset; $data['offset_arg'] = "offset_{$type}"; $data['max'] = $max; $smarty->assign($type, $data); } if ($prefs['feature_categories'] == 'y' && $globalperms->payment_request) { $cat_type = 'payment'; $cat_objid = ''; $cat_object_exists = false; $smarty->assign('section', 'payment'); require 'categorize_list.php'; } if (isset($_REQUEST['invoice'])) { $smarty->assign('invoice', $_REQUEST['invoice']); } fetch_payment_list('outstanding'); fetch_payment_list('overdue'); fetch_payment_list('past'); fetch_payment_list('canceled'); fetch_payment_list('authorized'); $smarty->assign('mid', 'tiki-payment.tpl'); $smarty->display('tiki.tpl');
$forUser = $user; } $data = $paymentlib->$method($offset, $max, $forUser); $data['offset'] = $offset; $data['offset_arg'] = "offset_$type"; $data['max'] = $max; $smarty->assign($type, $data); } if ( $prefs['feature_categories'] == 'y' && $globalperms->payment_request ) { $cat_type = 'payment'; $cat_objid = ''; $cat_object_exists = false; $smarty->assign('section', 'payment'); require 'categorize_list.php'; } if ( isset($_REQUEST['invoice']) ) { $smarty->assign('invoice', $_REQUEST['invoice']); } fetch_payment_list('outstanding'); fetch_payment_list('overdue'); fetch_payment_list('past'); fetch_payment_list('canceled'); $smarty->assign('mid', 'tiki-payment.tpl'); $smarty->display('tiki.tpl');