[제나플러스] 불량키워드 삭제하기 > 팁앤테크

본문 바로가기

사이트 내 전체검색

뒤로가기 팁앤테크

[제나플러스] 불량키워드 삭제하기

본문

<?
$g4_path = ".";
include_once("$g4_path/_common.php");
include_once("$g4[path]/_head.php");
$date = "7"; // 날짜 지정

$g4[title] = "키워드삭제";

// 수동 삭제
if ($type == 'del') {
// 최고 관리자만
if ($is_admin != 'super') {
alert("잘못된 접근입니다.");
} else {
// 삭제
$sql = " delete from $g4[popular_table] where pp_ip = '$ip' ";
sql_query($sql);

goto_url("./keyword.php");
}
} else {
// 한글이 아닐 때 삭제
$to_date = date("Y-m-d H:i:s"); //오늘 날짜
$fr_date = date("Y-m-d H:i:s", strtotime($to_date) - ($date * 86400));

$sql = " select *, count(*) as cnt from $g4[popular_table]
          where pp_date between '$fr_date' and '$to_date'
group by pp_word
order by cnt desc, pp_word
limit 1000 ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {

// 넘버
$num = $i + 1;

if (!check_string($row[pp_word], _G4_HANGUL_ + _G4_ALPHABETIC_ + _G4_NUMERIC_)) {
//if (!check_string($row[pp_word], _G4_HANGUL_ )) {
//echo $num." <font color='red'>[D] ".$row[pp_word]." ($row[cnt])</font><p>";

$sql2 = " delete from $g4[popular_table] where pp_id = '{$row[pp_id]}' ";
sql_query($sql2);

}
else if (!cut_hangul_last($row[pp_word])) {
//echo $num." <font color='red'>[D] ".$row[pp_word]." ($row[cnt])</font><p>";

$sql3 = " delete from $g4[popular_table] where pp_id = '{$row[pp_id]}' ";
sql_query($sql3);

} else {
echo $num." <a href='?type=del&ip={$row[pp_ip]}'>".$row[pp_word]."</a> ($row[cnt])<p>";
}

}


// 키워드 삭제
$sql0 = " delete from $g4[popular_table] where pp_word LIKE '%가슴%'
or pp_word LIKE '%노출%'
or pp_word LIKE '%음란%'
or pp_word LIKE '%야사%'
or pp_word LIKE '%admin%'
";
sql_query($sql0);

}
include_once("$g4[path]/_tail.php");
?>
추천0

댓글목록 0

등록된 댓글이 없습니다.

전체 825건 11 페이지
게시물 검색
Copyright (c) 株式会社YHPLUS. All rights reserved.

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒171-0014 東京都豊島区池袋2-41-5 アーバン154 8F
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

PC 버전으로 보기