こんにちは
、私は whmcs を使用したサイトを持っており、私の郡の tld である .al を持つドメインを販売したいと考えています。これについて Web を検索しましたが、ドメイン レジストラー モジュールを作成する必要があるとのことでした。
テンプレートを whmcs サイトからダウンロードしましたが、使い方がわかりません。
<?php
function template_getConfigArray() {
$configarray = array(
"Username" => array( "Type" => "text", "Size" => "20", "Description" => "Enter your username here", ),
"Password" => array( "Type" => "password", "Size" => "20", "Description" => "Enter your password here", ),
"TestMode" => array( "Type" => "yesno", ),
);
return $configarray;
}
function template_GetNameservers($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
# Put your code to get the nameservers here and return the values below
$values["ns1"] = $nameserver1;
$values["ns2"] = $nameserver2;
$values["ns3"] = $nameserver3;
$values["ns4"] = $nameserver4;
# If error, return the error message in the value below
$values["error"] = $error;
return $values;
}
function template_SaveNameservers($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
$nameserver1 = $params["ns1"];
$nameserver2 = $params["ns2"];
$nameserver3 = $params["ns3"];
$nameserver4 = $params["ns4"];
# Put your code to save the nameservers here
# If error, return the error message in the value below
$values["error"] = $error;
return $values;
}
function template_GetRegistrarLock($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
# Put your code to get the lock status here
if ($lock=="1") {
$lockstatus="locked";
} else {
$lockstatus="unlocked";
}
return $lockstatus;
}
function template_SaveRegistrarLock($params) {
$username = $params["Username"];
$password = $params["Password"];
$testmode = $params["TestMode"];
$tld = $params["tld"];
$sld = $params["sld"];
if ($params["lockenabled"]) {
$lockstatus="locked";
} else {
$lockstatus="unlocked";
}
# Put your code to save the registrar lock here
# If error, return the error message in the value below
$values["error"] = $Enom->Values["Err1"];
return $values;
}
これは、モジュール テンプレートのコードの一部です。