echo_("You have opted to reject this dispute and the request will be removed from the database");
showfooter();
exit;
}
if($action=="accept")
{
showheader(_("Email Dispute"));
echo"<p>"._("You have opted to accept this dispute and the request will now remove this email address from the existing account, and revoke any current certificates.")."</p>";
echo"<p>"._("The following accounts have been removed:")."<br>\n";
$res=mysql_query("select * from `disputeemail` where `id`='$emailid' and `hash`='$hash'");
if(mysql_num_rows($res)<=0)
{
$res=mysql_query("select * from `disputeemail` where `id`='$emailid' and hash!=''");
if(mysql_num_rows($res)>0)
{
$row=mysql_fetch_assoc($res);
mysql_query("update `disputeemail` set `attempts`='".intval($row['attempts']+1)."' where `id`='".$row['id']."'");
showheader(_("Email Dispute"));
if($row['attempts']>=3)
{
echo_("Your attempt to accept or reject a disputed email is invalid due to the hash string not matching with the email ID. Your attempt has been logged and the request will be removed from the system as a result.");
mysql_query("update `disputeemail` set hash='',action='failed' where `id`='$emailid'");
}else
echo_("Your attempt to accept or reject a disputed email is invalid due to the hash string not matching with the email ID.");
showfooter();
exit;
}else{
showheader(_("Email Dispute"));
echo_("Invalid request. Can't continue.");
showfooter();
exit;
}
}
$_SESSION['_config']['emailid']=$emailid;
$_SESSION['_config']['hash']=$hash;
$row=mysql_fetch_assoc(mysql_query("select * from `disputeemail` where `id`='$emailid'"));
$res=mysql_query("select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
if(mysql_num_rows($res)<=0)
{
showheader(_("Domain Dispute"));
echo_("This dispute no longer seems to be in the database, can't continue.");
showfooter();
exit;
}
if($action=="reject")
{
mysql_query("update `disputedomain` set hash='',action='reject' where `id`='$domainid'");
showheader(_("Domain Dispute"));
echo_("You have opted to reject this dispute and the request will be removed from the database");
showfooter();
exit;
}
if($action=="accept")
{
showheader(_("Domain Dispute"));
echo"<p>"._("You have opted to accept this dispute and the request will now remove this domain from the existing account, and revoke any current certificates.")."</p>";
echo"<p>"._("The following accounts have been removed:")."<br>\n";
$query="select * from `domains` where `id`='$domainid' and deleted=0";
$res=mysql_query($query);
if(mysql_num_rows($res)>0)
{
echo$_SESSION['_config']['domain']."<br>\n";
mysql_query("update `domains` set `deleted`=NOW() where `id`='$domainid'");
$query="select * from `domlink` where `domid`='$domainid'";
$res=mysql_query($query);
while($row=mysql_fetch_assoc($res))
mysql_query("update `domaincerts` set `revoked`='1970-01-01 10:00:01' where `id`='".$row['certid']."' and `revoked`=0 and UNIX_TIMESTAMP(`expire`)-UNIX_TIMESTAMP() > 0");
$do=`../scripts/runserver`;
}
mysql_query("update `disputedomain` set hash='',action='accept' where `id`='$domainid'");
$res=mysql_query("select * from `disputedomain` where `id`='$domainid' and `hash`='$hash'");
if(mysql_num_rows($res)<=0)
{
$res=mysql_query("select * from `disputedomain` where `id`='$domainid' and hash!=''");
if(mysql_num_rows($res)>0)
{
$row=mysql_fetch_assoc($res);
mysql_query("update `disputedomain` set `attempts`='".intval($row['attempts']+1)."' where `id`='".$row['id']."'");
showheader(_("Domain Dispute"));
if($row['attempts']>=3)
{
echo_("Your attempt to accept or reject a disputed domain is invalid due to the hash string not matching with the domain ID. Your attempt has been logged and the request will be removed from the system as a result.");
mysql_query("update `disputedomain` set hash='',action='failed' where `id`='$domainid'");
}else
echo_("Your attempt to accept or reject a disputed domain is invalid due to the hash string not matching with the domain ID.");
showfooter();
exit;
}else{
showheader(_("Domain Dispute"));
echo_("Invalid request. Can't continue.");
showfooter();
exit;
}
}
$_SESSION['_config']['domainid']=$domainid;
$_SESSION['_config']['hash']=$hash;
$row=mysql_fetch_assoc(mysql_query("select * from `disputedomain` where `id`='$domainid'"));
$body=sprintf(_("You have been sent this email as the email address '%s' is being disputed. You have the option to accept or reject this request, after 2 days the request will automatically be discarded. Click the following link to accept or reject the dispute:"),$email)."\n\n";
printf(_("The email address '%s' has been entered into the dispute system, the email address will now be sent an email which will give the recipent the option of accepting or rejecting the request, if after 2 days we haven't received a valid response for or against we will discard the request."),$email);
$body=sprintf(_("You have been sent this email as the domain '%s' is being disputed. You have the option to accept or reject this request, after 2 days the request will automatically be discarded. Click the following link to accept or reject the dispute:"),$domain)."\n\n";
printf(_("The domain '%s' has been entered into the dispute system, the email address you choose will now be sent an email which will give the recipent the option of accepting or rejecting the request, if after 2 days we haven't received a valid response for or against we will discard the request."),$domain);