fbaee16f by sayhoChun

project finished

1 parent fd91b0e8
...@@ -13,23 +13,17 @@ ...@@ -13,23 +13,17 @@
13 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminEtc.php" ; ?> 13 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminEtc.php" ; ?>
14 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/AnyGo.php" ;?> 14 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/AnyGo.php" ;?>
15 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ;?> 15 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ;?>
16 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ; ?>
16 <? 17 <?
17
18 $cmd = $_REQUEST[cmd] ; 18 $cmd = $_REQUEST[cmd] ;
19 19
20 // Ajax , ToO , ToS , ToPbyRef , ToOandClose , ReOandClose , ReOandToS , 20 // Ajax , ToO , ToS , ToPbyRef , ToOandClose , ReOandClose , ReOandToS ,
21 // Close , ToP , RePa , None 21 // Close , ToP , RePa , None
22
23 // $url = pack("H*",$_REQUEST[rurl]); 22 // $url = pack("H*",$_REQUEST[rurl]);
24 // echo $url ; 23 // echo $url ;
25
26 // echo $cmd . " ////////////// "; 24 // echo $cmd . " ////////////// ";
27
28
29 $nextDisable = false ; // 디버깅용 25 $nextDisable = false ; // 디버깅용
30
31 $arr = explode(".", $cmd) ; 26 $arr = explode(".", $cmd) ;
32
33 if( sizeof($arr) != 2 ) 27 if( sizeof($arr) != 2 )
34 echo "[ControlException ] Cmd 형식이 맞지 않습니다." ; 28 echo "[ControlException ] Cmd 형식이 맞지 않습니다." ;
35 else 29 else
...@@ -39,11 +33,8 @@ ...@@ -39,11 +33,8 @@
39 //var_dump(); 33 //var_dump();
40 $obj = new ReflectionClass($clsNm) ; 34 $obj = new ReflectionClass($clsNm) ;
41 $obj= $obj->newInstance($_REQUEST) ; 35 $obj= $obj->newInstance($_REQUEST) ;
42
43 $method = new ReflectionMethod($clsNm,$mtdNm) ; 36 $method = new ReflectionMethod($clsNm,$mtdNm) ;
44
45 $flow = $_REQUEST[flow] ; 37 $flow = $_REQUEST[flow] ;
46
47 if( $flow == "Ajax" || $flow == "" ) // JSON 이나 AJAX 일경우 38 if( $flow == "Ajax" || $flow == "" ) // JSON 이나 AJAX 일경우
48 echo $method->invoke($obj) ; 39 echo $method->invoke($obj) ;
49 else 40 else
...@@ -54,18 +45,13 @@ ...@@ -54,18 +45,13 @@
54 $rurl = $_REQUEST[rurl] ; 45 $rurl = $_REQUEST[rurl] ;
55 $msg = $_REQUEST[msg] ; 46 $msg = $_REQUEST[msg] ;
56 $flow = $_REQUEST[flow] ; 47 $flow = $_REQUEST[flow] ;
57
58 if( $flow == "" ) 48 if( $flow == "" )
59 echo "[ControlException ] flow 형식이 맞지 않습니다." ; 49 echo "[ControlException ] flow 형식이 맞지 않습니다." ;
60 else 50 else
61 { 51 {
62 go("NORMAL",$flow,$msg,$rurl) ; 52 go("NORMAL",$flow,$msg,$rurl) ;
63 } 53 }
64
65 } 54 }
66
67 } 55 }
68
69 } 56 }
70
71 ?> 57 ?>
...\ No newline at end of file ...\ No newline at end of file
......
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?> 1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?> 2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?> 3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftBoardManage.php" ?>
4 <? 4 <?
5 $obj = new AdminUser($_REQUEST) ; 5 $obj = new AdminBoard($_REQUEST) ;
6 6
7 //$list = $obj->getListOfUser() ; 7 $list = $obj->getListOfProductionPortrait() ;
8 $boardType=$_REQUEST["boardType"]; 8 $boardType=$_REQUEST["boardType"];
9 $vnum = $obj->virtualNum ; 9 $vnum = $obj->virtualNum ;
10 ?> 10 ?>
...@@ -73,11 +73,11 @@ ...@@ -73,11 +73,11 @@
73 73
74 74
75 // 단체 삭제 75 // 단체 삭제
76 $(".jDelUserMulti").click2(function(){ 76 $(".jDelMulti").click2(function(){
77 77
78 78
79 var noArr = new Array(); 79 var noArr = new Array();
80 var noCount = $(".jUserNo:checked").length; 80 var noCount = $(".jNo:checked").length;
81 81
82 if(noCount == 0) 82 if(noCount == 0)
83 { 83 {
...@@ -90,10 +90,10 @@ ...@@ -90,10 +90,10 @@
90 { 90 {
91 for(var i = 0; i < noCount; i++ ) 91 for(var i = 0; i < noCount; i++ )
92 { 92 {
93 noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val(); 93 noArr[i] = $(".jNo:checked:eq(" + i + ")").val();
94 } 94 }
95 95
96 deleteUser(noArr); 96 deleteAction(noArr);
97 } 97 }
98 98
99 }); 99 });
...@@ -130,10 +130,10 @@ ...@@ -130,10 +130,10 @@
130 130
131 131
132 132
133 function deleteUser(noArr) 133 function deleteAction(noArr)
134 { 134 {
135 $.ajax({ 135 $.ajax({
136 url : "/action_front.php?cmd=AdminUser.deleteUser", 136 url : "/action_front.php?cmd=AdminBoard.deleteProductionPortrait",
137 async : false, 137 async : false,
138 cache : false, 138 cache : false,
139 dataType : "json", 139 dataType : "json",
...@@ -184,16 +184,16 @@ ...@@ -184,16 +184,16 @@
184 <?=$vnum--?> 184 <?=$vnum--?>
185 </td> 185 </td>
186 <td class="center"> 186 <td class="center">
187 <input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" > 187 <input type="checkbox" class="jNo" value="<?=$list[$i]["ppNo"] ?>" >
188 </td> 188 </td>
189 <td class="center"> 189 <td class="center">
190 190 <?=$list[$i]["title"]?>
191 </td> 191 </td>
192 <td class="center"> 192 <td class="center">
193 193 <?=$list[$i]["regDate"]?>
194 </td> 194 </td>
195 <td class="center"> 195 <td class="center">
196 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" /> 196 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["ppNo"]?>" />
197 </td> 197 </td>
198 198
199 </tr> 199 </tr>
......
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminUser.php" ?> 1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?> 2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftCustomerService.php" ?> 3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftCustomerService.php" ?>
4 <? 4 <?
5 $obj = new AdminUser($_REQUEST) ; 5 $obj = new AdminBoard($_REQUEST) ;
6 6
7 //$list = $obj->getListOfUser() ; 7 $list = $obj->getListOfCS() ;
8 $boardType=$_REQUEST["boardType"];
9 $vnum = $obj->virtualNum ; 8 $vnum = $obj->virtualNum ;
10 ?> 9 ?>
11 <script> 10 <script>
...@@ -73,11 +72,11 @@ ...@@ -73,11 +72,11 @@
73 72
74 73
75 // 단체 삭제 74 // 단체 삭제
76 $(".jDelUserMulti").click2(function(){ 75 $(".jDelMulti").click2(function(){
77 76
78 77
79 var noArr = new Array(); 78 var noArr = new Array();
80 var noCount = $(".jUserNo:checked").length; 79 var noCount = $(".jNo:checked").length;
81 80
82 if(noCount == 0) 81 if(noCount == 0)
83 { 82 {
...@@ -90,7 +89,7 @@ ...@@ -90,7 +89,7 @@
90 { 89 {
91 for(var i = 0; i < noCount; i++ ) 90 for(var i = 0; i < noCount; i++ )
92 { 91 {
93 noArr[i] = $(".jUserNo:checked:eq(" + i + ")").val(); 92 noArr[i] = $(".jNo:checked:eq(" + i + ")").val();
94 } 93 }
95 94
96 deleteUser(noArr); 95 deleteUser(noArr);
...@@ -121,9 +120,9 @@ ...@@ -121,9 +120,9 @@
121 120
122 $("#jCheckAll").change(function(){ 121 $("#jCheckAll").change(function(){
123 if($(this).is(":checked")) 122 if($(this).is(":checked"))
124 $(".jUserNo").prop("checked", true); 123 $(".jNo").prop("checked", true);
125 else 124 else
126 $(".jUserNo").prop("checked", false); 125 $(".jNo").prop("checked", false);
127 }); 126 });
128 127
129 }) ; 128 }) ;
...@@ -133,7 +132,7 @@ ...@@ -133,7 +132,7 @@
133 function deleteUser(noArr) 132 function deleteUser(noArr)
134 { 133 {
135 $.ajax({ 134 $.ajax({
136 url : "/action_front.php?cmd=AdminUser.deleteUser", 135 url : "/action_front.php?cmd=AdminBoard.deleteCS",
137 async : false, 136 async : false,
138 cache : false, 137 cache : false,
139 dataType : "json", 138 dataType : "json",
...@@ -184,16 +183,19 @@ ...@@ -184,16 +183,19 @@
184 <?=$vnum--?> 183 <?=$vnum--?>
185 </td> 184 </td>
186 <td class="center"> 185 <td class="center">
187 <input type="checkbox" class="jUserNo" value="<?=$list[$i]["no"] ?>" > 186 <input type="checkbox" class="jNo" value="<?=$list[$i]["csNo"] ?>" >
188 </td> 187 </td>
189 <td class="center"> 188 <td class="center">
190 189 <?=$list[$i]["userName"]?>
191 </td> 190 </td>
192 <td class="center"> 191 <td class="center">
193 192 <?=$list[$i]["title"]?>
193 </td>
194 <td>
195 <?=$list[$i]["regDate"]?>
194 </td> 196 </td>
195 <td class="center"> 197 <td class="center">
196 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" /> 198 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["csNo"]?>" />
197 </td> 199 </td>
198 200
199 </tr> 201 </tr>
......
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminOperate.php" ?> 1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?> 2 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/header.php" ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftProductionSpecManage.php" ?> 3 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/leftProductionSpecManage.php" ?>
4 <? 4 <?
5 $obj = new AdminOperate($_REQUEST, "") ; 5 $obj = new AdminProductionSpec($_REQUEST) ;
6 //$list = $obj->getListOfRoomForPayment(); 6 $list=$obj->getListOfProductionSpec();
7
8 $vnum = $obj->virtualNum ; 7 $vnum = $obj->virtualNum ;
9 ?> 8 ?>
10 <script> 9 <script>
...@@ -90,7 +89,6 @@ ...@@ -90,7 +89,6 @@
90 }); 89 });
91 90
92 91
93 // 단체 삭제
94 $(".jDelMulti").click2(function(){ 92 $(".jDelMulti").click2(function(){
95 93
96 94
...@@ -133,7 +131,7 @@ ...@@ -133,7 +131,7 @@
133 function deleteAction(noArr) 131 function deleteAction(noArr)
134 { 132 {
135 $.ajax({ 133 $.ajax({
136 url : "/action_front.php?cmd=AdminRent.delBuilding", 134 url : "/action_front.php?cmd=AdminProductionSpec.deleteProductionSpec",
137 async : false, 135 async : false,
138 cache : false, 136 cache : false,
139 dataType : "json", 137 dataType : "json",
...@@ -141,7 +139,11 @@ ...@@ -141,7 +139,11 @@
141 "no" : noArr 139 "no" : noArr
142 }, 140 },
143 success : function(data){ 141 success : function(data){
142 alert("삭제되었습니다");
144 location.reload(); 143 location.reload();
144 },
145 error : function(a, b, c){
146 alert(a+b+c);
145 } 147 }
146 }); 148 });
147 } 149 }
...@@ -163,13 +165,16 @@ ...@@ -163,13 +165,16 @@
163 <label> 165 <label>
164 <span>조회 조건</span> 166 <span>조회 조건</span>
165 167
166 <select value="asda" style="margin-right:20px;"> 168 <select name="searchType" style="margin-right:20px;">
167 <option>asdasd</option> 169 <option value="">전체</option>
170 <option value="CN" <?=$_REQUEST[searchType] == "CN" ? "SELECTED" : ""?>>상호명</option>
171 <option value="PN" <?=$_REQUEST[searchType] == "PN" ? "SELECTED" : ""?>>제품명</option>
172 <option value="MN" <?=$_REQUEST[searchType] == "MN" ? "SELECTED" : ""?>>담당자</option>
168 </select> 173 </select>
169 174
170 </label> 175 </label>
171 <label> 176 <label>
172 <input type="text" id="search_room" name="search_room" class="wm" value="<?=$_REQUEST['search_room']?>" /> 177 <input type="text" id="searchText" name="searchText" class="wm" value="<?=$_REQUEST['searchText']?>" />
173 </label> 178 </label>
174 179
175 180
...@@ -181,9 +186,9 @@ ...@@ -181,9 +186,9 @@
181 <label> 186 <label>
182 <span>기간 설정</span> 187 <span>기간 설정</span>
183 188
184 <input type="text" value="<?=$_REQUEST['rent_date_former']?>" id="rent_date_former" name="rent_date_former" class="jRsvDate" /> 189 <input type="text" value="<?=$_REQUEST['dateFormer']?>" id="dateFormer" name="dateFormer" class="jRsvDate" />
185 &nbsp;~&nbsp; 190 &nbsp;~&nbsp;
186 <input type="text" value="<?=$_REQUEST['rent_date_latter']?>" id="rent_date_latter" name="rent_date_latter" class="jRsvDate" /> 191 <input type="text" value="<?=$_REQUEST['dateLatter']?>" id="dateLatter" name="dateLatter" class="jRsvDate" />
187 192
188 </label> 193 </label>
189 194
...@@ -215,56 +220,29 @@ ...@@ -215,56 +220,29 @@
215 <?=$vnum--?> 220 <?=$vnum--?>
216 </td> 221 </td>
217 <td class="center"> 222 <td class="center">
218 <input type="checkbox" class="jNo" value="<?=$list[$i]["no"] ?>" > 223 <input type="checkbox" class="jNo" value="<?=$list[$i]["productionNo"] ?>" >
219 </td> 224 </td>
220 <!--//건물이름--> 225
226 <td class="center">
227 <?=$list[$i]["regDate"]?>
228 </td>
229
221 <td class="center"> 230 <td class="center">
222 <?=$list[$i]["Bname"]?> 231 <?=$list[$i]["companyName"]?>
223 </td> 232 </td>
224 233
225 <!--//호실 -->
226 <td class="center">
227 <?=$list[$i]["Rname"]?>
228 </td>
229 <!--//지난달 월세 -->
230 234
231 <td class="center"> 235 <td class="center">
232 <? 236 <?=$list[$i]["productName"]?>
233 if($list[$i]["rent_paid"]==NULL) echo "";
234 else if($list[$i]["rent_paid"]==0) echo "연체";
235 else if($list[$i]["rent_paid"]==1) echo "납입";
236 else echo "청구중";
237
238 ?>
239 </td>
240 <!--//월 납입일 -->
241
242 <td class="center">
243 <?=$list[$i]["monthly_rent_date"]?>
244 </td>
245
246 <!--//지난달 공과금 -->
247 <td class="center">
248 <?
249 if($list[$i]["bill_paid"]==NULL) echo "";
250 else if($list[$i]["bill_paid"]==0) echo "연체";
251 else if($list[$i]["bill_paid"]==1) echo "납입";
252 else echo "청구중";
253
254 ?>
255 </td>
256 <!--//공과금 납입일 -->
257
258 <td class="center">
259 <?=$list[$i]["billing_date"]?>
260 </td> 237 </td>
261 238
262 <!--//퇴실예정일 --> 239
263 <td class="center"> 240 <td class="center">
264 <?=$list[$i]["leaving_due_date"]?> 241 <?=$list[$i]["userName"]?>
265 </td> 242 </td>
243
266 <td class="center"> 244 <td class="center">
267 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["no"]?>" /> 245 <input type="button" class="button searchsmall white jView" value="상세보기" no="<?=$list[$i]["productionNo"]?>" />
268 </td> 246 </td>
269 247
270 </tr> 248 </tr>
......
...@@ -6,11 +6,21 @@ ...@@ -6,11 +6,21 @@
6 6
7 //$list = $obj->getListOfAdminPush() ; 7 //$list = $obj->getListOfAdminPush() ;
8 $vnum = $obj->virtualNum ; 8 $vnum = $obj->virtualNum ;
9
10 $rurl = pack("H*", $_REQUEST["rurl"]) ;
9 ?> 11 ?>
10 <script> 12 <script>
13 var _rurl = "<?=$rurl?>";
11 14
12 $(document).ready(function(){ 15 $(document).ready(function(){
13 16
17 $.ajax({
18 url : "/setting/agree.txt",
19 dataType : "html",
20 success : function(data){
21 $("#content").val(data);
22 }});
23
14 //=====프레입웤 변수들==================================================================================// 24 //=====프레입웤 변수들==================================================================================//
15 var FORM_TARGET_CLS_NM = "DIV#Contents" ; // 폼을 동적 wrap 할 타겟 ID이름 25 var FORM_TARGET_CLS_NM = "DIV#Contents" ; // 폼을 동적 wrap 할 타겟 ID이름
16 var FORM_NAME = "nf" ; // 폼이름 26 var FORM_NAME = "nf" ; // 폼이름
...@@ -42,224 +52,48 @@ ...@@ -42,224 +52,48 @@
42 jForm.submit() ; 52 jForm.submit() ;
43 }); 53 });
44 54
45 $(".jSearchGroup").click2(function(){ 55 $("#type").change(function(){
46 56 if($("#type").val() == "PR"){
47 var title = "그룹 검색"; 57 $.ajax({
48 58 url : "/setting/privacy.txt",
49 $('#jDialogArea').dialog({ 59 dataType : "html",
50 modal : true, 60 success : function(data){
51 title : title, 61 $("#content").val(data);
52 open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
53 width : 400,
54 height : 500,
55 resizable : false,
56 buttons: [
57 {
58 text: "확인",
59 click: function() {
60 var group_no = $(".jTargetNo:checked").val();
61 var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
62
63 if(group_no == undefined)
64 {
65 alert("대상을 선택해주세요.");
66 return false;
67 }
68 else
69 {
70 $("#group_no").val(group_no);
71 $("#group_name").val(group_name);
72 $( this ).dialog( "close" );
73
74 $("#jTargetSearchText").val("");
75 $("#jSearchResultArea").empty();
76 }
77 }
78 },
79 {
80 text: "닫기",
81 click: function() {
82 $("#jTargetSearchText").val("");
83 $("#jSearchResultArea").empty();
84 $( this ).dialog( "close" );
85 }
86 }
87 ],
88 closeOnEscape: false
89 });
90 });
91
92 $(".jSearchPrivate").click2(function(){
93
94 var title = "회원 검색";
95
96 $('#jDialogAreaP').dialog({
97 modal : true,
98 title : title,
99 open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
100 width : 400,
101 height : 500,
102 resizable : false,
103 buttons: [
104 {
105 text: "확인",
106 click: function() {
107 var group_no = $(".jTargetNo:checked").val();
108 var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
109
110 if(group_no == undefined)
111 {
112 alert("대상을 선택해주세요.");
113 return false;
114 }
115 else
116 {
117 $("#group_no").val(group_no);
118 $("#group_name").val(group_name);
119 $( this ).dialog( "close" );
120
121 $("#jTargetSearchText").val("");
122 $("#jSearchResultArea").empty();
123 }
124 } 62 }
125 }, 63 });
126 {
127 text: "닫기",
128 click: function() {
129 $("#jTargetSearchText").val("");
130 $("#jSearchResultArea").empty();
131 $( this ).dialog( "close" );
132 }
133 }
134 ],
135 closeOnEscape: false
136 });
137 });
138
139
140 $(".jTargetSearchBtn").click2(function(){
141 var search_text = $("#jTargetSearchText").val();
142 var ajax_url = "/admin/entity/entityGroupSearch.php";
143
144 if(search_text == "")
145 {
146 alert("검색어를 입력해주세요.");
147 return false;
148 } 64 }
149 65 else{
150 $.ajax({ 66 $.ajax({
151 url : ajax_url, 67 url : "/setting/agree.txt",
152 data : { 68 dataType : "html",
153 "search_text" : search_text 69 success : function(data){
154 }, 70 $("#content").val(data);
155 dataType:"html", 71 }
156 success : function(data) 72 });
157 {
158 $("#jSearchResultArea").html(data);
159 setSearchAreaEventHandler();
160 }
161 });
162
163 });
164
165 $(".jTargetSearchPBtn").click2(function(){
166 var search_text = $("#jTargetSearchTextP").val();
167 var ajax_url = "/admin/entity/entityPrivateSearch.php";
168
169 if(search_text == "")
170 {
171 alert("검색어를 입력해주세요.");
172 return false;
173 }
174
175 $.ajax({
176 url : ajax_url,
177 data : {
178 "search_text" : search_text
179 },
180 dataType:"html",
181 success : function(data)
182 {
183 $("#jSearchResultAreaP").html(data);
184 setSearchAreaEventHandler();
185 }
186 });
187
188 });
189
190
191 $("#push_target_type").change(function(){
192 resetTargetData();
193 if($(this).val() == "1")
194 {
195 $("#jGroupArea").hide();
196 $("#jPrivateArea").hide();
197 }
198 else if($(this).val() == "2")
199 {
200 $("#jGroupArea").show();
201 $("#jPrivateArea").hide();
202 }else{
203 $("#jGroupArea").hide();
204 $("#jPrivateArea").show();
205 } 73 }
206 }); 74 });
207 75
208
209 $(".jSave").click2(function(){ 76 $(".jSave").click2(function(){
210 var push_msg = $("#push_msg").val(); 77 if(confirm("내용을 저장하시겠습니까?")){
211 var push_target_type = $("#push_target_type").val(); 78 $("#jData").ajaxSubmit({
212 var group_no = $("#group_no").val(); 79 url:"/action_front.php?cmd=AdminPush.saveAgreement",
213 80 type : "post",
214 if(push_target_type == "2" && group_no == "") 81 forceSync : true,
215 { 82 dataType : "json",
216 alert("그룹을 선택해주세요."); 83 success : function(data){
217 return false; 84 alert(data.returnMessage);
218 } 85 location.href = _rurl;
86 }
219 87
220 if(push_msg == "") 88 });
221 {
222 alert("푸시 내용을 입력해주세요.");
223 return false;
224 } 89 }
225
226 $.ajax({
227 url : "/action_front.php?cmd=AdminPush.sendAdminPush",
228 async : true,
229 cache : false,
230 dataType : "json",
231 data : {
232 "push_msg" : push_msg,
233 "push_target_type" : push_target_type,
234 "group_no" : group_no
235 }, success : function(data) {
236 alert(data.returnMessage) ;
237 if(data.returnCode == 1) {
238 location.reload();
239 }
240 }
241 });
242
243
244 90
245 }); 91 });
92
246 93
247 }) ; 94 }) ;
248 95
249 function setSearchAreaEventHandler()
250 {
251 $(".jTargetNo").unbind("change");
252 $(".jTargetNo").change(function(){
253 $(".jTargetNo").prop("checked", false);
254 $(this).prop("checked", true);
255 });
256 }
257 96
258 function resetTargetData()
259 {
260 $("#group_no").val("");
261 $("#group_name").val("");
262 }
263 97
264 98
265 99
...@@ -271,28 +105,31 @@ ...@@ -271,28 +105,31 @@
271 <h1>약관 관리</h1> 105 <h1>약관 관리</h1>
272 <h2>푸시관리 > <span>약관관리</span></h2> 106 <h2>푸시관리 > <span>약관관리</span></h2>
273 <div class="data"> 107 <div class="data">
274 108 <form id="jData" method="post" enctype="multipart/form-data">
275 <table class="datav" style="width:100%;"> 109 <table class="datav" style="width:100%;">
276 <colgroup> 110 <colgroup>
277 <col width="20%" /> 111 <col width="20%" />
278 <col width="80%" /> 112 <col width="80%" />
279 </colgroup> 113 </colgroup>
280 <tr> 114 <tr>
281 <th style="height:25px;">제목</th> 115 <th style="height:25px;">약관 종류</th>
282 <td class="l"> 116 <td>
283 <input type="text" style="width:95%"/> 117 <select id="type" name="type">
118 <option value="AG">이용약관</option>
119 <option value="PR">개인정보처리방침</option>
120 </select>
284 </td> 121 </td>
285 </tr> 122 </tr>
286 <tr> 123 <tr>
287 <th style="height:25px;">내용</th> 124 <th style="height:25px;">내용</th>
288 <td class="l"> 125 <td class="l">
289 <textarea rows="25" style="width:95%;" id="push_msg"></textarea> 126 <textarea rows="25" style="width:95%;" id="content" name="content"><?=$info?></textarea>
290 </td> 127 </td>
291 </tr> 128 </tr>
292 </table> 129 </table>
293 130 </form>
294 <div class="btngroupcenter" style="width:100%;"> 131 <div class="btngroupcenter" style="width:100%;">
295 <span class="button bigrounded blue jSave" >전송</span> 132 <span class="button bigrounded blue jSave" >등록</span>
296 </div> 133 </div>
297 134
298 135
......
...@@ -23,188 +23,11 @@ ...@@ -23,188 +23,11 @@
23 23
24 var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ; 24 var jForm = $(FORM_TARGET_CLS_NM).mf({ "name" : FORM_NAME , "method" : FORM_METHOD , "action" : FORM_ACTION , "useFile" : FORM_USE_FILE }) ;
25 25
26 // 페이징
27 $(".jPage").click2(function(){
28 jForm.ci() ;
29 jForm.mi("page",$(this).attr("page")) ;
30 jForm.submit() ;
31 }) ;
32
33 26
34 $(".jAutoSearch").change(function(){ 27 $(".jAutoSearch").change(function(){
35 jForm.ci() ; 28 jForm.ci() ;
36 jForm.submit() ; 29 jForm.submit() ;
37 }); 30 });
38
39
40 $(".jSearch").click2(function(){
41 jForm.ci() ;
42 jForm.submit() ;
43 });
44
45 $(".jSearchGroup").click2(function(){
46
47 var title = "그룹 검색";
48
49 $('#jDialogArea').dialog({
50 modal : true,
51 title : title,
52 open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
53 width : 400,
54 height : 500,
55 resizable : false,
56 buttons: [
57 {
58 text: "확인",
59 click: function() {
60 var group_no = $(".jTargetNo:checked").val();
61 var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
62
63 if(group_no == undefined)
64 {
65 alert("대상을 선택해주세요.");
66 return false;
67 }
68 else
69 {
70 $("#group_no").val(group_no);
71 $("#group_name").val(group_name);
72 $( this ).dialog( "close" );
73
74 $("#jTargetSearchText").val("");
75 $("#jSearchResultArea").empty();
76 }
77 }
78 },
79 {
80 text: "닫기",
81 click: function() {
82 $("#jTargetSearchText").val("");
83 $("#jSearchResultArea").empty();
84 $( this ).dialog( "close" );
85 }
86 }
87 ],
88 closeOnEscape: false
89 });
90 });
91
92 $(".jSearchPrivate").click2(function(){
93
94 var title = "회원 검색";
95
96 $('#jDialogAreaP').dialog({
97 modal : true,
98 title : title,
99 open : function(event, ui) { $(".ui-dialog-titlebar-close").hide(); },
100 width : 400,
101 height : 500,
102 resizable : false,
103 buttons: [
104 {
105 text: "확인",
106 click: function() {
107 var group_no = $(".jTargetNo:checked").val();
108 var group_name = $(".jTargetNo:checked").parents("tr").find(".jTargetName").attr("data");
109
110 if(group_no == undefined)
111 {
112 alert("대상을 선택해주세요.");
113 return false;
114 }
115 else
116 {
117 $("#group_no").val(group_no);
118 $("#group_name").val(group_name);
119 $( this ).dialog( "close" );
120
121 $("#jTargetSearchText").val("");
122 $("#jSearchResultArea").empty();
123 }
124 }
125 },
126 {
127 text: "닫기",
128 click: function() {
129 $("#jTargetSearchText").val("");
130 $("#jSearchResultArea").empty();
131 $( this ).dialog( "close" );
132 }
133 }
134 ],
135 closeOnEscape: false
136 });
137 });
138
139
140 $(".jTargetSearchBtn").click2(function(){
141 var search_text = $("#jTargetSearchText").val();
142 var ajax_url = "/admin/entity/entityGroupSearch.php";
143
144 if(search_text == "")
145 {
146 alert("검색어를 입력해주세요.");
147 return false;
148 }
149
150 $.ajax({
151 url : ajax_url,
152 data : {
153 "search_text" : search_text
154 },
155 dataType:"html",
156 success : function(data)
157 {
158 $("#jSearchResultArea").html(data);
159 setSearchAreaEventHandler();
160 }
161 });
162
163 });
164
165 $(".jTargetSearchPBtn").click2(function(){
166 var search_text = $("#jTargetSearchTextP").val();
167 var ajax_url = "/admin/entity/entityPrivateSearch.php";
168
169 if(search_text == "")
170 {
171 alert("검색어를 입력해주세요.");
172 return false;
173 }
174
175 $.ajax({
176 url : ajax_url,
177 data : {
178 "search_text" : search_text
179 },
180 dataType:"html",
181 success : function(data)
182 {
183 $("#jSearchResultAreaP").html(data);
184 setSearchAreaEventHandler();
185 }
186 });
187
188 });
189
190
191 $("#push_target_type").change(function(){
192 resetTargetData();
193 if($(this).val() == "1")
194 {
195 $("#jGroupArea").hide();
196 $("#jPrivateArea").hide();
197 }
198 else if($(this).val() == "2")
199 {
200 $("#jGroupArea").show();
201 $("#jPrivateArea").hide();
202 }else{
203 $("#jGroupArea").hide();
204 $("#jPrivateArea").show();
205 }
206 });
207
208 31
209 $(".jSave").click2(function(){ 32 $(".jSave").click2(function(){
210 var push_msg = $("#push_msg").val(); 33 var push_msg = $("#push_msg").val();
...@@ -230,8 +53,7 @@ ...@@ -230,8 +53,7 @@
230 dataType : "json", 53 dataType : "json",
231 data : { 54 data : {
232 "push_msg" : push_msg, 55 "push_msg" : push_msg,
233 "push_target_type" : push_target_type, 56 "push_target_type" : push_target_type
234 "group_no" : group_no
235 }, success : function(data) { 57 }, success : function(data) {
236 alert(data.returnMessage) ; 58 alert(data.returnMessage) ;
237 if(data.returnCode == 1) { 59 if(data.returnCode == 1) {
...@@ -245,24 +67,6 @@ ...@@ -245,24 +67,6 @@
245 }); 67 });
246 68
247 }) ; 69 }) ;
248
249 function setSearchAreaEventHandler()
250 {
251 $(".jTargetNo").unbind("change");
252 $(".jTargetNo").change(function(){
253 $(".jTargetNo").prop("checked", false);
254 $(this).prop("checked", true);
255 });
256 }
257
258 function resetTargetData()
259 {
260 $("#group_no").val("");
261 $("#group_name").val("");
262 }
263
264
265
266 </script> 70 </script>
267 71
268 72
...@@ -281,32 +85,14 @@ ...@@ -281,32 +85,14 @@
281 <tr> 85 <tr>
282 <th style="height:25px;">제목</th> 86 <th style="height:25px;">제목</th>
283 <td class="l"> 87 <td class="l">
284 <input type="text" style="width:95%"/> 88 <input type="text" name="title" style="width:95%"/>
285 </td>
286 </tr>
287
288 <tr id="jGroupArea" style="display:none;">
289 <th style="height:25px;">그룹</th>
290 <td class="l">
291 <input type="hidden" id="group_no" />
292 <input type="text" disabled="disabled" id="group_name"/>
293 <input type="button" class="button searchsmall white jSearchGroup" value="그룹검색" />
294 </td>
295 </tr>
296
297 <tr id="jPrivateArea" style="display:none;">
298 <th style="height:25px;">개인</th>
299 <td class="l">
300 <input type="hidden" id="group_no" />
301 <input type="text" disabled="disabled" id="group_name"/>
302 <input type="button" class="button searchsmall white jSearchPrivate" value="회원검색" />
303 </td> 89 </td>
304 </tr> 90 </tr>
305 91
306 <tr> 92 <tr>
307 <th style="height:25px;">내용</th> 93 <th style="height:25px;">내용</th>
308 <td class="l"> 94 <td class="l">
309 <textarea rows="3" style="width:95%;" id="push_msg"></textarea> 95 <textarea rows="5" name="pushMessage" style="width:95%;" id="pushMessage"></textarea>
310 </td> 96 </td>
311 </tr> 97 </tr>
312 </table> 98 </table>
...@@ -315,53 +101,7 @@ ...@@ -315,53 +101,7 @@
315 <span class="button bigrounded blue jSave" >전송</span> 101 <span class="button bigrounded blue jSave" >전송</span>
316 </div> 102 </div>
317 103
318 <h3>푸시 이력</h3> 104
319 <table class="datacList">
320 <thead>
321 <tr>
322 <th class="no" width="5%">No</th>
323 <th width="65%">메세지</th>
324 <th width="10%">전송시간</th>
325 </tr>
326 </thead>
327 <tbody><!-- 10줄 리스트// 마지막 tr에 class="last" 넣어주세요 -->
328 <? for($i=0; $i<sizeof($list); $i++){ ?>
329 <tr class="<?=(sizeof($list)-1 == $i) ? "last" : "datacLists"?>">
330 <td class="no center">
331 <?=$vnum--?>
332 </td>
333 <td class="center">
334 <?
335 if($list[$i]["push_target_type"] == "1")
336 echo "전체";
337 else if($list[$i]["push_target_type"] == "2")
338 echo "그룹";
339 else if($list[$i]["push_target_type"] == "3")
340 echo "개인";
341 ?>
342 </td>
343 <td class="center">
344 <?=$list[$i]["push_msg"]?>
345 </td>
346 <td class="center">
347 <?=$list[$i]["push_count"]?>
348 </td>
349 <td class="center">
350 <?=$list[$i]["push_dt"]?>
351 </td>
352 </tr>
353 <? } ?>
354 <?if(sizeof($list) == 0){?>
355 <tr class="last">
356 <td class="no center" colspan="11">No Data</td>
357 </tr>
358 <?}?>
359 </tbody>
360 </table>
361
362 <!-- Pagination -->
363 <? include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/php/pageNavigation.php" ?>
364 <!--//Pagination -->
365 105
366 </div> 106 </div>
367 107
......
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBase.php" ;?>
2 <?
3 if (! class_exists("AdminProductionSpec")){
4 class AdminProductionSpec extends AdminBase{
5
6 function __construct($req)
7 {
8 parent::__construct($req);
9 }
10
11 function getListOfProductionSpec(){
12 $searchType=$this->req["searchType"];
13 $searchText=$this->req["searchText"];
14 $dateFormer=$this->req["dateFormer"];
15 $dateLatter=$this->req["dateLatter"];
16
17 $where=" WHERE PS.status=1";
18
19 if($searchType=="CN")
20 $where.=" AND companyName LIKE '%{$searchText}%'";
21 else if($searchType=="PN")
22 $where.=" AND productName LIKE '%{$searchText}%'";
23 else if($searchType=="MN")
24 $where.=" AND userName LIKE '%{$searchText}%'";
25 else if($searchType=="")
26 $where.=" AND (companyName LIKE '%{$searchText}%' OR productName LIKE '%{$searchText}%' OR userName LIKE '%{$searchText}%')";
27
28 if($dateFormer != "")
29 $where.=" AND DATE_FORMAT(PS.regDate, '%Y%m%d') >= DATE_FORMAT('{$dateFormer}', '%Y%m%d')";
30 if($dateLatter != "")
31 $where.=" AND DATE_FORMAT(PS.regDate, '%Y%m%d') <= DATE_FORMAT('{$dateLatter}', '%Y%m%d')";
32
33
34 $sql="
35 SELECT COUNT(*) AS rn
36 FROM tblProductionSpec PS
37 JOIN tblUser U ON PS.userFk=U.userNo
38 {$where}
39 ORDER BY PS.regDate DESC
40 ";
41 $this->initPage();
42 $this->rownum=$this->getValue($sql, 'rn');
43 $this->setPage($this->rownum);
44 $limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
45
46
47 $sql="
48 SELECT productionNo, DATE_FORMAT(PS.requestDate, '%Y-%m-%d') AS requestDate, PS.companyName, PS.productName, U.userName
49 FROM tblProductionSpec PS
50 JOIN tblUser U ON PS.userFk=U.userNo
51 {$where}
52 ORDER BY PS.productionNo DESC
53 {$limit}
54 ";
55
56 $result=$this->getArray($sql);
57 //echo json_encode($result);
58 return $result;
59 }
60
61 function getInfoOfProductionSpec(){
62 $productionNo=$this->req["no"];
63 $sql="
64 SELECT *
65 FROM tblProductionSpec
66 WHERE productionNo='{$productionNo}'
67 ";
68 $result=$this->getRow($sql);
69 //echo json_encode($result);
70 return $result;
71 }
72
73 function getListOfManager(){
74 $sql="
75 SELECT userNo, userName
76 FROM tblUser
77 WHERE userType=2 AND status=1
78 ORDER BY userNo ASC
79 ";
80 $result=$this->getArray($sql);
81 return $result;
82 }
83
84 function saveProductionSpec(){
85 $productionNo=$this->req["productionNo"];
86
87 $managerFk=$this->req["managerFk"];
88 $requestDate=$this->req["requestDate"];
89 $customerName=$this->req["customerName"];
90 $companyName=$this->req["companyName"];
91 $vehicleTON=$this->req["vehicleTON"];
92 $vehicleText=$this->req["vehicleText"];
93 $vehicleType=$this->req["vehicleType"];
94 $productName=$this->req["productName"];
95 $telephone=$this->req["telephone1"].$this->req["telephone2"].$this->req["telephone3"];
96 $type=$this->req["type"];
97 $typeValue=$this->req["typeValue"];
98 $internalLength=$this->req["internalLength"];
99 $internalHeight=$this->req["internalHeight"];
100 $internalWidth=$this->req["internalWidth"];
101 $alCoil=$this->req["alCoil"];
102 $alCoilValue=$this->req["alCoilValue"];
103 $floor=$this->req["floor"];
104 $floorValueT=$this->req["floorValueT"];
105 $floorValueText=$this->req["floorValueText"];
106 $tent=$this->req["tent"];
107 $sideBoard=$this->req["sideBoard"];
108 $sideBoardValue=$this->req["sideBoardValue"];
109 $windStopper=$this->req["windStopper"];
110 $windStopperValue=$this->req["windStopperValue"];
111 $freezer=$this->req["freezer"];
112 $freezerValue=$this->req["freezerValue"];
113 $gateType=$this->req["gateType"];
114 $gateSize=$this->req["gateSize"];
115 $gateValue=$this->req["gateValue"];
116 $load=$this->req["load"];
117 $frontBack=$this->req["frontBack"];
118 $eTrackGate=$this->req["eTrackGate"];
119 $eTrackWing=$this->req["eTrackWing"];
120 $eTrackValue=$this->req["eTrackValue"];
121 $toolBucket=$this->req["toolBucket"];
122 $toolBucketValue=$this->req["toolBucketValue"];
123 $bumperFootHold=$this->req["bumperFootHold"];
124 $wingProtector=$this->req["wingProtector"];
125 $axis=$this->req["axis"];
126 $axisValue=$this->req["axisValue"];
127 $balance=$this->req["balance"];
128 $specialAddition1=$this->req["specialAddition1"];
129 $specialAddition2=$this->req["specialAddition2"];
130 $specialAddition3=$this->req["specialAddition3"];
131 $specialAddition4=$this->req["specialAddition4"];
132 $specialAddition5=$this->req["specialAddition5"];
133 $sql = "
134 UPDATE `tblProductionSpec`
135 SET
136 `userFk` = '{$managerFk}',
137 `requestDate` = '{$requestDate}',
138 `customerName` = '{$customerName}',
139 `companyName` = '{$companyName}',
140 `vehicleTON` = '{$vehicleTON}',
141 `vehicleText` = '{$vehicleText}',
142 `vehicleType` = '{$vehicleType}',
143 `productName` = '{$productName}',
144 `telephone` = '{$telephone}',
145 `type` = '{$type}',
146 `typeValue` = '{$typeValue}',
147 `internalLength` = '{$internalLength}',
148 `internalHeight` = '{$internalHeight}',
149 `internalWidth` = '{$internalWidth}',
150 `alCoil` = '{$alCoil}',
151 `alCoilValue` = '{$alCoilValue}',
152 `floor` = '{$floor}',
153 `floorValueT` = '{$floorValueT}',
154 `floorValueText` = '{$floorValueText}',
155 `tent` = '{$tent}',
156 `sideBoard` = '{$sideBoard}',
157 `sideBoardValue` = '{$sideBoardValue}',
158 `windStopper` = '{$windStopper}',
159 `windStopperValue` = '{$windStopperValue}',
160 `freezer` = '{$freezer}',
161 `freezerValue` = '{$freezerValue}',
162 `gateType` = '{$gateType}',
163 `gateSize` = '{$gateSize}',
164 `gateValue` = '{$gateValue}',
165 `load` = '{$load}',
166 `frontBack` = '{$frontBack}',
167 `eTrackGate` = '{$eTrackGate}',
168 `eTrackWing` = '{$eTrackWing}',
169 `eTrackValue` = '{$eTrackValue}',
170 `toolBucket` = '{$toolBucket}',
171 `toolBucketValue` = '{$toolBucketValue}',
172 `bumperFootHold` = '{$bumperFootHold}',
173 `wingProtector` = '{$wingProtector}',
174 `axis` = '{$axis}',
175 `axisValue` = '{$axisValue}',
176 `balance` = '{$balance}',
177 `specialAddition1` = '{$specialAddition1}',
178 `specialAddition2` = '{$specialAddition2}',
179 `specialAddition3` = '{$specialAddition3}',
180 `specialAddition4` = '{$specialAddition4}',
181 `specialAddition5` = '{$specialAddition5}'
182 WHERE `productionNo` = '{$productionNo}';
183 ";
184 $this->update($sql);
185 return $this->makeResultJson(1, "저장되었습니다");
186 }
187
188 function deleteProductionSpec(){
189 $noArr = $this->req["no"];
190
191 $noStr = implode(',', $noArr);
192
193 $sql = "
194 UPDATE tblProductionSpec
195 SET status = 0
196 WHERE `productionNo` IN({$noStr})
197 ";
198 $this->update($sql);
199 }
200
201 }
202 }
203 ?>
...\ No newline at end of file ...\ No newline at end of file
...@@ -123,55 +123,28 @@ if(!class_exists("AdminPush")){ ...@@ -123,55 +123,28 @@ if(!class_exists("AdminPush")){
123 123
124 function sendAdminPush() 124 function sendAdminPush()
125 { 125 {
126 $push_msg = $this->req["push_msg"]; 126 $push_msg = $this->req["pushMessage"];
127 $group_no = $this->req["group_no"];
128 $push_target_type = $this->req["push_target_type"];
129 $push_code = $this->getBulkPushCode(); 127 $push_code = $this->getBulkPushCode();
130 $push_succeed=0; 128 $push_succeed=0;
131 129
132 if($push_target_type == "1"){
133 $sql = " 130 $sql = "
134 INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id, app_type) 131 INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id)
135 ( 132 (
136 SELECT '{$push_code}', registration_key, device_type_id, app_type 133 SELECT '{$push_code}', registrationKey, deviceTypeID
137 FROM tbl_user U 134 FROM tblUser U
138 WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1 135 WHERE U.status = 1 AND U.registrationKey != '' AND push = 1
139 ) 136 )
140 "; 137 ";
141 $push_count = $this->update($sql); 138 $push_count = $this->update($sql);
142 139
143 $sql="SELECT count(*) as rn 140 $sql="SELECT count(*) as rn
144 FROM tbl_user U 141 FROM tblUser U
145 WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1"; 142 WHERE U.status = 1 AND U.registrationKey != '' AND push = 1";
146 $result=$this->getRow($sql); 143 $result=$this->getRow($sql);
147 $push_succeed = $result["rn"]; 144 $push_succeed = $result["rn"];
148 } 145
149 else
150 {
151 $sql = "
152 INSERT INTO tbl_push_target_bulk(push_code, registration_key, device_type_id, app_type)
153 (
154 SELECT '{$push_code}', registration_key, device_type_id, app_type
155 FROM tbl_user U
156 WHERE U.group_fk = '{$group_no}' AND U.status = 'Y' AND U.registration_key != '' AND is_push = 1
157 )
158 ";
159 $push_count = $this->update($sql);
160 $sql="SELECT count(*) as rn
161 FROM tbl_user U
162 WHERE U.status = 'Y' AND U.registration_key != '' AND is_push = 1";
163 $result=$this->getRow($sql);
164 $push_succeed = $result["rn"];
165 }
166 146
167 $sql = " 147 $push_msg = $this->req["pushMessage"];
168 INSERT INTO tbl_push_log(push_target_type, group_fk, push_msg, push_count, push_dt)
169 VALUES('{$push_target_type}', '{$group_no}', '{$push_msg}', '{$push_succeed}', NOW())
170 ";
171 $this->update($sql);
172 $push_msg = $this->req["push_msg"];
173 $group_no = $this->req["group_no"];
174 $push_target_type = $this->req["push_target_type"];
175 148
176 // 푸시 전송 149 // 푸시 전송
177 $params = Array( 150 $params = Array(
...@@ -223,6 +196,29 @@ if(!class_exists("AdminPush")){ ...@@ -223,6 +196,29 @@ if(!class_exists("AdminPush")){
223 196
224 return $result; 197 return $result;
225 } 198 }
199
200 function saveAgreement(){
201 $type=$this->req["type"];
202 $content=$this->req["content"];
203
204 if($type == "AG"){
205 $filePath = $this->agreeInfoPath;
206 $files = fopen($filePath, "w");
207
208 fwrite($files, $content);
209 fclose($files);
210 return $this->makeResultJson(1, "약관이 저장되었습니다");
211 }
212 else if($type == "PR"){
213 $filePath = $this->privacyInfoPath;
214 $files = fopen($filePath, "w");
215 fwrite($files, $content);
216 fclose($files);
217 return $this->makeResultJson(1, "개인정보처리방침이 저장되었습니다");
218 }
219
220
221 }
226 222
227 } // class end 223 } // class end
228 } 224 }
......
...@@ -316,6 +316,283 @@ if (! class_exists("AdminBoard")){ ...@@ -316,6 +316,283 @@ if (! class_exists("AdminBoard")){
316 $this->update($sql); 316 $this->update($sql);
317 } 317 }
318 318
319 function getListOfCS(){
320 $sql="
321 SELECT COUNT(*) AS rn
322 FROM tblCustomerService CS
323 JOIN tblUser U ON CS.userFk=U.userNo
324 WHERE CS.status=1 AND U.status=1
325 ";
326 $this->initPage();
327 $this->rownum=$this->getValue($sql, 'rn');
328 $this->setPage($this->rownum);
329 $limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
330
331 $sql="
332 SELECT CS.*, U.userName
333 FROM tblCustomerService CS
334 JOIN tblUser U ON CS.userFk=U.userNo
335 WHERE CS.status=1 AND U.status=1
336 ORDER BY CS.regDate DESC
337 {$limit}
338 ";
339 $result=$this->getArray($sql);
340 return $result;
341 }
342
343 function getInfoOfCS(){
344 $csNo=$this->req["no"];
345
346 $sql="
347 SELECT CS.*, U.userName
348 FROM tblCustomerService CS
349 JOIN tblUser U ON CS.userFk=U.userNo
350 WHERE CS.csNo='{$csNo}'
351 ";
352 $result=$this->getRow($sql);
353 return $result;
354 }
355
356 function saveCS(){
357 $targetFk=$this->req["csNo"];
358 $content=$this->req["content"];
359
360 $sql="
361 INSERT INTO tblComment(userFk, targetFk, commentGroup, gOrder, depth, content, commentType, status, regDate)
362 VALUES
363 (
364 0,
365 '{$targetFk}',
366 0,
367 1,
368 1,
369 '{$content}',
370 'CS',
371 1,
372 NOW()
373 )
374 ";
375 $this->update($sql);
376
377 $currentNo=$this->mysql_insert_id();
378 $sql="
379 UPDATE tblComment
380 SET commentGroup='{$currentNo}'
381 WHERE commentNo='{$currentNo}'
382 ";
383 $this->update($sql);
384
385 return $this->makeResultJson("1", "저장되었습니다");
386 }
387
388 function deleteCS(){
389 $noArr = $this->req["no"];
390
391 $noStr = implode(',', $noArr);
392
393 $sql = "
394 UPDATE tblCustomerService
395 SET status = 0
396 WHERE `csNo` IN({$noStr})
397 ";
398 $this->update($sql);
399 }
400
401 function getListOfCSComment(){
402 $no=$this->req["no"];
403 if($no != ""){
404 $sql="
405 SELECT C.*, IFNULL(U.userName, '관리자') AS userName
406 FROM tblComment C
407 LEFT JOIN tblUser U ON C.userFk=U.userNo
408 WHERE C.commentType='CS' AND C.targetFk='{$no}' AND C.status=1
409 ORDER BY commentGroup DESC, gOrder ASC
410 ";
411 $result=$this->getArray($sql);
412 //echo json_encode($result);
413 return $result;
414 }
415
416 }
417
418 function getListOfProductionPortrait(){
419 $sql="
420 SELECT COUNT(*) AS rn
421 FROM tblProductionPortrait
422 WHERE status=1
423 ";
424 $this->initPage();
425 $this->rownum=$this->getValue($sql, 'rn');
426 $this->setPage($this->rownum);
427 $limit=" LIMIT {$this->startNum}, {$this->endNum} ;";
428
429
430 $sql="
431 SELECT ppNo, title, regDate
432 FROM tblProductionPortrait
433 WHERE status=1
434 ORDER BY ppNo DESC
435 {$limit}
436 ";
437 $result=$this->getArray($sql);
438 return $result;
439 }
440
441 function getInfoOfProductionPortrait(){
442 $ppNo=$this->req["no"];
443
444 $sql="
445 SELECT *
446 FROM tblProductionPortrait
447 WHERE ppNo='{$ppNo}'
448 ";
449 $result=$this->getRow($sql);
450
451 return $result;
452 }
453
454 function getInfoOfProductionPortraitForJson(){
455 $ppNo=$this->req["no"];
456
457 $sql="
458 SELECT *
459 FROM tblProductionPortrait
460 WHERE ppNo='{$ppNo}'
461 ";
462 $result=$this->getRow($sql);
463
464 return json_encode($result);
465 }
466
467 function saveProductionPortrait(){
468 $ppNo=$this->req["no"];
469 $title=$this->req["title"];
470 $content1=$this->req["content1"];
471 $content2=$this->req["content2"];
472 $content3=$this->req["content3"];
473 $content4=$this->req["content4"];
474 $content5=$this->req["content5"];
475 $content6=$this->req["content6"];
476 $content7=$this->req["content7"];
477 $content8=$this->req["content8"];
478 $content9=$this->req["content9"];
479 $content10=$this->req["content10"];
480
481 $imgResult = $this->inFn_Common_fileSave($_FILES);
482
483 $imgPathPP1 = $imgResult["img01"]["saveURL"] != "" ? $imgResult["img01"]["saveURL"] : $this->req["imgPathPP1"];
484 $imgPathPP2 = $imgResult["img02"]["saveURL"] != "" ? $imgResult["img02"]["saveURL"] : $this->req["imgPathPP2"];
485 $imgPathPP3 = $imgResult["img03"]["saveURL"] != "" ? $imgResult["img03"]["saveURL"] : $this->req["imgPathPP3"];
486 $imgPathPP4 = $imgResult["img04"]["saveURL"] != "" ? $imgResult["img04"]["saveURL"] : $this->req["imgPathPP4"];
487 $imgPathPP5 = $imgResult["img05"]["saveURL"] != "" ? $imgResult["img05"]["saveURL"] : $this->req["imgPathPP5"];
488 $imgPathPP6 = $imgResult["img06"]["saveURL"] != "" ? $imgResult["img06"]["saveURL"] : $this->req["imgPathPP6"];
489 $imgPathPP7 = $imgResult["img07"]["saveURL"] != "" ? $imgResult["img07"]["saveURL"] : $this->req["imgPathPP7"];
490 $imgPathPP8 = $imgResult["img08"]["saveURL"] != "" ? $imgResult["img08"]["saveURL"] : $this->req["imgPathPP8"];
491 $imgPathPP9 = $imgResult["img09"]["saveURL"] != "" ? $imgResult["img09"]["saveURL"] : $this->req["imgPathPP9"];
492 $imgPathPP10 = $imgResult["img10"]["saveURL"] != "" ? $imgResult["img10"]["saveURL"] : $this->req["imgPathPP10"];
493
494 if($ppNo==""){
495 $sql="
496 INSERT INTO `tblProductionPortrait`
497 (
498 `title`,
499 `content1`,
500 `content2`,
501 `content3`,
502 `content4`,
503 `content5`,
504 `content6`,
505 `content7`,
506 `content8`,
507 `content9`,
508 `content10`,
509 `imgPathPP1`,
510 `imgPathPP2`,
511 `imgPathPP3`,
512 `imgPathPP4`,
513 `imgPathPP5`,
514 `imgPathPP6`,
515 `imgPathPP7`,
516 `imgPathPP8`,
517 `imgPathPP9`,
518 `imgPathPP10`,
519 `status`,
520 `regDate`
521 )
522 VALUES
523 (
524 '{$title}',
525 '{$content1}',
526 '{$content2}',
527 '{$content3}',
528 '{$content4}',
529 '{$content5}',
530 '{$content6}',
531 '{$content7}',
532 '{$content8}',
533 '{$content9}',
534 '{$content10}',
535 '{$imgPathPP1}',
536 '{$imgPathPP2}',
537 '{$imgPathPP3}',
538 '{$imgPathPP4}',
539 '{$imgPathPP5}',
540 '{$imgPathPP6}',
541 '{$imgPathPP7}',
542 '{$imgPathPP8}',
543 '{$imgPathPP9}',
544 '{$imgPathPP10}',
545 1,
546 NOW()
547 );
548 ";
549 $this->update($sql);
550 return $this->makeResultJson(1, "등록되었습니다");
551 }
552 else{
553 $sql="
554 UPDATE `tblProductionPortrait`
555 SET
556 `title` = '{$title}',
557 `content1` = '{$content1}',
558 `content2` = '{$content2}',
559 `content3` = '{$content3}',
560 `content4` = '{$content4}',
561 `content5` = '{$content5}',
562 `content6` = '{$content6}',
563 `content7` = '{$content7}',
564 `content8` = '{$content8}',
565 `content9` = '{$content9}',
566 `content10` = '{$content10}',
567 `imgPathPP1` = '{$imgPathPP1}',
568 `imgPathPP2` = '{$imgPathPP2}',
569 `imgPathPP3` = '{$imgPathPP3}',
570 `imgPathPP4` = '{$imgPathPP4}',
571 `imgPathPP5` = '{$imgPathPP5}',
572 `imgPathPP6` = '{$imgPathPP6}',
573 `imgPathPP7` = '{$imgPathPP7}',
574 `imgPathPP8` = '{$imgPathPP8}',
575 `imgPathPP9` = '{$imgPathPP9}',
576 `imgPathPP10` = '{$imgPathPP10}'
577 WHERE `ppNo` = '{$ppNo}';
578 ";
579 $this->update($sql);
580 return $this->makeResultJson(1, "수정되었습니다");
581 }
582 }
583
584 function deleteProductionPortrait(){
585 $noArr = $this->req["no"];
586
587 $noStr = implode(',', $noArr);
588
589 $sql = "
590 UPDATE tblProductionPortrait
591 SET status = 0
592 WHERE `ppNo` IN({$noStr})
593 ";
594 $this->update($sql);
595 }
319 } 596 }
320 597
321 } 598 }
......
...@@ -55,12 +55,7 @@ if(! class_exists("Push") ) { ...@@ -55,12 +55,7 @@ if(! class_exists("Push") ) {
55 foreach($pushKeyArr as $key => $pushKey){ 55 foreach($pushKeyArr as $key => $pushKey){
56 56
57 if($pushKey["device_type_id"] != "2" && strlen($pushKey["registration_key"]) > 32){ 57 if($pushKey["device_type_id"] != "2" && strlen($pushKey["registration_key"]) > 32){
58 if($pushKey["app_type"] == 1){ 58 array_push($gcmKeyArr, $pushKey["registration_key"]);
59 array_push($gcmKeyArr, $pushKey["registration_key"]);
60 }
61 else{
62 array_push($gcmKeyArr2, $pushKey["registration_key"]);
63 }
64 } 59 }
65 60
66 if($pushKey["device_type_id"] == "2" && strlen($pushKey["registration_key"]) > 32){ 61 if($pushKey["device_type_id"] == "2" && strlen($pushKey["registration_key"]) > 32){
......
...@@ -21,8 +21,7 @@ ...@@ -21,8 +21,7 @@
21 { 21 {
22 $targetData = Array( 22 $targetData = Array(
23 "registration_key" => $pushTargetList[$i]["registration_key"], 23 "registration_key" => $pushTargetList[$i]["registration_key"],
24 "device_type_id" => $pushTargetList[$i]["device_type_id"], 24 "device_type_id" => $pushTargetList[$i]["device_type_id"]
25 "app_type" => $pushTargetList[$i]["app_type"]
26 ); 25 );
27 $paramsStr = urlencode(json_encode($targetData)); 26 $paramsStr = urlencode(json_encode($targetData));
28 $paramsArr[floor($i/$push_send_size)] .= "&targetList[]={$paramsStr}"; 27 $paramsArr[floor($i/$push_send_size)] .= "&targetList[]={$paramsStr}";
......