function ambil_nomor_urut() { $urut = ambil_data_sql("SELECT no_surat_keluar FROM t_surat_keluar ORDER BY urut DESC LIMIT 1"); $pos_char = strpos($urut[0], "/", 0); $urut_no = substr($urut[0], 0, $pos_char); $urut_no = $urut_no + 1; return $urut_no; }
<div class="row"> <div class="span12"> <div class="row"> <div class="span3 well" style="max-width: 340px; padding: 8px 0;"> <ul class="nav nav-list"> <li class="nav-header"><i class="icon-envelope"></i>Menu</li> <li><a href="SURAT_MASUK/surat_masuk.php">Surat Masuk</a></li> <li><a href="SURAT_KELUAR/surat_keluar.php">Surat Keluar</a></li> <li><a href="utama.php?p=arsip">Arsip Surat Dan Dokumen</a></li> <li class="divider"></li> <li class="nav-header"><i class="icon-bell"></i>Notifikasi</li> <?php $id_user = $_SESSION['id']; $sql = "SELECT count(*) as tot FROM t_kirim_surat WHERE id_user='******' AND status='Belum Terbaca'"; $data = ambil_data_sql($sql); $tot = $data[0]; ?> <li><a href="#">ada <span class="badge badge-warning"><?php echo $tot; ?> </span> surat masuk</a></li> <li class="divider"></li> <li class="nav-header"><i class="icon-th-list"></i>MASTER DATA</li> <li><a href="utama.php?p=user">Data User</a></li> <li><a href="utama.php?p=kop">Data Kop Surat</a></li> <li><a href="utama.php?p=jenis">Data Jenis Surat</a></li> <li><a href="utama.php?p=disposisi">Data Disposisi Masuk</a></li> <li class="divider"></li> <li class="nav-header"><i class="icon-user"></i>informasi login</li>