c7829abe by sayhoChun

end of day

1 parent 8b44cd93
1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/LoginUtil.php" ; ?>
2 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBase.php" ; ?> 1 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiBase.php" ; ?>
3 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiUser.php" ; ?> 2 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiUser.php" ; ?>
4 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiProcess.php" ; ?> 3 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiProcess.php" ; ?>
...@@ -11,9 +10,10 @@ ...@@ -11,9 +10,10 @@
11 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ; ?> 10 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminBoard.php" ; ?>
12 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminPush.php" ; ?> 11 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminPush.php" ; ?>
13 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminEtc.php" ; ?> 12 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminEtc.php" ; ?>
14 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/AnyGo.php" ;?>
15 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ;?> 13 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/ApiStatic.php" ;?>
16 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ; ?> 14 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/classes/AdminProductionSpec.php" ; ?>
15 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/LoginUtil.php" ; ?>
16 <? include $_SERVER["DOCUMENT_ROOT"] . "/common/php/AnyGo.php" ;?>
17 <? 17 <?
18 $cmd = $_REQUEST[cmd] ; 18 $cmd = $_REQUEST[cmd] ;
19 19
......
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
92 92
93 $.ajax({ 93 $.ajax({
94 url : "/action_front.php?cmd=AdminProductionSpec.saveProductionSpec", 94 url : "/action_front.php?cmd=AdminProductionSpec.saveProductionSpec",
95 async : false,\ 95 async : false,
96 96
97 cache : false, 97 cache : false,
98 dataType : "json", 98 dataType : "json",
......
...@@ -23,7 +23,7 @@ if (! class_exists("ApiBoard")) ...@@ -23,7 +23,7 @@ if (! class_exists("ApiBoard"))
23 "; 23 ";
24 24
25 $this->rownum=$this->getValue($sql, "rn"); 25 $this->rownum=$this->getValue($sql, "rn");
26 $this->initPage(); 26 $this->initPageForDevice();
27 $this->setPageForDevice($this->rownum); 27 $this->setPageForDevice($this->rownum);
28 28
29 $sql=" 29 $sql="
...@@ -31,6 +31,7 @@ if (! class_exists("ApiBoard")) ...@@ -31,6 +31,7 @@ if (! class_exists("ApiBoard"))
31 FROM tblNotice 31 FROM tblNotice
32 WHERE status=1 32 WHERE status=1
33 ORDER BY noticeNo DESC 33 ORDER BY noticeNo DESC
34 LIMIT {$this->startNum}, {$this->endNum} ;
34 "; 35 ";
35 36
36 $result=$this->getArray($sql); 37 $result=$this->getArray($sql);
...@@ -60,7 +61,7 @@ if (! class_exists("ApiBoard")) ...@@ -60,7 +61,7 @@ if (! class_exists("ApiBoard"))
60 ORDER BY eventNo DESC 61 ORDER BY eventNo DESC
61 "; 62 ";
62 $this->rownum=$this->getValue($sql, "rn"); 63 $this->rownum=$this->getValue($sql, "rn");
63 $this->initPage(); 64 $this->initPageForDevice();
64 $this->setPageForDevice($this->rownum); 65 $this->setPageForDevice($this->rownum);
65 66
66 $sql=" 67 $sql="
...@@ -68,6 +69,7 @@ if (! class_exists("ApiBoard")) ...@@ -68,6 +69,7 @@ if (! class_exists("ApiBoard"))
68 FROM tblEvent 69 FROM tblEvent
69 WHERE status=1 70 WHERE status=1
70 ORDER BY eventNo DESC 71 ORDER BY eventNo DESC
72 LIMIT {$this->startNum}, {$this->endNum} ;
71 "; 73 ";
72 $result=$this->getArray($sql); 74 $result=$this->getArray($sql);
73 return $this->makeResultJson("1", "", $result); 75 return $this->makeResultJson("1", "", $result);
...@@ -85,11 +87,23 @@ if (! class_exists("ApiBoard")) ...@@ -85,11 +87,23 @@ if (! class_exists("ApiBoard"))
85 87
86 if($result != null){ 88 if($result != null){
87 $sql=" 89 $sql="
90 SELECT COUNT(*) rn
91 FROM tblComment C
92 JOIN tblUser U ON C.userFk=U.userNo
93 WHERE targetFk='{$eventNo}' AND commentType='EV'
94 ";
95 $this->rownum=$this->getValue($sql, "rn");
96 $this->initPageForDevice();
97 $this->setPageForDevice($this->rownum);
98
99
100 $sql="
88 SELECT C.*, U.userID, U.userNo 101 SELECT C.*, U.userID, U.userNo
89 FROM tblComment C 102 FROM tblComment C
90 JOIN tblUser U ON C.userFk=U.userNo 103 JOIN tblUser U ON C.userFk=U.userNo
91 WHERE targetFk='{$eventNo}' AND commentType='EV' 104 WHERE targetFk='{$eventNo}' AND commentType='EV'
92 ORDER BY C.commentGroup DESC, C.gOrder ASC 105 ORDER BY C.commentGroup DESC, C.gOrder ASC
106 LIMIT {$this->startNum}, {$this->endNum} ;
93 "; 107 ";
94 108
95 $commentList=$this->getArray($sql); 109 $commentList=$this->getArray($sql);
...@@ -181,7 +195,7 @@ if (! class_exists("ApiBoard")) ...@@ -181,7 +195,7 @@ if (! class_exists("ApiBoard"))
181 {$where} 195 {$where}
182 ORDER BY boardNo DESC 196 ORDER BY boardNo DESC
183 "; 197 ";
184 $this->initPage(); 198 $this->initPageForDevice();
185 $this->rownum = $this->getValue($sql, "rn"); 199 $this->rownum = $this->getValue($sql, "rn");
186 200
187 $this->setPageForDevice($this->rownum); 201 $this->setPageForDevice($this->rownum);
...@@ -216,11 +230,23 @@ if (! class_exists("ApiBoard")) ...@@ -216,11 +230,23 @@ if (! class_exists("ApiBoard"))
216 230
217 if($result != null){ 231 if($result != null){
218 $sql=" 232 $sql="
233 SELECT COUNT(*) rn
234 FROM tblComment C
235 JOIN tblUser U ON C.userFk=U.userNo
236 WHERE targetFk='{$boardNo}' AND commentType='FB'
237 ";
238 $this->rownum=$this->getValue($sql, "rn");
239
240 $this->initPageForDevice();
241 $this->setPageForDevice($this->rownum);
242
243 $sql="
219 SELECT C.*, U.userID, U.userNo 244 SELECT C.*, U.userID, U.userNo
220 FROM tblComment C 245 FROM tblComment C
221 JOIN tblUser U ON C.userFk=U.userNo 246 JOIN tblUser U ON C.userFk=U.userNo
222 WHERE targetFk='{$boardNo}' AND commentType='FB' 247 WHERE targetFk='{$boardNo}' AND commentType='FB'
223 ORDER BY C.commentGroup DESC, C.gOrder ASC 248 ORDER BY C.commentGroup DESC, C.gOrder ASC
249 LIMIT {$this->startNum}, {$this->endNum}
224 "; 250 ";
225 $commentList=$this->getArray($sql); 251 $commentList=$this->getArray($sql);
226 252
...@@ -377,7 +403,7 @@ if (! class_exists("ApiBoard")) ...@@ -377,7 +403,7 @@ if (! class_exists("ApiBoard"))
377 WHERE CS.status=1 AND CS.targetType=1 403 WHERE CS.status=1 AND CS.targetType=1
378 ORDER BY csNo DESC 404 ORDER BY csNo DESC
379 "; 405 ";
380 $this->initPage(); 406 $this->initPageForDevice();
381 $this->rownum = $this->getValue($sql, "rn"); 407 $this->rownum = $this->getValue($sql, "rn");
382 408
383 $this->setPageForDevice($this->rownum); 409 $this->setPageForDevice($this->rownum);
...@@ -413,11 +439,21 @@ if (! class_exists("ApiBoard")) ...@@ -413,11 +439,21 @@ if (! class_exists("ApiBoard"))
413 439
414 if($result != null){ 440 if($result != null){
415 $sql=" 441 $sql="
442 SELECT COUNT(*) rn
443 FROM tblComment C
444 JOIN tblUser U ON C.userFk=U.userNo
445 WHERE targetFk='{$csNo}' AND commentType='CS'
446 ";
447 $this->rownum=$this->getValue($sql, "rn");
448 $this->setPageForDevice($this->rownum);
449
450 $sql="
416 SELECT U.userNo, U.userID, C.* 451 SELECT U.userNo, U.userID, C.*
417 FROM tblComment C 452 FROM tblComment C
418 JOIN tblUser U ON C.userFk=U.userNo 453 JOIN tblUser U ON C.userFk=U.userNo
419 WHERE targetFk='{$csNo}' AND commentType='CS' 454 WHERE targetFk='{$csNo}' AND commentType='CS'
420 ORDER BY C.commentGroup DESC, C.gOrder ASC 455 ORDER BY C.commentGroup DESC, C.gOrder ASC
456 LIMIT {$this->startNum}, {$this->endNum}
421 "; 457 ";
422 458
423 $commentList=$this->getArray($sql); 459 $commentList=$this->getArray($sql);
...@@ -457,7 +493,7 @@ if (! class_exists("ApiBoard")) ...@@ -457,7 +493,7 @@ if (! class_exists("ApiBoard"))
457 {$where} 493 {$where}
458 ORDER BY companyNo DESC 494 ORDER BY companyNo DESC
459 "; 495 ";
460 $this->initPage(); 496 $this->initPageForDevice();
461 $this->rownum=$this->getValue($sql, "rn"); 497 $this->rownum=$this->getValue($sql, "rn");
462 498
463 $this->setPageForDevice($this->rownum); 499 $this->setPageForDevice($this->rownum);
...@@ -491,11 +527,22 @@ if (! class_exists("ApiBoard")) ...@@ -491,11 +527,22 @@ if (! class_exists("ApiBoard"))
491 527
492 if($result != null){ 528 if($result != null){
493 $sql=" 529 $sql="
530 SELECT COUNT(*) rn
531 FROM tblComment C
532 JOIN tblUser U ON C.userFk=U.userNo
533 WHERE targetFk='{$companyNo}' AND commentType='CP'
534 ";
535 $this->rownum=$this->getValue($sql, "rn");
536 $this->setPageForDevice($this->rownum);
537
538
539 $sql="
494 SELECT U.userNo, U.userID, C.* 540 SELECT U.userNo, U.userID, C.*
495 FROM tblComment C 541 FROM tblComment C
496 JOIN tblUser U ON C.userFk=U.userNo 542 JOIN tblUser U ON C.userFk=U.userNo
497 WHERE targetFk='{$companyNo}' AND commentType='CP' 543 WHERE targetFk='{$companyNo}' AND commentType='CP'
498 ORDER BY C.commentGroup DESC, C.gOrder ASC 544 ORDER BY C.commentGroup DESC, C.gOrder ASC
545 LIMIT {$this->startNum}, {$this->endNum}
499 "; 546 ";
500 $commentList=$this->getArray($sql); 547 $commentList=$this->getArray($sql);
501 548
...@@ -784,7 +831,7 @@ if (! class_exists("ApiBoard")) ...@@ -784,7 +831,7 @@ if (! class_exists("ApiBoard"))
784 WHERE userFk='{$userFk}' AND status=1 831 WHERE userFk='{$userFk}' AND status=1
785 ORDER BY productionNo DESC 832 ORDER BY productionNo DESC
786 "; 833 ";
787 $this->initPage(); 834 $this->initPageForDevice();
788 $this->rownum=$this->getValue($sql, "rn"); 835 $this->rownum=$this->getValue($sql, "rn");
789 836
790 $this->setPageForDevice($this->rownum); 837 $this->setPageForDevice($this->rownum);
...@@ -794,6 +841,7 @@ if (! class_exists("ApiBoard")) ...@@ -794,6 +841,7 @@ if (! class_exists("ApiBoard"))
794 FROM tblProductionSpec 841 FROM tblProductionSpec
795 WHERE userFk='{$userFk}' AND status=1 842 WHERE userFk='{$userFk}' AND status=1
796 ORDER BY productionNo DESC 843 ORDER BY productionNo DESC
844 LIMIT {$this->startNum}, {$this->endNum}
797 "; 845 ";
798 $list=$this->getArray($sql); 846 $list=$this->getArray($sql);
799 847
...@@ -826,7 +874,7 @@ if (! class_exists("ApiBoard")) ...@@ -826,7 +874,7 @@ if (! class_exists("ApiBoard"))
826 {$where} 874 {$where}
827 ORDER BY productionNo DESC 875 ORDER BY productionNo DESC
828 "; 876 ";
829 $this->initPage(); 877 $this->initPageForDevice();
830 $this->rownum=$this->getValue($sql, "rn"); 878 $this->rownum=$this->getValue($sql, "rn");
831 879
832 $this->setPageForDevice($this->rownum); 880 $this->setPageForDevice($this->rownum);
...@@ -837,6 +885,7 @@ if (! class_exists("ApiBoard")) ...@@ -837,6 +885,7 @@ if (! class_exists("ApiBoard"))
837 FROM tblProductionSpec 885 FROM tblProductionSpec
838 {$where} 886 {$where}
839 ORDER BY productionNo DESC 887 ORDER BY productionNo DESC
888 LIMIT {$this->startNum}, {$this->endNum}
840 "; 889 ";
841 $list=$this->getArray($sql); 890 $list=$this->getArray($sql);
842 891
...@@ -900,7 +949,7 @@ if (! class_exists("ApiBoard")) ...@@ -900,7 +949,7 @@ if (! class_exists("ApiBoard"))
900 WHERE L.userNo='{$userNo}' AND PS.status=1 949 WHERE L.userNo='{$userNo}' AND PS.status=1
901 ORDER BY regDate DESC 950 ORDER BY regDate DESC
902 "; 951 ";
903 $this->initPage(); 952 $this->initPageForDevice();
904 $this->rownum=$this->getValue($sql, "rn"); 953 $this->rownum=$this->getValue($sql, "rn");
905 954
906 $this->setPageForDevice($this->rownum); 955 $this->setPageForDevice($this->rownum);
...@@ -911,6 +960,7 @@ if (! class_exists("ApiBoard")) ...@@ -911,6 +960,7 @@ if (! class_exists("ApiBoard"))
911 JOIN tblLike L ON PS.productionNo=L.productionNo 960 JOIN tblLike L ON PS.productionNo=L.productionNo
912 WHERE L.userNo='{$userNo}' AND PS.status=1 961 WHERE L.userNo='{$userNo}' AND PS.status=1
913 ORDER BY regDate DESC 962 ORDER BY regDate DESC
963 LIMIT {$this->startNum}, {$this->endNum}
914 "; 964 ";
915 $result=$this->getArray($sql); 965 $result=$this->getArray($sql);
916 return $this->makeResultJson("1","", $result); 966 return $this->makeResultJson("1","", $result);
...@@ -923,7 +973,7 @@ if (! class_exists("ApiBoard")) ...@@ -923,7 +973,7 @@ if (! class_exists("ApiBoard"))
923 WHERE status=1 973 WHERE status=1
924 ORDER BY regDate DESC 974 ORDER BY regDate DESC
925 "; 975 ";
926 $this->initPage(); 976 $this->initPageForDevice();
927 $this->rownum=$this->getValue($sql, "rn"); 977 $this->rownum=$this->getValue($sql, "rn");
928 978
929 $this->setPageForDevice($this->rownum); 979 $this->setPageForDevice($this->rownum);
...@@ -933,6 +983,7 @@ if (! class_exists("ApiBoard")) ...@@ -933,6 +983,7 @@ if (! class_exists("ApiBoard"))
933 FROM tblProductionPortrait 983 FROM tblProductionPortrait
934 WHERE status=1 984 WHERE status=1
935 ORDER BY regDate DESC 985 ORDER BY regDate DESC
986 LIMIT {$this->startNum}, {$this->endNum}
936 "; 987 ";
937 $result=$this->getArray($sql); 988 $result=$this->getArray($sql);
938 return $this->makeResultJson("1", "", $result); 989 return $this->makeResultJson("1", "", $result);
......
...@@ -104,7 +104,7 @@ if (! class_exists("ApiStatic")){ ...@@ -104,7 +104,7 @@ if (! class_exists("ApiStatic")){
104 //탑차 분류별 리스트 104 //탑차 분류별 리스트
105 function getListOfVehicle(){ 105 function getListOfVehicle(){
106 $vehicleType=$this->req["vehicleType"]; 106 $vehicleType=$this->req["vehicleType"];
107 $vehicleType="IS"; 107 //$vehicleType="IS";
108 $sql=" 108 $sql="
109 SELECT vehicleNo, name, imgPathVehicle1, imgPathVehicle2, imgPathVehicle3, imgPathVehicle4, imgPathVehicle5 109 SELECT vehicleNo, name, imgPathVehicle1, imgPathVehicle2, imgPathVehicle3, imgPathVehicle4, imgPathVehicle5
110 FROM tblVehicle 110 FROM tblVehicle
...@@ -118,9 +118,8 @@ if (! class_exists("ApiStatic")){ ...@@ -118,9 +118,8 @@ if (! class_exists("ApiStatic")){
118 //탑차 정보 118 //탑차 정보
119 function getInfoOfVehicle(){ 119 function getInfoOfVehicle(){
120 $vehicleNo=$this->req["vehicleNo"]; 120 $vehicleNo=$this->req["vehicleNo"];
121 $vehicleNo=1;
122 121
123 echo $vehicleNo; 122 //echo $vehicleNo;
124 $sql=" 123 $sql="
125 SELECT * 124 SELECT *
126 FROM tblVehicle 125 FROM tblVehicle
......
...@@ -114,27 +114,27 @@ if (! class_exists("ApiUser")) ...@@ -114,27 +114,27 @@ if (! class_exists("ApiUser"))
114 LIMIT 1 114 LIMIT 1
115 "; 115 ";
116 $regInfo = $this->getRow($sql); 116 $regInfo = $this->getRow($sql);
117 //return json_encode($regInfo);
117 118
118 119 if(strlen($userID) < 6){
119
120 if(strlen($userID) < 6)
121 return $this->makeResultJson(-106, "아이디는 여섯 자리 이상이어야 합니다."); 120 return $this->makeResultJson(-106, "아이디는 여섯 자리 이상이어야 합니다.");
121 }
122 122
123 if(strlen($userID) != strlen($this->removeSpecials($userID))) { 123 if(strlen($userID) != strlen($this->removeSpecials($userID))) {
124 return $this->makeResultJson(-108, "아이디에는 특수문자가 포함될 수 없습니다."); 124 return $this->makeResultJson(-108, "아이디에는 특수문자가 포함될 수 없습니다.");
125 } 125 }
126 126
127 if($regInfo != null) 127 if($regInfo != NULL)
128 return $this->makeResultJson(-100, "아이디 중복을 확인해 주세요."); 128 return $this->makeResultJson(-100, "아이디 중복을 확인해 주세요.", $regInfo);
129 129
130 if($nickName == "") 130 if($nickName == NULL)
131 return $this->makeResultJson(-107, "닉네임을 입력해 주세요"); 131 return $this->makeResultJson(-107, "닉네임을 입력해 주세요");
132 132
133 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'"; 133 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'";
134 $regInfo=$this->getRow($sql); 134 $regInfo=$this->getRow($sql);
135 135
136 if($regInfo != null) 136 if($regInfo != NULL)
137 return $this->makeResultJson(-101, "닉네임 중복을 확인해 주세요."); 137 return $this->makeResultJson(-101, "닉네임 중복을 확인해 주세요.", $regInfo);
138 138
139 if(strlen($userPwd) != strlen($this->removeSpecials($userPwd))) { 139 if(strlen($userPwd) != strlen($this->removeSpecials($userPwd))) {
140 return $this->makeResultJson(-103, "비밀번호에는 특수문자가 포함될 수 없습니다."); 140 return $this->makeResultJson(-103, "비밀번호에는 특수문자가 포함될 수 없습니다.");
...@@ -242,6 +242,8 @@ if (! class_exists("ApiUser")) ...@@ -242,6 +242,8 @@ if (! class_exists("ApiUser"))
242 $registrationKey = $this->req["registrationKey"]; 242 $registrationKey = $this->req["registrationKey"];
243 $appVersion = $this->req["appVersion"]; 243 $appVersion = $this->req["appVersion"];
244 244
245 $res="";
246
245 $param = Array( 247 $param = Array(
246 $userID, 248 $userID,
247 $deviceID, 249 $deviceID,
...@@ -259,15 +261,20 @@ if (! class_exists("ApiUser")) ...@@ -259,15 +261,20 @@ if (! class_exists("ApiUser"))
259 $userInfo = $this->inFn_ApiBase_getInfoOfUser($result[0][0]["v_userNumber"]); 261 $userInfo = $this->inFn_ApiBase_getInfoOfUser($result[0][0]["v_userNumber"]);
260 //echo $userPwd; 262 //echo $userPwd;
261 //echo $userInfo["userID"]; 263 //echo $userInfo["userID"];
264 if($userInfo["expireDate"]!=null)
262 $res=$this->checkExpire($userInfo["userNo"], $userInfo["expireDate"]); 265 $res=$this->checkExpire($userInfo["userNo"], $userInfo["expireDate"]);
263 if($res=1) 266
267 if($res==1)
264 return $this->makeResultJson(-999, "탈퇴된 회원입니다"); 268 return $this->makeResultJson(-999, "탈퇴된 회원입니다");
269
265 if($userInfo["userPwd"] != $userPwd) 270 if($userInfo["userPwd"] != $userPwd)
266 return $this->makeResultJson("-1000", "비밀번호를 확인하세요"); 271 return $this->makeResultJson("-1000", "비밀번호를 확인하세요", $userInfo["userPwd"]);
267 272
268 LoginUtil::doAppLogin($userInfo); 273 LoginUtil::doAppLogin($userInfo);
269 274
275
270 return $this->makeResultJson($result[0][0]["v_returnCode"], $result[0][0]["v_returnMsg"], $userInfo); 276 return $this->makeResultJson($result[0][0]["v_returnCode"], $result[0][0]["v_returnMsg"], $userInfo);
277 // return $this->makeResultJson($result[0][0]["v_returnCode"], $result[0][0]["v_returnMsg"], $this->appUser);
271 } 278 }
272 else 279 else
273 { 280 {
...@@ -361,7 +368,7 @@ if (! class_exists("ApiUser")) ...@@ -361,7 +368,7 @@ if (! class_exists("ApiUser"))
361 { 368 {
362 $userNo = $this->appUser["no"]; 369 $userNo = $this->appUser["no"];
363 //$is_file_change = $this->req["is_file_change"]; // NEW / DEL / NON 370 //$is_file_change = $this->req["is_file_change"]; // NEW / DEL / NON
364 //$userNo=$this->req["userNo"]; 371 // $userNo=$this->req["userNo"];
365 $userPwd = $this->req["userPwd"]; 372 $userPwd = $this->req["userPwd"];
366 $userPwdConfirm = $this->req["userPwdConfirm"]; 373 $userPwdConfirm = $this->req["userPwdConfirm"];
367 $nickName = $this->req["nickName"]; 374 $nickName = $this->req["nickName"];
...@@ -370,35 +377,7 @@ if (! class_exists("ApiUser")) ...@@ -370,35 +377,7 @@ if (! class_exists("ApiUser"))
370 $userVehicleName=$this->req["userVehicleName"]; 377 $userVehicleName=$this->req["userVehicleName"];
371 $userVehicleType=$this->req["userVehicleType"]; 378 $userVehicleType=$this->req["userVehicleType"];
372 $userVehicleWish=$this->req["userVehicleWish"]; 379 $userVehicleWish=$this->req["userVehicleWish"];
373 /*
374 // 삭제함
375 if ($is_file_change != "NON")
376 {
377 $sql = "
378 DELETE FROM tbl_file WHERE pa_no = '{$userNo}' AND file_type = '{$this->FILE_TYPE_MEM}'
379 ";
380 $this->update($sql);
381 }
382
383 // 파일 업로드
384 if ($is_file_change == "NEW" && ($_FILES != null && sizeof($_FILES) > 0))
385 {
386 $updateFileData = $this->inFn_Common_fileSave($_FILES);
387
388 $file_vir_name = $updateFileData["file"]["saveURL"];
389 $file_org_name = $updateFileData["file"]["name"];
390
391 $insFile = Array(
392 "file_org_name" => $file_org_name,
393 "file_vir_name" => $file_vir_name,
394 "reg_dt" => "now()",
395 "pa_no" => $userNo,
396 "file_type" => $this->FILE_TYPE_MEM
397 );
398 380
399 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile);
400 }
401 */
402 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'"; 381 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'";
403 $regInfo=$this->getRow($sql); 382 $regInfo=$this->getRow($sql);
404 if($regInfo != null) 383 if($regInfo != null)
...@@ -438,7 +417,7 @@ if (! class_exists("ApiUser")) ...@@ -438,7 +417,7 @@ if (! class_exists("ApiUser"))
438 "; 417 ";
439 $this->update($sql); 418 $this->update($sql);
440 } 419 }
441 return $this->makeResultJson("1", "저장되었습니다.", $this->inFn_ApiBase_getInfoOfUser($userNo)); 420 return $this->makeResultJson("1", "저장되었습니다.", $userNo);
442 } 421 }
443 422
444 /** 423 /**
......
...@@ -63,6 +63,14 @@ if(! class_exists("HomeFrm") ) { ...@@ -63,6 +63,14 @@ if(! class_exists("HomeFrm") ) {
63 $this->endNum = $this->rowPerPage ; 63 $this->endNum = $this->rowPerPage ;
64 } 64 }
65 65
66 function initPageForDevice()
67 {
68 $this->rowPerPageDevice = $this->req["rowPerPage"] == "" ? $this->rowPerPageDevice : $this->req["rowPerPage"];
69 $this->req["page"] = ($this->req["page"] == "" || $this->req["page"] == "0") ? "1" : $this->req["page"] ;
70 $this->startNum = ($this->req["page"] - 1) * $this->rowPerPageDevice ;
71 $this->endNum = $this->rowPerPageDevice ;
72 }
73
66 //페이지 설정 74 //페이지 설정
67 function setPage($rownum) 75 function setPage($rownum)
68 { 76 {
......
...@@ -11,7 +11,7 @@ if(! class_exists("LoginUtil")){ ...@@ -11,7 +11,7 @@ if(! class_exists("LoginUtil")){
11 public static $spliter = 30 ; // Seperator Ascii code 11 public static $spliter = 30 ; // Seperator Ascii code
12 //public static "211.110.140.155"; 12 //public static "211.110.140.155";
13 //public static $cookieDomain = "localhost"; 13 //public static $cookieDomain = "localhost";
14 public static $cookieDomain = "106.240.232.36" ; 14 public static $cookieDomain = "localhost" ;
15 15
16 static function getAdminUser() 16 static function getAdminUser()
17 { 17 {
...@@ -83,7 +83,6 @@ if(! class_exists("LoginUtil")){ ...@@ -83,7 +83,6 @@ if(! class_exists("LoginUtil")){
83 83
84 if($row != null){ 84 if($row != null){
85 $cookieStr = 85 $cookieStr =
86
87 $row['userNo'] . chr(self::$spliter) . 86 $row['userNo'] . chr(self::$spliter) .
88 $row['userID'] . chr(self::$spliter) . 87 $row['userID'] . chr(self::$spliter) .
89 $row['userPwd'] . chr(self::$spliter) . 88 $row['userPwd'] . chr(self::$spliter) .
...@@ -93,10 +92,11 @@ if(! class_exists("LoginUtil")){ ...@@ -93,10 +92,11 @@ if(! class_exists("LoginUtil")){
93 $row['deviceTypeID'] . chr(self::$spliter) . 92 $row['deviceTypeID'] . chr(self::$spliter) .
94 $row['deviceID'] . chr(self::$spliter) ; 93 $row['deviceID'] . chr(self::$spliter) ;
95 94
95 // echo json_encode($row);
96
96 $cookieStr = bin2hex($cookieStr) ; // 16진수로 암호화 97 $cookieStr = bin2hex($cookieStr) ; // 16진수로 암호화
97 98
98 //setcookie("userMap",$cookieStr,-1,"/", '.richware.co.kr') ; 99 setcookie("userMapForApp", $cookieStr, -1, "/", '') ;
99 setcookie("userMap",$cookieStr,-1,"/", self::$cookieDomain) ;
100 100
101 return true ; 101 return true ;
102 102
...@@ -111,8 +111,8 @@ if(! class_exists("LoginUtil")){ ...@@ -111,8 +111,8 @@ if(! class_exists("LoginUtil")){
111 static function isAppLogin() 111 static function isAppLogin()
112 { 112 {
113 $aUser[0] = ""; 113 $aUser[0] = "";
114 if(isset($_COOKIE["userMap"])) { 114 if(isset($_COOKIE["userMapForApp"])) {
115 $cookieStr = $_COOKIE["userMap"] ; 115 $cookieStr = $_COOKIE["userMapForApp"] ;
116 116
117 $cookieStr = pack("H*",$cookieStr); 117 $cookieStr = pack("H*",$cookieStr);
118 118
...@@ -123,11 +123,11 @@ if(! class_exists("LoginUtil")){ ...@@ -123,11 +123,11 @@ if(! class_exists("LoginUtil")){
123 123
124 124
125 static function getAppUser(){ 125 static function getAppUser(){
126 $cookieStr = isset($_COOKIE["userMap"]) ? $_COOKIE["userMap"] : "" ; 126 $cookieStr = isset($_COOKIE["userMapForApp"]) ? $_COOKIE["userMapForApp"] : "" ;
127 127
128 if(isset($_COOKIE["userMap"])){ 128 if(isset($_COOKIE["userMapForApp"])){
129 $cookieStr = pack("H*",$cookieStr); 129 $cookieStr = pack("H*",$cookieStr);
130 130 //echo $cookieStr;
131 $aUser = explode(chr(self::$spliter),$cookieStr); 131 $aUser = explode(chr(self::$spliter),$cookieStr);
132 132
133 $map['no'] = $aUser[0] ; 133 $map['no'] = $aUser[0] ;
...@@ -158,7 +158,7 @@ if(! class_exists("LoginUtil")){ ...@@ -158,7 +158,7 @@ if(! class_exists("LoginUtil")){
158 158
159 159
160 static function doAppLogout(){ 160 static function doAppLogout(){
161 setcookie("userMap","",time() - 3600,"/",self::$cookieDomain) ; 161 setcookie("userMapForApp","",time() - 3600,"/",self::$cookieDomain) ;
162 } 162 }
163 163
164 164
......