本文整理匯總了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>';
}
}
示例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');
}
}
}
}