This commit is contained in:
2018-01-09 19:54:49 +09:00
commit 7b3201548a
518 changed files with 174188 additions and 0 deletions
+159
View File
@@ -0,0 +1,159 @@
function EntranceManage_Import() {
}
function EntranceManage_Init() {
$("#EntranceManage_0001").click(EntranceManage_Back);
$("#EntranceManage_000603").click(EntranceManage_ChangePw);
$("#EntranceManage_001600").attr("disabled", "true");
$("#EntranceManage_001601").change(EntranceManage_SelectIcon);
$("#EntranceManage_001602").click(EntranceManage_ChangeIcon);
$("#EntranceManage_001603").click(EntranceManage_DeleteIcon);
$("#EntranceManage_0019").click(EntranceManage_Quit);
if($.browser.mozilla == true) {
$("#EntranceManage_001601").css("left", "10px");
} else {
$("#EntranceManage_001600").show();
}
}
function EntranceManage_Update() {
Popup_Wait(function() {
PostJSON(
HOME+I+ENTRANCE+W+MANAGE+W+GET, {
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
EntranceManage_UpdateInfo(response);
Popup_WaitHide();
} else {
Popup_WaitShow("정보 로드 실패!");
}
}
)
});
}
function EntranceManage_Back() {
$("#EntranceManage_00").hide();
$("#Entrance_00").show();
Entrance_Update();
}
function EntranceManage_SelectIcon() {
$("#EntranceManage_001600").val($("#EntranceManage_001601").val());
}
function EntranceManage_UpdateInfo(member) {
$("#EntranceManage_0004").text(member.id);
$("#EntranceManage_0008").text(member.name);
$("#EntranceManage_0010").text(member.grade);
$("#EntranceManage_001500").attr("src", member.picture0);
$("#EntranceManage_001501").attr("src", member.picture1);
$("#EntranceManage_0020").html(member.donation);
}
function EntranceManage_ChangePw() {
var pw = $("#EntranceManage_000600").val();
var pw1 = $("#EntranceManage_000601").val();
var pw2 = $("#EntranceManage_000602").val();
if(pw.length < 4 || pw.length > 12) {
Popup_Alert("비밀번호 길이가 부적합합니다!", function() {
$("#EntranceManage_000600").val("");
$("#EntranceManage_000600").focus();
});
return false;
}
if(pw1.length < 4 || pw1.length > 12) {
Popup_Alert("비밀번호 길이가 부적합합니다!", function() {
$("#EntranceManage_000601").val("");
$("#EntranceManage_000601").focus();
});
return false;
}
if(pw1 != pw2) {
Popup_Alert("비밀번호가 일치하지 않습니다!", function() {
$("#EntranceManage_000601").val("");
$("#EntranceManage_000601").focus();
});
return false;
}
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
HOME+I+ENTRANCE+W+MANAGE+W+"password"+POST, {
pw: hex_md5(pw+""+pw),
newPw: hex_md5(pw1+""+pw1)
},
function(response, textStatus) {
Popup_WaitShow(response.msg, function() {
$("#EntranceManage_000600").val("");
$("#EntranceManage_000601").val("");
$("#EntranceManage_000602").val("");
});
}
)
})
});
}
function EntranceManage_ChangeIcon() {
if($("#EntranceManage_001601").val() == "") {
Popup_Alert("파일을 선택해 주세요!");
} else {
Popup_Wait(function() {
$("#formIcon").submit();
});
}
}
function EntranceManage_DeleteIcon() {
Popup_Confirm('정말 실행하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
HOME+I+ENTRANCE+W+MANAGE+W+"delete"+POST, {
},
function(response, textStatus) {
Popup_WaitShow(response.msg, function() {
EntranceManage_Update();
});
}
)
})
});
}
function EntranceManage_Quit() {
var pw = $("#EntranceManage_000600").val();
if(pw.length < 4 || pw.length > 12) {
Popup_Alert("현재 비밀번호를 입력해주세요.", function() {
$("#EntranceManage_000600").val("");
$("#EntranceManage_000600").focus();
});
return false;
}
Popup_Confirm('정말 탈퇴하시겠습니까?', function() {
Popup_Wait(function() {
PostJSON(
HOME+I+ENTRANCE+W+MANAGE+W+"quit"+POST, {
pw: hex_md5(pw+""+pw)
},
function(response, textStatus) {
if(response.result == "SUCCESS") {
Popup_WaitShow(response.msg, function() {
ReplaceFrame(HOME);
});
} else {
Popup_WaitShow(response.msg, function() {
EntranceManage_Update();
});
}
}
)
})
});
}
+56
View File
@@ -0,0 +1,56 @@
<?
require_once('_common.php');
?>
<div id="EntranceManage_00" class="bg0">
<div id="EntranceManage_0000" class="bg2 font4">계 정 관 리</div>
<input id="EntranceManage_0001" type="button" value="돌아가기">
<div id="EntranceManage_0002" class="bg1 font3">회 원 정 보</div>
<div id="EntranceManage_0003" class="bg1 font2">ID</div>
<div id="EntranceManage_0004"></div>
<input id="EntranceManage_0019" type="button" value="탈퇴신청">
<div id="EntranceManage_0005" class="bg1 font2">비밀번호</div>
<div id="EntranceManage_0006">
현재비번: <input id="EntranceManage_000600" type="password" maxlength="12">
바꿀비번: <input id="EntranceManage_000601" type="password" maxlength="12">
다시입력: <input id="EntranceManage_000602" type="password" maxlength="12">
<input id="EntranceManage_000603" type="button" value="비밀번호 변경">
</div>
<div id="EntranceManage_0007" class="bg1 font2">닉네임</div>
<div id="EntranceManage_0008"></div>
<div id="EntranceManage_0009" class="bg1 font2">등급</div>
<div id="EntranceManage_0010"></div>
<div id="EntranceManage_0011" class="bg1 font2">-</div>
<div id="EntranceManage_0012" class="bg1 font2">기존 / 신규</div>
<div id="EntranceManage_0013" class="bg1 font2">전용아이콘 올리기</div>
<div id="EntranceManage_0014" class="bg1 font2">전용사진</div>
<div id="EntranceManage_0015">
<img id="EntranceManage_001500">
<img id="EntranceManage_001501">
</div>
<div id="EntranceManage_0016">
<input id="EntranceManage_001600" type="text">
<form id="formIcon" action="<?=ROOT.W.I.ENTRANCE.W.MANAGE.W;?>iconPost.php" method="POST" enctype="multipart/form-data">
<input id="EntranceManage_001601" name="picture" type="file" size="15">
</form>
<input id="EntranceManage_001602" type="button" value="전콘변경">
<input id="EntranceManage_001603" type="button" value="전콘제거">
</div>
<div id="EntranceManage_0017" class="bg1 font2">도움말</div>
<div id="EntranceManage_0018">
<pre>jpg파일 64 x 64 크기만 가능합니다.
서버최적화를 위해 신규에서 기존으로 약 월1회 저장됩니다.
<font color=cyan>브라우저의 임시파일을 삭제하셔야 제대로 나옵니다.
새로 캐릭터를 생성할때부터 적용됩니다.</font>
<font color=magenta>탈퇴신청시 1개월간 정보가 보존되며,
1개월간 재가입이 불가능합니다.</font></pre>
</div>
<div id="EntranceManage_0020">
</div>
</div>
+78
View File
@@ -0,0 +1,78 @@
<?
// 외부 파라미터
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
$rs = $DB->Select('ID, NAME, GRADE, PICTURE', 'MEMBER', "NO='{$SESSION->NoMember()}'");
$member = $DB->Get($rs);
$response['id'] = $member['ID'];
$response['name'] = $member['NAME'];
if($member['GRADE'] == 6) {
$response['grade'] = '운영자';
} elseif($member['GRADE'] == 5) {
$response['grade'] = '부운영자';
} elseif($member['GRADE'] == 4) {
$response['grade'] = '특별회원';
} elseif($member['GRADE'] == 3) {
$response['grade'] = '참여회원';
} elseif($member['GRADE'] == 2) {
$response['grade'] = '참여회원';
} elseif($member['GRADE'] == 1) {
$response['grade'] = '일반회원';
} elseif($member['GRADE'] == 0) {
$response['grade'] = '블럭회원';
}
if($member['PICTURE'] == '') {
$response['picture0'] = IMAGE.W.'default.jpg';
$response['picture1'] = IMAGE.W.'default.jpg';
} else {
$response['picture0'] = IMAGE.W.$member['PICTURE'];
$response['picture1'] = '../d_pic/'.$member['PICTURE'];
}
$response['donation'] = '';
$rs = $DB->Select('DATE, AMOUNT, CUMUL', 'DONATION', "ID='{$member[ID]}'");
$count = $DB->Count($rs);
if($count > 0) {
$response['donation'] = '
<table id="EntranceManage_002000" class="bg0">
<th id="EntranceManage_00200000" class="bg2" colspan="4">참 여 기 록</th>
<tr>
<td class="EntranceManage_Sequence bg1">순번</td>
<td class="EntranceManage_Date bg1">일자</td>
<td class="EntranceManage_Amount bg1">금액</td>
<td class="EntranceManage_Cumul bg1">누적</td>
</tr>
';
$i = 1;
while($DB->HasNext($rs)) {
$donation = $DB->Next($rs);
$response['donation'] .= "
<tr>
<td class='EntranceManage_Sequence'>{$i}</td>
<td class='EntranceManage_Date'>{$donation['DATE']}</td>
<td class='EntranceManage_Amount'>{$donation['AMOUNT']}</td>
<td class='EntranceManage_Cumul'>{$donation['CUMUL']}</td>
</tr>
";
$i++;
}
$response['donation'] .= '
</table>
';
}
$response['result'] = 'SUCCESS';
sleep(1);
echo json_encode($response);
?>
+199
View File
@@ -0,0 +1,199 @@
@charset "utf-8";
#EntranceManage_00 {
width: 500px; height: 409px;
position: absolute;
top: 50px; left: 50%;
margin-left: -256px; /* DIV박스 크기의 1/2로 마진을 잡아줍니다. */
display: none;
z-index: 2;
}
#EntranceManage_0000 {
width: 498px; height: 50px;
position: absolute; top: 0px; left: 0px;
}
#EntranceManage_0001 {
width: 100px; height: 30px;
position: absolute; top: 10px; left: 350px;
}
#EntranceManage_0002 {
width: 498px; height: 25px;
position: absolute; top: 50px; left: 0px;
}
#EntranceManage_0003 {
width: 98px; height: 84px;
position: absolute; top: 75px; left: 0px;
line-height: 84px;
}
#EntranceManage_0004 {
width: 148px; height: 84px;
position: absolute; top: 75px; left: 100px;
line-height: 84px;
}
#EntranceManage_0005 {
width: 98px; height: 84px;
position: absolute; top: 75px; left: 250px;
line-height: 84px;
}
#EntranceManage_0006 {
width: 148px; height: 84px;
position: absolute; top: 75px; left: 350px;
text-align: left;
}
#EntranceManage_000600 {
width: 80px; height: 17px;
}
#EntranceManage_000601 {
width: 80px; height: 17px;
}
#EntranceManage_000602 {
width: 80px; height: 17px;
}
#EntranceManage_000603 {
width: 144px; height: 20px;
}
#EntranceManage_0007 {
width: 98px; height: 64px;
position: absolute; top: 159px; left: 0px;
line-height: 64px;
}
#EntranceManage_0008 {
width: 148px; height: 64px;
position: absolute; top: 159px; left: 100px;
line-height: 64px;
}
#EntranceManage_0009 {
width: 98px; height: 64px;
position: absolute; top: 159px; left: 250px;
line-height: 64px;
}
#EntranceManage_0010 {
width: 148px; height: 64px;
position: absolute; top: 159px; left: 350px;
line-height: 64px;
}
#EntranceManage_0011 {
width: 98px; height: 20px;
position: absolute; top: 223px; left: 0px;
}
#EntranceManage_0012 {
width: 148px; height: 20px;
position: absolute; top: 223px; left: 100px;
}
#EntranceManage_0013 {
width: 248px; height: 20px;
position: absolute; top: 223px; left: 250px;
}
#EntranceManage_0014 {
width: 98px; height: 64px;
position: absolute; top: 243px; left: 0px;
line-height: 64px;
}
#EntranceManage_0015 {
width: 148px; height: 64px;
position: absolute; top: 243px; left: 100px;
}
#EntranceManage_001500 {
width: 64px; height: 64px;
position: absolute; top: 0px; left: 0px;
}
#EntranceManage_001501 {
width: 64px; height: 64px;
position: absolute; top: 0px; left: 85px;
}
#EntranceManage_0016 {
width: 248px; height: 64px;
position: absolute; top: 243px; left: 250px;
}
#EntranceManage_001600 {
width: 100px; height: 16px;
position: absolute; top: 10px; left: 10px;
display: none;
}
#EntranceManage_001601 {
width: 70px; height: 20px;
position: absolute; top: 10px; left: 120px;
}
#EntranceManage_001602 {
width: 85px; height: 20px;
position: absolute; top: 35px; left: 10px;
}
#EntranceManage_001603 {
width: 85px; height: 20px;
position: absolute; top: 35px; left: 105px;
}
#EntranceManage_0017 {
width: 98px; height: 100px;
position: absolute; top: 307px; left: 0px;
line-height: 100px;
}
#EntranceManage_0018 {
width: 398px; height: 100px;
position: absolute; top: 307px; left: 100px;
text-align: left;
}
#EntranceManage_0019 {
width: 149px; height: 20px;
position: absolute; top: 139px; left: 101px;
}
#EntranceManage_0020 {
width: 500px; height: 20px;
position: absolute; top: 409px; left: -1px;
border: none;
}
#EntranceManage_002000 {
width: 500px;
position: absolute; top: 0px; left: 0px;
}
#EntranceManage_00200000 {
width: 498px; height: 20px;
}
.EntranceManage_Sequence {
width: 48px; height: 20px;
}
.EntranceManage_Date {
width: 148px; height: 20px;
}
.EntranceManage_Amount {
width: 148px; height: 20px;
}
.EntranceManage_Cumul {
width: 148px; height: 20px;
}
+8
View File
@@ -0,0 +1,8 @@
<?
define(ROOT, '../..');
require_once(ROOT.'/f_config/config.php');
require_once(ROOT.W.F_CONFIG.W.APP.PHP);
require_once(ROOT.W.F_FUNC.W.FUNC.PHP);
CustomHeader();
?>
+47
View File
@@ -0,0 +1,47 @@
<?
// 외부 파라미터
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
require_once(ROOT.W.F_CONFIG.W.'DBS'.PHP);
require_once(ROOT.W.F_CONFIG.W.SETTINGS.PHP);
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
$dest = ROOT.W.D."pic/pic_{$SESSION->NoMember()}.jpg";
$rs = $DB->Select('ID, PICTURE', 'MEMBER', "NO='{$SESSION->NoMember()}'");
$member = $DB->Get($rs);
$dt = substr($member['PICTURE'], -8);
$rf = date('Ymd');
$response['result'] = 'FAIL';
$response['msg'] = '요청이 올바르지 않습니다!';
if($dt == $rf) {
//갱신날짜 검사
$response['msg'] = '1일 1회 변경 가능합니다!';
$response['result'] = 'FAIL';
} else {
$DB->Update('MEMBER', "PICTURE='', IMGSVR=0", "NO='{$SESSION->NoMember()}'");
@unlink($dest);
for($i=0; $i < $_serverCount; $i++) {
if($SETTINGS[$i]->IsExist()) {
$rs = $DBS[$i]->Select('IMG', 'game', "NO='1'");
$game = $DBS[$i]->Get($rs);
if($game['IMG'] > 0) {
// 엔장선택 제외하고 업데이트
$DBS[$i]->Update('general', "PICTURE='default.jpg', IMGSVR=0", "NPC=0 AND USER_ID='{$member['ID']}'");
}
}
}
$response['msg'] = '제거에 성공했습니다!';
$response['result'] = 'SUCCESS';
}
sleep(1);
echo json_encode($response);
?>
+79
View File
@@ -0,0 +1,79 @@
<?
// 외부 파라미터
// $_FILES['picture'] : 사진파일
require_once('_common.php');
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
require_once(ROOT.W.F_CONFIG.W.'DBS'.PHP);
require_once(ROOT.W.F_CONFIG.W.SETTINGS.PHP);
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
$image = $_FILES['picture'];
$ext = strrchr($image['name'], ".");
$size = getImageSize($image['tmp_name']);
$dest = ROOT.W.D."pic/pic_{$SESSION->NoMember()}.jpg";
$rs = $DB->Select('ID, PICTURE', 'MEMBER', "NO='{$SESSION->NoMember()}'");
$member = $DB->Get($rs);
$dt = substr($member['PICTURE'], -8);
$rf = date('Ymd');
$response['result'] = 'FAIL';
$response['msg'] = '요청이 올바르지 않습니다!';
if(!is_uploaded_file($image['tmp_name'])) {
//진짜 전송된 파일인지 검증
$response['msg'] = '업로드가 되지 않았습니다!';
$response['result'] = 'FAIL';
} elseif($ext != '.jpg' && $ext != '.JPG') {
//확장자 검사
$response['msg'] = '잘못된 확장자입니다!';
$response['result'] = 'FAIL';
} elseif($image['type'] != 'image/jpg' && $image['type'] != 'image/jpeg' && $image['type'] != 'image/pjpeg') {
//파일종류 검사
$response['msg'] = 'jpg 파일이 아닙니다!';
$response['result'] = 'FAIL';
} elseif($image['size'] > 10000) {
//파일크기 검사
$response['msg'] = '10kb 이하로 올려주세요!';
$response['result'] = 'FAIL';
} elseif($size[0] != 64 || $size[1] != 64) {
//이미지크기 검사
$response['msg'] = '64x64 크기로 올려주세요!';
$response['result'] = 'FAIL';
} elseif($dt == $rf) {
//갱신날짜 검사
$response['msg'] = '1일 1회 변경 가능합니다!';
$response['result'] = 'FAIL';
} else {
//이미지 저장
if(!move_uploaded_file($image['tmp_name'], $dest)) {
$response['msg'] = '업로드에 실패했습니다!';
$response['result'] = 'FAIL';
} else {
$pic = 'pic_'.$SESSION->NoMember().".jpg?={$rf}";
$DB->Update('MEMBER', "PICTURE='{$pic}', IMGSVR=1", "NO='{$SESSION->NoMember()}'");
for($i=0; $i < $_serverCount; $i++) {
if($SETTINGS[$i]->IsExist()) {
$rs = $DBS[$i]->Select('IMG', 'game', "NO='1'");
$game = $DBS[$i]->Get($rs);
if($game['IMG'] > 0) {
// 엔장선택 제외하고 업데이트
$DBS[$i]->Update('general', "PICTURE='{$pic}', IMGSVR=1", "NPC=0 AND USER_ID='{$member['ID']}'");
}
}
}
$response['msg'] = '업로드에 성공했습니다!';
$response['result'] = 'SUCCESS';
}
}
sleep(1);
echo "<script type='text/javascript'>
alert('{$response['msg']}');
location.replace('".ROOT.W.I.ENTRANCE.W.ENTRANCE.PHP."');
</script>";
?>
+39
View File
@@ -0,0 +1,39 @@
<?
// 외부 파라미터
// $_POST['pw'] : PW
// $_POST['newPw'] : 새 PW
$pw = $_POST['pw'];
$newPw = $_POST['newPw'];
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
require_once(ROOT.W.F_CONFIG.W.'DBS'.PHP);
require_once(ROOT.W.F_CONFIG.W.SETTINGS.PHP);
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
$response['result'] = 'FAIL';
$rs = $DB->Select('ID, PW', 'MEMBER', "NO='{$SESSION->NoMember()}'");
$member = $DB->Get($rs);
if($member['PW'] != $pw) {
$response['result'] = 'FAIL';
$response['msg'] = '실패: 현재 비밀번호가 일치하지 않습니다.';
} else {
$DB->Update('MEMBER', "PW='{$newPw}'", "NO='{$SESSION->NoMember()}'");
for($i=0; $i < $_serverCount; $i++) {
if($SETTINGS[$i]->IsExist()) {
$DBS[$i]->Update('general', "PASSWORD='{$newPw}'", "USER_ID='{$member['ID']}'");
}
}
$response['result'] = 'SUCCESS';
$response['msg'] = "정상적으로 비밀번호가 수정되었습니다.";
}
sleep(1);
echo json_encode($response);
?>
+36
View File
@@ -0,0 +1,36 @@
<?
// 외부 파라미터
// $_POST['pw'] : PW
$pw = $_POST['pw'];
require_once('_common.php');
require_once(ROOT.W.F_FUNC.W.'class._JSON.php');
require_once(ROOT.W.F_FUNC.W.'class._Time.php');
require_once(ROOT.W.F_CONFIG.W.DB.PHP);
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
$response['result'] = 'FAIL';
$rs = $DB->Select('PW', 'MEMBER', "NO='{$SESSION->NoMember()}'");
$member = $DB->Get($rs);
if($member['PW'] != $pw) {
$response['result'] = 'FAIL';
$response['msg'] = '실패: 현재 비밀번호가 일치하지 않습니다.';
} else {
$DB->UpdateArray('MEMBER', array(
QUIT => 'Y',
REG_DATE=> _Time::DatetimeNow()
), "NO='{$SESSION->NoMember()}'");
$SESSION->Logout();
$response['result'] = 'SUCCESS';
$response['msg'] = "정상적으로 탈퇴신청 되었습니다.";
}
sleep(1);
echo json_encode($response);
?>