/home/mjc1/public_html/onlinecs/adminpicdeleteProcess.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<? session_start(); ?>
<?php 
include_once("_common.php");?>
<?

$admin 
str_replace("admin+","",$adminid);
$base_dir "/home/mjc1/ClientsDB/image/$admin/";    //ÆÄÀϾ÷·Îµå ±âº» µð·ºÅ丮


 
include("../onlinecs/commonSTADMIN.php");
 
$filesql "SELECT $pic as delimg FROM product_m where code = '$code'";
$fileresult mysql_query($filesql);
$filerow mysql_fetch_array($fileresult);


@
unlink("$base_dir/$filerow[delimg]"); //±âÁ¸ÆÄÀÏ»èÁ¦

$picsql "UPDATE product_m SET $pic = '' where code = '$code'";    //db ÆÄÀϸí Á¦°Å
mysql_query($picsql);



?>
<SCRIPT LANGUAGE="JavaScript">
    parent.alert("»èÁ¦µÇ¾ú½À´Ï´Ù");
    parent.location.href="adminproductdetail.php?code=<?=$code?>&class=<?=$class?>&mode=edit";
//    parent.location.reload();
</SCRIPT>