diff --git a/modules/spamfilter/conf/module.xml b/modules/spamfilter/conf/module.xml index 1ca5b7b70..48f690204 100644 --- a/modules/spamfilter/conf/module.xml +++ b/modules/spamfilter/conf/module.xml @@ -20,12 +20,8 @@ - - - - diff --git a/modules/spamfilter/ruleset/deleteDeniedWord.xml b/modules/spamfilter/ruleset/deleteDeniedWord.xml index 37d3c4076..823954439 100644 --- a/modules/spamfilter/ruleset/deleteDeniedWord.xml +++ b/modules/spamfilter/ruleset/deleteDeniedWord.xml @@ -1,7 +1,7 @@ - + diff --git a/modules/spamfilter/ruleset/insertConfig.xml b/modules/spamfilter/ruleset/insertConfig.xml deleted file mode 100644 index 67fa08985..000000000 --- a/modules/spamfilter/ruleset/insertConfig.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/modules/spamfilter/ruleset/insertDeniedIp.xml b/modules/spamfilter/ruleset/insertDeniedIp.xml deleted file mode 100644 index 7af6f099f..000000000 --- a/modules/spamfilter/ruleset/insertDeniedIp.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/modules/spamfilter/ruleset/insertDeniedWord.xml b/modules/spamfilter/ruleset/insertDeniedWord.xml deleted file mode 100644 index 90345f73b..000000000 --- a/modules/spamfilter/ruleset/insertDeniedWord.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/modules/spamfilter/ruleset/insertSetting.xml b/modules/spamfilter/ruleset/insertSetting.xml index 8fcfb237f..fb23e85ad 100644 --- a/modules/spamfilter/ruleset/insertSetting.xml +++ b/modules/spamfilter/ruleset/insertSetting.xml @@ -2,9 +2,9 @@ - + - + diff --git a/modules/spamfilter/spamfilter.admin.controller.php b/modules/spamfilter/spamfilter.admin.controller.php index 266dbfc64..31d62a3fa 100644 --- a/modules/spamfilter/spamfilter.admin.controller.php +++ b/modules/spamfilter/spamfilter.admin.controller.php @@ -53,35 +53,7 @@ } return false; } - /**CUT! - * @brief Spam filter configurations - **/ - function procSpamfilterAdminInsertConfig() { - // Get the default information - $args = Context::gets('interval','limit_count','check_trackback'); - if($args->check_trackback!='Y') $args->check_trackback = 'N'; - // Create and insert the module Controller object - $oModuleController = &getController('module'); - $output = $oModuleController->insertModuleConfig('spamfilter',$args); - if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) { - $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminConfig'); - header('location:'.$returnUrl); - return; - } - return $output; - } - /** CUT! - * @brief Register the banned IP address - **/ - function procSpamfilterAdminInsertDeniedIP() { - $ipaddress = Context::get('ipaddress'); - $description = Context::get('description'); - - $oSpamfilterController = &getController('spamfilter'); - return $oSpamfilterController->insertIP($ipaddress, $description); - } - /** * @brief Delete the banned IP **/ @@ -96,20 +68,6 @@ return $output; } - /** CUT! - * @brief Register the prohibited word - **/ - function procSpamfilterAdminInsertDeniedWord() { - $word = Context::get('word'); - $output = $this->insertWord($word); - if($output->toBool() && !in_array(Context::getRequestMethod(),array('XMLRPC','JSON'))) { - $returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispSpamfilterAdminSetting'); - header('location:'.$returnUrl); - return; - } - return $output; - } - /** * @brief Delete the prohibited Word **/ diff --git a/modules/spamfilter/spamfilter.admin.view.php b/modules/spamfilter/spamfilter.admin.view.php index 6177bd521..507724481 100644 --- a/modules/spamfilter/spamfilter.admin.view.php +++ b/modules/spamfilter/spamfilter.admin.view.php @@ -33,7 +33,7 @@ Context::set('ip_list', $ip_list); Context::set('word_list', $word_list); // Set a template file - $this->setTemplateFile('spSpamFilter'); + $this->setTemplateFile('index'); } } ?> diff --git a/modules/spamfilter/tpl/denied_ip_list.html b/modules/spamfilter/tpl/denied_ip_list.html deleted file mode 100644 index 44ef138e5..000000000 --- a/modules/spamfilter/tpl/denied_ip_list.html +++ /dev/null @@ -1,60 +0,0 @@ - - - -
- - -
- - -
-

{$XE_VALIDATOR_MESSAGE}

-
-
- - - - - - - - - - - - - -
{$lang->denied_ip}
- -

{$lang->about_denied_ip}

-
{$lang->description}
- -
- -
-
- - - - - - - - - - - - - - - - - - - - - - - - -
Total{count($ip_list)}
{$lang->no}
{$lang->ipaddress}
{$lang->description}
{$lang->regdate}
{$lang->cmd_delete}
{count($ip_list)-$no}{$val->ipaddress}{$val->description}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
diff --git a/modules/spamfilter/tpl/denied_word_list.html b/modules/spamfilter/tpl/denied_word_list.html deleted file mode 100644 index 0a0b719eb..000000000 --- a/modules/spamfilter/tpl/denied_word_list.html +++ /dev/null @@ -1,57 +0,0 @@ - - - -
- - -
- - -
-

{$XE_VALIDATOR_MESSAGE}

-
-
- - - - - - - - - -
{$lang->word}
- -

{$lang->about_denied_word}

-
- -
-
- - - - - - - - - - - - - - - - - - - - - - - {@ $val->word = base64_encode($val->word);} - - - - -
Total {number_format($word_list)}
{$lang->no}
{$lang->word}
{$lang->hit}
{$lang->latest_hit}
{$lang->regdate}
{$lang->cmd_delete}
{count($word_list)-$no}{$val->word}{$val->hit}{zdate($val->latest_hit, 'Y-m-d')}{zdate($val->regdate,"Y-m-d")}{$lang->cmd_delete}
diff --git a/modules/spamfilter/tpl/header.html b/modules/spamfilter/tpl/header.html deleted file mode 100644 index 197d8fe09..000000000 --- a/modules/spamfilter/tpl/header.html +++ /dev/null @@ -1,11 +0,0 @@ - - -

{$lang->spamfilter} {$lang->cmd_management}

- -
- -
diff --git a/modules/spamfilter/tpl/index.html b/modules/spamfilter/tpl/index.html index 87a658d55..feaca2239 100644 --- a/modules/spamfilter/tpl/index.html +++ b/modules/spamfilter/tpl/index.html @@ -1,38 +1,70 @@ - + +
-
-

{$XE_VALIDATOR_MESSAGE}

+
+ + + + +
+
+ + + + +

Spam Filter

+
    +
  • +

    {$lang->cmd_interval}

    +

    + limits=='Y' || $config->limits =='')-->checked="checked" /> + + limits!='Y' && $config->limits !='')--> checked="checked" /> +

    +
  • +
  • +

    {$lang->cmd_check_trackback}

    +

    + check_trackback=='Y' || $config->check_trackback=='')--> checked="checked" /> + + check_trackback!='Y' && $config->check_trackback!='')--> checked="checked" / > +

    +
  • +
  • +

    {$lang->cmd_denied_ip}

    +
    +
      + +
    • {$ipListKey->ipaddress} // {$ipListKey->description} + {$lang->delete} +
    • + +
    +
    +

    + + + {$lang->about_denied_ip} +

    +
  • +
  • +

    +
    + +
    +

    + + + {$lang->about_denied_word} +

    +
  • +
