">Yes, delete</a> | <a href="?cat=<?php echo $_GET['cat']; ?> &page=<?php echo $_GET['page']; ?> ">No, cancel</a></center> </fieldset> <?php exit; } if (isset($_GET['delete'])) { // Remove maindomain and subdomains $DB->Execute("DELETE FROM domains WHERE user='******'username'] . "' AND domain='" . Clean($_GET['dom'], 1) . "' OR user='******'username'] . "' AND masterdomain='" . Clean($_GET['dom'], 1) . "'"); // Restart Apache CreateVH(); // Redirect to conf message echo '<script language="javascript">window.location = "?cat=' . $_GET['cat'] . '&page=' . $_GET['page'] . '&deleted"</script>'; } // Get subdomains $result = $DB->GetAll("SELECT * FROM domains WHERE parked!=1 AND masterdomain!='' AND user='******'username'] . "' ORDER BY masterdomain ASC, domain ASC"); // Get domains $domresult = $DB->GetAll("SELECT * FROM domains WHERE parked!=1 AND masterdomain='' AND user='******'username'] . "' ORDER BY domain ASC"); function parse_dir($dir, $path = 0) { if ($dh = @opendir($dir)) { while (($file = readdir($dh)) !== false) { if (!preg_match('/^\\./s', $file)) { if (is_dir($dir . '/' . $file)) { if ($path) { if ($path == '/' . $file . '/') {
function UpdateDomain($dom, $path, $sub = 0) { global $_SESSION, $DB; // Instantiate the xajaxResponse object $objResponse = new xajaxResponse(); // Make sure the domain isn't already added $DB->Execute("UPDATE domains SET path='{$path}' WHERE domain='{$dom}' AND user='******'username'] . "'"); // Refresh the VHosts CreateVH(); if ($sub) { $objResponse->addScript("document.location='?cat=domainadmin&page=subdomains&updated';"); } else { $objResponse->addScript("document.location='?cat=domainadmin&page=domains&updated';"); } return $objResponse->getXML(); }