Nusic was part of a web development project in the third year of my honours degree.
Features:
- MySQL Database
- Bootstrap CSS
- PHP backend
- RESTful API
- Security
- bcrypt password hashing
- preg_match()
- Prepared statement
- POST requests
- SMTP Email account verification
- Admin account verification
- Model-View-Controller (MVC) framework
- IoT Implementation over restful API
- Web service weather over RESTful API
- Reading External RSS
- and an XSLT version
- User login system
- User comment system
- Articles
PHP:
<?php
function displayAllArticles(){
global $con;
$query = $con->prepare('
SELECT article.articleID, article.articleHeadline, article.articleDesc, article.articleImgLink, article.postDate
FROM article
WHERE article.articleDeleted != 1
ORDER BY article.articleID DESC');
$query->execute();
$stmt = $query->fetchAll(PDO::FETCH_OBJ);
return json_encode($stmt);
}
?>
Database Design:
Field Name | Data Type | PK/FK |
---|---|---|
Users | ||
userID | int(11) | PK |
username | varchar(255) | |
fName | varchar(255) | |
lName | varchar(255) | |
userEmail | varchar(255) | |
password | varchar(255) | |
verifiedReporter | tinyint(1) | |
Article | ||
articleID | varchar(255) | PK |
articleHeadline | varchar(255) | |
articleDesc | varchar(255) | |
articleImgLink | varchar(255) | |
postDate | datetime | |
articleCreator | int(11) | FK |
articleDeleted | tinyint(1) | |
Article Content | ||
articleID | int(11) | PK |
articleContent | text | |
Comments | ||
commentID | int(11) | PK |
commenterID | int(11) | FK |
articleID | int(11) | FK |
commentText | varchar(255) | |
commentDate | datetime | |
deleted | tinyint(1) |