<?php
include "../include/head.php";
include "../include/cn.php";
include "../include/fun.php";
?>
<body>
<?php
$sql="select * from product where id=".$_GET["id"];
$rs=mysql_query($sql);
$row=mysql_fetch_array($rs);
$rr=explode(",",$row["pic"]);
$c=count($rr)-1;
for ($i=0;$i<$c;$i++)
{
if (file_exists("img/".$rr[$i]))
{
unlink ("img/".$rr[$i]);
}
}
$sql1="delete from product where id=".$_GET["id"];
if (mysql_query($sql1))
{
box("产品删除成功","manage.php");
}
?>
</body>
</html>
include "../include/head.php";
include "../include/cn.php";
include "../include/fun.php";
?>
<body>
<?php
$sql="select * from product where id=".$_GET["id"];
$rs=mysql_query($sql);
$row=mysql_fetch_array($rs);
$rr=explode(",",$row["pic"]);
$c=count($rr)-1;
for ($i=0;$i<$c;$i++)
{
if (file_exists("img/".$rr[$i]))
{
unlink ("img/".$rr[$i]);
}
}
$sql1="delete from product where id=".$_GET["id"];
if (mysql_query($sql1))
{
box("产品删除成功","manage.php");
}
?>
</body>
</html>