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


PHP DB_Functions::getSingleUserByEmail方法代碼示例

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


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

示例1: usersList

<?php

include 'session.php';
include_once 'db_functions.php';
$db = new DB_Functions();
//////////////////////////////////////////////////////////////////////
if (isset($_POST["insertion"])) {
    $result = $db->insertReport($_POST);
}
///////////////////////////////////////////////////////////////////////
$reportNames = $db->getAllReportList();
$currentUser = $db->getSingleUserByEmail($login_session);
$currentUserRow = mysql_fetch_array($currentUser);
function usersList()
{
    $db = new DB_Functions();
    $users = $db->getAllUsers();
    if ($users != false) {
        $no_of_users = mysql_num_rows($users);
    } else {
        $no_of_users = 0;
    }
    echo '<li><a >All</a></li>';
    if ($no_of_users > 0) {
        while ($row = mysql_fetch_array($users)) {
            echo '<li><a >' . $row["Name"] . '</a></li>';
        }
    } else {
        echo '<li>No Users Registered Yet!</li>';
    }
}
開發者ID:ameerhamza26,項目名稱:audit,代碼行數:31,代碼來源:reportView.php

示例2: header

<?php

include_once 'db_functions.php';
session_start();
error_reporting(0);
$user_check = $_SESSION['login_user'];
$db = new DB_Functions();
$user = $db->getSingleUserByEmail($user_check);
$row = mysql_fetch_assoc($user);
$login_session = $row['Email'];
$login_name = $row['Name'];
$login_pass = $row['Password'];
if (!isset($_SESSION['filter_user'])) {
    $_SESSION['filter_user'] = "notset";
}
if (!isset($_SESSION['login_user'])) {
    if ($_SERVER['REQUEST_URI'] === "/audit/GRAPH/allReportGraph.php") {
        header('Location: ../login.php');
    } else {
        if ($_SERVER['REQUEST_URI'] === "/audit//GRAPH/openCloseGraph.php") {
            header('Location: ../login.php');
        } else {
            if ($_SERVER['REQUEST_URI'] === "/audit/excel/import.php") {
                header('Location: ../login.php');
            } else {
                header('Location: login.php');
            }
        }
    }
}
開發者ID:ameerhamza26,項目名稱:audit,代碼行數:30,代碼來源:session.php


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