include_once('ressources/class.ActiveDirectory.inc');
	include_once ('ressources/class.computers.inc');
	include_once ('ressources/class.ocs.inc');
	
	
$usersmenus=new usersMenus();
if(!$usersmenus->AsDansGuardianAdministrator){
	$tpl=new templates();
	$alert=$tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
	echo "<H2>$alert</H2>";
	die();	
}

if(isset($_GET["popup"])){popup();exit;}
if(isset($_GET["list"])){items();exit;}
if(isset($_POST["enable-pattern"])){enabled_save();exit;}
if(isset($_POST["delete"])){delete();exit;}
if(isset($_GET["delete-pattern"])){delete_js();exit;}
popup();

function js(){
	$tpl=new templates();
	$page=CurrentPageName();
	$title=$tpl->_ENGINE_parse_body("{browsers}");
	$html="YahooWinBrowse('650','$page?popup=yes&ShowOnly={$_GET["ShowOnly"]}','$title')";
	echo $html;
	
}
function delete_js(){
	header("content-type: application/x-javascript");
	$q=new mysql_meta();
if (!$usersmenus->AsDansGuardianAdministrator) {
    $tpl = new templates();
    $alert = $tpl->_ENGINE_parse_body('{ERROR_NO_PRIVS}');
    echo "<H2>{$alert}</H2>";
    die;
}
if (isset($_GET["popup"])) {
    popup();
    exit;
}
if (isset($_GET["list"])) {
    items();
    exit;
}
if (isset($_POST["enable-pattern"])) {
    enabled_save();
    exit;
}
if (isset($_POST["delete"])) {
    delete();
    exit;
}
if (isset($_GET["delete-pattern"])) {
    delete_js();
    exit;
}
popup();
function js()
{
    $tpl = new templates();
    $page = CurrentPageName();