1 <? $title ='Change Package'; include('elements/header.php'); ?>
2 <? $current_menu = 'services.php'; include('elements/menu.php'); ?>
5 $get_params = array( 'pkgnum' );
6 foreach ( $get_params AS $param ) {
7 $params[$param] = $_GET[$param];
10 $customer_info = $freeside->customer_info_short( array(
11 'session_id' => $_COOKIE['session_id'],
14 $list_pkgs = $freeside->list_pkgs( array(
15 'session_id' => $_COOKIE['session_id'],
18 if ( isset($list_pkgs['error']) && $list_pkgs['error'] ) {
19 $error = $list_pkgs['error'];
20 header('Location:index.php?error='. urlencode($error));
26 foreach ( $cust_pkg AS $pkg ) {
27 if ( $pkg['pkgnum'] == $params['pkgnum'] ) {
28 $pkg_label = $pkg['pkg_label'];
29 $pkg_part = $pkg['pkgpart'];
30 $class_num = $pkg['classnum'];
34 $pkgselect = $freeside->mason_comp( array(
35 'session_id' => $_COOKIE['session_id'],
36 'comp' => '/elements/select-part_pkg.html',
37 'args' => [ 'classnum', $class_num, 'curr_value', $pkg_part, ],
41 if ( isset($pkgselect['error']) && $pkgselect['error'] ) {
42 $error = $pkgselect['error'];
43 header('Location:index.php?error='. urlencode($error));
49 <SCRIPT TYPE="text/javascript">
50 function enable_change_pkg () {
51 if ( document.ChangePkgForm.pkgpart_svcpart.selectedIndex > 0 ) {
52 document.ChangePkgForm.submit.disabled = false;
54 document.ChangePkgForm.submit.disabled = true;
59 <FONT SIZE=4>Purchase replacement package for "<? echo htmlspecialchars($pkg_label); ?>"</FONT><BR><BR>
61 <? include('elements/error.php'); ?>
63 <FORM NAME="ChangePkgForm" ACTION="process_packages_change.php" METHOD=POST>
64 <TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
68 <TABLE><TR><TD> <? echo $pkgselect['output']; ?>
75 <INPUT TYPE="hidden" NAME="custnum" VALUE="<? echo $customer_info['custnum'] ?>">
76 <INPUT TYPE="hidden" NAME="pkgnum" VALUE="<? echo $params['pkgnum'] ?>">
77 <INPUT TYPE="hidden" NAME="pkg" VALUE="<? echo $params['pkg'] ?>">
78 <INPUT TYPE="hidden" NAME="action" VALUE="process_change_pkg">
79 <INPUT NAME="submit" TYPE="submit" VALUE="Change Package">
82 <? include('elements/menu_footer.php'); ?>
83 <? include('elements/footer.php'); ?>