X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=ng_selfservice%2Fpackages_change.php;h=20685e8841641fcdc0ada941ea9d304907eff56a;hb=d040dd06eb4b4bd1d5991445038296f952a38d13;hp=8b4386ce0c9db6ff74f339a91d1d81144ed71b08;hpb=3237b4cfdf3e507d5d4e04f2d3cf9b925d5ee953;p=freeside.git
diff --git a/ng_selfservice/packages_change.php b/ng_selfservice/packages_change.php
index 8b4386ce0..20685e884 100644
--- a/ng_selfservice/packages_change.php
+++ b/ng_selfservice/packages_change.php
@@ -2,6 +2,11 @@
$current_menu = 'services.php'; include('elements/menu.php'); ?>
+$get_params = array( 'pkgnum' );
+foreach ( $get_params AS $param ) {
+ $params[$param] = $_GET[$param];
+}
+
$customer_info = $freeside->customer_info_short( array(
'session_id' => $_COOKIE['session_id'],
) );
@@ -18,20 +23,18 @@ if ( isset($list_pkgs['error']) && $list_pkgs['error'] ) {
extract($list_pkgs);
-$get_params = array( 'pkgnum', 'pkg' );
-foreach ( $get_params AS $param ) {
- $params[$param] = $_GET[$param];
+foreach ( $cust_pkg AS $pkg ) {
+ if ( $pkg['pkgnum'] == $params['pkgnum'] ) {
+ $pkg_label = $pkg['pkg_label'];
+ $pkg_part = $pkg['pkgpart'];
+ $class_num = $pkg['classnum'];
+ }
}
-$pkgnum = $_GET['pkgnum'];
-$pkg = $_GET['pkg'];
-
$pkgselect = $freeside->mason_comp( array(
'session_id' => $_COOKIE['session_id'],
'comp' => '/elements/select-part_pkg.html',
- 'args' => array( 'custnum' => $customer_info['custnum'],
- 'curr_value' => 'current_value',
- ),
+ 'args' => [ 'classnum', $class_num, 'curr_value', $pkg_part, ],
)
);
@@ -53,7 +56,7 @@ function enable_change_pkg () {
}
-Purchase replacement package for " echo $pkg; ?>"
+Purchase replacement package for " echo htmlspecialchars($pkg_label); ?>"
include('elements/error.php'); ?>