本文整理汇总了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;
}
}
示例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'] . '" />';