308
2.62 Bunyi Hapus
Halaman Bunyi Hapus akan muncul ketika admin menekan button “Hapus” pada data yang akan dihapus. Pada halaman ini sistem akan
menampilkan pesan “Isyarat Bunyi berhasil dihapus”.
Gambar Halaman Bunyi Hapus
centerbrbrtr td scope=col colspan=5 align=centerfont color=redbi
if rowCount == 0 { out.printlnData Isyarat Bunti tidak ada;
} else { out.printlnKlik audio untuk memutar Isyarat Bunyi;
} ibfonttdtr
String dbConnErrMsg = null; } catch SQLException sqle {
dbConnErrMsg = sqle.getMessage; } finally {
album.release; }
tablebrbrtable Query
tampilBunyi :
public void tampilBunyi throws SQLException
{ if conn == null
{ conn = getConnection;
} stmt = OraclePreparedStatementconn.prepareStatement
select from bunyi order by nama_bu ; rset = OracleResultSetstmt.executeQuery;
}
309
Berikut ini potongan listing program bagian proses hapus data Isyarat Bunyi.
2.63 Bunyi Detail
Halaman Bunyi Detail adalah halaman untuk menampilkan detail keterangan bunyi dari data di kolom audio yang kita pilih atau kita akan
tampilkan.
Gambar Halaman Bunyi Detail
Berikut ini potongan listing program bagian proses Bunyi Detail.
String id = request.getParameterid_bu; try {
album.tampilBunyi; album.hapusBunyiid;
int rowCount = 0; while album.fetch {
rowCount++; }
String dbConnErrMsg = null; }
catch SQLException sqle { dbConnErrMsg = sqle.getMessage;
} finally { album.release;
} meta http-equiv=refresh content=2;url=BunyiTampil.jsp
center pfont size=3 color=000000bIsyarat Bunyi berhasil dihapusb brimg src=imageshap.png width=100 height=100fontp center
310
2.64 Bunyi Perbesar
Halaman Bunyi Perbesar adalah halaman yang berfungsi untuk memproses suara tampil dalam ukuran lebih besar.
String id = request.getParameterid; if id == null {
pMalformed URL, no id parameterp return;
} try {
album.selectRowByIdid; if album.fetch {
pEntry not found: = idp return;
} center
font style=arial color=blacktable summary=Lihat detail audio centerfont color=blackh1Detail Bunyih1fontcenterbr
table align=center width=60 trtd scope=col font color=blackh5bNama : bh5fonttd
td scope=col font color=blackh5 =
BunyiQuery.escapeHtmlStringalbum.getNama_buh5fonttdtrtr td scope=col font color=blackh5bDiskripsi : bh5fonttd
td scope=col font color=blackh5 =
BunyiQuery.escapeHtmlStringalbum.getDes_buh5fonttdtr trtd scope=col valign=topfont color=blackh5bAudio :
bh5fonttdtd scope=col audio autoplay controlssource src=BunyiPerbesar.jsp?id==album.getId_buaudiotdtrtablefontce
nter String id = request.getParameterid;
if id = null { try {
album.selectRowByIdid; if album.fetch {
response.setStatusresponse.SC_NOT_FOUND; return;
} handler.setPageContextpageContext;
handler.sendAudioalbum.getAudio; return;
} finally { album.release;
} }
311
Berikut ini potongan listing program halaman bunyi perbesar :
2.65 Bunyi Edit Form