mysql | security代写 | javascript作业 | 代做css | assignment | sql | php作业 | database代写 | web代做 – 2170 ASSIGNMENT 4

2170 ASSIGNMENT 4

mysql | security代写 | javascript作业 | 代做css | assignment | sql | php作业 | database代写 | web代写 – 该题目是一个常规的php+ sql的练习题目代写, 是比较典型的mysql/security/javascript/css/sql/php/database等代写方向, 这个项目是web方面的代写题目,涉及的面比较广

mysql代写 代写mysql mysql代写 database代做

Purpose. This set of assignments will help you develop a lightweight Content Management System (CMS) that will be similar to Twitter in this case called Chatter. While we aren’t going to implement all the features of Twitter, you may want to take a look at Twitter to familiarize yourself with the main features (namely, being able to add posts/tweets, being able to see all the posts from people you follow on your Twitter account, being able to search Twitter to see related tweets to your search, seeing all of your own tweets, and seeing the posts/user information of people you follow and people who follow you).

The purpose of this assignment is to build on the codebase you created in the last assignments.

In this assignment, you will do the following:

  1. Add a login function: a. Add in a sign-up/login page (see Figure 1) b. Create a registration process for new users: add a page to update user information (first and last name, and a profile description) and a way to select users to follows (Figures 3 and 4). c. Add logout functionality (available on pages in our application) (see Figure 5 ).
  2. Add the functionality to follow users (see Figure 5).
  3. Use sessions to keep information alive during a session and between sessions
  4. Update all queries to the database to be prepared statements where you bind the variables to these prepared statement for a more secure transfer of data.
  5. Create an additional relational database table that will keep track of adding new users and login information using sql mysql代写 database代做”> mysql (you can use PHPMYAdmin.
  6. Ensure that you add functionality noted as missing in Assignment 3 (the markers will list items that were missing in the last assignment and these need to be addressed in this assignment in the assignment documentation).

Note that if you decide to make small changes to your templates you designed in previous assignments, that is fine but these changes must also be described in your documentation.

Image and content considerations: You are allowed to use images and content that are created by you (e.g. text paragraphs that you conceptualized and wrote, photographs, etc.). You also have some options if you do not want to create the content yourself: i. You are also allowed to use free-to-use (or images that are licensed with Creative Commons or other free-to-use licenses) with appropriate attribution. ii. You are allowed to use Lorem Ipsum (dummy) text instead of actual text content. You can use the Lorem Ipsum generator to generate paragraphs of dummy text: http://www.lipsum.com iii. Attribution: If you use any external content (free-to-use images, etc.), include a file named references.txt as part of your submission. Cite the source appropriately using one of the three citation formats accepted at the Faculty of Computer Science: ACM, APA and IEEE. Copyrighted image must not be used without permission of the content creator.

Assignment Information: Grades. This assignment will be graded out of 60 marks and then scaled to 10 points.

Submission. All deliverables must be submitted on Brightspace: https://dal.brightspace.com

Late submission policy. There is a two-day late policy (one day late: 15% deduction, two day late: 30% deduction). No assignments will be accepted after the late deadline.

Academic Integrity. Dalhousie academic integrity policy applies to all submissions in this course. You are expected to submit your own work. Please refer to and understand the academic integrity policy, available at: https://www.dal.ca/academicintegrity

Content for the website. Do not copy and paste any content from other websites that are available on the WWW. If you want to include content (as and when required), you have to either create your own content, or use dummy text (Lorem Ipsum…). You can use the Lorem Ipsum generator to generate posts/chats of dummy text: http://www.lipsum.com

Deliverables. Follow instructions of this document to submit all deliverables of this assignment.

General Instructions F.1. Create a folder named A 4. F.1. Make sure you copy all your scripts, images, folders and other files from your A 3 submission (e.g., everything from the folder you named A 3 submitted for Assignment 3 and paste them into A 4 ) and make sure the updated and additional files are also included. F.1. For this assignment, you will continue to use MySQL. Note: if you are using a local stack that come with MariaDB or another DBMS which is not MySQL it is your responsibility to ensure/verify that your PHP-MySQL scripts work with MySQL as well. We will be using MySQL for marking. [ MariaDB is referred to as a dropin replacement to M ySQL, and therefore, it should work as a direct replacement. It should work with the same queries that you had used for MySQL

but still make sure it works] F.1. Start working on this assignment by creating the additional database table and link it properly to the other tables. This will help you avoid errors when working on other aspects of the assignment.

NOTE: continue to use ‘placeholder’ images for this assignment. You will not add images to posts or do not need to have different images for different users. This can remain the same as what you did for Assignment 3.

Database Use

DB.1. You will add a login table to the database Chat that you set up for Assignment 3. You will use the login to determine the owner/user of the account. Note: you do not need to submit a database dump along with your submission. However, you must create the table structure exactly as specified in this section, because we will be using a database with the specified structure to verify your code.

Note: In your DB setup, you must set the username to be root and password to be root.

New Table: Login DB.2. Create a table named login. This table will contain users login credentials (i.e. username and passwords). For security purposes, it is better to create different tables for user information and user login credentials. It must have the following columns: a. loginID i. Must be configured as the primary key. ii. Must be an INTEGER (4). iii. Must be set to auto increment. Must not be null.

b. UserID
i. Must be an INTEGER (4). Must not be null.
ii. This is a foreign key; link it with UserID field in the Users table.
c. username
i. Must be VARCHAR (255). Must not be null.
d. password
i. Must be VARCHAR (255). Must not be null.

Summary Functionality/Additional Functionality for Assignment 4 F.1 Create a main landing page called chatter. php (see Figure 1). F.2 Create a login/sign up page for a new account and to sign into an existing account (see Figure 2). a. New users will setup a profile page (Figure 3) and find people to follow (Figure 4). F.3 After someone has login, you will continue the session while the user is signed into their account. In addition, add the functionality to sign out in the application (see Figure 5 ). F.4 Add the functionality to follow users in the application (see Figure 5 ). F.5 Update all the SQL queries that you created in Assignment 3 to prepared statements and bind the variables.

Note: you will use session variables for this assignment. In particular, when you start a session you should keep track of whether the user is a first time user (true/false), if they are login (true/false), their username, and their name (first and last). Use this information to update the pages in the application (e.g., can use the username to connect to the User’s table and Follows table to update the information on each page).

Detailed Functionality for Assignment 4 F1. Create a main landing page called chatter.php (see Figure 1). This page should have a similar look and feel to the entire application. This is the main page that will show up is a user doesnt haven’t a Chatter account or if a user has signed out of their Chatter account.

Figure 1. Create a login/signup page called chatter.php. A user will either select to sign up for a new account or
login into an existing account.

F2. Create a login/sign up template page (account.php) for a new account and to sign into an existing account (Figure 2).

  • For Sign Up – a user will enter a username and password. The password should display *** as they enter the password. You should require the password to have at least 6 characters and one number. If they enter a wrong password, ask them to enter it again and let them know the rules. Then check with the Login table to see if the username is available to use. Each user should have a unique username. The username and password should be added to the Login table in the database. Create a session once the information has been updated to the database and indicate that this is a first time user as a session variable [newUser]true.
  • Note: At this stage, you are not expected to implement any password encryption. You can simply store and retrieve passwords in plain text. We will add security in the next assignment.
  • For Login – a user will enter their username and password. A check will be made with the database. If the username/password is incorrect print an error message; otherwise continue the session and note that the login is true. If the user is not a first time user, then direct them to their homepage (index.php). You will use the login information to know which user the account belongs to (and which people they follow and follow them). Set the login session variable to true and set the username session variable and name session variable. If they are a first time user, then: o IF they are a first time user (use the session variable set in sign in to know this):
i. Direct the user to the profile.php page (Figure 3 ) and when they complete the profile
page and update the database Users table.
ii. Then direct the user to the findPeople.php page (Figure 4 ), which will display all the
people that the new user can follow. Update the Following table in the database to
include these people to follow.
iii. Finally, change the session variable that says the user is new to false. Also, set the
session variable login to true and add their username to the session variable, and
direct the user to their home page (index.php).
Figure 2. Create a login page that can be used for signing up for a new account and for logging into an existing
account (called account.php). You can use a query string to determine how this page will look (e.g., login or
sign up page) and how to interact with the database.
Figure 3. Continue the session for a new user on this
template page (profile.php). The user will fill in their
first and last name, and a short profile description.
This information should get added to the Users table
in the database and when they press "Next" take
them to find people to follow (findPeople.php). Also,
add their name (first and last) to the session variable.
Figure 4. Continue the session on this template page
(findPeople.php). List all users on this page and have
some way for the user to select people to follow (e.g.,
add a checkmark beside people's name and profile).
Update the database (Follow table) when they press
"Next". Take them to their homepage (index.php). You
can use the session information to help determine
their homepage.

F.3. After someone has login, you will continue the session while the user is signed into their account. In addition, add the functionality to sign out in the application (see Figure 5). Add a logout link/button under the top navigation bar like in Figure 5 or on the top navigation bar your choice as long as it is consistent for all pages and works with the look and feel of your application. If the user logs out, change the session variable login to false, close the session and direct them to the main landing page.

F.4. Add the functionality to follow users in the application (see Figure 5). When the account user clicks on any user in the application to go to their chats page (chat.php) add a Follow button to the right profile panel for the user. If the button is pressed, add this user to their (account user) following list in the database.

Figure 5. Add a logout feature on each page of your application  similar to this figure. If the user logs out then
change the session variable login to false and direct them to the main landing page. Add a Follow button on
users main chat page.

F.5. Update all the SQL queries (including adding new data) that you created in Assignment 3 (and in this Assignment) in all your application pages to prepared statements and bind the variables to these prepared statements.

Logout
link/button
Add this to all
pages in your
application.
Add a Follow button on
chat.php page (the page that
displays each user's chats and
short description of them). If
you are on a user's chat page
and aren't following them, add
a button on the side menu and
update the Following Table in
the database.

Submissions (DELIVERABLES) (will be graded for a total of 60 marks)

  1. Folder structure (5 marks)
    • Folder structure must be: A 4 |—- index.php |—- chats.php |—- follow.php |—- search.php |—- login.php |—- chatter.php |—- profile.php |—- addPeople.php |—- css | |—- css files as per framework^1 | |—- CSS files that you might have created |—- fonts | |—- Font files as per framework | |—- Other font files that you might have used |—- js | |—- javascript files as per framework^1 | |—- Other JavaScript files that you might have created/used |—- misc | |—- <placeholder for future functionality empty folder> |—- includes | |—- functions.php includes functions that can be used across all Templates (you’ll start building this up this assignment) |—- images | |—- Images that would have downloaded from Brightspace or added A 3 —–| — include any files in this directory from A 3 that weren’t included in the above directory.
  2. Navigation and Overall look/functionality of site (5 marks)
    • Look and feel is consistent between all templates and new templates
    • Navigation works as expected (i.e. proper pages load with up to date content).
  3. Database and update queries ( 10 marks)
    • Add the new table into the database and connect it to the Users table.
    • Update all the SQL queries in the templates to prepared statements
  4. Session functionality (10 marks)
    • When a user signs up or login, a session is started capturing the needed information to make it look like an interactive session throughout the application. The application uses the session data, to update the pages with appropriate calls to the databases (e.g., using the unique username to in the Login table to connect to the appropriate user in the User Table, Followers Table etc).
  5. Landing page, login/sign up template page ( 5 marks)
    • Design, Functionality, Good programming style and commenting
  6. Updating Profile and adding people to follow template (10 marks)
    • Design, Functionality, Good programming style and commenting
  7. Add the logout function (5 marks)
    • Design, Functionality, Good programming style (and deals with session)
  8. Add Follow button to the xxx page and update database. ( 5 marks)
    • Design, Functionality, Good programming style
    • (it should update the database accordingly, the page information (e.g., chats) and the number counts on the following link)
  9. Documentation (framework.txt) (5 marks) 1 to 2 pages max
    • If any missing parts/parts for improvement listed from A3 list and describe how you fixed them.
    • Any updated elements from A 3 (if you decided to change anything from A 3 ) explain what you changed.
  • A description of the updated database
  • A description of how you implement login/sign up, creating a user profile, sessions, adding to following, and logging out.
  • Any references