Advertisement
jamboljack

JSTree Menu

Sep 17th, 2017
304
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.66 KB | None | 0 0
  1. <div id="selection">
  2.                     <ul>
  3.                         <li data-jstree='{"icon" : "fa fa-building-o"}'>
  4.                             <a href="<?php echo site_url('admin/penduduk/id/3320'); ?>">KABUPATEN JEPARA</a>
  5.                         </li>
  6.                         <?php
  7.                         $listKecamatan = $this->penduduk_m->select_kecamatan()->result();
  8.                         foreach($listKecamatan as $k) {
  9.                         ?>
  10.                         <li data-jstree='{"icon" : "fa fa-arrow-circle-o-right"}'>
  11.                             <?php
  12.                             $kecamatan_id = $k->kecamatan_id;
  13.                             ?>
  14.                             <a href="<?php echo site_url('admin/penduduk/kecamatan/'.$k->kecamatan_id); ?>"><?php echo 'KECAMATAN '.strtoupper($k->kecamatan_nama); ?></a>
  15.                             <?php
  16.                             $listDesa = $this->penduduk_m->select_desa($kecamatan_id)->result();
  17.                             if (count($listDesa) > 0) {
  18.                             ?>
  19.                             <ul>
  20.                                 <?php foreach($listDesa as $d) { ?>
  21.                                 <li data-jstree='{"icon" : "fa fa-angle-right"}'>
  22.                                     <a href="<?php echo site_url('admin/penduduk/desa/'.$d->desa_id); ?>"><?php echo 'DESA '.strtoupper($d->desa_nama); ?></a>
  23.                                 </li>
  24.                                 <?php } ?>
  25.                             </ul>
  26.                             <?php } ?>
  27.                         </li>
  28.                         <?php } ?>
  29.                     </ul>
  30.                 </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement