function vle_showheader($sel, $force)
{
    $e = error_reporting(E_ERROR);
    $fm = $_COOKIE["P14MENU"];
    $sc = $_COOKIE["SAMS2session"];
    error_reporting($e);
    $menutype = 0;
    if ($force == "student") {
        $menutype = 1;
    }
    if ($force == "tutor") {
        $menutype = 2;
    }
    if ($menutype == 0) {
        if ($fm == "Y") {
            $menutype = 1;
        }
        $p = strpos($sc, "samsStudentPI=");
        if ($p !== FALSE) {
            $menutype = 1;
        }
        if ($menutype == 0) {
            $p = strpos(getenv("HTTP_SAMS_AUTHID_MATCH"), "00000005");
            if ($p !== FALSE) {
                $menutype = 2;
            }
        }
    }
    if ($menutype == 2) {
        vle_showtutorhomeheader();
    }
    if ($menutype != 1) {
        return;
    }
    $urlhead = "https://msds";
    if ($fm == "Y" && $force != "on") {
        $urlhead = "http://csintra1";
    }
    echo "<div class=\"sh-header\">";
    echo "<ul>";
    echo "<li class=\"sh-home\"><a href=\"" . $urlhead . ".open.ac.uk/students/index.aspx\">StudentHome</a></li>";
    echo "<li class=\"sh-profile\"><a href=\"" . $urlhead . ".open.ac.uk/students/profile.aspx\"";
    if ($sel == 2) {
        echo " class=\"selected\"";
    }
    echo ">Profile</a></li>";
    echo "<li class=\"sh-study\"><a href=\"" . $urlhead . ".open.ac.uk/students/study.aspx\"";
    if ($sel == 3) {
        echo " class=\"selected\"";
    }
    echo ">Study</a></li>";
    echo "<li class=\"sh-community\"><a href=\"" . $urlhead . ".open.ac.uk/students/oulife.aspx\">Community</a></li>";
    echo "<li class=\"sh-help\"><a href=\"" . $urlhead . ".open.ac.uk/students/help.aspx\">Help Centre</a></li>";
    echo "</ul></div><div style=\"clear:both;\">";
}
Exemplo n.º 2
0
function vle_showheader($sel)
{
    echo "<script type=\"text/javascript\" src=\"/includes/header-vle.js\"></script>\r\n";
    echo "<script type=\"text/javascript\">if (typeof window.ou_sitestat=='function')ou_sitestat();</script>";
    echo "<script type=\"text/javascript\" src=\"/includes/ioxmenu-vle.js\"></script>\r\n";
    echo "<div id=\"ouskip\"><a id=\"ou-skip5\" href=\"#ou-content\">Skip to content</a></div><div id=\"ouheader\" class=\"wide\">\r\n";
    echo "<a href=\"http://www.open.ac.uk/\"><img src=\"/includes/headers-footers/oulogo-56.jpg\" alt=\"The Open University\" width=\"83\" height=\"56\" id=\"ounewlogo\" /></a>\r\n";
    echo "<ul id=\"ouheader1\"><li class=\"first\"><a href=\"http://www.open.ac.uk/browsealoud/\">Listen to this page</a></li><li><a href=\"http://www.open.ac.uk/accessibility/\">Accessibility</a></li><li id=\"ou-person\" class=\"hide\"></li><li id=\"ou-studenthome\" class=\"hide\"><a href=\"https://msds.open.ac.uk/students/\">StudentHome</a></li><li id=\"ou-tutorhome\" class=\"hide\"><a href=\"https://msds.open.ac.uk/tutorhome/\">TutorHome</a></li><li id=\"ou-intranet\" class=\"hide\"><a href=\"http://intranet.open.ac.uk/oulife-home/\">IntranetHome</a></li><li id=\"ou-signout\" class=\"hide\"><a class=\"ou-key\" href=\"https://msds.open.ac.uk/signon/samsoff.aspx\">Sign out</a></li><li id=\"ou-signin1\"><a class=\"ou-key\" id=\"ou-signin2\" href=\"https://msds.open.ac.uk/signon/sams001.aspx\">Sign in</a></li><li><a href=\"http://www3.open.ac.uk/contact/\">Contact us</a></li></ul>\r\n";
    echo "<ul id=\"ouheader2\"><li class=\"first\"><a href=\"http://www.open.ac.uk/\">The Open University</a></li><li><a href=\"http://www3.open.ac.uk/study/\">Study at the OU</a></li><li><a href=\"http://www3.open.ac.uk/about/\">About the OU</a></li><li><a href=\"http://www.open.ac.uk/research/\">Research at the OU</a></li><li><a href=\"http://www.open.ac.uk/search\">Search the OU</a></li></ul>\r\n";
    echo "</div><div style=\"clear:both\"></div><div>\r\n";
    // We only display the menu if a student, or the P14MENU cookie is present (in which case all links go to alias site)
    $e = error_reporting(E_ERROR);
    $fm = $_COOKIE["P14MENU"];
    $sc = $_COOKIE["SAMS2session"];
    error_reporting($e);
    if ($fm != "Y" && strpos($sc, "samsStudentPI=") == FALSE) {
        vle_showtutorhomeheader();
        return;
    }
    $urlhead = "https://msds";
    if ($fm == "Y") {
        $urlhead = "http://csintra1";
    }
    echo "<div id=\"fsvlemenu\">";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/index.aspx\" class=\"fsvlem1\">StudentHome</a>";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/profile.aspx\" class=\"fsvlem2";
    if ($sel == 2) {
        echo " fsvles2";
    }
    echo "\">Profile</a>";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/courselist.aspx\" class=\"fsvlem3";
    if ($sel == 3) {
        echo " fsvles3";
    }
    echo "\" onmouseover=\"ioe_showmenu(3)\" onmouseout=\"ioe_hidemenu()\" onclick=\"ioe_hidemenu()\">Modules</a>";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/quallist.aspx\" class=\"fsvlem4";
    if ($sel == 4) {
        echo " fsvles4";
    }
    echo "\" onmouseover=\"ioe_showmenu(4)\" onmouseout=\"ioe_hidemenu()\" onclick=\"ioe_hidemenu()\">Qualifications</a>";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/studysupport.aspx\" class=\"fsvlem3\">OU Life</a>";
    echo "<a href=\"" . $urlhead . ".open.ac.uk/students/help.aspx\" class=\"fsvlem5\">Help</a>";
    echo "</div><div id=\"fsvlemenu2\"></div><div style=\"clear:both;\"></div><script type=\"text/javascript\">//<![CDATA[\n";
    vle_createmenuvariables();
    echo "\nioe_createmenus();\r\n//]]></script>";
}