충돌 수정

This commit is contained in:
thisgun
2019-01-07 14:36:43 +09:00
11 changed files with 70 additions and 7 deletions

View File

@ -379,6 +379,47 @@ function get_sanitize_input($s, $is_html=false){
return $s;
}
function check_log_folder($log_path){
if( is_writable($log_path) ){
// 아파치 서버인 경우 웹에서 해당 폴더 접근 막기
$htaccess_file = $log_path.'/.htaccess';
if ( !file_exists( $htaccess_file ) ) {
if ( $handle = @fopen( $htaccess_file, 'w' ) ) {
fwrite( $handle, 'Order deny,allow' . "\n" );
fwrite( $handle, 'Deny from all' . "\n" );
fclose( $handle );
}
}
// 아파치 서버인 경우 해당 디렉토리 파일 목록 안보이게 하기
$index_file = $log_path . '/index.php';
if ( !file_exists( $index_file ) ) {
if ( $handle = @fopen( $index_file, 'w' ) ) {
fwrite( $handle, '' );
fclose( $handle );
}
}
}
// txt 파일과 log 파일을 조회하여 30일이 지난 파일은 삭제합니다.
$txt_files = glob($log_path.'/*.txt');
$log_files = glob($log_path.'/*.log');
$del_files = array_merge($txt_files, $log_files);
if( $del_files && is_array($del_files) ){
foreach ($del_files as $del_file) {
$filetime = filemtime($del_file);
// 30일이 지난 파일을 삭제
if($filetime && $filetime < (G5_SERVER_TIME - 2592000)) {
@unlink($del_file);
}
}
}
}
// POST로 넘어온 토큰과 세션에 저장된 토큰 비교
function check_admin_token()
{

View File

@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "r");
if(!count($_POST['chk_fg_no']))
alert('이모티콘을 이동할 그룹을 한개 이상 선택해 주십시오.', $url);
$fo_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $fo_no_list);
$sql = "select * from {$g5['sms5_form_table']} where fo_no in ($fo_no_list) order by fo_no desc ";
$result = sql_query($sql);
$save = array();

View File

@ -16,6 +16,10 @@ if ($st && trim($sv))
else
$sql_search = "";
if( isset($st) && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
$st = '';
}
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_history_table']} where 1 $sql_search");
$total_count = $total_res['cnt'];

View File

@ -8,6 +8,10 @@ $colspan = 10;
$st = isset($st) ? strip_tags($st) : '';
$ssv = isset($ssv) ? strip_tags($ssv) : '';
if( $st && !in_array($st, array('hs_name', 'hs_hp', 'bk_no')) ){
$st = '';
}
auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 상세내역";

View File

@ -31,8 +31,8 @@ for ($i=0; $row=sql_fetch_array($result); $i++)
<form name="fboardmoveall" method="post" action="./number_move_update.php" onsubmit="return fboardmoveall_submit(this);">
<input type="hidden" name="sw" value="<?php echo $sw ?>">
<input type="hidden" name="bk_no_list" value="<?php echo $bk_no_list ?>">
<input type="hidden" name="act" value="<?php echo $act ?>">
<input type="hidden" name="bk_no_list" value="<?php echo get_sanitize_input($bk_no_list); ?>">
<input type="hidden" name="act" value="<?php echo get_sanitize_input($act); ?>">
<input type="hidden" name="url" value="<?php echo clean_xss_tags(strip_tags($_SERVER['HTTP_REFERER'])); ?>">
<div class=" new_win_con">
<div class="tbl_head01 tbl_wrap">

View File

@ -6,6 +6,8 @@ auth_check($auth[$sub_menu], "r");
if(!count($_POST['chk_bg_no']))
alert('번호를 '.$act.'할 그룹을 한개 이상 선택해 주십시오.', $url);
$bk_no_list = preg_replace('/[^a-zA-Z0-9\, ]/', '', $bk_no_list);
$sql = "select * from {$g5['sms5_book_table']} where bk_no in ($bk_no_list) order by bk_no desc ";
$result = sql_query($sql);
$save = array();