コード例 #1
0
ファイル: antispam.php プロジェクト: toxalot/dolphin.pro
    case isset($_POST['adm-dnsbl-deactivate']):
        foreach ($_POST['rules'] as $iRuleId) {
            db_res("UPDATE `sys_dnsbl_rules` SET `active` = 0 WHERE `id` = " . (int) $iRuleId);
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
    case isset($_POST['adm-dnsbl-delete']):
        foreach ($_POST['rules'] as $iRuleId) {
            db_res("DELETE FROM `sys_dnsbl_rules` WHERE `id` = " . (int) $iRuleId);
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
    case isset($_GET['action']) && 'dnsbl_add' == $_GET['action'] && $_POST['dnsbl_add']:
        $oForm = new BxDolAdmFormDnsblAdd(array(), bx_get('mode'));
        $oForm->initChecker();
        if ($oForm->isSubmittedAndValid() && $oForm->insert(array('added' => time()))) {
            $sGlMsg = MsgBox(_t('_sys_sucess_result'));
        } else {
            $sGlMsg = MsgBox(_t('_Error Occured'));
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
}
$aPages = array('dnsbl' => array('option' => 'sys_dnsbl_enable', 'title' => _t('_sys_adm_page_cpt_dnsbl'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=dnsbl', 'func' => 'PageCodeDNSBL', 'func_params' => array(array(BX_DOL_DNSBL_CHAIN_SPAMMERS, BX_DOL_DNSBL_CHAIN_WHITELIST), 'dnsbl')), 'dnsbluri' => array('option' => 'sys_uridnsbl_enable', 'title' => _t('_sys_adm_page_cpt_uridnsbl'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=dnsbluri', 'func' => 'PageCodeDNSBL', 'func_params' => array(array(BX_DOL_DNSBL_CHAIN_URIDNS), 'dnsbluri')), 'akismet' => array('option' => 'sys_akismet_enable', 'title' => _t('_sys_adm_page_cpt_akismet'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=akismet', 'func' => 'PageCodeAkismet', 'func_params' => array('akismet')), 'stopforumspam' => array('option' => 'sys_stopforumspam_enable', 'title' => _t('_sys_adm_page_cpt_stopforumspam'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=stopforumspam', 'func' => 'PageCodeStopForumSpam', 'func_params' => array('stopforumspam')), 'settings' => array('option' => '', 'title' => _t('_Settings'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=settings', 'func' => 'PageCodeSettings', 'func_params' => array()));
if (!isset($_GET['mode']) || !isset($aPages[$_GET['mode']])) {
    $sMode = 'dnsbl';
} else {
    $sMode = $_GET['mode'];
}
$iNameIndex = 9;
$aTopItems = array();
コード例 #2
0
ファイル: antispam.php プロジェクト: Arvindvi/dolphin
    case isset($_POST['adm-dnsbl-deactivate']):
        foreach ($_POST['rules'] as $iRuleId) {
            db_res("UPDATE `sys_dnsbl_rules` SET `active` = 0 WHERE `id` = " . (int) $iRuleId);
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
    case isset($_POST['adm-dnsbl-delete']):
        foreach ($_POST['rules'] as $iRuleId) {
            db_res("DELETE FROM `sys_dnsbl_rules` WHERE `id` = " . (int) $iRuleId);
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
    case isset($_GET['action']) && 'dnsbl_add' == $_GET['action'] && $_POST['dnsbl_add']:
        $oForm = new BxDolAdmFormDnsblAdd(array(), bx_get('mode'));
        $oForm->initChecker();
        if ($oForm->isSubmittedAndValid() && $oForm->insert()) {
            $sGlMsg = MsgBox(_t('_sys_sucess_result'));
        } else {
            $sGlMsg = MsgBox(_t('_Error Occured'));
        }
        $oBxDolDNSBlacklists->clearCache();
        break;
}
$aPages = array('dnsbl' => array('option' => 'sys_dnsbl_enable', 'title' => _t('_sys_adm_page_cpt_dnsbl'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=dnsbl', 'func' => 'PageCodeDNSBL', 'func_params' => array(array(BX_DOL_DNSBL_CHAIN_SPAMMERS, BX_DOL_DNSBL_CHAIN_WHITELIST), 'dnsbl')), 'dnsbluri' => array('option' => 'sys_uridnsbl_enable', 'title' => _t('_sys_adm_page_cpt_uridnsbl'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=dnsbluri', 'func' => 'PageCodeDNSBL', 'func_params' => array(array(BX_DOL_DNSBL_CHAIN_URIDNS), 'dnsbluri')), 'akismet' => array('option' => 'sys_akismet_enable', 'title' => _t('_sys_adm_page_cpt_akismet'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=akismet', 'func' => 'PageCodeAkismet', 'func_params' => array('akismet')), 'settings' => array('option' => '', 'title' => _t('_Settings'), 'url' => BX_DOL_URL_ADMIN . 'antispam.php?mode=settings', 'func' => 'PageCodeSettings', 'func_params' => array()));
if (!isset($_GET['mode']) || !isset($aPages[$_GET['mode']])) {
    $sMode = 'dnsbl';
} else {
    $sMode = $_GET['mode'];
}
$iNameIndex = 9;
$aTopItems = array();