예제 #1
0
 public function detil($id)
 {
     $agenda = substr($id, 0, 1);
     $disposisi = new Disposisi();
     if ($agenda != 'S') {
         $data = $this->model->getSuratById($id);
         $this->view->data[0] = $this->model->getId();
         $this->view->data[1] = $this->model->getAgenda();
         $this->view->data[2] = $this->model->getTglTerima();
         $this->view->data[3] = $this->model->getTglSurat();
         $this->view->data[4] = $this->model->getNomor();
         $this->view->data[5] = $this->model->getAlamat();
         $this->view->data[6] = $this->model->getPerihal();
         $this->view->data[7] = $this->model->getFile();
         $this->view->dataSurat = array();
         $this->view->dataSurat[] = $this->view->data;
     } else {
         $param = array('no_agenda' => $id);
         $data = $this->model->getSuratById($param);
         $this->view->data[0] = $this->model->getId();
         $this->view->data[1] = $this->model->getAgenda();
         $this->view->data[2] = $this->model->getTglTerima();
         $this->view->data[3] = $this->model->getTglSurat();
         $this->view->data[4] = $this->model->getNomor();
         $this->view->data[5] = $this->model->getAlamat();
         $this->view->data[6] = $this->model->getPerihal();
         $this->view->data[7] = $this->model->getFile();
         $this->view->dataSurat = array();
         $this->view->dataSurat[] = $this->view->data;
     }
     $this->view->ddisp = $disposisi->getDisposisi(array('id_surat' => $this->view->data[0]));
     $id_disp = $disposisi->id_disposisi;
     $bagian = Session::get('bagian');
     $this->view->ddispkasi = $disposisi->getDisposisiKasi($id_disp, $bagian);
     $lamp = new Lampiran_Model();
     $this->view->lampiran = $lamp->getLampiranSurat($this->view->data[0], 'SM');
     $this->view->count = count($this->view->lampiran);
     /*
      * hapus notifikasi
      */
     $notif = new Notifikasi();
     $id_user = 0;
     $user = Session::get('user');
     $sql = "SELECT id_user FROM user WHERE username=:user";
     $param = array(':user' => $user);
     $data = $this->model->select($sql, $param);
     //var_dump($data);
     foreach ($data as $val) {
         $id_user = $val['id_user'];
     }
     $sql = "SELECT id_notif FROM notifikasi WHERE id_user=:id_user AND id_surat=:id_surat AND jenis_surat=:jenis";
     $param = array(':id_user' => $id_user, ':id_surat' => $id, ':jenis' => 'SM');
     $data = $this->model->select($sql, $param);
     foreach ($data as $val) {
         $notif->set('id_notif', $val['id_notif']);
         $notif->set('stat_notif', 0);
         $notif->setNotif();
     }
     //render tampilan
     $this->view->render('suratmasuk/detilsurat');
 }
예제 #2
0
 public function ikhtisarKlas()
 {
     $klas = $_POST['queryString'];
     $klas = str_replace("-", " ", $klas);
     $ikhtisar = new IkhtisharArsip();
     $id = $ikhtisar->getArsipByKlasifikasi($klas);
     echo "<div id=table-wrapper><h2 align=center><font color=black>DAFTAR IKHTISAR DOKUMEN/ARSIP</font></h2>";
     echo "<h3 align=center>KLASIFIKASI ARSIP : " . $klas . "</h3>";
     echo "</br><div id=chart-wrapper><table class=CSSTableGenerator>";
     echo "<tr><td><font color=black><b>No</b></font></td>\r\n            <td><font color=black><b>Uraian</b></font></td>\r\n            <td><font color=black><b>Tipe Surat</b></font></td>\r\n            <td><font color=black><b>Tipe Naskah</b></font></td>            \r\n            </tr>";
     $no = 1;
     foreach ($id as $val) {
         $tipe = $val->tipe == 'SM' ? 'Surat Masuk' : 'Surat Keluar';
         $lamp = new Lampiran_Model();
         $lampsurat = $lamp->getLampiranSurat($val->id_surat, $val->tipe);
         $lampiran = '';
         foreach ($lampsurat as $value) {
             $tgl = is_null($value['tanggal']) ? '' : Tanggal::tgl_indo($value['tanggal']);
             $lampiran .= $value['nomor'] . ' : ' . $tgl . '</br>' . $value['hal'] . '<hr>';
         }
         $tgl_surat = is_null($val->tgl_surat) ? '' : Tanggal::tgl_indo($val->tgl_surat);
         echo "<tr><td><font color=black><b>{$no}</b></font></td>\r\n            <td><font color=black><b>{$val->no_surat} : " . $tgl_surat . "</br>{$val->alamat}</b></font>";
         if ($lampiran != '') {
             echo '<hr><b>LAMPIRAN :</b></br>' . $lampiran;
         }
         echo "</td>\r\n            <td><font color=black><b>{$tipe}</b></font></td>\r\n            <td><font color=black><b>{$val->klas}</b></font></td>            \r\n            </tr>";
         $no++;
     }
 }
예제 #3
0
 public function detil($id)
 {
     $data = $this->model->getSuratById($id, 'detil');
     //        foreach ($data as $value) {
     $this->view->id = $data->getId();
     $this->view->rujukan = $this->model->getRujukan();
     $this->view->tipe = $this->model->getTipeSurat();
     $this->view->no_surat = $this->model->getNomor();
     $this->view->tgl_surat = $this->model->getTglSurat();
     $this->view->tujuan = $this->model->getAlamat();
     $this->view->perihal = $this->model->getPerihal();
     $this->view->sifat = $this->model->getSifat();
     $this->view->jenis = $this->model->getJenis();
     $this->view->lampiran = $this->model->getJmlLampiran();
     $this->view->file = $this->model->getFile();
     $this->view->status = $this->model->getStatus();
     //        }
     $lamp = new Lampiran_Model();
     $this->view->datal = $lamp->getLampiranSurat($this->view->id, 'SK');
     $this->view->count = count($this->view->datal);
     /*
      * hapus notifikasi
      */
     $notif = new Notifikasi();
     $id_user = 0;
     $user = Session::get('user');
     $sql = "SELECT id_user FROM user WHERE username=:user";
     $param = array(':user' => $user);
     $data = $this->model->select($sql, $param);
     //var_dump($data);
     foreach ($data as $val) {
         $id_user = $val['id_user'];
     }
     $sql = "SELECT id_notif FROM notifikasi WHERE id_user=:id_user AND id_surat=:id_surat AND jenis_surat=:jenis";
     $param = array(':id_user' => $id_user, ':id_surat' => $id, ':jenis' => 'SK');
     $data = $this->model->select($sql, $param);
     foreach ($data as $val) {
         $notif->set('id_notif', $val['id_notif']);
         $notif->set('stat_notif', 0);
         $notif->setNotif();
     }
     $this->view->render('suratkeluar/detilsurat');
 }