Download as pdf or txt
Download as pdf or txt
You are on page 1of 67

A Project Report on

DAIRY MANAGEMENT
Submitted in partial fulfilment of the requirement for the awards of the degree in

BACHELOR OF COMPUTER APPLICATIONS


By
MANJUNATHA BV(U18FR21S0035)
THARUN KUMAR M(U18FR21S0082)

Under the Guidance of


Mrs. SARITHA M

Department of Computer Science and Applications


RJS First Grade College
(Affiliated to Bangalore City University, Recognised by Government of Karnataka)

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

BACHELOR OF COMPUTER APPLICATIONS


By
MANJUNATHA BV(U18FR21S0035)
THARUN KUMAR M(U18FR21S0082)

Under the Guidance of


Mrs. SARITHA M

Department of Computer Science and Applications


RJS First Grade College
(Affiliated to Bangalore City University, Recognised by Government of Karnataka)
Mahayogi Vemana Road, 16th Main Road , 3rd Block ,Koramangala,Bengaluru 560034.
RJS FIRST GRADE COLLEGE
(Affiliated to Bengaluru City University, Recognised by Government of Karnataka)

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

Bachelor of Computer Applications


From Bengaluru City University, Bengaluru is a

result of the bonafide work carried out by

MANJUNATHA BV(U18FR21S0035)

THARUN KUMAR M(U18FR21S0082)


During the academic year 2022-2023

Signature of the Guide Signature of the HOD


Mrs. Saritha M Mrs. Chakradhari P
(Dept of BCA) (Dept of BCA)
RJSFGC RJSFGC
DECLARATION

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.

I wish to place my heartfelt gratitude to Mrs. Saritha M, an Internal guide.


Department of Computer Science and Applications, RJS First Grade College
for providing the necessary guidance, support, and valuable suggestion
during the course of the project.

I would like to assert my acknowledgment to Mrs.Chakradhari P, HOD of


Computer Science and Applications Department, RJS First Grade College
for providing an opportunity to complete the project under the company
with all the support.

I would like to express sincere thanks Dr. P Nagabhushana Reddy, Principal


of RJS First Grade College for supporting and making me be a part 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

Sl. No TITLE Page No.

1 ABSTRACT 1-2

INTRODUCATION 3-6
2

FRONTEND TECHNOLOGIES
3 7-12

4 BACKEND TECHNOLOGIES 13-16

5 VISUAL STUDIO CODE


17-18

6 CODING
19-49

7 SNAPSHOTS 50-59

8 BIBLIOGRAPHY 60-60

9 CONCLUSION 61-61
DAIRY MANAGEMENT

1. ABSTRACT

Dept. of BCA , RJSFGC 2023-2024 Page 1


DAIRY MANAGEMENT

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.

Dept. of BCA , RJSFGC 2023-2024 Page 2


DAIRY MANAGEMENT

2. INTRODUCTION

Dept. of BCA , RJSFGC 2023-2024 Page 3


DAIRY MANAGEMENT

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.

Dept. of BCA , RJSFGC 2023-2024 Page 4


DAIRY MANAGEMENT

Fig 2.1- Skill set of a full stack web developer

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.

Dept. of BCA , RJSFGC 2023-2024 Page 5


DAIRY MANAGEMENT

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.

Dept. of BCA , RJSFGC 2023-2024 Page 6


DAIRY MANAGEMENT

3. FRONTEND TECHNOLOGIES

Dept. of BCA , RJSFGC 2023-2024 Page 7


DAIRY MANAGEMENT

3. FRONTEND TECHNOLOGIES

3.1 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.

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.
.

Fig 3.1 – HTML symbol

Dept. of BCA , RJSFGC 2023-2024 Page 8


DAIRY MANAGEMENT

3.2 CSS (Cascading Style Sheets)

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.

Dept. of BCA , RJSFGC 2023-2024 Page 9


DAIRY MANAGEMENT

Fig 3.2 – CSS symb

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.

Dept. of BCA , RJSFGC 2023-2024 Page 10


DAIRY MANAGEMENT

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.

Fig 3.3– JavaScript image

Dept. of BCA , RJSFGC 2023-2024 Page 11


DAIRY MANAGEMENT

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.

