3 require('freeside.class.php');
4 $freeside = new FreesideSelfService();
6 $response = $freeside->login( array(
7 'username' => strtolower($_POST['username']),
8 'domain' => strtolower($_POST['domain']),
9 'password' => strtolower($_POST['password']),
12 #error_log("[login] received response from freeside: $response");
14 $error = $response['error'];
18 header('Location:login.php?username='. urlencode($username).
19 '&domain='. urlencode($domain).
20 '&error='. urlencode($error)
28 $session_id = $response['session_id'];
30 #error_log("[login] logged into freeside with session_id=$session_id");
32 // now what? for now, always redirect to the main page.
33 // eventually, other options?
35 header("Location:main.php?session_id=$session_id")