Professional Documents
Culture Documents
Dariry Management Report-1
Dariry Management Report-1
DAIRY MANAGEMENT
Submitted in partial fulfilment of the requirement for the awards of the degree in
Mahayogi Vemana Road, 16th Main Road , 3rd Block ,Koramangala, Bengaluru -560034.
A Project Report on
DAIRY MANAGEMENT
Submitted in partial fulfilment of the requirement for the awards of the degree in
CERTIFICATE
This is certify that the Project work entitled
DAIRY MANAGEMENT
Submitted in partial fulfilment of the requirement for the award of the degree of
MANJUNATHA BV(U18FR21S0035)
We, MANJUNATHA BV and THARUN KUMAR M student of 6th sem BCA, RJS
First Grade College, bearing Register Number U18FR21S0035 and U18FR21S0082
hereby declare that the project entitled “ DAIRY MANAGEMENT ” has been carried
out by me under the guidance of Mrs.Saritha M, Department of Computer Science &
Applications, RJS First Grade College, Bengaluru and submitted in partial fulfilment of
the requirement for the award of the degree of Bachelor of Computer Applications by
the Bengaluru City University during the academic year 2023-2024. This report has
not submitted to any other Organization /University for any award of degree or
certificate.
Date: Name:
Place: Signature:
ACKNOWLEDGEMENT
First and Foremost I would like to thank my “Parents” who are the first God
and who has given blessings, strength, and stayed with me throughout the
successful completion of the project.
Finally, I thank all the staffs of BCA department who have been a source of
inspiration for accomplishing the project successfully.
Name:
Register Number:
Contents
1 ABSTRACT 1-2
INTRODUCATION 3-6
2
FRONTEND TECHNOLOGIES
3 7-12
6 CODING
19-49
7 SNAPSHOTS 50-59
8 BIBLIOGRAPHY 60-60
9 CONCLUSION 61-61
DAIRY MANAGEMENT
1. ABSTRACT
1. ABSTRACT
Full-stack web development refers to the comprehensive skill set required to create dynamic and
interactiveweb applications, encompassing both the front-end and back-end aspects of the development
process. This abstract provides an overview of the key components and technologies involved in full-stack
web development. Front-end development involves designing and implementing the user interface and user
experience of a web application.
HTML, CSS, and JavaScript are fundamental languages for creating the structure, style, and
interactivity of web pages. Modern front-end frameworks and libraries such as React enhance efficiency and
facilitate the development of responsive and visually appealing user interfaces. Back- end development
focuses on server-side logic, database management, and handling business logic. Server- side programming
languages like Node.js and Java are commonly used for building the back-end of web applications.
Frameworks simplify the development process and promote code organization and scalability.
Database management is a critical aspect of full-stack web development, involving the storage,
retrieval, and manipulation of data. Popular databases include MySQL, MongoDB. Understanding how to
design andinteract with databases is essential for building robust and efficient web applications. To connect
the front- end and back-end components, developers use APIs (Application Programming Interfaces). APIs
enable seamless communication between different parts of a web application, allowing data exchange and
ensuringa cohesive user experience.
In conclusion, mastering full-stack web development involves acquiring proficiency in front-end and
back-end technologies, database management, API integration, version control.Developers with full-stack
expertise are equipped to create end-to-end solutions, delivering robust and scalable web applications that
meet the evolving needs of users and businesses.
2. INTRODUCTION
2. INTRODUCTION
Goal:
To understand the basics of how the web technology works, both at the server and client-side, and how
everything combines front-end to the back-end to give a complete web-app.
Explanation:
“Full Stack Web Development alludes to the development of both front end (client side) and back end (server
side) portion of web application.” Full stack “web engineers can configuration complete web application and
sites. They take a shot at the frontend, backend,” database and maintenance of web application or sites. “Front
end is the noticeable piece of site or web application which is liable for client experience. The client
straightforwardly interfaces with the front-end segment of the web application or site.” Back end alludes “to
the server-side portion of web application or site with an essential spotlight on how the site functions. It is
answerable for dealing with the database through questions” and APIs by customer side orders. This sort of
site primarily comprises of three sections front end, back end, and database. “Database is the assortment of
between related information which helps in productive recovery, addition and erasure of information from
database and sorts out the information as tables, sees, patterns, reports and so on.
2.1 Modules
HTML
HTML (Hypertext Mark-up Language) Goal- To utilize prior knowledge of HTML Fundamentals and
become practically familiar with the most usable tags such as div, span, strong, forms, image, hyperlinks etc.
CSS
Cascading Style Sheets (CSS) and scripting dialects, for example, JavaScript. Internet browsers get HTML
reports from a web server or from nearby capacity and render the records into mixed media site pages.
JAVASCRIPT
JavaScript frequently” shortened as JS, is a programming language that fits in with the ECMAScript determination.
JavaScript is elevated level, regularly in the nick of time” gathered, and multi-worldview.
REACTJS
React (otherwise called React.js or ReactJS) is an open-source JavaScript library for building UIs. It is kept up by
Facebook and a network of individual designers and organizations.
NODEJS
Node.js is an open-source, cross-stage, JavaScript runtime condition that executes JavaScript code outside of an
internet browser.
MANGODB
Mango DB is an open source NoSQL database management program. MongoDB is a tool that can manage
document-oriented information, store or retrieve information.
3. FRONTEND TECHNOLOGIES
3. FRONTEND TECHNOLOGIES
Goal-
To utilize prior knowledge of HTML Fundamentals and become practically familiar with the most usable
tags such as div, span, strong, forms, image, hyperlinks etc.
Explanation –
Hypertext Mark-up Language (HTML) is the standard” mark-up language for archives intended to be shown
in an internet browser. It very well may be” helped by advancements, for example, Cascading Style Sheets
(CSS) and scripting dialects, for example, JavaScript. Internet browsers get HTMLreports from a web server
or from nearby capacity and render the records into mixed media site pages.
HTML portrays the” structure of a site page semantically and initially included signals” for the presence of
the” archive. HTML components are the structure squares of HTML pages. With HTML builds, pictures and
different “items, for example, intelligent structures might be implanted into the rendered page. HTML gives
a way to make organized archives by indicating basic semantics for content, for example, headings, passages,
“records, connections, cites and different things. HTML components are depicted by labels, composed
utilizing point sections. Labels, for example, Error! Filename not specified.and straightforwardly bring
content into the page.
.
Goal-
To get familiar with basics of styling a webpage using CSS and minifying CSS for more efficiency.
Explanation –
Cascading Style Sheets (CSS) is a template language utilized for portraying the introductionof a record
written in a mark-up language like HTML. CSS is a foundation innovation of the
World Wide Web, close by HTML and JavaScript”. CSS is “intended to empower the partition of introduction
and substance, including design, hues, and fonts. This detachment “can improve content availability, give
greater adaptability and control in the detail of introduction qualities empower different site pages to share
arranging by determining the significant CSS in a different .CSS record, and lessen intricacy and redundancy
in the auxiliary substance”. Partition of organizing and substance likewise makes it attainable to introduce a
similar mark-up page in various styles for various rendering techniques, for example, on-screen, in print, by
voice (by means of discourse based program or screen per user), and on Braille-based material gadgets. CSS
additionally has rules for substitute designing if the substance is gotten to on a versatile device.
The name cascading originates from the predefined need plan to figure out which style rule applies if more
than one principle coordinates a specific component. This falling need conspire is unsurprising.
3.3 JAVASCRIPT
Goal-
To understand the concepts of JavaScript such as event-handling, OOPS etc. and use them to create
interactive web-apps
.
Explanation-
JavaScript frequently shortened as JS, is a programming language that fits in with the ECMAScript
determination. JavaScript is elevated level, regularly in the nick of time gathered, and Mult worldview. It
has wavy section linguistic structure, dynamic composing, model-based article direction, andtop of the line
capacities. Nearby HTML and CSS, JavaScript is one of the centre advances of the World Wide Web.
JavaScript empowers intuitive site pages and is a 13 fundamental piece of web applications. Mostby far of sites
use it for customer side page conduct, and all significant internet browsers have a devoted JavaScript motor
to execute it. As a multi-worldview language, JavaScript underpins occasion driven, practical, and basic
programming styles. It has application programming interfaces (APIs) for working withcontent, dates,
ordinary articulations, standard information structures, and the Document Object Model (DOM).
Notwithstanding, the language itself does exclude any info/yield (I/O, for example, systems administration,
stockpiling, or illustrations offices, as the host condition (generally an internet browser) givesthose APIs.
JavaScript motors were initially utilized distinctly in internet browsers, however they are presently
implanted in certain servers, as a rule by means of Node.js. They are additionally installed in an assortment
of uses made with systems, for example, Electron and Cordova. In spite of the fact that there aresimilarities
among JavaScript and Java, including language name, linguistic structure, and particular standard libraries,
the two dialects are unmistakable and contrast enormously in plan.
3.4 REACTJS
Goal- To understand the architecture of front-end development using react framework developed by the
Facebook.
Explanation-
React (otherwise called React.js or ReactJS) is an open-source JavaScript library for buildingUIs. It is kept
up by Facebook and a network of individual designers and organizations. React can be utilizedas a base in the
advancement of single-page or portable applications. Be that as it may, react is just worriedabout rendering
information to the DOM, thus making React applications for the most part requires the utilization of extra
libraries “for state the executives and directing. Redux and React Router are individual instances of such
libraries.
4. BACKEND TECHNOLOGIES
4. BACKEND TECHNOLOGIES
4.1 NODEJS
Goal-
To understand the basics of backend development using node js and to host a server using express js.
Explanation –
Node.js is an open-source, cross-stage, JavaScript runtime condition that executes JavaScriptcode outside of
an internet browser. Node.js lets engineers use JavaScript to compose order line devices andfor server-side
scripting running contents server-side to deliver dynamic website page content before the page is sent to the
client's internet browser. Subsequently, Node.js speaks to a JavaScript all over the place worldview, bringing
together web-application improvement around a solitary programming language, as opposed to various
dialects for server-and customer side contents. However .js is the standard filename expansion for JavaScript
code, the name "Node.js" doesn't allude to a specific document in this unique circumstance and is only the
name of the item. Node.js has an occasion driven design equipped for offbeat I/O. These plan decisions mean
to upgrade throughput and adaptability in web applications with many info/yield tasks, just as for continuous
Web applications (e.g., ongoing correspondence projects and programgames). The Node.js disseminated
advancement venture was recently represented by the Node.js Foundation, and has now converged with the
JS Foundation to frame the Open JS Foundation, which is encouraged by the Linux Foundation's
Collaborative Projects program.
4.2 MongoDB
MongoDB is a document database used to build highly available and scalable internet applications. With
its flexible schema approach, it’s popular with development teams using agile methodologies. Offering
driversfor all major programming languages, MongoDB allows you to immediately start building your
applicationwithout spending time configuring a database. MongoDB is an open-source document database
built on a horizontal scale-out architecture that uses a flexible schema for storing data. Founded in 2007,
MongoDB has a worldwide following in the developer community. Instead of storing data in tables of rows
or columnslike SQL databases, each record in a MongoDB database is a document described in BSON, a
binary representation of the data. Applications can then retrieve this information in a JSON format.
Document databases are highly flexible, allowing variations in the structure of documents and storing
documents that are partially complete. One document can have others embedded in it. Fields in a document
play the role ofcolumns in a SQL database, and like columns, they can be indexed to increase search
performance.
From itsfounding, MongoDB was built on a scale-out architecture, a structure that allows many small
machines to work together to create fast systems and handle huge amounts of data. MongoDB has always
focused on providing developers with an excellent user experience, which, in addition to all its other
properties, has made MongoDB a favourite of developers worldwide for a wide variety of applications.
Visual Studio Code is a source-code editor that can be used with a variety of programming languages,
including C, C#, C++, Fortran, Go, Java, JavaScript, Node.js, python, Rust. It is based on the Electron
framework, which is used to develop Node.js web applications that run on the Blinklayout engine. Visual
Studio Code employs the same editor component (codenamed "Monaco") used in Azure DevOps (formerly
called "Visual Studio Online" and "Visual Studio Team Services").Out of the box, Visual Studio Code
includes basic support for most common programming languages. This basic support includes syntax
highlighting, bracket matching, code folding, and configurable snippets. Visual Studio Codealso ships with
IntelliSense for JavaScript, TypeScript, JSON, CSS, and HTML, as well as debugging support for Node.js.
Support for additional languages can be provided by freely available extensions on theVS Code Marketplace.
Instead of a project system, it allows users to open one or more directories, which can then be saved in
workspaces for future reuse. This allows it to operate as a language-agnostic code editor for any language.
It supports many programming languages and a set of features that differs per language. Unwanted files and
folders can be excluded from the project tree via the settings. Many Visual Studio Code features are not
exposed through menus or the user interface but can be accessed via the command palette. Visual Studio Code
can be extended via extensions, available through a central repository.This includes additions to the
editorand language support. A notable feature is the ability to create extensions that add support for new
languages, themes, debuggers, time travel debuggers, perform static code analysis, and add code linters
using the Language Server Protocol. Source control is a built-in featureof Visual Studio Code. It has a
dedicated tab inside of the menu bar where users can access version controlsettings and view changes made
to the current project.
5. CODING
6. CODING
6.1 HOME PAGE
SB-ADMIN-2.CSS body {
background-colour: #f8f8f8;
}
#wrapper
{width: 100%;
}
#page-wrapper {padding: 0 15px;
min-height: 568px; background-
colour: white;
}
. navbar-top-links li a {padding:
15px; min-height: 50px;
}
. navbar-top-links. dropdown-menu li {
display: block;
}
. navbar-top-links. dropdown-menu li: last-child
{margin-right: 0;
}
. navbar-top-links. dropdown-menu li a {padding:
3px 20px; min-height: 0;
}
. navbar-top-links. dropdown-menu li a div
{white-space: normal;
}
. navbar-top-links. dropdown-messages,
. navbar-top-links. dropdown-tasks,
. navbar-top-links. dropdown-alerts {width:
310px; min-width: 0;
}
. navbar-top-links. dropdown-messages
{margin-left: 5px;
}
. navbar-top-links. dropdown-tasks
{margin-left: -59px;
}
. navbar-top-links. dropdown-alerts
{margin-left: -123px;
}
. sidebar .nav-second-level li a
{padding-left: 37px;
}
. sidebar .nav-third-level li a
{padding-left: 52px;
}
@media (min-width: 768px) {
. sidebar {z-index: 1; position:
absolute; width: 250px;
margin-top: 51px;
. navbar-top-links. dropdown-messages,
. navbar-top-links. dropdown-tasks, navbar-top-links.
dropdown-alerts
{margin-left: auto;
}
}
. ban-outline {colour: inherit; background-
colour: transparent; transition: all .5s;
}
. ban-primary. Tn-outline
{colour: #428bca;
}
. ban-success. Tn-outline
{colour: #5cb85c;
}
. ban-infobot-outline
{colour: #5bc0de;
}
. ban-warning. Tn-outline
{colour: #f0ad4e;
}
. ban-danger. Tn-outline
{colour: #d9534f;
}
margin: 0; padding: 0;
list-style: none;
}
. chat li {margin-bottom: 10px; padding-bottom:
5px; border-bottom: 1px dotted #999999;
}
. chat li. left. chat-body
{margin-left: 60px;
}
. chat li. right. chat-body
{margin-right: 60px;
}
. chat li. chat-body p
{margin: 0;
}
. panel. slide down. glyph icon,
. chat. glyph icon {margin-
right:
5px;
}
. chat-panel. panel-body {height:
350px; overflow-y: scroll;
}
.login-panel { margin-top:
25%;
}
. flat-chart
{display: block; height: 400px;
}
. flat-chart-content
{width: 100%; height: 100%;} table. data Table thread. sorting, table.dataTable thread .seringas,
table.dataTable thread .syringes,
table.dataTable thread .sorting_asc_disabled,
table.dataTable thread .sorting_desc_disabled {
background: transparent; }
table. data Table thread. seringas: after { content:
"\f0de"; float: right; font-family: font awesome; }
table.dataTable thread .sorting_desc:after
{content: "\f0dd";
Add_category.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add Category Code
if(isset($_POST['submit']))
{
//Getting Post Values
$catname=$_POST['category'];
$catcode=$_POST['categorycode'];
$query=mysqli_query($con,"insert into tblcategory(CategoryName,CategoryCode)
values('$catname','$catcode')");
if($query){
echo "<script>alert('Category added successfully.');</script>";
echo "<script>window.location.href='add-category.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-category.php'</script>";
Dept. of BCA,RJSFGC 2023-2024 Page 25
DAIRY MANAGEMENT
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>Add Product</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Category"
name="category" required>
<div class="invalid-feedback">Please provide a valid category name.</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category Code</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Category Code"
name="categorycode" required>
<div class="invalid-feedback">Please provide a valid category code.</div>
</div>
</div>
</div>
Dept. of BCA,RJSFGC 2023-2024 Page 27
DAIRY MANAGEMENT
</div>
</div>
</div>
<!-- /Main Content -->
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>
</body>
</html>
<?php } ?>
add-company.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add company Code
if(isset($_POST['submit']))
{
//Getting Post Values
$cname=$_POST['companyname'];
$query=mysqli_query($con,"insert into tblcompany(CompanyName) values('$cname')");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>Add Company</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Company Name</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Company Name"
name="companyname" required>
<div class="invalid-feedback">Please provide a valid Company name.</div>
</div>
</div>
</div>
</div>
</div>
Dept. of BCA,RJSFGC 2023-2024 Page 30
DAIRY MANAGEMENT
</div>
<!-- /Main Content -->
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>
</body>
</html>
<?php } ?>
Add-product.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add product Code
if(isset($_POST['submit']))
{
//Getting Post Values
$catname=$_POST['category'];
$company=$_POST['company'];
$pname=$_POST['productname'];
$pprice=$_POST['productprice'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>Add Product</title>
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>
<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" novalidate>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Category</label>
<select class="form-control custom-select" name="category" required>
<option value="">Select category</option>
<?php
$ret=mysqli_query($con,"select CategoryName from tblcategory");
while($row=mysqli_fetch_array($ret))
{?>
<option value="<?php echo $row['CategoryName'];?>"><?php echo
$row['CategoryName'];?></option>
<?php } ?>
</select>
<div class="invalid-feedback">Please select a category.</div>
</div>
</div>
Dept. of BCA, RJSFGC 2023-2024 Page 33
DAIRY MANAGEMENT
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Company</label>
<select class="form-control custom-select" name="company" required>
<option value="">Select Company</option>
<?php
$ret=mysqli_query($con,"select CompanyName from tblcompany");
while($row=mysqli_fetch_array($ret))
{?>
<option value="<?php echo $row['CompanyName'];?>"><?php echo $row['CompanyName'];?></option>
<?php } ?>
</select>
<div class="invalid-feedback">Please select a company.</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Product Name</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Product Name"
name="productname" required>
<div class="invalid-feedback">Please provide a valid product name.</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">Product Price</label>
<input type="text" class="form-control" id="validationCustom03" placeholder="Product Price"
name="productprice" required>
<div class="invalid-feedback">Please provide a valid product price.</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /Main Content -->
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>
</body>
</html>
<?php } ?>
bwdate-report-details.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Code for deletion
if(isset($_GET['del'])){
$cmpid=substr(base64_decode($_GET['del']),0,-5);
$query=mysqli_query($con,"delete from tblcategory where id='$cmpid'");
echo "<script>alert('Category record deleted.');</script>";
echo "<script>window.location.href='manage-categories.php'</script>";
}
?>
<!DOCTYPE html>
<html lang="en">
</tr>
</thead>
<tbody>
<?php
$rno=mt_rand(10000,99999);
$query=mysqli_query($con,"select distinct
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<!-- /Row -->
</div>
<!-- /Container -->
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="vendors/datatables.net/js/jquery.dataTables.min.js"></script>
<script src="vendors/datatables.net-bs4/js/dataTables.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-dt/js/dataTables.dataTables.min.js"></script>
<script src="vendors/datatables.net-buttons/js/dataTables.buttons.min.js"></script>
<script src="vendors/datatables.net-buttons-bs4/js/buttons.bootstrap4.min.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.flash.min.js"></script>
<script src="vendors/jszip/dist/jszip.min.js"></script>
Dept. of BCA, RJSFGC 2023-2024 Page 39
DAIRY MANAGEMENT
<script src="vendors/pdfmake/build/pdfmake.min.js"></script>
<script src="vendors/pdfmake/build/vfs_fonts.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.html5.min.js"></script>
<script src="vendors/datatables.net-buttons/js/buttons.print.min.js"></script>
<script src="vendors/datatables.net-
responsive/js/dataTables.responsive.min.js"></script>
<script src="dist/js/dataTables-data.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
</body>
</html>
<?php } ?>
bwdate-report-ds.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{
// Add company Code
if(isset($_POST['submit']))
{
//Getting Post Values
$cname=$_POST['companyname'];
$query=mysqli_query($con,"insert into tblcompany(CompanyName) values('$cname')");
if($query){
echo "<script>alert('Company added successfully.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-company.php'</script>";
}
}
?>
<!DOCTYPE html>
<html lang="en">
<body>
<div class="row">
<div class="col-sm">
<form class="needs-validation" method="post" action="bwdate-report-details.php" novalidate>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">From Date</label>
<input class="form-control" type="date" name="fromdate" required />
<div class="invalid-feedback">Please provide a from date.</div>
</div>
</div>
<div class="form-row">
<div class="col-md-6 mb-10">
<label for="validationCustom03">To Date</label>
<input class="form-control" type="date" name="todate" required />
<div class="invalid-feedback">Please provide a to date.</div>
</div>
</div>
<button class="btn btn-primary" type="submit" name="submit">Submit</button>
</form>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
<script src="vendors/jquery/dist/jquery.min.js"></script>
<script src="vendors/popper.js/dist/umd/popper.min.js"></script>
<script src="vendors/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="vendors/jasny-bootstrap/dist/js/jasny-bootstrap.min.js"></script>
<script src="dist/js/jquery.slimscroll.js"></script>
<script src="dist/js/dropdown-bootstrap-extended.js"></script>
<script src="dist/js/feather.min.js"></script>
<script src="vendors/jquery-toggles/toggles.min.js"></script>
<script src="dist/js/toggle-data.js"></script>
<script src="dist/js/init.js"></script>
<script src="dist/js/validation-data.js"></script>
</body>
</html>
<?php } ?>
Dashboard.php
<?php
session_start();
//error_reporting(0);
include('includes/config.php');
if (strlen($_SESSION['aid']==0)) {
header('location:logout.php');
} else{ ?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>Dashboard</title>
<link href="vendors/vectormap/jquery-jvectormap-2.0.3.css" rel="stylesheet"
type="text/css" />
<link href="vendors/jquery-toggles/css/toggles.css" rel="stylesheet" type="text/css">
<link href="vendors/jquery-toggles/css/themes/toggles-light.css" rel="stylesheet"
type="text/css">
<body>
<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>
<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>
<!-- /Vertical Nav -->
<!-- Main Content -->
<div class="hk-pg-wrapper">
<!-- Container -->
<div class="container-fluid mt-xl-50 mt-sm-30 mt-15">
<!-- Row -->
<div class="row">
<div class="col-xl-12">
<div class="hk-row">
<?php
$query=mysqli_query($con,"select id from tblcategory");
$listedcat=mysqli_num_rows($query);
?>
<?php
$ret=mysqli_query($con,"select id from tblcompany");
$listedcomp=mysqli_num_rows($ret);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Companies</span>
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><span class="counter-anim"><?php echo
$listedcomp;?></span></span>
<small class="d-block">Listed Companies</small>
</div>
</div>
</div>
</div>
<?php
$sql=mysqli_query($con,"select id from tblproducts");
$listedproduct=mysqli_num_rows($sql);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Products</span>
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><?php echo $listedproduct;?></span>
<small class="d-block">Listed Products</small>
Dept. of BCA, RJSFGC 2023-2024 Page 45
DAIRY MANAGEMENT
</div>
</div>
</div>
</div>
<?php
$query=mysqli_query($con,"select sum(tblorders.Quantity*tblproducts.ProductPrice) as
tt from tblorders join tblproducts on tblproducts.id=tblorders.ProductId ");
$row=mysqli_fetch_array($query);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Total Sales</span>
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><?php echo
number_format($row['tt'],2);?></span>
<small class="d-block">Total sales till date</small>
</div>
</div>
</div>
</div>
<?php
$qury=mysqli_query($con,"select sum(tblorders.Quantity*tblproducts.ProductPrice) as tt from
tblorders join tblproducts on tblproducts.id=tblorders.ProductId where
date(tblorders.InvoiceGenDate)>=(DATE(NOW()) - INTERVAL 7 DAY)");
$row=mysqli_fetch_array($qury);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Last 7 Days Sales</span>
</div>
<div>
</div>
</div>
<div class="text-center">
Dept. of BCA, RJSFGC 2023-2024 Page 46
DAIRY MANAGEMENT
<span class="d-block display-4 text-dark mb-5"><?php echo
number_format($row['tt'],2);?></span>
<small class="d-block">Last 7 Days Total Sales</small>
</div>
</div>
</div>
</div>
<?php
$qurys=mysqli_query($con,"select sum(tblorders.Quantity*tblproducts.ProductPrice) as
tt from tblorders join tblproducts on tblproducts.id=tblorders.ProductId where
date(tblorders.InvoiceGenDate)=CURDATE()-1");
$rw=mysqli_fetch_array($qurys);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Yesterday Sales</span>
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><?php echo
number_format($rw['tt'],2);?></span>
<small class="d-block">Yesterday Total Sales</small>
</div>
</div>
</div>
</div>
<?php
$quryss=mysqli_query($con,"select sum(tblorders.Quantity*tblproducts.ProductPrice) as
tt from tblorders join tblproducts on tblproducts.id=tblorders.ProductId where
date(tblorders.InvoiceGenDate)=CURDATE()");
$rws=mysqli_fetch_array($quryss);
?>
<div class="col-lg-3 col-md-6">
<div class="card card-sm">
<div class="card-body">
<div class="d-flex justify-content-between mb-5">
<div>
<span class="d-block font-15 text-dark font-weight-500">Today's Sales</span>
Dept. of BCA, RJSFGC 2023-2024 Page 47
DAIRY MANAGEMENT
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><?php echo
number_format($rws['tt'],2);?></span>
<small class="d-block">Today's Total Sales</small>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- /Container -->
</div>
<!-- /HK Wrapper -->
</body>
</html>
<?php } ?>
Logout.php
<?php
session_start();
session_destroy(); // destroy session
header("location:index.php");
?>
7. SNAPSHOTS
7. SNAPSHOTS
8. BIBLIOGRAPHY
9. BIBLIOGRAPHY
[1] https://blog.logrocket.com/mern-stack-tutorial.
[2] w3Schools : https://www.w3schools.com/react/default.asp.
[3] Wikipedia: https://wikitia.com/wiki/MERN_(solution_stack).
[4] https://www.youtube.com/watch?v=2zoq8vvwX4M.
[5] https://legacy.reactjs.org/tutorial/tutorial.html.
[6] https://www.mongodb.com/docs/manual/introduction/.
[7] https://www.geeksforgeeks.org/installation-of-node-js-on-windows/.