Fig 3.4 – React Symbol

Dept. of BCA , RJSFGC 2023-2024 Page 12


DAIRY MANAGEMENT

4. BACKEND TECHNOLOGIES

Dept. of BCA , RJSFGC 2023-2024 Page 13


DAIRY MANAGEMENT

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.

Dept. of BCA , RJSFGC 2023-2024 Page 14


DAIRY MANAGEMENT

Fig 4.1 – Nodejs Symbol

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.

Dept. of BCA , RJSFGC 2023-2024 Page 15


DAIRY MANAGEMENT

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.

Fig 4.2 – mongoDB Symbol

Dept. of BCA , RJSFGC 2023-2024 Page 16


DAIRY MANAGEMENT

5.VISUAL STUDIO CODE

Dept. of BCA , RJSFGC 2023-2024 Page 17


DAIRY MANAGEMENT

5. VISUAL STUDIO CODE (IDE):

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.

Fig 5.1 Visual Studio Code

Dept. of BCA , RJSFGC 2023-2024 Page 18


DAIRY MANAGEMENT

5. CODING

Dept. of BCA , RJSFGC 2023-2024 Page 19


DAIRY MANAGEMENT

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;
}

@media (min-width: 768px)


{#page-wrapper {position: inherit;
margin: 0 0 0 250px; padding: 0 30px;
border-left: 1px solid #e7e7e7;
}
}
. navbar-top-links
{margin-right: 0;
}
. navbar-top-links li
{display: inline-block;
}
. navbar-top-links li: last-child
{margin-right: 15px;
}

Dept. of BCA , RJSFGC 2023-2024 Page 20


DAIRY MANAGEMENT

. 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;
}

Dept. of BCA , RJSFGC 2023-2024 Page 21


DAIRY MANAGEMENT

. navbar-top-links. dropdown-user {right: 0;


left: auto;
}
. sidebar. sidebar-nonjava-collapse {padding-
left: 0; padding-right: 0;
}
. sidebar. sidebar-search
{padding: 15px;
}
. sidebar up li {border-bottom: 1px solid
#e7e7e7;
}
. sidebar up li a. active
background-colour:
#eeeeee;
}
. sidebar. arrow
{float: right;
}
. sidebar. fa. arrow: before
{content: "\f104";
}
. sidebar. active > a >. fa. arrow: before {content:
"\f107";
}
. sidebar .nav-second-level li,
. sidebar .nav-third-level li {border-
bottom: none! important;
}

Dept. of BCA , RJSFGC 2023-2024 Page 22


DAIRY MANAGEMENT

. 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;
}

Dept. of BCA , RJSFGC 2023-2024 Page 23


DAIRY MANAGEMENT

. 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%;
}

Dept. of BCA , RJSFGC 2023-2024 Page 24


DAIRY MANAGEMENT

. 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>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?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">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Product</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>

Dept. of BCA,RJSFGC 2023-2024 Page 26


DAIRY MANAGEMENT
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add Product</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<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>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
Dept. of BCA,RJSFGC 2023-2024 Page 27
DAIRY MANAGEMENT
</div>
</div>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</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')");

Dept. of BCA,RJSFGC 2023-2024 Page 28


DAIRY MANAGEMENT
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">

<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>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?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">
<!-- Breadcrumb -->

Dept. of BCA,RJSFGC 2023-2024 Page 29


DAIRY MANAGEMENT
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Company</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add Company</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<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>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>
Dept. of BCA,RJSFGC 2023-2024 Page 30
DAIRY MANAGEMENT

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</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'];

Dept. of BCA, RJSFGC 2023-2024 Page 31


DAIRY MANAGEMENT
$query=mysqli_query($con,"insert into
tblproducts(CategoryName,CompanyName,ProductName,ProductPrice)
values('$catname','$company','$pname','$pprice')");
if($query){
echo "<script>alert('Product added successfully.');</script>";
echo "<script>window.location.href='add-product.php'</script>";
} else{
echo "<script>alert('Something went wrong. Please try again.');</script>";
echo "<script>window.location.href='add-product.php'</script>";
}
}

?>
<!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>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?php include_once('includes/navbar.php');
include_once('includes/sidebar.php');
?>

