상품정보 고시에 따옴표 있을 때 오류 대처

This commit is contained in:
chicpro
2014-03-28 09:27:23 +09:00
parent f08eb1b719
commit 46b8e2e035
3 changed files with 26 additions and 10 deletions

View File

@ -253,7 +253,7 @@ for($i=0; $i<count($_POST['ii_article']); $i++) {
$val = $_POST['ii_value'][$i];
$value_array[$key] = $val;
}
$it_info_value = serialize($value_array);
$it_info_value = addslashes(serialize($value_array));
// 포인트 비율 값 체크
if($it_point_type == 1 && $it_point > 99)

View File

@ -22,13 +22,14 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
</div>
<?php } ?>
<h2>상품 정보 고시</h2>
<?php
if ($it['it_info_value']) {
$info_data = unserialize($it['it_info_value']);
$gubun = $it['it_info_gubun'];
$info_array = $item_info[$gubun]['article'];
$info_data = unserialize(stripslashes($it['it_info_value']));
if(is_array($info_data)) {
$gubun = $it['it_info_gubun'];
$info_array = $item_info[$gubun]['article'];
?>
<h2>상품 정보 고시</h2>
<!-- 상품정보고시 -->
<ul id="sit_inf_open">
<?php
@ -43,7 +44,14 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_MSHOP_SKIN_URL.'/style.css">',
<?php } //foreach?>
</ul>
<!-- 상품정보고시 end -->
<?php } //if?>
<?php
} else {
if($is_admin) {
echo '<p>상품 정보 고시 정보가 올바르게 저장되지 않았습니다.<br>config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로<br>변경하신 후 관리자 &gt; 상품정보 수정에서 상품 정보를 다시 저장해주세요. </p>';
}
}
} //if
?>
</div>
<!-- 상품설명 end -->

View File

@ -29,9 +29,10 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0
<?php
if ($it['it_info_value']) { // 상품 정보 고시
$info_data = unserialize($it['it_info_value']);
$gubun = $it['it_info_gubun'];
$info_array = $item_info[$gubun]['article'];
$info_data = unserialize(stripslashes($it['it_info_value']));
if(is_array($info_data)) {
$gubun = $it['it_info_gubun'];
$info_array = $item_info[$gubun]['article'];
?>
<h3>상품 정보 고시</h3>
<table id="sit_inf_open">
@ -53,7 +54,14 @@ add_stylesheet('<link rel="stylesheet" href="'.G5_SHOP_CSS_URL.'/style.css">', 0
</tbody>
</table>
<!-- 상품정보고시 end -->
<?php } //if?>
<?php
} else {
if($is_admin) {
echo '<p>상품 정보 고시 정보가 올바르게 저장되지 않았습니다.<br>config.php 파일의 G5_ESCAPE_FUNCTION 설정을 addslashes 로<br>변경하신 후 관리자 &gt; 상품정보 수정에서 상품 정보를 다시 저장해주세요. </p>';
}
}
} //if
?>
</section>
<!-- } 상품 정보 끝 -->