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


PHP email::valida方法代码示例

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


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

示例1: email

// forgot_password.php
// All Sections
// Form to retrieve forgot password
//*
//Include global functions
include_once "common.php";
//Initiate database functions
include_once "ez_sql.php";
// config
include_once "configuration.php";
$action = get_param("action");
if ($action == "retrieve") {
    $forgotemail = get_param("forgotemail");
    //Validate email
    $oEmail = new email();
    if (!$oEmail->valida($forgotemail)) {
        $msgFormErr = _FORGOT_PASSWORD_FORM_ERROR . "<br>";
    } else {
        if ($retrieve = $db->get_row("SELECT studentcontact_id, studentcontact_lname, studentcontact_fname FROM studentcontact WHERE studentcontact_email='" . $forgotemail . "'")) {
            $name = $retrieve->studentcontact_fname . " " . $retrieve->studentcontact_lname;
            $id = $retrieve->studentcontact_id;
            $lostpassword = $db->get_var("SELECT web_users_password FROM web_users WHERE web_users_type='C' AND web_users_relid='" . $id . "'");
        } else {
            if ($retrieve = $db->get_row("SELECT teachers_id, teachers_lname, teachers_fname FROM teachers WHERE teachers_email='" . $forgotemail . "'")) {
                $name = $retrieve->teachers_fname . " " . $retrieve->teachers_lname;
                $id = $retrieve->teachers_id;
                $lostpassword = $db->get_var("SELECT web_users_password FROM web_users WHERE web_users_type='T' AND web_users_relid='" . $id . "'");
            }
        }
    }
    if (strlen($lostpassword)) {
开发者ID:google-code-backups,项目名称:swifttide,代码行数:31,代码来源:forgot_password.php

示例2: email

    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_ENTER_FIRST . "<br>";
}
if (!strlen($tlname)) {
    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_ENTER_LAST . "<br>";
}
if (!strlen($username)) {
    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_ENTER_USER . "<br>";
}
if (!strlen($password)) {
    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_ENTER_PASS . "<br>";
}
if (!strlen($email)) {
    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_ENTER_EMAIL . "<br>";
} else {
    $oEmail = new email();
    if (!$oEmail->valida($email)) {
        $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_EMAIL_VALID . "<br>";
    }
}
//Check to make sure duplicate usernames are not being assigned
//check for duplicate username.
$tot = $db->get_var("SELECT COUNT(*) FROM web_users WHERE \nweb_users_username='{$username}' AND web_users_id<>'{$webid}'");
if ($tot > 0) {
    $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_DUP;
}
//If a new user, check to make sure we're not adding dupe username.
//If a new user, webid will be empty
if ($webid == "") {
    $tot = $db->get_var("SELECT COUNT(*) FROM web_users WHERE \nweb_users_username='{$username}'");
    if ($tot > 0) {
        $msgFormErr .= _ADMIN_ADD_EDIT_TEACHER_2_DUP;
开发者ID:google-code-backups,项目名称:swifttide,代码行数:31,代码来源:admin_add_edit_teacher_2.php


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