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


PHP check::tzone方法代码示例

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


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

示例1:

 if (!check::city($postvar['city'])) {
     main::errors(nl2br("Your city may only contain letters and spaces."));
 }
 if (!check::state($postvar['state'])) {
     main::errors(nl2br("Your state may only contain letters and the following characters:.- and space"));
 }
 if (!check::zip($postvar['zip'])) {
     main::errors(nl2br("Your zip may only be 10 characters long and contain only  letters, numbers, and the following characters: - and space"));
 }
 if (!check::country($postvar['country'])) {
     main::errors(nl2br("Your country code may only contain 2 letters."));
 }
 if (!check::phone($postvar['phone'])) {
     main::errors(nl2br("Your phone number may only contain numbers and the - character and must be between 10 and 20 numbers long."));
 }
 if (!check::tzone($postvar['tzones'])) {
     main::errors(nl2br("Your time zone may only contain letters and the / _ and - characters."));
 }
 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)"));
开发者ID:cozylife,项目名称:tht-reworked,代码行数:31,代码来源:index.php


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