Made $db global
This commit is contained in:
@@ -61,9 +61,9 @@ if ($_SERVER["REQUEST_METHOD"] == "POST") {
|
||||
}
|
||||
|
||||
if (!empty($_POST["actions"]) && !empty($_POST["userID"])) {
|
||||
changeUserStatusByID($db, $_POST["userID"], $_POST["actions"]);
|
||||
changeUserStatusByID($_POST["userID"], $_POST["actions"]);
|
||||
} elseif (!empty($_POST["actions"]) && !empty($_POST["groupID"])) {
|
||||
changeGroupStatusByID($db, $_POST["groupID"], $_POST["actions"]);
|
||||
changeGroupStatusByID($_POST["groupID"], $_POST["actions"]);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -183,7 +183,7 @@ function test_input($data) {
|
||||
<!-- Table construction via php PDO. -->
|
||||
<?php
|
||||
if ($pagetype == 'user') {
|
||||
$q = search20UsersFromNByStatus($db, $listnr, $search, $status);
|
||||
$q = search20UsersFromNByStatus($listnr, $search, $status);
|
||||
|
||||
while($user = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||
$userID = $user['userID'];
|
||||
@@ -218,7 +218,7 @@ function test_input($data) {
|
||||
");
|
||||
}
|
||||
} else {
|
||||
$q = search20GroupsFromNByStatus($db, $listnr, $search, $groupstatus);
|
||||
$q = search20GroupsFromNByStatus($listnr, $search, $groupstatus);
|
||||
|
||||
while ($group = $q->fetch(PDO::FETCH_ASSOC)) {
|
||||
$groupID = $group['groupID'];
|
||||
|
||||
@@ -6,11 +6,8 @@
|
||||
<?php
|
||||
include_once("../queries/friendship.php");
|
||||
|
||||
if (empty($_SESSION["userID"]))
|
||||
$_SESSION["userID"] = 2;
|
||||
|
||||
// Get all the friends of a user.
|
||||
$friends = selectAllFriends($db, $_SESSION["userID"]);
|
||||
$friends = selectAllFriends($_SESSION["userID"]);
|
||||
$i = 0;
|
||||
|
||||
// Print all the users.
|
||||
|
||||
@@ -9,11 +9,8 @@
|
||||
// Load file.
|
||||
include_once("../queries/friendship.php");
|
||||
|
||||
if (empty($_SESSION["userID"]))
|
||||
$_SESSION["userID"] = 2;
|
||||
|
||||
// Get all the friends of a user.
|
||||
$friends = selectAllFriends($db, $_SESSION["userID"]);
|
||||
$friends = selectAllFriends($_SESSION["userID"]);
|
||||
$i = 0;
|
||||
|
||||
// Print all the users.
|
||||
@@ -69,7 +66,7 @@
|
||||
include_once("../queries/group_member.php");
|
||||
|
||||
// Get all the friends of a user.
|
||||
$groups = selectAllGroupsFromUser($db, $_SESSION["userID"]);
|
||||
$groups = selectAllGroupsFromUser($_SESSION["userID"]);
|
||||
$i = 0;
|
||||
|
||||
// Print all the users.
|
||||
|
||||
Reference in New Issue
Block a user