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


PHP Access::get_email方法代码示例

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


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

示例1: account_validate

 public static function account_validate($username, $firstname, $lastname, $email)
 {
     $user = new Access();
     if (empty($username)) {
         validate::$er_message = '<i style="color: red;">Username field cannot be left empty</i><br/>';
         return false;
     }
     if (empty($email)) {
         validate::$er_message .= '<i style="color: red;">Email field cannot be left empty</i><br/>';
         return false;
     }
     if (empty($firstname)) {
         return true;
     }
     if (strlen($firstname) > 10 || strlen($firstname) < 2) {
         validate::$er_message = '<i style="color: red;">First name must be greater the 2 characters and less the 10 characters long! </i><br/>';
         return false;
     }
     if (is_numeric($firstname)) {
         validate::$er_message = '<i style="color: red;">First name must be letters only!</i><br/>';
         return false;
     }
     if (empty($lastname)) {
         return true;
     }
     if (strlen($lastname) > 10 || strlen($lastname) < 2) {
         validate::$er_message = '<i style="color: red;">Last name must be greater the 2 characters and less the 10 characters long! </i><br/>';
         return false;
     }
     if (is_numeric($lastname)) {
         validate::$er_message = '<i style="color: red;">Last name must be letters only!</i><br/>';
         return false;
     }
     if (User::ifUserExist($email) == true && $email == $user->get_email($_SESSION['uid'])) {
         return true;
     } elseif (User::ifUserExist($email) == true && $email !== $user->get_email($_SESSION['uid'])) {
         validate::$er_message = '<i style="color: red;">Someone else is already using that email address!</i><br/>';
         return false;
     }
     if (Validate::is_valid_email($email) == false) {
         validate::$er_message .= '<i style="color: red;">Please enter a valid email address!</i><br/>';
         return false;
     } else {
         return true;
     }
 }
开发者ID:stephenx99,项目名称:SocialAfrica,代码行数:46,代码来源:Validate.php

示例2: Access

    <div class="login" style="width: 400px;">
        <form id="contactform" name="login" method="post" action="">
            <fieldset id="contactform">
                <?php 
echo Validate::$er_message;
?>

                <?php 
$user = new Access();
echo '<div class="one_full_c">';
echo '<label for="subject">My Username:<span></span></label>';
echo '<input type="text" name="username" id="subject" value="' . $user->get_user_name($_SESSION['uid']) . '" class="required requiredField subject" />';
echo '</div>';
echo '<div class="one_full_c">';
echo '<label for="subject">My Email:<span></span></label>';
echo '<input type="text" name="email" id="subject" value="' . $user->get_email($_SESSION['uid']) . '" class="required requiredField subject" />';
echo '</div>';
//echo '<div class="one_full_c">';
//echo '<label for="subject">My Password:<span></span></label>';
//echo '<input type="password" name="password" id="subject" value="" class="required requiredField subject" />';
//echo '</div>';
echo '<div class="one_full_c">';
echo '<label for="subject">My first Name:<span></span></label>';
echo '<input type="text" name="firstname" id="subject" value="' . $user->get_f_name($_SESSION['uid']) . '" class="required requiredField subject" />';
echo '</div>';
echo '<div class="one_full_c">';
echo '<label for="subject">My Last Name:<span></span></label>';
echo '<input type="text" name="lastname" id="subject" value="' . $user->get_l_name($_SESSION['uid']) . '" class="required requiredField subject" />';
echo '</div>';
echo '<div class="one_full_c">';
echo '<input type="hidden" name="id" id="submitted" value="' . $_SESSION['uid'] . '" />';
开发者ID:stephenx99,项目名称:SocialAfrica,代码行数:31,代码来源:my+account.php


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