<?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Payment extends Admin_Controller {

    public function index() {
        $data = array();

        $this->load->model('admindash_model');
        $out = $this->admindash_model->getAdminDashData($data);
        $data['recent_signup'] = $out['recent_signup'];

        $this->load->model('service_model');
        $outx = $this->service_model->getServiceRequestList(100);
        $data['transport_request'] = $outx['service_request_list'];

        $this->load->library('googlemaps');
        $config['center'] = 'atalnta,GA,USA';
        $config['zoom'] = 'auto';
        $config['directions'] = TRUE;
        $config['directionsStart'] = '4201 defoors farm trail, powder springs, GA 30127, USA';
        $config['directionsEnd'] = '2324 stancrest ln, lawrenceville, 30044, GA, USA';
        $config['directionsDivID'] = 'directionsDiv';
        $this->googlemaps->initialize($config);
        $data['map'] = $this->googlemaps->create_map();

        $mysql = "SELECT * FROM payment WHERE dt_confirmed IS NOT NULL";
            

            $this->load->library('table');
            $this->table->set_template($this->template);

            
            $query = $this->db->query($mysql);
         //   $this->table->set_heading(array('data' => 'Location Name', 'style' => 'width:220px'), 'Email', array('data' => 'Zipcode', 'style' => 'width:100px'));
            $data['payment_table'] = $this->table->generate($query);

            
            
            
        
        
        $this->renderAdminPage('payment/view_payment', $data);
    }

}
