getCorePath () .'class/AjaxLogon.php'; session_name ($instance->getSession ()); session_start (); define ('XOAD_AUTOHANDLE', true); require_once $instance->getCorePath () .'xoad/xoad.php'; XOAD_Server::allowClasses ('AjaxLogon'); if (XOAD_Server::runServer ()) exit (); if (isset ($_POST['login']) && isset ($_POST['password'])) { $logon = new AjaxLogon; if ($logon->logon ($_POST)) { Message::singleton ()->clear (); header ('Location: titan.php'); die (); } $message = Message::singleton (); $_GET['error'] = ''; while ($error = $message->get (Message::TEXT)) $_GET['error'] .= $error; $message->clear (); sleep (3); } $skin = Skin::singleton (); if (isset ($_POST['login'])) $login = $_POST['login']; elseif (isset ($_GET['login'])) $login = $_GET['login']; else $login = ''; $publicUserTypes = array (); while ($userType = Security::singleton ()->getUserType ()) if ($userType->showRegister () && ($userType->getType () == UserType::TPROTECTED || $userType->getType () == UserType::TPUBLIC)) $publicUserTypes [] = $userType; $validateTerm = FALSE; try { $db = Database::singleton (); $query = $db->query ("SELECT currval ('". $db->getSchema () ."._document')"); if (!is_null ($query->fetchColumn ())) $validateTerm = TRUE; } catch (PDOException $e) { if ($e->getCode () == '55000') $validateTerm = TRUE; } if (Social::isActive ()) { if (isset ($_GET['error']) && $_GET['error'] == 'access_denied') $_GET['error'] = __ ('Apparently you deny this application to access your profile data. Without granting this permission is not possible to authenticate!'); $socialButtons = array (); while ($driver = Social::singleton ()->getSocialNetwork ()) { if ($driver->authenticate ()) try { if ($driver->login ()) { ?>
getMessage (); } catch (PDOException $e) { $_GET ['error'] .= $e->getMessage (); } $socialButtons [$driver->getName ()] = array ($driver->getLoginUrl (), 'titan.php?target=loadFile&file=repos/social/'. $driver->getName () .'/_resource/button.png'); } } ?>