$user user object $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');
<?php require "init.inc.php"; require "{$classdir}/sotf_Portal.class.php"; $t1 = sotf_Utils::getParameter('t1'); $t2 = sotf_Utils::getParameter('t2'); $t3 = sotf_Utils::getParameter('t3'); //$settings = $_SESSION["settings"]; //$portal = new sotf_Portal($settings["table"]); $portal = new sotf_Portal("1"); //TODO:xxxxxx $portal->setSettings($_SESSION["settings"]); if (isset($t1)) { $sql = "SELECT settings FROM portal_templates WHERE id='3'"; $result = $db->getOne($sql); $settings = unserialize(base64_decode($result)); $_SESSION["settings"] = $settings; //save result $page->redirect("closeAndRefresh.php"); //close window and go back to edit mode } elseif (isset($t2)) { $sql = "SELECT settings FROM portal_templates WHERE id='6'"; $result = $db->getOne($sql); $settings = unserialize(base64_decode($result)); $_SESSION["settings"] = $settings; //save result $page->redirect("closeAndRefresh.php"); //close window and go back to edit mode } elseif (isset($t3)) { $sql = "SELECT settings FROM portal_templates WHERE id='5'"; $result = $db->getOne($sql);