"Existing Domains",
"description" => "This module will give the customers the ability to use domains they have already purchased.
For more info visit our forum ",
"version" => "2.4.1",
"author" => "",
"fields" => array(
"doption" => array("FriendlyName" => "Duplicate Domains", "Type" => "dropdown", "Options" => "Allow Duplicate,Same product domain,All product domain", "Description" => '
Allow Duplicate - Allow clients to choose any domains are in they account
All product domain - Don\'t allow the same domain name for all products. Domain names must be unique on the system.
Same product domain - Don\'t allow the same domain for the same product. Domain names must be unique per product/service.'),
"subdomain" => array("FriendlyName" => 'Sub domains', "Type" => 'yesno', "Description" => 'Allow clients to choose sub domains that are already assigned to a hosting account')
)
);
return $configarray;
}
function ExistingDomains_activate()
{
Capsule::table('tblconfiguration')->where('setting', 'AllowDomainsTwice')->update([
'value' => ''
]);
return array('status' => 'success', 'description' => 'WS Existing Domains module activated');
}
function ExistingDomains_deactivate()
{
Capsule::table('tblconfiguration')->where('setting', 'AllowDomainsTwice')->update([
'value' => 'on'
]);
return array('status' => 'success', 'description' => 'WS Existing Domains deactivated');
}
function ExistingDomains_output()
{
$vchk = '';
if (!isset($_SESSION['exdscheckversion'])) {
$sversion = curlCall('https://www.whmcsservices.com/members/modules/addons/modulesmanager/versioncheck.php?check=ExistingDomains', '');
$lversion = ExistingDomains_config();
$sversion = json_decode($sversion, true);
$sversi = str_replace('.', '', $sversion['version']);
$lversi = str_replace('.', '', $lversion['version']);
if ($lversi >= $sversi) {
$vchk = '