0 or pla_error( "Uploaded file is empty." ); check_server_id( $server_id ) or pla_error( "Bad server_id: " . htmlspecialchars( $server_id ) ); have_auth_info( $server_id ) or pla_error( "Not enough information to login to server. Please check your configuration." ); include 'header.php'; ?>

Import LDIF File

Server: File: ( bytes)



hasVersionNumber()){ display_warning($ldifReader->getWarningMessage()); } //while we have a valid entry, while($entry = $ldifReader->readEntry()){ $changeType = $entry->getChangeType(); echo "".$actionString[$changeType]." ".$entry->dn; if($ldapWriter->ldapModify($entry)){ echo " ".$lang['success']."
"; flush(); } else{ echo " ".$lang['failed']."

"; reload_left_frame(); pla_error( $actionErrorMsg[$changeType]. " " . htmlspecialchars( utf8_decode( $entry->dn ) ), ldap_error( $ds ), ldap_errno( $ds ) ); } } // close the file $ldifReader->done(); //close the ldap connection $ldapWriter->ldapClose(); // if any errors occurs during reading file ,"catch" the exception and display it here. if($ldifReader->hasRaisedException()){ //get the entry which raise the exception,quick hack here $currentEntry = $ldifReader->getCurrentEntry(); if($currentEntry->dn !=""){ echo "".$actionString[$currentEntry->getChangeType()]." ".$currentEntry->dn." ".$lang['failed']."
"; } //get the exception wich was raised $exception = $ldifReader->getLdapLdifReaderException(); echo "
"; echo "
"; display_pla_parse_error($exception,$currentEntry); } reload_left_frame(); function reload_left_frame(){ global $server_id; echo "\r\n"; } function display_error_message($error_message){ echo "
".$error_message."
"; } function display_warning($warning){ echo "
".$warning."
"; } function display_pla_parse_error($exception,$faultyEntry){ global $lang; global $actionErrorMsg; $errorMessage = $actionErrorMsg[$faultyEntry->getChangeType()]; print("
"); print(""); print(""); print("
"); } ?>

".$lang['ldif_parse_error']."

"); print("
"); print($errorMessage." ". $faultyEntry->dn); print("

"); print("".$lang['desc'].": ".$exception->message); print("

"); print("

"); print("".$lang['ldif_line'].": ".$exception->currentLine); print("

"); print("

"); print("".$lang['ldif_line_number'].": ".$exception->lineNumber); print("

"); print("
"); print("

\r\n"); print("

"); print(""); print(sprintf($lang['ferror_submit_bug'] , get_href( 'add_bug' ))); print("

"); print("
"); print("