|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /var/www/html/pathumthani_eoffice/application/ecomplain/ |
Upload File : |
<?
include "../../config/config.inc.php";
include("function/function.php");
if($ActionF == "DEL_FILE"){
$sql_select = "SELECT *FROM tbl_attachfile WHERE runno='$id'";
$result_select = mysql_db_query($dbname,$sql_select);
$rs_s = mysql_fetch_assoc($result_select);
if($rs_s[act_file] != ""){
@unlink($rs_s[act_file]);
}
$sql_del = "DELETE FROM tbl_attachfile WHERE runno='$id'";
$result_del = mysql_db_query($dbname,$sql_del);
if($result_del){
addlog("ลบไฟล์แนบเรื่องร้องเรียน-ร้องทุกข์",$app_id,$act3,$id); // add log
echo "
<script language=\"javascript\">
location.href='popup_attach_file.php?complain_id=$complain_id';
</script>
";
exit();
}else{
addlog("พยายามลบไฟล์แนบเรื่องร้องเรียน-ร้องทุกข์",$app_id,$act3,$id); // add log
echo "
<script language=\"javascript\">
alert(\"ไม่สามารถลบไฟล์ได้\\n \");
location.href='popup_attach_file.php?complain_id=$complain_id';
</script>
";
exit();
}
}
?><html>
<head>
<title><?=$show_title_comp?></title>
<META http-equiv=Content-Type content="text/html; charset=windows-874">
<link href="../../common/style.css" type="text/css" rel="stylesheet" />
<script language='javascript' src='daily_popcalendar.js'></script>
<script language='javascript' src='displayelement.js'></script>
<style type="text/css">
<!--
body { margin: 0px 0px; padding: 0px 0px}
a:link { color: #005CA2; text-decoration: none}
a:visited { color: #005CA2; text-decoration: none}
a:active { color: #0099FF; text-decoration: underline}
a:hover { color: #0099FF; text-decoration: underline}
.style2 {color: #000000}
.style3 {color: #FF0000}
.p_border{
border-bottom:2 solid #DADCED;
}
-->
</style>
<SCRIPT LANGUAGE="JavaScript">
function confirmDelete(delUrl) {
if (confirm("คุณต้องการลบไฟล์ใช่หรือไม่")) {
document.location = delUrl;
}
}
</script>
</head>
<body >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0" style="filter:progid:DXImageTransform.Microsoft.Gradient(GradientType=0, StartColorStr='#144C85', EndColorStr='#ffffff');">
<tr>
<td valign="top" background="bimg/bg1.gif" style="background-repeat: no-repeat; background-position:right bottom "><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr><td valign="top"></td></tr>
<tr>
<td valign="top" >
<table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="2" align="left" valign="top" bgcolor="#BDC9F9" class="p_border"><span class="link_back">หลักฐานประกอบเรื่องร้องเรียน:</span></td>
</tr>
<tr>
<td width="2%" align="right" valign="top" class="link_back"> </td>
<td width="98%" align="left"><?
$sql_act_file = "SELECT * FROM tbl_attachfile WHERE complain_id ='$complain_id'";
$result_act_file = mysql_db_query($dbname,$sql_act_file);
while($rs_act = mysql_fetch_assoc($result_act_file)){
if($view_type == "view"){
addlog("เปิดไฟล์แนบเรื่องร้องเรียนข-ร้องทุกข์",$app_id,$act7,$complain_id); // add log
echo "<a href='$rs_act[act_file]' target='_blank'><img src=\"../../images/attach16.gif\" width=\"16\" height=\"16\" border=\"0\">$rs_act[note_file]</a><br>";
}else{
echo "<a href='$rs_act[act_file]' target='_blank'><img src=\"../../images/attach16.gif\" width=\"16\" height=\"16\" border=\"0\">$rs_act[note_file]</a><img src=\"../../images/delete.gif\" width=\"20\" height=\"18\" border=\"0\" onClick=\"return confirmDelete('popup_attach_file.php?ActionF=DEL_FILE&id=$rs_act[runno]&complain_id=$complain_id')\" style=\"cursor:hand\" alt='คลิ๊กเพื่อลบรายการไฟล์แนบ'><br>";
}
}
?></td>
</tr>
<tr>
<td colspan="2" align="center" valign="top" bgcolor="#BDC9F9"><input type="button" name="btnC" value="ปิดหน้าต่าง" onClick="window.close();"></td>
</tr>
</table>
</td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>