<div id="hk_nav_backdrop" class="hk-nav-backdrop"></div>


<!-- /Vertical Nav -->

Dept. of BCA, RJSFGC 2023-2024 Page 32


DAIRY MANAGEMENT
<!-- Main Content -->
<div class="hk-pg-wrapper">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Product</a></li>
<li class="breadcrumb-item active" aria-current="page">Add</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>Add Product</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<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>

<button class="btn btn-primary" type="submit" name="submit">Submit</button>


</form>
</div>
</div>
</section>

</div>
</div>
</div>

Dept. of BCA, RJSFGC 2023-2024 Page 34


DAIRY MANAGEMENT
<!-- Footer -->
<?php include_once('includes/footer.php');?>
<!-- /Footer -->

</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">

Dept. of BCA, RJSFGC 2023-2024 Page 35


DAIRY MANAGEMENT
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>Manage Invoices</title>
<!-- Data Table CSS -->
<link href="vendors/datatables.net-dt/css/jquery.dataTables.min.css" rel="stylesheet"
type="text/css" />
<link href="vendors/datatables.net-responsive-dt/css/responsive.dataTables.min.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">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>
<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">
<!-- Top Navbar -->
<?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">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Reports</a></li>
<li class="breadcrumb-item active" aria-current="page">B/w Dates Report Details</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">

<!-- Title -->


<div class="hk-pg-header">
<h4 class="hk-pg-title"><span class="pg-title-icon">
<?php
Dept. of BCA, RJSFGC 2023-2024 Page 36
DAIRY MANAGEMENT
$fdate=$_POST['fromdate'];
$tdate=$_POST['todate'];
?>

<span class="feather-icon"><i data-feather="database"></i></span></span>B/w Dates report


from <?php echo $fdate?> to <?php echo $tdate?></h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">
<div class="row">
<div class="col-sm">
<div class="table-wrap">
<table id="datable_1" class="table table-hover w-100
display pb-30">
<thead>
<tr>
<th>#</th>
<th>Invocie Number</th>
<th>Customer Name</th>
<th>Customer Contact no.</th>
<th>Payment Mode</th>
<th>Invoice Gen. Date</th>
<th>Action</th>

</tr>
</thead>
<tbody>
<?php
$rno=mt_rand(10000,99999);
$query=mysqli_query($con,"select distinct

InvoiceNumber,CustomerName,CustomerContactNo,PaymentMode,InvoiceGenDate from tblorders


where date(InvoiceGenDate) between '$fdate' and '$tdate'");
$cnt=1;
while($row=mysqli_fetch_array($query))
{
?>
<tr>
<td><?php echo $cnt;?></td>
<td><?php echo $row['InvoiceNumber'];?></td>
<td><?php echo $row['CustomerName'];?></td>
Dept. of BCA, RJSFGC 2023-2024 Page 37
DAIRY MANAGEMENT

<td><?php echo $row['PaymentMode'];?></td>


<td><?php echo $row['InvoiceGenDate'];?></td>
<td>
<a href="view-invoice.php?invid=<?php echo base64_encode($row['InvoiceNumber'].$rno);?>"
class="mr-25" data-toggle="tooltip" data-original-title="View Details" target="_blank"> <i
class="glyphicon glyphicon-envelope"></i></a>
</td>
</tr>
<?php
$cnt++;
} ?>
</tbody>
</table>
</div>
</div>
</div>
</section>
</div>
</div>
<!-- /Row -->
</div>
<!-- /Container -->
<!-- Footer -->
<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->
<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 38


DAIRY MANAGEMENT
<td><?php echo $row['PaymentMode'];?></td>
<td><?php echo $row['InvoiceGenDate'];?></td>
<td>
<a href="view-invoice.php?invid=<?php echo base64_encode($row['InvoiceNumber'].$rno);?>"
class="mr-25" data-toggle="tooltip" data-original-title="View Details" target="_blank"> <i
class="glyphicon glyphicon-envelope"></i></a>
</td>
</tr>
<?php
$cnt++;
} ?>

</tbody>
</table>
</div>
</div>
</div>
</section>

</div>
</div>
<!-- /Row -->

</div>
<!-- /Container -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->
</div>
<!-- /HK Wrapper -->

