//user is loged in and making request $msg = isset($_GET['loginerrorfeed']) ? $_GET["loginerrorfeed"] : ""; $smarty->assign("message", $msg); $smarty->assign('user_id', $id); $smarty->assign('token', $token); $smarty->assign('user', $auth->getFullName($id)); $smarty->assign('profile', $auth->getProfile($id)); if (isset($_GET["view"])) { $view = htmlspecialchars($_GET["view"]); $rtype = isset($_GET['rtype']) ? $_GET["rtype"] : ""; if ($view == "homeView") { go_homeforlogedin(); } else { if ($view == "resourceView") { if ($rtype == "documents") { $smarty->assign('documents', $rMan->getAllDocumentResources()); $smarty->assign('mainContent', $smarty->fetch("documentResource.tpl")); } else { if ($rtype == "images") { $smarty->assign('images', $rMan->getAllImageResources()); $smarty->assign('mainContent', $smarty->fetch("imageResources.tpl")); } else { if ($rtype == "videos") { $smarty->assign('videos', $rMan->getAllVideoResources()); $smarty->assign('mainContent', $smarty->fetch("videoResources.tpl")); } else { $smarty->assign('mainContent', $smarty->fetch("resources.tpl")); } } } $smarty->assign('errorfeed', '');