File: /home/cafsindia/ntc_cafsinfotech_in/cron/scheduler_model.php
<?php
require_once('./ntcObject.php');
class scheduler_model extends dbconnect{
protected $dbObj = null;
protected $tracking = null;
protected $emailer = null;
protected $domain = null;
public function __construct() {
$this->open_db();
$this->tracking = ntcObject::newObject('tracking');
$this->emailer = ntcObject::newObject('emailer');
$this->domain = $_SERVER['SERVER_NAME'];
}
//GET VEHICLE LAST POSITION
public function get_last_position(){
return $this->tracking->get_last_position();
}
//GET VEHICLE POSITION HISTORY
public function get_position_history($assetid,$form_date){
return $this->tracking->get_position_history($assetid,$form_date);
}
/* TRIPS START */
//GET VEHICLE TRIP INFORMATION
public function get_vehicle_trip_information($tripid){
return $this->tracking->get_vehicle_trip_information($tripid);
}
//GET TRIPS INFORMATION OF VEHICLE FOR SPECIFIC DATE
public function get_specific_trip_info($assetid,$fromdate,$todate){
return $this->tracking->get_specific_trip_info($assetid,$fromdate,$todate);
}
//GET TRIPS DETAIL OF VEHICLE FOR SPECIFIC DATE
public function get_specific_trip_details_info($assetid,$fromdate,$todate){
return $this->tracking->get_specific_trip_details_info($assetid,$fromdate,$todate);
}
//GET ALL TRIPS INFORMATION OF ALL VEHICLE FOR SPECIFIC DATE
public function get_all_trip_info($fromdate,$todate){
return $this->tracking->get_all_trip_info($fromdate,$todate);
}
//GET ALL TRIP DETAILS OF ALL VEHICLE FOR SPECIFIC DATE
public function get_all_trip_details_info($fromdate,$todate){
return $this->tracking->get_all_trip_details_info($fromdate,$todate);
}
//GET ALL TRIP DETAILS OF ALL VEHICLE FOR SPECIFIC DATE
public function get_trip_information(){
return $this->emailer->read_email();
}
/* TRIPS END */
}
?>