Agro Culture System
Agro Culture System
Agro Culture is the farmer system where they can plan, monitor and analyze the activity of the
farmers production system. It manages farmer operation with one system and organizes data in
one place. It helps smart farmers become even smarter. This creates in partnership with growers
and buyers. It inspire farmer to produce and buyers to consume fresh goods.
Agro Culture System will make better connection among Farmers and Buyers ensure quality food.
Standardize and increase efficiency of agro culture process.
• Increasing number of buyers as individuals will find it easier and more convenient to buy
goods.
• Easy management.
Methodology/Procedure
➢ For the development of project the designing of database was done on PHPMYADMIN,
back end was coded in basic PHP and for frontend we used the same basic PHP codes.
➢ Software methodologies are concerned with the process of creating software – not so much
the technical side but the organizational aspects. Several software development approaches
have been used since the origin of information technology.
Page | 2
2 System Configuration
• Windows 10
• HTML
• CSS
• MySQL
• php
• Sublime text
• Bootstrap
Windows 10
Windows 10 is a major release of Microsoft's Windows NT operating system. It is the direct
successor to Windows 8.1, which was released nearly two years earlier. It was released to
manufacturing on July 15, 2015, and later to retail on July 29, 2015. Windows 10 was made
available for download via MSDN and TechNet, as a free upgrade for retail copies of Windows 8
and Windows 8.1 users via the Windows Store, and to Windows 7 users via Windows Update.
Windows 10 receives new builds on an ongoing basis, which are available at no additional cost to
users, in addition to additional test builds of Windows 10, which are available to Windows
Insiders. Devices in enterprise environments can receive these updates at a slower pace, or use
long-term support milestones that only receive critical updates, such as security patches, over their
ten-year lifespan of extended support.
HTML
The HyperText Markup Language or HTML is the standard markup language for documents
designed to be displayed in a web browser. It can be assisted by technologies such as Cascading
Style Sheets (CSS) and scripting languages such as JavaScript.
Web browsers receive HTML documents from a web server or from local storage and render the
documents into multimedia web pages. HTML describes the structure of a web page semantically
and originally included cues for the appearance of the document.
HTML elements are the building blocks of HTML pages. With HTML constructs, images and
other objects such as interactive forms may be embedded into the rendered page. HTML provides
a means to create structured documents by denoting structural semantics for text such as headings,
paragraphs, lists, links, quotes and other items. HTML elements are delineated by tags, written
using angle brackets. Tags such as <img /> and <input /> directly introduce content into the page.
Other tags such as <p> surround and provide information about document text and may include
other tags as sub-elements. Browsers do not display the HTML tags but use them to interpret the
content of the page.
Page | 3
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a
document written in a markup language such as HTML. CSS is a cornerstone technology of the
World Wide Web, alongside HTML and JavaScript.
CSS is designed to enable the separation of presentation and content, including layout, colors, and
fonts.[3] This separation can improve content accessibility; provide more flexibility and control in
the specification of presentation characteristics; enable multiple web pages to share formatting by
specifying the relevant CSS in a separate .css file, which reduces complexity and repetition in the
structural content; and enable the .css file to be cached to improve the page load speed between
the pages that share the file and its formatting.
Separation of formatting and content also makes it feasible to present the same markup page in
different styles for different rendering methods, such as on-screen, in print, by voice (via speech-
based browser or screen reader), and on Braille-based tactile devices. CSS also has rules for
alternate formatting if the content is accessed on a mobile device.
The name cascading comes from the specified priority scheme to determine which style rule
applies if more than one rule matches a particular element. This cascading priority scheme is
predictable.
Sublime text
Sublime Text is a commercial source code editor. It natively supports many programming
languages and markup languages. Users can expand its functionality with plugins, typically
community-built and maintained under free-software licenses. To facilitate plugins, Sublime Text
features a Python API.
Page | 4
Bootstrap
Bootstrap is a free and open-source CSS framework directed at responsive, mobile-first frontend
web development. It contains HTML, CSS and (optionally) JavaScript-based design templates for
typography, forms, buttons, navigation, and other interface components.
• Increasing global font size from 14px to 16px for enhanced readability
MySql
MySQL is an open-source relational database management system (RDBMS). Its name is a
combination of "My", the name of co-founder Michael Widenius's daughter,[7] and "SQL", the
abbreviation for Structured Query Language. A relational database organizes data into one or more
data tables in which data types may be related to each other; these relations help structure the data.
SQL is a language programmers use to create, modify and extract data from the relational database,
as well as control user access to the database. In addition to relational databases and SQL, an
RDBMS like MySQL works with an operating system to implement a relational database in a
computer's storage system, manages users, allows for network access and facilitates testing
database integrity and creation of backups.
MySQL is free and open-source software under the terms of the GNU General Public License, and
is also available under a variety of proprietary licenses. MySQL was owned and sponsored by the
Swedish company MySQL AB, which was bought by Sun Microsystems (now Oracle
Corporation).[8] In 2010, when Oracle acquired Sun, Widenius forked the open-source MySQL
project to create MariaDB
Page | 5
3 System Analysis
System Analysis is a detailed study of the various operations performed by a system and their
relationships within and outside of the system. Here the key question is- why all problems exist in
the present system? What must be done to solve the problem? Analysis begins when a user or
manager begins a study of the program using existing system. During analysis, data collected on
the various files, decision points and transactions handled by the present system. The commonly
used tools in the system are Data Flow Diagram etc. Training, experience and common sense are
required for collection of relevant information needed to develop the system. The success of the
system depends largely on how clearly the problem is defined, thoroughly investigated and
properly carried out through the choice of solution. A good analysis model should provide not only
the mechanisms of problem understanding but also the frame work of the solution. Thus it should
be studied thoroughly by collecting data about the system. Then the proposed system should be
analyzed thoroughly in accordance with the needs. System analysis can be categorized into four
parts.
• System planning and initial investigation
• Information Gathering
• Applying analysis tools for structured analysis
• Feasibility study
• Cost/ Benefit analysis.
In our existing system the recording of user’s information is done manually, So taking more time
for searching the information of the users. Another major disadvantage is that preparing the list of
members that viewed any user’s information takes more time. So, after conducting the feasibility
study I decided to make the agro culture System to be computerized.
It is related with the accessing the detailed information of a user and a candidate. So, I have
initiated this project with simple requirements regarding the user and candidate information. Some
of the problems for designing and developing this project are discussed below:
Feasibility Analysis
A feasibility analysis is conducted once the problem is clearly understood. The purpose of the
study is to determine whether the problem is worth solving. It is an analysis and evaluation of a
Page | 6
proposed project to determine if it is technically feasible, feasible with the estimated cost and
profitable.
Economical Analysis
The economic feasibility of a system is used to evaluate the benefits achieved from and the costs
incurred for the project or system. This is done by a process called cost benefit analysis. It provides
tangible and intangible benefits like reduction in cost, more flexibility, faster activities, proper
database management, etc.
The application is medium scale application and is economically feasible for us to accomplish it.
This involves cost benefits analysis. Thus there is no problem of high cost and cost benefits
analysis.
Software Analysis
● Consumes a long-time for development of web application.
● Research and analysis cost to determine the actual need in real world.
● Implementation of application in the server and cost associated with the space in server.
Data Conversion
Another cost associated while implementing this web application is the data conversion. The
previously used software database must be stored and backup such that there will be no loss in
implementing a new web application which consumes time as well as money.
Operational Feasibility
The system is operational feasible as the system can be operate by normal users with basic
computer skills without any additional trainings. We have developed this system with the
willingness and ability to create, manage and operate the system which is easy for the end users to
operate it.
Page | 7
4 System Specification
Hardware Specification
CPU
Intel Core i5 is a name that Intel uses for the computer processors it makes for desktop and laptop
computers.
The first Core i5 is a version of the earlier Core i7, the Lynnfield core. Lynnfield Core i5 processors
have an 8 MB L3 cache. They have a DMI (Direct Media Interface) bus running at 2.5 GT/s. Core
i5 also has support for dual-channel DDR SDRAM memory and have Hyper-threading disabled.
A new feature called Turbo Boost Technology was introduced which maximizes speed for
demanding computer programs. This increases performance to match the amount of work the
computer must do.
The Core i5-5xx mobile processors are named Arrandale. They are based on the 32nm Westmere
shrink of the Nehalem microarchitecture. Arrandale processors have integrated graphics capability
but only two processor cores. They were released in January 2010.[3] Clarkdale, is the desktop
version of Arrandale. These are the first processors to have integrated video.[4] It has Hyper-
Threading enabled and the full 4 MB L3 cache.
RAM
Random-access memory (or simply RAM) is the memory or information storage in a computer
that is used to store running programs and data for the programs. Data (information) in the RAM
can be read and written quickly in any order. Normally, the random access memory is in the form
of computer chips. Usually, the contents of RAM are accessible faster than other types of
information storage.However, RAM is volatile, which means that every time the computer is
turned off, all the data in the RAM is lost. The alternative to this, Non-volatile random-access
memory (NVRAM), keeps its data without using power, is more expensive but works slower, so
it is used in smaller amounts.
Since the late 20th century, RAM uses transistors, usually MOSFETs, to store data. Before that,
magnetic memory was the usual kind.
Memory
Compared with electromechanical drives, SSDs are typically more resistant to physical shock, run
silently, and have higher IOPS and lower latency.[3] SSDs store data in semiconductor cells. As of
2019, cells can contain between 1 and 4 bits of data. SSD storage devices vary in their properties
according to the number of bits stored in each cell, with single-bit cells ("Single Level Cells" or
"SLC") being generally the most reliable, durable, fast, and expensive type, compared with 2- and
3-bit cells ("Multi-Level Cells/MLC" and "Triple-Level Cells/TLC"), and finally quadbit cells
("QLC") being used for consumer devices that do not require such extreme properties and are the
cheapest per gigabyte of the four. In addition, 3D XPoint memory (sold by Intel under the Optane
brand), stores data by changing the electrical resistance of cells instead of storing electrical charges
Page | 8
in cells, and SSDs made from RAM can be used for high speed, when data persistence after power
loss is not required, or may use battery power to retain data when its usual power source is
unavailable.[4] Hybrid drives or solid-state hybrid drives (SSHDs), such as Apple's Fusion Drive,
combine features of SSDs and HDDs in the same unit using both flash memory and a HDD in
order to improve the performance of frequentlyaccessed data.[5][6][7] Bcache allows to achieve a
similar effect purely in software, using combinations of dedicated regular SSDs and HDDs.
Software Specifation
❖ Xampp:
o Apache:
▪ (Application Server) Apache , often referred to as Server, is an open-source
Java Servlet Container developed by the Apache Software Foundation.
o MySqlServer:
▪ It handles larege databases much faster than existing solutions.
▪ It consists of multi-threaded SQL server that supports different back ends,
several different client programs and libraries, administrative tools, and
application programming interfaces (APIs)
▪ Its connectivity, speed, and security make MySQL Server highly suited for
accessing databases on the Internet.
❖ Sublime Text 3.1.1- Sublime Text is a sophisticated text editor for code, markup and prose.
You'll love the slick user interface, extraordinary features and amazing performance.
❖ Git Hub: GitHub Inc. is a web-based hosting service for version control using Git. It is
mostly used for computer code. It offers all of the distributed version control and source
code management functionality of Git as well as adding its own features.
Page | 9
5 System Design
Page | 10
Above figure represents Use Case Diagram of the project and is a useful technique for identifying,
clarifying, and organizing system requirements. It describes how a user uses a system to
accomplish a particular goal. Use cases help ensure that the correct system is developed by
capturing the requirements from the user's point of view.
Sequence Diagram
A sequence diagram is a type of interaction diagram because it describes how—and in what
order—a group of objects works together. A sequence diagram specifically focuses on lifelines, or
the processes and objects that live simultaneously, and the messages exchanged between them to
perform a function before the lifeline ends.
Sequence Diagram
Above diagram represents Sequence Diagram of the project which is a type of interaction diagram
because it describes how—and in what order—a group of objects works together. A sequence
diagram specifically focuses on lifelines, or the processes and objects that live simultaneously, and
the messages exchanged between them to perform a function before the lifeline ends.
Page | 11
Activity Diagram
Activity Diagram
Above diagram describes the flow of control of a system. The flow can be sequential, concurrent
or branched showing the overall functions of the system.
Page | 12
ER Diagram
ER Diagram
ER diagram show all the relationships between entity sets stored in the database. It illustrates the
logical structure of the database. It helps to visualize how data is connected in general ways.
Page | 13
Gantt Chart
Gantt Chart
A Gantt chart illustrates how the project will run. It communicates with the client and shows them
the expected date of project completion. It helps you assess how long a project should take,
determine the resources needed, and plan the order in which you'll complete task.
Page | 14
Project Framework
A framework is a standardized set of concepts, practices, and criteria for dealing with a common
type of problem, which can be used as a reference to help us approach and resolve new problems
of a similar nature.
The aim of framework is to provide a common structure so that developers don’t have to redo it
from scratch and can reuse the code provided. In this way, frameworks allows us to cut out much
of the work and save a lot of time
Page | 15
6 Screen Shots
<?php
session_start();
$user = dataFilter($_POST['uname']);
$pass = $_POST['pass'];
$category = dataFilter($_POST['category']);
require '../db.php';
if($category == 1)
{
$sql = "SELECT * FROM farmer WHERE fusername='$user'";
$result = mysqli_query($conn, $sql);
$num_rows = mysqli_num_rows($result);
Page | 16
if($num_rows == 0)
{
$_SESSION['message'] = "Invalid User Credentialss!";
header("location: error.php");
}
else
{
$User = $result->fetch_assoc();
if (password_verify($_POST['pass'], $User['fpassword']))
{
$_SESSION['id'] = $User['fid'];
$_SESSION['Hash'] = $User['fhash'];
$_SESSION['Password'] = $User['fpassword'];
$_SESSION['Email'] = $User['femail'];
$_SESSION['Name'] = $User['fname'];
$_SESSION['Username'] = $User['fusername'];
$_SESSION['Mobile'] = $User['fmobile'];
$_SESSION['Addr'] = $User['faddress'];
$_SESSION['Active'] = $User['factive'];
$_SESSION['picStatus'] = $User['picStatus'];
$_SESSION['picExt'] = $User['picExt'];
$_SESSION['logged_in'] = true;
$_SESSION['Category'] = 1;
$_SESSION['Rating'] = 0;
if($_SESSION['picStatus'] == 0)
{
$_SESSION['picId'] = 0;
$_SESSION['picName'] = "profile0.png";
}
else
{
$_SESSION['picId'] = $_SESSION['id'];
$_SESSION['picName'] = "profile".$_SESSION['picId'].".".$_SESSION['picExt'];
}
//echo $_SESSION['Email']." ".$_SESSION['Name'];
Page | 17
header("location: profile.php");
}
else
{
//echo mysqli_error($conn);
$_SESSION['message'] = "Invalid User Credentials!";
header("location: error.php");
}
}
}
else
{
$sql = "SELECT * FROM buyer WHERE busername='$user'";
$result = mysqli_query($conn, $sql);
$num_rows = mysqli_num_rows($result);
if($num_rows == 0)
{
$_SESSION['message'] = "Invalid User Credentialss!";
header("location: error.php");
}
else
{
$User = $result->fetch_assoc();
if (password_verify($_POST['pass'], $User['bpassword']))
{
$_SESSION['id'] = $User['bid'];
$_SESSION['Hash'] = $User['bhash'];
$_SESSION['Password'] = $User['bpassword'];
$_SESSION['Email'] = $User['bemail'];
$_SESSION['Name'] = $User['bname'];
$_SESSION['Username'] = $User['busername'];
$_SESSION['Mobile'] = $User['bmobile'];
$_SESSION['Addr'] = $User['baddress'];
$_SESSION['Active'] = $User['bactive'];
$_SESSION['logged_in'] = true;
$_SESSION['Category'] = 0;
Page | 18
//echo $_SESSION['Email']." ".$_SESSION['Name'];
header("location: profile.php");
}
else
{
//echo mysqli_error($conn);
$_SESSION['message'] = "Invalid User Credentials!";
header("location: error.php");
}
}
}
function dataFilter($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
Page | 19
New Register
<?php
session_start();
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$name = dataFilter($_POST['name']);
$mobile = dataFilter($_POST['mobile']);
$user = dataFilter($_POST['uname']);
$email = dataFilter($_POST['email']);
$pass = dataFilter(password_hash($_POST['pass'], PASSWORD_BCRYPT));
$hash = dataFilter( md5( rand(0,1000) ) );
$category = dataFilter($_POST['category']);
$addr = dataFilter($_POST['addr']);
$_SESSION['Email'] = $email;
$_SESSION['Name'] = $name;
$_SESSION['Password'] = $pass;
$_SESSION['Username'] = $user;
$_SESSION['Mobile'] = $mobile;
$_SESSION['Category'] = $category;
$_SESSION['Hash'] = $hash;
$_SESSION['Addr'] = $addr;
Page | 20
$_SESSION['Rating'] = 0;
}
require '../db.php';
$length = strlen($mobile);
if($length != 10)
{
$_SESSION['message'] = "Invalid Mobile Number !!!";
header("location: error.php");
die();
}
if($category == 1)
{
$sql = "SELECT * FROM farmer WHERE femail='$email'";
if ($result->num_rows > 0 )
{
$_SESSION['message'] = "User with this email already exists!";
//echo $_SESSION['message'];
header("location: error.php");
}
else
{
$sql = "INSERT INTO farmer (fname, fusername, fpassword, fhash, fmobile, femail,
faddress)
VALUES ('$name','$user','$pass','$hash','$mobile','$email','$addr')";
if (mysqli_query($conn, $sql))
{
$_SESSION['Active'] = 0;
$_SESSION['logged_in'] = true;
$_SESSION['picStatus'] = 0;
Page | 21
$_SESSION['picExt'] =
if($_SESSION['picStatus'] == 0)
{
$_SESSION['picId'] = 0;
$_SESSION['picName'] = "profile0.png";
}
else
{
$_SESSION['picId'] = $_SESSION['id'];
$_SESSION['picName'] = "profile".$_SESSION['picId'].".".$_SESSION['picExt'];
}
$_SESSION['message'] =
$to = $email;
$subject = "Account Verification ( ArtCircle.com )";
$message_body = "
Hello '.$user.',
http://localhost/AgroCulture/Login/verify.php?email=".$email."&hash=".$hash;
header("location: profile.php");
}
else
{
Page | 22
//echo "Error: " . $sql . "<br>" . mysqli_error($conn);
$_SESSION['message'] = "Registration failed!";
header("location: error.php");
}
}
}
else
{
$sql = "SELECT * FROM buyer WHERE bemail='$email'";
if ($result->num_rows > 0 )
{
$_SESSION['message'] = "User with this email already exists!";
//echo $_SESSION['message'];
header("location: error.php");
}
else
{
$sql = "INSERT INTO buyer (bname, busername, bpassword, bhash, bmobile, bemail,
baddress)
VALUES ('$name','$user','$pass','$hash','$mobile','$email','$addr')";
if (mysqli_query($conn, $sql))
{
$_SESSION['Active'] = 0;
$_SESSION['logged_in'] = true;
$_SESSION['message'] =
Page | 23
$to = $email;
$subject = "Account Verification ( ArtCircle.com )";
$message_body = "
Hello '.$user.',
http://localhost/AgroCulture/Login/verify.php?email=".$email."&hash=".$hash;
header("location: profile.php");
}
else
{
//echo "Error: " . $sql . "<br>" . mysqli_error($conn);
$_SESSION['message'] = "Registration not successfull!";
header("location: error.php");
}
}
}
function dataFilter($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
Page | 24
Home Page
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Farm Maneagement System</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="bootstrap\css\bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="bootstrap\js\bootstrap.min.js"></script>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="login.css"/>
<script src="js/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-layers.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
Page | 25
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<link rel="stylesheet" href="indexfooter.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<?php
require 'menu.php';
?>
</section>
Page | 26
<div class="row 200%">
<section class="4u 12u$(small)">
<i class="icon big rounded fa-clock-o"></i>
<p>Digital Market</p>
</section>
<section class="4u 12u$(small)">
<i class="icon big rounded fa-comments"></i>
<p>Agro-Blog</p>
</section>
<section class="4u$ 12u$(small)">
<i class="icon big rounded fa-user"></i>
<p>Register with us</p>
</section>
</div>
</div>
</section>
<div class="footer-center">
<div>
<i class="fa fa-map-marker"></i>
<p style="font-size:20px">Agro Culture Farm<span>Wardha</span></p>
</div>
<div>
<i class="fa fa-phone"></i>
Page | 27
<p style="font-size:20px">7020677259</p>
</div>
<div>
<i class="fa fa-envelope"></i>
<p style="font-size:20px"><a href="mailto:[email protected]"
style="color:white">[email protected]</a></p>
</div>
</div>
<div class="footer-right">
<p class="footer-company-about" style="color:white">
<span style="font-size:20px"><b>About AgroCulture</b></span>
AgroCulture is e-commerce trading platform for grains & grocerries...
</p>
<div class="footer-icons">
<a href="#"><i style="margin-left: 0;margin-top:5px;"class="fa fa-facebook"></i></a>
<a href="#"><i style="margin-left: 0;margin-top:5px" class="fa fa-instagram"></i></a>
<a href="#"><i style="margin-left: 0;margin-top:5px" class="fa fa-youtube"></i></a>
</div>
</div>
</footer>
<div class="container">
<h3>Login</h3>
<form method="post" action="Login/login.php">
<div class="row uniform 50%">
<div class="7u$">
<input type="text" name="uname" id="uname" value="" placeholder="UserName"
style="width:80%" required/>
</div>
Page | 28
<div class="7u$">
<input type="password" name="pass" id="pass" value="" placeholder="Password"
style="width:80%" required/>
</div>
</div>
<div class="row uniform">
<p>
<b>Category : </b>
</p>
<div class="3u 12u$(small)">
<input type="radio" id="farmer" name="category" value="1" checked>
<label for="farmer">Farmer</label>
</div>
<div class="3u 12u$(small)">
<input type="radio" id="buyer" name="category" value="0">
<label for="buyer">Buyer</label>
</div>
</div>
<center>
<div class="row uniform">
<div class="7u 12u$(small)">
<input type="submit" value="Login" />
</div>
</div>
</center>
</div>
</form>
</section>
</div>
</div>
</div>
</form>
</div>
Page | 29
<span onclick="document.getElementById('id02').style.display='none'" class="close"
title="Close Modal">×</span>
</div>
<div class="container">
<section>
<h3>SignUp</h3>
<form method="post" action="Login/signUp.php">
<center>
<div class="row uniform">
<div class="3u 12u$(xsmall)">
<input type="text" name="name" id="name" value="" placeholder="Name" required/>
</div>
<div class="3u 12u$(xsmall)">
<input type="text" name="uname" id="uname" value="" placeholder="UserName"
required/>
</div>
</div>
<div class="row uniform">
<div class="3u 12u$(xsmall)">
<input type="text" name="mobile" id="mobile" value="" placeholder="Mobile Number"
required/>
</div>
Page | 30
<div class="6u 12u$(xsmall)">
<input type="text" name="addr" id="addr" value="" placeholder="Address"
style="width:80%" required/>
</div>
</div>
<div class="row uniform">
<p>
<b>Category : </b>
</p>
<div class="3u 12u$(small)">
<input type="radio" id="farmer" name="category" value="1" checked>
<label for="farmer">Farmer</label>
</div>
<div class="3u 12u$(small)">
<input type="radio" id="buyer" name="category" value="0">
<label for="buyer">Buyer</label>
</div>
</div>
<div class="row uniform">
<div class="3u 12u$(small)">
<input type="submit" value="Submit" name="submit" class="special" /></li>
</div>
<div class="3u 12u$(small)">
<input type="reset" value="Reset" name="reset"/></li>
</div>
</div>
</center>
</form>
</section>
</div>
</div>
</form>
</div>
<script>
// Get the modal
var modal = document.getElementById('id01');
Page | 31
// When the user clicks anywhere outside of the modal, close it
window.onclick = function(event) {
if (event.target == modal) {
modal.style.display = "none";
}
}
</script>
</body>
</html>
Page | 32
Product Menu
<?php
session_start();
require 'db.php';
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>AgroCulture</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="bootstrap\css\bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="bootstrap\js\bootstrap.min.js"></script>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="login.css"/>
<script src="js/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-layers.min.js"></script>
<script src="js/init.js"></script>
<noscript>
Page | 33
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<body class>
<?php
require 'menu.php';
function dataFilter($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<?php
if(isset($_GET['n']) AND $_GET['n'] == 1):
?>
<h3>Select Filter</h3>
<form method="GET" action="productMenu.php?">
<input type="text" value="1" name="n" style="display: none;"/>
<center>
<div class="row">
<div class="col-sm-4"></div>
<div class="col-sm-2">
<div class="select-wrapper" style="width: auto" >
<select name="type" id="type" required style="background-color:white;color: black;">
<option value="all" style="color: black;">List All</option>
<option value="fruit" style="color: black;">Fruit</option>
<option value="vegetable" style="color: black;">Vegetable</option>
<option value="grain" style="color: black;">Grains</option>
Page | 34
</select>
</div>
</div>
<div class="col-sm-2">
<input class="button special" type="submit" value="Go!" />
</div>
<div class="col-sm-4"></div>
</div>
</center>
</form>
<?php endif; ?>
?>
<div class="row">
<?php
while($row = $result->fetch_array()):
$picDestination = "images/productImages/".$row['pimage'];
?>
Page | 35
<div class="col-md-4">
<section>
<strong><h2 class="title" style="color:black; "><?php echo
$row['product'].'';?></h2></strong>
<a href="review.php?pid=<?php echo $row['pid'] ;?>" > <img class="image fit" src="<?php
echo $picDestination;?>" height="220px;" /></a>
</section>
</div>
</div>
</section>
</header>
</section>
</body>
</html>
Page | 36
Upload Proudct
<?php
session_start();
require 'db.php';
if ($_SERVER["REQUEST_METHOD"] == "POST")
{
$productType = $_POST['type'];
$productName = dataFilter($_POST['pname']);
$productInfo = $_POST['pinfo'];
$productPrice = dataFilter($_POST['price']);
$fid = $_SESSION['id'];
Page | 37
}
$pic = $_FILES['productPic'];
$picName = $pic['name'];
$picTmpName = $pic['tmp_name'];
$picSize = $pic['size'];
$picError = $pic['error'];
$picType = $pic['type'];
$picExt = explode('.', $picName);
$picActualExt = strtolower(end($picExt));
$allowed = array('jpg','jpeg','png');
if(in_array($picActualExt, $allowed))
{
if($picError === 0)
{
$_SESSION['productPicId'] = $_SESSION['id'];
$picNameNew = $productName.$_SESSION['productPicId'].".".$picActualExt ;
$_SESSION['productPicName'] = $picNameNew;
$_SESSION['productPicExt'] = $picActualExt;
$picDestination = "images/productImages/".$picNameNew;
move_uploaded_file($picTmpName, $picDestination);
$id = $_SESSION['id'];
Page | 38
}
}
else
{
$_SESSION['message'] = "There was an error in uploading your product image! Please Try
again!";
header("Location: Login/error.php");
}
}
else
{
$_SESSION['message'] = "You cannot upload files with this extension!!!";
header("Location: Login/error.php");
}
}
function dataFilter($data)
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
return $data;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>AgroCulture</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta name="description" content="" />
<meta name="keywords" content="" />
<link href="bootstrap\css\bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="bootstrap\js\bootstrap.min.js"></script>
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<link rel="stylesheet" href="login.css"/>
<link rel="stylesheet" type="text/css" href="indexFooter.css">
Page | 39
<script src="js/jquery.min.js"></script>
<script src="js/skel.min.js"></script>
<script src="js/skel-layers.min.js"></script>
<script src="js/init.js"></script>
<noscript>
<link rel="stylesheet" href="css/skel.css" />
<link rel="stylesheet" href="css/style.css" />
<link rel="stylesheet" href="css/style-xlarge.css" />
</noscript>
<script src="https://cdn.ckeditor.com/4.8.0/full/ckeditor.js"></script>
<!--[if lte IE 8]><link rel="stylesheet" href="css/ie/v8.css" /><![endif]-->
</head>
<body>
Page | 40
<input type="text" name="pname" id="pname" value="" placeholder="Product Name"
style="background-color:white;color: black;" />
</div>
</div>
<br>
<div>
<textarea name="pinfo" id="pinfo" rows="12"></textarea>
</div>
<br>
<div class="row">
<div class="col-sm-6">
<input type="text" name="price" id="price" value="" placeholder="Price"
style="background-color:white;color: black;" />
</div>
<div class="col-sm-6">
<button class="button fit" style="width:auto; color:black;">Submit</button>
</div>
</div>
</form>
</div>
</section>
<script>
CKEDITOR.replace( 'pinfo' );
</script>
</body>
</html>
Page | 41
Member Log out
<?php
session_start();
$_SESSION['logged_in'] = false;
session_unset();
session_destroy();
?>
<!DOCTYPE html>
<html>
<head>
<title>AgroCulture: LogOut</title>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link href="../bootstrap\css\bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="../bootstrap\js\bootstrap.min.js"></script>
Page | 42
<meta name="description" content="" />
<meta name="keywords" content="" />
<!--[if lte IE 8]><script src="css/ie/html5shiv.js"></script><![endif]-->
<script src="../js/jquery.min.js"></script>
<script src="../js/skel.min.js"></script>
<script src="../js/skel-layers.min.js"></script>
<script src="../js/init.js"></script>
<link rel="stylesheet" href="../css/skel.css" />
<link rel="stylesheet" href="../css/style.css" />
<link rel="stylesheet" href="../css/style-xlarge.css" />
</head>
<body>
<?php
require 'menu.php';
?>
<section id="banner">
<div class="container">
<header class="major">
<h2>Thanks for visiting !!!</h2>
<center>
<p>You have been succesfully logged out !!!</p>
<div class="6u 12u$(xsmall)">
<br />
<a href="../index.php" class="button special">HOME</a>
</div>
</center>
</header>
</div>
</div>
</section>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/jquery.scrolly.min.js"></script>
<script src="../assets/js/jquery.scrollex.min.js"></script>
<script src="../assets/js/skel.min.js"></script>
<script src="../assets/js/util.js"></script>
<script src="../assets/js/main.js"></script>
</body>
</html>
Page | 43
7 System Testing And Implementation
Testing
Testing is evaluation of the software against requirements gathered from users and system
specifications. Testing identifies important defects, flaws, or an error in the application code that
must be fixed .It also assesses the feature of a system. Testing assesses the quality of the product.
Unit Testing
Unit testing refers to the testing certain functions and areas of the code. It gives the ability to verify
that all the functions work as expected. Eventually, it helps to identify failures in the algorithms
as well as logic to help improve the quality of the code that composes a certain function.
Integration Testing
Integration testing is basically a logical extension of unit testing. In simple words, two tested units
are combined into a component and the interface between them is tested. It identifies problems
that occur when different units are combined The different modules of this project have undergone
integration testing while being merged.
System Testing
System testing tests the behavior of whole system as defined by the scope of the development
project. It might include tests based on risks as well as requirement specifications, business
process, use cases or other high level descriptions of system behavior, interactions with the
operating systems and system resources. It is most often the final test performed to verify that the
system meets the specification and its objectives. System testing has been performed at the
completion of each feature and is still taking place to make improvements on the existing system.
Findings
After a series of testing and debugging, the project was ready for projection and is believed that it
will achieve the goals that it is designed to get, which is to vote in ease.
Page | 44
8 Conclusion
The variety of farm management systems is similar to the diversity of farms From simple, home
developed electronic records to precision farming systems. In order to limit the workload,
these apps are required to determine, without being highly sophisticated, what is required by every
agricultural business.
Benefits
• Electronic Record keeping.
• Optimization through Comprehension and Comparison.
• Legally Required Reports.
• Inventory Management.
• Opportunities in Planning.
Reference
➢ https://www.w3schools.com/
➢ https://getcssscan.com/
➢ https://bootstrapmade.com/
Page | 45