private void menampilkanBerkasDigital(String norawat) {
try {
if(chkBerkasDigital.isSelected()==true){
try{
rs2=koneksi.prepareStatement(
“select master_berkas_digital.nama,berkas_digital_perawatan.lokasi_file “+
“from berkas_digital_perawatan inner join master_berkas_digital “+
“on berkas_digital_perawatan.kode=master_berkas_digital.kode “+
“where berkas_digital_perawatan.no_rawat='”+norawat+”‘”).executeQuery();
if(rs2.next()){
htmlContent.append(
“<tr class=’isi’>”).append(
“<td valign=’top’ width=’2%’></td>”).append(
“<td valign=’top’ width=’18%’>Berkas Digital Perawatan</td>”).append(
“<td valign=’top’ width=’1%’ align=’center’>:</td>”).append(
“<td valign=’top’ width=’79%’>”).append(
“<table width=’100%’ border=’0′ align=’center’ cellpadding=’3px’ cellspacing=’0′ class=’tbl_form’>”).append(
“<tr align=’center’>”).append(
“<td valign=’top’ width=’4%’ bgcolor=’#FFFAF8′>No.</td>”).append(
“<td valign=’top’ width=’96%’ bgcolor=’#FFFAF8′>Berkas Digital</td>”).append(
“</tr>”
);
w=1;
do{
if(rs2.getString(“lokasi_file”).toLowerCase().contains(“.jpg”)||rs2.getString(“lokasi_file”).toLowerCase().contains(“.jpeg”)){
htmlContent.append(
“<tr>”).append(
“<td valign=’top’ align=’center’>”).append(w).append(“</td>”).append(
“<td valign=’top’ align=’center’>”).append(rs2.getString(“nama”)).append(“<br><a href=’http://”).append(koneksiDB.HOSTHYBRIDWEB()).append(“:”).append(koneksiDB.PORTWEB()).append(“/”).append(koneksiDB.HYBRIDWEB()).append(“/berkasrawat/”).append(rs2.getString(“lokasi_file”)).append(“‘><img alt=’Berkas Digital’ src=’http://”).append(koneksiDB.HOSTHYBRIDWEB()).append(“:”).append(koneksiDB.PORTWEB()).append(“/”).append(koneksiDB.HYBRIDWEB()).append(“/berkasrawat/”).append(rs2.getString(“lokasi_file”)).append(“‘ width=’450′ height=’450’/></a></td>”).append(
“</tr>”);
}else{
htmlContent.append(
“<tr>”).append(
“<td valign=’top’ align=’center’>”).append(w).append(“</td>”).append(
“<td valign=’top’><a href=’http://”).append(koneksiDB.HOSTHYBRIDWEB()).append(“:”).append(koneksiDB.PORTWEB()).append(“/”).append(koneksiDB.HYBRIDWEB()).append(“/berkasrawat/”).append(rs2.getString(“lokasi_file”)).append(“‘ style=’background-color: #8B0000; color: white; font-weight: bold; text-decoration: none; display: inline-block; padding: 8px 12px; border-radius: 4px; transition: background-color 0.3s;’ onmouseover=’this.style.backgroundColor=\”#A00000\”‘ onmouseout=’this.style.backgroundColor=\”#8B0000\”‘>”).append(rs2.getString(“nama”)).append(“_”).append(rs2.getString(“lokasi_file”).replaceAll(“pages/upload/”,””)).append(“</a></td>”).append(
“</tr>”);
}
w++;
}while(rs2.next());
htmlContent.append(
“</table>”).append(
“</td>”).append(
“</tr>”);
}
} catch (Exception e) {
System.out.println(“Notifikasi : “+e);
} finally{
if(rs2!=null){
rs2.close();
}
}
}
}catch (Exception e) {
System.out.println(“Notif Berkas Digitaln: “+e);
}
}
Memberikan Background Merah di Link Berkas Digital
Tulisan ini dipublikasikan di Tak Berkategori. Tandai permalink.
Subscribe
Login
0 Comments
Oldest