function change_domain_name($id, $val) { $xmldom = DomDocument::load(XMLDB_DNS); $xpath = new DomXPath($xmldom); $query = @"//record[@id={$id}]"; $domain = $xpath->query($query); if ($domain->length != 1) { return 1; } $domain = $domain->item(0); strenc_todb($val); $domain->setAttribute('name', $val); if (FALSE == $xmldom->save(XMLDB_DNS)) { return 1; } return 0; }
echo change_role($login, $val); exit; } elseif (isset($_GET['a']) && $_GET['a'] == 'deluid') { if (empty($_GET['uid']) || !($login = trim($_GET['uid']))) { return; } strenc_todb($val); user_delete($login); header('Location: users.php'); exit; } elseif (isset($_GET['a']) && $_GET['a'] == 'newuid') { if (empty($_GET['val']) || !($login = trim($_GET['val']))) { return; } strenc_todb($val); user_create($login); header('Location: users.php'); exit; } elseif (isset($_GET['a']) && $_GET['a'] == 'newpwd') { if (empty($_GET['uid']) || !($login = trim($_GET['uid']))) { return; } if (empty($_GET['val']) || !($pwd = trim($_GET['val']))) { return; } strenc_todb($val); change_pwd($login, $pwd); header('Location: users.php'); exit; } include_once 'mainpage.php';