git subtree merge를 위한 g4s_branch 및 서브트리 생성

This commit is contained in:
chicpro
2013-04-26 15:21:39 +09:00
parent f7247c0050
commit da91511e5f
711 changed files with 94885 additions and 0 deletions

33
g4s/bbs/filter.ajax.php Normal file
View File

@ -0,0 +1,33 @@
<?php
include_once('./_common.php');
header("Content-Type: text/html; charset=utf-8");
$subject = strtolower($_POST['subject']);
$content = strtolower(strip_tags($_POST['content']));
//$filter = explode(",", strtolower(trim($config['cf_filter'])));
// strtolower 에 의한 한글 변형으로 아래 코드로 대체 (곱슬최씨님이 알려 주셨습니다.)
$filter = explode(",", trim($config['cf_filter']));
for ($i=0; $i<count($filter); $i++) {
$str = $filter[$i];
// 제목 필터링 (찾으면 중지)
$subj = "";
$pos = strpos($subject, $str);
if ($pos !== false) {
$subj = $str;
break;
}
// 내용 필터링 (찾으면 중지)
$cont = "";
$pos = strpos($content, $str);
if ($pos !== false) {
$cont = $str;
break;
}
}
die("{\"subject\":\"$subj\",\"content\":\"$cont\"}");
?>