You are on page 1of 60

Acknowledgement

The success of this project would not have been possible without the kind support and
assistance of many individuals and organizations, and we are immensely blessed to
have got this all along the duration of our project. We would like to extend our
profound gratitude to each and every one of them.

We are highly indebted to New Summit College for constant guidance and
supervision, as well as for providing all the necessary ICT infrastructure and friendly
environment for the successful completion of the project. We are also appreciative of
the efforts of B.Sc. CSIT coordinator Mr. Kumar Poudyal, without his supporting
role, the project would have been nowhere near completion.

We would like to express our gratitude to our project supervisor Mr. Shovit Sharma
who took keen interest on our project and guided us throughout the project by
providing all the necessary ideas, information and knowledge for the developing a
functional web application. Our special thanks to Mr. Romkant Pandey for his
constant encouragement and guidance towards making this report standard as per the
norms and values.

We are thankful and fortunate enough to get constant support from our seniors and
every teaching staff of B.Sc. CSIT department which helped us successfully complete
our project. We would also like to extend our regards to all the non-teaching staff of
B.Sc. CSIT department for their timely support.

We would not forget to remember the officials at Ministry of Agricultural


Development, Ministry of Forests and Soil Conservation as well as other agencies
who helped us with statistical data that was pivotal for the successful completion of
the project.

Last but not the least, our thanks and appreciations also go to each and every one of
our colleagues for their encouragement and support in developing the project.

Members of Hamro-Krishi

iv
ABSTRACT

The world is changing every second thanks to the enormous growth of Information
and Communications Technology. Today, everything is at our fingertips. Even a little
effort of technology can make a huge difference; new heights can be reached and new
standards can be set. Hamro-Krishi is an innovation that aims to bring about effective
outcomes on Agriculture through the use of technology.

Hamro-Krishi is a web application focused on the dissemination of knowledge and


Information on various aspects of agriculture with key focus on: soils, fertilizers,
MAPs, crops and diseases. Hamro-Krishi provides farmers with a platform to interact
with fellow farmers via „Krishak Profile‟ which allows farmers to add their
experiences, trainings, and information on crops they harvest. The „Ask the Expert‟
feature will allow farmers to post queries to the pundits of the relevant subject matter.
Agro News and Agro Stories will keep the farmers informed about various news,
events and stories from across the globe.

The main motto of Hamro-Krishi is to go beyond „Geographical Barriers‟. With the


advancement of technology, more and more people are oriented towards using digital
platforms for efficient and effective information on broader subjects. We hope
Hamro-Krishi will find its way on the revolutionary change of agricultural habits of
people involved in the field and assist them in every possible way to reach the
potential of agricultural development in the country.

v
Table of Contents
Acknowledgement .................................................................................................................... iv
ABSTRACT............................................................................................................................... v
List of Figures ......................................................................................................................... viii
List of Table .............................................................................................................................. ix
List of Abbreviations ................................................................................................................. x
CHAPTER I ............................................................................................................................... 1
1. INTRODUCTION ............................................................................................................. 1
1.1 Background ................................................................................................................ 1
1.2 Problem Statement ..................................................................................................... 2
1.3 Objectives: ................................................................................................................. 2
1.4 Scope and Limitation: ................................................................................................ 3
1.4.1 Scope:................................................................................................................. 3
1.4.2 Limitation:.......................................................................................................... 3
Chapter II ................................................................................................................................... 4
2. Requirements Analysis: ..................................................................................................... 4
2.1 Study of existing system ............................................................................................ 4
2.2 DATA COLLECTION METHODS .......................................................................... 5
2.2.1 Source of Data: .................................................................................................. 5
2.3 Requirement Specification ......................................................................................... 7
2.3.1 Functional Requirements ................................................................................... 7
2.3.2 Non Functional Requirements: .......................................................................... 8
2.4 Feasibility Analysis .................................................................................................... 9
2.4.1 Technical Feasibility: ......................................................................................... 9
2.4.2 Operational Feasibility: ...................................................................................... 9
2.4.3 Economic Feasibility: ........................................................................................ 9
Chapter III ................................................................................................................................ 11
3. System Planning............................................................................................................... 11
3.1 Software Development Model or Methods: ............................................................. 11
3.1.1 Main Activities of the Software ....................................................................... 13
3.2 Work Breakdown Structure: .................................................................................... 15
............................................................................................................................................. 15
3.3 Resource Requirement (Cost Estimation): ............................................................... 15
3.4 Time Scheduling (Gantt chart):................................................................................ 17
4. System Design: ................................................................................................................ 18
4.1 System Architecture and Overview: ........................................................................ 18
4.2 System Diagrams: .................................................................................................... 19
4.2.1 Flowchart: ........................................................................................................ 19
4.2.2 DFD (Data Flow Diagram): ............................................................................. 20
4.2.3 Physical Diagram (Database Schema): ............................................................ 22
4.2.4 Logical ER Diagram: ....................................................................................... 23
4.2.5 Data Dictionary: ............................................................................................... 25
4.2.6 Warnier-Orr Diagram:...................................................................................... 27
4.2.7 Decision Table: ................................................................................................ 28
Chapter V ................................................................................................................................. 29
5. System Development and Testing: .................................................................................. 29
5.1 Coding tools: ............................................................................................................ 29
5.1.1 Front End ......................................................................................................... 29
5.1.2 Back End: ......................................................................................................... 31
5.2 Testing: .................................................................................................................... 32
5.2.1 Unit Testing ..................................................................................................... 32
5.2.2 Integration Testing ........................................................................................... 34
5.2.3 System Testing: ................................................................................................ 35
5.3 Support: .................................................................................................................... 36
6. FUTURE SCOPE & CONCLUSION .............................................................................. 37
6.1 Future Plan: .............................................................................................................. 37
6.2 Demonstration: ......................................................................................................... 37
6.3 Conclusion: .............................................................................................................. 37
Bibliography ............................................................................................................................. 38
List of Figures
Figure 3.1: Waterfall Model .................................................................................................... 13
Figure 3.2: Work Breakdown Structure ................................................................................... 15
Figure 3.3: Cost estimation using COCOMO .......................................................................... 16
Figure 3.4: Gantt Chart ............................................................................................................ 17
Figure 4.1: System Architecture .............................................................................................. 18
Figure 4.2.1: System Flowcharts ............................................................................................. 19
Figure 4.2.2(a): DFD Level 0 .................................................................................................. 20
Figure 4.2.2(b): DFD Level 1 .................................................................................................. 21
Figure 4.2.3: Database Schema ................................................................................................ 22
Figure 4.2.4(a): Logical ER Diagram (Farmer‟s Profile) ........................................................ 23
Figure 4.2.4(b): Logical ER Diagram (all data) ....................................................................... 24
Figure 4.2.6: Warnier-Orr Diagram ......................................................................................... 27
Figure 5.2.2: Integration Testing ............................................................................................. 34

