<?php
require_once("vcl/vcl.inc.php");
//Includes
require_once("dmAuth.php");
use_unit("openlogin/openlogin.inc.php");
use_unit("forms.inc.php");
use_unit("extctrls.inc.php");
use_unit("stdctrls.inc.php");

//Class definition
class frmLogin extends Page
{
   public 
$OpenLogin1 null;
   function 
OpenLogin1Login($sender$params)
   {
      
//Clicking the login button, we set the username and userpassword
      //properties of the ZAuth component to the values entered by the user.
      //After that, return the result of the authentication

      
global $dmAuth;

      
$dmAuth->ZAuth->UserName $params['username'];
      
$dmAuth->ZAuth->UserPassword $params['password'];

      return(
$dmAuth->ZAuth->Authenticate());
   }
}

global 
$application;

global 
$frmLogin;

//Creates the form
$frmLogin = new frmLogin($application);

//Read from resource file
$frmLogin->loadResource(__FILE__);

//Shows the form
$frmLogin->show();

?>