Skip to content
This repository has been archived by the owner on Jun 24, 2021. It is now read-only.

Commit

Permalink
필터링 코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
chicpro committed Dec 10, 2015
1 parent f2332e6 commit b4c2bde
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
Binary file modified lib/Excel/itemexcel.xls
Binary file not shown.
3 changes: 2 additions & 1 deletion shop/cartoption.php
@@ -1,7 +1,8 @@
<?php
include_once('./_common.php');

$it_id = $_POST['it_id'];
$pattern = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]#';
$it_id = preg_replace($pattern, '', $_POST['it_id']);

$sql = " select * from {$g5['g5_shop_item_table']} where it_id = '$it_id' and it_use = '1' ";
$it = sql_fetch($sql);
Expand Down
10 changes: 6 additions & 4 deletions shop/itemoption.php
@@ -1,10 +1,12 @@
<?php
include_once('./_common.php');

$it_id = $_POST['it_id'];
$opt_id = $_POST['opt_id'];
$idx = $_POST['idx'];
$sel_count = $_POST['sel_count'];
$pattern = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]#';

$it_id = preg_replace($pattern, '', $_POST['it_id']);
$opt_id = preg_replace($pattern, '', $_POST['opt_id']);
$idx = preg_replace('#[^0-9]#', '', $_POST['idx']);
$sel_count = preg_replace('#[^0-9]#', '', $_POST['sel_count']);

$sql = " select * from {$g5['g5_shop_item_option_table']}
where io_type = '0'
Expand Down
2 changes: 1 addition & 1 deletion shop/ordercoupon.php
Expand Up @@ -4,7 +4,7 @@
if($is_guest)
exit;

$price = (int)$_POST['price'];
$price = (int)preg_replace('#[^0-9]#', '', $_POST['price']);

if($price <= 0)
die('상품금액이 0원이므로 쿠폰을 사용할 수 없습니다.');
Expand Down
3 changes: 2 additions & 1 deletion shop/orderitemcoupon.php
Expand Up @@ -5,7 +5,8 @@
exit;

// 상품정보
$it_id = $_POST['it_id'];
$pattern = '#[/\'\"%=*\#\(\)\|\+\&\!\$~\{\}\[\]`;:\?\^\,]#';
$it_id = preg_replace($pattern, '', $_POST['it_id']);
$sw_direct = $_POST['sw_direct'];
$sql = " select it_id, ca_id, ca_id2, ca_id3 from {$g5['g5_shop_item_table']} where it_id = '$it_id' ";
$it = sql_fetch($sql);
Expand Down
4 changes: 2 additions & 2 deletions shop/ordersendcostcoupon.php
Expand Up @@ -4,8 +4,8 @@
if($is_guest)
exit;

$price = $_POST['price'];
$send_cost = $_POST['send_cost'];
$price = preg_replace('#[^0-9]#', '', $_POST['price']);
$send_cost = preg_replace('#[^0-9]#', '', $_POST['send_cost']);

// 쿠폰정보
$sql = " select *
Expand Down

0 comments on commit b4c2bde

Please sign in to comment.