Ejemplo n.º 1
0
<?php

require_once 'util/main.php';
require_once 'util/tags.php';
require_once 'model/database.php';
require_once 'model/course_db.php';
// Get the course list
$courseList = get_course_list();
// Display the home page
include 'home_view.php';
Ejemplo n.º 2
0
    global $db, $tpf;
    $q = $db->query("select server_name,server_oid from {$tpf}servers where server_oid>1 order by server_id asc");
    while ($rs = $db->fetch_array($q)) {
        $arr[] = $rs;
    }
    $db->free($q);
    unset($rs);
    return $arr;
}
switch ($action) {
    case 'index':
        $uid = (int) gpc('uid', 'GP', 0);
        $status = (int) gpc('status', 'GP', 0);
        if (in_array($task, array('search'))) {
        } else {
            $course_array = get_course_list();
            $course_array = $course_array['data'];
            $page_nav = multi($total_num, $perpage, $pg, urr(ADMINCP, "item={$item}&menu=file&action={$action}&view={$view}&uid={$uid}"));
            $dd = date('Y-m-d');
            require_once template_echo($item, $admin_tpl_dir, '', 1);
        }
        break;
    case 'course_view':
        if ($task) {
            switch ($task) {
                case 'course_view':
                    $file_id = gpc('file_ids', 'GP', 0);
                    $review_status = gpc('review_status', 'GP', 0);
                    $cs_id = gpc('cs_id', 'GP', 0);
                    $course_id = gpc('course_id', 'GP', 0);
                    foreach ($file_id as $k => $v) {
Ejemplo n.º 3
0
     unset($rs);
     if ($task == 'search') {
         $page_nav = multi($total_num, $perpage, $pg, urr("mydisk", "item={$item}&action={$action}&task={$task}&folder_id={$folder_id}&word=" . rawurlencode($word)));
     } else {
         $page_nav = multi($total_num, $perpage, $pg, urr("mydisk", "item={$item}&action={$action}&folder_id={$folder_id}"));
     }
     require_once template_echo('profile', $user_tpl_dir);
     break;
 case 'course_manage':
     if ($task == 'search') {
         $word = gpc('word', 'GP', '');
         $course_array = get_course_list($word, $perpage);
         $total_num = $course_array['total_num'];
         $course_array = $course_array['data'];
     } else {
         $course_array = get_course_list('', $perpage);
         $total_num = $course_array['total_num'];
         $course_array = $course_array['data'];
     }
     $nav_path = '<a href="' . urr("mydisk", "item=profile&action=course_manage") . '">课程管理</a>&raquo; ';
     if ($task == 'search') {
         $page_nav = multi($total_num, $perpage, $pg, urr("mydisk", "item={$item}&action={$action}&task={$task}&word=" . rawurlencode($word)));
     } else {
         $page_nav = multi($total_num, $perpage, $pg, urr("mydisk", "item={$item}&action={$action}"));
     }
     require_once template_echo('profile', $user_tpl_dir);
     break;
 case 'chapter_section_manage':
     $course_id = gpc('course_id', 'G', '');
     //该课程数据
     $chapter_section_array = !empty($course_id) ? get_chapter_section_list($course_id) : array();