viii
List of Table

Table 4.2.5: Data Dictionary .................................................................................................... 26


Table 4.2.7(a): Decision Table for Admin ............................................................................... 28
Table 4.2.7(b): Decision Table for Login ................................................................................ 28
Table 5.2.1 : Test Case for Login ............................................................................................ 33

ix
List of Abbreviations

4GL Fourth Generation Language

COCOMO Constructive Cost Model

CSS Cascading Style sheets

DFD Data Flow Diagram

ER Entity Relationship

GDP Gross Domestic Product

HTML Hyper Text Markup Language

HTTP Hyper Text Transfer Protocol

ICT Information and Communication Technology

IDE Integrated Development Environment

JS JavaScript

MAP Medicinal and Aromatic Plants

PC Personal Computer

PDA Personal Digital Assistant

PHP PHP Hypertext Preprocessor

RDBMS Relational Database Management System

ROI Return Over Investment

SDLC Software Development Life Cycle

SQL Structured Query Language

WBS Work Breakdown Structure

W3C World Wide Web Consortium

x
CHAPTER I

1. INTRODUCTION

1.1 Background

Nepal is an agro-based country. Agriculture, like in most developing


countries, plays an important role in Nepal in meeting the basic needs of the majority
of the people. Agriculture is the cornerstone of Nepal‟s economy: providing
employment opportunity to nearly sixty percentage of the total population and
contributing to one-third of nation‟s GDP. Agriculture also accounts for 13 percent of
the total foreign trade of the country according to data provided by www.mocs.gov.np.
Therefore, the development of agriculture sector is vital for the development of
national economy.

Hamro-Krishi is a web application that focuses on the dissemination of


knowledge and information in the field of agriculture by providing people involved in
agriculture with a distinct digital platform to access adequate amount of information
on soils, fertilizers, crops and diseases and MAPs.

Hamro-Krishi aims to make „unaware people aware‟, encourage the educated


people, and help the helpless farmers by bridging ICT gap in agriculture; more
precisely promoting expansion of knowledge and information in support of
agricultural development through the use of available and accessible ICT technology.

1
1.2 Problem Statement

Although agriculture is considered as the national occupation of our country, it


is ironical that most people, especially in rural parts of the country, lack the very basic
knowledge and information on different aspects of agriculture such as soils,
fertilizers, crops and diseases, etc. This lack of basic knowledge and information has
hindered the growth of agricultural development in a poor country like ours.

The mobile penetration in Nepal has seen huge growth so has the mobile
internet access. According to a 2013/14 statistical data, the mobile penetration rate has
crossed over 70 percentage. But people are more inclined towards using digital
gadgets for social media rather than informational and educational causes.

The common problems that people involved in agricultural sector in the country
include:-

 Lack of knowledge and information on different aspects of agriculture like


soil, fertilizers, crops, etc.
 Lack of communication among farmers.
 Lack of Interaction with agro-experts.
 Highly reliant on Traditional Farming Techniques.
 Digital Illiteracy i.e. unable to use technology for problem solving.

1.3 Objectives:

The objectives of Hamro-Krishi can be summarized into the following points:

 To increase level of „Agricultural literacy‟.


 To provide interactive information about the Soils, Fertilizers, Crops and
Diseases, and MAPs through use of ICT to local farmers.
 To provide farmers with a dedicated distinct digital platform so as to connect
Farmers and Agro-experts.

2
1.4 Scope and Limitation:

1.4.1 Scope:

Hamro-Krishi allows users of the web application to view information on different


crops their associated diseases and worms. Users are able to view Soil Profile by
selecting specific Development region that allows users to gain vital insights such as
soil type, average rainfall, and average temperature of a specific location. Hamro-
Krishi allows users to select a specific fertilizer from a list of fertilizers and learn
more about them.

Hamro-Krishi also allows registered users are able to add their experiences in their
personal profile and that can be viewed by other registered users. These users are
provided with latest agriculture related news and information.

1.4.2 Limitation:

The different limitations of this project are:

 Hamro-Krishi does not allow farmers to directly communicate with each other
i.e. no special features like chatting among themselves. Communication
through means of third parties like agro experts.
 Hamro-Krishi is only available in English language and affects potential users
with lack of English.

3
Chapter II

2. Requirements Analysis:

Before starting the development of the new system, different requirements are
taken into consideration. As our project is solely based on agriculture, the requirement
analysis is done concentrating on various aspects of agriculture that are prevalent in
the country. The requirement analysis is done with following outline:

2.1 Study of existing system

Information and Communication Technologies are a promising and a reliable


solution to providing information at a very cheap cost. Broadly implemented web
application such as Hamro-Krishi has the potential to overcome agriculture related
information and knowledge barriers and change the economic landscape of places
with great agricultural potential.

There are different web applications that are available in the market that are
dedicated to agriculture chiefly focusing on aiding farmers in Nepal. Most of these
applications are available in Google‟s Android platform. Few applications as:
IFA-Krishi-Ghar, Krishi-Ghar, etc are providing farmers with the necessary
information to assist them in farming.

However, when observed closely, we found that these applications are not
providing all the necessary information that are critical to the farmers. These
applications are missing important factors, for instance: „Soil Profile‟, and Medicinal
and Aromatic Plants (MAPs). Information on these factors can play vital role in
uplifting the agro-sector of our country.

Hence, with the intent of providing information that are not yet in the reach of
the people that are dedicated in farming sector, the concept of Hamro-Krishi comes
into existence.

4
2.2 DATA COLLECTION METHODS

The key area of the project is Agriculture. Therefore, „Data Collection‟ is done
by visiting Ministry of Agricultural Development as well as other agencies, using
various techniques.

2.2.1 Source of Data:


 Questionnaire:

A questionnaire is a popular research tool for data collection. It consists of


series of questions on the subject matter used with the intention for collecting
information from respondents. Questionnaire can include a large group of
people or organization. The questions asked to the respondents were purely
related to the various aspects of agriculture prevalent in the country.

Sample Questionnaire:

