localize header / merge github#56
[freeside.git] / ng_selfservice / quotation_add_pkg.php
1 <? require('elements/session.php');
2
3 $dest = 'quotation.php';
4
5 if ( isset($_REQUEST['pkgpart']) ) {
6
7   $results = array();
8
9   $params = array( 'custnum', 'pkgpart' );
10
11   $matches = array();
12   if ( preg_match( '/^(\d+)$/', $_REQUEST['pkgpart'] ) ) {
13
14     $args = array(
15         'session_id' => $_COOKIE['session_id'],
16         'pkgpart'    => $_REQUEST['pkgpart'],
17     );
18
19     $results = $freeside->quotation_add_pkg($args);
20
21   }
22
23   if ( isset($results['error']) && $results['error'] ) {
24     $dest .= '?error=' . $results['error'] . ';pkgpart=' . $_REQUEST['pkgpart'];
25   }
26 }
27
28 header("Location:$dest");
29
30 ?>
31