📄 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 + -