本文整理汇总了PHP中module_controller::nosub方法的典型用法代码示例。如果您正苦于以下问题:PHP module_controller::nosub方法的具体用法?PHP module_controller::nosub怎么用?PHP module_controller::nosub使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类module_controller
的用法示例。
在下文中一共展示了module_controller::nosub方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: CheckCreateForErrors
static function CheckCreateForErrors($domain)
{
global $zdbh;
// Check for spaces and remove if found...
$domain = strtolower(str_replace(' ', '', $domain));
// Check to make sure the domain is not blank before we go any further...
if ($domain == '') {
self::$blank = TRUE;
return FALSE;
}
// Check for invalid characters in the domain...
if (!self::IsValidDomainName($domain)) {
self::$badname = TRUE;
return FALSE;
}
// Check to make sure the domain is in the correct format before we go any further...
if (strpos($domain, 'www.') === 0) {
self::$error = TRUE;
return FALSE;
}
// Check to see if the domain already exists in Sentora somewhere and redirect if it does....
$sql = "SELECT COUNT(*) FROM x_vhosts WHERE vh_name_vc=:domain AND vh_deleted_ts IS NULL";
$numrows = $zdbh->prepare($sql);
$numrows->bindParam(':domain', $domain);
if ($numrows->execute()) {
if ($numrows->fetchColumn() > 0) {
self::$alreadyexists = TRUE;
return FALSE;
}
}
// Check to make sure user not adding a subdomain and blocks stealing of subdomains....
// Get shared domain list
$SharedDomains = array();
$a = explode(',', ctrl_options::GetSystemOption('shared_domains'));
foreach ($a as $b) {
$SharedDomains[] = $b;
}
if (substr_count($domain, ".") > 1) {
$part = explode('.', $domain);
foreach ($part as $check) {
if (!in_array($check, $SharedDomains)) {
if (strlen($check) > 13) {
$sql = $zdbh->prepare("SELECT * FROM x_vhosts WHERE vh_name_vc LIKE :check AND vh_type_in !=2 AND vh_deleted_ts IS NULL");
$checkSql = '%' . $check . '%';
$sql->bindParam(':check', $checkSql);
$sql->execute();
while ($rowcheckdomains = $sql->fetch()) {
$subpart = explode('.', $rowcheckdomains['vh_name_vc']);
foreach ($subpart as $subcheck) {
if (strlen($subcheck) > 3) {
if ($subcheck == $check) {
if (substr($domain, -7) == substr($rowcheckdomains['vh_name_vc'], -7)) {
self::$nosub = TRUE;
return FALSE;
}
}
}
}
}
}
}
}
}
return TRUE;
}