<?php include "../koneksi.php"; include "../fungsi.php"; $id = $_POST["id"]; $ada = mysql_query("DELETE FROM t_surat_keluar WHERE no_surat_keluar='{$id}'"); if ($ada == 1) { $space = "../LAMPIRAN/" . ambil_no_urut($id); hapus_dir($space); echo $ada; }
$data = $data . "<dd>" . $a["pengirim"] . "</dd>"; $data = $data . "<dt>KEPADA</dt>"; $data = $data . "<dd>" . nama_penerima($a["penerima_surat"]) . "</dd>"; $data = $data . "<dt>JENIS SURAT</dt>"; $data = $data . "<dd>" . $a["jenis"] . "</dd>"; $data = $data . "<dt>ISI SURAT</dt>"; $data = $data . "<dd>" . $a["isi_surat"] . "</dd>"; $data = $data . "<dt>PENANGGUNGJAWAB</dt>"; $data = $data . "<dd>" . nama_penerima($a["penandatangan"]) . "</dd>"; $data = $data . "<dt>PRIORITAS</dt>"; $data = $data . "<dd>" . $a["prioritas_surat"] . "</dd>"; $data = $data . "<dt>TEMBUSAN</dt>"; $data = $data . "<dd>" . nama_penerima($a["tembusan"]) . "</dd>"; $data = $data . "<dt>LAMPIRAN</dt>"; $file_array = explode(",", $a["lampiran_file"]); $urut = ambil_no_urut($a["no_surat_keluar"]); $l = ""; foreach ($file_array as $index => $file) { $l = $l . "<a href='" . "../LAMPIRAN/{$urut}/{$file}" . "' class='btn btn-link' type='button'>" . $file . "</a></br>"; } $data = $data . "<dd>" . $l . "</dd>"; $data = $data . "</dl>"; if (eksekusi_sql("UPDATE t_surat_masuk SET status='Terbaca' WHERE no_surat_keluar_fk='{$id}'")) { echo $data; } } else { echo "tidak ditemukan data"; } } else { echo "No Data"; }
echo '<a class="btn btnKirim" data="' . $data[1] . '" data-penerima="' . $data[3] . '"> <i class="icon-envelope"></i></a>'; echo '<a class="btn btnView" data="' . $data[1] . '"> <i class="icon-eye-open"></i></a>'; echo '<a class="btn btnPDF" data="' . $data[1] . '"> PDF</i></a>'; echo '<a class="btn btnHapus" data="' . $data[1] . '"> <i class="icon-trash"></i></a>'; echo '</div>'; echo '</div>'; echo "</td>"; echo "<td>" . $data[0] . "</td>"; echo "<td>" . $data[1] . "</td>"; echo "<td>" . $data[2] . "</td>"; echo "<td>" . nama_penerima($data[3]) . "</td>"; echo "<td>" . $data[4] . "</td>"; echo "<td>" . $data[5] . "</td>"; if (!empty($data[6])) { $tot_file = count(explode(",", $data[6])); echo "<td class='link' data-link='" . $data[6] . "'><a class='btn btn-link fileView' data-id='" . ambil_no_urut($data[1]) . "' type='button'>Ada <span class='badge badge-info'>{$tot_file}</span> File</a></td>"; } else { echo "<td><span class='label'>Tidak Ada File</span></td>"; } echo "<td>" . $data[7] . "</td>"; echo "</tr>"; } } ?> </table> </div> </div> </div> </div> </div>