</style> </head> <body> <h1 style="font-size: 14pt">AD Integration Logon Test</h1> <?php if (function_exists('ldap_connect')) { echo "openLDAP installed\n"; } else { die('openLDAP not installed'); } ?> <div id="output"> <?php // Let's go! $result = $ADI->authenticate(NULL, $_GET['user'], $_GET['password']); ?> </div> <?php if ($result) { echo 'User logged on.'; } else { echo 'Logon failed'; } ?> </body> </html>
<body> <h1 style="font-size: 14pt">AD Integration Logon Test</h1> <?php if (function_exists('ldap_connect')) { echo "openLDAP installed\n"; } else { die('openLDAP not installed'); } ?> <div id="output"> <?php // Let's go! if (isset($_POST['AD_Integration_test_user']) && isset($_POST['AD_Integration_test_user'])) { $result = $ADI->authenticate(NULL, $_POST['AD_Integration_test_user'], $_POST['AD_Integration_test_password']); } else { // no POST data echo 'Got no user and password.'; $result = false; } ?> </div> <?php if ($result) { echo 'User logged on.'; } else { echo 'Logon failed'; } ?>