dhtmlxWindow Login page

hi,



how to used dhtmlxwindow for the login form scenario.



this my case .



i have an application used dhtmlxlayout for main application (app.php)



in app.php should check the session of the user , if the session is invalid the login form displayed, after user enter user and password correctly login form closed and return to the app.php with the new session.





script that i already used :



app.php



<?php



include_once(“classes/CConnection.php”);

include_once(“classes/CParam.php”);

include_once(“classes/CSql.php”);



$appId = $_GET[‘appId’];

$context = $_GET[‘context’];

$session = 0;

$param = new CParam(“include/config.ini”);

$db = new CConnection();

$db->setDriver(“mysql”);



$param->loadConfig();

$section = “rad_database”;

$param->setSection($section);

$serverName = $param->getParamValue(“server”);

$dbName = $param->getParamValue(“dbname”);

$userName = $param->getParamValue(“username”);

$password = $param->getParamValue(“password”);

$port = $param->getParamValue(“port”);



$db->setServerName($serverName);

$db->setPort($port);

$db->setUserName($userName);

$db->setPassword($password);

$db->setDbName($dbName);

$db->connect();

$db->setIsDebug(false);

$conn = $db->getConn();



$sql = “select * from radapplication where app_id = $appId”;

$rs = $conn->Execute($sql);

//print_r($rs);

$radapp = $rs->FetchNextObject();

$header = $radpp->HEADER_IMAGE;



?>





<?php echo $radapp->APP_NAME?>













































<?php

if($session == 1){

?>



<?php

}else{

?>





<?php

}

?>









login.php



for example thereis form input username and password



if checking success



window login closed and in the app.php the value of $session must be 1 or (later i can used php session to handled it ).





window login closed
on successful login, login.php must contain next line


>>and in the app.php the value of $session must be 1 or
Technically, you need to reload page, right?
It can be initiated by adding, the next line to successful login.php output