AvocadoAmber/AvocadoEdition_Light/adm/visit_delete.php

115 lines
3.1 KiB
PHP
Raw Normal View History

2022-09-17 20:50:50 +09:00
<?php
$sub_menu = "200820";
2024-09-23 11:07:19 +09:00
include_once "./_common.php";
2022-09-17 20:50:50 +09:00
auth_check($auth[$sub_menu], 'r');
$g5['title'] = '접속자로그삭제';
2024-09-23 11:07:19 +09:00
include_once "./admin.head.php";
2022-09-17 20:50:50 +09:00
// 최소년도 구함
2024-09-30 01:58:32 +09:00
$sql = "SELECT min(vi_date) as min_date FROM {$g5['visit_table']} ";
2022-09-17 20:50:50 +09:00
$row = sql_fetch($sql);
2024-09-19 20:57:39 +09:00
$min_year = (int) substr($row['min_date'], 0, 4);
$now_year = (int) substr(G5_TIME_YMD, 0, 4);
2022-09-17 20:50:50 +09:00
?>
<div class="local_ov01 local_ov">
2024-09-19 20:57:39 +09:00
접속자 로그를 삭제할 년도와 방법을 선택해주십시오.
2022-09-17 20:50:50 +09:00
</div>
2024-09-19 20:57:39 +09:00
<form name="fvisitdelete" class="local_sch02 local_sch" method="post" action="./visit_delete_update.php"
onsubmit="return form_submit(this);">
<div class="tbl_frm01 tbl_wrap">
<table>
<caption></caption>
<colgroup>
<col style="width: 130px;">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">일자선택</th>
<td>
<select name="year" id="year">
<option value="">년도선택</option>
<?php
for ($year = $min_year; $year <= $now_year; $year++) {
?>
<option value="<?php echo $year; ?>"><?php echo $year; ?></option>
<?php
}
?>
</select>
&nbsp;&nbsp;&nbsp;
<select name="month" id="month">
<option value="">월선택</option>
<?php
for ($i = 1; $i <= 12; $i++) {
?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<th scope="row">삭제방법선택</th>
<td>
<select name="method" id="method">
<option value="before">선택년월 이전 자료삭제</option>
<option value="specific">선택년월의 자료삭제</option>
</select>
</td>
</tr>
<tr>
<th scope="row">관리자 비밀번호</th>
<td>
<input type="password" name="pass" id="pass" class="frm_input required">
</td>
</tr>
</tbody>
</table>
</div>
<div class="btn_confirm01 btn_confirm">
<div class="btn">
<span class="material-icons">save</span>
<input type="submit" value="확인" class="btn_submit" accesskey="s">
</div>
</div>
2022-09-17 20:50:50 +09:00
</form>
<script>
2024-09-19 20:57:39 +09:00
function form_submit(f) {
var year = $("#year").val();
var month = $("#month").val();
var method = $("#method").val();
var pass = $("#pass").val();
if (!year) {
alert("년도를 선택해 주십시오.");
return false;
}
if (!month) {
alert("월을 선택해 주십시오.");
return false;
}
if (!pass) {
alert("관리자 비밀번호를 입력해 주십시오.");
return false;
}
var msg = year + "" + month + "";
if (method == "before")
msg += " 이전";
else
msg += "";
msg += " 자료를 삭제하시겠습니까?";
return confirm(msg);
}
2022-09-17 20:50:50 +09:00
</script>
<?php
2024-09-23 11:07:19 +09:00
include_once "./admin.tail.php";