caleb531 / cougarbooks Goto Github PK
View Code? Open in Web Editor NEWA textbook-reselling website for CSU San Marcos students
Home Page: http://cis444.cs.csusm.edu/team2/cougarbooks/
A textbook-reselling website for CSU San Marcos students
Home Page: http://cis444.cs.csusm.edu/team2/cougarbooks/
According to the prompt for phase 3 of the project:
Show the content of the tables after populating them with some sample data
As needed, you can refer to the current SQL database implementation at misc/db-implementation.png
.
You should provide basic logging on users including login/logout, data added, data deleted, and so on. Make sure to provide an administrative access system to add/edit/delete users, list users/data/transactions in certain ways, etc.
search.html
with essentially same list of textbook ads from homepage
h1
heading containing the title Search Results
Note: The completion of this task is dependent on the completion of #4
Add PHP code to implement ad search. Search SQL query should utilize the LIKE
operator, combined with OR
, to search across the following ad fields:
Write PHP for the homepage so that a arbitrary number of most-recent ads are displayed. Note that this issue is dependent on the completion on #21, since you cannot determine which ads are most recent without such an attribute on each ad.
I have uploaded the Information Flow diagram. Please review it and give any feed back you have on it.
Diagram is in misc folder titled "information-flow-diagram.pdf"
type="password"
to hide the user's password as they type
type="text"
, which is insecuremy-ads.html
which lists all of the open textbook ads for the current user
Note: The completion of this task is dependent on the completion of #4.
Write PHP for individual Ad page such that when the ad_id
is provided in the URL (e.g. ad.php?ad=4
), the relevant ad info is displayed. Feel free to use the $db->get_ad()
function I've already written to get this info; it accepts the ad ID as its only argument.
Each ad should have a date_added
field, so users and administrators know how old an ad is.
The field must be added to:
CREATE TABLE
statementsINSERT
statementsSELECT
queries@evancausey, @sasfirane, @kevinmata, @Enlumis, @morenocortes:
What we discussed and agreed on at today's meeting:
Once Evan posts the revised ERD on GitHub, everyone needs to check GitHub and give their feedback on the design. Once we come to agreement, we can proceed with:
To make PHP database interaction easier, create a Database PHP class (perhaps under assets/php/database.php
, assuming you include()
file in head.php
). Database class must use PDO to interact with database; see my demo for example usage.
Minimum required functionality
ad.html
which displays the information for an individual textbook ad
Add PHP code for a basic user sign-in/sign-out system, including:
The ID of the signed-in user, as well as a flag indicating that someone is signed-in in general, will need to be made accessible somehow (variable or property or whatnot) so other pages can access them.
post.php
). The file should be uploaded to some directory on the server (where all uploaded images will be stored). The path to the photo will be stored on the ad
table for that particular ad entry.Write the PHP for the Account page such that:
assets/php/
called account.php
which will process the form data (should be via $_POST
)$_SESSION['signed_in'] === false
)See the PHP for other pages on the site to learn the style/organizational conventions we've adopted.
h2
heading containing book title (with other fields listed underneath heading)<a>
) pointing to ad.html
display: inline-block
with a fixed width
for each ad so we can fit up to two on the same linemisc/
directory as info-flow-diagram.png
(.jpg
is fine, too)Attached below are some slides from the lecture, for reference:
@evancausey: you're our database guru, so are you up for taking on this task?
Thanks,
Caleb
<textarea>
with appropriately-named id
<label>
elementindex.html
search.html
my-ads.html
ad.html
post.html
From the prompt for phase 3 of the project:
(create) an illustration on how your test SELECT queries actually work with the table(s) on MySQL
As needed, you can refer to the current SQL database implementation at misc/db-implementation.png
.
post.html
containing an upload input (<input type="file" />
) where the user can upload a photo of the book they are posting.register.html
, sign-in.html
, account.html
)register.html
, account.html
)post.html
)required
attribute on the respective <input>
):
<input class="email-field" type="text" pattern="\s*[^@]+@[^@]+\s*" required />
The documentations of previous phases should be summarized into your final report to be turned in along with your complete Web pages and the previously submitted phases of the project in a zip file as an attachment in your Cougar Course submission. Your final project report must be in a word processor format and consist of the following sections:
From the prompt for phase 3 of the project:
(write) a description on how some of your Web pages are supposed to interact with your database(s), i.e., what queries will be posted from which pages and how the results will be displayed in those pages
As needed, you can refer to the current SQL database implementation at misc/db-implementation.png
.
Add a page named sign-out.html
which contains a message to the user indicating that they have been signed out
<meta http-equiv="refresh" content="3; url=index.html">
Write PHP for My Ads page such that the page only lists ads for the logged-in user. Until the sign-in functionality is written, you can use an arbitrary user ID for testing (e.g. user_id = 2).
P.S. To get the path to the book image (for use in <img src="...">
), use:
AD_PHOTO_PATH_BASE . '/' . $ad['path_to_picture'];
// where $ad is the associative array with the ad's attributes
The alt
attribute for the book img
should be set to the book's book_title
.
Due Date: Thursday, December 8 (presentation and submission)
You will present your project at 2:30 – 3:45 pm on Thursday, December 8, 2016. The presentation is worth 10 points of the project. Each team will be given about 10 minutes to present the project and answer questions during the last class period. During the presentation, you first share the problem to be solved with the class, identify the environment, and explain the input and output of the problem. A few Web transactions need to be demonstrated and explained. Attending all presentations is required and counted as part of the grade. All presentation materials including the Powerpoint file must be submitted on Cougar Course by 2:30 pm on Thursday, December 8, 2016.
Things to pay attention to:
During the project presentation, every member of a group must take turns to present the part of the project he or she is the main contributor.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.