unbreak RADIUS usage report, #72425, from #42310
[freeside.git] / ng_selfservice / process_select_cust.php
1 <?
2
3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
5
6 $response = $freeside->switch_cust( array( 
7   'session_id' => $_COOKIE['session_id'],
8   'custnum'    => $_POST['custnum'],
9 ) );
10
11 #error_log("[switch_cust] received response from freeside: $response");
12
13 $error = $response['error'];
14
15 if ( $error ) {
16
17   //this isn't well handled... but the only possible error is a session timeout?
18
19   header('Location:index.php?username='. urlencode($username).
20                            '&domain='.   urlencode($domain).
21                            '&email='.    urlencode($email).
22                            '&error='.    urlencode($error)
23         );
24   die();
25
26 }
27
28 // sucessful customer selection
29
30 header("Location:main.php");
31
32 ?>