Merge branch 'master' into order

This commit is contained in:
nemoluv
2013-09-26 09:12:21 +09:00
29 changed files with 555 additions and 330 deletions

8
shop/iteminfo.php Normal file
View File

@ -0,0 +1,8 @@
<?php
include_once('./_common.php');
if (G5_IS_MOBILE) {
include_once(G5_MSHOP_PATH.'/iteminfo.php');
return;
}
?>

View File

@ -67,7 +67,25 @@ else if ($w == "d")
alert("답변이 있는 상품문의는 삭제하실 수 없습니다.");
}
//$sql = " delete from {$g5['g5_shop_item_qa_table']} where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
// 에디터로 첨부된 이미지 삭제
$sql = " select iq_question from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' ";
$row = sql_fetch($sql);
$imgs = get_editor_image($row['iq_question']);
for($i=0;$i<count($imgs[1]);$i++) {
$p = parse_url($imgs[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$data_path = $p['path'];
$destfile = G5_PATH.$data_path;
if(is_file($destfile))
@unlink($destfile);
}
$sql = " delete from {$g5['g5_shop_item_qa_table']} where iq_id = '$iq_id' and md5(concat(iq_id,iq_time,iq_ip)) = '{$hash}' ";
sql_query($sql);

View File

@ -77,6 +77,25 @@ else if ($w == "d")
alert("자신의 사용후기만 삭제하실 수 있습니다.");
}
// 에디터로 첨부된 이미지 삭제
$sql = " select is_content from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
$row = sql_fetch($sql);
$imgs = get_editor_image($row['is_content']);
for($i=0;$i<count($imgs[1]);$i++) {
$p = parse_url($imgs[1][$i]);
if(strpos($p['path'], "/data/") != 0)
$data_path = preg_replace("/^\/.*\/data/", "/data", $p['path']);
else
$data_path = $p['path'];
$destfile = G5_PATH.$data_path;
if(is_file($destfile))
@unlink($destfile);
}
$sql = " delete from {$g5['g5_shop_item_use_table']} where is_id = '$is_id' and md5(concat(is_id,is_time,is_ip)) = '{$hash}' ";
sql_query($sql);