3 $GLOBALS['FREESIDE_PROCESS_LOGIN'] = true;
5 require( dirname( __FILE__ ) . '/wp-blog-header.php' );
7 $response = $GLOBALS['FREESIDE_LOGIN_RESPONSE'];
9 if ( $response['custnum'] || $response['svcnum'] ) {
11 wp_redirect("example_selfservice.php");
14 } elseif ( $response['customers'] ) {
18 <?php include(dirname(__FILE__).'/elements/error.php'); ?>
20 <FORM NAME="SelectCustomerForm" ACTION="process_select_cust.php" METHOD=POST>
21 <INPUT TYPE="hidden" NAME="action" VALUE="switch_cust">
23 <TABLE BGCOLOR="#c0c0c0" BORDER=0 CELLSPACING=2 CELLPADDING=0>
26 <TH ALIGN="right">Customer </TH>
28 <SELECT NAME="custnum" ID="custnum" onChange="custnum_changed()">
29 <OPTION VALUE="">Select a customer
30 <?php foreach ( $response['customers'] AS $custnum => $customer ) { ?>
31 <OPTION VALUE="<?php echo $custnum ?>"><?php echo htmlspecialchars( $customer ) ?>
38 <TD COLSPAN=2 ALIGN="center"><INPUT TYPE="submit" ID="submit" VALUE="Select customer" DISABLED></TD>
44 <SCRIPT TYPE="text/javascript">
46 function custnum_changed () {
47 var form = document.SelectCustomerForm;
48 if ( form.custnum.selectedIndex > 0 ) {
49 form.submit.disabled = false;
51 form.submit.disabled = true;
61 // die 'login successful, but unrecognized info (no custnum, svcnum or customers)';
67 <?php get_footer(); ?>