내 정보 관리 새로 구현

- 비밀번호 수정,
- 전콘 제거, 전콘 변경 기능 추가
This commit is contained in:
2018-03-20 02:59:40 +09:00
parent b27562613e
commit f3d7a6a1a7
20 changed files with 893 additions and 368 deletions
+43
View File
@@ -0,0 +1,43 @@
<?php
include('lib.php');
include('func.php');
$userID = getUserID();
$generalID = getGeneralID();
session_write_close();
if(!$userID){
returnJson([
'result'=>false,
'reason'=>'로그인되지 않았습니다.'
]);
}
if(!$generalID){
returnJson([
'result'=>false,
'reason'=>'장수를 생성하지 않았습니다.'
]);
}
$rootDB = getRootDB();
$db = getDB();
$image = $rootDB->queryFirstRow('SELECT picture, imgsvr FROM `MEMBER` WHERE no = %i', $userID);
if(!$image){
returnJson([
'result'=>false,
'reason'=>'회원 기록 정보가 없습니다'
]);
}
$db->update('general', [
'picture'=>$image['picture'],
'imgsvr'=>$image['imgsvr']
], 'owner = %i and npc = 0', $userID);
returnJson([
'result'=>true,
'reason'=>'success'
]);