public static function index() { $courseId = $_GET['snavId']; $navId = $_GET['navId']; $courseId = $_GET['snavId']; $content = mod_course::getOne($courseId); $currentNav = getCurrentNav($navId); $currentNavInfo = getCurrentNavInfo($courseId); render_template("course.php", array("navId" => $navId, "snavId" => $courseId, "content" => $content, "currentNav" => $currentNav, "currentNavInfo" => $currentNavInfo)); }
public static function index() { $navId = $_GET['navId']; $snavId = $_GET['snavId']; $rs = mod_article::getList($snavId); $articleType = $rs[0]['articleType']; $currentNav = getCurrentNav($navId); $currentNavInfo = getCurrentNavInfo($snavId); $args = array("navId" => $navId, "snavId" => $snavId, "content" => $rs, "currentNav" => $currentNav, "currentNavInfo" => $currentNavInfo); if ($articleType == "1") { //text render_template("article_text.php", $args); } if ($articleType == "2") { //list render_template("article_list.php", $args); } if ($articleType == "3") { //imglist render_template("article_imgList.php", $args); } }