ApiStatic.php
2.75 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBase.php" ;?>
<?
if (! class_exists("ApiStatic")){
class ApiStatic extends ApiBase{
function __construct($req)
{
parent::__construct($req);
}
//회사소개
function getKCSpecialVehicleInfo(){
$sql="
SELECT *
FROM tblKCSpecialVehicleInfo
ORDER BY infoNo DESC
LIMIT 1
";
$payload = $this->getRow($sql);
return $this->makeResultJson("1", "", $payload);
}
//기관인증
function getOrganizationCert(){
$sql="
SELECT *
FROM tblOrganizationCert
ORDER BY certNo DESC
";
$list=$this->getArray($sql);
return $this->makeResultJson("1", "", $list);
}
function getMainImage(){
$sql="
SELECT imgPathMain, imgPathBuiltIn, imgPathInsulation, imgPathFreezerV, imgPathSpecial, imgPathPowerGate, imgPathWingBody, imgPathFreezerC
FROM tblMain
LIMIT 1
";
$result=$this->getRow($sql);
return $this->makeResultJson("1", "", $result);
}
function getMainPhrase(){
$sql="
SELECT phrase1, phrase2
FROM tblMain
LIMIT 1
";
}
//메인페이지 공지사항
function getLatestNotice(){
$sql="
SELECT title
FROM tblNotice
ORDER BY noticeNo DESC
LIMIT 1
";
$result=$this->getRow($sql);
return $this->makeResultJson("1", "", $result);
}
//메인페이지 이벤트
function getLatestEvent(){
$sql="
SELECT title
FROM tblEvent
ORDER BY eventNo DESC
LIMIT 1
";
$result=$this->getRow($sql);
return $this->makeResultJson("1", "", $result);
}
function getKCBriefInfo(){
$sql="
SELECT address, telephone, fax, eMail
FROM tblKCSpecialVehicleInfo
";
}
function getListOfVehicle(){
$vehicleType=$this->req["vehicleType"];
$sql="
SELECT name, imgPathVehicle
FROM tblVehicle
WHERE vehicleType='{$vehicleType}' AND status=1
ORDER BY regDate DESC
";
$result=$this->getArray($sql);
return $this->makeResultJson("1", "", $result);
}
function getInfoOfVehicle(){
$vehicleNo=$this->req["vehicleNo"];
$sql="
SELECT *
FROM tblVehicle
WHERE vehicleNo='{$vehicleNo}'
";
$reusult=$this->getRow($sql);
return $this->makeResultJson("1", "", $result);
}
function getListOfProvince(){
$sql="
SELECT `provinceNumber`, `desc`, `abbreviation`
FROM tblZipProvince
ORDER BY provinceNumber ASC
";
$result=$this->getArray($sql);
return $this->makeResultJson("1", "", $result);
}
function getListOfCity(){
$provinceNumber=$this->req["provinceNumber"];
$sql="
SELECT `cityNumber`, `desc`, `abbreviation`
FROM tblZipCity
ORDER BY cityNumber ASC
";
$result=$this->getArray($sql);
return $this->makeResultJson("1", "", $result);
}
}
}
?>