1. What are the crops you usually grow on your field? Is it only seasonal?
2. How much of your economy is dependent on agriculture? Is there any
other occupation involved besides agriculture?
3. The crops you produce are they enough to sustain your livelihood or do
you even sell them in market?
4. Have you been using manures or pests and fertilizers at some point?
5. What techniques do you use for farming: Modern or traditional!!
6. How much are you aware of modern techniques prevalent right now?
7. Have you heard of MAPs? Are you aware of medicinal and economic
importance of MAP‟s?
8. Do you know about the quality of your soil? Have you ever checked for
acidic and basic nature of your soil?
9. Do you think you would be able to access the information provided via
internet? If yes, How? If not, Why not?
10. We hear Organic Foods these days in the market. Do you know of any
Organic Foods? Are Fertilizers added to these Organic Foods?

5
 Field visit:

Field Visit is a visit to a factory, farm or someplace for the purpose of


first-hand observation. In this context, field visit to the Bhaktapur district was
made for firsthand observation of agricultural habits and cultivation
techniques. The observation was helpful in gathering important data for
success of the project.

 Interaction:

Interaction was done with many officials from the Ministry of Agricultural
developments, farmers and agro-experts on the concerned subject matter to
gain vital information on agricultural aspects as soils, fertilizers, MAPs. The
information was crucial to the development of the system.

 Internet Research:

Different web applications were part of our research. We analyzed the


services they offered and the features these applications could not address.
This research helped us gain vital information and data obtained from the
research helped us significantly in the design and development of our web
application.

 Krishi Diary:

We referred to „Krishi Diary‟ an official book released by the Ministry of


Agriculture and Development for the sole purpose of gathering vital
information on soils, fertilizers, crops and their diseases as well as various
statistical agricultural data.

6
2.3 Requirement Specification

2.3.1 Functional Requirements

a. User Registration:

Registration is open to all visitors to Hamro-Krishi. Users can register


to Hamro-Krishi by filling the necessary information in the Sign Up tab.
User then selects an appropriate Login credentials (Username and
Password) to access his profile.

b. User Function:

There are two types of users: Registered and Non Registered User.
Registered users have full access to features of Hamro Krishi. Non
Registered Users cannot access features such as Ask the Expert, Krishak
Profile, etc.

c. Krishak Profile:

Hamro-Krishi allows the registered users to access their own personal


dashboard i.e. Krishak Profile where the user can include various
information such as their experiences, training, display picture, etc.

d. Sign Out:

User can log out of the system after finishing using the web
application.

7
2.3.2 Non Functional Requirements:

a. User Friendly:

The term user-friendly is self-explanatory. When something is user-


friendly, it is easy to access and work with. Hamro-Krishi is user friendly.
Visitors or Users with basic knowledge and skills of computer can easily use
the web application. Hamro-Krishi uses a simplified design and navigation, as
well as simple language on the content to improve the user friendliness of the
web application.

User friendliness helps the web application to improve and increase the
amount of visitors who use the web application.

b. Easy Access:

Hamro-Krishi is web application. Thus, it can be accessed anytime from


anywhere with an Internet Connection. This overcomes the geo-boundary and
concurs with „Go beyond Borders‟.

c. Responsive:

Hamro-Krishi is responsive; it uses Bootstrap, which improves the


responsiveness of the web application. Since it uses Bootstrap, it also concur
the mobile-first technology which would enhance the functionality of web
application in mobile devices. This nature could prove to be extremely
beneficial to people living in areas with limited access to computers.

d. Information Accuracy:

Information included in Hamro-Krishi is obtained from reliable sources


such as the Governmental and Non-Governmental agencies. They are checked
thoroughly before publishing on the web application. The web application
makes sure to avoid making mistakes during data and information retrieval.
Thus, Hamro-Krishi provides accuracy of information.

8
e. Speed of Application:

The speed of application depends on basically two factors: System


configuration and Internet Speed. System with good configuration will most
definitely lag performance if the Internet bandwidth is below par and vice
versa.

2.4 Feasibility Analysis

Feasibility Analysis is an assessment of the practicality of a proposed


project. It provides the degree of viability of a proposed project. A feasibility analysis
helps us determine the value of the proposed project, determine whether or not there
is a market for the proposed project, determine if the proposed project is financially
viable, and eventually, decide whether or not it is worth investing time and money
into the proposed project.

In short, a feasibility analysis evaluates the project‟s potential for success.


Following Feasibility Analysis was performed prior to working on the project:

2.4.1 Technical Feasibility:

The web application is technically feasible; complies with current technology,


including both the hardware and the software. The Web application is supported by
almost all latest web browsers, and most of all, it can be run on modern day systems.

2.4.2 Operational Feasibility:

The web application solves problem faced by the target group that was
underlined as the problem statement. The target users can look up to the web
application if and when the problem arises. Furthermore, features such as rich
information density, efficiency and cost effective is testament to the fact that the web
application is operationally feasible.

2.4.3 Economic Feasibility:

The web application is available and accessible via the Internet which makes it
economically feasible. Users only require an Internet connection to access contents

9
included in the web application. Moreover, there are no charges of any sorts
associated with contents in the web application

We do economic analysis using the ROI analysis. ROI is calculated by using


following formula.

Return of Investment (ROI) (%) = (Total Benefit/Total Investment)*100.

After the calculation of ROI, We can say the application is worthwhile.

For example in a year we calculated ROI in which

Total Investment = Rs.20000

Total Benefits = Rs.4500

So, Return of Investment (ROI) (%) = (4500/15000)*10 = 22.5%

According to above calculation in the first year we had 22.5% return of our
investment. We can say the application is worthwhile.

10
Chapter III

3. System Planning

Well carried plan is the key to success for any project. It is important to
perform planning before moving onto designing and implementation phase. For the
betterment and success of the project, the team as a whole was involved in discussions
about the systematic planning for the smooth and proper work flow of the project.

3.1 Software Development Model or Methods:

In software engineering, a software development methodology or system


development methodology is a framework that is used to structure, plan, and control
the process of developing an information system. There are different models or
methods used or followed during the SDLC (Software Development Life Cycle)
process such as the waterfall model, prototyping model, spiral model and others based
on the nature or objective of the software.

We have used the Waterfall Model to develop our entire system. Albeit,
Waterfall model is old but we find Waterfall model as the most suitable model for our
system because this type of model is basically used for the project which is small and
there are no uncertain requirements. The entire system is built up on the norms and
values of Waterfall Model.

The Waterfall Model was first Process Model to be introduced. It is the


earliest SDLC approach for software development. It is also referred to as a linear-
sequential life cycle model. It is very simple to understand and implement in the
system.

The Waterfall model includes different phases as: requirements analysis,


