forked from yoyoren/m-cmsold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
historyaddr.php
39 lines (34 loc) · 1.35 KB
/
historyaddr.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
$sql02="select * from ecs_user_address where user_id={$_SESSION['user_id']} limit 0,1";
$address1=$db->getRow($sql02);
if($address1['city'])
{
$city1=$db->getOne("select region_name from ship_region where region_id={$address1['city']}");
$address1['qu']=$city1;
}
$address2=$db->getRow("select * from ecs_user_address where user_id={$_SESSION['user_id']} limit 1,1");
if($address2['city'])
{
$city2=$db->getOne("select region_name from ship_region where region_id={$address2['city']}");
$address2['qu']=$city2;
}
$address3=$db->getRow("select * from ecs_user_address where user_id={$_SESSION['user_id']} limit 2,1");
if($address3['city'])
{
$city3=$db->getOne("select region_name from ship_region where region_id={$address3['city']}");
$address3['qu']=$city3;
}
//print_r($address1);
//print_r($address2);
//print_r($address3);
$rowss=$db->getRow("select * from ecs_user_address where user_id={$_SESSION['user_id']} limit 1");
$smarty->assign('accepter', $rowss);
$district_list=$db->getAll('select * from ship_region where parent_id=501');
$smarty->assign('district_list', $district_list);
$smarty->assign('address1',$address1);
$smarty->assign('address2',$address2);
$smarty->assign('address3',$address3);
$smarty->display('historyaddress.dwt');
?>