include("include.html");
checksession($id);
if($xhost && $xhostuser && $xhostpass)
{
$mailserver=$xhost;
$hostuser=$xhostuser;
$hostpass=$xhostpass;
if(strpos($xhostpass,"*")>-1 && $acid)
{
getotheraccounts();
$hostpass=$otheraccounts[$acid]['HOSTPASS'];
}
}
elseif($acid==="0")
{
if($integrate) die('1');
$mailserver=$config['HOST'];
$hostuser=$config['HOSTUSER'];
$hostpass=$config['HOSTPASS'];
}
elseif($acid)
{
getotheraccounts();
if(is_array($otheraccounts))
{
$mailserver=$otheraccounts[$acid]['HOST'];
$hostuser=$otheraccounts[$acid]['HOSTUSER'];
$hostpass=$otheraccounts[$acid]['HOSTPASS'];
}
}
if($mailserver)
echo authenticateuser($hostuser,$hostpass)?'1':'0';
else
die('0');
?>