* Released under GPL lisence (http://www.fsf.org/licensing/licenses/gpl.txt) */ //------------/* Show error if this page is called directly. if ( basename($_SERVER['PHP_SELF']) <> 'index.php') { echo '

Sorry, this page can\'t be served directly. '; echo 'Try this instead.

'; exit; } //------------/* Initialize entry values. $fields = array('uid', 'userpassword', 'cn', 'employeetype', 'preferredlanguage', 'displayname'); $entry = $ldap->init_useradd_values( $fields ); //------------/* Do Action if POST if ( isset( $_POST['useradd'] ) ) { $message = $ldap->do_action( $entry, 'add' ); } //------------/* Display useradd action results if ( isset($message) ) { echo $message; } //------------/* Display useradd title echo '

' . ucfirst(translate('add')) . ' ' . translate('user') . '

'; //------------/* Display useradd form echo show_useradd_form( $entry ); ?>