当前位置: 首页>>代码示例>>PHP>>正文


PHP module_controller::blank方法代码示例

本文整理汇总了PHP中module_controller::blank方法的典型用法代码示例。如果您正苦于以下问题:PHP module_controller::blank方法的具体用法?PHP module_controller::blank怎么用?PHP module_controller::blank使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在module_controller的用法示例。


在下文中一共展示了module_controller::blank方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: CheckForErrors

 static function CheckForErrors($username, $password)
 {
     global $zdbh;
     $retval = FALSE;
     // Check to make sure the username and password is not blank before we go any further...
     if ($username == '' || $password == '') {
         self::$blank = TRUE;
         $retval = TRUE;
     }
     // Check for invalid username
     if (!self::IsValidUserName($username)) {
         self::$badname = true;
         $retval = TRUE;
     }
     // Check to make sure the cron is not a duplicate...
     $sql = "SELECT COUNT(*) FROM x_ftpaccounts WHERE ft_user_vc=:userid AND ft_deleted_ts IS NULL";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':userid', $username);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             self::$alreadyexists = TRUE;
             $retval = TRUE;
         }
     }
     return $retval;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:26,代码来源:controller.ext.php

示例2: 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;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:65,代码来源:controller.ext.php

示例3: CheckCronForErrors

 static function CheckCronForErrors()
 {
     global $zdbh;
     global $controller;
     $retval = FALSE;
     //Try to create the cron file if it doesnt exist...
     if (!file_exists(ctrl_options::GetSystemOption('cron_file'))) {
         fs_filehandler::UpdateFile(ctrl_options::GetSystemOption('cron_file'), 0644, "");
     }
     $currentuser = ctrl_users::GetUserDetail();
     // Check to make sure the cron is not blank before we go any further...
     if ($controller->GetControllerRequest('FORM', 'inScript') == '') {
         self::$blank = TRUE;
         $retval = TRUE;
     }
     // Check to make sure the cron script exists before we go any further...
     if (!is_file(fs_director::RemoveDoubleSlash(fs_director::ConvertSlashes(ctrl_options::GetSystemOption('hosted_dir') . $currentuser['username'] . '/public_html/' . $controller->GetControllerRequest('FORM', 'inScript'))))) {
         self::$noexists = TRUE;
         $retval = TRUE;
     }
     // Check to see if creating system cron file was successful...
     if (!is_file(ctrl_options::GetSystemOption('cron_file'))) {
         self::$cronnoexists = TRUE;
         $retval = TRUE;
     }
     // Check to makesystem cron file is writable...
     if (!is_writable(ctrl_options::GetSystemOption('cron_file'))) {
         self::$cronnowrite = TRUE;
         $retval = TRUE;
     }
     // Check to make sure the cron is not a duplicate...
     $sql = "SELECT COUNT(*) FROM x_cronjobs WHERE ct_acc_fk=:userid AND ct_script_vc=:inScript AND ct_deleted_ts IS NULL";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':userid', $currentuser['userid']);
     $numrows->bindParam(':inScript', $controller->GetControllerRequest('FORM', 'inScript'));
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             self::$alreadyexists = TRUE;
             $retval = TRUE;
         }
     }
     return $retval;
 }
开发者ID:albertkampde,项目名称:sentora-cron-module,代码行数:43,代码来源:controller.ext.php

示例4: CheckCreateForErrors

 static function CheckCreateForErrors($username, $database, $access)
 {
     global $zdbh;
     // Check to make sure the user name is not blank before we go any further...
     if ($username == '') {
         self::$blank = true;
         return false;
     }
     // Check to make sure the user name is not blank before we go any further...
     if ($username == 'root') {
         self::$rootabuse = true;
         return false;
     }
     // Check to make sure the user name is not blank before we go any further...
     if ($database == '') {
         self::$blank = true;
         return false;
     }
     // Check to make sure the user name is not a duplicate...
     $sql = "SELECT COUNT(*) FROM x_mysql_users WHERE mu_name_vc=:username AND mu_deleted_ts IS NULL";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':username', $username);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             self::$alreadyexists = true;
             return false;
         }
     }
     // Check to make sure the user name is not a duplicate (checks actual mysql table)...
     $sql = "SELECT EXISTS(SELECT 1 FROM mysql.user WHERE user = :username)";
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':username', $username);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             self::$alreadyexists = true;
             return false;
         }
     }
     // Check for invalid username
     if (!self::IsValidUserName($username)) {
         self::$badname = true;
         return false;
     }
     // Check for invalid IP address
     if ($access != "%" && strtolower($access) != "localhost") {
         if (!sys_monitoring::IsAnyValidIP($access)) {
             self::$badIP = true;
             return false;
         }
     }
     return true;
 }
