News Portal 2020-2021
Chapter 1
INTRODUCTION AND OBJECTIVES
1.1 INTRODUCTION
Now-a-days we live in age of Information Communication and Technology (ICT). We can’t think a
single moment without technology. From morning to night, we need help of the technology. This is
the revolutionary time of computer technology. Most of the works depends on web application. For
this reason, anytime, anywhere, anyone can access a website by internet at low cost and we can
find our expectable and most update information from website. At present information is one the
most valuable resource of the current world. We have developed our project so that we can aware
the people.
The online news portal has been developed to override the problems prevailing in the practicing
manual system. The main purpose of the project is intended to develop a portal for management of
Web based news. The portal provides a suitable and easy display for which large population around
the world can learn or will have the knowledge about the world. No formal knowledge is needed to
use this portal.
The portal has basically two user parts where one is user who can view, add comment, can have
subscribe the newsletters or games and another is administrator who will manage or control the
website and other user can only view ,search and can add comments if name and email is given, but
with the approval of administrator.
The website consists of basic pages from which the user can view and know the relevant
information according to various categories which administrator given. In other case, the
CSE Dept Page 1
News Portal 2020-2021
administrator manages all the relevant actions for which the users can view properly and also make
reports.
1.2 OBJECTIVES
The objective of this project is to develop a web application for Online News Paper website
that can aware the people.
The objective of this project is to provide the daily news.
Those people who don’t have time to read the news paper and always linked with internet
can get more information.
Anytime, anywhere, anyone can know about the news or information by internet at low
cost.
Dynamically provides facility.
Once a news item is put on the internet, it becomes instantly available for use round the
globe without additional variable cost.
You don’t have to wait for newspaper in morning.
Money and time will also save.
CSE Dept Page 2
News Portal 2020-2021
Chapter 2
SYSTEM REQUIREMENTS
2.1 HARDWARE REQUIREMENTS –
Processor : Intel core 2 Duo or more
Memory : 2 GB RAM or more
Cache Memory : 128 KB
Disk Space : 30 GB
2.2 SOFTWARE REQUIREMENTS –
Language Used : PHP
Database : MySql
User Interface Design : HTML, jquery, javacsript
Web Browser : Google chrome, Mozilla Firefox, Opera
Server : Xamp Server
2.3 PROJECT CATEGORY
2.3.1 MYSQL
CSE Dept Page 3
News Portal 2020-2021
MySQL is a fast, easy-to-use RDBMS being used for many small and big businesses. MySQL is
developed, marketed and supported by MySQL AB, which is a Swedish company. MySQL is
becoming so popular because of many good reasons −
MySQL is released under an open-source license. So you have nothing to pay to use it.
MySQL uses a standard form of the well-known SQL data language.
MySQL works on many operating systems and with many languages including PHP, PERL,
C, C++, JAVA, etc.
MySQL works very quickly and works well even with large data sets.
MySQL is very friendly to PHP, the most appreciated language for web development.
2.3.2 PHP
PHP started out as a small open source project that evolved as more and more people found out
how useful it was. Rasmus Lerdorf unleashed the first version of PHP way back in 1994.
PHP is a recursive acronym for "PHP: Hypertext Preprocessor".
PHP is a server side scripting language that is embedded in HTML. It is used to manage
dynamic content, databases, session tracking, even build entire e-commerce sites.
2.3.3 HTML
HTML is the standard markup language for creating Web pages.
HTML stands for Hyper Text Markup Language
HTML describes the structure of Web pages using markup
HTML elements are the building blocks of HTML pages
HTML elements are represented by tags
CSE Dept Page 4
News Portal 2020-2021
HTML tags label pieces of content such as "heading", "paragraph", "table", and so on
Browsers do not display the HTML tags, but use them to render the content of the page
2.3.4 JAVASCRIPT
JavaScript is a dynamic computer programming language. It is lightweight and most commonly
used as a part of web pages, whose implementations allow client-side script to interact with the user
and make dynamic pages. It is an interpreted programming language with object-oriented
capabilities.
2.3.5 CSS
Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to simplify
the process of making web pages presentable.
CSS handles the look and feel part of a web page. Using CSS, you can control the color of the text,
the style of fonts, the spacing between paragraphs, how columns are sized and laid out, what
background images or colors are used, layout designs, and variations in display for different
devices and screen sizes as well as a variety of other effects.
CSS is easy to learn and understand but it provides powerful control over the presentation of an
HTML document. Most commonly, CSS is combined with the markup languages HTML or
XHTML.
2.3.6 JQUERY
CSE Dept Page 5
News Portal 2020-2021
jQuery is a lightweight, "write less, do more", JavaScript library. The purpose of jQuery is to make
it much easier to use JavaScript on your website. jQuery takes a lot of common tasks that require
many lines of JavaScript code to accomplish, and wraps them into methods that you can call with a
single line of code.
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM
manipulation. The jQuery library contains the following features:
HTML/DOM manipulation
CSS manipulation
HTML event methods
Effects and animations
AJAX
Utilities
Chapter 3
CSE Dept Page 6
News Portal 2020-2021
SYSTEM ANALYSIS
Systems development is systematic process which includes phases such as planning,
analysis, design, deployment, and maintenance.
System analysis is a process of collecting and interpreting facts, identifying the problems,
and decomposition of a system into its components.
System analysis is conducted for the purpose of studying a system or its parts in order to
identify its objectives. It is a problem solving technique that improves the system and
ensures that all the components of the system work efficiently to accomplish their purpose.
Analysis specifies what the system should do.
During analysis , data collected on various files, decision points and transactions handled by
the present system. The commonly used tools are data flow diagram, interviews etc.
Training ,experience and common sense are required for the collection of relevant
information needed to develop the system. The success of the system depends largely on
how clearly the problem is defined , thoroughly investigated and properly carried out
through the choice of solution.
3.1 Existing System
The existing system is fully manual. Each person has to wait for the newspaper to arrive. There is a
payment for each day newspaper. A user will have to spend more time browsing to find the updates
of particular news. This may lead to wastage of time, if the page containing the information is
unknown to the user. The main disadvantage is that there will be lot of difficulties for the user to
find the specified news updates for his/her choice of category.
CSE Dept Page 7
News Portal 2020-2021
3.2 Proposed System
By computerizing the news, the administrator can easily add the information, edit or even delete
the information if it is irrelevant. By the admin approval of comment facility , it is even scrutiny of
social issue comments.
This project has several advantages :-
User friendly interface
Fast access to database
No extra charge levied
Less error
More storage capacity
Search facility
Look and feel environment
Quick transaction
CSE Dept Page 8
News Portal 2020-2021
Chapter 4
SYSTEM DESIGN AND IMPLEMENTATION
System design is the phase that bridges the gap between problem domain and the existing system in
a manageable way. This phase focuses on the solution domain, i.e. “how to implement?”
It is the phase where the SRS document is converted into a format that can be implemented and
decides how the system will operate.
System design takes the following inputs −
Statement of work
Requirement determination plan
Current situation analysis
System design gives the following outputs −
Infrastructure and organizational changes for the proposed system.
A data schema, often a relational schema.
Metadata to define the tables/files and columns/data-items.
A function hierarchy diagram or web page map that graphically describes the program
structure.
4.1 ENTITY RELATIONSHIP DIAGRAM
CSE Dept Page 9
News Portal 2020-2021
The ER model defines the conceptual view of a database. It works around real-world entities and
the associations among them. At view level, the ER model is considered a good option for
designing databases.
adminId LoginId
adminname
ADMIN Has Login admName
Email
Password Password
Manage
CategoryId
PostId CategoryName
Post Category
PostTitle Description
Has CreatedDate
Description
SubId
CreatedDate Subcategory
Description SubName
ER Diagram for Online News Portal
Entity :
CSE Dept Page 10
News Portal 2020-2021
An entity can be a real-world object, either animate or inanimate, that can be easily identifiable.
For example, in a school database, students, teachers, classes, and courses offered can be
considered as entities. All these entities have some attributes or properties that give them their
identity.
Attributes :
Entities are represented by means of their properties, called attributes. All attributes have values.
For example, a student entity may have name, class, and age as attributes.
There exists a domain or range of values that can be assigned to attributes. For example, a student's
name cannot be a numeric value. It has to be alphabetic. A student's age cannot be negative, etc.
4.2 MODULES
The project is modularized on the basis of users who use this portal.
1. Administrator
2. User
Process Logic for Each Module:
1. Administrator
Administrator can add/ modify/ delete category details
Administrator can add/ modify/ delete sub category details
Administrator can add/ modify/ delete post/news details
Administrator can approve/disapprove the comments entered by the users
Administrator can add/ modify/ delete the images in the gallery
Administrator can change his/her password
2. User
CSE Dept Page 11
News Portal 2020-2021
A user can signup for a profile if he/she doesn’t have one already
The user can view the different news.
The user can read a particular news in detail by clicking on the news link.
The user has options to post comments
The user has options to search the news based on subcategory or words in the
search box.
The user can change his/her password
The user has the option to get the password if he/she forgets her password.
4.3 SOURCE CODE
4.3.1 MAIN PAGE
<?php
session_start();
include('includes/[Link]');
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>News Portal | Home Page</title>
<!-- Bootstrap core CSS -->
<link href="vendor/bootstrap/css/[Link]" rel="stylesheet">
<!-- Custom styles for this template -->
<link href="css/[Link]" rel="stylesheet">
</head>
CSE Dept Page 12
News Portal 2020-2021
<body>
<!-- Navigation -->
<?php include('includes/[Link]');?>
<!-- Page Content -->
<div class="container">
<div class="row" style="margin-top: 4%">
<!-- Blog Entries Column -->
<div class="col-md-8">
<!-- Blog Post -->
4.3.2 ADMIN LOGIN
<?php
session_start();
//Database Configuration File
include('includes/[Link]');
//error_reporting(0);
if(isset($_POST['login']))
{
// Getting username/ email and password
$uname=$_POST['username'];
$password=$_POST['password'];
// Fetch data from database on the basis of username/email and password
$sql =mysqli_query($con,"SELECT AdminUserName,AdminEmailId,AdminPassword FROM tbladmin
WHERE (AdminUserName='$uname' || AdminEmailId='$uname')");
$num=mysqli_fetch_array($sql);
if($num>0)
{
$hashpassword=$num['AdminPassword']; // Hashed password fething from database
//verifying Password
if (password_verify($password, $hashpassword)) {
$_SESSION['login']=$_POST['username'];
echo "<script type='text/javascript'> [Link] = '[Link]'; </script>";
}
Else
CSE Dept Page 13
News Portal 2020-2021
{
echo "<script>alert('Wrong Password');</script>";
}
}
//if username or email not found in database
else{
echo "<script>alert('User not registered with us');</script>";
}
}
?>
4.3.1 ADMIN LOGOUT
<?php
session_start();
include("includes/[Link]");
$_SESSION['login']=="";
session_unset();
session_destroy();
?>
<script language="javascript">
[Link]="[Link]";
</script>
4.3.3 CHANGE PASSWORD
<?php
session_start();
include('includes/[Link]');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
{
header('location:[Link]');
}
else{
CSE Dept Page 14
News Portal 2020-2021
if(isset($_POST['submit']))
{//Current Password hashing
$password=$_POST['password'];
$options = ['cost' => 12];
$hashedpass=$password;
//password_hash($password, PASSWORD_BCRYPT, $options);
$adminid=$_SESSION['login'];
// new password hashing
$newpassword=$_POST['newpassword'];
$newhashedpass=$password;
//password_hash($newpassword, PASSWORD_BCRYPT, $options);
date_default_timezone_set('Asia/Kolkata');// change according timezone
$currentTime = date( 'd-m-Y h:i:s A', time () );
$sql=mysqli_query($con,"SELECT AdminPassword FROM tbladmin where AdminUserName='$adminid'
|| AdminEmailId='$adminid'");
$num=mysqli_fetch_array($sql);
if($num>0)
{
$dbpassword=$num['AdminPassword'];
if (password_verify($password, $dbpassword)) {
$con=mysqli_query($con,"update tbladmin set AdminPassword='$newhashedpass',
updationDate='$currentTime' where AdminUserName='$adminid'");
$msg="Password Changed Successfully !!";
}
}
else
{
$error="Old Password not match !!";
}
}
?>
CSE Dept Page 15
News Portal 2020-2021
4.3 DATABASE
4.3.1 TABLE ADMIN
4.3.2 TABLE CATEGORY
4.3.3 TABLE COMMENTS
CSE Dept Page 16
News Portal 2020-2021
4.3.4 TABLE PAGES
4.3.5 TABLE SUBCATEGORY
4.3.6 TABLE POSTS
CSE Dept Page 17
News Portal 2020-2021
Chapter 5
SCREENSHOTS
5.1 Home page
5.2 Admin Login
CSE Dept Page 18
News Portal 2020-2021
5.3 Admin Password Changing
5.4 Dashboard
5.5 Categories Management
CSE Dept Page 19
News Portal 2020-2021
5.6 Posts
5.7 Add or Delete Posts
5.8 About Us Page
CSE Dept Page 20
News Portal 2020-2021
Chapter 6
CONCLUSION
After processing through all phases of the system development life cycle, the news portal is
developed. In future it will be hosted on the internet server which will be accessed by all people in
the world and can view the site and learn as much as news and information about the world. The
Administrator or editor who will be assigned for editing or managing or controlling will be given
the secure login information and will change or modify the website as per the requirements. New
facility can also implemented in this system like online games for registered users, quizzes etc .
CSE Dept Page 21
News Portal 2020-2021
Chapter 7
BIBLIOGRAPHY
1. Fundamentals of Software Engineering, and data base management system with pearson
publication edition 2003
2. [Link]
3. HTML, and CSS Bible. Bill Karow, Chuck White, Steven M. Schafer Bryan Pfaffenberger, New
York: Wiley 2004
4. [Link]
5. [Link]
CSE Dept Page 22