/** * Main include file of the system, it contains all the parameters required for * the operation of this system.. */ require_once "./common/ini/config.ini.php"; //User not logged in System if (!isset($_SESSION["identified"]) || $_SESSION["identified"] != 1) { list($libraryName, $libraryCode) = getAllLibraries(); $smarty->assign("collectionLibrary", $libraryName); $smarty->assign("codesLibrary", $libraryCode); //User trying to log-in if ($_SERVER['REQUEST_METHOD'] == "POST") { if (isset($_GET["action"]) && !preg_match("=/=", $_GET["action"])) { if ($_REQUEST["field"]["action"] == "do") { $misession = new sessionManager(); $checkUserPwd = $misession->checkLogin($_REQUEST["field"]["username"], $_REQUEST["field"]["password"], $_REQUEST["field"]["selLibrary"]); switch ($checkUserPwd) { case "OK": unset($_GET["action"]); $page = 'index'; $smartyTemplate = "homepage"; $listRequest = "homepage"; $smarty->assign("totalMaskRecords", totalDb("mask")); $smarty->assign("totalTitleRecords", totalDb("title")); $smarty->assign("totalTitlePlusRecords", totalDb("titleplus")); break; case "Error1": unset($_SESSION); $page = 'index'; user_error($BVS_LANG["errorLogIn"], E_USER_ERROR); break;