", $row["sd_information"]);
$kakaoContent = strip_tags($row["sd_content"]);
$kakaoContent = str_replace("&", "&",$kakaoContent);
$kakaoContent = str_replace(""", "“",$kakaoContent);
$kakaoContent = str_replace("'", "‘",$kakaoContent);
$kakaoContent = str_replace(" ", " ",$kakaoContent);
$kakaoContent = preg_replace("/[^A-Za-z90-9가-힣&“‘]/i"," ",cut_str(str_replace("\r\n", "",$kakaoContent),200));
$sql2 = " select * from $iw[category_table] where ep_code = '$iw[store]' and gp_code='$iw[group]' and state_sort = '$iw[type]' and cg_code = '$cg_code_view'";
$row2 = sql_fetch($sql2);
$cg_hit = $row2[cg_hit];
$cg_comment = $row2[cg_comment];
$cg_recommend = $row2[cg_recommend];
$cg_point_btn = $row2[cg_point_btn];
$cg_comment_view = $row2[cg_comment_view];
$cg_recommend_view = $row2[cg_recommend_view];
$cg_url = $row2[cg_url];
$cg_facebook = $row2[cg_facebook];
$cg_twitter = $row2[cg_twitter];
$cg_googleplus = $row2[cg_googleplus];
$cg_pinterest = $row2[cg_pinterest];
$cg_linkedin = $row2[cg_linkedin];
$cg_delicious = $row2[cg_delicious];
$cg_tumblr = $row2[cg_tumblr];
$cg_digg = $row2[cg_digg];
$cg_stumbleupon = $row2[cg_stumbleupon];
$cg_reddit = $row2[cg_reddit];
$cg_sinaweibo = $row2[cg_sinaweibo];
$cg_qzone = $row2[cg_qzone];
$cg_renren = $row2[cg_renren];
$cg_tencentweibo = $row2[cg_tencentweibo];
$cg_kakaotalk = $row2[cg_kakaotalk];
$cg_line = $row2[cg_line];
$cg_level_comment = $row2[cg_level_comment];
if ($row2[cg_level_read] != 10 && $iw[level]=="guest"){
alert(national_language($iw[language],"a0003","로그인 해주시기 바랍니다."),"$iw[m_path]/all_login.php?type=$iw[type]&ep=$iw[store]&gp=$iw[group]&re_url=$iw[re_url]");
}else if($row2[cg_level_read] != 10 && $iw[mb_level] < $row2[cg_level_read]){
alert(national_language($iw[language],"a0169","해당 카테고리에 읽기 권한이 없습니다."),$iw[m_path]."/shop_data_list.php?type=".$iw[type]."&ep=".$iw[store]."&gp=".$iw[group]."&menu=".$cg_code_view);
}
$sql = "select * from $iw[shop_seller_table] where ep_code = '$iw[store]' and mb_code = '$mb_code' and ss_display = 1";
$row = sql_fetch($sql);
$ss_name = $row["ss_name"];
$ss_tel = $row["ss_tel"];
$rowpath = sql_fetch(" select ep_nick from $iw[enterprise_table] where ep_code = '$iw[store]'");
$upload_path = $iw["path"].$upload_path.'/'.$sd_code.'/'.$sd_image;
$kakaoContent = national_money($iw[language], $sd_sale)." ".$kakaoContent;
$kakaoImg = $iw[url].'/shop/'.$rowpath[ep_nick].'/'.$sd_code.'/'.$sd_image;
$kakaoURL = get_shortURL(urlencode("http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]));
$fbTitleQ = $sd_subject;
$fbTitle = strip_tags($sd_subject);
$fbTitle = str_replace("&", "&",$fbTitle);
$fbTitle = str_replace(""", "“",$fbTitle);
$fbTitle = str_replace("'", "‘",$fbTitle);
$fbTitle = str_replace(" ", " ",$fbTitle);
$fbTitle = preg_replace("/[^A-Za-z90-9가-힣&“‘]/i"," ",$fbTitle);
$fbDescription = $kakaoContent;
$fbImage = $kakaoImg;
$fbUrl = "http://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
$sql2 = "select count(*) as cnt from $iw[comment_table] where ep_code = '$iw[store]' and gp_code='$iw[group]' and state_sort = '$iw[type]' and cm_code = '$sd_code' and cm_display = 1";
$result2 = sql_fetch($sql2);
$reply_count = number_format($result2[cnt]);
include_once("_head_share.php");
?>
$rowsum = sql_fetch(" select sum(sc_amount) as sumount from $iw[shop_cart_table] where ep_code = '$iw[store]' and mb_code = '$iw[member]' and sd_code = '$sd_code'");
echo "";
?>
}?>
if ($hm_view_scrap==1){
$scrap_type = "view";
include_once("all_home_scrap.php");
}
?>
=$sd_recommend?>}?>
">}?>
">}?>
">}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}?>
}else{?>
">
}?>
">
}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>

}?>
}?>
">
}?>
}?>
}?>
$sql2 = "select * from $iw[comment_table] where ep_code = '$iw[store]' and gp_code='$iw[group]' and state_sort = '$iw[type]' and cm_code = '$sd_code' and cm_display = 1 and cm_recomment = 0 and cm_recommend > 2 order by cm_recommend desc limit 0, 3";
$result2 = sql_query($sql2);
$i=0;
while($row2 = @sql_fetch_array($result2)){
$cm_no = $row2["cm_no"];
$sql3 = "select mb_nick from $iw[member_table] where ep_code = '$iw[store]' and mb_code = '$row2[mb_code]'";
$row3 = sql_fetch($sql3);
?>
$i++;
}
?>
= $row2[cg_level_comment])){?>
}else{?>
if($iw[mb_level] < $row2[cg_level_comment]) $comment_login = "덧글쓰기 권한이 없습니다.";
if($iw[gp_level] == "gp_guest" && $iw[group] != "all") $comment_login = "그룹 가입 후 댓글 작성이 가능합니다.";
if($iw[level] == "guest" && $iw[group] == "all") $comment_login = "로그인 후 댓글 작성이 가능합니다.";
?>
}?>
$sql2 = "select * from $iw[comment_table] where ep_code = '$iw[store]' and gp_code='$iw[group]' and state_sort = '$iw[type]' and cm_code = '$sd_code' and cm_display = 1 and cm_recomment = 0 order by cm_no asc";
$result2 = sql_query($sql2);
$i=0;
while($row2 = @sql_fetch_array($result2)){
$cm_no = $row2["cm_no"];
$sql3 = "select mb_nick from $iw[member_table] where ep_code = '$iw[store]' and mb_code = '$row2[mb_code]'";
$row3 = sql_fetch($sql3);
?>
$i++;
}
?>
}?>
$sql = "update $iw[shop_data_table] set
sd_hit = sd_hit+1
where ep_code = '$iw[store]' and sd_code = '$sd_code'";
sql_query($sql);
$sql = "update $iw[total_data_table] set
td_hit = td_hit+1
where ep_code = '$iw[store]' and gp_code = '$iw[group]' and state_sort = '$iw[type]' and td_code = '$sd_code'";
sql_query($sql);
include_once("_tail.php");
?>