post 등에 mysql_real_escape_string 적용하는 코드 수정
This commit is contained in:
@ -2,7 +2,7 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
||||||
|
|
||||||
$it_id = escape_trim($_GET['it_id']);
|
$it_id = trim($_GET['it_id']);
|
||||||
|
|
||||||
// 분류사용, 상품사용하는 상품의 정보를 얻음
|
// 분류사용, 상품사용하는 상품의 정보를 얻음
|
||||||
$sql = " select a.*,
|
$sql = " select a.*,
|
||||||
|
|||||||
@ -6,9 +6,9 @@ if (!$is_member) {
|
|||||||
alert_close("상품문의는 회원만 작성 가능합니다.");
|
alert_close("상품문의는 회원만 작성 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$w = escape_trim($_REQUEST['w']);
|
$w = trim($_REQUEST['w']);
|
||||||
$it_id = escape_trim($_REQUEST['it_id']);
|
$it_id = trim($_REQUEST['it_id']);
|
||||||
$iq_id = escape_trim($_REQUEST['iq_id']);
|
$iq_id = trim($_REQUEST['iq_id']);
|
||||||
|
|
||||||
$chk_secret = '';
|
$chk_secret = '';
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
||||||
|
|
||||||
$sfl = escape_trim($_REQUEST['sfl']);
|
$sfl = trim($_REQUEST['sfl']);
|
||||||
$stx = escape_trim($_REQUEST['stx']);
|
$stx = trim($_REQUEST['stx']);
|
||||||
|
|
||||||
$g5['title'] = '상품문의';
|
$g5['title'] = '상품문의';
|
||||||
include_once(G5_MSHOP_PATH.'/_head.php');
|
include_once(G5_MSHOP_PATH.'/_head.php');
|
||||||
|
|||||||
@ -6,9 +6,9 @@ if (!$is_member) {
|
|||||||
alert_close("사용후기는 회원만 작성 가능합니다.");
|
alert_close("사용후기는 회원만 작성 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$w = escape_trim($_REQUEST['w']);
|
$w = trim($_REQUEST['w']);
|
||||||
$it_id = escape_trim($_REQUEST['it_id']);
|
$it_id = trim($_REQUEST['it_id']);
|
||||||
$is_id = escape_trim($_REQUEST['is_id']);
|
$is_id = trim($_REQUEST['is_id']);
|
||||||
|
|
||||||
// 사용후기 작성 설정에 따른 체크
|
// 사용후기 작성 설정에 따른 체크
|
||||||
check_itemuse_write();
|
check_itemuse_write();
|
||||||
|
|||||||
@ -2,8 +2,8 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
||||||
|
|
||||||
$sfl = escape_trim($_REQUEST['sfl']);
|
$sfl = trim($_REQUEST['sfl']);
|
||||||
$stx = escape_trim($_REQUEST['stx']);
|
$stx = trim($_REQUEST['stx']);
|
||||||
|
|
||||||
$g5['title'] = '사용후기';
|
$g5['title'] = '사용후기';
|
||||||
include_once(G5_MSHOP_PATH.'/_head.php');
|
include_once(G5_MSHOP_PATH.'/_head.php');
|
||||||
|
|||||||
@ -4,14 +4,14 @@ include_once('./_common.php');
|
|||||||
$g5['title'] = "상품 검색 결과";
|
$g5['title'] = "상품 검색 결과";
|
||||||
include_once(G5_MSHOP_PATH.'/_head.php');
|
include_once(G5_MSHOP_PATH.'/_head.php');
|
||||||
|
|
||||||
$q = utf8_strcut(escape_trim($_GET['q']), 30, "");
|
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
||||||
$qname = escape_trim($_GET['qname']);
|
$qname = trim($_GET['qname']);
|
||||||
$qexplan = escape_trim($_GET['qexplan']);
|
$qexplan = trim($_GET['qexplan']);
|
||||||
$qid = escape_trim($_GET['qid']);
|
$qid = trim($_GET['qid']);
|
||||||
$qcaid = escape_trim($_GET['qcaid']);
|
$qcaid = trim($_GET['qcaid']);
|
||||||
$qfrom = escape_trim($_GET['qfrom']);
|
$qfrom = trim($_GET['qfrom']);
|
||||||
$qto = escape_trim($_GET['qto']);
|
$qto = trim($_GET['qto']);
|
||||||
$qsort = escape_trim($_GET['qsort']);
|
$qsort = trim($_GET['qsort']);
|
||||||
|
|
||||||
// QUERY 문에 공통적으로 들어가는 내용
|
// QUERY 문에 공통적으로 들어가는 내용
|
||||||
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
||||||
|
|||||||
@ -6,7 +6,7 @@ if (G5_IS_MOBILE) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$it_id = escape_trim($_GET['it_id']);
|
$it_id = trim($_GET['it_id']);
|
||||||
|
|
||||||
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
include_once(G5_LIB_PATH.'/iteminfo.lib.php');
|
||||||
|
|
||||||
|
|||||||
@ -12,9 +12,9 @@ if (!$is_member) {
|
|||||||
alert_close("상품문의는 회원만 작성 가능합니다.");
|
alert_close("상품문의는 회원만 작성 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$w = escape_trim($_REQUEST['w']);
|
$w = trim($_REQUEST['w']);
|
||||||
$it_id = escape_trim($_REQUEST['it_id']);
|
$it_id = trim($_REQUEST['it_id']);
|
||||||
$iq_id = escape_trim($_REQUEST['iq_id']);
|
$iq_id = trim($_REQUEST['iq_id']);
|
||||||
|
|
||||||
$chk_secret = '';
|
$chk_secret = '';
|
||||||
|
|
||||||
|
|||||||
@ -5,11 +5,11 @@ if (!$is_member) {
|
|||||||
alert_close("상품문의는 회원만 작성이 가능합니다.");
|
alert_close("상품문의는 회원만 작성이 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$iq_id = escape_trim($_REQUEST['iq_id']);
|
$iq_id = trim($_REQUEST['iq_id']);
|
||||||
$iq_subject = escape_trim($_POST['iq_subject']);
|
$iq_subject = trim($_POST['iq_subject']);
|
||||||
$iq_question = escape_trim(stripslashes($_POST['iq_question']));
|
$iq_question = trim(stripslashes($_POST['iq_question']));
|
||||||
$iq_answer = escape_trim(stripslashes($_POST['iq_answer']));
|
$iq_answer = trim(stripslashes($_POST['iq_answer']));
|
||||||
$hash = escape_trim($_REQUEST['hash']);
|
$hash = trim($_REQUEST['hash']);
|
||||||
|
|
||||||
if ($w == "" || $w == "u") {
|
if ($w == "" || $w == "u") {
|
||||||
$iq_name = $member['mb_name'];
|
$iq_name = $member['mb_name'];
|
||||||
|
|||||||
@ -8,8 +8,8 @@ if (G5_IS_MOBILE) {
|
|||||||
|
|
||||||
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
||||||
|
|
||||||
$sfl = escape_trim($_REQUEST['sfl']);
|
$sfl = trim($_REQUEST['sfl']);
|
||||||
$stx = escape_trim($_REQUEST['stx']);
|
$stx = trim($_REQUEST['stx']);
|
||||||
|
|
||||||
$g5['title'] = '상품문의';
|
$g5['title'] = '상품문의';
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
|
|||||||
@ -12,9 +12,9 @@ if (!$is_member) {
|
|||||||
alert_close("사용후기는 회원만 작성 가능합니다.");
|
alert_close("사용후기는 회원만 작성 가능합니다.");
|
||||||
}
|
}
|
||||||
|
|
||||||
$w = escape_trim($_REQUEST['w']);
|
$w = trim($_REQUEST['w']);
|
||||||
$it_id = escape_trim($_REQUEST['it_id']);
|
$it_id = trim($_REQUEST['it_id']);
|
||||||
$is_id = escape_trim($_REQUEST['is_id']);
|
$is_id = trim($_REQUEST['is_id']);
|
||||||
|
|
||||||
// 사용후기 작성 설정에 따른 체크
|
// 사용후기 작성 설정에 따른 체크
|
||||||
check_itemuse_write();
|
check_itemuse_write();
|
||||||
|
|||||||
@ -8,11 +8,11 @@ if (!$is_member) {
|
|||||||
// 사용후기 작성 설정에 따른 체크
|
// 사용후기 작성 설정에 따른 체크
|
||||||
check_itemuse_write();
|
check_itemuse_write();
|
||||||
|
|
||||||
$it_id = escape_trim($_REQUEST['it_id']);
|
$it_id = trim($_REQUEST['it_id']);
|
||||||
$is_subject = escape_trim($_POST['is_subject']);
|
$is_subject = trim($_POST['is_subject']);
|
||||||
$is_content = escape_trim($_POST['is_content']);
|
$is_content = trim($_POST['is_content']);
|
||||||
$is_name = escape_trim($_POST['is_name']);
|
$is_name = trim($_POST['is_name']);
|
||||||
$is_password = escape_trim($_POST['is_password']);
|
$is_password = trim($_POST['is_password']);
|
||||||
$is_score = (int)$_POST['is_score'] > 5 ? 0 : (int)$_POST['is_score'];
|
$is_score = (int)$_POST['is_score'] > 5 ? 0 : (int)$_POST['is_score'];
|
||||||
|
|
||||||
if ($w == "" || $w == "u") {
|
if ($w == "" || $w == "u") {
|
||||||
|
|||||||
@ -8,8 +8,8 @@ if (G5_IS_MOBILE) {
|
|||||||
|
|
||||||
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
include_once(G5_LIB_PATH.'/thumb.lib.php');
|
||||||
|
|
||||||
$sfl = escape_trim($_REQUEST['sfl']);
|
$sfl = trim($_REQUEST['sfl']);
|
||||||
$stx = escape_trim($_REQUEST['stx']);
|
$stx = trim($_REQUEST['stx']);
|
||||||
|
|
||||||
$g5['title'] = '사용후기';
|
$g5['title'] = '사용후기';
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
|
|||||||
@ -9,14 +9,14 @@ if (G5_IS_MOBILE) {
|
|||||||
$g5['title'] = "상품 검색 결과";
|
$g5['title'] = "상품 검색 결과";
|
||||||
include_once('./_head.php');
|
include_once('./_head.php');
|
||||||
|
|
||||||
$q = utf8_strcut(escape_trim($_GET['q']), 30, "");
|
$q = utf8_strcut(trim($_GET['q']), 30, "");
|
||||||
$qname = escape_trim($_GET['qname']);
|
$qname = trim($_GET['qname']);
|
||||||
$qexplan = escape_trim($_GET['qexplan']);
|
$qexplan = trim($_GET['qexplan']);
|
||||||
$qid = escape_trim($_GET['qid']);
|
$qid = trim($_GET['qid']);
|
||||||
$qcaid = escape_trim($_GET['qcaid']);
|
$qcaid = trim($_GET['qcaid']);
|
||||||
$qfrom = escape_trim($_GET['qfrom']);
|
$qfrom = trim($_GET['qfrom']);
|
||||||
$qto = escape_trim($_GET['qto']);
|
$qto = trim($_GET['qto']);
|
||||||
$qsort = escape_trim($_GET['qsort']);
|
$qsort = trim($_GET['qsort']);
|
||||||
|
|
||||||
// QUERY 문에 공통적으로 들어가는 내용
|
// QUERY 문에 공통적으로 들어가는 내용
|
||||||
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
// 상품명에 검색어가 포한된것과 상품판매가능인것만
|
||||||
@ -36,9 +36,9 @@ if ($q) {
|
|||||||
for ($i=0; $i<count($arr); $i++) {
|
for ($i=0; $i<count($arr); $i++) {
|
||||||
$word = trim($arr[$i]);
|
$word = trim($arr[$i]);
|
||||||
if (!$word) continue;
|
if (!$word) continue;
|
||||||
|
|
||||||
$concat = array();
|
$concat = array();
|
||||||
if ($search_all || $qname)
|
if ($search_all || $qname)
|
||||||
$concat[] = "a.it_name";
|
$concat[] = "a.it_name";
|
||||||
if ($search_all || $qexplan)
|
if ($search_all || $qexplan)
|
||||||
$concat[] = "a.it_explan2";
|
$concat[] = "a.it_explan2";
|
||||||
@ -49,7 +49,7 @@ if ($q) {
|
|||||||
$detail_where[] = $concat_fields." like '%$word%' ";
|
$detail_where[] = $concat_fields." like '%$word%' ";
|
||||||
|
|
||||||
// 인기검색어
|
// 인기검색어
|
||||||
$sql = " insert into {$g5['popular_table']} set pp_word = '$word', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
$sql = " insert into {$g5['popular_table']} set pp_word = '$word', pp_date = '".G5_TIME_YMD."', pp_ip = '{$_SERVER['REMOTE_ADDR']}' ";
|
||||||
sql_query($sql, FALSE);
|
sql_query($sql, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ if ($q) {
|
|||||||
if ($qcaid)
|
if ($qcaid)
|
||||||
$where[] = " a.ca_id like '$qcaid%' ";
|
$where[] = " a.ca_id like '$qcaid%' ";
|
||||||
|
|
||||||
if ($qfrom || $qto)
|
if ($qfrom || $qto)
|
||||||
$where[] = " a.it_price between '$qfrom' and '$qto' ";
|
$where[] = " a.it_price between '$qfrom' and '$qto' ";
|
||||||
|
|
||||||
$sql_where = " where " . implode(" and ", $where);
|
$sql_where = " where " . implode(" and ", $where);
|
||||||
@ -69,7 +69,7 @@ $qsort = strtolower($qsort);
|
|||||||
$qorder = strtolower($qorder);
|
$qorder = strtolower($qorder);
|
||||||
$order_by = "";
|
$order_by = "";
|
||||||
// 아래의 $qsort 필드만 정렬이 가능하게 하여 다른 필드로 하여금 유추해 볼수 없게함
|
// 아래의 $qsort 필드만 정렬이 가능하게 하여 다른 필드로 하여금 유추해 볼수 없게함
|
||||||
if (($qsort == "it_sum_qty" || $qsort == "it_price" || $qsort == "it_use_avg" || $qsort == "it_use_cnt" || $qsort == "it_update_time") &&
|
if (($qsort == "it_sum_qty" || $qsort == "it_price" || $qsort == "it_use_avg" || $qsort == "it_use_cnt" || $qsort == "it_update_time") &&
|
||||||
($qorder == "asc" || $qorder == "desc")) {
|
($qorder == "asc" || $qorder == "desc")) {
|
||||||
$order_by = ' order by ' . $qsort . ' ' . $qorder . ' , it_order, it_id desc';
|
$order_by = ' order by ' . $qsort . ' ' . $qorder . ' , it_order, it_id desc';
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user