<?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>'; } }
<?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'] = "******"; } 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'); } } } }