function build_whitelist() { build_progress_wb("{compiling}", 30); urlrewriteaccessdeny(); build_progress_wb("{compiling}", 35); urlrewriteaccessdeny_squid(); build_progress_wb("{compiling}", 40); build_blacklists(); build_progress_wb("{done}", 100); $unix = new unix(); $php5 = $unix->LOCATE_PHP5_BIN(); shell_exec("{$php5} /usr/share/artica-postfix/exec.ufdbclient.reload.php"); }
function build_whitelist() { build_progress_wb("{compiling}", 30); urlrewriteaccessdeny(); build_progress_wb("{compiling}", 35); urlrewriteaccessdeny_squid(); build_progress_wb("{compiling}", 40); build_blacklists(); $unix = new unix(); $php5 = $unix->LOCATE_PHP5_BIN(); $squidbin = $unix->LOCATE_SQUID_BIN(); squid_admin_mysql(2, "Reloading proxy service for whitelist domains", null, __FILE__, __LINE__); build_progress_wb("{reloading}", 90); system("{$squidbin} -k reconfigure"); build_progress_wb("{done}", 100); }
function build_whitelist() { $sock = new sockets(); $EnableTransparent27 = intval($sock->GET_INFO("EnableTransparent27")); $PrivoxyEnabled = intval($sock->GET_INFO("PrivoxyEnabled")); build_progress_wb("{compiling}", 30); urlrewriteaccessdeny(); build_progress_wb("{compiling}", 35); urlrewriteaccessdeny_squid(); build_progress_wb("{compiling}", 40); @unlink("/var/log/squid/ufdbgclient.black.db"); @file_put_contents("/etc/squid3/ip-blacklists.db", "#"); @file_put_contents("/etc/squid3/www-blacklists.db", "#"); build_blacklists(true); build_progress_wb("{compiling}", 50); $unix = new unix(); if ($PrivoxyEnabled == 1) { build_progress_wb("{compiling} {APP_PRIVOXY}", 55); shell_exec("/etc/init.d/privoxy restart"); build_progress_wb("{compiling} {APP_PRIVOXY} {done}", 60); } build_progress_wb("{reloading}", 65); system("/etc/init.d/squid reload --script=" . basename(__FILE__)); $sock = new sockets(); $EnableTransparent27 = intval($sock->GET_INFO("EnableTransparent27")); $PrivoxyEnabled = intval($sock->GET_INFO("PrivoxyEnabled")); if ($EnableTransparent27 == 1) { build_progress_wb("{reloading} NAT", 70); system("/etc/init.d/squid-nat reload --script=" . basename(__FILE__)); } $php5 = $unix->LOCATE_PHP5_BIN(); $squidbin = $unix->LOCATE_SQUID_BIN(); squid_admin_mysql(2, "Reloading proxy service for whitelist domains", null, __FILE__, __LINE__); build_progress_wb("{reloading}", 90); system("{$squidbin} -k reconfigure"); build_progress_wb("{done}", 100); }