<?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.
 */

/**
 * Description of Ajax
 *
 * @author mzq163
 */
class Ajax extends CI_Controller {

    //put your code here
    var $datareturn = null;
    var $response_model = null;
    var $message = null;
    var $status = null;

    public function __construct() {
        parent::__construct();
        $this->load->model('Dashboard_model', 'd_model');
    }
    public function getTimeDifference() {
        $date1="06:50:55";
        $date2="06:53:00";
        $date= 11;
       
        print_r(date('H:i:s',$date));
    }

    /**
     * 
     * 
     * 
     * 
     */
    public function getModuleDetailBySessionId() {
        
        $this->status = true;
        $this->message = "Successfully data get.";
        $this->datareturn = $this->d_model->getModuleDetailBySessionIdModel($this->input->post('universal_unique_id'));
        print_r(json_encode(array('status'=> $this->status,'message'=> $this->message,'data'=> $this->datareturn,'single_array'=>array(3, 2, 3, 2, 4, 2, 3, 3, 3, 1, 1, 1))));
    }

    /**
     * 
     * 
     * 
     */

    /**
     * 
     * @return type
     * 
     * 
     */
    private function returnResponse() {
        return json_encode(array("status" => $this->status, "message" => $this->message, "data" => $this->datareturn,'group_array'=>array(3, 2, 3, 2, 4, 2, 3, 3, 3, 1, 1, 1)));
    }

}
