<?php
        if (!function_exists('ldap_connect')) {
		echo "missing";
	}else{
		echo "ok...YEY!!!!";
	}
#phpinfo();

class TestADIntegrationPlugin extends ADIntegrationPlugin {

        /**
         * Output debug informations
         * 
         * @param integer level
         * @param string $notice
         */
        protected function _log($level = 0, $info = '') {
                if ($level <= $this->_loglevel) {
                        $output = '<span class="';
                        switch ($level) {
                                case ADI_LOG_DEBUG:
                                        $output .= 'debug">[DEBUG]  ';
                                        break;
                                case ADI_LOG_INFO:
                                        $output .= 'info">[INFO]   ';
                                        break;
                                case ADI_LOG_NOTICE:
                                        $output .= 'NOTICE">[NOTICE] ';
                                        break;
                                case ADI_LOG_WARN:
                                        $output .= 'warn">[WARN]   ';
                                        break;
                                case ADI_LOG_ERROR:
                                        $output .= 'error">[ERROR]  ';
                                        break;
                                case ADI_LOG_FATAL:
                                        $output .= 'fatal">[FATAL]  ';
                                                break;
                                default:
                                        $output .= 'debug';
                        }
                        $output .= str_replace("\n","<br />         ",$info).'</span><br />';

                        echo $output;
                }
        }
}

$ADI = new TestADIntegrationPlugin();

 $result = $ADI->authenticate(NULL, "sopas.cortes", "");
echo $result;
?>
