예제 #1
0
    $faculty_id = $_SESSION['faculty_id'];
    $campus_id = $_SESSION['campus_id'];
    $adm_yr = $_SESSION['adm_yr'];
    $query .= " AND `classes`.`school_course_id` = '{$pursuing_course}' AND `classes`.`department_id` = '{$department_id}'\n\tAND `classes`.`faculty_id` = '{$faculty_id}' AND `classes`.`campus_id` = '{$campus_id}' AND   `classes`.`student_adm_yr`= '{$adm_yr}'";
}
$query .= " ORDER BY  `classes`.`class_days` ASC ";
if ($result = mysqli_query($conn, $query)) {
    while ($classes = mysqli_fetch_assoc($result)) {
        $course_name = $classes['course_name'];
        $lec_name = $classes['lec_name'];
        $class_room = $classes['class_room'];
        $class_start = $classes['class_start'];
        $class_stop = $classes['class_stop'];
        $class_days = $classes['class_days'];
        if ($client == "desktop") {
            showClasses($course_name, $lec_name, $class_room, $class_start, $class_stop, $class_days);
        } else {
            echo json_encode(array_map("utf8_encode", $classes)) . ",";
        }
    }
} else {
    echo "Error " . mysqli_error($conn) . "<br />";
}
function showClasses($course_name, $lec_name, $class_room, $class_start, $class_stop, $class_days)
{
    global $count_1;
    global $count_2;
    global $count_3;
    global $count_4;
    global $count_5;
    global $day;
예제 #2
0
 public function get_view()
 {
     ob_start();
     echo '<div class="row container">';
     echo '<a class="btn btn-default" href="AuthIndexPage.php">Menu</a> ';
     echo '<a class="btn btn-default" href="' . filter_input(INPUT_SERVER, 'PHP_SELF') . '?new=1">Add Class</a> ';
     echo '<a class="btn btn-default" href="' . filter_input(INPUT_SERVER, 'PHP_SELF') . '?edit=1">Edit Class</a> ';
     echo '<a class="btn btn-default" href="' . filter_input(INPUT_SERVER, 'PHP_SELF') . '?remove=1">Delete Class</a>';
     echo '</div>';
     showClasses();
     return ob_get_clean();
 }
예제 #3
0
파일: view.php 프로젝트: Roemke/resop
//zu komplex
//echo $OUTPUT->heading(get_string('modulename','resop'));
echo $OUTPUT->box_start();
//show some links if no action is set
$context = context_module::instance($cm->id);
if (has_capability('mod/resop:book', $context) && $urlparams['action'] != 'insert' && $urlparams['action'] != 'edit') {
    showInsertLink($id);
}
if (empty($urlparams['action'])) {
    showListOfLinks($id, $resop);
}
if ($urlparams['action'] == 'showAll') {
    showClasses($id, '%');
} else {
    if ($urlparams['action'] == 'showClass') {
        showClasses($id, $urlparams['class']);
    } else {
        if (has_capability('mod/resop:book', $context)) {
            if ($urlparams['action'] == 'insert') {
                showInsEditForm($url, $id, $resop);
            } else {
                if ($urlparams['action'] == 'edit') {
                    $editId = $urlparams['editId'];
                    showInsEditForm($url, $id, $resop, $editId);
                } else {
                    if ($urlparams['action'] == 'showBooker') {
                        showBookers($id, $urlparams['name']);
                    }
                }
            }
        }