design, implementation, testing (validation), integration, and maintenance. In this
model, each phase must be completed before the next phase can begin. At the end of
each phase, a review takes place to determine if the project is on the right path and
whether or not to continue or discard the project. In this model the testing starts only
after the development is complete. In waterfall model phases do not overlap and
typically the outcome of one phase acts as the input for the next phase sequentially.

11
The basic principles are:

 Project is divided into sequential phases, with some overlap and splash back
acceptable between phases.
 Emphasis is on planning, time schedules, target dates, budgets and
implementation of an entire system at one time.
 Tight control is maintained over the life of the project via extensive written
documentation, formal reviews, and approval/signoff by the user and
information technology management occurring at the end of most phases
before beginning the next phase.

Some Advantages of Waterfall Model:

 This model is simple and easy to understand and use.


 It is easy to manage due to the rigidity of the model – each phase has specific
deliverables and a review process.
 In this model phases are processed and completed one at a time. Phases do not
overlap.
 Waterfall model works well for smaller projects where requirements are very
well understood.

Some scenarios when Waterfall Model is suitable over others:

 This model is used only when the requirements are very well known, clear and
fixed.

 Product definition is stable.

 Technology is understood.

 There are no ambiguous requirements.

 Ample resources with required expertise are available freely

 The project is short.

12
Figure 3.1: Waterfall Model

3.1.1 Main Activities of the Software

We used the Waterfall Model as the Software Development Model to develop


the entire system. Then, the Software Development Life Cycle [SDLC] was followed
faithfully. The different process of the development cycle was broken down into
sequence of process and thus the development of Hamro-Krishi was progressed.

a. Requirements Gathering & Analysis:

Before developing the system, it is crucial for requirement collection and


analysis. This phase was used to determine the requirements such as: who are
target group for the system? How will they use the system? These were the
type of questions that were answered during the requirements gathering phase.
After requirement gathering was completed, these requirements were analyzed
to determine whether or not these requirements can be measured, tested and

13
most of all, incorporated to the proposed system. Once, requirements analysis
was completed, the designing of the system was initiated

b. Designing:

In this phase, the framework of the proposed system was designed from
the requirements which were studied in the previous phase. The system
designing phase was useful in specifying the needed hardware and system
requirements as well as the overall system structure.

c. Coding:

Once, the designing phase was completed, the coding phase was initiated.
The main goal of the coding phase was to translate i.e. implement the design
of the system from the previous phase into code in a specified programming
language. It was kept in mind that this was the crucial part of the development
life cycle because robust codes meant less hassle in testing and
implementation phase. Simplified coding was used as far as practicable. PHP
was used for the Server Side Validation, for interactive user interface CSS and
Bootstrap was used.

d. Testing:

After the code was developed in the coding phase, the codes were tested to
check whether or not it complied with the requirements and that the code
actually solved the needs that were addressed in the requirements phase.
Errors that occurred were corrected and further debugging was performed.

e. Documentation:

Software Documentation is another crucial part of the development life


cycle. It contains information that provides the overall structure of the any
software projects. In this context, documentation was done hand in hand with
the development process wherever possible. Documentation showcases the
objectives, importance as well as the overall view of the Web Application i.e.
Hamro-Krishi.

14
3.2 Work Breakdown Structure:

Resource Requiremnt (Cost Estimation):


F

Figure 3.2: Work Breakdown Structure

3.3 Resource Requirement (Cost Estimation):

We have used the basic constructive cost model (COCOMO) for cost
estimation. The constructive cost model is an algorithmic software constitutional
model developed by Barry W. Boehm. The model uses a basic regression formula
with parameters that are derived from historical project data and current project
characteristics.

Here, we use the formula: Effort (E) =ab (KLOC)bb, where:

 E is the Effort in staff months


 a and b are coefficients to be determined
 KLOC is thousands of lines of code

15
Figure 3.3: Cost estimation using COCOMO

Calculated on reference:
http://groups.engin.umd.umich.edu/CIS/course.des/cis375/projects/crr/frmReport.html
From above table,
Effort=3 Persons/month
KLOC=1.2

16
3.4 Time Scheduling (Gantt chart):

Figure 3.4: Gantt chart

17
Chapter IV

4. System Design:

4.1 System Architecture and Overview:


We have developed the required system that makes use of the internet and
computer peripherals. This system is supported by any different devices that can
access the internet. The system architecture is clearly defined by the following figure:

Figure 4.1: System Architecture

18
4.2 System Diagrams:

4.2.1 Flowchart:

Figure 4.2.1: System Flowcharts

19
4.2.2 DFD (Data Flow Diagram):

DFD Level 0

Figure 4.2.2(a): DFD Level 0

20
DFD Level 1

Figure 4.2.2(b): DFD Level 1

21
4.2.3 Physical Diagram (Database Schema):

Figure 4.2.3: Database Schema

22
4.2.4 Logical ER Diagram:

Figure 4.2.4(a): Logical ER Diagram (Farmer’s Profile)

23
FIGURE 4.2.4(b): LOGICAL ER DIAGRAM (ALL DATA)

24
4.2.5 Data Dictionary:

It is a set of information describing the contents, format, and structure of a


database and the relationship between its elements, used to control access to and
manipulation of the database.

A data dictionary is a collection of descriptions of the data objects or items in


a data model for the benefit of programmers and others who need to refer to them. A
first step in analyzing a system of objects with which users interact is to identify each
object and its relationship to other objects. This process is called data modeling and
results in a picture of object relationships. After each data object or item is given a
descriptive name, its relationship is described (or it becomes part of some structure
that implicitly describes relationship), the type of data (such as text or image or binary
value) is described, possible predefined values are listed, and a brief textual
description is provided. This collection can be organized for reference into a book
called a data dictionary.

25
Table 4.2.5: Data Dictionary

S. Entity Attribute Data Type Field Constr Format


