?? attach_del.php
字號:
<?
########################################
#OsoonCrm
#附件刪除
########################################
include "include/db.inc.php";
include "include/check.inc.php";
$sql="select * from $tbl_crm_attach where AttachID='$AttachID'";
$res=@mysql_query($sql);
$row=@mysql_fetch_array($res);
if ($Submit)
{
$attach = $upload_path.$row[AttachName];
if(!@unlink($attach))
{
echo "刪除附件發生錯誤...";
exit;
}
else
{
$sql_del="delete from $tbl_crm_attach where AttachID='$AttachID'";
@mysql_query($sql_del);
//echo "成功刪除附件,請稍候...";
echo "<script>opener.document.location.reload();window.close();</script>";
exit;
}
}
?>
<html>
<head>
<title>Osoon CRM</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel=stylesheet type="text/css" href="style.css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" rightmargin="0" topmargin="0" bottommargin="0">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td align="center" valign="middle">
<table width=95% cellpadding="5" cellspacing="0" align=center border="1" bordercolor="#F5F1E9">
<form method="post" action="#" enctype="multipart/form-data">
<tr bgcolor="#ede5d2">
<td>>><b>刪除附件</b></td>
</tr>
<tr>
<td>
<br>
注意:你真的要刪除附件( <? echo $row[FileName]; ?> )嗎?
<p>
<input type="hidden" name="AttachID" value="<? echo $AttachID ?>">
<input type="submit" name="Submit" value="刪除附件">
<input type="button" name="button" value="關閉窗口" onClick="javascript:window.close();";>
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -