Академический Документы
Профессиональный Документы
Культура Документы
1.1 Introduction
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
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
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
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
1
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
Those people who don’t have time to read the news paper and always linked with
Anytime, anywhere, anyone can know about the news or information by internet at low
cost.
Once a news item is put on the internet, it becomes instantly available for use round
2
1.3 Tools/ Platform Hardware & Software Requirements
Hardware:
Software:
Database : MySql
3
1.4 Project Category
This is an RDBMS web based project which is currently using MySQL for all the transaction
statements and PHP as the front end. This project also uses Javascript and CSS for the user
friendly view.
RDBMS
MySQL
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
MySQL is released under an open-source license. So you have nothing to pay to use it.
MySQL is a very powerful program in its own right. It handles a large subset of the
4
MySQL works on many operating systems and with many languages including PHP,
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.
MySQL supports large databases, up to 50 million rows or more in a table. The default
file size limit for a table is 4GB, but you can increase this (if your operating system can
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 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.
PHP is pleasingly zippy in its execution, especially when compiled as an Apache module
on the Unix side. The MySQL server, once started, executes even very complex queries
5
PHP supports a large number of major protocols such as POP3, IMAP, and LDAP. PHP4
added support for Java and distributed object architectures (COM and CORBA), making
PHP performs system functions, i.e. from files on a system it can create, open, read,
PHP can handle forms, i.e. gather data from files, save data to a file, through email you
You add, delete, modify elements within your database through PHP.
Using PHP, you can restrict users to access some pages of your website.
HTML
6
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
Javascript
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.
CSS
Cascading Style Sheets, fondly referred to as CSS, is a simple design language intended to
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
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.
Jquery
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
7
require many lines of JavaScript code to accomplish, and wraps them into methods that you can
jQuery also simplifies a lot of the complicated things from JavaScript, like AJAX calls and DOM
HTML/DOM manipulation
CSS manipulation
AJAX
Utilities
8
2.System Study
In this process, the development team visits investigate the need for possible software
automation in the given system. By the end of Preliminary Investigation, the team furnishes a
document that holds the different specific recommendations for the candidate system. It also
includes the personnel assignments, costs, project schedule, and target dates. Main Tasks of the
Identify the objectives of the new system. In general, an information system benefits a
advantage.
Identify constraints, i.e. the limitations placed on the project, usually relating to time,
Evaluate feasibility - whether the proposed system promises sufficient benefit to invest
the additional resources necessary to establish the user requirements in greater detail.
System Development Life Cycle (SDLC) is a conceptual model which includes policies and
SDLC is used by analysts to develop an information system. SDLC includes the following
activities −
9
requirements
design
implementation
testing
deployment
operations
maintenance
Phases of SDLC
Systems Development Life Cycle is a systematic approach which explicitly breaks down the
work into phases that are required to implement either new or modified Information System.
10
2.3. Feasibility Study
A feasibility study aims to objectively and rationally uncover the strengths and weaknesses of an
existing business or proposed venture, opportunities and threats present in the natural
environment, the resources required to carry through, and ultimately the prospects for success. In
its simplest terms, the two criteria to judge feasibility are cost required and value to be attained.
project, a description of the product or service, accounting statements, details of the operations
and management, marketing research and policies, financial data, legal requirements and tax
implementation.
A feasibility study evaluates the project's potential for success; therefore, perceived objectivity is
an important factor in the credibility of the study for potential investors and lending institutions.
It must therefore be conducted with an objective, unbiased approach to provide information upon
This assessment is based on an outline design of system requirements, to determine whether the
company has the technical expertise to handle completion of the project. When writing a
A brief description of the business to assess more possible factors which could affect the
study
11
The part of the business being examined
At this level, the concern is whether the proposal is both technically and legally feasible
technical resources of the organization and their applicability to the expected needs of the
proposed system. It is an evaluation of the hardware and software and how it meets the need of
The system is developed using XAMPP running on Windows platform. MySQL, which is a
powerful RDBMS is used as backend. So this system is technically feasible. If the budget is a
Operational feasibility is the measure of how well a proposed system solves the problems, and
takes advantage of the opportunities identified during scope definition and how it satisfies the
The operational feasibility assessment focuses on the degree to which the proposed development
project fits in with the existing business environment and objectives with regard to development
12
To ensure success, desired operational outcomes must be imparted during design and
These parameters are required to be considered at the early stages of design if desired operational
behaviours are to be realised. A system design and development requires appropriate and timely
application of engineering and management efforts to meet the previously mentioned parameters.
A system may serve its intended purpose most effectively when its technical and operating
characteristics are engineered into the design. Therefore, operational feasibility is a critical
aspect of systems engineering that needs to be an integral part of the early design phases.
No doubt the proposed system is fully GUI based that is very user friendly and all inputs to be
taken all self –explanatory even to a layman. Besides, a proper training has been conducted to let
know the essence of the system to the users so that they feel comfortable with new system.
Economic analysis is the most frequently used method for evaluating the effectiveness of a
candidate system. More commonly known as cost/benefit analysis, the procedure is to determine
the benefits and savings that are expected from a candidate system and compare them with cost.
If benefits outweigh cost, then the decision is made to design and implement the system
Otherwise, further justification or alternations in the proposed system will have to be made if it
The project uses the technology based on minimum possible cost factor. The project is
13
3. System Analysis
Systems development is systematic process which includes phases such as planning, analysis,
System analysis is a process of collecting and interpreting facts, identifying the problems, and
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
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.
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.
14
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
Less error
Search facility
Quick transaction
15
4. Systems Design
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
In this phase, the complex activity of system development is divided into several smaller sub-
activities, which coordinate with each other to achieve the main objective of system
development.
Statement of work
Proposed system requirements including a conceptual data model, modified DFDs, and
16
A function hierarchy diagram or web page map that graphically describes the program
structure.
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.
Entity:-
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.
An entity set is a collection of similar types of entities. An entity set may contain entities with
attribute sharing similar values. For example, a Students set may contain all the students of a
school; likewise a Teachers set may contain all the teachers of a school from all faculties. Entity
Entities are represented by means of rectangles. Rectangles are named with the entity set they
represent. Eg:
Category
17
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.
Attributes are represented by means of ellipses. Every ellipse represents one attribute and is
CategoryId
Category CategoryDetails
CategoryName
Types of Attributes
Simple attribute − Simple attributes are atomic values, which cannot be divided further.
Composite attribute − Composite attributes are made of more than one simple attribute.
For example, a student's complete name may have first_name and last_name.
Derived attribute − Derived attributes are the attributes that do not exist in the physical
database, but their values are derived from other attributes present in the database. For
18
example, average_salary in a department should not be saved directly in the database,
instead it can be derived. For another example, age can be derived from data_of_birth.
Social_Security_Number.
Multi-value attribute − Multi-value attributes may contain more than one values. For
example, a person can have more than one phone number, email_address, etc.
Relationship:-
The association among entities is called a relationship. For example, an employee works_at a
department, a student enrolls in a course. Here, Works_at and Enrolls are called relationships.
Relationships are represented by diamond-shaped box. Name of the relationship is written inside
the diamond-box. All the entities (rectangles) participating in a relationship, are connected to it
by a line.
19
Relationship Set:
A set of relationships of similar type is called a relationship set. Like entities, a relationship too
Degree of Relationship:
The number of participating entities in a relationship defines the degree of the relationship.
Binary = degree 2
Ternary = degree 3
n-ary = degree
20
UserId LoginId
Username
Password Password
Manage
CategoryId
PostId CategoryName
Post Category
PostTitle Description
Has CreatedDate
Description
SubId
CreatedDate Subcategory
Description SubName
21
4.2 Data flow diagram
Data Flow diagram is a graphical representation of flow of data throughout the information
system. Data flow diagrams illustrate how data is processed by a system in terms of inputs and
outputs.
DFD graphically representing the functions, or processes, which capture, manipulate, store, and
distribute data between a system and its environment and between components of a system. The
visual representation makes it a good communication tool between User and System designer.
Structure of DFD allows starting from a broad overview and expands it to a hierarchy of detailed
diagrams. DFD has often been used due to the following reasons:
Simplicity of notation
DFD Symbols:-
There are four basic symbols that are used to represent a data-flow diagram.
system.
22
Dataflow Dataflow are pipelines
information flow.
1. External Entity
An external entity, which are also known as terminators, sources, sinks, or actors, are an outside
system or process that sends or receives data to and from the diagrammed system. They’re either
the sources or destinations of information, so they’re usually placed on the diagram’s edges.
2. Process
Process is a procedure that manipulates the data and its flow by taking incoming data, changing
it, and producing an output with it. A process can do this by performing computations and using
logic to sort the data or change its flow of direction. Processes usually start from the top left of
3. Data Store
Data stores hold information for later use, like a file of documents that’s waiting to be processed.
Data inputs flow through a process and then through a data store while data outputs flow out of a
23
4. Data flow
Data flow is the path the system’s information takes from external entities through processes and
data stores. With arrows and succinct labels, the DFD can show you the direction of the data
flow.
But before starting mapping out data flow diagrams, we need to follow four rules of thumb to
1. Each process should have at least one input and one output.
2. Each data store should have at least one data flow in and data flow out.
DFDs can range from simple overviews to complex, granular representations of a system or
process with multiple levels, numbered from 0 to beyond. But the most common and intuitive
DFDs are Level 0 DFDs, which are called context diagrams. They’re digestible, high-level
overviews of the flow of information through a system or process, so almost anyone can
understand it.
Level 1 DFDs are still broad overviews of a system or process, but they’re also more detailed --
they break down the system’s single process node into subprocesses. Level 2 DFDs dive even
deeper into detail by breaking down each process into granular subprocesses. Any DFD that goes
past level 2 is rare -- there would be too much detail, which defeats its original purpose of being
easy to understand.
24
User Category
Management Management
Comments Login
Management Management
25
Category Generate Category
Management Report
Subcategory Generate
Management Subcategory Report
Online News
Portal
Comments Generate
Management Comments Report
26
Admin
Manage Sub
category Details
Check Manage
credentials modules
Manage Posts
Details
Manage
Comments Details
27
User
View News
Check Manage
credentials modules
Search News
Password Change
Recovery Password
28
5. Design Document
For the optimum use of practical time it is necessary that every session is planned. Planning of
Topic Understanding.
Database Requirements.
5.1.Modules :
The project is modularized on the basis of users who use this portal.
1. Administrator
2. User
1. Administrator
2. User
A user can signup for a profile if he/she doesn’t have one already
29
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 search the news based on subcategory or words in
The user has the option to get the password if he/she forgets her password.
30
5.1. Tables :
1. user_details
2. category_details
3.subcategory_details
31
4. post_details
5. comment_details
6. gallery_details
32
6. System Development
6.1. Coding :
The objective of coding phase for a given design is to implement the design in best way possible.
In this phase design of the system is translated into code in a programming language. The coding
phase affects the maintenance and testing phase of the system development life cycle process.
Since the testing and maintenance cost of software are much expensive than the coding cost, the
goal of coding should be to reduce the testing and maintenance effort. Hence, during coding the
emphasis must be on developing programs which are easy to write. Simplicity and clarity should
In this project PHP, HTML, CSS, SQL & javascript codes are used.
index.php
<?php
session_start();
include ('config/dbconnect.php');
?>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
33
<title>News Portal</title>
</head>
<body>
<div class="body_wrapper">
<div class="center">
<?php
include ('includes/header.php');
?>
<div class="main_menu_area">
<?php
34
$query=mysqli_query($con,"select * from category_details where Status=1");
while($row=mysqli_fetch_array($query))
$id=$row['CategoryId'];
?>
<ul id="nav">
<?php
while($row1=mysqli_fetch_array($query1))
?>
<?php
?> </ul></li></ul>
<?php}?>
35
</div>
<div class="slider_area">
<div class="slider">
<ul class="bxslider">
<?php
while($row=mysqli_fetch_array($query))
{?>
title="" /></li>
<?php } ?>
</ul> </div></div>
<div class="content_area">
<div class="single_left_coloum_wrapper">
while($row=mysqli_fetch_array($query))
$id= $row['PostId'];
$text = substr($row['PostDetails'],0,50);
?>
<?php }?>
</div>
<h2 class="title">gallery</h2>
<?php
37
$query=mysqli_query($con,"select * from post_details where Status=1");
while($row=mysqli_fetch_array($query))
{?>
<?php
</div>
<div class="single_sidebar">
</div>
<div class="copyright_text">
<p>Copyright © 2045 News Portal Inc. All rights reserved | </p>
</div>
</div>
</div>
38
</div>
<script type="text/javascript">
selectnav('nav', {
label: '-Navigation-',
nested: true,
indent: '-'
});
selectnav('f_menu', {
label: '-Navigation-',
nested: true,
indent: '-'
});
$('.bxslider').bxSlider({
mode: 'fade',
39
captions: true
});
</script>
</body>
</html>
</body>
</html>
View_postdetails.php
<?php
session_start();
include ('config/dbconnect.php');
if (empty($_SESSION['token'])) {
$_SESSION['token'] = bin2hex(random_bytes(32));
if(isset($_POST['submit']))
40
if (!empty($_POST['csrftoken'])) {
if (hash_equals($_SESSION['token'], $_POST['csrftoken'])) {
if(strlen($_SESSION['login'])!=0)
$name=$_SESSION['login'];
Status=1");
$row=mysqli_fetch_array($query);
$email=$row['Email'];
else
$name=$_POST['name'];
$email=$_POST['email'];
$comment=$_POST['comment'];
$postid=$_GET['post'];
$st1='0';
41
$query=mysqli_query($con,"insert into comment_details(PostId,Name,Email,Comment,Status)
values('$postid','$name','$email','$comment','$st1')");
if($query)
echo "<script>alert('comment successfully submit. Comment will be display after admin review
');</script>";
unset($_SESSION['token']);
else
?>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
42
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>News Portal</title>
</head>
<body>
<div class="body_wrapper">
<div class="center">
<?php
include ('includes/header.php');
?>
43
<div class="main_menu_area">
<ul id="nav">
<li><a href="index.php">Back</a></li><ul>
</div>
<div class="slider_area">
</div>
<div class="content_area">
<?php
$post=$_GET['post'];
Status=1");
while($row=mysqli_fetch_array($query))
$id= $row['PostId'];
//$text = substr($row['PostDetails'],0,50);
?>
44
<h3><?php echo htmlentities($row['PostTitle']);?></h3>
<?php }?>
</div>
<?php
if(!isset($_SESSION['login']))
{ ?>
<?php
?>
required></textarea>
45
<button type="submit" class="btn btn-primary" name="submit">Submit</button>
</form>
</div>
</div>
</div>
<?php
$sts=1;
while ($row=mysqli_fetch_array($query)) {
?>
<div class="media-body">
htmlentities($row['PostingDate']);?></span>
46
</h5>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="footer_bottom_area">
<div class="copyright_text">
<p>Copyright © 2045 News Portal Inc. All rights reserved | </p>
</div>
</div>
</div>
</div>
47
<script type="text/javascript">
selectnav('nav', {
label: '-Navigation-',
nested: true,
indent: '-'
});
selectnav('f_menu', {
label: '-Navigation-',
nested: true,
indent: '-'
});
$('.bxslider').bxSlider({
mode: 'fade',
captions: true
});
</script>
</body>
</html>
48
</body>
</html>
Search_news.php
<?php
session_start();
include ('config/dbconnect.php');
?>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>News Portal</title>
</head>
<body>
<div class="body_wrapper">
<div class="center">
<?php
include ('includes/header.php');
?>
<div class="main_menu_area">
<ul id="nav">
<li><a href="index.php">Back</a></li><ul>
</div>
<div class="slider_area">
</div>
<div class="content_area">
50
<div class="single_left_coloum_wrapper">
<?php
if(($_GET['subid'])!=NULL)
$id=$_GET['subid'];
$row= mysqli_fetch_array($sql);
if($row>0)
while ($row)
?>
<div class="card-body">
</div>
</div>
<?php }
else
else
?>
</body>
52
</html>
Register.php
<?php
session_start();
include ('config/dbconnect.php');
if(isset($_POST["submit"]))
$user_name=$_POST["UserName"];
$email=$_POST["Email"];
$cpassword=$_POST["CPassword"];
$password=$_POST["Password"];
if($cpassword==$password)
$sts=1;
values('$user_name','$password','$sts','$email')");
if($query)
$_SESSION["login"]=$user_name;
53
header('Location: index.php');
else{
else
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
54
<meta name="description" content="News Portal.">
<script src="assets/js/modernizr.min.js"></script>
<script type="text/javascript">
function confirmPass() {
if(pass != confPass) {
55
}
</script>
</head>
<body class="bg-transparent">
<section>
<div class="container-alt">
<div class="row">
<div class="col-sm-12">
<div class="wrapper-page">
<h2 class="text-uppercase">
<span><img src="admin/assets1/img/brand/download.png"
alt="" height="56"></span>
</a>
</h2>
56
<!--<h4 class="text-uppercase font-bold m-b-0">Sign In</h4>-->
</div>
<div class="account-content">
<label>UserName</label>
<div class="col-xs-12">
</div>
</div>
<div class="form-group">
<label>Email</label>
<div class="col-xs-12">
</div>
</div>
<div class="form-group">
57
<label>Password</label>
<div class="col-xs-12">
</div>
</div>
<div class="form-group">
<label>Confirm Password</label>
<div class="col-xs-12">
</div>
</div>
<div class="col-xs-12">
</div>
</div>
58
</form>
<div class="clearfix"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
</script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/detect.js"></script>
<script src="assets/js/fastclick.js"></script>
<script src="assets/js/jquery.blockUI.js"></script>
59
<script src="assets/js/waves.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/jquery.core.js"></script>
<script src="assets/js/jquery.app.js"></script>
</body>
</html>
Add_category.php
<?php
session_start();
include ('config/dbconnect.php');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{
60
if(isset($_POST['submit']))
$category=$_POST['category'];
$description=$_POST['description'];
$status=1;
$query=mysqli_query($con,"insert into
category_details(CategoryName,Description,Status) values('$category','$description','$status')");
if($query)
else{
?>
<html lang="en">
61
<head>
<base href="./">
<meta charset="utf-8">
fit=no">
Template">
<meta name="keyword"
content="Bootstrap,Admin,Template,Open,Source,jQuery,CSS,HTML,RWD,Dashboard">
<title>Add category</title>
<!-- Icons-->
62
<link href="assets1/css/pace.min.css" rel="stylesheet">
3"></script>
<script>
function gtag() {
dataLayer.push(arguments);
// Shared ID
gtag('config', 'UA-118965717-3');
// Bootstrap ID
gtag('config', 'UA-118965717-5');
</script>
</head>
<?php
include ('includes/header.php');
63
?>
<div class="app-body">
<?php
include ('includes/sidebar.php');
?>
<main class="main">
<!-- Breadcrumb-->
<ol class="breadcrumb">
<li class="breadcrumb-item">Home</li>
<li class="breadcrumb-item">
Admin
</li>
<div class="container-fluid">
<div class="row">
<div class="col-sm-6">
<!---Success Message--->
64
<?php if($msg){ ?>
</div>
<?php } ?>
<!---Error Message--->
<?php } ?>
</div>
</div>
<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<strong>Add Category</strong>
<small>Form</small>
65
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
<label for="name">Category</label>
name="category" required="">
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-12">
<div class="form-group">
66
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-12">
<div class="form-group">
name="submit">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
67
<!-- end row -->
</body>
</html>
Edit_category.php
<?php
session_start();
include ('config/dbconnect.php');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{
if(isset($_POST['submit']))
$catid=intval($_GET['cid']);
$category=$_POST['category'];
$description=$_POST['description'];
68
$query=mysqli_query($con,"Update category_details set
if($query)
else{
?>
<html lang="en">
<head>
<base href="./">
<meta charset="utf-8">
<meta name="keyword"
content="Bootstrap,Admin,Template,Open,Source,jQuery,CSS,HTML,RWD,Dashboard">
<title>Add category</title>
<!-- Icons-->
3"></script>
<script>
function gtag() {
dataLayer.push(arguments);
70
}
// Shared ID
gtag('config', 'UA-118965717-3');
// Bootstrap ID
gtag('config', 'UA-118965717-5');
</script>
</head>
<?php
include ('includes/header.php');
?>
<div class="app-body">
<div class="sidebar">
<nav class="sidebar-nav">
<ul class="nav">
<li class="nav-item">
71
<i class="nav-icon icon-speedometer"></i> Dashboard
</a>
</li>
<li class="nav-title">Categories</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
72
<li class="nav-item">
</li>
<li class="nav-title">Posts</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
<li class="nav-item">
</li>
73
<li class="nav-item ">
</li>
</ul>
</nav>
</div>
<main class="main">
<!-- Breadcrumb-->
<ol class="breadcrumb">
<li class="breadcrumb-item">Home</li>
<li class="breadcrumb-item">
Admin
</li>
<div class="container-fluid">
74
<div class="row">
<div class="col-sm-6">
<!---Success Message--->
</div>
<?php } ?>
<!---Error Message--->
<?php } ?>
</div>
</div>
<?php
$catid=intval($_GET['cid']);
75
$query=mysqli_query($con,"Select
$cnt=1;
while($row=mysqli_fetch_array($query))
?>
<div class="row">
<div class="col-sm-6">
<div class="card">
<div class="card-header">
<strong>Edit Category</strong>
<small>Form</small>
</div>
<div class="card-body">
<div class="row">
<div class="col-sm-12">
<div class="form-group">
76
<label for="name">Category</label>
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-12">
<div class="form-group">
</div>
</div>
</div>
<!-- /.row-->
<div class="row">
<div class="col-sm-12">
77
<div class="form-group">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
78
}
} ?>
Login.php
<?php
session_start();
include ('config/dbconnect.php');
if(isset($_POST["submit"]))
$user_name=$_POST["UserName"];
$password=$_POST["Password"];
$user= mysqli_fetch_array($sql);
if($user>0)
$pass=$user["Password"];
if($pass==$password)
79
$_SESSION["login"]=$user_name;
if($user_name=='admin')
header('Location: home.php');
else
header('Location: ../user.php');
else {
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
80
<meta name="description" content="News Portal.">
<script src="assets/js/modernizr.min.js"></script>
</head>
<body class="bg-transparent">
<section>
<div class="container-alt">
<div class="row">
81
<div class="col-sm-12">
<div class="wrapper-page">
<h2 class="text-uppercase">
height="56"></span>
</a>
</h2>
</div>
<div class="account-content">
<label>UserName</label>
<div class="col-xs-12">
name="UserName" autocomplete="off"/></td>
82
</div>
</div>
<div class="form-group">
<label>Password</label>
<div class="col-xs-12">
</div>
</div>
<div class="col-xs-12">
</div>
</div>
</form>
<div class="clearfix"></div>
83
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script>
</script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/bootstrap.min.js"></script>
<script src="assets/js/detect.js"></script>
<script src="assets/js/fastclick.js"></script>
<script src="assets/js/jquery.blockUI.js"></script>
84
<script src="assets/js/waves.js"></script>
<script src="assets/js/jquery.slimscroll.js"></script>
<script src="assets/js/jquery.scrollTo.min.js"></script>
<script src="assets/js/jquery.core.js"></script>
<script src="assets/js/jquery.app.js"></script>
</body>
</html>
View_category.php
<?php
session_start();
include ('config/dbconnect.php');
error_reporting(0);
if(strlen($_SESSION['login'])==0)
header('location:index.php');
else{
85
if($_GET['action']=='del' && $_GET['rid'])
$id=intval($_GET['rid']);
echo $id;
CategoryId='$id'");
if($_GET['resid'])
$id=intval($_GET['resid']);
CategoryId='$id'");
86
{
$id=intval($_GET['rid']);
CategoryId='$id'");
?>
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body class="fixed-left">
<div class="row">
<div class="col-sm-6">
<?php
$msg1=$_GET['msg1'];
if($msg1){ ?>
</div>
<?php }
if($msg){ ?>
</div>
<?php } ?>
88
<div class="alert alert-danger" role="alert">
<?php } ?>
</div>
<div class="row">
<div
class="col-md-12">
<div
class="demo-box m-t-20">
<div class="m-b-30">
<a href="add-category.php">
</a>
</div>
<div class="m-b-30">
<a href="home.php">
Back
</a>
89
</div>
<div class="table-responsive">
<thead>
<tr>
<th>#</th>
<th> Category</th>
<th>Description</th>
<th>Posting Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query=mysqli_query($con,"Select
Status=1");
90
$cnt=1;
while($row=mysqli_fetch_array($query))
?>
<tr>
#f05050"></i></a> </td>
</tr>
<?php
$cnt++;
} ?>
91
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="m-b-30">
</div>
<div class="table-responsive">
<thead>
<tr>
<th>#</th>
<th> Category</th>
92
<th>Description</th>
<th>Posting Date</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$query=mysqli_query($con,"Select
Status=0");
$cnt=1;
while($row=mysqli_fetch_array($query))
?>
<tr>
93
<td><?php echo htmlentities($row['Description']);?></td>
category"></i></a>
</tr>
<?php
$cnt++;
} ?>
</tbody>
</table>
</div> </div>
</div>
94
</div>
</body>
</html>
<?php
} ?>
95
7. Testing
7.1 Testing
System testing is actually a series of different whose primary purpose is to fully exercise the
computer based system. Software testing is critical element of software quality assurance and
represent the ultimate review of the specification, design and coding. System testing makes a
logical assumption that all the part of the system is correct; the goal will be successfully
achieved. Testing is the final verification and validation activity within the organization itself.
During testing the major activities are concerned on the examinations and modification of the
source code.
Testing is a process of executing a program with the intend of finding an error. A good test is one
Unit testing
Integration testing
System testing
Validation testing
Unit Testing
This type of testing is performed by developers before the setup is handed over to the testing
team to formally execute the test cases. Unit testing is performed by the respective developers
96
on the individual units of source code assigned areas. The developers use test data that is
The goal of unit testing is to isolate each part of the program and show that individual parts are
Unit testing enables a programmer to detect error in coding. A unit test focuses verification of
the smallest unit of software design. This testing was carried out during the coding itself. In this
testing step, each module is going to be work satisfactorily as the expected output from the
module.
Testing cannot catch each and every bug in an application. It is impossible to evaluate
every execution path in every software application. The same is the case with unit
testing.
There is a limit to the number of scenarios and test data that a developer can use to
verify a source code. After having exhausted all the options, there is no choice but to
stop unit testing and merge the code segment with other units.
Project aspect: The front-end design consists of various forms. They were tested for data
acceptance. Similarly, the back-end also tested for successful acceptance and retrieval of data.
Integration Testing
Through each program work individually, they should work after linking together. This is
referred to as interfacing. Data may be lost across the interface; one module can have adverse
effect on the other. Subroutines after linking may not do the desired function expected by the
97
main routine. Integration testing is the systematic technique for constructing the program
structure while at the same time conducting test to uncover errors associated with the interface.
Using integrated test plan prepared in the design phase of the system development as a guide, the
integration test was carried out. All the errors found in the system were corrected for the next
testing step.
they function correctly. Integration testing can be done in two ways: Bottom-up integration
o Bottom-up integration: This testing begins with unit testing, followed by tests of
o Top-down integration: In this testing, the highest-level modules are tested first and
followed by top-down testing. The process concludes with multiple tests of the complete
Project aspect: After connecting the back-end and the front-end as whole module, the data
entered in the front-end once submitted were successfully entered in the database. On request,
System Testing
After performing the integration testing, the next step is output testing of the proposed system.
No system could be useful if it doesn’t produce the required output in a specified format. The
output generated are displayed by the system under consideration and then tested by comparing
98
with the format require by the user. Here the output format is considered in to two ways, one in
System testing tests the system as a whole. Once all the components are integrated, the
application as a whole is tested rigorously to see that it meets the specified Quality Standards.
System testing is the first step in the Software Development Life Cycle, where the
The application is tested thoroughly to verify that it meets the functional and technical
specifications.
System testing enables us to test, verify, and validate both the business requirements as
Project aspect: The entire project was tested and found successful.
Validation testing
Validation Testing ensures that the product actually meets the client's needs. It can also be
defined as to demonstrate that the product fulfills its intended use when deployed on appropriate
environment. The user has to work with the system and check whether the project meets his
needs. In the validation checking, the user works with the beta version of the software.
Project aspects: User enters the appropriate data and results was checked and validated
99
User Acceptance Testing
User acceptance of a system is a key factor of the success of any system. The system under
consideration was tested for user acceptance by running a prototype of the software.
This is arguably the most important type of testing, as it is conducted by the Quality Assurance Team who
will gauge whether the application meets the intended specifications and satisfies the client’s requirement.
The QA team will have a set of pre-written scenarios and test cases that will be used to test the
application.
More ideas will be shared about the application and more tests can be performed on it to gauge its
accuracy and the reasons why the project was initiated. Acceptance tests are not only intended to point out
simple spelling mistakes, cosmetic errors, or interface gaps, but also to point out any bugs in the
application that will result in system crashes or major errors in the application.
By performing acceptance tests on an application, the testing team will reduce how the application will
perform in production. There are also legal and contractual requirements for acceptance of the system.
Project aspects: An alpha version is demonstrated to the users. Their suggestions are recorded.
A test case is a document, which has a set of test data, preconditions, expected results and
postconditions, developed for a particular test scenario in order to verify compliance against a
specific requirement.
Test Case acts as the starting point for the test execution, and after applying a set of input
values, the application has a definitive outcome and leaves the system at some end point or also
100
Test cases involve a set of steps, conditions, and inputs that can be used while performing
testing tasks. The main intent of this activity is to ensure whether a software passes or fails in
terms of its functionality and other aspects. There are many types of test cases such as
functional, negative, error, logical test cases, physical test cases, UI test cases, etc.
Furthermore, test cases are written to keep track of the testing coverage of a software.
Generally, there are no formal templates that can be used during test case writing.
The primary objectives of test case design methods are to derive a set of test that has of highest
likelihood of uncovering the defects. To accomplish this objective, two categories of test case
design techniques are used, Black box testing and White box testing.
White box testing is a test case design method that uses the control structure of the procedural
design to derive test cases. White-box testing is the detailed investigation of internal logic and
structure of the code. White-box testing is also called glass testing or open-box testing. In order
to perform white-box testing on an application, a tester needs to know the internal workings of
the code.
The tester needs to have a look inside the source code and find out which unit/chunk of the code
is behaving inappropriately. Using white box testing methods, we can derive test cases that;
Guarantee that all independent paths within a module have been exercised at least once
Execute all loops at their boundaries and within their operational bounds
101
Black Box Testing
The technique of testing without having any knowledge of the interior workings of the
application is called black-box testing. The tester is oblivious to the system architecture and does
not have access to the source code. Typically, while performing a black-box test, a tester will
interact with the system's user interface by providing inputs and examining outputs without
Black box testing methods focus on the functional requirements if the software. That is, black
box testing enables us to derive sets of input conditions that will fully exercise all functional
requirements of the program. Black box testing attempts to find errors in the following
categories:
Interface errors
Performance errors
Verification is intended to check that a product, service, or system (or portion thereof, or set
thereof) meets a set of design specifications. In the development phase, verification procedures
involve performing special tests to model or simulate a portion, or the entirety, of a product,
service or system, then performing a review or analysis of the modeling results. In the post-
development phase, verification procedures involve regularly repeating tests devised specifically
to ensure that the product, service, or system continues to meet the initial design requirements,
102
specifications, and regulations as time progresses. It is a process that is used to evaluate whether
Validation is intended to ensure a product, service, or system (or portion thereof, or set thereof)
results in a product, service, or system (or portion thereof, or set thereof) that meets the
operational needs of the user. For a new development flow or verification flow, validation
procedures may involve modeling either flow and using simulations to predict faults or gaps that
(or portion thereof, or set thereof) . A set of validation requirements (as defined by the user),
specifications, and regulations may then be used as a basis for qualifying a development flow or
verification flow for a product, service, or system (or portion thereof, or set thereof). Additional
validation procedures also include those that are designed specifically to ensure that
modifications made to an existing qualified development flow or verification flow will have the
effect of producing a product, service, or system (or portion thereof, or set thereof) that meets the
initial design requirements, specifications, and regulations; these validations help to keep the
flow qualified. It is a process of establishing evidence that provides a high degree of assurance
that a product, service, or system accomplishes its intended requirements. This often involves
acceptance of fitness for purpose with end users and other product stakeholders. This is often an
external process.
This project is undergone all verification and validation procedure so that it can be used by the
end user. This meets all the set of design specifications and is tested properly using the test cases.
103
7.4 Debugging
It is a systematic process of spotting and fixing the number of bugs, or defects, in a piece of
software so that the software is behaving as expected. Debugging is harder for complex systems
in particular when various subsystems are tightly coupled as changes in one system or interface
Debugging is a developer activity and effective debugging is very important before testing
begins to increase the quality of the system. Debugging will not give confidence that the system
This project has been undergone all testing and has fix the errors that is reported while testing in
104
8.Input and output Screens
105
106
107
108
109
110
111
9.Implementation of the security for the software developed
Security, as part of the software development process, is an ongoing process involving people
and practices, and ensures application confidentiality, integrity, and availability. Secure software
is the result of security aware software development processes where security is built in and thus
Security is most effective if planned and managed throughout every stage of software
development life cycle (SDLC), especially in critical applications or those that process sensitive
information.
This project Online News Portal has two users; User and Administrator. Both are secured with
MD5 secured passwords. The MD5 message-digest algorithm is a very widely used hash
function producing a 128-bit hash value. Each time the user logins to system, it is checked with
the corresponding table detail in the database and verify whether it is the correct user or not.
112
10.Limitations
The registered user now has only options of searching and viewing the news, change
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
113
12. Bibliography
2. https://www.tutorialspoint.com/php
3. HTML, and CSS Bible. Bill Karow, Chuck White, Steven M. Schafer Bryan Pfaffenberger,
New York: Wiley 2004
4. http://en.wikipedia.org/wiki/Software_engineering
5. http://www.w3schools.com/html/html_intro.asp
114