
  public function index()
  {
    $data['title'] = 'Akun';
    $data['breadcumb'] = [
      [
        'link' => base_url('Akun'),
        'nama' => 'Home',
        'class' => ' active',
        'area' => ''
      ], [
        'link' => base_url('Akun/Wali'),
        'nama' => 'Wali',
        'class' => '',
        'area' => ''
      ]
    ];
    $data['user'] = $this->db->get_where('register', ['email' => $this->session->userdata('pin')])->row_array();
    $data['wali'] = $this->db->get_where('wali', ['idRegister' => $data['user']['id']])->row_array();
    $data['dataUser'] = $this->GetBiodata();
    $data['setting'] = $this->db->get('kop_surat')->row_array();
    $data['provinsi'] = $this->db->get('provinces')->result_array();
    $data['pendidikan'] = $this->db->get('pendididikan')->result_array();
    $data['penghasilan'] = $this->db->get('penghasilan')->result_array();
    $data['pekerjaan'] = $this->db->get('pekerjaan')->result_array();
    $data['alamat'] = $this->akun->getAlamat();
    if ($data['user']['statusDaftar'] == 1) {
      // $this->load->view('themplate/Akun/maps', $data);
      $this->load->view('themplate/Akun/header', $data);
      $this->load->view('Akun/index', $data);
      $this->load->view('themplate/Akun/footer', $data);
      $this->load->view('themplate/Akun/footermaps', $data);
    } else {
      $this->load->view('themplate/Akun/header', $data);
      if ($data['user']['statusDaftar'] == 3) {
        $data['jarak'] = $this->akun->statistikJarakPerjalaur($data['user']['id_jalur']);
        $data['nilai'] = $this->akun->statistiknilaiPerjalaur($data['user']['id_jalur']);
        $data['usia'] = $this->akun->statistikUsiaPerjalaur($data['user']['id_jalur']);
        $data['skor'] = $this->akun->statistikKejuaraan();
        $data['statistik'] = $this->akun->statistikPendaftar();
        // var_dump($data['statistik']);
        // die;
        $data['pendaftar'] = $this->akun->pendaftaran();
        // var_dump($data['pendaftar']);die;
        $this->load->view('Akun/User_v', $data);
      } else {
        $data['pendaftarBelumVerifikasi'] = $this->akun->pendaftarBelumVerifikasi();
        $this->load->view('Akun/User', $data);
      }
      $this->load->view('themplate/Akun/footer', $data);
    }
  }
