session_start();
$path = "/home/content/s/e/a/seangarrett/html";
require $path."/cgi/blog.php";
// first thing in this page make the generated random numbers invalid
// set the logged in flag
$invalidInput235790L = "no23457890MN";
/*
loginOk=0: user is not logged in.
loginOk=2: login failed.
loginOk=1: user is logged in.
*/
$loginOk = 0;
$user = "";
$fname ="";
include "$path/include/login_include.php";
/*
videos uploaded will be saved their names into the database. name of a video starts with the id of it's user, date posted and a unique id generated by the database.
so each video has the following format
USER-ID_2007-12-12_ID.ext
table video: id, user_id, date_posted, description, extension, privacy
privacy=2 => can be viewed by every one.
privacy=1 => can be viewed by logged in users only
privacy=0 => can not be viewed by anyone but the user.
*******************************************
blog entries can be viewed by every one. all the entries can be viewed by all the logged in users.
privacy=2 can be viewed by every one
privacy=1 can be viewed only by user's friends list
privacy=0 can not be viewed by anyone.
*******************************************
user can send a message to another use to ask for their friendship, if the other user accepts the request, then
the user will be added to other persons friend list.
- a user's friends list is the list of the people who asked the user for him/her friendship.
- firends is a table where the primary key is a user id and another field with the users friend list as a text representaion like that
user-id1_user-id2_user-id3_ the list ends with "_" and it also serves as a separator of the firends user_id s.
-there is another table for user's pending requests for friendship. once a user requests for someones friendship (meaning the act of adding
someone to his/her friend list, a record will be added to this table. once the other user accepts or rejects that user's request, that entry
will be deleted from the table.
1- john wants to add jim to his friends.
2- a record will be created in that table for jim with john's user id in another field.
3- when jim logs in next, he will see the request
4.1- jim accepts the request: the record will be deleted from pending table and john will be added to jims friends list
4.2- jim rejects the request: the record will be deleted from pending table. no further action is taken.
*******************************************
there is a table for messages, this table has no primary key. messages received and read by the users will simply be deleted from the database.
user_id, from, message, date_sent
where user_id is the user id of the person who will receive the message.
******************************************
/blog/email/attachment/
/blog/email/image/
there is a table for emails, this table has no primary key. emails received and read by the users will simply be kept for 30 days.
user_id, from, subject, message, picture_if_any, file_attachment_if_any, date_sent, is_read.
where user_id is the user id of the person who will receive the message.
a user can send a message to one person, all his friends list, or in any group his a part of if any.
*/
?>