apiTest.php
9.7 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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ?>
<? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBoard.php" ?>
<?
$obj = new ApiStatic($_REQUEST, "") ;
$obj2= new ApiBoard($req) ;
$kcsInfo = $obj->getKCSpecialVehicleInfo();
$organizationCert = $obj->getListOfOrganizationCert();
$notice = $obj2->getListOfNotice();
$event = $obj2->getListOfEvent();
$board = $obj2->getListOfBoard();
$comment= $obj2->getInfoOfBoard();
$CS = $obj2->getListOfCS();
$CSInfo = $obj2->getInfoOfCS();
$AS = $obj2->getListOfCompany();
$ASInfo = $obj2->getInfoOfCompany();
$myProductionSpec=$obj2->getListOfMyProductionSpec();
$productionSpec=$obj2->getListOfProductionSpec();
$productionSpecInfo=$obj2->getInfoOfProductionSpec();
$vehicleList=$obj->getListOfVehicle();
$vehicleInfo=$obj->getInfoOfVehicle();
//$vnum = $obj->virtualNum ;
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="/admin/inc/css/base.css">
<link rel="stylesheet" type="text/css" href="/admin/inc/css/layout.css">
<link rel="stylesheet" type="text/css" href="/admin/inc/css/common.css">
<link rel="stylesheet" type="text/css" href="/admin/inc/css/btn.css">
<script type="text/javascript" src="/common/js/common.js"></script>
<script type="text/javascript" src="/common/js/jsMap.js"></script>
<script type="text/javascript" src="/common/js/jquery-1.7.1.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="/common/js/jquery.cookie.js"></script>
<!-- 리치 js -->
<script type="text/javascript" src="/common/js/jquery_rich/RichBaseExtends.js"></script>
<script type="text/javascript" src="/common/js/jquery_rich/RichBaseElementObject-1.0.js"></script>
<!--
<script type="text/javascript" src="/common/js/jquery_rich/RichFramework-1.0.js"></script>
<script type="text/javascript" src="/common/js/jquery_rich/RichElement-1.0.js"></script>
<script type="text/javascript" src="/common/js/jquery_rich/RHForm-1.0.js"></script>
-->
<script type="text/javascript" src="/common/js/ajaxupload.3.6.js"></script>
<script type="text/javascript" src="/common/js/imgPreview.js"></script>
<script type="text/javascript" src="/common/js/jquery.form.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름
var FORM_NAME = "alf" ; // 폼이름
var FORM_METHOD = "POST" ; // 폼 메쏘드
var FORM_USE_FILE = false ; // 파일폼 사용 여부
var FORM_ACTION = "/action_front.php" ;
var NEXT_CMD = "" ; // 다은 수행 할 cmd
$(".saveComment").click2(function(){
$.ajax({
type: 'post',
url : "/action_front.php?cmd=ApiBoard.saveComment",
async : false,
cache : false,
data:{
"commentType" : "CS",
"targetFk" : 2,
"userFk" : 1,
"content" : "test 대댓글2",
"parentNo" : 62
},
success : function(data){
alert(data.returnmessage);
},
error : function(req, res, error){
alert(req+res+error);
}
});
}) ;
$(".saveBoard").click2(function(){
$.ajax({
type: 'post',
url : "/action_front.php?cmd=ApiBoard.saveBoard",
async : false,
cache : false,
data:{
"title" : "제목제목제목",
"userFk" : 1,
"imgPathBoard1" : "경로1",
"imgPathBoard2" : "경로2",
"imgPathBoard3" : "경로3",
"content" : "내용내용내용"
},
success : function(data){
alert(data.returnmessage);
},
error : function(req, res, error){
alert(req+res+error);
}
});
}) ;
$(".saveCS").click2(function(){
$.ajax({
type: 'post',
url : "/action_front.php?cmd=ApiBoard.saveCS",
async : false,
cache : false,
data:{
"title" : "제목제목제목",
"userFk" : 1,
"imgPathBoard1" : "경로1",
"imgPathBoard2" : "경로2",
"imgPathBoard3" : "경로3",
"content" : "내용내용내용"
},
success : function(data){
alert(data.returnmessage);
},
error : function(req, res, error){
alert(req+res+error);
}
});
}) ;
$(".saveProductionSpec").click2(function(){
$.ajax({
type: 'post',
url : "/action_front.php?cmd=ApiBoard.saveProductionSpec",
async : false,
cache : false,
data:{
"userFk" : 1,
"requestDate" : "2017-10-18",
"companyName" : "리치",
"vehicleTON" : "123123",
"vehicleText" : "vehicleText",
"vehicleType" : "HY",
"productName" : "wtf",
"telephone" : "01001011",
"managerFk" : "1",
"type" : "R",
"internalLength" : 108,
"internalHeight" : 120,
"internalWidth" : 32,
"alCoil" : "G",
"floor" : "C",
"floorValue" : 22,
"tent" : 0,
"sideBoard" : 1,
"windStopper" : 1,
"freezer" : 0,
"gate" : 2,
"load" : "S",
"eTrackGate" : 0,
"eTrackWing" : 1,
"turnBuckle" : "rkskek",
"toolBucket" : 2,
"bumberFootHold" : 1,
"wingProtector" : 2,
"axis" : 1,
"axisValue" : "302",
"specialAddition" : "special"
},
success : function(data){
alert(data.returnmessage);
},
error : function(req, res, error){
alert(req+res+error);
}
});
}) ;
$("#subm").click2(function(){
var val1 = $("#name1").val().toString();
var val2 = $("#name2").val();
var val3 = $("#name3").val();
var val4 = $("#name4").val();
var val5 = $("#name5").val();
var val6 = $("#name6").val();
var val7 = $("#name7").val();
var val1v = $("#name1v").val();
var val2v = $("#name2v").val();
var val3v = $("#name3v").val();
var val4v = $("#name4v").val();
var val5v = $("#name5v").val();
var val6v = $("#name6v").val();
var val7v = $("#name7v").val();
$.ajax({
url : "/action_front.php?cmd=ApiBoard.saveComment",
async : false,
cache : false,
dataType: 'json',
data:{
val1 : $("#name1v").val(),
val2 : parseInt($("#name2v").val()),
val3 : parseInt($("#name3v").val()),
val4 : $("#name4v").val(),
val5 : parseInt($("#name5v").val()),
val6 : $("#name6v").val(),
val7 : $("#name7v").val()
},
success : function(data){
alert(data.returnmessage);
},
error : function(req, res, error){
alert(req+res+error);
}
});
}) ;
}) ;
</script>
<html>
<head>
<title>API 테스트 ㅋ</title>
</head>
<body>
<div id="Contents" class="notice" style="width:1000px;" >
<form name=test1 method=POST>
<span class="button bigrounded blue saveComment btnleft_y">댓글 저장 </span>
<span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span>
<span class="button bigrounded blue saveCS btnleft_y">고객센터 게시물 저장 </span>
<span class="button bigrounded blue saveProductionSpec btnleft_y">제작사양서 저장 </span>
</form>
<div class="data">
<table class="datacList" id="datacList">
<thead>
<tr class="datacLists">
<th width="8%">이름</th>
<th width="50%">내용</th>
</tr>
</thead>
<tr>
<td class="center" class="center"> KCSInfo</td>
<td class=""><?echo $kcsInfo;?></td>
</tr>
<tr>
<td class="center">OrganizationCert</td>
<td class=""><?echo $organizationCert;?></td>
</tr>
<tr>
<td class="center">Notice</td>
<td class=""><?echo $notice;?></td>
</tr>
<tr>
<td class="center">Event</td>
<td class=""><?echo $event;?></td>
</tr>
<tr>
<td class="center">Board</td>
<td class=""><?echo $board;?></td>
</tr>
<tr>
<td class="center">Comment</td>
<td class=""><?echo $comment;?></td>
</tr>
<tr>
<td class="center">CS</td>
<td class=""><?echo $CS;?></td>
</tr>
<tr>
<td class="center">CSInfo</td>
<td class=""><?echo $CSInfo;?></td>
</tr>
<tr>
<td class="center">AS</td>
<td class=""><?echo $AS;?></td>
</tr>
<tr>
<td class="center">ASInfo</td>
<td class=""><?echo $ASInfo;?></td>
</tr>
<tr>
<td class="center">MyProductionSpec</td>
<td class=""><?echo $myProductionSpec;?></td>
</tr>
<tr>
<td class="center">ProductionSpecList</td>
<td class=""><?echo $productionSpec;?></td>
</tr>
<tr>
<td class="center">ProductionSpecInfo</td>
<td class=""><?echo $productionSpecInfo;?></td>
</tr>
<tr>
<td class="center">vehicleList</td>
<td class=""><?echo $vehicleList;?></td>
</tr>
<tr>
<td class="center">vehicleInfo</td>
<td class=""><?echo $vehicleInfo;?></td>
</tr>
</table>
</div>
<br>
<form name="test" id="test" method=GET>
<input type="text" id="name1" name="name1" /> : <input type="text" id="name1v" name="name1v" />
<br>
<input type="text" id="name2" name="name2" /> : <input type="text" id="name2v" name="name2v" />
<br>
<input type="text" id="name3" name="name3" /> : <input type="text" id="name3v" name="name3v" />
<br>
<input type="text" id="name4" name="name4" /> : <input type="text" id="name4v" name="name4v" />
<br>
<input type="text" id="name5" name="name5" /> : <input type="text" id="name5v" name="name5v" />
<br>
<input type="text" id="name6" name="name6" /> : <input type="text" id="name6v" name="name6v" />
<br>
<input type="text" id="name7" name="name7" /> : <input type="text" id="name7v" name="name7v" />
<br>
<a href="#" id="subm" name="subm">Submit</a>
<input type="reset" value="지우기" />
</form>
</div>
</body>
</html>