<?php

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

class Peta extends CI_Controller {
	function __construct() {
        parent::__construct();
		error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
		$this->load->helper('file');
    }
    public function index() {
      if ($this->session->userdata('username')=='') {
              redirect('login');
          }
          $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('admin/peta',$data);

    }


}
