<?php

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

class Dashboard extends CI_Controller {
	function __construct() {
        parent::__construct();
		error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
		$this->load->helper('file');
    //$this->load->library('leaflet');
    }
    public function index() {
      $tiga=$this->db->query("SELECT * from web_setting where id='1'");
      foreach ($tiga->result() as $rt) {
      $nama_sekolah=$rt->nama;
      $latx=$rt->lat_x;
      $laty=$rt->lat_y;
      }
		  $data['statusserver'] = 'SELAMAT DATANG ADMIN';
  		$data['warna'] = 'success';
  		$data['keterangan'] = 'Aplikasi Siap di gunakan';
      $data['namasek'] = $nama_sekolah;
      $data['koordinat'] = $latx.','.$laty;
  		$this->session->set_userdata($sess_data);
  		$this->template->display('dashboard',$data);

    }

    function logout() {
        $this->session->sess_destroy();
        redirect('login');
    }

}
