當前位置: 首頁>>代碼示例>>PHP>>正文


PHP check::user方法代碼示例

本文整理匯總了PHP中check::user方法的典型用法代碼示例。如果您正苦於以下問題:PHP check::user方法的具體用法?PHP check::user怎麽用?PHP check::user使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在check的用法示例。


在下文中一共展示了check::user方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

     $subdomains_query = $dbh->select("subdomains");
     $tldonly = $dbh->config("tldonly");
     if ($dbh->num_rows($subdomains_query) == 0 || $tldonly == "1") {
         $packages_list_array["CANHASSUBDOMAIN"] = "";
     } else {
         $packages_list_array["CANHASSUBDOMAIN"] = '<option value="sub">Subdomain</option>';
     }
     $maincontent = style::replaceVar("tpl/order/packages-list.tpl", $packages_list_array);
 } else {
     if ($_POST['submitfinish']) {
         check::empty_fields(array("coupon"));
         if (main::errors()) {
             $order_form_array['ERRORS'] = style::replaceVar("tpl/order/errors.tpl", array()) . "<br><br>";
         } else {
             //We don't check that the TOS is checked because it will be seen as an empty field and get caught by check:empty_fields.
             if (!check::user($postvar['username'])) {
                 main::errors(nl2br("The username was either taken or was in an invalid format.\n\n                                           Usernames:\n                                           1.) Must be between 4-8 characters long\n                                           2.) Must not start with a number\n                                           3.) Must be alphanumeric"));
             }
             if (!check::pass($postvar['password'], $postvar['confirmp'])) {
                 main::errors(nl2br("Your passwords either do not match or contain invalid characters.  (< and > are not allowed.  O>.<O  Nor is #"));
             }
             if (!check::email($postvar['email'])) {
                 main::errors(nl2br("Your email address didn't match one or more of the following:\n\n                                           Your email address:\n                                           1.) Must be in the correct format\n                                           2.) Must not be associated with another client\n                                           3.) If you're using an email address hosted with us, please make sure your email address has the proper \"MX\" or \"A\" DNS record."));
             }
             if (!check::firstname($postvar['firstname'])) {
                 main::errors(nl2br("In our system, your first and last name may only contain letters and the following characters:.' - and space."));
             }
             if (!check::lastname($postvar['lastname'])) {
                 main::errors(nl2br("In our system, your first and last name may only contain letters and the following characters:.' - and space."));
             }
             if (!check::address($postvar['address'])) {
開發者ID:cozylife,項目名稱:tht-reworked,代碼行數:31,代碼來源:index.php


注:本文中的check::user方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。