} } else { $SMARTY->assign('error', $AUTH->error); $SMARTY->assign('target', '?' . $_SERVER['QUERY_STRING']); function login_adbox() { $obj = new xajaxResponse(); if ($result = fetch_url(INETLMS_ADV_URL)) { $obj->assign("id_login_adbox", "innerHTML", base64_decode($result)); } else { $obj->assign("id_login_adbox", "innerHTML", "<img src='img/logo.gif'>"); } return $obj; } $ver = @file_get_contents('https://raw.githubusercontent.com/inetlms/lms/master/README.md'); $_newversion = NULL; if ($ver) { $ver = str_replace("\n", "", $ver); $ver = str_replace("iNET LMS ", "", $ver); if ($ver != LMSV && version_compare($ver, LMSV) == '1') { $_newversion = $ver; } } $LMS->InitXajax(); $LMS->RegisterXajaxFunction('login_adbox'); $SMARTY->assign('xajax', $LMS->RunXajax()); $SMARTY->assign('_newversion', $_newversion); $SMARTY->display('login.html'); } $SESSION->close(); $DB->Destroy();