apiTest.php
6.16 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
<? 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();
//$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" : "FB",
"targetFk" : 1,
"userFk" : 1,
"content" : "37의 대대댓글",
"parentNo" : 37
},
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>
</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>
</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>