Example #1
0
function main_rules_switch()
{
    switch ($_GET["tab"]) {
        case "categories":
            echo main_rules_categories();
            exit;
            break;
        case "weightedphraselist":
            echo main_rules_weightedphraselist();
            break;
            exit;
        case "bannedphraselist":
            echo main_rules_bannedphraselist();
            break;
        case "bannedregexpurllist":
            echo main_rules_bannedregexpurllist();
            break;
        case "ExceptionSiteList":
            echo main_rules_exceptionsitelist();
            break;
        case "ExeptionFileSiteList":
            echo main_ExeptionFileSiteList();
            break;
        case "bannedextensionlist":
            main_extensions_bannedextensionslist();
            break;
        case "BannedMimetype":
            main_extensions_bannedMimeTypelist();
            break;
        case "mainsettings":
            main_rules_mainsettings();
            break;
        case "categories-list":
            main_rules_categories_list($_GET["rule_main"]);
            break;
        case "categories-weightedphraselist":
            main_rules_weightedphraselist_list($_GET["rule_main"]);
            break;
        case "categories-bannedphraselist":
            main_rules_bannedphraselist_list($_GET["rule_main"]);
            break;
        case "ExceptionSiteList-popup":
            main_rules_exceptionsitelist_list($_GET["rule_main"]);
            break;
        case "bannedextensionlist-popup":
            main_extensions_bannedextensionslist_list($_GET["rule_main"]);
            break;
        case "BannedMimetype-popup":
            main_extensions_bannedMimeTypelist_list($_GET["rule_main"]);
            break;
        case "ExeptionFileSiteList-popup":
            main_ExeptionFileSiteList_list($_GET["rule_main"]);
            break;
        default:
            break;
    }
}
    exit;
}
if (isset($_GET["bannedextension_listadd"])) {
    main_extension_bannedextensionlist_add();
    exit;
}
if (isset($_GET["bannedextensionlist_switch"])) {
    main_extension_bannedextensionlist_switch();
    exit;
}
if (isset($_GET["bannedextensionlist_del"])) {
    main_extention_bannedextensionlist_del();
    exit;
}
if (isset($_GET["main_extensions_bannedextensionslist_list"])) {
    echo main_extensions_bannedextensionslist_list();
    exit;
}
js();
function js()
{
    $tpl = new templates();
    $page = CurrentPageName();
    $rulename = base64_decode($_GET["rule-name"]);
    $title = $tpl->_ENGINE_parse_body("{ExceptionSiteList}");
    $html = "\n\t\n\tfunction DANSGUARDIAN_LOAD_BANNEDEXT(){\n\t\tRTMMail(650,'{$page}?popup=yes&rule_main={$_GET["rule_main"]}','{$title}');\n\t\n\t}\n\t\n\tfunction ext_enter(e){\n\t\tif(checkEnter(e)){bannedextension_listadd();}\n\t}\n\t\n\tDANSGUARDIAN_LOAD_BANNEDEXT()";
    echo $html;
}
function popup()
{
    $page = CurrentPageName();