function build() { if ($GLOBALS["OUTPUT"]) { echo "Reconfigure...: " . date("H:i:s") . " [INIT]: Remove init.d scripts\n"; } remove_init(); $q = new mysql_squid_builder(); $sql = "SELECT * FROM proxy_ports WHERE FTP=1 AND enabled=1"; if ($GLOBALS["OUTPUT"]) { echo "Reconfigure...: " . date("H:i:s") . " [INIT]: Search parameters in MySQL Database\n"; } $results = $q->QUERY_SQL($sql); while ($ligne = mysql_fetch_assoc($results)) { if ($GLOBALS["OUTPUT"]) { echo "Reconfigure...: " . date("H:i:s") . " [INIT]: Building Port ID {$ligne["ID"]}\n"; } build_conf($ligne); stop($ligne["ID"]); start($ligne["ID"]); } }
function build() { remove_init(); $q = new mysql_squid_builder(); $sql = "SELECT * FROM proxy_ports WHERE FTP=1 AND enabled=1"; $results = $q->QUERY_SQL($sql); while ($ligne = mysql_fetch_assoc($results)) { build_conf($ligne); stop($ligne["ID"]); start($ligne["ID"]); } }