$portal_name name of the portal $portal_id id of the portal $username username $password user password */ require "init.inc.php"; require "{$classdir}/portal_Rating.php"; require "{$classdir}/sotf_Portal.class.php"; if (strpos($_SERVER['PHP_SELF'], "portal_login.php")) { $page->redirect($rootdir . "/index.php"); } //if called directly $portal_name = substr($_SERVER["PATH_INFO"], 1); //if (!isset($_SERVER["PATH_INFO"]) OR ($portal_name == "")) die("Error 404!"); //needs the information which portal $portal = new sotf_Portal($portal_name); $portal_id = $portal->getId(); //count page_impression if ($portal_id == NULL) { $query = "UPDATE portal_statistics SET number=number+1, timestamp='" . $db->getTimestampTz() . "' WHERE name='page_impression' AND portal_id IS NULL"; } else { $query = "UPDATE portal_statistics SET number=number+1, timestamp='" . $db->getTimestampTz() . "' WHERE name='page_impression' AND portal_id = {$portal_id}"; } $db->query($query); if ($portal_id == NULL and !strpos($_SERVER['PHP_SELF'], "index.php")) { $page->redirect($rootdir . "/index.php"); } //redirect if no such portal AND not called from there ////user login and logout//// if (sotf_Utils::getParameter('login_user')) { $username = sotf_Utils::getParameter('username'); //get username if sended