전콘 갱신시 자동 삭제 기능을 제거하고, 운영자 모드에서 전콘 정리 기능으로 대체
This commit is contained in:
@@ -5,11 +5,33 @@ function Entrance_AdminInit() {
|
|||||||
$("#Entrance_000201").click(Entrance_Donation);
|
$("#Entrance_000201").click(Entrance_Donation);
|
||||||
$("#Entrance_000202").click(Entrance_Member);
|
$("#Entrance_000202").click(Entrance_Member);
|
||||||
$("#Entrance_000204").click(Entrance_AdminChangeNotice);
|
$("#Entrance_000204").click(Entrance_AdminChangeNotice);
|
||||||
|
$("#Entrance_000205").click(Entrance_IconScrub);
|
||||||
}
|
}
|
||||||
|
|
||||||
function Entrance_AdminUpdate() {
|
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() {
|
function Entrance_Donation() {
|
||||||
$("#Entrance_00").hide();
|
$("#Entrance_00").hide();
|
||||||
$("#EntranceDonation_00").show();
|
$("#EntranceDonation_00").show();
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ Entrance_AdminUpdate();
|
|||||||
<div id="Entrance_000200" class="bg2">회 원 관 리</div>
|
<div id="Entrance_000200" class="bg2">회 원 관 리</div>
|
||||||
<input id="Entrance_000201" type="button" value="참 여 기 록">
|
<input id="Entrance_000201" type="button" value="참 여 기 록">
|
||||||
<input id="Entrance_000202" 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_000203" type="text" value="<?=$system['NOTICE'];?>">
|
||||||
<input id="Entrance_000204" type="button" value="공 지 변 경">
|
<input id="Entrance_000204" type="button" value="공 지 변 경">
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,13 +12,18 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_000201 {
|
#Entrance_000201 {
|
||||||
width: 200px; height: 50px;
|
width: 160px; height: 50px;
|
||||||
position: absolute; top: 65px; left: 150px;
|
position: absolute; top: 65px; left: 120px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_000202 {
|
#Entrance_000202 {
|
||||||
width: 200px; height: 50px;
|
width: 160px; height: 50px;
|
||||||
position: absolute; top: 65px; left: 450px;
|
position: absolute; top: 65px; left: 320px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#Entrance_000205 {
|
||||||
|
width: 160px; height: 50px;
|
||||||
|
position: absolute; top: 65px; left: 520px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#Entrance_000203 {
|
#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']);
|
||||||
@@ -34,9 +34,6 @@ if($dt == $rf) {
|
|||||||
$response['result'] = 'FAIL';
|
$response['result'] = 'FAIL';
|
||||||
} else {
|
} else {
|
||||||
$DB->Update('MEMBER', "PICTURE='', IMGSVR=0", "NO='{$SESSION->NoMember()}'");
|
$DB->Update('MEMBER', "PICTURE='', IMGSVR=0", "NO='{$SESSION->NoMember()}'");
|
||||||
if(file_exists($dest)){
|
|
||||||
@unlink($dest);
|
|
||||||
}
|
|
||||||
|
|
||||||
for($i=0; $i < $_serverCount; $i++) {
|
for($i=0; $i < $_serverCount; $i++) {
|
||||||
if($SETTINGS[$i]->IsExist()) {
|
if($SETTINGS[$i]->IsExist()) {
|
||||||
|
|||||||
@@ -74,9 +74,6 @@ if(!is_uploaded_file($image['tmp_name'])) {
|
|||||||
$response['msg'] = '업로드에 실패했습니다!';
|
$response['msg'] = '업로드에 실패했습니다!';
|
||||||
$response['result'] = 'FAIL';
|
$response['result'] = 'FAIL';
|
||||||
} else {
|
} else {
|
||||||
if(file_exists($old_path)){
|
|
||||||
@unlink($old_path);
|
|
||||||
}
|
|
||||||
$pic = "{$newPicName}?={$rf}";
|
$pic = "{$newPicName}?={$rf}";
|
||||||
$DB->Update('MEMBER', "PICTURE='{$pic}', IMGSVR=1", "NO='{$SESSION->NoMember()}'");
|
$DB->Update('MEMBER', "PICTURE='{$pic}', IMGSVR=1", "NO='{$SESSION->NoMember()}'");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user