function main_kaspersky_save(){ include_once('ressources/class.artica.inc'); include_once(dirname(__FILE__) . '/ressources/class.kavmilterd.inc'); $ENABLE_KAS=$_GET["ENABLE_KAS"]; $ENABLE_KAV=$_GET["ENABLE_KAV"]; $OPT_SPAM_RATE_LIMIT=$_GET["OPT_SPAM_RATE_LIMIT"]; $ACTION_PROBABLE_SUBJECT_PREFIX=$_GET["ACTION_PROBABLE_SUBJECT_PREFIX"]; $ACTION_PROBABLE_MODE=$_GET["ACTION_PROBABLE_MODE"]; $ACTION_SPAM_SUBJECT_PREFIX=$_GET["ACTION_SPAM_SUBJECT_PREFIX"]; $ACTION_SPAM_MODE=$_GET["ACTION_SPAM_MODE"]; $artica=new artica_general(); $artica->KasxFilterEnabled=$ENABLE_KAS; $artica->Save(); $milter=new kavmilterd(); if($ENABLE_KAV==1){$ENABLE_KAV="yes";}else{$ENABLE_KAV="no";} $milter->milter_enabled=$ENABLE_KAV; $milter->SaveToLdap(); $kas=new kas_single(); if($OPT_SPAM_RATE_LIMIT<>null){ $kas->main_array["OPT_SPAM_RATE_LIMIT"]=$OPT_SPAM_RATE_LIMIT; $kas->ACTION_PROBABLE_MODE=$ACTION_PROBABLE_MODE; $kas->ACTION_SPAM_MODE=$ACTION_SPAM_MODE; $kas->ACTION_PROBABLE_SUBJECT_PREFIX=$ACTION_PROBABLE_SUBJECT_PREFIX; $kas->ACTION_SPAM_SUBJECT_PREFIX=$ACTION_SPAM_SUBJECT_PREFIX; } $kas->Save(); $kas->SaveToserver(); $main=new main_cf(); $main->save_conf_to_server(); $html=Paragraphe('ok32.png','{success}','{success_apply_kas}'); $tpl=new templates(); echo $tpl->_ENGINE_parse_body($html); }
function ApplyConfigKas() { $prod = "kas_main_settings"; $tpl = new templates(); $user = new usersMenus(); if ($user->AllowChangeKas == false) { echo $tpl->_parse_body(NotAllowed($prod)); return null; } if ($user->kas_installed == false) { echo $tpl->_parse_body(NotInstalled($prod)); return null; } $ldap = new clladp(); $kas = new kas_single(); $kas->SaveToserver(); $sock = new sockets(); $sock->getfile('kasrules:' . dirname(__FILE__) . '/ressources/conf/kasDatas'); $kas = new kas_filter(); $kas->SaveFile(); $kas = new kas_dns(); $kas->SaveToServer(); echo $tpl->_parse_body(Success($prod)); }