Merge branch 'master' of github.com:gnuboard/g4s
This commit is contained in:
@ -7,8 +7,17 @@ if ($is_admin != "super")
|
||||
|
||||
$g4['title'] = "세션파일 일괄삭제";
|
||||
include_once("./admin.head.php");
|
||||
echo "'완료' 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.<br><br>";
|
||||
echo "<span id='ct'></span>";
|
||||
?>
|
||||
|
||||
<div id="session_del">
|
||||
<p>
|
||||
완료 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
|
||||
<p>
|
||||
<span id="ct">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<?
|
||||
include_once("./admin.tail.php");
|
||||
flush();
|
||||
|
||||
@ -19,28 +28,28 @@ if (!$dir=@opendir($session_path)) {
|
||||
|
||||
$cnt=0;
|
||||
while($file=readdir($dir)) {
|
||||
|
||||
|
||||
if (!strstr($file,'sess_')) {
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strpos($file,'sess_')!=0) {
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!$atime=@fileatime("$session_path/$file")) {
|
||||
continue;
|
||||
}
|
||||
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||
if (!$atime=@fileatime("$session_path/$file")) {
|
||||
continue;
|
||||
}
|
||||
if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
|
||||
$cnt++;
|
||||
$return = unlink("$session_path/$file");
|
||||
echo "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
|
||||
$return = unlink("$session_path/$file");
|
||||
echo "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
|
||||
|
||||
flush();
|
||||
|
||||
if ($cnt%10==0)
|
||||
echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
echo "<script>document.getElementById('ct').innerHTML += '<br><br>세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||
?>
|
||||
echo "<script>document.getElementById('ct').innerHTML += '세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user