Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00033 require_once "include/inc.header.php";
00034 require_once "classes/class.ilSQL2XML.php";
00035 require_once "classes/class.ilDOMXML.php";
00036
00037 ob_start();
00038
00039 if (!$rbacsystem->checkAccess("read",$_GET["lm_id"]))
00040 {
00041 $ilias->raiseError($lng->txt("permission_denied"),$ilias->error_obj->MESSAGE);
00042 }
00043
00044
00045
00046 $sql2xml = new ilSQL2XML($_GET["lm_id"],$_GET["lo_id"]);
00047 $lo = $sql2xml->getLearningObject();
00048 $navbar = $sql2xml->setNavigation();
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060 $path = getcwd();
00061 $xsl = file_get_contents($path."/xml/default.xsl");
00062
00063 $args = array( '/_xml' => $lo, '/_xsl' => $xsl );
00064 $xh = xslt_create();
00065 $output = xslt_process($xh,"arg:/_xml","arg:/_xsl",NULL,$args);
00066 echo xslt_error($xh);
00067 xslt_free($xh);
00068
00069
00070
00071 $tpl->addBlockFile("CONTENT", "content", "tpl.lo_content.html");
00072 $tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
00073 $tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
00074 $tpl->touchBlock("buttons");
00075
00076
00077 if (!isset($_SESSION["viewmode"]) or $_SESSION["viewmode"] == "flat")
00078 {
00079 $tpl->setCurrentBlock("btn_cell");
00080 $tpl->setVariable("BTN_LINK","lo.php?viewmode=tree");
00081 $tpl->setVariable("BTN_TXT", $lng->txt("treeview"));
00082 $tpl->parseCurrentBlock();
00083 }
00084 else
00085 {
00086 $tpl->setCurrentBlock("btn_cell");
00087 $tpl->setVariable("BTN_LINK","lo.php?viewmode=flat");
00088 $tpl->setVariable("BTN_TARGET","target=\"_parent\"");
00089 $tpl->setVariable("BTN_TXT", $lng->txt("flatview"));
00090 $tpl->parseCurrentBlock();
00091 }
00092
00093 $tpl->setCurrentBlock("content");
00094 $tpl->setVariable("LM_NAVBAR",$navbar);
00095 $tpl->setVariable("LO_CONTENT",$output);
00096 $tpl->parseCurrentBlock();
00097
00098 $tpl->show();
00099
00100
00101 $ret_str = ob_get_contents();
00102 ob_end_clean();
00103
00104 echo $ret_str;
00105
00106 echo "<p><i>server processing time: ".ilUtil::StopWatch($t_pagestart)." seconds</i></p>";
00107 ?>