Structure d'annulation de suppression de domaine.

Fonction commentée parce que pas complete en ce qui concerne les classes "domaine sensitives"
This commit is contained in:
Alan Garcia 2011-01-29 10:35:12 +00:00
parent 9b2b1b120a
commit d189214c5e
3 changed files with 47 additions and 3 deletions

View File

@ -32,7 +32,8 @@ include_once("head.php");
$fields = array (
"domain" => array ("request", "string", ""),
"del_confirm" => array ("post", "string", ""),
"del_confirm" => array ("post", "string", ""),
"del_cancel" => array ("request", "string", ""),
);
getFields($fields);
@ -46,6 +47,17 @@ if ($del_confirm=="y")
}
$dom->unlock();
if (! empty($del_cancel)) {
$dom->del_domain_cancel($domain);
// The link to this function is disable : the del_domain_cancel function need some modification
__("Deletion have been successfully cancelled");?><br/>
<p>
<span class="ina"><a href="main.php" target="_parent"><?php __("Click here to continue"); ?></a></span>
</p>
<?php
exit();
}
if ($del_confirm!="y") {
?>
@ -61,8 +73,7 @@ if ($del_confirm!="y") {
<input type="hidden" name="domain" value="<?php echo $domain ?>" />
<input type="submit" class="inb" name="submit" value="<?php __("Yes"); ?>" /> - <input type="button" class="inb" name="non" value="<?php __("No"); ?>" onclick="history.back()" />
</form>
<?php include_once("foot.php"); ?>
<?php
<?php include_once("foot.php");
exit();
}
?>

View File

@ -70,6 +70,25 @@ function dnsoff() {
}
?>
<hr id="topbar"/>
<?php
if ($r['dns_action']=='UPDATE') {?>
<p class="error"><?php __("This domain have some DNS change pending. Please wait."); ?></p>
<?php
} elseif ($r['dns_action']=='DELETE') {?>
<p class="error"><?php __("You requested deletion of this domain.");?></p>
<?php
/*
// Link hidden as long as the del_domain_cancel function is not complete
<a href="dom_dodel.php?domain=<?php echo urlencode($domain);?>&del_cancel=true"><?php __("Clic here to cancel deletion");?></a>
*/
?>
<?php
include_once("foot.php");
die();
}
?>
<br />
<!-- *****************************************
gestion des sous-domaines

View File

@ -196,6 +196,18 @@ class m_dom {
return $this->domains;
}
function del_domain_cancel($dom) {
global $db,$err,$classes,$cuid;
$err->log("dom","del_domaini_canl",$dom);
$dom=strtolower($dom);
$db->query("UPDATE sub_domaines SET web_action='UPDATE' WHERE domaine='$dom';");
$db->query("UPDATE domaines SET dns_action='UPDATE' WHERE domaine='$dom';");
# TODO : some work with domain sensitive classes
return true;
}
/* ----------------------------------------------------------------- */
/**
* Efface un domaine du membre courant, et tous ses sous-domaines
@ -624,6 +636,8 @@ class m_dom {
}
$db->next_record();
$r["dns"]=$db->Record["gesdns"];
$r["dns_action"]=$db->Record["dns_action"];
$r["dns_result"]=$db->Record["dns_result"];
$r["mail"]=$db->Record["gesmx"];
$r["mx"]=$db->Record["mx"];
$r[noerase]=$db->Record[noerase];