include_once 'ressources/class.templates.inc'; include_once 'ressources/class.ldap.inc'; include_once 'ressources/class.users.menus.inc'; $user = new usersMenus(); if ($user->AsSquidAdministrator == false) { $tpl = new templates(); echo "alert('" . $tpl->javascript_parse_text("{ERROR_NO_PRIVS}") . "');"; die; exit; } if (isset($_POST["delete"])) { delete(); exit; } if (isset($_GET["delete-js"])) { delete_js(); exit; } if (isset($_GET["server-js"])) { server_js(); exit; } if (isset($_GET["server-popup"])) { server_popup(); exit; } if (isset($_POST["WORKGROUP"])) { server_save(); exit; } if (isset($_GET["popup"])) {
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(); $tpl=new templates(); $MAC=$_GET["MAC"];
} break; //获取某一js模板的内容 //获取某一js模板的内容 case 'get': if (isset($_GET['name']) && preg_match(FILE_REGEX, $_GET['name'])) { echo json_encode(load_js_content(MY_JS_PATH, $_GET['name'])); } else { echo json_encode(false); } break; //删除js模板 //删除js模板 case 'del': if (isset($_GET['name']) && preg_match(FILE_REGEX, $_GET['name'])) { echo json_encode(delete_js(MY_JS_PATH, $_GET['name'])); } else { echo json_encode(false); } break; //清空js模板 //清空js模板 case 'clear': echo json_encode(clear_js(MY_JS_PATH)); break; default: echo json_encode(false); } } else { echo json_encode(false); }
<?php include_once(dirname(__FILE__).'/ressources/class.templates.inc'); include_once(dirname(__FILE__).'/ressources/class.mysql.inc'); if(isset($_GET["delete-js"])){delete_js();exit;} if(isset($_GET["message-id"])){JS_MESSAGE_ID();exit;} if(isset($_GET["message_id"])){echo quarantine_show();exit;} if(isset($_GET["message-id-source"])){quarantine_show_source();exit;} if(isset($_GET["message-id-html"])){quarantine_show_html();exit;} if(isset($_GET["release-mail-send"])){release_mail_send();exit;} if(isset($_POST["LiberLigneQueue"])){release_all_mail_send();exit;} if(isset($_GET["LiberLignePerform"])){quarantine_create_queue();exit;} if(isset($_GET["LiberLigneText"])){quarantine_create_queue_text();exit;} if(!GetRights()){ $tpl=new templates(); $error="{ERROR_NO_PRIVS}"; echo $tpl->_ENGINE_parse_body("alert('$error')"); die(); } if(isset($_GET["js"])){echo quarantine_script();exit;} if(isset($_GET["popup"])){echo quarantine_index();exit;} if(isset($_GET["query"])){echo quarantine_query();exit;}