本文整理汇总了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');
}
}
}
}