Merge branch 'devel' of https://storage.hided.net/gogs/hide_d/tm_sam into devel
This commit is contained in:
@@ -5,11 +5,33 @@ function Entrance_AdminInit() {
|
||||
$("#Entrance_000201").click(Entrance_Donation);
|
||||
$("#Entrance_000202").click(Entrance_Member);
|
||||
$("#Entrance_000204").click(Entrance_AdminChangeNotice);
|
||||
$("#Entrance_000205").click(Entrance_IconScrub);
|
||||
}
|
||||
|
||||
function Entrance_AdminUpdate() {
|
||||
}
|
||||
|
||||
function Entrance_IconScrub(){
|
||||
Popup_Confirm('사용하지 않는 전콘 중 등록된지 2개월이 지난 것들을 삭제합니다.', function() {
|
||||
Popup_Wait(function() {
|
||||
PostJSON(
|
||||
HOME+I+ENTRANCE+W+'iconScrub.php', {
|
||||
action: 0,
|
||||
notice: notice
|
||||
},
|
||||
function(response, textStatus) {
|
||||
if(response.result == "SUCCESS") {
|
||||
Popup_WaitHide();
|
||||
Replace(ENTRANCE+PHP);
|
||||
} else {
|
||||
Popup_WaitShow(response.msg);
|
||||
}
|
||||
}
|
||||
)
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
function Entrance_Donation() {
|
||||
$("#Entrance_00").hide();
|
||||
$("#EntranceDonation_00").show();
|
||||
|
||||
@@ -17,6 +17,7 @@ Entrance_AdminUpdate();
|
||||
<div id="Entrance_000200" class="bg2">회 원 관 리</div>
|
||||
<input id="Entrance_000201" type="button" value="참 여 기 록">
|
||||
<input id="Entrance_000202" type="button" value="회 원 관 리">
|
||||
<input id="Entrance_000205" type="button" value="전 콘 정 리">
|
||||
<input id="Entrance_000203" type="text" value="<?=$system['NOTICE'];?>">
|
||||
<input id="Entrance_000204" type="button" value="공 지 변 경">
|
||||
</div>
|
||||
|
||||
@@ -12,13 +12,18 @@
|
||||
}
|
||||
|
||||
#Entrance_000201 {
|
||||
width: 200px; height: 50px;
|
||||
position: absolute; top: 65px; left: 150px;
|
||||
width: 160px; height: 50px;
|
||||
position: absolute; top: 65px; left: 120px;
|
||||
}
|
||||
|
||||
#Entrance_000202 {
|
||||
width: 200px; height: 50px;
|
||||
position: absolute; top: 65px; left: 450px;
|
||||
width: 160px; height: 50px;
|
||||
position: absolute; top: 65px; left: 320px;
|
||||
}
|
||||
|
||||
#Entrance_000205 {
|
||||
width: 160px; height: 50px;
|
||||
position: absolute; top: 65px; left: 520px;
|
||||
}
|
||||
|
||||
#Entrance_000203 {
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
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.SETTINGS.PHP);
|
||||
require_once(ROOT.W.F_CONFIG.W.SESSION.PHP);
|
||||
|
||||
$rs = $DB->Select('GRADE', 'MEMBER', "NO='{$SESSION->NoMember()}'");
|
||||
$member = $DB->Get($rs);
|
||||
if($member['GRADE'] < 6) {
|
||||
$response['result'] = 'FAIL';
|
||||
$response['msg'] = '운영자 권한이 없습니다.';
|
||||
sleep(1);
|
||||
echo json_encode($response);
|
||||
}
|
||||
|
||||
|
||||
$targetTime = strtotime("-1 month");
|
||||
|
||||
$picDir = ROOT.W.D.'pic';
|
||||
|
||||
$usedImg = [];
|
||||
|
||||
$imgResult = $DB->Select('PICTURE', 'MEMBER', 'IMGSVR=1');
|
||||
foreach($DB->GetAll($imgResult) as $row){
|
||||
$imgname = $row['PICTURE'];
|
||||
if(strlen($imgname)<(1+1+3+2+8)){ //*.jpg?=YYYYMMDD
|
||||
continue;
|
||||
}
|
||||
$imgname = substr($imgname, 0, strlen($imgname)-10);
|
||||
$usedImg[$imgname] = true;
|
||||
}
|
||||
|
||||
foreach(glob($picDir."/*.{jpg,png,gif}", GLOB_BRACE) as $filepath){
|
||||
$filename = basename($filepath);
|
||||
|
||||
if (array_key_exists($filename, $usedImg)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$mtime = filemtime($filepath);
|
||||
if($mtime > $targetTime){
|
||||
continue;
|
||||
}
|
||||
|
||||
@unlink($filepath);
|
||||
}
|
||||
|
||||
sleep(1);
|
||||
echo json_encode(['result'=>'SUCCESS']);
|
||||
@@ -44,7 +44,7 @@ require_once('_common.php');
|
||||
|
||||
<div id="EntranceManage_0017" class="bg1 font2">도움말</div>
|
||||
<div id="EntranceManage_0018">
|
||||
<pre>jpg파일 64 x 64 크기만 가능합니다.
|
||||
<pre>jpg, gif, png 파일 64 x 64 크기만 가능합니다.
|
||||
서버최적화를 위해 신규에서 기존으로 약 월1회 저장됩니다.
|
||||
<font color=cyan>브라우저의 임시파일을 삭제하셔야 제대로 나옵니다.
|
||||
새로 캐릭터를 생성할때부터 적용됩니다.</font>
|
||||
|
||||
@@ -34,9 +34,6 @@ if($dt == $rf) {
|
||||
$response['result'] = 'FAIL';
|
||||
} else {
|
||||
$DB->Update('MEMBER', "PICTURE='', IMGSVR=0", "NO='{$SESSION->NoMember()}'");
|
||||
if(file_exists($dest)){
|
||||
@unlink($dest);
|
||||
}
|
||||
|
||||
for($i=0; $i < $_serverCount; $i++) {
|
||||
if($SETTINGS[$i]->IsExist()) {
|
||||
|
||||
@@ -74,9 +74,6 @@ if(!is_uploaded_file($image['tmp_name'])) {
|
||||
$response['msg'] = '업로드에 실패했습니다!';
|
||||
$response['result'] = 'FAIL';
|
||||
} else {
|
||||
if(file_exists($old_path)){
|
||||
@unlink($old_path);
|
||||
}
|
||||
$pic = "{$newPicName}?={$rf}";
|
||||
$DB->Update('MEMBER', "PICTURE='{$pic}', IMGSVR=1", "NO='{$SESSION->NoMember()}'");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user