tag. These are *required* ?>
"; print_r( $auth ); exit;
print "Authentication PASSED
";
### Here is where you'd set your cookie or session variable to maintain a logged-in state
### For this demo, I print out the variables:
print "";
print "FullName = '" . $auth['fullname'] . "'
";
print "ShortName = '" . $auth['shortname'] . "'
";
print "FirstName = '" . $auth['firstname'] . "'
";
print "MiddleName = '" . $auth['middlename'] . "'
";
print "LastName = '" . $auth['lastname'] . "'
";
print "NickName = '" . $auth['nickname'] . "'
";
print "Email = '" . $auth['email'] . "'
";
print "District = '" . $auth['district'] . "'
";
print "Division = '" . $auth['division'] . "'
";
print "Flotilla = '" . $auth['flotilla'] . "'
";
### $auth['offices'] is an array. Cycle through and print them out
$i = 0;
foreach( $auth['offices'] as $office)
print "Office " . $i++ . " = '$office'
";
### $auth['comps'] is an array. Cycle through and print them out
$i = 0;
foreach( $auth['comps'] as $comp)
print "Comp " . $i++ . " = '$comp'
";
print "\n";
print "Request:\n" . htmlspecialchars( str_replace("><", ">\n<", $edirectory->request ) ) . "\n\n\n";
print "Response:\n" . htmlspecialchars( str_replace("><", ">\n<", $edirectory->response ) ) . "\n\n\n";
print "Debug:\n" . htmlspecialchars( str_replace("><", ">\n<", $soap_client->debug_str ) ) . "\n\n\n";
print "";
/*
Once you have this information (name, email, etc.) you can have some fun:
* Display their name on the page, or forum messages, etc.
* Make access decisions based on Offices held or District, Division, Flotilla
*/
} else {
### No form submitted yet, show it
?>
This site uses the same username and password as
the Auxiliary eDirectory
} ### end if form submitted
?>