Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

ONLINE NES MANAGEMENT SYSTEM, Assignments of Computer Science

The project will give the details of online news management system

Typology: Assignments

2019/2020

Uploaded on 08/26/2020

anil-kumar-singh
anil-kumar-singh 🇮🇳

1 document

Partial preview of the text

Download ONLINE NES MANAGEMENT SYSTEM and more Assignments Computer Science in PDF only on Docsity! 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 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 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. 1.3 Tools/ Platform Hardware & Software Requirements 2  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 handle it) to a theoretical limit of 8 million terabytes (TB).  MySQL is customizable. The open-source GPL license allows programmers to modify the MySQL software to fit their own specific environments. 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.  It is integrated with a number of popular databases, including MySQL, PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.  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 with huge result sets in record-setting time.  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 n-tier development a possibility for the first time.  PHP is forgiving: PHP language tries to be as forgiving as possible.  PHP Syntax is C-Like. 5 Common uses of PHP are ;  PHP performs system functions, i.e. from files on a system it can create, open, read, write, and close them.  PHP can handle forms, i.e. gather data from files, save data to a file, through email you can send data, return data to the user.  You add, delete, modify elements within your database through PHP.  Access cookies variables and set cookies.  Using PHP, you can restrict users to access some pages of your website.  It can encrypt data. 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  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 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 6 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 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. 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 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 7  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. 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. 10 In its simplest terms, the two criteria to judge feasibility are cost required and value to be attained. A well-designed feasibility study should provide a historical background of the business or 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 obligations. Generally, feasibility studies precede technical development and project 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 which decisions can be based. 2.3.1 Technical feasibility 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 feasibility report, the following should be taken to consideration:  A brief description of the business to assess more possible factors which could affect the study  The part of the business being examined  The human and economic factor  The possible solutions to the problem 11 At this level, the concern is whether the proposal is both technically and legally feasible (assuming moderate cost). The technical feasibility assessment is focused on gaining an understanding of the present 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 proposed system. 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 serious constraint then the project is judged technically feasible. 2.3.2 Operational feasibility 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 requirements identified in the requirements analysis phase of system development. 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 schedule, delivery date, corporate culture and existing business processes. To ensure success, desired operational outcomes must be imparted during design and development. These include such design-dependent parameters as reliability, maintainability, supportability, usability, producibility, disposability, sustainability, affordability and others. These parameters are required to be considered at the early stages of design if desired 12 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 4. Systems Design 15 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. 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. System design takes the following inputs −  Statement of work  Requirement determination plan  Current situation analysis  Proposed system requirements including a conceptual data model, modified DFDs, and Metadata (data about data). 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.  Actual or pseudocode for each module in the program.  A prototype for the proposed system. 16 4.1 Entity Relationship Diagram 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 sets need not be disjoint. Entities are represented by means of rectangles. Rectangles are named with the entity set they represent. Eg: 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. 17 Category  Binary = degree 2  Ternary = degree 3  n-ary = degree 20 User Has Login LoginId Password CategoryName PostTitle PostId Email Password CategoryId Description Username UserId Description CreatedDate Manage Post Category Subcategory Has Description SubName SubId CreatedDate ER Diagram for Online News Portal UserName 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:  Logical information flow of the system  Determination of physical system construction requirements  Simplicity of notation  Establishment of manual and automated systems requirements DFD Symbols:- There are four basic symbols that are used to represent a data-flow diagram. Name Notation Role Process Transforms incoming data flow to output data flow Data Store Repositories of data in the system. 22 Online News Portal User Management Category Management Subcategory ManagementPosts Management Comments Management Login Management Level 0 : Data Flow Diagram 25 Online News Portal Category Management Login Management Subcategory Management Posts Management Comments Management Generate Category Report Check User Login Details Generate Subcategory Report Generate Post Report Generate Comments Report Level 1 : Data Flow Diagram 26 Admin Login to system Check roles of access Manage modulesCheck credentials Manage Comments Details Manage Posts Details Manage Sub category Details Manage Category Details Level 2 : Admin Data Flow Diagram 27 2. User  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. 30 5.1. Tables : 1. user_details Field q Userld UserName Password Status CreationDate UpdationDate Email 2. category_details Field Ys categoryld CategoryName Description Status CreatedDate UpdatedDate 3.subcategory_details Type Comment: int (11) NOT NOLL varchar (255) NOT NULL varchar (255) NOT NULL int (11) NOT NULL timestamp NOT NULL timestamp NOT NULL varchar (255) NOT NULL Type Comment int (11) NOT NULL varchar (255) NOT NULL varchar (255) NOT NULL int (11) NOT NULL timestamp NOT NULL timestamp NOT NULL 31 Field q Subcategoryld SubcategoryName SubDescription Status Categoryld CreatedDate UpdatedDate 4. post_details Field q PostId PostTitle CategoryId SubcategoryId PostDetails PostingDate UpdationDate Status PostUrl PostImage 5. comment_details F 2 CommentIa Postid Name Email Comment PostingDate ‘Status 6. gallery_details Type ‘Comment. int(11) NOT NULL varchar (255) NOT NULL varchar (255) NOT NULL int (11) NOT NULL int (11) NOT NULL timestamp NOT NULL timestamp NOT NULL Type Comment int (11) NOT NULL longtext NULL int (11) NULL int(11) NULL longtext NULL timestamp NULL timestamp NULL int (11) NULL mediumteaxt NULL warchar (255) NULL Type Comment. int (11) NOT NULL int (11) NOT NULL varchar (30) NOT NULL varchar (50) NOT NULL varchar (255) NOT NULL timestamp NOT NULL int(11) NOT NULL 32 <div class="center"> <?php include ('includes/header.php'); ?> <div class="main_menu_area"> <?php $query=mysqli_query($con,"select * from category_details where Status=1"); while($row=mysqli_fetch_array($query)) { $id=$row['CategoryId']; $query1=mysqli_query($con,"SELECT * FROM subcategory_details WHERE CategoryId=$id and Status=1"); ?> <ul id="nav"> <li><a href="#"><?php echo htmlentities($row['CategoryName']);?></a> <ul> <?php while($row1=mysqli_fetch_array($query1)) { 35 ?> <li><a href="search-news.php?subid=<?php echo htmlentities( $row1['SubcategoryId']);?>"><?php echo htmlentities($row1['SubcategoryName']);?></a></li> <?php } ?> </ul></li></ul> <?php}?> </div> <div class="slider_area"> <div class="slider"> <ul class="bxslider"> <?php $query=mysqli_query($con,"select * from post_details where Status=1"); while($row=mysqli_fetch_array($query)) {?> <li><img src="admin/postimages/<?php echo htmlentities($row['PostImage']);?>" alt="" title="" /></li> <li><img src="images/2.jpg" alt="" title="" /></li> 36 <li><img src="images/3.jpg" alt="" title="" /></li> <?php } ?> </ul> </div></div> <div class="content_area"> <div class="main_content floatleft"> <div class="left_coloum floatleft"> <div class="single_left_coloum_wrapper"> <h2 class="title">from around the world</h2> <?php $query=mysqli_query($con,"select * from post_details where Status=1"); while($row=mysqli_fetch_array($query)) { $id= $row['PostId']; $text = substr($row['PostDetails'],0,50); ?> <div class="single_left_coloum floatleft"> <img src="admin/postimages/<?php echo htmlentities($row['PostImage']);?>" alt="" /> <h3><?php echo htmlentities($row['PostTitle']);?></h3> 37 indent: '-' }); selectnav('f_menu', { label: '-Navigation-', nested: true, indent: '-' }); $('.bxslider').bxSlider({ mode: 'fade', captions: true }); </script> </body> </html> </body> </html> View_postdetails.php <?php 40 session_start(); include ('config/dbconnect.php'); //Genrating CSRF Token if (empty($_SESSION['token'])) { $_SESSION['token'] = bin2hex(random_bytes(32)); } if(isset($_POST['submit'])) { //Verifying CSRF Token if (!empty($_POST['csrftoken'])) { if (hash_equals($_SESSION['token'], $_POST['csrftoken'])) { if(strlen($_SESSION['login'])!=0) { $name=$_SESSION['login']; $query=mysqli_query($con,"select * from user_details where UserName=$name and Status=1"); $row=mysqli_fetch_array($query); $email=$row['Email']; 41 } else { $name=$_POST['name']; $email=$_POST['email']; } $comment=$_POST['comment']; $postid=$_GET['post']; $st1='0'; $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 { 42 $post=$_GET['post']; $query=mysqli_query($con,"select * from post_details where PostId=$post and Status=1"); while($row=mysqli_fetch_array($query)) { $id= $row['PostId']; //$text = substr($row['PostDetails'],0,50); ?> <div class=""> <img src="admin/postimages/<?php echo htmlentities($row['PostImage']);?>" alt="" /> <h3><?php echo htmlentities($row['PostTitle']);?></h3> <p><?php echo htmlentities($row['PostDetails']);?></p> <?php }?> </div> <div class="single_left_coloum_wrapper gallery"> <h2 class="title">Leave a Comment:</h2> <form name="Comment" method="post"> <input type="hidden" name="csrftoken" value="<?php echo htmlentities($_SESSION['token']); ?>" /> 45 <?php if(!isset($_SESSION['login'])) { ?> <input type="text" name="name" class="form-control" placeholder="Name" required > <input type="email" name="email" class="form-control" placeholder="Email" required > <?php } ?> <textarea class="form-control" name="comment" rows="3" placeholder="Comment" required></textarea> <button type="submit" class="btn btn-primary" name="submit">Submit</button> </form> </div> </div> </div> <!---Comment Display Section ---> <?php 46 $sts=1; $query=mysqli_query($con,"select Name,Comment,PostingDate from comment_details where PostId='$id' and Status='$sts'"); while ($row=mysqli_fetch_array($query)) { ?> <div class="media mb-4"> <img class="d-flex mr-3 rounded-circle" src="images/usericon.png" alt=""> <div class="media-body"> <h5 class="mt-0"><?php echo htmlentities($row['Name']);?> <br /> <span style="font-size:11px;"><b>at</b> <?php echo htmlentities($row['PostingDate']);?></span> </h5> <?php echo htmlentities($row['Comment']);?> </div> </div> <?php } ?> </div> </div> </div> <div class="footer_bottom_area"> 47 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>News Portal</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <link rel="stylesheet" type="text/css" href="assets/font/font-awesome.min.css" /> <link rel="stylesheet" type="text/css" href="assets/font/font.css" /> <link rel="stylesheet" type="text/css" href="assets/css/bootstrap.min.css" media="screen" /> <link rel="stylesheet" type="text/css" href="assets/css/style.css" media="screen" /> <link rel="stylesheet" type="text/css" href="assets/css/responsive.css" media="screen" /> <link rel="stylesheet" type="text/css" href="assets/css/jquery.bxslider.css" media="screen" /> </head> <body> <div class="body_wrapper"> <div class="center"> <?php 50 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"> <div class="main_content floatleft"> <div class="left_coloum floatleft"> <div class="single_left_coloum_wrapper"> <h2 class="title">Search details</h2> <?php if(($_GET['subid'])!=NULL) { $id=$_GET['subid']; $query="select * from post_details where SubcategoryId=$id and Status=1"; 51 $sql= mysqli_query($con, $query); $row= mysqli_fetch_array($sql); if($row>0) { while ($row) { ?> <div class="card mb-4"> <div class="card-body"> <h2 class="card-title"><?php echo htmlentities($row['PostTitle']);?></h2> <a href="view-postdetails.php?post=<?php echo htmlentities($row['PostId'])?>" class="btn btn-primary">Read More &rarr;</a> </div> <div class="card-footer text-muted"> Posted on <?php echo htmlentities($row['PostingDate']);?> </div> </div> <?php } 52 } } else { echo "Password and confirm password are not same."; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content="News Portal."> <!-- App title --> <title>News Portal </title> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> 55 <link href="assets/css/core.css" rel="stylesheet" type="text/css" /> <link href="assets/css/components.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/pages.css" rel="stylesheet" type="text/css" /> <link href="assets/css/menu.css" rel="stylesheet" type="text/css" /> <link href="assets/css/responsive.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.js"></script> <script type="text/javascript"> function confirmPass() { var pass = document.getElementById("Password").value var confPass = document.getElementById("CPassword").value if(pass != confPass) { alert('Wrong confirm password !'); } } </script> </head> <body class="bg-transparent"> 56 <!-- HOME --> <section> <div class="container-alt"> <div class="row"> <div class="col-sm-12"> <div class="wrapper-page"> <div class="m-t-40 account-pages"> <div class="text-center account-logo-box"> <h2 class="text-uppercase"> <a href="index.html" class="text-success"> <span><img src="admin/assets1/img/brand/download.png" alt="" height="56"></span> </a> </h2> <!--<h4 class="text-uppercase font-bold m-b-0">Sign In</h4>-- > </div> <div class="account-content"> <form class="form-horizontal" method="post"> 57 </div> </div> </div> </div> </section> <script> var resizefunc = []; </script> <!-- jQuery --> <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> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <script src="assets/js/jquery.scrollTo.min.js"></script> <!-- App js --> 60 <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{ if(isset($_POST['submit'])) { $category=$_POST['category']; 61 $description=$_POST['description']; $status=1; $query=mysqli_query($con,"insert into category_details(CategoryName,Description,Status) values('$category','$description','$status')"); if($query) { $msg="Category created "; } else{ $error="Something went wrong . Please try again."; } } } ?> <html lang="en"> <head> <base href="./"> <meta charset="utf-8"> 62 <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> <li class="breadcrumb-item active">Add Category</li> <div class="container-fluid"> <div class="animated fadeIn"> <div class="row"> <div class="col-sm-6"> <!---Success Message---> <?php if($msg){ ?> 65 <div class="alert alert-success" role="alert"> <strong>Well done!</strong> <?php echo htmlentities($msg);?> </div> <?php } ?> <!---Error Message---> <?php if($error){ ?> <div class="alert alert-danger" role="alert"> <strong>Oh snap!</strong> <?php echo htmlentities($error);?></div> <?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> </div> 66 <div class="card-body"> <form class="form-horizontal" name="category" method="post"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label for="name">Category</label> <input class="form-control" id="category" type="text" placeholder="" name="category" required=""> </div> </div> </div> <!-- /.row--> <div class="row"> <div class="col-sm-12"> <div class="form-group"> <label for="ccnumber">Category Description</label> <textarea class="form-control" id="description" name="description" rows="9" placeholder="" required=""></textarea> </div> 67 $query=mysqli_query($con,"Update category_details set CategoryName='$category',Description='$description' where CategoryId='$catid'"); if($query) { $msg="Category Updated successfully "; header('location:view-category.php?msg1=Category Updated successfully'); } else{ $error="Something went wrong . Please try again."; } } ?> <html lang="en"> <head> <base href="./"> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no"> 70 <meta name="description" content="CoreUI - Open Source Bootstrap Admin Template"> <meta name="author" content="Łukasz Holeczek"> <meta name="keyword" content="Bootstrap,Admin,Template,Open,Source,jQuery,CSS,HTML,RWD,Dashboard"> <title>Add category</title> <!-- Icons--> <link href="assets1/css/coreui-icons.min.css" rel="stylesheet"> <link href="assets1/css/flag-icon.min.css" rel="stylesheet"> <link href="assets1/css/font-awesome.min.css" rel="stylesheet"> <link href="assets1/css/simple-line-icons.css" rel="stylesheet"> <!-- Main styles for this application--> <link href="assets1/css/style.css" rel="stylesheet"> <link href="assets1/css/pace.min.css" rel="stylesheet"> <!-- Global site tag (gtag.js) - Google Analytics--> <script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-118965717-3"></ script> <script> window.dataLayer = window.dataLayer || []; function gtag() { 71 dataLayer.push(arguments); } gtag('js', new Date()); // Shared ID gtag('config', 'UA-118965717-3'); // Bootstrap ID gtag('config', 'UA-118965717-5'); </script> </head> <body class="app header-fixed sidebar-fixed aside-menu-fixed sidebar-lg-show"> <?php include ('includes/header.php'); ?> <div class="app-body"> <div class="sidebar"> <nav class="sidebar-nav"> <ul class="nav"> <li class="nav-item"> 72 <li class="nav-item "> <a class="nav-link nav-link-success" href="view-comments.php" target="_top"> <i class="nav-icon icon-cloud-download"></i> View Comments</a> </li> </ul> </nav> </div> <main class="main"> <!-- Breadcrumb--> <ol class="breadcrumb"> <li class="breadcrumb-item">Home</li> <li class="breadcrumb-item"> Admin </li> <li class="breadcrumb-item active">Add Category</li> <div class="container-fluid"> 75 <div class="animated fadeIn"> <div class="row"> <div class="col-sm-6"> <!---Success Message---> <?php if($msg){ ?> <div class="alert alert-success" role="alert"> <strong>Well done!</strong> <?php echo htmlentities($msg);?> </div> <?php } ?> <!---Error Message---> <?php if($error){ ?> <div class="alert alert-danger" role="alert"> <strong>Oh snap!</strong> <?php echo htmlentities($error);?></div> <?php } ?> </div> </div> <?php $catid=intval($_GET['cid']); 76 $query=mysqli_query($con,"Select CategoryId,CategoryName,Description,CreatedDate,UpdatedDate from category_details where Status=1 and CategoryId='$catid'"); $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"> <form class="form-horizontal" name="category" method="post"> <div class="row"> <div class="col-sm-12"> <div class="form-group"> 77 } } ?> Login.php <?php session_start(); include ('config/dbconnect.php'); if(isset($_POST["submit"])) { $user_name=$_POST["UserName"]; $password=$_POST["Password"]; $query="select * from user_details where UserName='$user_name'"; $sql= mysqli_query($con, $query); $user= mysqli_fetch_array($sql); if($user>0) { $pass=$user["Password"]; if($pass==$password) { 80 $_SESSION["login"]=$user_name; if($user_name=='admin') header('Location: home.php'); else header('Location: ../user.php'); } else {echo "<script>alert('Wrong Password');</script>";} } else { echo "<script>alert('User not registered with us');</script>"; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> 81 <meta name="description" content="News Portal."> <!-- App title --> <title>News Portal | Admin Panel</title> <!-- App css --> <link href="assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="assets/css/core.css" rel="stylesheet" type="text/css" /> <link href="assets/css/components.css" rel="stylesheet" type="text/css" /> <link href="assets/css/icons.css" rel="stylesheet" type="text/css" /> <link href="assets/css/pages.css" rel="stylesheet" type="text/css" /> <link href="assets/css/menu.css" rel="stylesheet" type="text/css" /> <link href="assets/css/responsive.css" rel="stylesheet" type="text/css" /> <script src="assets/js/modernizr.min.js"></script> </head> <body class="bg-transparent"> <!-- HOME --> <section> <div class="container-alt"> <div class="row"> 82 <div class="clearfix"></div> <a href="forgot-password.php">Forgot password</a> </div> </div> </div> <!-- end wrapper --> </div> </div> </div> </section> <!-- END HOME --> <script> var resizefunc = []; </script> <!-- jQuery --> <script src="assets/js/jquery.min.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/detect.js"></script> 85 <script src="assets/js/fastclick.js"></script> <script src="assets/js/jquery.blockUI.js"></script> <script src="assets/js/waves.js"></script> <script src="assets/js/jquery.slimscroll.js"></script> <script src="assets/js/jquery.scrollTo.min.js"></script> <!-- App js --> <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'); 86 } else{ if($_GET['action']=='del' && $_GET['rid']) { $id=intval($_GET['rid']); echo $id; $query=mysqli_query($con,"update category_details set Status='0' where CategoryId='$id'"); $msg="Category deleted "; } // Code for restore if($_GET['resid']) { $id=intval($_GET['resid']); $query=mysqli_query($con,"update category_details set Status='1' where CategoryId='$id'"); $msg="Category restored successfully"; } 87 </div> <?php } ?> <?php if($delmsg){ ?> <div class="alert alert-danger" role="alert"> <strong>Oh snap!</strong> <?php echo htmlentities($delmsg);?></div> <?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"> <button id="addToTable" class="btn btn-success waves-effect waves-light">Add <i class="mdi mdi-plus-circle-outline" ></i></button> </a> </div> <div class="m-b-30"> 90 <a href="home.php"> Back </a> </div> <div class="table-responsive"> <table class="table m-0 table-colored-bordered table-bordered-primary"> <thead> <tr> <th>#</th> <th> Category</th> <th>Description</th> <th>Posting Date</th> <th>Last updation Date</th> <th>Action</th> </tr> </thead> <tbody> 91 <?php $query=mysqli_query($con,"Select CategoryId,CategoryName,Description,CreatedDate,UpdatedDate from category_details where Status=1"); $cnt=1; while($row=mysqli_fetch_array($query)) { ?> <tr> <th scope="row"><?php echo htmlentities($cnt);?></th> <td><?php echo htmlentities($row['CategoryName']);?></td> <td><?php echo htmlentities($row['Description']);?></td> <td><?php echo htmlentities($row['CreatedDate']);?></td> <td><?php echo htmlentities($row['UpdatedDate']);?></td> <td><a href="edit-category.php?cid=<?php echo htmlentities($row['CategoryId']);? >"><i class="fa fa-pencil" style="color: #29b6f6;"></i></a> &nbsp;<a href="view-category.php?rid=<?php echo htmlentities($row['CategoryId']);?>&&action=del"> <i class="fa fa-trash-o" style="color: #f05050"></i></a> </td> 92 ?> <tr> <th scope="row"><?php echo htmlentities($cnt);?></th> <td><?php echo htmlentities($row['CategoryName']);?></td> <td><?php echo htmlentities($row['Description']);?></td> <td><?php echo htmlentities($row['CreatedDate']);?></td> <td><?php echo htmlentities($row['UpdatedDate']);?></td> <td><a href="view-category.php?resid=<?php echo htmlentities($row['CategoryId']);? >"><i class="ion-arrow-return-right" title="Restore this category"></i></a> &nbsp;<a href="view-category.php?rid=<?php echo htmlentities($row['CategoryId']);?>&&action=parmdel" title="Delete forever"> <i class="fa fa-trash-o" style="color: #f05050"></i> </td> </tr> <?php $cnt++; } ?> </tbody> </table> </div> </div> 95 </div> </div> </body> </html> <?php } ?> 96 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 objectives are: Testing is a process of executing a program with the intend of finding an error. A good test is one that uncovers an as yet undiscovered error.  Unit testing  Integration testing  System testing  Validation testing  User acceptance testing 97
Docsity logo



Copyright © 2024 Ladybird Srl - Via Leonardo da Vinci 16, 10126, Torino, Italy - VAT 10816460017 - All rights reserved