+
+ +
+
-
- - - - - - - - - - - - - - - - - - -
{$lang->interval}
- {$lang->unit_sec} -

{$lang->about_interval}

-
{$lang->limit_count}
- -

{$lang->about_limit_count}

-
{$lang->check_trackback}
- check_trackback=='Y')-->checked="checked" /> -

{$lang->about_check_trackback}

-
- -
- -
diff --git a/modules/spamfilter/tpl/js/spamfilter_admin.js b/modules/spamfilter/tpl/js/spamfilter_admin.js index baba8f631..85a0a63ba 100644 --- a/modules/spamfilter/tpl/js/spamfilter_admin.js +++ b/modules/spamfilter/tpl/js/spamfilter_admin.js @@ -22,12 +22,21 @@ function doDeleteDeniedWord(word) { function doInsertDeniedSome(some){ var fo_obj = get_by_id('spamfilterInsert'); - fo_obj.flag.value = 'addsome'; + if(some == 'ipaddressList'){ + var reg = /^(\d{1,3}(?:.(\d{1,3}|\*)){3}\s*(\/\/[^\r\n]*)?[\r\n]*)*$/; + var matchStr = fo_obj.ipaddressList.value; fo_obj.wordList.value = ''; } else if(some == 'wordList'){ + var reg = /^(.{2,40}[\r\n]+)*.{2,40}$/; + var matchStr = fo_obj.wordList.value; fo_obj.ipaddressList.value = ''; } + + if(!matchStr.match(reg)){ + alert('형식에 맞게 입력하세요'); return false; + } + fo_obj.submit(); } diff --git a/modules/spamfilter/tpl/spSpamFilter.html b/modules/spamfilter/tpl/spSpamFilter.html deleted file mode 100644 index 903062e28..000000000 --- a/modules/spamfilter/tpl/spSpamFilter.html +++ /dev/null @@ -1,70 +0,0 @@ - -
- -
- - - - -
-
- - - - -

Spam Filter

-
    -
  • -

    {$lang->cmd_interval}

    -

    - limits=='Y')-->checked="checked" /> - - limits!='Y')--> checked="checked" /> -

    -
  • -
  • -

    {$lang->cmd_check_trackback}

    -

    - check_trackback=='Y')--> checked="checked" /> - - check_trackback!='Y')--> checked="checked" / > -

    -
  • -
  • -

    {$lang->cmd_denied_ip}

    -
    -
      - -
    • {$ipListKey->ipaddress} // {$ipListKey->description} - 삭제 -
    • - -
    -
    -

    - - - {$lang->about_denied_ip} -

    -
  • -
  • -

    -
    -
      - -
    • {$wordListKey->word} 삭제
    • - -
    -
    -

    - - - {$lang->about_denied_word} -

    -
  • -
-
- -
-
-