42 lines
1.4 KiB
PHP
42 lines
1.4 KiB
PHP
<?php
|
|
require 'common.php';
|
|
require 'loginRequired.php';
|
|
?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
<head>
|
|
<title>friendbook Pending Friend Requests</title>
|
|
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
|
|
<link rel="stylesheet" type="text/css" href="styling.css">
|
|
</head>
|
|
<body>
|
|
<!--#include virtual="header.html" -->
|
|
<!--#include virtual="topNavBar.html" -->
|
|
<?php
|
|
try{
|
|
echo '<pre>';
|
|
echo "Pending Friends:\n\n";
|
|
$sql_select = "SELECT username";
|
|
$sql_from = "FROM friendList";
|
|
$sql_where = "WHERE friend = ".$_SESSION["loggedInUser"]." and confirm = false";
|
|
$sql_statement = $sql_select." ".$sql_from." ".$sql_where."";
|
|
foreach($db_connection->query($sql_statement) as $row)
|
|
{
|
|
echo "".$row["username"]."";
|
|
echo "<br>";
|
|
}
|
|
|
|
echo '</pre>';
|
|
}catch(PDOException $e){
|
|
echo "PDOException: ".$e->getMessage().PHP_EOL;
|
|
}catch(Exception $e){
|
|
echo "Exception: ".$e->getMessage().PHP_EOL;
|
|
}
|
|
?>
|
|
</body>
|
|
</html>
|
|
<?php
|
|
$db_connection = null;
|
|
?>
|