exit;
}
if (isset($_GET["rewrite-rule-items-list"])) {
    rewrite_rule_items_list();
    exit;
}
if (isset($_GET["rewrite-rule-item-js"])) {
    rewrite_rule_items_js();
    exit;
}
if (isset($_GET["rewrite-rule-item-popup"])) {
    rewrite_rule_items_popup();
    exit;
}
if (isset($_POST["rewrite-rule-item-delete"])) {
    rewrite_rule_items_delete();
    exit;
}
if (isset($_POST["rewrite-rule-item-enable"])) {
    rewrite_rule_items_enable();
    exit;
}
if (isset($_POST["rewrite-rule-delete"])) {
    rewrite_rule_delete();
    exit;
}
if (isset($_POST["rewrite-rule-enable"])) {
    rewrite_rule_enable();
    exit;
}
if (isset($_POST["frompattern"])) {
if(!$usersmenus->AsDansGuardianAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "alert('$alert');";
	die();	
}

if(isset($_GET["now-search"])){popup_list();exit;}
if(isset($_GET["rewrite-rule"])){rewrite_rule_js();exit;}
if(isset($_GET["rewrite-rule-tab"])){rewrite_rule_tab();exit;}
if(isset($_GET["rewrite-rule-settings"])){rewrite_rule_settings();exit;}
if(isset($_GET["rewrite-rule-items"])){rewrite_rule_items();exit;}
if(isset($_GET["rewrite-rule-items-list"])){rewrite_rule_items_list();exit;}
if(isset($_GET["rewrite-rule-item-js"])){rewrite_rule_items_js();exit;}
if(isset($_GET["rewrite-rule-item-popup"])){rewrite_rule_items_popup();exit;}
if(isset($_POST["rewrite-rule-item-delete"])){rewrite_rule_items_delete();exit;}
if(isset($_POST["rewrite-rule-item-enable"])){rewrite_rule_items_enable();exit;}
if(isset($_POST["rewrite-rule-delete"])){rewrite_rule_delete();exit;}
if(isset($_POST["rewrite-rule-enable"])){rewrite_rule_enable();exit;}



if(isset($_POST["frompattern"])){rewrite_rule_items_save();exit;}
if(isset($_POST["rulename"])){rewrite_rule_settings_save();exit;}

popup();

function rewrite_rule_items_popup(){
	$tpl=new templates();
	$page=CurrentPageName();
	$q=new mysql_squid_builder();