N size aints
1. Farmers profile Farmers_id int 11 pk 9999
Farmers_password Varchar 255 Xxxxxxx
Farmers_name Varchar 255 Xxxxxxx
Farmers_sex Varchar 50 Xxxxxxx
Farmers_address Varchar 255 Xxxxxxx
Farmers_phone Varchar 255 9999
Farmers_image Varchar 255 Jpg
Farmers_maincrop. longtext Xxxxxxx
2. Crop Crop_name Varchar 255 Xxxxxxx
Crop_sname Varchar 255 Xxxxxxx
Crop_image Varchar 255 Jpg
3. Diseases Crop_id Int 11 Fk 9999
Disease_type Varchar 255 Xxxxxxx
Disease_name Varchar 255 Xxxxxxx
Disease_lname Varchar 255 Xxxxxxx
Disease_image Varchar 255 Jpg
Disease_symptoms Longtext 10000 Xxxxxxx
Disease_causes Longtext 10000 Xxxxxxx
4. Fertilizer Fertilizer_name Varchar 255 Xxxxxxx
Fertilizer_image Varchar 255 Jpg
Fertilizer_description Longtext 10000 Xxxxxxx
5. Soil Place Varchar 100 Xxxxxxx
Dev_region Varchar 100 Xxxxxxx
Soil_type Int 11 Xxxxxxx
Avg_temp Int 11 9999
Avg_rainfall Int 11 9999
Place_image Varchar 255 9999
Nitrogen Int 11 9999
Phosphorous Int 11 9999
Mineral Longint 9999
Nutrient Longint 9999
Ph_value Varchar 255 9999
6. Maps Maps name Varchar 255 Xxxxxxx
Maps_image Varchar 255 Jpg
Maps_description Longint Xxxxxxx

26
4.2.6 Warnier-Orr Diagram:

Figure 4.2.6: Warnier-Orr Diagram

27
4.2.7 Decision Table:

Table 4.2.7(a): Decision Table for Admin

Rules
CONDITIONS(IF) 1 2 3 4 5 6 7 8
Admin N N N N Y Y Y Y
Account N N Y Y N N Y Y

Password N Y N Y N Y N Y
ACTION(THEN) 1 2 3 4 5 6 7 8
Modification - - - - - - - X

Table 4.2.7(b): Decision Table for Login

Rules
CONDITIONS(IF) 1 2 3 4 5 6 7 8
User Register N N N N Y Y Y Y
Email N N Y Y N N Y Y
Password N Y N Y N Y N Y
ACTION(THEN) 1 2 3 4 5 6 7 8
Login - - - - - - - X

28
Chapter V

5. System Development and Testing:

Software development is the process of developing software through


successive phases in an orderly way. This process includes not only the actual writing
of code but also the preparation of requirements and objectives, the design of what is
to be coded, and confirmation that what is developed has met objectives.
Software testing is a process of executing a program or application with the
intent of finding the software bugs. It can also be stated as the process of validating
and verifying that a software program or application or product. Simply the coding
tools and the testing methodologies can be discussed under this section.
5.1 Coding tools:

For the easy understanding we can use the generalized term “programming
tools” and explain what the coding tools are? A programming tool or software
development tool is a computer program that software developers use to create,
debug, maintain, or otherwise support other programs and applications. Different
tools are used to develop the so called front end and back end of a program, whose
logical combination gives the real world application/software. Since our project is
fully concerned with the development of a web based application it seems like it is
appropriate to give an overview of the different tools used in the web application.

5.1.1 Front End

A "front-end" application is one that application users interact with directly.


The front end is an interface between the user and the back end. In simple words we
can understand the concept of front and back end with the help of below given
definition. In client/server applications, the client part of the program is often called
the front end and the server part is called the back end. While creating a front end,
different components relating to the software development were used. They are listed
below:

29
a. PHP V5.4.3:
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-
used open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.

The version 5.4.3 of PHP delivers two security fixes. All users of PHP
5.4 are encouraged to upgrade to this release. PHP 5.4.3 completes a fix for
vulnerability in CGI-based setups (CVE-2012-2311). Note: mod_php and php-
fpm are not vulnerable to this attack. A buffer overflow vulnerability in the
apache_request_headers() was fixed (CVE-2012-2329).

b. NetBeans IDE 7.2.1(Build 201210100934):


NetBeans is a software development platform written in Java.
The NetBeans Platform allows applications to be developed from a set of
modular software components called modules. NetBeans IDE is the official
IDE for Java 8. With its editors, code analyzers, and converters, you can
quickly and smoothly upgrade your applications to use new Java 8 language
constructs, such as lambdas, functional operations, and method references.
Batch analyzers and converters are provided to search through multiple
applications at the same time, matching patterns for conversion to new Java 8
language constructs. With its constantly improving Java Editor, many rich
features and an extensive range of tools, templates and samples, NetBeans
IDE sets the standard for developing with cutting edge technologies out of the
box.

c. HTML:

HTML is a computer language devised to allow website creation.


These websites can then be viewed by anyone else connected to the Internet. It
is relatively easy to learn, with the basics being accessible to most people in
one sitting; and quite powerful in what it allows you to create. It is constantly
undergoing revision and evolution to meet the demands and requirements of
the growing Internet audience under the direction of the » W3C, the
organization charged with designing and maintaining the language.

30
d. Bootstrap:

Bootstrap is the most popular HTML, CSS, and JS framework for


developing responsive, mobile first projects on the web. Bootstrap is a free
and open-source collection of tools for creating websites and web applications.
It contains HTML and CSS-based design templates for typography, forms,
buttons, navigation and other interface components, as well as
optional JavaScript extensions. It aims to ease the development of dynamic
websites and web applications.
Bootstrap is a front end framework, that is, an interface for the user,
unlike the server-side code which resides on the "back end" or server.

e. JavaScript

It is client side scripting language. It is used for form validation in


Hamro-Krishi & it also simplifies user-application interactivity.

5.1.2 Back End:

A "back-end" application or program serves indirectly in support of the front-


end services, usually by being closer to the required resource or having the capability
to communicate with the required resource. The back-end application may interact
directly with the front-end or, perhaps more typically, is a program called from an
intermediate program that mediates front-end and back-end activities. It is the part of
the system that normal users don‟t want to know about it. System administrator
manages it. Back end possess database and administrator manages it. The following
parts are contained in the back end of our system:

a. MySQLversion: 5.5.24:

MySQL is a freely available open source Relational Database


Management System (RDBMS) that uses Structured Query Language (SQL).
SQL is the most popular language for adding, accessing and managing content
in a database. It is most noted for its quick processing, proven reliability, ease
and flexibility of use. MySQL is just the brand of one database software, one
of many.

31
b. Apache Server Version: 2.2.22

Apache Web Server is open source Web server creation, deployment


and management software. Initially developed by a group of software
programmers, it is now maintained by the Apache Software Foundation.
Apache Web Server is designed to create Web servers that have the ability to
host one or more HTTP-based websites. Notable features include the ability to
support multiple programming languages, server side scripting, an
authentication mechanism and database support. Apache Web Server can be
enhanced by manipulating the code base or adding multiple extensions/ add-
ons.

5.2 Testing:

Software testing is the process of evaluation a software item to detect


