$filter = new InputFilter(); $HTTP_SESSION_VARS = $filter->xssFilterHard($HTTP_SESSION_VARS); global $G_TABLE; global $G_CONTENT; global $HTTP_SESSION_VARS; $tpl = new TemplatePower(PATH_TPL . 'testAuthenticationSource.html'); $tpl->prepare(); $tpl->assign('STYLE_CSS', defined('STYLE_CSS') ? STYLE_CSS : ''); $tpl->assign('title', $G_TABLE->title); $curAuthSource = $HTTP_SESSION_VARS['CURRENT_AUTH_SOURCE']; $dbc = new DBConnection(DB_HOST, DB_RBAC_USER, DB_RBAC_PASS, DB_RBAC_NAME); //crear nueva authentication source G::LoadClassRBAC('authentication'); $obj = new authenticationSource(); $obj->SetTo($dbc); $res = $obj->testSource($curAuthSource); //print "<textarea rows=50 cols=60>"; print_r ($res ); //print "</textarea >"; foreach ($res as $line) { if (stristr($line, 'error') !== false) { $line = "<font color='Red'>" . $line . '</font>'; } if (stristr($line, 'sucess') !== false) { $line = "<font color='Green'>" . $line . '</font>'; } $tpl->newBlock("lines"); $tpl->assign("text", $line); } $tpl->gotoBlock("_ROOT"); $tpl->printToScreen(); //die;