コード例 #1
0
ファイル: dac.courses.php プロジェクト: nagyist/Samarthya
/* 
 * 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"]);
            echo $courseObj->addCourseLogs($course, $date, $startTime, $status, $userId, $ipaddress);
        } else {
コード例 #2
0
         $colheader[$headerIndex] = $Row[$headerIndex];
     }
 } else {
     $idTestDetails;
     $courselinkId;
     $question;
     $option1;
     $option2;
     $option3;
     $option4;
     $answer;
     $active;
     for ($dataIndex = 0; $dataIndex < count($Row); $dataIndex++) {
         $courseObj = new Courses();
         if ($dataIndex == 0) {
             $idTestDetails = $courseObj->getCourseId($Row[$dataIndex]);
         } else {
             if ($dataIndex == 1) {
                 $courselinkId = $courseObj->getCourseLinkId($Row[$dataIndex]);
             } else {
                 if ($dataIndex == 2) {
                     $question = $Row[$dataIndex];
                 } else {
                     if ($dataIndex == 3) {
                         $option1 = $Row[$dataIndex];
                     } else {
                         if ($dataIndex == 4) {
                             $option2 = $Row[$dataIndex];
                         } else {
                             if ($dataIndex == 5) {
                                 $option3 = $Row[$dataIndex];