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


PHP check::domain方法代码示例

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


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

示例1: array

 if (!check::human($postvar['human'])) {
     main::errors(nl2br("You're not human.  Neither am I for that matter.  =P  lol  Check the code you entered for the captcha."));
 }
 $coupon_chk = check::coupon($postvar['coupon'], $postvar['username'], $getvar['package']);
 //Can return text as well.  Text is seen as true unless it's "0"
 $getvar['coupon'] = $postvar['coupon'];
 //For any types (Ex. p2h) that might need to grab a coupon.
 if (!$coupon_chk) {
     main::errors(nl2br("The coupon code entered was invalid."));
 }
 $domain = $postvar['cdom'];
 if (!check::domain($postvar['cdom']) && $postvar['cdom']) {
     main::errors(nl2br("Your domain is in the wrong format.  Domains must be alphanumerical and have a valid TLD.  (Domain suffix)"));
 }
 if ($postvar['csub2'] || $postvar['csub']) {
     if (!check::domain($postvar['csub2'])) {
         main::errors(nl2br("Your domain is in the wrong format.  Domains must be alphanumerical and have a valid TLD.  (Domain suffix)"));
     } else {
         if (!ctype_alnum($postvar['csub'])) {
             main::errors(nl2br("Your chosen subdomain must be alphanumerical."));
         }
         $domain = $postvar['csub2'];
         $subdomain = $postvar['csub'];
     }
 }
 if (!check::extra_fields()) {
     main::errors(nl2br("The fields in step 4 contain invalid characters.  (>, <, or #)"));
 }
 if (main::errors()) {
     $order_form_array['ERRORS'] = style::replaceVar("tpl/order/errors.tpl", array()) . "<br><br>";
 } else {
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php

示例2: getTransferDataProvider

 public function getTransferDataProvider()
 {
     $result = ['success' => null, 'error' => null];
     $this->domains = trim($this->domains);
     $list = ArrayHelper::csplit($this->domains, "\n");
     foreach ($list as $key => $value) {
         $strCheck .= "\n{$value}";
         $strCheck = trim($strCheck);
         preg_match("/^([a-z0-9][0-9a-z.-]+)( +|\t+|,|;)(.*)/i", $value, $matches);
         if ($matches) {
             $domain = check::domain(trim(strtolower($matches[1])));
             if ($domain) {
                 $password = check::password(trim($matches[3]));
                 if ($password) {
                     $doms[$domain] = compact('domain', 'password');
                 } else {
                     $dom2err[$domain] = 'wrong input password';
                 }
             } else {
                 $dom2err[$value] = 'unknown error';
             }
         } else {
             $dom2err[$value] = 'empty code';
         }
     }
     return $result;
 }
开发者ID:hiqdev,项目名称:hipanel-module-domain,代码行数:27,代码来源:Domain.php

示例3: do_upgrade


//.........这里部分代码省略.........
             $admin_inform = 1;
             break;
     }
     $adminmsg_array['USER'] = $username;
     $adminmsg_array['NEWPLAN'] = $newpack_name;
     $adminmsg_array['OLDPLAN'] = $current_pack_name;
     $adminmsg_array['NEWSERVER'] = $new_server_name;
     $adminmsg_array['OLDSERVER'] = $old_server_name;
     if ($immediate) {
         $adminmsg_array['NEXTMONTH_IMMEDIATELY'] = "immediately";
     } else {
         $adminmsg_array['NEXTMONTH_IMMEDIATELY'] = "next billing cycle";
     }
     $url = $dbh->config("url");
     if (ADMINDIR) {
         $admin_dir = ADMINDIR;
     } else {
         $admin_dir = "admin";
     }
     $adminmsg_array['APPROVE_LINK'] = $url . $admin_dir . "/?page=users&sub=upgrade";
     if ($upgrade) {
         if ($new_plan_data['type'] == "paid") {
             $new_invoice_text = "  A new invoice has been generated.";
             if ($current_pack_type == "paid" && $user_data['additional']['monthly'] >= $new_plan_additional['monthly']) {
                 unset($new_invoice_text);
             }
         }
         $serverfile = server::createServer($newpack);
         if ($new_server) {
             $new_serv_pass_for_email = time();
             $domsub = "sub";
             //Checks to see if the domain contains 3 or more segments and fails if there are more than 3 and if the last one two aren't TLD portions, it fails,
             //so we can see if this is a subdomain this way.
             if (check::domain($user_data['user_data']['domain'])) {
                 $domsub = "dom";
             }
             $done = $serverfile->signup(type::packageserver($newpack), $new_plan_data['reseller'], $username, $user_email, $new_serv_pass_for_email, $user_data['user_data']['domain'], type::packageBackend($newpack), $domsub);
             if ($done === true) {
                 if ($new_plan_data['reseller']) {
                     $uemaildata = email::emailTemplate("upgrade-newserv-resell-welcome");
                 } else {
                     $uemaildata = email::emailTemplate("upgrade-newserv-welcome");
                 }
                 $change_tht = 1;
                 main::errors("Your upgrade request has been completed.  An email has been sent to you detailing your upgraded account on the new server." . $new_invoice_text);
             } else {
                 return false;
             }
         } else {
             if ($serverfile->canupgrade) {
                 $done = $serverfile->do_upgrade($new_plan_data['server'], type::packageBackend($newpack), $username);
                 if ($done === true) {
                     if ($new_plan_data['reseller']) {
                         $uemaildata = email::emailTemplate("upgrade-resell-welcome");
                     } else {
                         $uemaildata = email::emailTemplate("upgrade-welcome");
                     }
                     $change_tht = 1;
                     main::errors("Your upgrade request has been completed.  An email has been sent to you detailing your upgraded account." . $new_invoice_text);
                 } else {
                     return false;
                 }
             } else {
                 $emaildata = email::emailTemplate("manual-upgrade-request");
                 main::errors("Your upgrade request has been added and the administrator has been emailed.");
             }
开发者ID:cozylife,项目名称:tht-reworked,代码行数:67,代码来源:class_upgrade.php


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