differences between given input and expected output. It also assesses the feature of
a software item. Testing assesses the quality of the product. Software testing is a
process that should be done during the development process.

We can break the definition of Software testing into the following parts:
 Process: Testing is a process rather than a single activity.
 All Life Cycle Activities: Testing is a process that‟s take place
throughout the Software Development Life Cycle (SDLC).
5.2.1 Unit Testing

The Unit testing part of a testing methodology is the testing of individual


software modules or components that make up an application or system. These tests
are usually written by the developers of the module and in a test-driven-development
methodology they are actually written before the module is created as part of the
specification. As work was divided and after coding it was parallelly tested and after
getting bug it was made bug free. Completing module & testing was done together.

32
a. Test Case for Login
Table 5.2.1: Test Case for Login

S.N Test case Id Test description Input test data Expected Result Actual Result Pass/fail Remarks

1 TC-01 Open browser and http://localhost/HK/hamrokrishi/i Login page should be Login page pass
ndex
enter url displayed with displayed with
username and username and
password password field
2 TC-02 Enter valid data in Username:sahaz@hk.com It should redirect to Home page pass
username and Password:******** home page displayed.
password field

3 TC-03 Enter valid data in Username: sahaz@hk.com Error message as Error message pass
username and leave Password: empty password field cannot displayed as
password field be empty PW field
empty cannot be
empty
4 TC-04 Leave username and Username: empty Error message as Displays an pass
password field Password: empty username and PW is error stating
empty and press required username and
login PW is required.
5 TC-05 Enter invalid Username: hdfhvjdfhsefj Error stating invalid Invalid pass
username and Password : eefefwefsw username and username and
password password to be password
displayed displayed.

33
5.2.2 Integration Testing

The Integration testing part of a testing methodology is the testing of the


different modules/components that have been successfully unit tested when integrated
together to perform specific tasks and activities. The test is often done on both the
interfaces between the components and the larger structure being constructed, if its
quality property cannot be assessed from its components. After integrating the
requirements we tested it, it was fine and satisfactory.

Figure 5.2.2: Integration Testing

34
5.2.3 System Testing:

The system testing part of a testing methodology involves testing the entire
system for errors and bugs. This test is carried out by interfacing the hardware and
software components of the entire system, and then testing it as a whole. This testing
is listed under the black-box testing method, where the software is checked for user-
expected working conditions as well as potential exception and edge conditions.

35
5.3 Support:
Support in simple terms can be defined as, “the mechanisms to give assistance
to the needy people or sector”. The continued provision of services and material
necessary for the use and improvement of a system during its lifecycle is a support
system.

So here in the case our project, which is Hamro-Krishi by the title holds some
of the facilities available in our web application that helps to assist the users and
increases the comfort level and the understanding of our web application to the users.

36
Chapter VI

6. FUTURE SCOPE & CONCLUSION

6.1 Future Plan:


The current system is limited to providing information only through texts and
still images. The information contained in the system is only available in English at
the moment. However, we believe that the system can be further enhanced to include
regional languages along with the use of audio/video and other forms of multimedia.
We are also hoping to add several praiseworthy features to make the system even
more interactive in forth coming days.

6.2 Demonstration:
We shall be conducting demonstration of Hamro-Krishi in various places
focusing on the target group. We aim to make aware of the system to the younger
generation who are technically adapted to this kind of systems. We believe making
aware of the system to younger generation will help spreading the system to their
family members and eventually reach the target groups.

6.3 Conclusion:

„Hamro-Krishi‟ shall greatly benefit people involved in the agriculture sector


in the country. The interactive nature of Hamro-Krishi and its rich information density
will substantially improve the dissemination of knowledge and information pertaining
to different aspects of agriculture such as soil, fertilizers, etc. This, we believe, will
play a vital role in overcoming the problem of „Agricultural Illiteracy‟ which is
prevalent throughout the country.

The system is designed keeping in mind the motto: „Go Beyond Geo
Boundary‟ which will help overcome geographical barrier so as to connect farmers
and the agro experts on various broad subjects of agriculture. Last but not the least,
the web based nature of the system allows the content on the web application to be
available 24/7.

37
Bibliography

(n.d.). Retrieved from https://www.yumpu.com/en/document/view/5345385/unep-cc-dare-


report-school-rain-harvesting-project-/3

(n.d.). Retrieved from umpir.ump.edu.my/185/1/DINISH_THEGARAJU.pdf

(n.d.). Retrieved from https://www.yumpu.com/en/document/view/5345385/unep-cc-dare-


report-school-rain-harvesting-project-/3

(n.d.). Retrieved from umpir.ump.edu.my/185/1/DINISH_THEGARAJU.pdf

(n.d.). Retrieved from http://www.moad.gov.np/en/

(n.d.). Retrieved from https://en.wikipedia.org/wiki/Digital_literacy

(n.d.). Retrieved from


http://summertechnologyintegrationtraining.wikispaces.com/Using+a+variety+of+technolog
y+resources.

(n.d.). Retrieved from http://www.itinfo.am/eng/software-development-methodologies/

(n.d.). Retrieved from http://istqbexamcertification.com/what-is-waterfall-model-


advantages-disadvantages-and-when-to-use-it/

(n.d.). Retrieved from http://www.khannur.com/sst3.5.htm

(n.d.). Retrieved from https://prezi.com/ugb_5ptdjiqh/testing-throughout-the-testing-


lifecycle/

(n.d.). Retrieved from http://keystone-world.com/engagement_model.html

(n.d.). Retrieved from http://www.automationlearn.com/courses/manual-testing/sdlc-view/

(n.d.). Retrieved from http://whatis.techtarget.com/definition/front-end

(n.d.). Retrieved from http://narc.gov.np/narc/index.php

38
Annex

Source code for index.php

<?php $this->load->view('includes/header.php');?>
<?php $this->load->view('includes/semi_header.php');?>
<?php $this->load->view('includes/menu.php');?>

<div class="well">
<div class="row">