开发者ID:caglaroflazoglu,项目名称:sentora-core,代码行数:52,代码来源:controller.ext.php

示例5: CheckCreateForErrors

 static function CheckCreateForErrors($subdomain, $domain)
 {
     global $zdbh;
     // Check for spaces and remove if found...
     $subdomain = strtolower(str_replace(' ', '', $subdomain));
     // Check to make sure the domain is not blank before we go any further...
     if ($subdomain == '') {
         self::$blank = TRUE;
         return FALSE;
     }
     // Check for invalid characters in the domain...
     if (!self::IsValidDomainName($subdomain)) {
         self::$badname = TRUE;
         return FALSE;
     }
     // Check for input manipulation domains that aren't ours
     if (!self::IsValidDomain($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 MADmin 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', $subdomain);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() > 0) {
             self::$alreadyexists = TRUE;
             return FALSE;
         }
     }
     return TRUE;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:37,代码来源:controller.ext.php

示例6: CheckUpdateForErrors

 static function CheckUpdateForErrors($email, $fullname, $language, $phone, $address, $postalCode)
 {
     global $zdbh;
     if (fs_director::CheckForEmptyValue($email) || fs_director::CheckForEmptyValue($fullname) || fs_director::CheckForEmptyValue($language) || fs_director::CheckForEmptyValue($phone) || fs_director::CheckForEmptyValue($address) || fs_director::CheckForEmptyValue($postalCode)) {
         self::$blank = true;
         return false;
     }
     if (!self::IsValidEmail($email)) {
         self::$emailerror = true;
         return false;
     }
     return true;
 }
开发者ID:bbspike,项目名称:sentora-core,代码行数:13,代码来源:controller.ext.php

示例7: CheckCreateForErrors

 static function CheckCreateForErrors($username, $databasename)
 {
     global $zdbh;
     # Check to make sure the database name is not blank before we go any further...
     if ($databasename == '') {
         self::$blank = true;
         return false;
     }
     // Check for invalid username
     if (!self::IsValidUserName($databasename)) {
         self::$badname = true;
         return false;
     }
     # Check to make sure the database is not a duplicate...
     $sql = "SELECT COUNT(*) FROM x_mysql_databases WHERE my_name_vc=:dbName AND my_deleted_ts IS NULL";
     $dbName = $username . "_" . $databasename;
     $numrows = $zdbh->prepare($sql);
     $numrows->bindParam(':dbName', $dbName);
     if ($numrows->execute()) {
         if ($numrows->fetchColumn() != 0) {
             self::$alreadyexists = true;
             return false;
         }
     }
     return true;
 }
开发者ID:caglaroflazoglu,项目名称:sentora-core,代码行数:26,代码来源:controller.ext.php

示例8: CheckCreateForErrors

 static function CheckCreateForErrors($packagename, $uid, $pid = 0)
 {
     global $zdbh;
     $packagename = str_replace(' ', '', $packagename);
     # Check to make sure the packagename is not blank or exists for reseller before we go any further...
     if (!fs_director::CheckForEmptyValue($packagename)) {
         $sql = "SELECT COUNT(*) FROM x_packages WHERE UPPER(pk_name_vc)=:packageNameSlashes AND pk_reseller_fk=:uid AND pk_id_pk !=:pid AND pk_deleted_ts IS NULL";
         $packageNameSlashes = addslashes(strtoupper($packagename));
         $numrows = $zdbh->prepare($sql);
         $numrows->bindParam(':packageNameSlashes', $packageNameSlashes);
         $numrows->bindParam(':uid', $uid);
         $numrows->bindParam(':pid', $pid);
         if ($numrows->execute()) {
             if ($numrows->fetchColumn() != 0) {
                 self::$alreadyexists = true;
                 return false;
             }
         }
     } else {
         self::$blank = true;
         return false;
     }
     // Check packagename format.
     if (!self::IsValidPackageName($packagename)) {
         self::$badname = true;
         return false;
     }
     return true;
 }
开发者ID:Boter,项目名称:madmin-core,代码行数:29,代码来源:controller.ext.php


注:本文中的module_controller::blank方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。