Пример #1
0
<?php

/* 
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
require 'dal.courses.php';
$action = $_GET["action"];
if ($action == 'courseListOnly') {
    $course = new Courses();
    $json = $course->viewCourseDetailsOnly();
    echo $json;
} else {
    if ($action == 'GetCourseId') {
        $courseName = $_GET["courseName"];
        $course = new Courses();
        $json = $course->getCourseId($courseName);
        echo $json;
    } else {
        if ($action == 'AddcourseVisited') {
            if (function_exists('date_default_timezone_set')) {
                date_default_timezone_set('Asia/Calcutta');
            }
            $userId = $_GET["userId"];
            $courseObj = new Courses();
            $course = $_GET["course"];
            $date = date("d/m/Y");
            $startTime = date("h:i:sa");
            $status = $_GET["status"];
            $ipaddress = urlencode($_GET["ipaddress"]);