function delete() { include_once dirname(__FILE__) . "/ressources/class.squid.reverse.inc"; $tpl = new templates(); $servername = $_GET["delete-servername"]; $q = new mysql_squid_builder(); if (!$q->TABLE_EXISTS("reverse_www")) { $nginx = new squid_reverse(); } if ($q->TABLE_EXISTS("reverse_www")) { $q->QUERY_SQL("DELETE FROM reverse_www WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } if ($q->TABLE_EXISTS("reverse_privs")) { $q->QUERY_SQL("DELETE FROM reverse_privs WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } if ($q->TABLE_EXISTS("nginx_replace_www")) { $q->QUERY_SQL("DELETE FROM nginx_replace_www WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } if ($q->TABLE_EXISTS("nginx_aliases")) { $q->QUERY_SQL("DELETE FROM nginx_aliases WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } if ($q->TABLE_EXISTS("nginx_exploits_fw")) { $q->QUERY_SQL("DELETE FROM nginx_exploits_fw WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } if ($q->TABLE_EXISTS("nginx_exploits")) { $q->QUERY_SQL("DELETE FROM nginx_exploits WHERE servername='{$servername}'"); if (!$q->ok) { echo $q->mysql_error; return; } } $sock = new sockets(); $sock->getFrameWork("squid.php?reverse-proxy-apply=yes"); $free = new freeweb($_GET["delete-servername"]); if ($free->groupware == "MAILMAN") { $q = new mysql(); $sql = "SELECT `list` FROM mailmaninfos WHERE `urlhost`='{$_GET["delete-servername"]}'"; $ligne = mysql_fetch_array($q->QUERY_SQL($sql, "artica_backup")); if ($ligne["list"] != null) { echo $tpl->javascript_parse_text("{unable_freeweb_delete_mailman}\n- - {$ligne["list"]} - -\n"); return; } } writelogs("Delete server \"{$_GET["delete-servername"]}\" delete dns={$_GET["delete-dns"]}", __FUNCTION__, __FILE__, __LINE__); if (isset($_GET["delete-dns"])) { if ($_GET["delete-dns"] == 1) { $dns = new pdns(); $dns->DelHostname($_GET["delete-servername"]); } } $sql = "INSERT INTO drupal_queue_orders(`ORDER`,`servername`) VALUES('DELETE_FREEWEB','{$_GET["delete-servername"]}')"; writelogs($sql, __FUNCTION__, __FILE__, __LINE__); $q = new mysql(); $q->QUERY_SQL($sql, "artica_backup"); if (!$q->ok) { echo $q->mysql_error; return; } $sock = new sockets(); $sock->getFrameWork("drupal.php?perform-orders=yes"); }
function delete() { writelogs("Delete server \"{$_GET["delete-servername"]}\" delete dns={$_GET["delete-dns"]}", __FUNCTION__, __FILE__, __LINE__); if (isset($_GET["delete-dns"])) { if ($_GET["delete-dns"] == 1) { $dns = new pdns(); $dns->DelHostname($_GET["delete-servername"]); } } $sql = "INSERT INTO drupal_queue_orders(`ORDER`,`servername`) VALUES('DELETE_FREEWEB','{$_GET["delete-servername"]}')"; writelogs($sql, __FUNCTION__, __FILE__, __LINE__); $q = new mysql(); $q->QUERY_SQL($sql, "artica_backup"); if (!$q->ok) { echo $q->mysql_error; return; } $sock = new sockets(); $sock->getFrameWork("drupal.php?perform-orders=yes"); }