Merge branch 'master' of https://git.williammiceli.systems/williammiceli-educational/CS4430-Project
This commit is contained in:
@@ -3,14 +3,14 @@ server {
|
||||
listen [::]:80;
|
||||
|
||||
root /var/www/;
|
||||
index index.html;
|
||||
index login.php;
|
||||
server_name _;
|
||||
|
||||
access_log /var/log/nginx/access.log;
|
||||
error_log /var/log/nginx/error.log;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html =404;
|
||||
try_files $uri $uri/ /login.php =404;
|
||||
ssi on;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
drop database if exists friendbook;
|
||||
|
||||
create database friendbook;
|
||||
|
||||
use friendbook;
|
||||
|
||||
create table login(
|
||||
username varchar(25),
|
||||
pword varchar(25),
|
||||
primary key(username));
|
||||
|
||||
create table contacts(
|
||||
username varchar(25),
|
||||
fname varchar(25),
|
||||
lnam varchar(25),
|
||||
primary key(username),
|
||||
foreign key(username) references login(username));
|
||||
|
||||
create table messages(
|
||||
messageID int,
|
||||
sender varchar(25),
|
||||
recipient varchar(25),
|
||||
message text,
|
||||
date date,
|
||||
haveread varchar(1),
|
||||
primary key(messageID),
|
||||
foreign key(sender) references contacts(username),
|
||||
foreign key(recipient) references contacts(username));
|
||||
|
||||
create table friendList(
|
||||
username varchar(25),
|
||||
friend varchar(25),
|
||||
confirm boolean);
|
||||
|
||||
insert into login
|
||||
values ('user1', 'password1');
|
||||
insert into login
|
||||
values ('user2', 'password2');
|
||||
|
||||
insert into contacts
|
||||
values ('user1', 'num1', 'uno');
|
||||
insert into contacts
|
||||
values ('user2', 'num2', 'dos');
|
||||
|
||||
insert into messages
|
||||
values ('1', 'user1', 'user2', 'hello, how are you', now(), 'Y');
|
||||
insert into messages
|
||||
values ('2', 'user2', 'user1', 'im doing good, thanks', now(), 'N');
|
||||
@@ -1,30 +0,0 @@
|
||||
<!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</title>
|
||||
<meta http-equiv="content-type"
|
||||
content="text/html; charset=utf-8"/>
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
body {
|
||||
background-color: #3B5998;
|
||||
}
|
||||
</style>
|
||||
<h2><font color="white">friendbook</h2>
|
||||
|
||||
<button type="button" onclick="window.location.href = '/friends.html'">See Friends</button>
|
||||
<br><br>
|
||||
<button type="button" onclick="window.location.href = '/messages.html'">See Messages</button>
|
||||
<br><br>
|
||||
<button type="button" onclick="window.location.href = '/search.php'">Search</button>
|
||||
<br><br>
|
||||
<button type="button" onclick="window.location.href = '/sendMessage.php'">Message Someone</button>
|
||||
<br><br>
|
||||
<button type="button" onclick="window.location.href = '/findFriend.html'">Find a New Friend</button>
|
||||
<br><br>
|
||||
<button type="button" onclick="window.location.href = '/pendingFriend.html'">Check Pending Friends</button>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user