/usr/src/rmw/cpanel/RemoteMxWizard
Edit: /usr/src/rmw/cpanel/RemoteMxWizard/index.live.php (14557B)
0header('Google Mx Wizard'));
print('
');
print('');
} else {
// Fix paper_lantern User btn href
print(SetStdHeader());
print('');
print('
');
print('
');
print('');
print('');
print('
Google MX Wizard
');
}
$GoBackBtn = '
';
print('
');
if (!empty($_ENV['cp_security_token'])) {
//////////////////////// Step 1 ////////////////////////
if (empty($gawstep)) {
$basedomains = $LiveCpApi->api2('DomainLookup','getbasedomains');
?>
'.$domain.' '.$LANG['step2domnote1'];
} else {
$pagedes = $LANG['step2des2'];
$firstnote = ' '.$LANG['step2domnote'].'
'.$domain.' '.$LANG['step2domnote2'];
}
if (!$MxAccept['mxconf']) {
if (GawMatchConfig($domain)) {
$tabs = false;
} else {
$tabs = true;
}
} else {
$tabs = false;
}
$MailProviders = GetMailProviders();
?>
');
if (count($MailProviders) > 1) {
$i=0;
foreach ($MailProviders as $ProviderConf) {
if ($ProviderConf['STATUS']) {
if ($i==0) {$aClasss = 'class="active"';} else {$aClasss = '';}
print('
'.$ProviderConf['NAME'].'');
$i++;
}
}
}
print('
');
} else {
$ProviderConfig = GetMailProviderConf(false,true);
print('
'.$LANG['note'].'
'.$LANG['submitgN0'].'
'.$LANG['submitgN1'].' '.$ProviderConfig['NAME'].'.
');
print('');
}
print(' '.$GoBackBtn);
//////////////////////// Step 3 ////////////////////////
} elseif ($gawstep == 'step3') {
?>
'.$LANG['spfstep3'].'');
} else {
print('
'.$LANG['rspfstep3'].'
');
}
if (isset($ProviderConf['SERVICERS']) && is_array($ProviderConf['SERVICERS'])) {
foreach ($ProviderConf['SERVICERS'] as $Service) {
$rType = trim($Service[0]);
$rName = trim($Service[1]);
$rDest = trim($Service[2]);
$rOptional = trim($Service[3]);
if ($rName == 'mail' && $rOptional == 0 && !empty($DomainZone['mailLine'])) {
EditMailLine($domain,$rDest,$DomainZone['mailLine'],$DomainZone['GlobalTTL'],$rName);
} elseif ($rName == 'mail' && $rOptional == 1 && !empty($DomainZone['mailLine']) && in_array('mail',$_POST['services'])) {
EditMailLine($domain,$rDest,$DomainZone['mailLine'],$DomainZone['GlobalTTL'],$rName);
} elseif ($rName == 'webmail' && $rOptional == 0 && !empty($DomainZone['webmailLine'])) {
EditMailLine($domain,$rDest,$DomainZone['webmailLine'],$DomainZone['GlobalTTL'],$rName);
} elseif ($rName == 'webmail' && $rOptional == 1 && !empty($DomainZone['webmailLine']) && in_array('webmail',$_POST['services'])) {
EditMailLine($domain,$rDest,$DomainZone['webmailLine'],$DomainZone['GlobalTTL'],$rName);
} elseif ($rName == 'webmail' && $rOptional == 0 && empty($DomainZone['webmailLine'])) {
SetProviderServices($domain,$rName,$rDest,$rType,$DomainZone['GlobalTTL']);
}
if ($rName != 'mail' && $rName != 'webmail' && $rOptional == 1 && in_array($rName,$_POST['services']) || $rName != 'mail' && $rName != 'webmail' && $rOptional == 0) {
SetProviderServices($domain,$rName,$rDest,$rType,$DomainZone['GlobalTTL']);
}
}
}
if (isset($DomainZone['RspfLine']) && isset($DomainZone['spfOld'])) {RemoveZoneRecord($ProviderConf['NAME'],$domain,'',$DomainZone['RspfLine'],$DomainZone['spfOld']);}
SetProviderMXs($ProviderConf['NAME'],$domain,$ProviderConf['MXs'],$DomainZone['oldMxPri'],$ProviderConf['BACKUPMX'],$ProviderConf['SPFR'],$DomainZone['GlobalTTL']);
} else {
die('Invalid Token!');
}
print('
'.$GoBackBtn);
//////////////////////// Remove ////////////////////////
} elseif ($gawstep == 'remove') {
?>
$ServiceLine) {
if ($Service == 'mail' && !empty($DomainZone['mailLine'])) {
EditMailLine($domain,$domain,$DomainZone['mailLine'],$DomainZone['GlobalTTL'],$Service);
} elseif ($Service == 'webmail' && !empty($DomainZone['webmailLine'])) {
EditMailLine($domain,$DomainZone['serverip'],$DomainZone['webmailLine'],$DomainZone['GlobalTTL'],$Service);
} else {
RemoveZoneRecord($ProviderConf['NAME'],$domain,$Service,$ServiceLine);
}
}
}
RemoveProviderMXs($domain,$DomainZone['GlobalTTL'],$ProviderConf);
} else {
die('Invalid Token!');
}
print('
'.$GoBackBtn);
}
} else {
print('
'.$LANG['cptokens'].'
');
}
print('
');
if ($usertheme == 'paper_lantern' || $usertheme == 'jupiter') {
print($LiveCpApi->footer());
} else {
print(SetStdFooter());
// Fix x3 footer btn href
print('');
}
?>