1df05bc3 by sayhoChun

adduser/login API tested, img upload tested, paging revised

1 parent 984c7470
Showing 328 changed files with 405 additions and 409 deletions
...@@ -276,19 +276,8 @@ if(! class_exists("ApiBase") ) { ...@@ -276,19 +276,8 @@ if(! class_exists("ApiBase") ) {
276 $sql = " 276 $sql = "
277 SELECT 277 SELECT
278 U.* 278 U.*
279 , 279 FROM tblUser U
280 CASE U.member_type 280 WHERE U.userNo = '{$userNo}' AND status=1
281 WHEN 'M' THEN
282 IFNULL((SELECT G.name FROM tbl_user_group G WHERE G.no = U.group_fk LIMIT 1), '')
283 WHEN 'V' THEN
284 IFNULL((SELECT G.name FROM tbl_user_group G WHERE G.no = U.group_fk LIMIT 1), '')
285 ELSE ''
286 END AS group_name
287 , IFNULL((SELECT F.file_vir_name FROM tbl_file F WHERE F.pa_no = U.no AND F.file_type = '{$this->FILE_TYPE_MEM}' LIMIT 1), '') AS user_img
288 , IFNULL((SELECT user_fk FROM tbl_room WHERE user_fk = '{$userNo}' AND `status` = 'Y'), 0) AS hasRoom
289 , IFNULL((SELECT vip_fk FROM tbl_building WHERE vip_fk = '{$userNo}' AND `status` = 'Y'), 0) AS hasBuilding
290 FROM v_alive_user U
291 WHERE U.no = '{$userNo}'
292 LIMIT 0, 1 281 LIMIT 0, 1
293 "; 282 ";
294 283
...@@ -300,25 +289,7 @@ if(! class_exists("ApiBase") ) { ...@@ -300,25 +289,7 @@ if(! class_exists("ApiBase") ) {
300 } 289 }
301 else 290 else
302 { 291 {
303 if($userInfo["member_type"] == $this->MEM_TYPE_MEMBER || $userInfo["member_type"] == $this->MEM_TYPE_VIP) 292 unset($userInfo["userPwd"]) ;
304 {
305 $sql = "
306 SELECT
307 *
308 , (longitude / 1E6) AS longitude
309 , (latitude / 1E6) AS latitude
310 FROM tbl_user_group
311 WHERE `no` = '{$userInfo["group_fk"]}' AND `status` = 'Y'
312 LIMIT 1
313 ";
314 $groupInfo = $this->getRow($sql);
315
316 if($groupInfo != null)
317 $userInfo["groupInfo"] = $groupInfo;
318 }
319
320 unset($userInfo["userPWD"]) ;
321 unset($userInfo["userPWDEnc"]) ;
322 } 293 }
323 294
324 return $userInfo; 295 return $userInfo;
......
...@@ -14,6 +14,17 @@ if (! class_exists("ApiBoard")) ...@@ -14,6 +14,17 @@ if (! class_exists("ApiBoard"))
14 14
15 //공지사항 리스트 15 //공지사항 리스트
16 function getListOfNotice(){ 16 function getListOfNotice(){
17
18 $sql="
19 SELECT COUNT(*)
20 FROM tblNotice
21 ORDER BY noticeNo DESC
22 ";
23
24 $this->rownum=$this->getValue($sql, "rn");
25 $this->initPage();
26 $this->setPageForDevice($this->rownum);
27
17 $sql=" 28 $sql="
18 SELECT * 29 SELECT *
19 FROM tblNotice 30 FROM tblNotice
...@@ -41,6 +52,15 @@ if (! class_exists("ApiBoard")) ...@@ -41,6 +52,15 @@ if (! class_exists("ApiBoard"))
41 //이벤트 리스트 52 //이벤트 리스트
42 function getListOfEvent(){ 53 function getListOfEvent(){
43 $sql=" 54 $sql="
55 SELECT COUNT(*)
56 FROM tblEvent
57 ORDER BY eventNo DESC
58 ";
59 $this->rownum=$this->getValue($sql, "rn");
60 $this->initPage();
61 $this->setPageForDevice($this->rownum);
62
63 $sql="
44 SELECT * 64 SELECT *
45 FROM tblEvent 65 FROM tblEvent
46 ORDER BY eventNo DESC 66 ORDER BY eventNo DESC
...@@ -74,16 +94,23 @@ if (! class_exists("ApiBoard")) ...@@ -74,16 +94,23 @@ if (! class_exists("ApiBoard"))
74 94
75 //자유게시판 게시물 작성 95 //자유게시판 게시물 작성
76 function saveBoard(){ 96 function saveBoard(){
97 $imgResult = $this->inFn_Common_fileSave($_FILES);
98
77 $title=$this->req["title"]; 99 $title=$this->req["title"];
78 //$userFk = $this->appUser["no"]; 100 //$userFk = $this->appUser["no"];
79 $userFk=$this->req["userFk"]; 101 $userFk=$this->req["userFk"];
80 $imgPathBoard1=$this->req["imgPathBoard1"]; 102
81 $imgPathBoard2=$this->req["imgPathBoard2"]; 103 $imgPathBoard1 = $imgResult["imgPathBoard1"]["saveURL"] != null ? $imgResult["imgPathBoard1"]["saveURL"] : $this->req["imgPathBoard1"];
82 $imgPathBoard3=$this->req["imgPathBoard3"]; 104 $imgPathBoard2 = $imgResult["imgPathBoard2"]["saveURL"] != null ? $imgResult["imgPathBoard2"]["saveURL"] : $this->req["imgPathBoard2"];
105 $imgPathBoard3 = $imgResult["imgPathBoard3"]["saveURL"] != null ? $imgResult["imgPathBoard3"]["saveURL"] : $this->req["imgPathBoard3"];
106 $imgPathBoard4 = $imgResult["imgPathBoard4"]["saveURL"] != null ? $imgResult["imgPathBoard4"]["saveURL"] : $this->req["imgPathBoard4"];
107 $imgPathBoard5 = $imgResult["imgPathBoard5"]["saveURL"] != null ? $imgResult["imgPathBoard5"]["saveURL"] : $this->req["imgPathBoard5"];
108
109
83 $content=$this->req["content"]; 110 $content=$this->req["content"];
84 111
85 $sql=" 112 $sql="
86 INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, content, status, regDate) 113 INSERT INTO tblBoard(userFk, title, imgPathBoard1, imgPathBoard2, imgPathBoard3, imgPathBoard4, imgPathBoard5, content, status, regDate)
87 VALUES 114 VALUES
88 ( 115 (
89 '{$userFk}', 116 '{$userFk}',
...@@ -91,6 +118,8 @@ if (! class_exists("ApiBoard")) ...@@ -91,6 +118,8 @@ if (! class_exists("ApiBoard"))
91 '{$imgPathBoard1}', 118 '{$imgPathBoard1}',
92 '{$imgPathBoard2}', 119 '{$imgPathBoard2}',
93 '{$imgPathBoard3}', 120 '{$imgPathBoard3}',
121 '{$imgPathBoard4}',
122 '{$imgPathBoard5}',
94 '{$content}', 123 '{$content}',
95 1, 124 1,
96 NOW() 125 NOW()
...@@ -152,9 +181,10 @@ if (! class_exists("ApiBoard")) ...@@ -152,9 +181,10 @@ if (! class_exists("ApiBoard"))
152 //$boardNo = $this->req["no"]; 181 //$boardNo = $this->req["no"];
153 $boardNo=1; 182 $boardNo=1;
154 $sql=" 183 $sql="
155 SELECT * 184 SELECT B.*, U.userID, U.userName
156 FROM tblBoard 185 FROM tblBoard B
157 WHERE boardNo='{$boardNo}' AND status=1 186 JOIN tblUser U ON B.userFk=U.userNo
187 WHERE boardNo='{$boardNo}' AND B.status=1
158 LIMIT 1 188 LIMIT 1
159 "; 189 ";
160 $result=$this->getRow($sql); 190 $result=$this->getRow($sql);
...@@ -180,17 +210,21 @@ if (! class_exists("ApiBoard")) ...@@ -180,17 +210,21 @@ if (! class_exists("ApiBoard"))
180 210
181 //고객센터 게시물 저장 211 //고객센터 게시물 저장
182 function saveCS(){ 212 function saveCS(){
213 $imgResult = $this->inFn_Common_fileSave($_FILES);
214 $imgPathCS1 = $imgResult["imgPathCS1"]["saveURL"] != null ? $imgResult["imgPathCS1"]["saveURL"] : $this->req["imgPathCS1"];
215 $imgPathCS2 = $imgResult["imgPathCS2"]["saveURL"] != null ? $imgResult["imgPathCS2"]["saveURL"] : $this->req["imgPathCS2"];
216 $imgPathCS3 = $imgResult["imgPathCS3"]["saveURL"] != null ? $imgResult["imgPathCS3"]["saveURL"] : $this->req["imgPathCS3"];
217 $imgPathCS4 = $imgResult["imgPathCS4"]["saveURL"] != null ? $imgResult["imgPathCS4"]["saveURL"] : $this->req["imgPathCS4"];
218 $imgPathCS5 = $imgResult["imgPathCS5"]["saveURL"] != null ? $imgResult["imgPathCS5"]["saveURL"] : $this->req["imgPathCS5"];
219
183 $title=$this->req["title"]; 220 $title=$this->req["title"];
184 //$userFk = $this->appUser["no"]; 221 //$userFk = $this->appUser["no"];
185 $userFk=$this->req["userFk"]; 222 $userFk=$this->req["userFk"];
186 $targetType=$this->req["targetType"]; 223 $targetType=$this->req["targetType"];
187 $imgPathCS1=$this->req["imgPathCS1"];
188 $imgPathCS2=$this->req["imgPathCS2"];
189 $imgPathCS3=$this->req["imgPathCS3"];
190 $content=$this->req["content"]; 224 $content=$this->req["content"];
191 225
192 $sql=" 226 $sql="
193 INSERT INTO tblCustomerService(userFk, title, targetType, imgPathCS1, imgPathCS2, imgPathCS3, content, status, regDate) 227 INSERT INTO tblCustomerService(userFk, title, targetType, imgPathCS1, imgPathCS2, imgPathCS3, imgPathCS4, imgPathCS5, content, status, regDate)
194 VALUES 228 VALUES
195 ( 229 (
196 '{$userFk}', 230 '{$userFk}',
...@@ -199,6 +233,8 @@ if (! class_exists("ApiBoard")) ...@@ -199,6 +233,8 @@ if (! class_exists("ApiBoard"))
199 '{$imgPathCS1}', 233 '{$imgPathCS1}',
200 '{$imgPathCS2}', 234 '{$imgPathCS2}',
201 '{$imgPathCS3}', 235 '{$imgPathCS3}',
236 '{$imgPathCS4}',
237 '{$imgPathCS5}',
202 '{$content}', 238 '{$content}',
203 1, 239 1,
204 NOW() 240 NOW()
...@@ -261,9 +297,10 @@ if (! class_exists("ApiBoard")) ...@@ -261,9 +297,10 @@ if (! class_exists("ApiBoard"))
261 //$csNo=$this->req["no"]; 297 //$csNo=$this->req["no"];
262 $csNo=2; 298 $csNo=2;
263 $sql=" 299 $sql="
264 SELECT * 300 SELECT CS.*, U.userID, U.userName
265 FROM tblCustomerService 301 FROM tblCustomerService CS
266 WHERE csNo='{$csNo}' AND status=1 302 JOIN tblUser U ON CS.userFk=U.userNo
303 WHERE csNo='{$csNo}' AND CS.status=1
267 LIMIT 1 304 LIMIT 1
268 "; 305 ";
269 $result=$this->getRow($sql); 306 $result=$this->getRow($sql);
...@@ -339,9 +376,9 @@ if (! class_exists("ApiBoard")) ...@@ -339,9 +376,9 @@ if (! class_exists("ApiBoard"))
339 $companyNo=1; 376 $companyNo=1;
340 377
341 $sql=" 378 $sql="
342 SELECT * 379 SELECT C.*
343 FROM tblCompany 380 FROM tblCompany C
344 WHERE companyNo='{$companyNo}' AND status=1 381 WHERE companyNo='{$companyNo}' AND C.status=1
345 LIMIT 1 382 LIMIT 1
346 "; 383 ";
347 $result=$this->getRow($sql); 384 $result=$this->getRow($sql);
...@@ -525,11 +562,22 @@ if (! class_exists("ApiBoard")) ...@@ -525,11 +562,22 @@ if (! class_exists("ApiBoard"))
525 function getListOfMyProductionSpec(){ 562 function getListOfMyProductionSpec(){
526 //$userFk=$this->appUser["no"]; 563 //$userFk=$this->appUser["no"];
527 $userFk=1; 564 $userFk=1;
565
566 $sql="
567 SELECT COUNT(*)
568 FROM tblProductionSpec
569 WHERE userFk='{$userFk}' AND status=1
570 ORDER BY productionNo DESC
571 ";
572 $this->rownum=$this->getValue($sql, "rn");
573 $this->initPage();
574 $this->setPageForDevice($this->rownum);
575
528 $sql=" 576 $sql="
529 SELECT productionNo, companyName, requestDate 577 SELECT productionNo, companyName, requestDate
530 FROM tblProductionSpec 578 FROM tblProductionSpec
531 WHERE userFk='{$userFk}' 579 WHERE userFk='{$userFk}' AND status=1
532 ORDER BY productionNO DESC 580 ORDER BY productionNo DESC
533 "; 581 ";
534 $list=$this->getArray($sql); 582 $list=$this->getArray($sql);
535 583
...@@ -557,6 +605,17 @@ if (! class_exists("ApiBoard")) ...@@ -557,6 +605,17 @@ if (! class_exists("ApiBoard"))
557 } 605 }
558 606
559 $sql=" 607 $sql="
608 SELECT COUNT(*)
609 FROM tblProductionSpec
610 {$where}
611 ORDER BY productionNo DESC
612 ";
613 $this->rownum=$this->getValue($sql, "rn");
614 $this->initPage();
615 $this->setPageForDevice($this->rownum);
616
617
618 $sql="
560 SELECT productionNo, companyName, requestDate 619 SELECT productionNo, companyName, requestDate
561 FROM tblProductionSpec 620 FROM tblProductionSpec
562 {$where} 621 {$where}
...@@ -626,10 +685,22 @@ if (! class_exists("ApiBoard")) ...@@ -626,10 +685,22 @@ if (! class_exists("ApiBoard"))
626 $userNo=$this->appUser["no"]; 685 $userNo=$this->appUser["no"];
627 686
628 $sql=" 687 $sql="
688 SELECT COUNT(*)
689 FROM tblProductionSpec PS
690 JOIN tblLike L ON PS.productionNo=L.productionNo
691 WHERE L.userNo='{$userNo}' AND PS.status=1
692 ORDER BY regDate DESC
693 ";
694 $this->rownum=$this->getValue($sql, "rn");
695 $this->initPage();
696 $this->setPageForDevice($this->rownum);
697
698 $sql="
629 SELECT PS.productionNo, companyName, requestDate 699 SELECT PS.productionNo, companyName, requestDate
630 FROM tblProductionSpec PS 700 FROM tblProductionSpec PS
631 JOIN tblLike L ON PS.productionNo=L.productionNo 701 JOIN tblLike L ON PS.productionNo=L.productionNo
632 WHERE L.userNo='{$userNo}' 702 WHERE L.userNo='{$userNo}' AND PS.status=1
703 ORDER BY regDate DESC
633 "; 704 ";
634 $result=$this->getArray($sql); 705 $result=$this->getArray($sql);
635 return $this->makeResultJson("1","", $result); 706 return $this->makeResultJson("1","", $result);
......
...@@ -46,7 +46,7 @@ if (! class_exists("ApiStatic")){ ...@@ -46,7 +46,7 @@ if (! class_exists("ApiStatic")){
46 //메인 페이지 정보 46 //메인 페이지 정보
47 function getMain(){ 47 function getMain(){
48 $sql=" 48 $sql="
49 SELECT imgPathMain, phrase1, phrase2, imgPathBuiltIn, imgPathInsulation, imgPathFreezerV, imgPathSpecial, imgPathPowerGate, imgPathWingBody, imgPathFreezerC 49 SELECT imgPathMainLogo, imgPathMain, phrase1, phrase2, imgPathBuiltIn, imgPathAxle, imgPathFreezerV, imgPathSpecial, imgPathPowerGate, imgPathWingBody, imgPathFreezerC
50 FROM tblMain 50 FROM tblMain
51 LIMIT 1 51 LIMIT 1
52 "; 52 ";
...@@ -81,9 +81,21 @@ if (! class_exists("ApiStatic")){ ...@@ -81,9 +81,21 @@ if (! class_exists("ApiStatic")){
81 //메인 페이지 회사정보 81 //메인 페이지 회사정보
82 function getKCBriefInfo(){ 82 function getKCBriefInfo(){
83 $sql=" 83 $sql="
84 SELECT address, telephone, fax, eMail 84 SELECT factoryName1, address1, telephone1, fax1, eMail1, factoryName2, address2, telephone2, fax2, eMail2
85 FROM tblKCSpecialVehicleInfo 85 FROM tblKCSpecialVehicleInfo
86 "; 86 ";
87 $result=$this->getRow($sql);
88 return $this->makeResultJson("1", "", $result);
89 }
90
91 //전화연결시 본사 이름, 전화번호
92 function getKCContract(){
93 $sql="
94 SELECT factoryName1, telephone1, factoryName2, telephone2
95 FROM tblKCSpecialVehicleInfo
96 ";
97 $result=$this->getRow($sql);
98 return $this->makeResultJson("1", "", $result);
87 } 99 }
88 100
89 //탑차 분류별 리스트 101 //탑차 분류별 리스트
...@@ -104,6 +116,7 @@ if (! class_exists("ApiStatic")){ ...@@ -104,6 +116,7 @@ if (! class_exists("ApiStatic")){
104 function getInfoOfVehicle(){ 116 function getInfoOfVehicle(){
105 $vehicleNo=$this->req["vehicleNo"]; 117 $vehicleNo=$this->req["vehicleNo"];
106 $vehicleNo=1; 118 $vehicleNo=1;
119
107 echo $vehicleNo; 120 echo $vehicleNo;
108 $sql=" 121 $sql="
109 SELECT * 122 SELECT *
...@@ -138,6 +151,16 @@ if (! class_exists("ApiStatic")){ ...@@ -138,6 +151,16 @@ if (! class_exists("ApiStatic")){
138 return $this->makeResultJson("1", "", $result); 151 return $this->makeResultJson("1", "", $result);
139 } 152 }
140 153
154 function getListOfEmergency(){
155 $sql="
156 SELECT *
157 FROM tblASEmergency
158 WHERE status=1
159 ";
160 $result=$this->getArray($sql);
161 return $this->makeResultJson("1", "", $result);
162 }
163
141 164
142 } 165 }
143 } 166 }
......
...@@ -16,58 +16,22 @@ if (! class_exists("ApiUser")) ...@@ -16,58 +16,22 @@ if (! class_exists("ApiUser"))
16 parent::__construct($req); 16 parent::__construct($req);
17 } 17 }
18 18
19 // 회원 포인트 조회 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.getInfoOfAvailPoint)
20 function getInfoOfAvailPoint()
21 {
22 $no = $this->appUser["no"];
23
24 $sql = "
25 SELECT
26 CASE
27 WHEN SUM(AMT) IS NULL
28 THEN 0
29 ELSE SUM(AMT)
30 END AS AVAIL_AMT
31 FROM tbl_point_trans
32 WHERE user_fk = '{$no}' AND trans_type='I'
33 ";
34
35 $avail_amt = $this->getValue($sql, "AVAIL_AMT");
36
37 $sql = "
38 SELECT
39 CASE
40 WHEN SUM(AMT) IS NULL
41 THEN 0
42 ELSE SUM(AMT)
43 END AS PAY_AMT
44 FROM tbl_point_trans
45 WHERE user_fk = '{$no}' AND trans_type='O'
46 ";
47
48 $pay_amt = $this->getValue($sql, "PAY_AMT");
49
50 $use_amt = $avail_amt - $pay_amt;
51
52 return $this->makeResultJson("1", "", $use_amt);
53 }
54
55 // 회원가입 여부 판단 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.initLogin&id=aa) 19 // 회원가입 여부 판단 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.initLogin&id=aa)
56 function initLogin() 20 function initLogin()
57 { 21 {
58 $id = $this->req["id"]; 22 $userID = $this->req["userID"];
59 23
60 $sql = " 24 $sql = "
61 SELECT id 25 SELECT userID
62 FROM v_alive_user 26 FROM tblUser
63 WHERE id='{$id}' 27 WHERE userID='{$userID}' AND status=1
64 LIMIT 0,1 28 LIMIT 0,1
65 "; 29 ";
66 30
67 $id = $this->getValue($sql, "id"); 31 $userID = $this->getValue($sql, "userID");
68 32
69 $returnCode = - 1; 33 $returnCode = - 1;
70 if ($id != "") 34 if ($userID != "")
71 { 35 {
72 $returnCode = 1; 36 $returnCode = 1;
73 } 37 }
...@@ -75,99 +39,127 @@ if (! class_exists("ApiUser")) ...@@ -75,99 +39,127 @@ if (! class_exists("ApiUser"))
75 return $this->makeResultJson($returnCode, ""); 39 return $this->makeResultJson($returnCode, "");
76 } 40 }
77 41
78 // 회원 그룹 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.getListOfMemberGroup) 42 function removeSpecials($string){
79 function getListOfMemberGroup() 43 return preg_replace("/[ #\&\+\-%@=\/\\\:;,\.'\"\^`~\_|\!\?\*$#<>()\[\]\{\}]/i", "", $string);
80 { 44 }
81 $name = $this->req["name"];
82 $addQuery = "";
83 45
84 if ($name != "") 46 function checkIDRedundancy(){
85 $addQuery .= " AND name like '%" . $name . "%'"; 47 $userID=$this->req["userID"];
86 48
87 $sql = " 49 $sql="
88 SELECT * 50 SELECT *
89 FROM v_alive_user_group 51 FROM tblUser
90 WHERE 1=1 {$addQuery} 52 WHERE userID='{$userID}' AND status=1
53 LIMIT 0, 1
91 "; 54 ";
55 $result=$this->getRow($sql);
56
57 if($result != null)
58 return $this->makeResultJson(-100, "사용할 수 없는 아이디 입니다");
59 else
60 return $this->makeResultJson(1, "사용할 수 있는 아이디 입니다");
61
62
63 }
64
65 function checkNickRedundancy(){
66 $nickName=$this->req["nickName"];
92 67
93 $list = $this->getArray($sql); 68 $sql="
69 SELECT *
70 FROM tblUser
71 WHERE nickName='{$nickName}' AND status=1
72 LIMIT 0, 1
73 ";
74 $result=$this->getRow($sql);
94 75
95 if (sizeof($list) > 0) 76 if($result != null)
96 return $this->makeResultJson("1", "", $list); 77 return $this->makeResultJson(-100, "사용할 수 없는 닉네임 입니다");
97 else 78 else
98 return $this->makeResultJson("-1000", "내역이 없습니다."); 79 return $this->makeResultJson(1, "사용할 수 있는 닉네임 입니다");
99 } 80 }
100 81
101 // 회원 가입 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.memberJoin) 82 // 회원 가입 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.memberJoin)
102 function memberJoin() 83 function memberJoin()
103 { 84 {
104 $id = $this->req["id"]; 85 $userID = $this->req["userID"];
105 86 $userPwd = $this->req["userPwd"];
106 $name = $this->req["name"]; 87 $userPwdConfirm=$this->req["userPwdConfirm"];
107 $tel = str_replace(" ", "", $this->req["tel"]); 88 $userName = $this->req["userName"];
108 $app_type = $this->req["app_type"]; 89 $nickName = $this->req["nickName"];
109 $group_fk = $this->req["group_fk"]; 90 $userTel = str_replace(" ", "", $this->req["userTel"]);
110 $regiType = $this->req["regiType"]; 91 $userVehicleTON=$this->req["userVehicleTON"];
111 $memType = $this->req["memType"]; 92 $userVehicleName=$this->req["userVehicleName"];
112 93 $userVehicleType=$this->req["userVehicleType"];
113 $deviceID = $this->req["deviceID"]; 94 $userVehicleWish=$this->req["userVehicleWish"];
114 $deviceTypeID = $this->req["deviceTypeID"]; 95 $deviceTypeID = $this->req["deviceTypeID"];
115 $storeTypeID = $this->req["storeTypeID"]; 96 $deviceID = $this->req["deviceID"];
116 $registrationKey = $this->req["registrationKey"]; 97 $registrationKey = $this->req["registrationKey"];
117 $appVersion = $this->req["appVersion"]; 98 $appVersion = $this->req["appVersion"];
118 99
100 //if($nickName=="")
101 //$nickName=$userName;
119 // $status = ($memType == this.MEM_TYPE_NOMAL) ? "" : "" ; 102 // $status = ($memType == this.MEM_TYPE_NOMAL) ? "" : "" ;
120 103
121 $sql = " 104 $sql = "
122 SELECT * 105 SELECT *
123 FROM tbl_user 106 FROM tblUser
124 WHERE `id` = '{$id}' AND `status` = 'Y' 107 WHERE `userID` = '{$userID}' AND `status` = 1
125 LIMIT 1 108 LIMIT 1
126 "; 109 ";
127 $regInfo = $this->getRow($sql); 110 $regInfo = $this->getRow($sql);
128 111
129 if($regInfo != null) 112 if($regInfo != null)
130 return $this->makeResultJson(-100, "이미 회원가입을 하셨습니다."); 113 return $this->makeResultJson(-100, "아이디 중복을 확인해 주세요");
131 114
132 // 멤버십 회원 가입 일경우 전화번호 필수 115 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'";
133 if ($this->MEM_TYPE_HOLD == $memType) 116 $regInfo=$this->getRow($sql);
134 {
135 if($tel == "")
136 return $this->makeResultJson(-101, "제휴회원 요청시 전화번호는 필수 입력사항입니다.");
137 117
138 $sql = " 118 if($regInfo != null)
139 SELECT * 119 return $this->makeResultJson(-101, "닉네임 중복을 확인해 주세요");
140 FROM tbl_user 120
141 WHERE `tel` = '{$tel}' AND `status` = 'Y' AND `member_type` != '{$this->MEM_TYPE_NOMAL}' 121 if(strlen($userID)<6)
142 LIMIT 1 122 return $this->makeResultJson(-102, "아이디는 여섯자리 이상이어야 합니다");
143 ";
144 $telResult = $this->getRow($sql);
145 123
146 if($telResult != null) 124 if(strlen($userPwd) != strlen($this->removeSpecials($userPwd))) {
147 return $this->makeResultJson(-102, "이미 가입된 멤버십 회원이십니다."); 125 return $this->makeResultJson(-103, "비밀번호에는 특수문자가 포함될 수 없습니다.");
148 } 126 }
127 else if(strlen($userPwd) < 4)
128 return $this->makeResultJson(-104, "비밀번호는 네 자리 이상이어야 합니다");
129
130 if($userPwd != $userPwdConfirm)
131 return $this->makeResultJson(-105, "비밀번호가 일치하지 않습니다");
132 /*
133 if($userTel == "")
134 return $this->makeResultJson(-105, "전화번호는 필수 입력사항입니다.");
135 */
136
149 137
150 $insAssoc = Array( 138 $insAssoc = Array(
151 "id" => $id, 139 "userType"=>1,
152 "name" => $name, 140 "userID" => $userID,
153 "tel" => $tel, 141 "userPwd"=> $userPwd,
154 "app_type" => $app_type, 142 "userName" => $userName,
155 "group_fk" => $group_fk, 143 "nickName" => $nickName,
156 "member_type" => $memType, 144 "userTel" => $userTel,
157 "regi_type" => $regiType, 145 "userVehicleTON" => $userVehicleTON,
158 "device_id" => $deviceID, 146 "userVehicleName" => $userVehicleName,
159 "device_type_id" => $deviceTypeID, 147 "userVehicleType" => $userVehicleType,
160 "storeType_id" => $storeTypeID, 148 "userVehicleWish" => $userVehicleWish,
161 "reg_dt" => "now()", 149 "deviceTypeID" => $deviceTypeID,
162 "app_version" => $appVersion, 150 "deviceID" => $deviceID,
163 "registration_key" => $registrationKey, 151 "registrationKey" => $registrationKey,
164 "status" => "Y" 152 "push" => 1,
153 "appVersion" => $appVersion,
154 "lastLoginDate"=>"now()",
155 "status" => 1,
156 "regDate" => "now()"
165 ); 157 );
166 158
167 $result = $this->techOfInsertForUpdate("tbl_user", $insAssoc); 159 $result = $this->techOfInsertForUpdate("tblUser", $insAssoc);
168 160
169 $no = $this->mysql_insert_id(); 161 $no = $this->mysql_insert_id();
170 162 /*
171 $file_vir_name = ""; 163 $file_vir_name = "";
172 $file_org_name = ""; 164 $file_org_name = "";
173 165
...@@ -192,7 +184,7 @@ if (! class_exists("ApiUser")) ...@@ -192,7 +184,7 @@ if (! class_exists("ApiUser"))
192 ); 184 );
193 185
194 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile); 186 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile);
195 187 */
196 if ($result > 0) 188 if ($result > 0)
197 { 189 {
198 $returnCode = "1"; 190 $returnCode = "1";
...@@ -207,110 +199,21 @@ if (! class_exists("ApiUser")) ...@@ -207,110 +199,21 @@ if (! class_exists("ApiUser"))
207 return $this->makeResultJson($returnCode, $returnMessage, $userInfo); 199 return $this->makeResultJson($returnCode, $returnMessage, $userInfo);
208 } 200 }
209 201
210 /**
211 * 멤버쉽 신청
212 * @return string
213 */
214 function reqMembership()
215 {
216 $memType=$this->req["memType"];
217 $name = $this->req["name"];
218 $tel = str_replace(" ", "", $this->req["tel"]);
219 $group_fk = $this->req["group_fk"];
220 $no = $this->appUser["no"];
221
222 $sql = "
223 SELECT *
224 FROM tbl_user
225 WHERE `no` = '{$no}' AND `status` = 'Y'
226 LIMIT 1
227 ";
228
229 $userInfo = $this->getRow($sql);
230
231 if($userInfo == null)
232 {
233 return $this->makeResultJson("-10", "비정상 접근");
234 }
235 else if($userInfo["member_type"] != 'N')
236 {
237 return $this->makeResultJson("-100", "이미 멤버쉽을 신청하였습니다.");
238 }
239 else if($tel == "")
240 {
241 return $this->makeResultJson(-101, "제휴회원 요청시 전화번호는 필수 입력사항입니다.");
242 }
243 else
244 {
245 $sql = "
246 SELECT *
247 FROM tbl_user
248 WHERE `tel` = '{$tel}' AND `status` = 'Y' AND `member_type` != '{$this->MEM_TYPE_NOMAL}'
249 LIMIT 1
250 ";
251 $telResult = $this->getRow($sql);
252
253 if($telResult != null)
254 return $this->makeResultJson(-102, "이미 가입된 멤버십 회원이십니다.");
255
256 // 파일 업로드
257 if ($_FILES != null && sizeof($_FILES) > 0)
258 {
259 // 삭제함
260 $sql = "
261 DELETE FROM tbl_file WHERE pa_no = '{$no}' AND file_type = '{$this->FILE_TYPE_MEM}'
262 ";
263 $this->update($sql);
264
265 $updateFileData = $this->inFn_Common_fileSave($_FILES);
266
267 $file_vir_name = $updateFileData["file"]["saveURL"];
268 $file_org_name = $updateFileData["file"]["name"];
269
270 $insFile = Array(
271 "file_org_name" => $file_org_name,
272 "file_vir_name" => $file_vir_name,
273 "reg_dt" => "now()",
274 "pa_no" => $no,
275 "file_type" => $this->FILE_TYPE_MEM
276 );
277
278 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile);
279 }
280
281 $sql = "
282 UPDATE tbl_user
283 SET
284 name = '{$name}'
285 , tel = '{$tel}'
286 , group_fk = '{$group_fk}'
287 , member_type = '{$memType}'
288 WHERE `no` = '{$no}'
289 ";
290 $this->update($sql);
291
292 return $this->makeResultJson("1", "저장되었습니다.", $this->inFn_ApiBase_getInfoOfUser($no));
293 }
294
295 }
296
297 202
298 // 회원 로그인 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.userLogin) 203 // 회원 로그인 (http://106.240.232.36:8004/action_front.php?cmd=ApiUser.userLogin)
299 function userLogin() 204 function userLogin()
300 { 205 {
301 $id = $this->req["id"]; 206 $userID = $this->req["userID"];
302 $deviceID = $this->req["deviceID"]; 207 $deviceID = $this->req["deviceID"];
303 $deviceTypeID = $this->req["deviceTypeID"]; 208 $deviceTypeID = $this->req["deviceTypeID"];
304 $storeTypeID = $this->req["storeTypeID"];
305 $registrationKey = $this->req["registrationKey"]; 209 $registrationKey = $this->req["registrationKey"];
306 $appVersion = $this->req["appVersion"]; 210 $appVersion = $this->req["appVersion"];
307 211
308 $param = Array( 212 $param = Array(
309 $id, 213 $userID,
310 $deviceID, 214 $deviceID,
311 $deviceTypeID, 215 $deviceTypeID,
312 $registrationKey, 216 $registrationKey,
313 $storeTypeID,
314 $appVersion 217 $appVersion
315 ); 218 );
316 219
...@@ -334,78 +237,30 @@ if (! class_exists("ApiUser")) ...@@ -334,78 +237,30 @@ if (! class_exists("ApiUser"))
334 // 비동기 푸시키 갱신 API 237 // 비동기 푸시키 갱신 API
335 function setUserRegistrationKey() 238 function setUserRegistrationKey()
336 { 239 {
337 $no = $this->appUser["no"]; 240 $userNo = $this->appUser["no"];
338 $registration_key = $this->req["registration_key"]; 241 $registrationKey = $this->req["registrationKey"];
339 242
340 if ($no != "-1") 243 if ($no != "-1")
341 { 244 {
342 $sql = " 245 $sql = "
343 UPDATE tbl_user 246 UPDATE tblUser
344 SET registration_key = '{$registration_key}' 247 SET registrationKey = '{$registrationKey}'
345 WHERE no = '{$no}' 248 WHERE userNo = '{$userNo}'
346 "; 249 ";
347 $this->update($sql); 250 $this->update($sql);
348 } 251 }
349 } 252 }
350 253
351 // 민원 정보공유 푸시 설정
352 function setCommentPushOnOff()
353 {
354 $no = $this->appUser["no"];
355 $is_push = $this->req["is_push"];
356
357 $sql = "
358 UPDATE tbl_user
359 SET comm_push = '{$is_push}'
360 WHERE `no` = '{$no}'
361 ";
362 $result = $this->update($sql);
363
364 return $this->makeResultJson("1", "");
365 }
366
367 // 민원 정보공유 푸시 설정
368 function setInfoPushOnOff()
369 {
370 $no = $this->appUser["no"];
371 $is_push = $this->req["is_push"];
372
373 $sql = "
374 UPDATE tbl_user
375 SET info_push = '{$is_push}'
376 WHERE `no` = '{$no}'
377 ";
378 $result = $this->update($sql);
379
380 return $this->makeResultJson("1", "");
381 }
382
383 // 푸시 설정 254 // 푸시 설정
384 function setPushOnOff() 255 function setPushOnOff()
385 { 256 {
386 $no = $this->appUser["no"]; 257 $userNo = $this->appUser["no"];
387 $is_push = $this->req["is_push"]; 258 $push = $this->req["push"];
388
389 $sql = "
390 UPDATE tbl_user
391 SET is_push = '{$is_push}'
392 WHERE `no` = '{$no}'
393 ";
394 $result = $this->update($sql);
395
396 return $this->makeResultJson("1", "");
397 }
398
399 // 렌트 푸시 설정
400 function setRentOnOff()
401 {
402 $no = $this->appUser["no"];
403 $is_rent = $this->req["is_push"];
404 259
405 $sql = " 260 $sql = "
406 UPDATE tbl_user 261 UPDATE tbl_user
407 SET is_rent = '{$is_rent}' 262 SET push = '{$push}'
408 WHERE `no` = '{$no}' 263 WHERE `userNo` = '{$userNo}'
409 "; 264 ";
410 $result = $this->update($sql); 265 $result = $this->update($sql);
411 266
...@@ -415,13 +270,13 @@ if (! class_exists("ApiUser")) ...@@ -415,13 +270,13 @@ if (! class_exists("ApiUser"))
415 // 로그아웃 270 // 로그아웃
416 function userLogout() 271 function userLogout()
417 { 272 {
418 $no = $this->appUser["no"]; 273 $userNo = $this->appUser["no"];
419 274
420 // 푸시키 초기화 275 // 푸시키 초기화
421 $sql = " 276 $sql = "
422 UPDATE tbl_user 277 UPDATE tblUser
423 SET registration_key = '' 278 SET registrationKey = ''
424 WHERE no = '{$no}' 279 WHERE userNo = '{$userNo}'
425 "; 280 ";
426 $this->update($sql); 281 $this->update($sql);
427 282
...@@ -432,13 +287,18 @@ if (! class_exists("ApiUser")) ...@@ -432,13 +287,18 @@ if (! class_exists("ApiUser"))
432 function modifyUserInfo() 287 function modifyUserInfo()
433 { 288 {
434 $userNo = $this->appUser["no"]; 289 $userNo = $this->appUser["no"];
435 $name = $this->req["name"]; 290 //$is_file_change = $this->req["is_file_change"]; // NEW / DEL / NON
436 $tel = $this->req["tel"]; 291
437 $group_fk = $this->req["group_fk"] ; 292 $userPwd = $this->req["userPwd"];
438 $groupName = $this->req["groupName"] ; 293 $userPwdConfirm = $this->req["userPwdConfirm"];
439 $is_file_change = $this->req["is_file_change"]; // NEW / DEL / NON 294 $userName = $this->req["userName"];
440 295 $nickName = $this->req["nickName"];
441 296 $userTel = str_replace(" ", "", $this->req["userTel"]);
297 $userVehicleTON=$this->req["userVehicleTON"];
298 $userVehicleName=$this->req["userVehicleName"];
299 $userVehicleType=$this->req["userVehicleType"];
300 $userVehicleWish=$this->req["userVehicleWish"];
301 /*
442 // 삭제함 302 // 삭제함
443 if ($is_file_change != "NON") 303 if ($is_file_change != "NON")
444 { 304 {
...@@ -466,70 +326,34 @@ if (! class_exists("ApiUser")) ...@@ -466,70 +326,34 @@ if (! class_exists("ApiUser"))
466 326
467 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile); 327 $fileResult = $this->techOfInsertForUpdate("tbl_file", $insFile);
468 } 328 }
329 */
330 $sql="SELECT * FROM tblUser WHERE nickName='{$nickName} AND status=1'";
331 $regInfo=$this->getRow($sql);
332 if($regInfo != null)
333 return $this->makeResultJson(-100, "닉네임 중복을 확인해 주세요");
334
335 if($userPwd != $userPwdConfirm)
336 return $this->makeResultJson(-101, "비밀번호 가 일치하지 않습니다");
469 337
470 $sql = " 338 $sql = "
471 UPDATE tbl_user 339 UPDATE tbl_user
472 SET 340 SET
473 name = '{$name}' 341 userPwd='{$userPwd}',
474 , group_fk = '{$group_fk}' 342 userName='{$userName}',
475 , tel = '{$tel}' 343 nickName='{$nickName}',
476 WHERE `no` = '{$userNo}' 344 userTel='{$userTel}',
345 userVehicleTON='{$userVehicleTON}',
346 userVehicleName='{$userVehicleName}',
347 userVehicleType='{$userVehicleType}',
348 userVehicleWish='{$userVehicleWish}'
349 WHERE `userNo` = '{$userNo}'
477 "; 350 ";
478 $this->update($sql); 351 $this->update($sql);
479 352
480
481
482 return $this->makeResultJson("1", "저장되었습니다.", $this->inFn_ApiBase_getInfoOfUser($userNo)); 353 return $this->makeResultJson("1", "저장되었습니다.", $this->inFn_ApiBase_getInfoOfUser($userNo));
483 } 354 }
484 355
485 /** 356 /**
486 * 회원 사용 포인트 내역 조회
487 *
488 * @return string
489 */
490 function getListOfUserPoint()
491 {
492 $userNo = $this->appUser["no"];
493
494 $this->initPage();
495
496 $sql = "
497 SELECT COUNT(*)
498 FROM tbl_point_trans PT
499 JOIN tbl_shop S ON(PT.shop_fk = S.no)
500 WHERE PT.user_fk = '{$userNo}' AND PT.trans_type = 'O' AND PT.pay_type = '{$this->PAY_TYPE_USE}'
501 ";
502
503 $this->rownum = $this->getValue($sql, "rn");
504
505 $this->setPage($this->rownum);
506
507 $sql = "
508 SELECT
509 PT.*
510 , S.name AS shop_name
511 FROM tbl_point_trans PT
512 JOIN tbl_shop S ON(PT.shop_fk = S.no)
513 WHERE PT.user_fk = '{$userNo}' AND PT.trans_type = 'O' AND PT.pay_type = '{$this->PAY_TYPE_USE}'
514 ORDER BY PT.no DESC
515 LIMIT {$this->startNum}, {$this->endNum}
516 ";
517
518 $list = $this->getArray($sql);
519
520 $addData = Array(
521 "start_date" => date('Y.m.01', time()),
522 "end_date" => date('Y.m', time()) . "." . date('t', time()),
523 "avail_point" => $this->inFn_Common_getUserPointBalance($userNo)
524 );
525
526 if (sizeof($list) > 0)
527 return $this->makeResultJson("1", "", $list, $addData);
528 else
529 return $this->makeResultJson("-1000", "내역이 없습니다.", "", $addData);
530 }
531
532 /**
533 * 회원 정보 조회 357 * 회원 정보 조회
534 */ 358 */
535 function getUserInfo() 359 function getUserInfo()
...@@ -537,9 +361,8 @@ if (! class_exists("ApiUser")) ...@@ -537,9 +361,8 @@ if (! class_exists("ApiUser"))
537 $no = $this->req["no"]; 361 $no = $this->req["no"];
538 362
539 $userInfo = $this->inFn_ApiBase_getInfoOfUser($no); 363 $userInfo = $this->inFn_ApiBase_getInfoOfUser($no);
540 $addData = Array("avail_point" => $this->inFn_Common_getUserPointBalance($no));
541 364
542 return $this->makeResultJson("1", "", $userInfo, $addData); 365 return $this->makeResultJson("1", "", $userInfo);
543 } 366 }
544 367
545 function delUser(){ 368 function delUser(){
...@@ -547,7 +370,7 @@ if (! class_exists("ApiUser")) ...@@ -547,7 +370,7 @@ if (! class_exists("ApiUser"))
547 370
548 $sql=" 371 $sql="
549 UPDATE tblUser 372 UPDATE tblUser
550 SET expireDate=DATE_FORMAT(NOW() + interval 3 MONTH, '%Y%m%d') 373 SET expireDate=DATE_FORMAT(NOW() + interval 3 DAY, '%Y%m%d')
551 WHERE userNo='{$userNo}' AND status=1 374 WHERE userNo='{$userNo}' AND status=1
552 "; 375 ";
553 } 376 }
......
...@@ -51,8 +51,16 @@ ...@@ -51,8 +51,16 @@
51 <script type="text/javascript" src="/common/js/ajaxupload.3.6.js"></script> 51 <script type="text/javascript" src="/common/js/ajaxupload.3.6.js"></script>
52 <script type="text/javascript" src="/common/js/imgPreview.js"></script> 52 <script type="text/javascript" src="/common/js/imgPreview.js"></script>
53 <script type="text/javascript" src="/common/js/jquery.form.js"></script> 53 <script type="text/javascript" src="/common/js/jquery.form.js"></script>
54 <script src="/admin/inc/fileUpload/fileUploadJS.js"></script>
54 <script type="text/javascript"> 55 <script type="text/javascript">
55 $(document).ready(function(){ 56 $(document).ready(function(){
57
58 initFileUpload(101);
59 initFileUpload(102);
60 initFileUpload(103);
61 initFileUpload(104);
62 initFileUpload(105);
63
56 var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름 64 var FORM_TARGET_CLS_NM = ".data" ; // 폼을 동적 wrap 할 타겟 ID이름
57 var FORM_NAME = "alf" ; // 폼이름 65 var FORM_NAME = "alf" ; // 폼이름
58 var FORM_METHOD = "POST" ; // 폼 메쏘드 66 var FORM_METHOD = "POST" ; // 폼 메쏘드
...@@ -86,17 +94,14 @@ $(document).ready(function(){ ...@@ -86,17 +94,14 @@ $(document).ready(function(){
86 }) ; 94 }) ;
87 95
88 $(".saveBoard").click2(function(){ 96 $(".saveBoard").click2(function(){
89 $.ajax({ 97 $("#jData").ajaxSubmit({
90 type: 'post', 98 type: 'post',
91 url : "/action_front.php?cmd=ApiBoard.saveBoard", 99 url : "/action_front.php?cmd=ApiBoard.saveBoard",
92 async : false, 100 async : false,
93 cache : false, 101 cache : false,
94 data:{ 102 data:{
95 "title" : "제목제목제목", 103 "title" : "이미지",
96 "userFk" : 1, 104 "userFk" : 1,
97 "imgPathBoard1" : "경로1",
98 "imgPathBoard2" : "경로2",
99 "imgPathBoard3" : "경로3",
100 "content" : "내용내용내용" 105 "content" : "내용내용내용"
101 }, 106 },
102 success : function(data){ 107 success : function(data){
...@@ -131,6 +136,58 @@ $(document).ready(function(){ ...@@ -131,6 +136,58 @@ $(document).ready(function(){
131 }); 136 });
132 }) ; 137 }) ;
133 138
139 $(".login").click2(function(){
140 $.ajax({
141 type: 'post',
142 url : "/action_front.php?cmd=ApiUser.userLogin",
143 async : false,
144 cache : false,
145 data:{
146 "userID" : "fishcreek",
147 "deviceID" : "device",
148 "deviceTypeID" : 2,
149 "registrationKey" : "regKeyregKeyregKeyregKeyregKeyregKeyregKeyregKeyregKey",
150 "appVersion" : "v1.0"
151 },
152 success : function(data){
153 alert(data.returnmessage);
154 },
155 error : function(req, res, error){
156 alert(req+res+error);
157 }
158 });
159 }) ;
160
161 $(".memberJoin").click2(function(){
162 $.ajax({
163 type: 'post',
164 url : "/action_front.php?cmd=ApiUser.memberJoin",
165 async : false,
166 cache : false,
167 data:{
168 "userID" : "ellivga",
169 "userPwd" : "device",
170 "userName" : "세호",
171 "nickName" : "device",
172 "userTel" : "01026264848",
173 "userVehicleTON" : 21,
174 "userVehicleName" : "내장탑차",
175 "userVehicleType" : "HY",
176 "userVehicleWish" : "냉동 컨테이너",
177 "deviceTypeID" : 2,
178 "deviceID" : "deviceIDIDIDIDIDID",
179 "registrationKey" : "regKeyregKeyregKeyregKeyregKeyregKeyregKeyregKeyregKey",
180 "appVersion" : "v1.1"
181 },
182 success : function(data){
183 alert(data.returnmessage);
184 },
185 error : function(req, res, error){
186 alert(req+res+error);
187 }
188 });
189 }) ;
190
134 $(".saveProductionSpec").click2(function(){ 191 $(".saveProductionSpec").click2(function(){
135 $.ajax({ 192 $.ajax({
136 type: 'post', 193 type: 'post',
...@@ -233,6 +290,8 @@ $(document).ready(function(){ ...@@ -233,6 +290,8 @@ $(document).ready(function(){
233 <span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span> 290 <span class="button bigrounded blue saveBoard btnleft_y">게시물 저장 </span>
234 <span class="button bigrounded blue saveCS btnleft_y">고객센터 게시물 저장 </span> 291 <span class="button bigrounded blue saveCS btnleft_y">고객센터 게시물 저장 </span>
235 <span class="button bigrounded blue saveProductionSpec btnleft_y">제작사양서 저장 </span> 292 <span class="button bigrounded blue saveProductionSpec btnleft_y">제작사양서 저장 </span>
293 <span class="button bigrounded blue memberJoin btnleft_y">회원가입 </span>
294 <span class="button bigrounded blue login btnleft_y">로그인 </span>
236 </form> 295 </form>
237 <div class="data"> 296 <div class="data">
238 <table class="datacList" id="datacList"> 297 <table class="datacList" id="datacList">
...@@ -311,27 +370,74 @@ $(document).ready(function(){ ...@@ -311,27 +370,74 @@ $(document).ready(function(){
311 <td class="center">agreeInfo</td> 370 <td class="center">agreeInfo</td>
312 <td class=""><?echo $agreeInfo;?></td> 371 <td class=""><?echo $agreeInfo;?></td>
313 </tr> 372 </tr>
373
314 </table> 374 </table>
375 <form id="jData" method="post" enctype="multipart/form-data">
376 <table>
377 <tr>
378 <th style="height:25px;">이미지 1</th>
379 <td class="l">
380 <?
381 $fileIndex = "101";
382 $fileName = "imgPathBoard1";
383 $filePath = ($shopImgList[0]["file_vir_name"] == "" ? "" : $shopImgList[0]["file_vir_name"]);
384 $fileNumber = ($shopImgList[0]["no"] == "" ? "0" : $shopImgList[0]["no"]);
385 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
386 ?>
387 </td>
388 </tr>
389 <tr>
390 <th style="height:25px;">이미지 2</th>
391 <td class="l">
392 <?
393 $fileIndex = "102";
394 $fileName = "imgPathBoard2";
395 $filePath = ($shopImgList[1]["file_vir_name"] == "" ? "" : $shopImgList[1]["file_vir_name"]);
396 $fileNumber = ($shopImgList[1]["no"] == "" ? "0" : $shopImgList[1]["no"]);
397 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
398 ?>
399 </td>
400 </tr>
401 <tr>
402 <th style="height:25px;">이미지 3</th>
403 <td class="l">
404 <?
405 $fileIndex = "103";
406 $fileName = "imgPathBoard3";
407 $filePath = ($shopImgList[2]["file_vir_name"] == "" ? "" : $shopImgList[2]["file_vir_name"]);
408 $fileNumber = ($shopImgList[2]["no"] == "" ? "0" : $shopImgList[2]["no"]);
409 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
410 ?>
411 </td>
412 </tr>
413 <tr>
414 <th style="height:25px;">이미지 4</th>
415 <td class="l">
416 <?
417 $fileIndex = "104";
418 $fileName = "imgPathBoard4";
419 $filePath = ($shopImgList[3]["file_vir_name"] == "" ? "" : $shopImgList[3]["file_vir_name"]);
420 $fileNumber = ($shopImgList[3]["no"] == "" ? "0" : $shopImgList[3]["no"]);
421 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
422 ?>
423 </td>
424 </tr>
425 <tr>
426 <th style="height:25px;">이미지 5</th>
427 <td class="l">
428 <?
429 $fileIndex = "105";
430 $fileName = "imgPathBoard5";
431 $filePath = ($shopImgList[4]["file_vir_name"] == "" ? "" : $shopImgList[4]["file_vir_name"]);
432 $fileNumber = ($shopImgList[4]["no"] == "" ? "0" : $shopImgList[4]["no"]);
433 include $_SERVER["DOCUMENT_ROOT"] . "/admin/inc/fileUpload/fileUpload.php";
434 ?>
435 </td>
436 </tr>
437 </table>
438 </form>
315 </div> 439 </div>
316 <br> 440 <br>
317 <form name="test" id="test" method=GET>
318 <input type="text" id="name1" name="name1" /> : <input type="text" id="name1v" name="name1v" />
319 <br>
320 <input type="text" id="name2" name="name2" /> : <input type="text" id="name2v" name="name2v" />
321 <br>
322 <input type="text" id="name3" name="name3" /> : <input type="text" id="name3v" name="name3v" />
323 <br>
324 <input type="text" id="name4" name="name4" /> : <input type="text" id="name4v" name="name4v" />
325 <br>
326 <input type="text" id="name5" name="name5" /> : <input type="text" id="name5v" name="name5v" />
327 <br>
328 <input type="text" id="name6" name="name6" /> : <input type="text" id="name6v" name="name6v" />
329 <br>
330 <input type="text" id="name7" name="name7" /> : <input type="text" id="name7v" name="name7v" />
331 <br>
332 <a href="#" id="subm" name="subm">Submit</a>
333 <input type="reset" value="지우기" />
334 </form>
335 </div> 441 </div>
336 442
337 443
......
...@@ -86,13 +86,14 @@ if(! class_exists("LoginUtil")){ ...@@ -86,13 +86,14 @@ if(! class_exists("LoginUtil")){
86 if($row != null){ 86 if($row != null){
87 $cookieStr = 87 $cookieStr =
88 88
89 $row['no'] . chr(self::$spliter) . 89 $row['userNo'] . chr(self::$spliter) .
90 $row['id'] . chr(self::$spliter) . 90 $row['userID'] . chr(self::$spliter) .
91 $row['name'] . chr(self::$spliter) . 91 $row['userPwd'] . chr(self::$spliter) .
92 $row['group_fk'] . chr(self::$spliter) . 92 $row['userName'] . chr(self::$spliter) .
93 $row['member_type'] . chr(self::$spliter) . 93 $row['userType'] . chr(self::$spliter) .
94 $row['app_type'] . chr(self::$spliter) . 94 $row['userTel'] . chr(self::$spliter) .
95 $row['regi_type'] . chr(self::$spliter) ; 95 $row['deviceTypeID'] . chr(self::$spliter) .
96 $row['deviceID'] . chr(self::$spliter) ;
96 97
97 $cookieStr = bin2hex($cookieStr) ; // 16진수로 암호화 98 $cookieStr = bin2hex($cookieStr) ; // 16진수로 암호화
98 99
...@@ -133,20 +134,21 @@ if(! class_exists("LoginUtil")){ ...@@ -133,20 +134,21 @@ if(! class_exists("LoginUtil")){
133 134
134 $map['no'] = $aUser[0] ; 135 $map['no'] = $aUser[0] ;
135 $map['id'] = $aUser[1] ; 136 $map['id'] = $aUser[1] ;
136 $map['name'] = $aUser[2] ; 137 $map['pwd'] = $aUser[2] ;
137 $map['group_fk'] = $aUser[3] ; 138 $map['name'] = $aUser[3] ;
138 $map['member_type'] = $aUser[4] ; 139 $map['userType'] = $aUser[4] ;
139 $map['regi_type'] = $aUser[5] ; 140 $map['userTel'] = $aUser[5] ;
141 $map['deviceTypeID']= $aUeser[6];
140 } 142 }
141 $aUser = explode(chr(self::$spliter),$cookieStr); 143 $aUser = explode(chr(self::$spliter),$cookieStr);
142 144
143 $map['no'] = $aUser[0] ; 145 $map['no'] = $aUser[0] ;
144 $map['id'] = $aUser[1] ; 146 $map['id'] = $aUser[1] ;
145 $map['name'] = $aUser[2] ; 147 $map['pwd'] = $aUser[2] ;
146 $map['group_fk'] = $aUser[3] ; 148 $map['name'] = $aUser[3] ;
147 $map['member_type'] = $aUser[4] ; 149 $map['userType'] = $aUser[4] ;
148 $map["app_type"] = $aUser[5] ; 150 $map['userTel'] = $aUser[5] ;
149 $map['regi_type'] = $aUser[6] ; 151 $map['deviceTypeID']= $aUeser[6];
150 152
151 if( LoginUtil::isAppLogin() == false ) 153 if( LoginUtil::isAppLogin() == false )
152 { 154 {
......