<?php if(null != $this->session->userdata('f_status')) {?>


<div class="col-lg-9">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$n=0;
foreach($slider ->result() as $s) {?>
<li data-target="#myCarousel" data-slide-to=$n <?php if($n==0){?>class="active" <?php}?>>
</li>
<?php $n+=1;}?>
</ol>
<div class="carousel-inner">
<?php
$z=0;
foreach($slider ->result() as $t) {?>
<div <?php if($z==0){?>class="item active" <?php }else{?> class="item" <?php }?>>
<a href="<?php echo site_url('uploads/slider/'.$t->slider_image);?>" rel="prettyPhoto[pp_gal]"
title="<?php echo $t->image_description ;?>">
<img src="<?php echo site_url('uploads/slider/'.$t->slider_image);?>"/>
</a>
<div class="carousel-caption">
<?php echo $t->image_description ;?>
</div>
</div>
<?php $z+=1;}?>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-lg-3">
<div class="well well-sm">
<h5 class="text-center">Be Part of HamroKrishi</h5>
<h6 class="text-center">Submit your krishi news, stories and pictures</h6><hr>
<a class="btn btn-success btn-lg center-block" href="<?php echo
site_url('farmersprofile_controller/submit_data/NEWS');?>"><span class="glyphicon glyphicon-
share"></span>&nbsp;&nbsp;SUBMIT KRISHI NEWS </a><hr>

39
<a class="btn btn-info btn-lg center-block" href="<?php echo
site_url('farmersprofile_controller/submit_data/STORY');?>"><span class="glyphicon glyphicon-
share"></span>&nbsp;&nbsp;SUBMIT KRISHI STORY </a><hr>
<a class="btn btn-primary btn-lg center-block" href="<?php echo
site_url('farmersprofile_controller/submit_data/PHOTO');?>"><span class="glyphicon glyphicon-
share-alt"></span>&nbsp;&nbsp;SUBMIT KRISHI PHOTOS</a><hr>
</div>
</div>
<?php } else {?>
<div class="col-lg-9">
<div id="myCarousel" class="carousel slide" data-ride="carousel">
<ol class="carousel-indicators">
<?php
$n=0;
foreach($slider ->result() as $s) {?>
<li data-target="#myCarousel" data-slide-to=$n <?php if($n==0){?>class="active" <?php }?>></li>
<?php $n+=1;}?>
</ol>
<div class="carousel-inner">
<?php
$z=0;
foreach($slider ->result() as $t) {?>
<div <?php if($z==0){?>class="item active" <?php }else{?> class="item" <?php }?>>
<a href="<?php echo site_url('uploads/slider/'.$t->slider_image);?>" rel="prettyPhoto[pp_gal]"
title="<?php echo $t->image_description ;?>">
<img src="<?php echo site_url('uploads/slider/'.$t->slider_image);?>"/>
</a>
<div class="carousel-caption">
<?php echo $t->image_description ;?>

</div>
</div>
<?php $z+=1;}?>
</div>
<a class="left carousel-control" href="#myCarousel" role="button" data-slide="prev">
<span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>
<span class="sr-only">Previous</span>
</a>
<a class="right carousel-control" href="#myCarousel" role="button" data-slide="next">
<span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span>
<span class="sr-only">Next</span>
</a>
</div>
</div>
<div class="col-lg-3">
<?php if($this->session->flashdata('error')){?>
<div class="alert alert-danger alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-
hidden="true">&times;</span></button>
<span class="glyphicon glyphicon-remove-sign"></span><?php echo $this->session-
>flashdata('error');?>

</div>
<?php }
if($this->session->flashdata('signout')){?>
<div class="alert alert-success alert-dismissible" role="alert">

40
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-
hidden="true">&times;</span></button>
<span class="glyphicon glyphicon-ok-sign"></span><?php echo $this->session->flashdata('signout');?>
</div>
<?php
}
if($this->session->flashdata('delete_profile')){?>
<div class="alert alert-success alert-dismissible" role="alert">
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-
hidden="true">&times;</span></button>
<span class="glyphicon glyphicon-ok-sign"></span><?php echo $this->session-
>flashdata('delete_profile');?>
</div>
<?php
}?>

<div class="well well-sm">


<h2> Sign in &nbsp;<span class="glyphicon glyphicon-circle-arrow-down"></span></h2>
<h6>Login and enjoy exciting features included.</h6>

<hr>
<form class="form-horizontal" action="<?php echo site_url('login_controller/process_signin');?>"
method="POST" id="baseform" >

<div class="form-group">
<label class="col-sm-4 control-label"> Email:</label>
<div class="col-sm-7">
<input type="text" id="email" name="email" class="required email form-control" />

</div>
</div>

<div class="form-group">
<label class="col-sm-4 control-label"> Password:</label>
<div class="col-sm-7">
<input type="password" id="pass" name="pass" class="required form-control" />

</div>
</div>
<div class="form-group">
<div class="col-sm-11 control-label">
<input type="submit" class="btn btn-success btn-sm" id="submit" name="submit" value="Sign In"
/><br><br>
</div>
</div>
</form>
Haven't registered ? Sign Up here &nbsp;<a class="btn btn-info" href="<?php echo
site_url('login_controller/sign_up');?>"><span class="glyphicon glyphicon-plus"></span> Sign UP </a>
</div>
</div>
<?php }?>
</div>
<br>
<div class="row">
<?php if(null == $this->session->userdata('f_status')) {?>
<div class="col-lg-5">
<div class="well well-sm">

41
<h3>Agro News<span class="glyphicon glyphicon-globe"></span></h3>
<h6>Keep up-to-date with all the happenings around the Nepal's Agricultural horizon</h6>
<hr>
<?php
$num2=1;
foreach($samachar ->result() as $u) {
if($num2<=4){ ?>
<div class="media">
<div class="media-left">
<a href="<?php echo site_url('news_controller/single_news/'.$u->news_type.'/'.$u->id);?>">
<img class="media-object" src="<?php echo site_url('uploads/krishinews/'.$u->news_image);?>"
alt="<?php echo $u->news_headline; ?>" height="60" width="80">
</a>
</div>
<div class="media-body">
<small>
<?php echo $u->news_date;
echo"<br>";
echo $u->news_location; ?></small>
<h4 class="media-heading"><?php echo $u->news_headline;?></h4>
<a href="<?php echo site_url('news_controller/single_news/'.$u->news_type.'/'.$u->id);?>">
<button class="btn btn-info btn-xs" type="button" >
<span class="glyphicon glyphicon-search"></span> Read More...
</button></a>
</div>
</div>
<?php $num2+=1;}
}?>
<?php $num=0;
foreach($samachar->result() as $u) {
$num+=1;} ;?>
<br><a href="<?php echo site_url('news_controller/display_samachar');?>">
<button class="btn btn-success btn-sm" type="button" >
All News <span class="badge"><?php echo $num;?></span>
</button></a>
</div>
</div>
<div class="col-lg-4">
<div class="well well-sm">
<h3> Agro Stories</h3>
<h6>Be inspired from our energetic youths</h6>
<hr>
<?php
$num3=1;
foreach($story ->result() as $v) {
if($num3<=4){ ?>
<div class="media">
<div class="media-left">
<a href="<?php echo site_url('news_controller/single_news/'.$v->news_type.'/'.$v->id);?>">
<img class="media-object" src="<?php echo site_url('uploads/krishinews/'.$v->news_image);?>"
alt="<?php echo $v->news_headline; ?>" height="50" width="70">
</a>
</div>
<div class="media-body">
<small>
<?php echo $v->news_date; ?></small>
<h5 class="media-heading"><?php echo $v->news_headline;?></h5>

42
<a href="<?php echo site_url('news_controller/single_news/'.$v->news_type.'/'.$v->id);?>">
<button class="btn btn-warning btn-xs" type="button" >
<span class="glyphicon glyphicon-search"></span> Read More...
</button></a>
</div>
</div>
<?php $num3+=1;}
}?>
<?php $num4=0;
foreach($story->result() as $u) {
$num4+=1;} ;?>
<br><a href="<?php echo site_url('news_controller/display_story');?>">
<button class="btn btn-success btn-sm" type="button" >
All Stories <span class="badge"><?php echo $num4;?></span>
</button></a>
</div>
</div>
<div class="col-lg-3">
<div class="well well-sm">
<h4 class="text-center">Our Registered Krishaks</h4>
<hr>
<div class='row'>
<?php foreach($krishaks->result() as $r) {?>
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-6 outer_krishak_small">
<a href="<?php echo site_url('profile_controller/single_profile/'.$r->id);?>">
<img class="img-rounded img-responsive center-block" src="<?php echo
site_url('uploads/farmersprofile/'.$r->farmers_image);?>" height="160" width="130" /></a>
</div>
<?php } ?>
</div>
<br>
<div class="row">
<div class="col-lg-12">
<a class="btn btn-success btn-xs center-block" href="<?php echo
site_url('profile_controller/display_profile');?>">
View All Krishaks </a>
</div>
</div>
</div>
<?php if(null == $this->session->userdata('f_status')) {?>
<div class="well well-sm">
<h6>Do you want to feature your krishi story, krishi samachar and your krishi related pictures ? </h6>
<a class="btn btn-primary btn-md center-block" href="<?php echo
site_url('farmersprofile_controller/guest_submit');?>">
Submit Krishi Stories, News & Pictures</a>
</div>
<?php }?>
</div>
<?php } else {?>
<div class="col-lg-5">
<div class="well well-sm">
<h3>Agro News<span class="glyphicon glyphicon-globe"></span></h3>
<h6>Keep up-to-date with all the happenings around the Nepal's Agricultural horizon</h6>
<hr>
<?php
$num2=1;
foreach($samachar ->result() as $u) {

43
if($num2<=4){ ?>
<div class="media">
<div class="media-left">
<a href="<?php echo site_url('news_controller/single_news/'.$u->news_type.'/'.$u->id);?>">
<img class="media-object" src="<?php echo site_url('uploads/krishinews/'.$u->news_image);?>"
alt="<?php echo $u->news_headline; ?>" height="60" width="80">
</a>
</div>
<div class="media-body">
<small>
<?php echo $u->news_date;
echo"<br>";
echo $u->news_location; ?></small>
<h5 class="media-heading"><?php echo $u->news_headline;?></h5>
<a href="<?php echo site_url('news_controller/single_news/'.$u->news_type.'/'.$u->id);?>">
<button class="btn btn-info btn-xs" type="button" >
<span class="glyphicon glyphicon-search"></span> Read More...
</button></a>
</div>
</div>
<?php $num2+=1;}
}?>
<?php $num=0;
foreach($samachar->result() as $u) {
$num+=1;} ;?>
<br><a href="<?php echo site_url('news_controller/display_samachar');?>">
<button class="btn btn-success btn-sm" type="button" >
All News <span class="badge"><?php echo $num;?></span>
</button></a>
</div>
</div>
<div class="col-lg-5">
<div class="well well-sm">
<h3><span class="glyphicon glyphicon-star"></span> Agro Stories</h3>
<h6>Be inspired from our energetic youths</h6>
<hr>

<?php
$num3=1;

foreach($story ->result() as $v) {


if($num3<=4){ ?>
<div class="media">
<div class="media-left">
<a href="<?php echo site_url('news_controller/single_news/'.$v->news_type.'/'.$v->id);?>">
<img class="media-object" src="<?php echo site_url('uploads/krishinews/'.$v->news_image);?>"
alt="<?php echo $v->news_headline; ?>" height="50" width="70">
</a>
</div>
<div class="media-body">

<small>
<?php echo $v->news_date; ?></small>
<h5 class="media-heading"><?php echo $v->news_headline;?></h5>

<a href="<?php echo site_url('news_controller/single_news/'.$v->news_type.'/'.$v->id);?>">


<button class="btn btn-warning btn-xs" type="button" >

44
<span class="glyphicon glyphicon-search"></span> Read More...
</button></a>
</div>
</div>
<?php $num3+=1;}

}?>
<?php $num4=0;
foreach($story->result() as $u) {
$num4+=1;} ;?>

<br><a href="<?php echo site_url('news_controller/display_story');?>">


<button class="btn btn-success btn-sm" type="button" >
All Stories <span class="badge"><?php echo $num4;?></span>
</button></a>

</div>
</div>
<div class="col-lg-2">
<div class="well well-sm">
<h4 class="text-center">Our Registered Krishaks</h4>
<hr>
<div class='row'>

<?php
$permit=0;
foreach($krishaks->result() as $r) {
if ($permit < 6){?>

<div class="col-lg-6 col-md-3 col-sm-3 col-xs-4 outer_krishak_small">


<a href="<?php echo site_url('profile_controller/single_profile/'.$r->id);?>">
<img class="img-rounded img-responsive center-block" src="<?php echo
site_url('uploads/farmersprofile/'.$r->farmers_image);?>" height="50" width="50" />
</a>
</div>
<?php $permit+=1;} } ?>
</div><br>
<div class="row">
<div class="col-lg-12">
<a class="btn btn-success btn-xs center-block" href="<?php echo
site_url('profile_controller/display_profile');?>">
View All Krishaks </a>
</div>
</div>
</div>

</div>
<?php }?>
</div>

</div>
<?php
$this->load->view('includes/footer.php');

45
Main Home Page

46
Dashboard

47
Sign in Page

48
Sign up Page

49
Details on Crops

50
Agro news and Agro stories inclusion in the main home page

51
Registered Krishak’s

52
Farmer’s Profile

53

You might also like