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";
$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'"));
$res=mysql_query("select 1 from `email`, `users` where `email`.`email`='$email' and `email`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
if(mysql_num_rows($res)>0)
{
showheader(_("Email Dispute"));
printf(_("Sorry, the email address '%s' cannot be disputed for administrative reasons. To solve this problem please get in contact with %s."),sanitizeHTML($email),"<a href='mailto:support@cacert.org'>support@cacert.org</a>");
$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."),sanitizeHTML($email));
$res=mysql_query("select 1 from `domains`, `users` where `domains`.`domain`='$domain' and `domains`.`memid`=`users`.`id` and (`users`.`assurer_blocked`=1 or `users`.`locked`=1)");
if(mysql_num_rows($res)>0)
{
showheader(_("Domain Dispute"));
printf(_("Sorry, the domain '%s' cannot be disputed for administrative reasons. To solve this problem please get in contact with %s."),sanitizeHTML($domain),"<a href='mailto:support@cacert.org'>support@cacert.org</a>");
$query="select 1 from `orgdomains` where `domain`='$domain'";
$res=mysql_query($query);
if(mysql_num_rows($res)>0)
{
showheader(_("Domain Dispute"));
printf(_("The domain '%s' is included in an organisation account. Please send a mail to %s to dispute this domain."),sanitizeHTML($domain),'<a href="mailto:support@cacert.org">support@cacert.org</a>');
$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."),sanitizeHTML($domain));