<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">

Dept. of BCA, RJSFGC 2023-2024 Page 40


DAIRY MANAGEMENT
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0,
user-scalable=no" />
<title>B/w Dates Report</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>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<!-- Top Navbar -->


<?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">
<!-- Breadcrumb -->
<nav class="hk-breadcrumb" aria-label="breadcrumb">
<ol class="breadcrumb breadcrumb-light bg-transparent">
<li class="breadcrumb-item"><a href="#">Reports</a></li>
<li class="breadcrumb-item active" aria-current="page">B/w Dates</li>
</ol>
</nav>
<!-- /Breadcrumb -->

<!-- Container -->


<div class="container">
<!-- Title -->
<div class="hk-pg-header">

Dept. of BCA, RJSFGC 2023-2024 Page 41


DAIRY MANAGEMENT
<h4 class="hk-pg-title"><span class="pg-title-icon"><span
class="feather-icon"><i data-feather="external-link"></i></span></span>B/w Date Report Date
Selection</h4>
</div>
<!-- /Title -->

<!-- Row -->


<div class="row">
<div class="col-xl-12">
<section class="hk-sec-wrapper">

<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>

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->

Dept. of BCA, RJSFGC 2023-2024 Page 42


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 } ?>

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">

Dept. of BCA, RJSFGC 2023-2024 Page 43


DAIRY MANAGEMENT
<link href="vendors/jquery-toast-plugin/dist/jquery.toast.min.css" rel="stylesheet"
type="text/css">
<link href="dist/css/style.css" rel="stylesheet" type="text/css">
</head>

<body>

<!-- HK Wrapper -->


<div class="hk-wrapper hk-vertical-nav">

<?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);
?>

<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">Categories</span>
</div>
<div>
</div>
</div>
<div class="text-center">
<span class="d-block display-4 text-dark mb-5"><?php echo $listedcat;?></span>
<small class="d-block">Listed Categories</small>
</div>
</div>
Dept. of BCA, RJSFGC 2023-2024 Page 44
DAIRY MANAGEMENT
</div>
</div>

<?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 -->

<!-- Footer -->


<?php include_once('includes/footer.php');?>
<!-- /Footer -->
</div>
<!-- /Main Content -->

</div>
<!-- /HK Wrapper -->

<!-- jQuery -->


<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="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="vendors/waypoints/lib/jquery.waypoints.min.js"></script>
<script src="vendors/jquery.counterup/jquery.counterup.min.js"></script>
<script src="vendors/jquery.sparkline/dist/jquery.sparkline.min.js"></script>
<script src="vendors/vectormap/jquery-jvectormap-2.0.3.min.js"></script>
<script src="vendors/vectormap/jquery-jvectormap-world-mill-en.js"></script>
<script src="dist/js/vectormap-data.js"></script>
<script src="vendors/owl.carousel/dist/owl.carousel.min.js"></script>
<script src="vendors/jquery-toast-plugin/dist/jquery.toast.min.js"></script>
Dept. of BCA, RJSFGC 2023-2024 Page 48
DAIRY MANAGEMENT
<script src="vendors/apexcharts/dist/apexcharts.min.js"></script>
<script src="dist/js/irregular-data-series.js"></script>
<script src="dist/js/init.js"></script>

</body>

</html>
<?php } ?>

Logout.php

<?php
session_start();
session_destroy(); // destroy session
header("location:index.php");
?>

Dept. of BCA, RJSFGC 2023-2024 Page 49


DAIRY MANAGEMENT

7. SNAPSHOTS

Dept. of BCA, RJSFGC 2023-2024 Page 50


DAIRY MANAGEMENT

7. SNAPSHOTS

Dept. of BCA, RJSFGC 2023-2024 Page 51


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 52


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 53


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 54


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 55


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 56


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 57


DAIRY MANAGEMENT

Dept. of BCA, RJSFGC 2023-2024 Page 58


DAIRY MANAGEMENT

8. BIBLIOGRAPHY

Dept. of BCA, RJSFGC 2023-2024 Page 59


DAIRY MANAGEMENT

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/.

Dept. of BCA, RJSFGC 2023-2024 Page 60

You might also like