You are on page 1of 141

Insurance Management System

ABSTRACT

The use of data in various industry sectors becomes a necessity in predicting or


deciding on one of them is the use of vehicle insurance data related to claims
made by vehicle owners. The data can later be used by insurance companies to
be analyzed related to vehicle insurance claims both from the owner's side of
the vehicle and from the condition of the vehicle.

This application is mainly concentrates on two aspects

1. Renewal of insurance
2. Claim of insurances.

The notification on renewal of insurance policy will be sent via. E-mail to the
registered user and gateway link for making payment of renewal premium will
also be sent. Next aspect in the application is with respect to submission of
insurance claims via online along with attaching of necessary documents like
FIR, vehicle documents, damage photographs in support of the claims.

1. INTRODUCTION

Online Insurance is a web application which is used to tracking the details about
the insurance policy, customer details and company details. This project is
useful for any kind of insurance company to manage the insurance details, to
sanction the insurance for customer, process the insurance policy details and all
kind of insurance process through online. Our wide spectrum of articles that
have been included in this edition touch on business, regulatory and accounting
aspects that are currently topical and the subject matters of many debates. We
explore the future of micro insurance, the challenges brought about by the
implementation of Combine portal and its impact on the consolidation
principles applied to insurance cells this is an exciting and challenging time for
insurers. Customer behavior is changing rapidly. Technology, and in particular
the growth of online and social media, is driving a fundamental shift in
customer expectations in terms of how products are marketed, priced, sold and
serviced, and how companies are perceived. Pure internet businesses have set
new standards for customer-centricity and engagement that raise the
performance bar for players in every retail business sector.

Customers want to be able to buy with confidence in both the non-life insurance
and life and pensions sectors, Customers want products, and the purchasing
process, to be simple and transparent so they can understand what they are
buying. They want to build long-term relationships with insurance providers
based on trust, and to have confidence that the products they are buying Are
right for them and meet their needs. So to fulfil the requirements and need of the
insurer we have developed one methodology which will attract the people. And
the system will be a user friendly so all peoples who have knowledge about
insurance or not they all will accept the insurance.

OBJECTIVES OF THE PROJECT

The objective of this study is to provide a systematic analysis method of


selecting the best app through assessment of the user's needs.

Purpose of the System

This web site is an online micro insurance Analysis and information


management system that provides easy access of information regarding the
people and resources of insurance. This site is not a static site but with
wonderful dynamic facilities like search tools for insurance awareness articles,
guidelines, illustrations through images for visitors. This site also provides
several dynamic features.

Project Description:
Online Insurance is a web application which is used to tracking the
details about the insurance policy, customer details and company details. This
project is useful for any kind of insurance company to manage the insurance
details, to sanctioned the insurance for customer, process the insurance policy
details and all kind of insurance process through online.

In this online process the user enter into the website it will show details
about insurance and its types, also it will show the details about different
duration schemes to the corresponding insurance type or insurance policy. In
this process contains the user registration form which is used to apply for
insurance policy through online. It also helps the customer to view their own
insurance status information.

If the user registered insurance policy to this website, it will process that
registration form by verification and immediately give the temporary policy
holder ID to the user. After submission of registration form the admin will
process to verify that particular details registered by the customer and
sanctioned the insurance policy. Then the admin send the permanent policy
holder ID and password to the customer and also send status information about
insurance policy to the corresponding policy holder.

If the policy holder wants to view the information about their own policy
details, he/she login to policy status page by using the policy holder ID and
password had already given by insurance company and view their own details
and also they give feedback to the insurance company.

System Analysis:

System analysis focuses on specifying for what the system or the


application is required to do. It allows the individuals to see the logical elements
(what the system should do) apart from the physical components it uses
(computers, terminals and storage system). It is the process of gathering and
interpreting facts, diagnosing problems and using the information to recommend
improvements to the system.

2. LITERATURE SURVEY

Title: Head First Java, 2nd Edition 2nd Edition

Author:  Kathy Sierra 

Year: 2017

Description: Learning a complex new language is no easy task especially when


it’s an object-oriented computer programming language like Java. You might
think the problem is your brain. It seems to have a mind of its own, a mind that
doesn't always want to take in the dry, technical stuff you're forced to study.

The fact is your brain craves novelty. It's constantly searching, scanning,
waiting for something unusual to happen. After all, that's the way it was built to
help you stay alive. It takes all the routine, ordinary, dull stuff and filters it to
the background so it won't interfere with your brain's real work--recording
things that matter. How does your brain know what matters? It's like the
creators of the Head First approach say, suppose you're out for a hike and a tiger
jumps in front of you, what happens in your brain? Neurons fire. Emotions
crank up. Chemicals surge. That's how your brain knows.

And that's how your brain will learn Java. Head First Java combines puzzles,
strong visuals, mysteries, and soul-searching interviews with famous Java
objects to engage you in many different ways. It's fast, it's fun, and it's effective.
And, despite its playful appearance, Head First Java is serious stuff: a complete
introduction to object-oriented programming and Java. You'll learn everything
from the fundamentals to advanced topics, including threads, network sockets,
and distributed programming with RMI. And the new. Second edition focuses
on Java 5.0, the latest version of the Java language and development platform.
Because Java 5.0 is a major update to the platform, with deep, code-level
changes, even more careful study and implementation is required. So learning
the Head First way is more important than ever.

If you've read a Head First book, you know what to expect--a visually rich
format designed for the way your brain works. If you haven't, you're in for a
treat. You'll see why people say it's unlike any other Java book you've ever read.
By exploiting how your brain works, Head First Java compresses the time it
takes to learn and retain--complex information. Its unique approach not only
shows you what you need to know about Java syntax, it teaches you to think
like a Java programmer. If you want to be bored, buy some other book. But if
you want to understand Java, this book's for you

Title: Online Insurance Management System

Author: Sujitkumar Jagtap1, Dhiraj Rane2

Year: 2018

Description: Our aim is “Customers want to be able to buy online insurance


with confidence”. According to business experts the news came that the entire
insurance industry will adopted by the e-commerce. So the peoples those who
still referring offline insurance to make them understandable, easily adoptable
about online insurance our research will help them. For a new generation of
working professionals, online insurance is the bridge that connects the digital
age and the challenges of adult life. With internet access is rising and a young
generation of working middle class professionals reaching the cusp of adult life,
online insurance business is gathering momentum. Our research reveals that,
while of course there are significant variations in customer attitudes and
behaviours around the globe, driven by the diverse economic, demographic,
competitive and regulatory environments, there are some underlying themes that
are remarkably consistent. Listen to the voice of the customer.

Title: Design and development for information management system of


property insurance faced to ether-net
Author: Lou Yuan-jing, Wang Yu-duo

Year: 2015

Description: The system adopts C/S structure as the system structure, using JSP
as a developing platform, Microsoft SQL Server database. At the same time, the
whole system is developed combined with the basic theory of project
management information system development, structure and basic principle and
system developing steps. The system not only includes policy information
entering, generating and managing compensation, but also includes creating
different types of insurance type and editing corresponding types of payment
information besides the customer and the employee information management.
The purpose of this effective system is designed to improve the work efficiency
of insurance companies and reduce the cost of insurance companies.

Title: Online Insurance Claim Management System

Author: Dr. Parashuram Baraki[1],Ms.Aishwaraya Desai[2]

Year: 2019

Description: A claim is a legal action to obtain money, property, or the


enforcement of a right against another party. The legal document which carries
a claim is called a Statement of Claim. An insurance claim is the actual
application for benefits provided by an insurance company. Policy holders must
first file an insurance claim before any money can be disbursed to the hospital
or repair shop or other contracted service.This system is enhancing the facilities
provided to the customers by converting it into an automated and online system.
Title: Online Insurance Management among German Farmers

Author: Matthias Seitz

Year: 2017

Description: This study seeks to determine the extent to which German farmers
feel that digital management of their contracts and claims is important. It
presents the results of a quantitative survey of 413 farmers via telephonic
interview. The development of digitization is progressing throughout the
insurance industry. Many InsurTech companies are entering the market and
offer customers digital insurance folders in which the customers can easily
manage their contracts. From the results of this study recommendations have
been derived with regards to marketing agricultural insurance products for
insurance companies as well as conventional intermediaries in order for these to
keep up with the increasing digitization. Initially, the study shows that the
importance of digital management for insurance contracts and claims processes
is still low among German farmers. However, it becomes apparent that this is
increasingly important for younger farmers.

Title: Wireless body area network for hip rehabilitation system


Author: Mikael Soini, Jussi Nummela

Year: 2018

Description: In Wearable Well-Being project PUHVI, HipGuard system for


patients recovering from hip surgery was developed. Novel wireless sensors
having 3-axis acceleration and 3-axis magnetic sensors are used to measure
patient's hip and leg position and rotation. Furthermore, capacitive insole
sensors are used to measure the force between foot and a shoe. This paper
concentrates on how these sensors can be interconnected to a central unit that
collects and analyzes the measured information. Body Area Network (BAN)
utilized in wearable healtcare application have several application-specific
challenges such as low-power operation, low latency data transfer, high system
reliability and autonomous network operation. This paper thoroughly analyzes
how ANT wireless sensor networking technology operates as BAN - the focus
is mainly on energy efficiency, communication latency, network size and
reliability issues. Because the main focus of this paper is particularly in the
operability of ANT networking, these results can be directly utilized in many
other wireless sensor networking applications.

Title: Wireless Body Area Network in a Ubiquitous Healthcare System for


Physiological Signal Monitoring and Health Consulting
Author: Jung Joonyoung, Ha Kiryong

Year: 2019

Description: We developed a ubiquitous healthcare system consisted of


aphysiological signal devices, a mobile system, a device provider system, a
healthcare service provider system, a physician system, and a healthcare
personal system. In this system, wireless body area network (WBAN) such as
ZigBee is used to communicate between physiological signal devices and the
mobile system. WBAN device needs a specific function for ubiquitous
healthcare application. We propose a scanning algorithm, dynamic discovery
and installation, reliable data transmission, device access control, and a
healthcare profile for ubiquitous healthcare system.

PROBLEM STATEMENT

 Tracking issues! as people have reported multiple times that they are not
able to track the person they have added to the app
 Login issues, like the app, get stuck while login in for few users
 Notification issues as many have complained that the notifications are
either not coming up or coming frequently which causes a disturbance.
 Low performance of app at peak time
 Sometimes more than a message will be required to make sure that the
person on the other end has received the message

3. SYSTEM ANALYSIS

3.1 Proposed System

We propose an online learning solution to automatically deal with real-time


updates of the insurance network and we show that it outperforms another
online state-of-the-art algorithm. Finally, we combine the developed machine
learning modules with the hyper ledger fabric composer to implement and
emulate the artificial intelligence. Nowadays, insurance companies are deprived
of a tremendous amount of financial gain due to claims leakage. Fraudulent
claims present a huge and a costly problem for insurance companies, potentially
leading to billions of dollars of unnecessary expenses for the industry yearly.
Insurance fraudsters will often exaggerate or fabricate situations to provide the
basis for fraudulent claims. Insurers have historically relied on mathematicians
to measure risk and formulate premium rates for policy underwriting that would
ensure rational levels of payouts without endangering the company’s financial
health. Traditional insurance fraud detection methods are complex and time-
consuming. They mainly depend on expert scrutiny, adjusters, and special
investigation services. Added to that, manual detection results in additional
costs and inaccurate results. Moreover, late decisions might lead to extra losses
for the insurance companies.

Advantage

 Usability issues overcomes where people find it experiencing the full


potential of the app
 People complaining avoided regarding deleting the profile
 Social media integration issues
 Our insurance management system is very useful to customers in
providing more information about all insurance companies and their
policies that are uniquely launched in our website.
 The system reduces manual work during registration of policies.
 This system also provides online payments for the customers.
3.2 Existing system
The private insurance sector is recognized as one of the fastest-growing
industries. This rapid growth has fuelled incredible transformations over the
past decade. Nowadays, there exist insurance products for most high-value
assets such as vehicles, jewellery, health/life, and homes. Insurance companies
are at the forefront in adopting cutting-edge operations, processes, and
mathematical models to maximize profit whilst servicing their customer’s
claims. Traditional methods that are exclusively based on human-in-the-loop
models are very time-consuming and inaccurate. In this paper, we develop a
secure and automated insurance system framework that reduces human
interaction, secures the insurance activities, alerts and informs about risky
customers, detects fraudulent claims, and reduces monetary loss for the
insurance sector.

Disadvantage

 Too much of access permissions


 Issues with notification
 Advertisement keeps popping up which is annoying to a lot of users
 They used to have text message options but it seems that suspending that
feature has made users a bit furious
 It is time taking process.
 There is no online Insurance management facility in this system.
 There is no rich user interface.
4. SYSTEM REQUIREMENT

HARDWARE SPECIFICATION

Processor - I3 Processor
Speed - 2.0 GHz
RAM capacity - 4 GB
Hard Disk - 500 GB

SOFTWARE SPECIFICATION

Operating System - Windows '07

Back End - My SQL 5. 0

Front End - PHP MVC Framework

SOFTWARE DESCRIPTION

PHP started out as a small open source project that evolved as more and more
people found out how useful it was. Rasmus Lerdorf unleashed the first version
of PHP way back in 1994.

 PHP is a recursive acronym for "PHP: Hypertext Preprocessor".


 PHP is a server side scripting language that is embedded in HTML. It is used
to manage dynamic content, databases, session tracking, even build entire e-
commerce sites.
 It is integrated with a number of popular databases, including MySQL,
PostgreSQL, Oracle, Sybase, Informix, and Microsoft SQL Server.
 PHP is pleasingly zippy in its execution, especially when compiled as an
Apache module on the Unix side. The MySQL server, once started, executes
even very complex queries with huge result sets in record-setting time.
 PHP supports a large number of major protocols such as POP3, IMAP, and
LDAP. PHP4 added support for Java and distributed object architectures
(COM and CORBA), making n-tier development a possibility for the first
time.
 PHP is forgiving: PHP language tries to be as forgiving as possible.
 PHP Syntax is C-Like.
 Common uses of PHP
 PHP performs system functions, i.e. from files on a system it can create, open,
read, write, and close them.
 PHP can handle forms, i.e. gather data from files, save data to a file, through
email you can send data, return data to the user.
 You add, delete, modify elements within your database through PHP.
 Access cookies variables and set cookies.
 Using PHP, you can restrict users to access some pages of your website.
 It can encrypt data.

CHARACTERISTICS OF PHP

Five important characteristics make PHP's practical nature possible −

 Simplicity
 Efficiency
 Security
 Flexibility
 Familiarity

3. FUNCTIONAL REQUIREMENTS

3.2.1 Product Requirements


This web site is an online Micro Insurance Management System that provides
the following features in this phase-1.

 Micro Insurance Awareness


 Login to admin members
 Insured persons’ registrations and management
 Awareness Articles management
Visitor Services

 Articles
 About Website
 Contact Information
Member Services

 Login
 Change-password (to remind the forgotten password)
 Insured Registrations & management
 Search for insured persons
 Article Management
3.1.2 User Requirements
The web site provides easy links for easy navigation (browse) in the site. A
visitor with minimum knowledge of web browsing/surfing can access the site
very easily. Due to dynamic nature of features, the members, Admin members
should be able to understand the provided facilities. An online help
documentation will be provided to help the users and visitors in using the
facilities.

3.1.3 Performance Requirements


The following performance requirements should be maintained in the project.

 Each page in the site needs to load in a reasonable amount of time.


 Latest web techniques like Caching should be implemented to speed up
the loading of dynamic pages. This will also improve on the number of
simultaneous users, as connections are freed faster.

3.2 Quality Attributes


The following quality attributes should be maintained in the project.

Maintainability

The site's maintainability will depend on clean, easy-to-read pages. Being a


Dynamic Site we need to generate the dynamic output clean and well formatted

Availability

The site should be accessible to as many browsers as possible; including text


browsers.

Reliability

The reliability of the website depends on the web server it will be hosted on,
and also on LOGIN mechanisms.

Security

All the necessary steps has been taken to provide security to the site by
following the latest technology because all the data of all members is
proprietary data of the Client’s Organization and its members (Visitors and
members)

5. MODULES

Agent Registration form:


New Agent gives their information like, Name, password, Ac no, bank, working
details, age, sex, address, e-mail id. Offer web based insurance management
software system like insurance Policy Administration, agency and agent
management system software, life and non-life Insurance Pro is the affordable,
powerful and easy to use insurance agency management software, specially
designed for automating Independent Insurance.

AGENT LOGIN

The agent login form links to-

Basic agent information like contact details and address which will be shown in
customer insurance information window.

All the information related to insurances which he has made to his clients.

Commission received by him for each insurance made by him respectively.

Option to create a new policy to any existing/new client.

Option to edit the contact information of its client.

Option to delete a policy of any client in case of policy lapse.

The main advantages of this Insurance Management System VB Project are to


reduce the time and also manpower. These two factors are very important to
improve any download health insurance management system project source
code in asp.net and project report with ppt.

Policy Holder Registration form:

New Policy Holder gives their information like, Name, password, Ac no, bank,
Organization, Occupation, age, sex, address, e-mail id. DFD, UML diagram,
Screen shots, Paper presentation, output presents the Insurance Management
System project. Insurance Management System is an open source application.
provides the 27-03-2013
• RxInsurance - Insurance Management System aims to create robust solution
for Insurance industry. Focus area is small companies who deal with policy

CUSTOMER LOGIN:-

The form contains the agent information like-

Personal information required by insurance agency.

Next premium due of respective insurances by the client along with maturity
date, agent info etc.

Insurance management system: Insurance management system 1 Insurance


management system. View More Presentations. Learning Management System
Presentation. We offer web based healthcare insurance system solution for
health care insurance industry, health care insurance agency and healthcare
insurance agents. Check Project Title: Life Insurance Management System,
Category: Management software, Software Used: ASP.NET, JAVA, SQL
SERVER, Download: DFD, Project Report, Code Institute of Insurance and
Risk Management, set up by Insurance Regulatory Development Authority of
India (IRDA), has been in existence for nearly a decade.

Admin form:

Admin have provision to view all Agent, Policy, and Policy Holder information.
First Admin enter their name and Id then only they can access. And also admin
have the provision to view, Modify, Delete and insert the Policy, Policy Holder,
and Agent.

Insurance management is a general term used to describe an insurance broker or


services firm. This type of company typically provides a range of insurance.
Compulsory subjects. CT 81 Insurance and Risk Management. CT 82 insurance
Business Environment. We at Kotak Life Insurance work as a team and have a
flat management structure. Our top management has many years of experience
which has helped guide the Insurance Management Software Solution - 3i
Infotech offers insurance organizations an array of powerful solution
accelerators and software that enable efficient end Insurance is the equitable
transfer of the risk of a loss, from one entity to another in exchange for
payment. It is a form of risk management primarily used to hedge

ADMINISTRATOR LOGIN:-

Administrator has rights to-

Create new agent

Edit agent’s information and its commission percentage.

Delete an agent’s database and all its policies respectively.

Offer web based insurance management software system like insurance Policy
Administration, agency and agent management system software, life and non-
life Independent Insurance Agents as a Trusted Choice, Independent Insurance
Agent we act on your behalf to find the best possible coverage at the most
affordable rates. 22-08-2010

• Insurance management is a non-technical term used to describe insurance


brokers and providers and the insurance products they offer buyers. Insurance.
The Risk and Insurance Management Society, Inc. (RIMS) is a professional
association dedicated to advancing the practice of risk management. It was
founded.

Agent Form:

This module is used for agent to view all details about their policy holder/clients
and also view their own personal details.

7. SYSTEM DESIGN
7.1 Architecture Diagram

Fig 1: System Architecture Diagram

7.2 Diagrams

Use Case Diagrams

Use Case Diagram: Visitor and Facilities

Fig 2.1: Use Case Diagram: Visitor and Facilities


Use Case Diagram: Online Registered Members and Facilities

Fig 2.3: Use Case Diagram: Online Registered Members and Facilities

ER Diagram

ER (Entity Relation) diagrams

An ER diagram gives a clear idea of logical relation between two or more


entities. These diagrams help us to understand the technical design of database
involved in the project.

The following relational diagrams show the logical relation between the entities.

5.1.3.1 Insured Person’s details diagram


1 1
Personal details Ha
s

n 1
Residence History Ha
s
Insured Person
n 1
Occupation History Ha
s

Medical History Ha
s

Insured Person – Personal details relation

5.1.3.3 Insured Person – Residence History relation


5.1.3.4 Insured Person – Occupation History relation

5.1.3.5 Insured Person – Medical History relation


Identity

Diagnosis Date
n Has 1
Medical History Insured Person
Disease (ICD code)

5.1.3.6 Claims diagram


POLICY+ENDORSEMENT NO.#

CLAIM ID

OLD CLAIM NUMBER 1 Has 1


CLAIM DIAGNOSIS
INSURED IDENTITY

1 Has 1
INCURRED DATE CLAIM PAID AMOUNTS
REPORTED DATE

1 Has 1
CLAIM CHARGES
DATE OF CLAIM PAID

DATE OF ADMISSION 1 Has 1


DEDUCTIBLES PAID
DATE OF DISCHARGE

1 Has 1
CLAIM STATUS EXCEEDED AMOUNT

REASON FOR DENIAL


1 Has 1
EXCLUDED AMOUNT
TOTAL CHARGES n

TOTAL DEDUCTIBLE PAID

TOTAL CO-INSURANCE PAID Claim n Has 1 Insured


Person
TOTAL EXCLUDED AMOUNT

TOTAL EXCEEDED AMOUNT

TOTAL BENEFIT PAID

TOTAL PRE-HOSP.CHARGES

TOTAL POST-HOSP.CHARGES
FUNCTIONAL DIAGRAM

FUNCTIONAL FLOW DIAGRAM

Start

Admin logs in

Login is Success Login is not succeeded

Registers insured Can browse only


persons’ data articles and public pages

Search and Manages


insured persons’ data

Manages and
Uploads Articles

Log out

Stop
Subsystem decomposition

This section shows the all-functional objects in the project and their
functionality.

The following list of functional object as identified in the project.

 Login
 Register an Insured persons data
 Manages Insure Persons data
 Manages Articles
ADMINS

LOG IN CHANGE PASSWORD

MANAGE INSURED PERSONS ARTICLE MANAGEMENT

INSURED REGISTRATION

PERSONAL DETAILS

MEDICAL HISTORY

POLICY DETAILS

POLICY MAXIMUMS

SEARCH TOOL

QUICK SEARCH SEARCH RESULTS

ADVANCED SEARCH
MANAGEMENT

DELETE AN INSURED PERSON

ADD A NEW INSURED PERSON

ARTICLES MANGEMENT

MANAGE ARTICLES

UPLOAD ARTICLES
Data Flow Diagram

A data flow diagram represents the flow of information for any process or
system. It shows the system with its relationship to external entities. Here, we
can see how a system’s users and process flow work.

After logging in, Admin and User will land on the home page where they can
manage their profiles. Admin can add, view Policies, manage prices, view
buying, check the availability of Policies, etc.

After the user logs in to the system, the user can select the desired Policy and
buy and make the payment. Users can select a policy or multiple policies
separately and check all the details about the policy type, price, etc.

WAIVER of 1stYEARs EXCLUSION


Component diagram

The component diagram below shows the structural relations between


components in an Insurance Management System. The connected components
by lines represent relationships within the systems. In the diagram, it can be
seen that there are components namely Policy, buying, user, and account.

It shows how the user component connects to the other components while using
the system. Everything from the account details to Policy buying to payment
flow can be seen in the component diagram.
The admin is the user who can check the list of the insurance holder, can add a
category, subcategory, add a policy, etc. Another role here is that of the user
who will be a customer who can view the category, subcategory, and policy and
can apply for a policy listed therein.

Activity diagram

Activity diagrams in UML display the functionalities of various activities and


flow in management processes and software systems. The flow in the activity
diagram can be sequential, branched, or concurrent.

Admin can view the list of policies users bought. Admin can manage the
category of Policies and can update all Policy detail. Admin can view buying
history and detail. Admin can check payments.
Users can register and then buy the policies, make payments, etc. Users can find
detailed information about the policy on the system after logging in.

Sequence diagram

Sequence diagrams in UML are used to illustrate the sequence of messages


between objects in an interaction. A sequence diagram consists of a group of
objects that are represented by lifelines and the messages that they exchange
overtime during the interaction.
Admin who is the main user of this application will add the policy, add the
category of Insurance along with the subcategory.

Users can search for Policies, and view the price of a selected Policy. Users can
log in to the system using their names & contact number. Users can view/track
their bought policies, policy status, history, etc.
CLASS DIAGRAMS

DATA DICTIONARY

5.3.1 Table Name: tblInsured


5.3.2 Table Name: tblMedicalHistory

5.3.3 Table Name: tbl Policy Details


5.3.4 Table Name: tblPolicyMaximums

5.3.5 Table Name: MasterIndustries


5.3.6 Table Name: MasterInsurers

5.3.7 Table Name: MasterOccupations

5.3.8 Table Name: MasterRelations

5.3.9 Table Name: MasterStates

5.3.10 Table Name: MasterTPA

5.3.11 Table Name: Articles


5.3.12 Table Name: tblSuperAdmin

Xampp Server 2000

It is also pronounced as Sequel server. This is a client-server database


management system developed by Microsoft for large scale databases. It comes
into RDBMS (Relational Database Management System) category. It works
based on SQL (System query language), a latest and advanced database
language.

Authentication

A user need to login to this software system in-order to manage the database.
SQL server allows us to logon in two ways.

1. Windows authentication
2. SQL Server authentication
In windows authentication, system recognizes the user through his/her windows
login credentials. That means, if a user logs into a windows operating system,
he/she becomes an authorized user to use all resources that accept windows
authentication and available in the system. If the logged in computer is
configured as a valid client under a DNS (domain name server), the user
becomes eligible to access any resource of any computer that is working under
the DNS with widows authentication. In front end (programming) the following
connection string can be used to connect to the server.

Server=[server name] ; initial catalog=[database name];


trusted_connection=true;

In SQL server authentication, user will be provided a user id and password. A


user from any system in the network can use the user id and password to
connect to the database server. In front end (programming) the following
connection string can be used to connect to the server.

Server=[server name] ; initial catalog=[database name]; user id=[user id];


password=[password];

Features of SQL Server

 License cost is very lower than any RDBMS Systems


 Runs under Windows all windows servers (NT/2000/2003)
 Runs under client versions Windows 95/98/XP … (to install server
service, we need to install MSDE – Microsoft SQL Desktop Engine)
 Scalable to meet Enterprise level databases
 Supports data replication
 Supports Data Marts and Data Warehouses
 Provide OLAP service
 English Query tool makes data move available to casual users
 Data transmission services enable easy exchange of data
 Supports distributed transaction
 Centralized management
 Availability of Visual administration tools and wizards
 Generation and transmission of data in XML format

Advantages of relational databases

 Redundancy can be reduced


 Inconsistency can avoided
 Irrelevant data can be avoided
 Data can be shared
 Standards can be enforced
 Security restrictions can be applied means access levels can be defined
 Integrity can be maintained
 Conflicting requirements can be balanced

SQL Server Database objects

In a SQL server the following database objects can be created and maintained.

 Database Users (user accounts)


 Databases
 Tables
 Views
 Constraints
 Indexes
 Triggers
 Stored procedures
 Stored functions

DATABASE USERS

A database user is an authenticated user and allowed to logon to the server to


use a set of privileged (authorized) database objects. Administrator (user id: sa)
or any user having administrator privileges can access all objects without any
access restrictions. Any normal user will get limited access on some very
important database objects. The following list shows the general access
privileges on objects.

 SELECT
 CREATE
 INSERT
 UPDATE
 DELETE

A person who creates and maintains his/her database objects is called owner of
those database objects. He can GRANT or REVOKE privileges on his/her
objects to other users.

DATABASES

A database is a collection of database objects. It is a container to all tables,


views, indexes, constraints, triggers, stored procedures and functions. All
related objects of a database of an organization are maintained as a database.
Every database is maintained by the server in the form of two files. One is a
database file with .mdf and another is a log data file with extension .ldf. These
files can not be accessed by any other user except administrator of the system.

TABLES

A table is an actual data storage object and used to store the raw data of an
entity. A table collects data in the form of rows (records) and columns (fields).
So, while creating a table a user has to declare the columns in terms of column
name, column type and width. Column name is a identity name of the column,
column type specifies the type of data to be allowed in to the column and
column width specifies the maximum number of characters or range of data to
be allowed in to the column. A table allows a maximum of 1024 columns and
with an unlimited number of rows.

VIEWS

A view is a filter defined on a table. A view behaves like a table but with
restricted columns and rows. A view can be used to insert, update and delete the
contents of a table. But all actions work under the condition (filter) defined in
the view. That means we can not delete, update records that are not coming
under the filter definition of the view. So, views are very useful to restrict
columns and rows from the users depend on their accessibility.

CONSTRAINTS

These are a set of logical conditions built on the business logics of an


organization to allow and maintain data in tables. A data that is violating these
rules cannot be allowed into any table of the database. These are defined on
columns and rows while creating the tables. They are listed below.

Column level constraints


 Not null : Column becomes Mandatory
 Unique: Column does not allow duplicate data
 Primary key: Column becomes default field with Unique and Not null
natures
Row level constraint

 Check (logical expression)


Relational constraint (between two tables)

 Foreign key/Reference Key constraint


INDEX

An index is a database object that helps the database to speed up the data search
in a table. It holds a data expression/data from one or more columns of a table in
ascending order to find records quickly based on values of those columns. For a
table an index will be created automatically on its primary key column data. It is
called clustered index which is having data from the primary column in
ascending order along with cluster IDs (physical locations on the disk) of all the
rows. When a search condition is applied on a table through this column, system
searches the corresponding index for the rows. So, indexes make the data
searching faster.

TRIGGERS

A trigger a program that will implicitly (automatically) executed by the server


when a transaction (INSERT/DELETE/UPDATE) occurs of a table. They are
defined on tables. They are having the following advantages.

1. Deleted rows can be automatic backed-up from a table into its backup
table.
2. Old values can be automatically backed-up when some rows are updates
with new values.
3. Special business logics (constraints), that can not be implemented using
standard constraints and need extra procedures, can be implemented using
trigger procedures.
8. SYSTEM TESTING

PHP

PHP requirements

Some individual modules may have specific requirements for PHP extensions
and configurations beyond those listed below, so, please check the module's
documentation as well.

PHP extensions needed


Extensions used by Drupal core are defined in Core's composer.json file - see
for example the file for Drupal 9.1.x. Look at the "require" section and the keys
starting with "ext-".
Note: Adding a PHP extension to your system, at least on Linux (and Mac),
means finding and installing the relevant PHP package using your package
manager. Typically the package name for the Foo extension is named "php-foo"
or "php7-foo", but this isn't always the case. Some extensions are part of the
core PHP package and hence are enabled by default. 
Database extensions
The PHP Data Objects (PDO) extension must be activated for Drupal 9 and
higher to install and run correctly. The PECL version of PDO is not compatible
with Drupal 9 and cannot be used. In addition, a PHP extension for connecting
to your chosen database must be installed and enabled.
Drupal's currently supported database connectors are SQLite, mysql (the
original MySQL extension), mysqli (an improved connector for newer MySQL
installations), and pgsql (for PostgreSQL).
XML extension
PHP XML extension (for Blog API, Drupal, and Ping modules). This extension
is enabled by default in a standard PHP installation; the Windows version of
PHP has built-in support for this extension. Enabling the XML extension also
enables PHP DOM. DOM is now a systems requirement.
Image library
An image library for PHP such as the GD library is a required extension in
Drupal 9 and higher, and is needed for image manipulation (resizing user
pictures, image and image cache modules). ImageMagick is also supported for
basic image manipulations in Drupal core but there is much less support from
contributed modules.
OpenSSL
The PHP OpenSSL extension is recommended to allow Drupal to make
outgoing requests using HTTPS and is required when using the Update
Manager. Read PHP OpenSSL requirements for more information.
JSON
Drupal 9 and higher require PHP compiled with JSON. JSON support is
normally compiled as part of PHP core, but in case you're getting errors like
PHP Fatal error: Call to undefined function Drupal\\Component\\Serialization\\
json_encode() in core/lib/Drupal/Component/Serialization/Json.php try adding
the JSON extension.
cURL
The PHP cURL extension is required for automated testing in Drupal 9 and
higher, as well as Aggregator and some contributed modules. Many Linux
distributions and development stacks will have it enabled by default, but if your
system doesn't either enable it in php.ini (typically on Windows) or install it
using your package manager (typically on Linux).
Mbstring
The PHP mbstring extension provides multibyte specific string functions used
for Drupal installation in other languages except for English and also
multilingual sites in Drupal. It helps deal with multibyte encodings in PHP and
also handles Unicode based encoding like UTF-8 or UCS-2.
PHP configuration settings
Memory requirements
PHP memory requirements can vary significantly depending on the modules in
use on your site. The minimum required memory size is 64MB.
Warning messages will be shown if the PHP configuration does not meet these
requirements. However, while these values may be sufficient for a default
Drupal installation, a production site with a number of commonly used modules
enabled could require more memory. Typically 128 MB or 256 MB are found in
production systems. Some installations may require much more, especially with
media-rich implementations. If you are using a hosting service it is important to
verify that your host can provide sufficient memory for the set of modules you
are deploying or may deploy in the future. (See the Increase PHP memory
limit page in the Troubleshooting FAQ for additional information on modifying
the PHP memory limit.)
.htaccess settings
Some of the memory settings are contained in the default .htaccess file that
ships with Drupal, so you shouldn't need to set them explicitly. Note, however,
that setting PHP configuration options from .htaccess only works under the
following conditions:

 With Apache (or a compatible webserver)


 If the .htaccess file is actually read, i.e. AllowOverride All in the main
Apache configuration (usually httpd.conf) is enabled
 If PHP is installed as an Apache module
In some shared hosting environments, access to these settings is restricted. If
you cannot make these changes yourself, please ask your hosting provider to
adjust them for you.

Other interfaces
See the PHP manual for how to change configuration settings for other
interfaces to PHP.
Xdebug
If using Xdebug:
Setting: xdebug.show_exception_trace = 0
Reason: Could cause Drupal's installer to crash.
Using Xdebug with Drupal 9:
Setting: xdebug.collect_params = ?
Reason:Setting xdebug.collect_params too high will prevent Drupal 9 from
installing and working properly.
Setting:xdebug.max_nesting_level = 256
Reason:Using the default max_nesting_level of 100 (in xdebug versions < 2.3)
causes some pages to crash.
PHP from different sources
Drupal is designed to work with PHP as distributed on PHP.net. Every effort is
made to make it work with PHP versions from other sources but this is only
done on a best effort basis. In particular, Suhosin is known to break certain
features; and some operating systems move core components into other
packages.
PHP requirements details
See the phpinfo() page on Drupal.org to learn how to use Phpinfo to get the
details of your system. For example, Phpinfo will tell you if you have a database
already installed and what versions of PHP, MySQL, etc. your system is
running. Phpinfo will also tell you what PHP variables are set as well as many
other helpful things.
It is often possible to update to a newer version of PHP that ships with your
Linux distribution. Please read the documentation for your Linux distribution.

Some notable points

 Be aware of the limitations of 32-bit PHP.


 The Drupal 9 Update manager can install/update modules and themes via
SSH if the required libraries have been installed on the server. (On
Debian the package is named "libssh2-php".)
 If the native opcache is enabled, settings opcache.save_comments must
be enabled (set to 1 which is the default), otherwise Annotations will not
be saved/loaded. 
INTRODUCTION

The purpose of testing is to discover errors. Testing is the process of trying to


discover every conceivable fault or weakness in a work product. It provides a
way to check the functionality of components, sub-assemblies, assemblies
and/or a finished product. It is the process of exercising software with the intent
of ensuring that the software system meets its requirements and user
expectations and does not fail in an unacceptable manner. There are various
types of test. Each test type addresses a specific testing requirement.

Testing Objectives

 All field entries must work properly.


 Pages must be activated from the identified link.
 The entry screen, messages and responses must not be delayed.
Features to be tested

 Verify that the entries are of the correct format.


 No duplicate entries should be allowed.
 All links should take the user to the correct page.

TYPES OF TESTING

Testing performs a very critical role for quality assurance and for
ensuring the reliability of the software. Some types of testing that are used in
this project are as follow:

 Walkthroughs and Inspections


 Unit Testing
 Integration Testing
 Validation Testing
 System Testing
 User Acceptance Testing
Walkthroughs and Inspections

Walkthroughs and Inspections were used systematically to examine the


product throughout the life cycle. A team of reviewers periodically reviewed the
product.

Walkthroughs were conducted once in every 15 days in order to continuously


monitor the status of the product developed. Suggestions offered were
implemented and errors found were corrected.

The code is validated and checked to ensure that all the coding conventions ere
followed properly. Each module was individually validated and the errors were
corrected. After integration of the whole site, it was launched for a minimal set
of inputs and inspections were carried out, Testing involve two phases-Units
testing and Integration Testing.

Unit Testing

Unit testing concentrates on each unit of the system to be implemented.


The developer at the module level carries this out and this testing is white-box
oriented. The individual mappings are tested to ensure that the data properly
flows into and out of the system under test. Here each of the forms is tested one
by one. All the validations of the forms are done here.

In our system, the modules of the system are tested separately. Unit
testing has been successfully handled. The data was given to each module in all
respects and has been found working properly.

Integration Testing

Integration testing is systematic technique for constructing the program


structure, while conducting test to recover errors associate with interfacing. In
this case all the modules are combined and given the test data. The combined
modules work successfully without any side effect on other programs and
everything was found working fine.

Validation Testing

At the culmination of integration testing, software is completely


assembled as a package. Validation succeeds when the software functions in a
manner that is reasonably expected by the customer. Software validation is
achieved through a series of black box tests that demonstrates conformity with
requirements.
Deviation or errors discovered at this project is corrected prior to the
completion of the project with the help of the user by negotiating to establish a
method for resolving deficiencies.

Various validation tests have been applied in this project. A separate


function itself has been written to facilitate easy validation checking. Whenever
validation checking is needed, the function is called. The purpose of defining a
separate function is to facilitate the easy understanding and also to avoid
repetition of the same code in different modules. Hence, validation checking is
needed in all the places where the user enters some input. It is easier to call the
function whenever necessary. If any invalid data is entered by the user it
prompts the mistake and requests the user to enter the valid data. Thus the
proposed system has been tested by using validation testing.

System Testing

System testing is a Black box testing performed by test-team. At the start


of the system testing is configured in controlled environment. The purpose of
the system testing is to validate and application’s accuracy and completeness in
performing the function as designed. During the completion, of integration
testing, system testing is started. Before system testing, all unit and integration
test results are reviewed by software quality assurance to ensure all problems
have been resolved. For higher level of testing it is important to understand
unresolved problems that originate at unit and integration test level.

User Acceptance Testing

User acceptance of the system is a key factor for the success of any
system. The system under consideration is tested for user acceptance by
constantly keeping in touch with prospective system and user at the time of
developing and making changes whenever required.

TEST PLAN
The test plan outlines the entire testing process and includes the individual
test cases. To develop a solid test plan, it is necessary to systematically explore
the program to ensure converge is through but not unnecessary repetitive. A
formal test plan establishes a testing process that does not depend upon
accidental, random testing.

Testing, like development, can easily become a task that perpetuates


itself. As such, the application specification, and subsequently the test plan,
should define the minimum acceptable quality to ship the application.

Before starting to code, test cases are designed and their outcome is found out
manually. The outcome of the program with these test cases as input is noted
and compared with the corresponding manual result. Any mismatch depicts an
error. Ideally, the developer or tester would test all the cases for successful
execution, which would result in an error free program. But due top cost for
successful execution, which would result in an error free program. But due to
cost and effort needed to generate a test case, time consumed to execute the
program with all the test cases as input and the time needed to evaluate the
results is intimidating. Hence practical testing rests on two fundamental goal-
maximize the number errors detected and minimize the number of test cases.

Code

Account Controller

<?Php
Class Accountcontroller Extends Zend_Controller_Action
{
Protected $_Redirector = Null;
Protected $_Dbadapter = Null;
Public Function Init()
{
$Registry = Zend_Registry::Getinstance();
$This->_Dbadapter = $Registry->Dbadapter;
$This->_Redirector = $This->_Helper->Gethelper("Redirector");
If (Empty($This->View->Adminidentity)) {
$This->_Redirector->Gotosimple("Index", "Auth", "Admin");
Exit();
} Else {
$Identity = $This->View->Adminidentity;
$Usertype = $Identity->Usertype;
If ($Usertype != "C") {
Default_Models_Adminauth::Destroy();
$This->_Redirector->Gotosimple("Index", "Auth", "Admin");
Exit();
}
}
}

Public Function Indexaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

$Identity = $This->View->Adminidentity;
$Username = $Identity->Username;

#Post Process
$Accounts = $Claimhistory = Array();
$Where = " And A.Usertype = 'C' And C.Insurecode = '".
$Username."'";
$Accounts = $Commonobj->Getallcustomers($Where);

$Where = " And Ch.Insid = '".$Accounts[0]->Insid."'";


$Claimhistory = $Commonobj->Getallclaimhistory($Where);

$This->View->Accounts = $Accounts;
$This->View->Claimhistory = $Claimhistory;
$This->View->Msg = Str_Replace("_", " ", $_Get["Msg"]);
}

Public Function Addclaimaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Variables
$Errormsg = '';
$Info = Array();
#Post Process
If($This->Getrequest()->Ispost()) {
$Info = $_Post;

$Info['Cimage1'] = '';
$Info['Cimage2'] = '';
$Info['Cimage3'] = '';
If(!Empty($_Files["Imagepath1"]["Tmp_Name"])) {
If($_Files["Imagepath1"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try Another
Image On Attach 1";
} Else {
If(Empty($_Files["Imagepath1"]["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 1";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath1"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath1"]["Size"] >
500000) {
$Errormsg = "Sorry, Your File Is
Too Large On Attach 1";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath1"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage1'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry, There
Was An Error Uploading Your File On Attach 1";
}
}
}
}
}

If(Empty($Errormsg)) {
If(!Empty($_Files["Imagepath2"]["Tmp_Name"])) {
If($_Files["Imagepath2"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try
Another Image On Attach 2";
} Else {
If(Empty($_Files["Imagepath2"]
["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 2";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath2"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath2"]["Size"]
> 500000) {
$Errormsg = "Sorry, Your
File Is Too Large On Attach 2";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath2"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage2'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry,
There Was An Error Uploading Your File On Attach 2";
}
}
}
}
}
}

If(Empty($Errormsg)) {
If(!Empty($_Files["Imagepath3"]["Tmp_Name"])) {
If($_Files["Imagepath3"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try
Another Image On Attach 3";
} Else {
If(Empty($_Files["Imagepath3"]
["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 3";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath3"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath3"]["Size"]
> 500000) {
$Errormsg = "Sorry, Your
File Is Too Large On Attach 3";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath3"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage3'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry,
There Was An Error Uploading Your File On Attach 3";
}
}
}
}
}
}

If(Empty($Errormsg)) {
$Identity = $This->View->Adminidentity;
$Userid = $Identity->Userid;

$Info['Insid'] = $_Get['Insid'];
$Info['Userid'] = $Userid;
$Createinfo = $Commonobj-
>Insertclaimhistory($Info);
$This->_Redirector-
>Gotosimple('Index','Account','Admin', Array('Msg' =>
'Claim_Created_Successfully'));
}
}

$Where = " And A.Usertype = 'C' And C.Insid = '".$_Get['Insid']."'";


$Accounts = $Commonobj->Getallcustomers($Where);

$This->View->Accounts = $Accounts;
$This->View->Errormsg = $Errormsg;
$This->View->Info = $Info;
}

}
Auth Controller
<?Php
Class Authcontroller Extends Zend_Controller_Action
{
Protected $_Redirector = Null;

Public Function Init()


{
$This->_Redirector = $This->_Helper->Gethelper('Redirector');
$This->_User = Default_Models_Adminauth::Getidentity();
If($This->_User->Userid)
{
$Usertype = $This->_User->Usertype;
If($Usertype == 'A')
$This->_Redirector-
>Gotosimple('Index','Customers','Admin');
If($Usertype == 'C')
$This->_Redirector-
>Gotosimple('Index','Account','Admin');
Exit;
}
}

Public Function Indexaction()


{
$Request = $This->Getrequest();
$_Post = $Request->Getpost();
$_Get = $Request->Getparams();

#Getting Objects
$Commonobj = New Default_Models_Common();

$This->View->Pagetitle = "Administrator Login";

$Form = New Default_Form_Auth();


If ($Request->Ispost()) {

If ($Form->Isvalid($_Post)) {
$_Post["Useremail"] = Trim($_Post["Useremail"]);
$_Post["Password"] = Trim($_Post["Password"]);

$Auth = New
Default_Models_Adminauth($_Post["Useremail"],$_Post["Password"]);
If ($Auth->Authenticate()) {
$This->_User =
Default_Models_Adminauth::Getidentity();
If($This->_User->Userid)
{
$Usertype = $This->_User-
>Usertype;
If($Usertype == 'A')
$This->_Redirector-
>Gotosimple('Index','Customers','Admin');
If($Usertype == 'C')
$This->_Redirector-
>Gotosimple('Index','Account','Admin');
}
Exit;
} Else {
$This->View->Errormessage = "Invalid
Login";
}
}
}

$This->View->Form = $Form;
$This->View->Succmsg = Isset($_Get['Msg']) ? $_Get['Msg'] : '';
}
}
Customers Controller
<?Php
Class Customerscontroller Extends Zend_Controller_Action
{
Protected $_Redirector = Null;
Protected $_Dbadapter = Null;
Public Function Init()
{
$Registry = Zend_Registry::Getinstance();
$This->_Dbadapter = $Registry->Dbadapter;
$This->_Redirector = $This->_Helper->Gethelper("Redirector");
If (Empty($This->View->Adminidentity)) {
$This->_Redirector->Gotosimple("Index", "Auth", "Admin");
Exit();
} Else {
$Identity = $This->View->Adminidentity;
$Usertype = $Identity->Usertype;
If ($Usertype != "A") {
Default_Models_Adminauth::Destroy();
$This->_Redirector->Gotosimple("Index", "Auth", "Admin");
Exit();
}
}
}

Public Function Newaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();
#Variables
$Errormsg = '';
$Info = Array();

#Post Process
If(Isset($_Post['Email'])) {
$Info = $_Post;
$Createinfo = $Commonobj->Insertcustomers($Info);

$Emailinfo = Array(
"Fromemail" => $This->View->Testemail,

"Fromname" => 'Admin',

"Toemail" => $_Post['Email'],

"Subject" =>"Tvs Insurance : Your Insurance Account


Created Successfully",
"Texthtml" =>"Dear <Strong>".
$Info['Customername']."</Strong>,<Br><Br>Your Insurance Account Created
Successfully. Login Details<Br><Br>
<Strong>Username :</Strong> ".$Createinfo['Insurecode']."<Br>

<Strong>Password :</Strong> ".


$Createinfo['Randpassword']."<Br><Br>
Regards,<Br>
<Strong>Insurance System</Strong>",

);
$Output = $Commonobj->Sendtestemail($Emailinfo);

$This->_Redirector-
>Gotosimple('Index','Customers','Admin', Array('Msg' =>
'Customer_Account_Created_Successfully'));
}

#Setting Data To View Page


$This->View->Errormsg = $Errormsg;
$This->View->Info = $Info;
}

Public Function Indexaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Post Process
$Where = " And A.Usertype = 'C' ";
$Accounts = $Commonobj->Getallcustomers($Where);

$This->View->Accounts = $Accounts;
$This->View->Msg = Str_Replace("_", " ", $_Get["Msg"]);
}

Public Function Viewaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Post Process
$Where = " And A.Usertype = 'C' And C.Insid = '".$_Get['Insid']."'";
$Accounts = $Commonobj->Getallcustomers($Where);
$Where = " And Ch.Insid = '".$_Get['Insid']."'";
$Claimhistory = $Commonobj->Getallclaimhistory($Where);

$This->View->Accounts = $Accounts;
$This->View->Claimhistory = $Claimhistory;
$This->View->Msg = Str_Replace("_", " ", $_Get["Msg"]);
}

Public Function Infoaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Post Process
$Accounts = $Claimhistory = Array();
If($This->Getrequest()->Ispost()) {
$Where = " And A.Usertype = 'C' And C.Insurecode = '".
$_Post['Inscode']."'";
$Accounts = $Commonobj->Getallcustomers($Where);

$Where = " And Ch.Insid = '".$Accounts[0]->Insid."'";


$Claimhistory = $Commonobj-
>Getallclaimhistory($Where);
}
$This->View->Accounts = $Accounts;
$This->View->Claimhistory = $Claimhistory;
$This->View->Msg = Str_Replace("_", " ", $_Get["Msg"]);
}

Public Function Rejectclaimaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Post Process
$Identity = $This->View->Adminidentity;
$Userid = $Identity->Userid;
$Info = Array(
"Insid" => $_Get['Insid'],
"Userid" => $Userid,
);
$Accounts = $Commonobj->Rejectclaim($Info);
$This->_Redirector->Gotosimple('Index','Customers','Admin',
Array('Msg' => 'Clamin_Rejected_Successfully'));

Public Function Approveclaimaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();
$Identity = $This->View->Adminidentity;
$Userid = $Identity->Userid;
$_Post['Userid'] = $Userid;
$Commonobj->Approveclaim($_Post);
Echo Json_Encode(Array("Code" => 200, 'Msg' => 'Claim
Approved Successfully'));
Exit;
}

Public Function Addclaimaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Variables
$Errormsg = '';
$Info = Array();
#Post Process
If($This->Getrequest()->Ispost()) {
$Info = $_Post;

$Info['Cimage1'] = '';
$Info['Cimage2'] = '';
$Info['Cimage3'] = '';
If(!Empty($_Files["Imagepath1"]["Tmp_Name"])) {
If($_Files["Imagepath1"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try Another
Image On Attach 1";
} Else {
If(Empty($_Files["Imagepath1"]["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 1";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath1"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath1"]["Size"] >
500000) {
$Errormsg = "Sorry, Your File Is
Too Large On Attach 1";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath1"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage1'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry, There
Was An Error Uploading Your File On Attach 1";
}
}
}
}
}

If(Empty($Errormsg)) {
If(!Empty($_Files["Imagepath2"]["Tmp_Name"])) {
If($_Files["Imagepath2"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try
Another Image On Attach 2";
} Else {
If(Empty($_Files["Imagepath2"]
["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 2";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath2"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath2"]["Size"]
> 500000) {
$Errormsg = "Sorry, Your
File Is Too Large On Attach 2";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath2"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage2'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry,
There Was An Error Uploading Your File On Attach 2";
}
}
}
}
}
}

If(Empty($Errormsg)) {
If(!Empty($_Files["Imagepath3"]["Tmp_Name"])) {
If($_Files["Imagepath3"]["Error"] == 1 ) {
$Errormsg = "Error In Image Try
Another Image On Attach 3";
} Else {
If(Empty($_Files["Imagepath3"]
["Name"])) {
$Errormsg = "Error In Image Try
Another Image On Attach 3";
} Else{
$Target_Filename =
Date('Ymdhis').'_'.Rand(100,999).'_'.$_Files["Imagepath3"]["Name"];
$Target_Path = $This->View-
>Uploadpath.'/Posts/'.$Target_Filename;
If ($_Files["Imagepath3"]["Size"]
> 500000) {
$Errormsg = "Sorry, Your
File Is Too Large On Attach 3";
} Else {
If
(Move_Uploaded_File($_Files["Imagepath3"]["Tmp_Name"], $Target_Path)) {
$Info['Cimage3'] =
$Target_Filename;
} Else {
$Errormsg = "Sorry,
There Was An Error Uploading Your File On Attach 3";
}
}
}
}
}
}

If(Empty($Errormsg)) {
$Identity = $This->View->Adminidentity;
$Userid = $Identity->Userid;

$Info['Insid'] = $_Get['Insid'];
$Info['Userid'] = $Userid;
$Createinfo = $Commonobj-
>Insertclaimhistory($Info);
$This->_Redirector-
>Gotosimple('Index','Customers','Admin', Array('Msg' =>
'Claim_Created_Successfully'));
}
}

$Where = " And A.Usertype = 'C' And C.Insid = '".$_Get['Insid']."'";


$Accounts = $Commonobj->Getallcustomers($Where);

$This->View->Accounts = $Accounts;
$This->View->Errormsg = $Errormsg;
$This->View->Info = $Info;
}

}
Error Controller
<?Php
Class Errorcontroller Extends Zend_Controller_Action
{

Public Function Erroraction()


{

$Errors = $This->_Getparam('Error_Handler');

Switch ($Errors->Type) {
Case Zend_Controller_Plugin_Errorhandler::Exception_No_Controller:
Case Zend_Controller_Plugin_Errorhandler::Exception_No_Action:

// 404 Error -- Controller Or Action Not Found


$This->Getresponse()->Sethttpresponsecode(404);
$This->View->Message = 'Page Not Found';
Break;
Default:
// Application Error
$This->Getresponse()->Sethttpresponsecode(500);
$This->View->Message = 'Application Error';
Break;
}
$This->View->Exception = $Errors->Exception;
$This->View->Request = $Errors->Request;

}
Index Controller
<?Php

Class Indexcontroller Extends Zend_Controller_Action


{
Protected $_Redirector = Null;
Protected $_Dbadapter = Null;

Public Function Init()


{
$Registry = Zend_Registry::Getinstance();
$This->_Dbadapter = $Registry->Dbadapter;
$This->_Redirector = $This->_Helper->Gethelper('Redirector');

Public Function Indexaction()


{
$This->_Redirector->Gotosimple('Index','Auth','Admin');
}
Public Function Noaccessaction()
{
$_Session['Vberrormsg'] = "You Are Not Authorized To Acsees
The Requested Page.";
$This->_Redirector->Gotosimple('Noaccess','Index','Admin',
Array());
}

Public Function Logoutaction(){


Default_Models_Adminauth::Destroy();
$This->_Redirector->Gotosimple('Index','Auth','Admin');
}

Public Function Getdistrictsaction()


{
#Getting Request Info
$Request = $This->Getrequest();
$_Get = $Request->Getparams();
$_Post = $Request->Getpost();

#Getting Objects
$Commonobj = New Default_Models_Common();

#Getting List
$Districts = $Commonobj->Getalldistricts(" And D.Stateid = '".
$_Post['Stateid']."' ");
If($Districts) {
Foreach($Districts As $Val) {
Echo '<Option Value="'.$Val-
>Districtid.'">'.Ucfirst($Val->Districtname).'</Option>';
}
}
Exit;
}

}
Scripts
<?Php
$Controller = Zend_Controller_Front::Getinstance()->Getrequest()-
>Getcontrollername();
$Action = Zend_Controller_Front::Getinstance()->Getrequest()-
>Getactionname();
#Echo $This->Adminidentity->Usertype; Exit;
?>
<?Php If($This->Adminidentity->Userid ){
$Commonobj = New Default_Models_Common();
$Where = " And A.Usertype = 'C' And C.Userid = '".$This-
>Adminidentity->Userid."' ";
$Accountsinfo = $Commonobj->Getallcustomers($Where);
$Accountsinfo = $Accountsinfo[0];
}
?>
<!Doctype Html>
<Html Class="No-Js">
<Head>
<Title>My Insurance System</Title>
<Meta Http-Equiv="Content-Type" Content="Text/Html;
Charset=Utf-8" />
<Base Href="<?Php Echo $This->Httphost; ?>" />
<Link Rel="Stylesheet" Href="Html/Css/Bootstrap.Min.Css" />
<Link Rel="Stylesheet" Href="Html/Font-Awesome/4.5.0/Css/Font-
Awesome.Min.Css" />
<Link Rel="Stylesheet" Href="Html/Css/Fonts.Googleapis.Com.Css" />
<Link Rel="Stylesheet" Href="Html/Css/Ace.Min.Css" Class="Ace-Main-
Stylesheet" Id="Main-Ace-Style" />
<Link Rel="Stylesheet" Href="Html/Css/Ace-Skins.Min.Css" />
<Link Rel="Stylesheet" Href="Html/Css/Ace-Rtl.Min.Css" />
<Script Src="Html/Js/Jquery-2.1.4.Min.Js"></Script>
<Script Src="Html/Js/Ace-Extra.Min.Js"></Script>
<?Php If($Controller == "Customers") { ?>
<Link Rel="Stylesheet" Href="Html/Css/Bootstrap-
Datepicker3.Min.Css" />
<Script Src="Html/Js/Bootstrap-Datepicker.Min.Js"></Script>
<?Php } ?>
<Style>
.Table-Striped>Tbody>Tr:Nth-Of-Type(Even) {
Background-Color: #F9f9f9;
}

/* Absolute Center Spinner */


.Loading {
Position: Fixed;
Z-Index: 999;
Height: 2em;
Width: 2em;
Overflow: Show;
Margin: Auto;
Top: 0;
Left: 0;
Bottom: 0;
Right: 0;
}

/* Transparent Overlay */
.Loading:Before {
Content: '';
Display: Block;
Position: Fixed;
Top: 0;
Left: 0;
Width: 100%;
Height: 100%;
Background: Radial-Gradient(Rgba(20, 20, 20,.8), Rgba(0, 0, 0, .8));

Background: -Webkit-Radial-Gradient(Rgba(20, 20, 20,.8), Rgba(0, 0, 0,.8));


}

/* :Not(:Required) Hides These Rules From Ie9 And Below */


.Loading:Not(:Required) {
/* Hide "Loading..." Text */
Font: 0/0 A;
Color: Transparent;
Text-Shadow: None;
Background-Color: Transparent;
Border: 0;
}

.Loading:Not(:Required):After {
Content: '';
Display: Block;
Font-Size: 10px;
Width: 1em;
Height: 1em;
Margin-Top: -0.5em;
-Webkit-Animation: Spinner 1500ms Infinite Linear;
-Moz-Animation: Spinner 1500ms Infinite Linear;
-Ms-Animation: Spinner 1500ms Infinite Linear;
-O-Animation: Spinner 1500ms Infinite Linear;
Animation: Spinner 1500ms Infinite Linear;
Border-Radius: 0.5em;
-Webkit-Box-Shadow: Rgba(255,255,255, 0.75) 1.5em 0 0 0,
Rgba(255,255,255, 0.75) 1.1em 1.1em 0 0, Rgba(255,255,255, 0.75) 0 1.5em 0
0, Rgba(255,255,255, 0.75) -1.1em 1.1em 0 0, Rgba(255,255,255, 0.75) -1.5em
0 0 0, Rgba(255,255,255, 0.75) -1.1em -1.1em 0 0, Rgba(255,255,255, 0.75) 0 -
1.5em 0 0, Rgba(255,255,255, 0.75) 1.1em -1.1em 0 0;
Box-Shadow: Rgba(255,255,255, 0.75) 1.5em 0 0 0, Rgba(255,255,255, 0.75)
1.1em 1.1em 0 0, Rgba(255,255,255, 0.75) 0 1.5em 0 0, Rgba(255,255,255,
0.75) -1.1em 1.1em 0 0, Rgba(255,255,255, 0.75) -1.5em 0 0 0,
Rgba(255,255,255, 0.75) -1.1em -1.1em 0 0, Rgba(255,255,255, 0.75) 0 -1.5em
0 0, Rgba(255,255,255, 0.75) 1.1em -1.1em 0 0;
}

/* Animation */

@-Webkit-Keyframes Spinner {
0% {
-Webkit-Transform: Rotate(0deg);
-Moz-Transform: Rotate(0deg);
-Ms-Transform: Rotate(0deg);
-O-Transform: Rotate(0deg);
Transform: Rotate(0deg);
}
100% {
-Webkit-Transform: Rotate(360deg);
-Moz-Transform: Rotate(360deg);
-Ms-Transform: Rotate(360deg);
-O-Transform: Rotate(360deg);
Transform: Rotate(360deg);
}
}
@-Moz-Keyframes Spinner {
0% {
-Webkit-Transform: Rotate(0deg);
-Moz-Transform: Rotate(0deg);
-Ms-Transform: Rotate(0deg);
-O-Transform: Rotate(0deg);
Transform: Rotate(0deg);
}
100% {
-Webkit-Transform: Rotate(360deg);
-Moz-Transform: Rotate(360deg);
-Ms-Transform: Rotate(360deg);
-O-Transform: Rotate(360deg);
Transform: Rotate(360deg);
}
}
@-O-Keyframes Spinner {
0% {
-Webkit-Transform: Rotate(0deg);
-Moz-Transform: Rotate(0deg);
-Ms-Transform: Rotate(0deg);
-O-Transform: Rotate(0deg);
Transform: Rotate(0deg);
}
100% {
-Webkit-Transform: Rotate(360deg);
-Moz-Transform: Rotate(360deg);
-Ms-Transform: Rotate(360deg);
-O-Transform: Rotate(360deg);
Transform: Rotate(360deg);
}
}
@Keyframes Spinner {
0% {
-Webkit-Transform: Rotate(0deg);
-Moz-Transform: Rotate(0deg);
-Ms-Transform: Rotate(0deg);
-O-Transform: Rotate(0deg);
Transform: Rotate(0deg);
}
100% {
-Webkit-Transform: Rotate(360deg);
-Moz-Transform: Rotate(360deg);
-Ms-Transform: Rotate(360deg);
-O-Transform: Rotate(360deg);
Transform: Rotate(360deg);
}
}
</Style>
</Head>
<Body Class="No-Skin">
<Div Id="Navbar" Class="Navbar Navbar-Default Ace-Save-State">
<Div Class="Navbar-Container Ace-Save-State" Id="Navbar-Container">
<Button Type="Button" Class="Navbar-Toggle Menu-Toggler Pull-
Left" Id="Menu-Toggler" Data-Target="#Sidebar">
<Span Class="Sr-Only">Toggle Sidebar</Span>
<Span Class="Icon-Bar"></Span>
<Span Class="Icon-Bar"></Span>
<Span Class="Icon-Bar"></Span>
</Button>
<Div Class="Navbar-Header Pull-Left">
<A Href="Javascript:Void(0);" Class="Navbar-Brand">
<Small><I Class="Fa Fa-Leaf"></I> Insurance System </Small>
</A>
</Div>

<?Php If($This->Adminidentity->Userid ){ ?>


<Div Class="Navbar-Buttons Navbar-Header Pull-Right">
<A Class="Scshowfullloading Navbar-Brand" Href="Index/Logout"
Style="Color: #Ffff;">
<Small><I Class="Ace-Icon Fa Fa-Power-
Off"></I> Logout</Small>
</A>
</Div>
<?Php } ?>
</Div>
</Div>
<Div Class="Main-Container Ace-Save-State" Id="Main-Container" <?Php
If(!$This->Adminidentity->Userid) Echo 'Style="Background-
Color:Transparent;"'; ?>>
<Script Type="Text/Javascript">
Try {
Ace.Settings.Loadstate('Main-Container')
} Catch (E) {}
</Script>
<?Php If($This->Adminidentity->Userid && ($This->Adminidentity-
>Usertype == "A" || $This->Adminidentity->Usertype == "C" )){ ?>
<Div Id="Sidebar" Class="Sidebar Responsive Ace-Save-State"
Style="Width: 190px !Important;">
<Script Type="Text/Javascript">
Try {
Ace.Settings.Loadstate('Sidebar')
} Catch (E) {}
</Script>
<Ul Class="Nav Nav-List">
<?Php If($This->Adminidentity->Usertype == "A") { ?>
<Li Class="<?Php If($Controller == 'Customers' &&
$Action == 'New') Echo " Open Active "; ?> ">
<A Class="Scshowfullloading"
Href="Customers/New">
<I Class="Menu-Icon Fa Fa-Desktop"></I>
New Policy
</A>
</Li>
<Li Class="<?Php If($Controller == 'Customers' &&
$Action == 'Index') Echo " Open Active "; ?> ">
<A Class="Scshowfullloading"
Href="Customers/Index">
<I Class="Menu-Icon Fa Fa-Desktop"></I>
Manage Policy
</A>
</Li>
<Li Class="<?Php If($Controller == 'Customers' &&
$Action == 'Info') Echo " Open Active "; ?> ">
<A Class="Scshowfullloading1"
Href="Customers/Info">
<I Class="Menu-Icon Fa Fa-Desktop"></I>
Policy Details
</A>
</Li>
<?Php } ?>
<?Php If($This->Adminidentity->Usertype == "C") { ?>
<Li <?Php If($Controller == 'Account' && $Action ==
'Index') Echo " Open Active "; ?> >
<A Class="Scshowfullloading1" Href="<?Php
If($This->Adminidentity->Userblock == 1) { Echo "Javascript:Void(0);"; }
Else Echo "Account/Index"; ?>">
<I Class="Menu-Icon Fa Fa-Desktop"></I>
Policy Details
</A>
</Li>
<Li <?Php If($Controller == 'Account' && $Action ==
'Addclaim') Echo " Open Active "; ?>>
<A Class="Scshowfullloading1" Href="<?Php
If($This->Adminidentity->Userblock == 1) { Echo "Javascript:Void(0);"; }
Else Echo "Account/Addclaim?Insid=".$Accountsinfo->Insid;?>">
<I Class="Menu-Icon Fa Fa-Desktop"></I>
Add Claim
</A>
</Li>
<?Php } ?>
<Li>
<A Class="Scshowfullloading"
Href="Index/Logout">
<I Class="Menu-Icon Fa Fa-Cog"></I> Logout
</A>
</Li>
<Div Class="Sidebar-Toggle Sidebar-Collapse" Id="Sidebar-Collapse">
<I Id="Sidebar-Toggle-Icon" Class="Ace-Icon Fa Fa-Angle-Double-
Left Ace-Save-State" Data-Icon1="Ace-Icon Fa Fa-Angle-Double-Left" Data-
Icon2="Ace-Icon Fa Fa-Angle-Double-Right"></I>
</Div>
</Ul>
</Div>
<?Php } ?>
<Div Class="Main-Content" <?Php If($This->Adminidentity->Userid)
Echo 'Style="Background-Color: Transparent;"'; ?>>
<Div Class="Main-Content-Inner">
<Div Class="Page-Content">
<?Php Echo $This->Layout()->Content; ?>
</Div>
</Div>
</Div>
</Div>
<Script Type="Text/Javascript">
If ('Ontouchstart' In Document.Documentelement) {
Document.Write("<Script
Src='Html/Js/Jquery.Mobile.Custom.Min.Js'>" + "<" + "/Script>");
}
</Script>
<Script Type="Text/Javascript"
Src="Html/Js/Bootstrap.Min.Js"></Script>
<Script Type="Text/Javascript" Src="Html/Js/Jquery-
Ui.Custom.Min.Js"></Script>
<Script Type="Text/Javascript" Src="Html/Js/Jquery.Ui.Touch-
Punch.Min.Js"></Script>
<Script Type="Text/Javascript" Src="Html/Js/Ace-
Elements.Min.Js"></Script>
<Script Type="Text/Javascript" Src="Html/Js/Ace.Min.Js"></Script>
<Script Type="Text/Javascript"
Src="Html/Js/Jquery.Validate.Js"></Script>
<Script Type="Text/Javascript"
Src="Html/Js/Validate_Custom.Js"></Script>
<Script>
//Number Key Validation
Var Specialkeys = New Array();
Specialkeys.Push(8); //Backspace
Specialkeys.Push(46); //Delete
Specialkeys.Push(36); //Home
Specialkeys.Push(35); //End
Specialkeys.Push(37); //Left
Specialkeys.Push(39); //Right
Var Isnumber = Function(E) {
Var Keycode = E.Keycode == 0 ? E.Charcode : E.Keycode;
If(Keycode == 46)
Return Ret;
Var Ret = ((Keycode >= 48 && Keycode <= 57) ||
(Specialkeys.Indexof(E.Keycode) != -1 && E.Charcode != E.Keycode));
Return Ret;
}

$(Document).On('Click', '.Scshowfullloading', Function(E){


$('#Fullloading').Show();
});

$( Document ).Ready(Function() {
$('#Sidebar-Collapse').Hide();
<?Php If($Controller == "Customers") { ?>
$( ".Datepicker" ).Datepicker({
Format: 'Yyyy-Mm-Dd',
Showothermonths: True,
Selectothermonths: False,
Autoclose: 'True',
});
<?Php } ?>
$(".Allownumericwithoutdecimal").On("Keypress Keyup
Blur",Function (Event) {
$(This).Val($(This).Val().Replace(/[^\D].+/, ""));
If ((Event.Which < 48 || Event.Which > 57)) {
Event.Preventdefault();
}
});

});

</Script>
<Div Class="Loading" Id="Fullloading" Style="Display:
None;">Loading&#8230;</Div>
<?Php If($This->Adminidentity->Userid && ($This->Adminidentity-
>Usertype != "A" )){ ?>
<Script>
$(Window).Bind("Load", Function() {
//Updatenotificationcount();
});
</Script>
<?Php } ?>

</Body>
</Html>
Helpers
GetLeftNav
<?php
class Admin_View_Helper_GetLeftNav extends
Zend_View_Helper_Abstract
{
public function getLeftNav(){
?>
<div id="sidebar">
<ul>
<li><h3><a href="/admin/index"
class="house">Dashboard</a></h3></li>
<li><h3><a href="/admin/policies"
class="folder_table">Policies</a></h3>
<ul>
<li><a
href="/admin/policies/add" class="addorder">Add Policy</a></li>
</ul>
</li>
<li><h3><a href="/admin/users"
class="user">Users</a></h3>
<ul>
<li><a href="/admin/users/add" class="useradd">Add
user</a></li>
<li><a href="/admin/template/">Mass Mail</a></li>
</ul>
</li>
<li><h3><a href="/admin/orders"
class="folder_table">Orders</a></h3>
<ul>
<li><a href="/admin/orders/"
class="search">Search</a></li>
</ul>
</li>
<li><h3><a href="/admin/iprules/"
class="folder_table">Ban/Unban Ipaddress</a></h3>
<ul>
<li><a href="/admin/iprules/blockipaddress"
class="search">Block Ipaddress</a></li>
</ul>
</li>
<li><h3><a href="/admin/reports/"
class="folder_table">Reports</a></h3>
<ul>
<li><a href="/admin/reports/" class="report_seo">Mail
Sent Report</a></li>
<li><a href="/admin/reports/undelivered"
class="report_seo">Undelivered Mail Report</a></li>
<li><a href="/admin/reports/iptablebanlist"
class="report_seo">Banned IP Addresses</a></li>
<li><a href="/admin/tracking/"
class="report_seo">Tracking Hackers</a></li>
</ul>
</li>
</ul>
</div>
<?
}
}

GetNav
<?php
class Default_View_Helper_GetNav extends Zend_View_Helper_Abstract
{
public function getNav()
{
$front = Zend_Controller_Front::getInstance();
$request = $front->getRequest();
$nav_arr = array('controller'=>$request->controller ,
'action'=>$request->action);
return $nav_arr;
}
}

GetRequestParam
<?php
class Admin_View_Helper_GetRequestParam extends
Zend_View_Helper_Abstract
{
public function getRequestParam(){
$front = Zend_Controller_Front::getInstance();
$request = $front->getRequest();
$req_arr = array('controller'=>$request->controller ,
'action'=>$request->action);
return $req_arr;
}
}

Scripts
Account
Addclaim
<?php
$info = $this->accounts[0];
?>
<style>
.error{
color:red;
}
textarea{
border-radius: 0px;
}
</style>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue" style="text-align:
center;"><strong>Insurance Claim - <?php if(isset($info->insurecode))
echo $info->insurecode; ?></strong></h3>
<?php if($this->errormsg) { ?>
<div class="alert alert-danger">
<strong><?php echo $this->errormsg; ?></strong>
</div>
<?php } ?>
<form method="post" name="claimform"
class="form-horizontal" id="claimform" enctype="multipart/form-data"
>

<div class="form-group">
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right"> Customer name :
</label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info-
>customername)) echo $info->customername; ?>
</div>
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right">Gender : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->gender)) echo
$info->gender; ?>
</div>
</div>
<div class="form-group">
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right"> Mobile : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->mobile))
echo $info->mobile; ?>
</div>
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right"> Email : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->email))
echo $info->email; ?>
</div>

</div>

<h3 class="header smaller lighter


blue"><strong>Claim Details</strong></h3>

<div class="form-group">
<label class="col-sm-2 control-label no-padding-
right"> Query </label>
<div class="col-sm-6">
<textarea name="querycontent"
id="querycontent" class="form-control" placeholder="Query" rows="8"
></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 1 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath1" id="imagepath1" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 2 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath2" id="imagepath2" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 3 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath3" id="imagepath3" class="form-control" >
</div>
</div>

<div class="form-group" id="formsubmit">


<label class="col-sm-3 control-label no-
padding-right" for="save"> </label>
<div class="col-sm-9">
<button class="btn btn-primary"
type="submit">
Add Claim Query
</button>
<a href="<?php echo $this-
>httphost; ?>account/index"><button class="btn btn-danger
scshowfullloading" type="button" >
<i class="ace-icon fa fa-times
bigger-125"></i>
Cancel
</button></a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>

Index
<?php
#Getting Objects
$commonobj = new Default_Models_Common();
$info = $this->accounts[0];
?>
<style>
.error{
color:red;
}
textarea{
border-radius: 0px;
}
</style>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue" style=" text-align:
center;"><strong>Insurance Details - <?php if(isset($info->insurecode))
echo $info->insurecode; ?></strong></h3>
<form method="post" name="insureform"
class="form-horizontal" id="insureform" >
<h3 class="header smaller lighter
blue"><strong>Customer Details</strong></h3>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Customer name : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->customername))
echo $info->customername; ?>
</div>
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right">Gender : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->gender)) echo $info-
>gender; ?>
</div>
</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right"> Mobile : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->mobile)) echo
$info->mobile; ?>
</div>

<label style="font-weight: bold;" class="col-sm-2


control-label no-padding-right"> Email : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->email)) echo
$info->email; ?>
</div>

</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right"> Date of Birth : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->gender)) echo
$info->gender; ?>
</div>
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Address : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->address)) echo
$info->address; ?>
</div>
</div>

<h3 class="header smaller lighter


blue"><strong>Insurance Vehical Details</strong></h3>

<div class="form-group ">


<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right">Vehical Type : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurevehical)) echo
$info->insurevehical; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical Number : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalnumber))
echo $info->vehicalnumber; ?>
</div>
</div>
<div class="form-group ">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical Company : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalcompany))
echo $info->vehicalcompany; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical modal : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->modal)) echo
$info->modal; ?>
</div>

</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical color : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->color)) echo
$info->color; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Manufacture Date : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info-
>manufacturedate)) echo $info->manufacturedate; ?>
</div>

</div>
<div class="form-group ">
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Vehical cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalcost)) echo
$info->vehicalcost; ?>
</div>
</div>

<h3 class="header smaller lighter


blue"><strong>Insurance Details</strong></h3>

<div class="form-group ">


<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Insurance cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurecost)) echo
$info->insurecost; ?>
</div>
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Insurance Cover Cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurecover))
echo $info->insurecover; ?>

</div>
</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Vaild From : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurefrom)) echo
$info->insurefrom; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Vaild To : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insureto)) echo
$info->insureto; ?>
</div>

</div>

<h3 class="header smaller lighter


blue"><strong>Nominee Details</strong></h3>

<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Nominee Name : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->nomineename))
echo $info->nomineename; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Relationship : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->nomineerelation)) echo
$info->nomineerelation; ?>
</div>

</div>
<h3 class="header smaller lighter
blue"><strong>Claim Details</strong></h3>
<div class="form-group">
<div class="col-sm-12">
<a href="<?php echo $this-
>httphost; ?>account/addclaim?insid=<?php echo $info->insid; ?
>"><button class="btn btn-primary scshowfullloading" type="button" >
Add claim query
</button></a>

</div>
<?php if(empty($this->claimhistory)) { ?>
<div class="col-sm-12">
<div class="alert alert-danger">
<strong>Claim details not
found</strong>
</div>
</div>
<?php } else { ?>
<?php if($info->claimstatus == 0) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-success">
<strong>Claim Request
Received</strong>
</div>
</div>
<?php } ?>
<?php if($info->claimstatus == 1) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-success">
<strong>Claim Request Approved on
<?php echo date('d-m-Y', strtotime($info->claimdate));?> with Rs : <?php
echo $info->claimamt; ?></strong>
</div>
</div>
<?php } ?>
<?php if($info->claimstatus == 2) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-danger">
<strong>Claim Request Rejectedon <?
php echo date('d-m-Y', strtotime($info->claimdate));?></strong>
</div>
</div>
<?php } ?>

<div class="col-sm-12" style="padding-top:


15px;">
<div class="row">
<table width="98%" class="table table-
striped table-bordered table-hover">
<thead>
<tr>
<th
class="center">Si.no</th>
<th
class="center">Date</th>
<th
class="center">User</th>
<th
class="center">Query</th>
<th
class="center">Attachements</th>
</tr>
</thead>
<tbody>
<?php $inc = 1; foreach
($this->claimhistory as $mkey=>$cinfo){ #echo "<pre>"; print_r($cinfo);
#exit;
?>
<tr>
<td
class="center"><?php echo $inc; ?></td>
<td><?php echo
date('d-m-Y h:i A', strtotime($cinfo->requested)); ?><br></td>
<td>
<?php echo
ucfirst($cinfo->userName); ?><br>
</td>
<td>
<?php echo
nl2br($cinfo->querycontent); ?><br>
</td>
<td>
<?php if(!
empty($cinfo->attach1)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach1; ?>">Attachement 1</a> |
<?php } ?>
<?php if(!
empty($cinfo->attach2)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach2; ?>">Attachement 2</a> |
<?php } ?>
<?php if(!
empty($cinfo->attach3)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach3; ?>">Attachement 3</a> |
<?php } ?>
</td>
</tr>
<?php $inc++; } ?>
</tbody>
</table>
</div>
</div>
<?php } ?>
</div>
</form>
</div>
</div>
</div>
</div>

<div id="payModal" class="modal fade" role="dialog">


<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-
dismiss="modal">&times;</button>
<h4 class="modal-title" style="color: #428BCA;font-weight:
bold;">Send Claim Money</h4>
</div>
<div class="modal-body">
<div class="field">
<input type="hidden" name="insid" id="insid"
value=""/>
<input type="hidden" name="maxamt" id="maxamt"
value=""/>
<b>Maximum Cover Amount : Rs : <span
id="maxhtml">0.00</span></b><br>
<b>Enter Amount : </b><input type="text"
name="eamount" id="eamount" value="" class="login-inp
allownumericwithoutdecimal" placeholder="Enter Amount"
autocomplete="false">
<p style="color: red;" id="payerr"></p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="return
verifyamount();">Pay Claim</button>
<button type="button" class="btn btn-danger" data-
dismiss="modal">Close</button>
</div>
</div>

</div>
</div>
<script>
var paymodelopen = function(insid, maxamt) {
$('#payerr').html('');
$('#insid').val(insid);
$('#maxamt').val(maxamt);
$('#eamount').val('');
$('#maxhtml').html(maxamt);
$('#payModal').modal({
show: true,
keyboard: false,
backdrop: 'static'
});
}

var verifyamount = function() {


var insid = $('#insid').val();
var eamount= 0;
if($('#eamount').val() != '') {
eamount= parseFloat($('#eamount').val());
}
var maxamt= 0;
if($('#maxamt').val() != '') {
maxamt= parseFloat($('#maxamt').val());
}
$('#payerr').html('');
if(eamount == '') {
$('#payerr').html('Enter the amount');
} else if(eamount > maxamt) {
$('#payerr').html('Maximum claim amount
will be less then or equal to Rs: '+maxamt);
} else {
$('#payModal').modal('hide');
var formData = new FormData();
formData.append('insid', insid);
formData.append('eamount', eamount);
$.ajax({
url: 'customers/approveclaim',
type: 'POST',
data: formData,
async: false,
processData: false,
contentType: false,
beforeSend: function() {
$('#fullloading').show();
},
success: function(resdata){

var response =
JSON.parse(resdata);
if(typeof response
=='object') {
if(response.code ==
200){
}

alert(response.msg);
location.reload();
} else {
alert('Error in
saving');
}
$('#fullloading').hide();
},
error: function(){
alert('Error in saving');
$('#fullloading').hide();
}
});
}

}
</script>
Auth
Index
<style>
.account-container {
background: #f9f9f9 none repeat scroll 0 0;
border: 1px solid #d5d5d5;
border-radius: 5px;
box-shadow: 0 0 2px #dadada, 0 -3px 0 #e6e6e6 inset;
display: block;
margin: 60px auto 0;
width: 380px;
}
.content {
padding: 16px 28px 23px;
}
.clearfix::before, .clearfix::after {
content: "";
display: table;
}
.clearfix::after {
clear: both;
}
.login-actions {
float: left;
margin-bottom: 1.25em;
margin-top: -1em;
width: 100%;
}
.login-fields .field {
margin-bottom: 1.25em;
}
.login-fields input {
background-color: #fdfdfd;
box-shadow: 2px 2px 4px #f1f1f1 inset;
color: #8e8d8d;
display: block;
font-family: "Open Sans";
font-size: 13px;
margin: 0;
padding: 11px 15px 10px 15px;
width: 300px;
}
.login-actions {
float: left;
margin-bottom: 1.25em;
margin-top: -1em;
width: 100%;
}
.error{
color: red;
}
.success{
color: green;
}
</style>
<div class="account-container">
<div class="content clearfix" align="center">
<h1>Sign In</h1>
<form action="" method="post" id="loginform" name="loginform">
<div class="login-fields">
<p>Please provide the login details</p>
<div class="field">
<?=$this->form->useremail ?>
</div>
<div class="field">
<?=$this->form->password ?>
</div>
</div>
<?php if(isset($this->errormessage) && $this->errormessage !=
"") : ?>
<span class="error"><?php echo $this->errormessage;?></span>
<?php endif;?>
<?php if(!empty($this->succmsg)) { ?>
<span class="success"><b>Registeration Successfull</b></span>
<?php } ?>
<br><br>
<div class="login-actions">
<button class="width-35 btn btn-sm btn-primary" type="submit">
<i class="ace-icon fa fa-key"></i>
<span class="bigger-110">Login</span>
</button>&nbsp;&nbsp;&nbsp;
</div>
</form>
</div>
</div>
<script>
window.onload = function() {
var input = document.getElementById("useremail").focus();
}
</script>

Customers
1. addclaim
<?php
$info = $this->accounts[0];
?>
<style>
.error{
color:red;
}
textarea{
border-radius: 0px;
}
</style>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue" style="text-align:
center;"><strong>Insurance Claim - <?php if(isset($info->insurecode))
echo $info->insurecode; ?></strong></h3>
<?php if($this->errormsg) { ?>
<div class="alert alert-danger">
<strong><?php echo $this->errormsg; ?></strong>
</div>
<?php } ?>
<form method="post" name="claimform"
class="form-horizontal" id="claimform" enctype="multipart/form-data"
>

<div class="form-group">
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right"> Customer name :
</label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info-
>customername)) echo $info->customername; ?>
</div>
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right">Gender : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->gender)) echo
$info->gender; ?>
</div>
</div>
<div class="form-group">
<label style="font-weight: bold;"
class="col-sm-2 control-label no-padding-right"> Mobile : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->mobile))
echo $info->mobile; ?>
</div>

<label style="font-weight: bold;"


class="col-sm-2 control-label no-padding-right"> Email : </label>
<div class="col-sm-4" style="font-size:
15px; padding-top: 6px;">
<?php if(isset($info->email))
echo $info->email; ?>
</div>

</div>

<h3 class="header smaller lighter


blue"><strong>Claim Details</strong></h3>
<div class="form-group">
<label class="col-sm-2 control-label no-padding-
right"> Query </label>
<div class="col-sm-6">
<textarea name="querycontent"
id="querycontent" class="form-control" placeholder="Query" rows="8"
></textarea>
</div>
</div>

<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 1 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath1" id="imagepath1" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 2 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath2" id="imagepath2" class="form-control" >
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label no-padding-
right"> Upload 3 </label>
<div class="col-sm-4">
<input type="file"
name="imagepath3" id="imagepath3" class="form-control" >
</div>
</div>

<div class="form-group" id="formsubmit">


<label class="col-sm-3 control-label no-
padding-right" for="save"> </label>
<div class="col-sm-9">
<button class="btn btn-primary"
type="submit">
Add Claim Query
</button>
<a href="<?php echo $this-
>httphost; ?>customers/index"><button class="btn btn-danger
scshowfullloading" type="button" >
<i class="ace-icon fa fa-times
bigger-125"></i>
Cancel
</button></a>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
2. index
<?php
$front = Zend_Controller_Front::getInstance();
$request = $front->getRequest();
$req_arr = array('controller'=>$request->controller , 'action'=>$request-
>action, 'module'=>$request->module);

#Getting Objects
$commonobj = new Default_Models_Common();
?>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="row" id="indexcontent">
<div class="col-xs-12">
<h3 class="header smaller lighter blue"><b>Insurance - Manage
Customers</b></h3>
<!-- message div-->
<?php if($this->msg) { ?>
<div class="row">
<div class="alert alert-block alert-success">
<button type="button" class="close" data-
dismiss="alert">
<i class="ace-icon fa fa-times"></i>
</button>
<i class="ace-icon fa fa-check green"></i>
<strong class="green">
<?php echo $this->msg; ?>
</strong>
</div>
</div>
<?php } ?>
<?php if($this->accounts) { $inc = 1; ?><br>
<div class="row">
<table width="98%" class="table table-
striped table-bordered table-hover">
<thead>
<tr>
<th
class="center">Si.no</th>
<th
class="center">Customer Info</th>
<th
class="center">Vehical Info</th>
<th
class="center">Insurance Info</th>
<th
class="center">Action</th>
</tr>
</thead>
<tbody>
<?php foreach ($this-
>accounts as $mkey=>$info){ ?>
<tr>
<td
class="center"><?php echo $inc; ?></td>
<td >
<strong>Name
: </strong> <?php echo ucfirst($info->customername); ?><br>
<strong>Email
: </strong> <?php echo $info->email; ?><br>

<strong>Mobile : </strong> <?php echo $info->mobile; ?><br>


</td>
<td >
<strong>Type : </strong><?php echo $info->insurevehical; ?><br>
<strong>Reg
Number : </strong><?php echo $info->vehicalnumber; ?><br>

<strong>Company : </strong><?php echo ucfirst($info-


>vehicalcompany); ?><br>

<strong>Modal : </strong><?php echo ucfirst($info->modal); ?


><br>
</td>

<td>

<strong>Code : </strong> <?php echo $info->insurecode; ?><br>

<strong>From : </strong> <?php echo date('d-m-Y', strtotime($info-


>insurefrom)); ?><br>
<strong>To :
</strong> <?php echo date('d-m-Y', strtotime($info->insureto)); ?><br>
</td>

<td>
<?php if($info-
>claimstatus == 2) { ?>
<strong
style="color:red">Already claim rejected</strong>
<?php } ?>
<?php if($info-
>claimstatus == 1) { ?>
<strong
style="color:green">Already claim approved</strong>
<?php } ?>
<br><a
title="View info" class="blue " href="<?php echo $this-
>httphost.'customers/view?insid='.$info->insid; ?>">
<i
class="ace-icon fa fa-search bigger-130 fa-lg"></i>
</a>
</td>
</tr>
<?php $inc++; } ?>
</tbody>
</table>
</div>
<?php } else { ?>
<div class="row"><br><br>
<div class="col-sm-12">
<div class="alert alert-danger">
<strong>Customer insurance not
found</strong>
</div>
</div>
</div>
<?php } ?>

</div>
</div>
</div>
</div>
3. info
<?php
#Getting Objects
$commonobj = new Default_Models_Common();
$info = $this->accounts[0];
?>
<style>
.error{
color:red;
}
textarea{
border-radius: 0px;
}
</style>
<div class="row">
<div class="col-xs-12">
<!-- PAGE CONTENT BEGINS -->
<div class="row">
<div class="col-xs-12">
<h3 class="header smaller lighter blue" style=" text-align:
center;"><strong>Policy Details </strong></h3>

<div class="row">
<div class="col-xs-12" style="text-align: center;">
<form method="post" id="balform" >
<input name="inscode" value="<?php echo
$this->inscode; ?>" placeholder="Insurance Code" type="text"
style="width: 30%;">
<button class="btn btn-primary btn-sm
scshowfullloading" type="submit">
<i class="ace-icon fa fa-search icon-on-right
bigger-110 "></i>&nbsp;&nbsp;Search
</button>
</form>
</div>
</div>

<form method="post" name="insureform"


class="form-horizontal" id="insureform" >
<h3 class="header smaller lighter
blue"><strong>Customer Details</strong></h3>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Customer name : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->customername))
echo $info->customername; ?>
</div>
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right">Gender : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->gender)) echo $info-
>gender; ?>
</div>
</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right"> Mobile : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->mobile)) echo
$info->mobile; ?>
</div>
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Email : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->email)) echo
$info->email; ?>
</div>

</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-sm-
2 control-label no-padding-right"> Date of Birth : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->gender)) echo
$info->gender; ?>
</div>
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Address : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->address)) echo
$info->address; ?>
</div>
</div>

<h3 class="header smaller lighter


blue"><strong>Insurance Vehical Details</strong></h3>

<div class="form-group ">


<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right">Vehical Type : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurevehical)) echo
$info->insurevehical; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical Number : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalnumber))
echo $info->vehicalnumber; ?>
</div>
</div>
<div class="form-group ">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical Company : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalcompany))
echo $info->vehicalcompany; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical modal : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->modal)) echo
$info->modal; ?>
</div>

</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right"> Vehical color : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->color)) echo
$info->color; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Manufacture Date : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info-
>manufacturedate)) echo $info->manufacturedate; ?>
</div>

</div>
<div class="form-group ">
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Vehical cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->vehicalcost)) echo
$info->vehicalcost; ?>
</div>
</div>

<h3 class="header smaller lighter


blue"><strong>Insurance Details</strong></h3>

<div class="form-group ">


<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Insurance cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurecost)) echo
$info->insurecost; ?>
</div>
<label style="font-weight: bold;" class="col-sm-2
control-label no-padding-right"> Insurance Cover Cost : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurecover))
echo $info->insurecover; ?>

</div>
</div>
<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Vaild From : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insurefrom)) echo
$info->insurefrom; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Vaild To : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->insureto)) echo
$info->insureto; ?>
</div>

</div>

<h3 class="header smaller lighter


blue"><strong>Nominee Details</strong></h3>
<div class="form-group">
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Nominee Name : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->nomineename))
echo $info->nomineename; ?>
</div>
<label style="font-weight: bold;" class="col-
sm-2 control-label no-padding-right">Relationship : </label>
<div class="col-sm-4" style="font-size: 15px;
padding-top: 6px;">
<?php if(isset($info->nomineerelation)) echo
$info->nomineerelation; ?>
</div>

</div>
<h3 class="header smaller lighter
blue"><strong>Claim Details</strong></h3>
<div class="form-group">
<?php if(empty($this->claimhistory)) { ?>
<div class="col-sm-12">
<div class="alert alert-danger">
<strong>Claim details not
found</strong>
</div>
</div>
<?php } else { ?>
<?php if($info->claimstatus == 0) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-success">
<strong>Claim Request
Received</strong>
</div>
</div>
<?php } ?>
<?php if($info->claimstatus == 1) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-success">
<strong>Claim Request Approved on
<?php echo date('d-m-Y', strtotime($info->claimdate));?> with Rs : <?php
echo $info->claimamt; ?></strong>
</div>
</div>
<?php } ?>
<?php if($info->claimstatus == 2) { ?>
<div class="col-sm-12" style="padding-top:
15px;">
<div class="alert alert-danger">
<strong>Claim Request Rejectedon <?
php echo date('d-m-Y', strtotime($info->claimdate));?></strong>
</div>
</div>
<?php } ?>

<div class="col-sm-12" style="padding-top:


15px;">
<div class="row">
<table width="98%" class="table table-
striped table-bordered table-hover">
<thead>
<tr>
<th
class="center">Si.no</th>
<th
class="center">Date</th>
<th
class="center">User</th>
<th
class="center">Query</th>
<th
class="center">Attachements</th>
</tr>
</thead>
<tbody>
<?php $inc = 1; foreach
($this->claimhistory as $mkey=>$cinfo){ #echo "<pre>"; print_r($cinfo);
#exit;
?>
<tr>
<td
class="center"><?php echo $inc; ?></td>
<td><?php echo
date('d-m-Y h:i A', strtotime($cinfo->requested)); ?><br></td>
<td>
<?php echo
ucfirst($cinfo->userName); ?><br>
</td>
<td>
<?php echo
nl2br($cinfo->querycontent); ?><br>
</td>
<td>
<?php if(!
empty($cinfo->attach1)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach1; ?>">Attachement 1</a> |
<?php } ?>
<?php if(!
empty($cinfo->attach2)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach2; ?>">Attachement 2</a> |
<?php } ?>
<?php if(!
empty($cinfo->attach3)) { ?>
<a
target="_blank" href="<?php echo $this->httphost.'html/images/posts/'.
$cinfo->attach3; ?>">Attachement 3</a> |
<?php } ?>
</td>
</tr>
<?php $inc++; } ?>
</tbody>
</table>
</div>
</div>
<?php } ?>
</div>
</form>
</div>
</div>
</div>
</div>
<div id="payModal" class="modal fade" role="dialog">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-
dismiss="modal">&times;</button>
<h4 class="modal-title" style="color: #428BCA;font-weight:
bold;">Send Claim Money</h4>
</div>
<div class="modal-body">
<div class="field">
<input type="hidden" name="insid" id="insid"
value=""/>
<input type="hidden" name="maxamt" id="maxamt"
value=""/>
<b>Maximum Cover Amount : Rs : <span
id="maxhtml">0.00</span></b><br>
<b>Enter Amount : </b><input type="text"
name="eamount" id="eamount" value="" class="login-inp
allownumericwithoutdecimal" placeholder="Enter Amount"
autocomplete="false">
<p style="color: red;" id="payerr"></p>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" onclick="return
verifyamount();">Pay Claim</button>
<button type="button" class="btn btn-danger" data-
dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
<script>
var paymodelopen = function(insid, maxamt) {
$('#payerr').html('');
$('#insid').val(insid);
$('#maxamt').val(maxamt);
$('#eamount').val('');
$('#maxhtml').html(maxamt);
$('#payModal').modal({
show: true,
keyboard: false,
backdrop: 'static'
});
}

var verifyamount = function() {


var insid = $('#insid').val();
var eamount= 0;
if($('#eamount').val() != '') {
eamount= parseFloat($('#eamount').val());
}
var maxamt= 0;
if($('#maxamt').val() != '') {
maxamt= parseFloat($('#maxamt').val());
}
$('#payerr').html('');
if(eamount == '') {
$('#payerr').html('Enter the amount');
} else if(eamount > maxamt) {
$('#payerr').html('Maximum claim amount
will be less then or equal to Rs: '+maxamt);
} else {
alert(eamount+' '+maxamt);
$('#payModal').modal('hide');
var formData = new FormData();
formData.append('insid', insid);
formData.append('eamount', eamount);
$.ajax({
url: 'customers/approveclaim',
type: 'POST',
data: formData,
async: false,
processData: false,
contentType: false,
beforeSend: function() {
$('#fullloading').show();
},
success: function(resdata){

var response =
JSON.parse(resdata);
if(typeof response
=='object') {
if(response.code ==
200){
}

alert(response.msg);
location.reload();
} else {
alert('Error in
saving');
}
$('#fullloading').hide();
},
error: function(){
alert('Error in saving');
$('#fullloading').hide();
}
});
}

}
</script>

Output Screen Shot


9. CONCLUSION

A computerized insurance management system has been developed and the


system was tested with sample data. The system results in regular timely
preparations of required outputs. In comparison with manual system the benefits
under a computer system are considerable in the saving of man power working
hours and Effort. Provision for addition, updation and deletion of customers is
there in the system .It is observed that proper filing system has been adopted for
future refernce. The entire project runs on windows environments. The system
can be used to make better management described at appropriate time. The user
gets amount and timely information system.

10. FUTURE SCOPE

Our future works will be

 Avoid Messages not getting delivered to emergency numbers


 Avoid Performance issues
 Avoid Not working as it was intended to
 Avoid Trouble in creating account
 Avoid Unavailability of email registration
 Avoid Misleading information regarding the subscription
 Avoid Login issues
 Avoid Unable to function in the background
 Avoid Touch calibration issues
 Avoid Few users have reported that the app crashes in between
11. REFERENCE

[1] M. A. Hamid, M. M. Alam, M. S. Islam, C. S. Hong, and S. Lee, “Fair data


collection in wireless sensor networks: analysis and protocol”, Annals of
Telecommunications, vol. 65, no. 7-8, pp. 433-446, 2010.

[2] Sana Ullah, Pervez Khan, Nimamat Ullah Sahnaz Saleem, Henry Higgins,
and kyung sap Kwak, “Review of wireless Body area Network for Medical
applications”, arXiv:1001.0831v3[cs.N1], pp. 1- 3, 3August 2020.

[3] Muhammad Moid Sahndhu1, Nadeem Javaid1, Muhammad Imran,


Mohsen Guizani, Zahoor Ali Khan, Umar Qasim, “BEC:A Novel Routing
Protocol for balanced energy consumption in Wireless body area network”,

[4] Nabil Ali Alrajeh, Jaime Lloret, and Alejandro Canovas,"A Framework for
obesity control using a wireless Body sensor network”, International jouranl of
distribution sensor networks Volume 2014, pp. 2-3, July 2016

[5] M. Soini, J.Nummela, P. Oksa, L.Ukkonen, and L. Syd¨anheimo, “Wireless


body area network for hip rehabilitation system,” Ubiquitous Computing and
Communication Journal, vol. 3, no. 5, pp. 42–48, 2018

[6] B. Latr´e, B. Braem, I. Moerman, C. Blondia, and P. Demeester, “A survey


on wireless body area networks,” Journal of Wireless Networks, vol. 17, no. 1,
pp. 1–18, 2011..

[7] M. A. Hanson, H. C. Powell Jr., A. T. Barth et al., “Body area sensor


networks: challenges and opportunities,” IEEE Computer Magazine, vol. 42,
no. 1, pp. 58–65, 2019.

[8] M. Chen, S. Gonzalez, A. Vasilakos, H. Cao, and V. C. M. Leung, “Body


area networks: a survey,” Mobile Networks and Applications, vol. 16, no. 2, pp.
171–193, 2021
[9] J. Jung, K. Ha, and J. Lee, “Wireless body area network in a ubiquitous
healthcare system for physiological signal monitoring and health consulting,”
International Journal of Signal Processing, Image Processing and Pattern
Recognition, vol. 1, no. 1, pp. 47–54, 2018.

[10] R. H. Jacobsen, K. Kortermand, Q. Zhang, and T. S. Toftegaard,


“Understanding Link Behavior of Non-intrusive Wireless Body Sensor
Networks”, Wireless Personal Communications, vol. 64, no. 3, pp. 561- 582,
2012.

[11]. Prof. M. Devmane, Sujitkumar Jagtap1 , Dhiraj Rane2 , Amit Kumar


Shrivastav3 , Jay Churi4 1,2,3,4 Department of Computer Engineering,
PVPPCOE, Mumbai.https://www.ijert.org/research/online-
insurancemanagement-system-IJERTCONV2IS04042.pdf

[12]. Arnob Zahid,Mehzab Nahid, “E-Health Insurance Management System:


(2019)

[13]. Adhrith Rangaprabhu, Deep Goyal , Pradhyun Kuncham3 , Impana Appaji


Insurance Management System (2022)

[14]. Online Insurance Management System Prof. M. Devmane, Sujitkumar


Jagtap, Dhiraj Rane, Amit Kumar Shrivastav, Jay Churi, Department of
Computer Engineering, PVPPCOE, Mumbai. https://www.ijert.org/online-
insurance-management-system.

[15]. Brawner, L. B. "Insurance and Risk Management for Libraries." Public


Library Quarterly13, no. 1 (1993): 5-16 and 13, no. 2 (1993): 29-34.
[16]. Breighner, M., W. Payton and J. Drewes.  Risk and Insurance
Management Manual for Libraries.  Chicago: Library Administration and
Management Association, 2005.
[17]. Cady, S. A. "Insuring the Academic Library Collection."  Journal of
Academic Librarianship 25, no. 3 (1999): 211-215. 
[18]. Clow, F. "Disaster Preparedness: Managing Library Liability."  Library Hi
Tech Bibliography  No. 5 (1990?): 29-33.
[19]. DeLong, L. R.  "Valuating Library Collections."  In Acquisitions '90:
Conference on Acquisitions, Budgets, and Collections, May 16 and 17, 1990,
St. Louis Missouri: Proceedings.  Edited by D. C. Genaway, 80-95. Canfield,
OH: Genaway, 1990.
[20]. Deshima, J. "Securing Museum Coverage." Best's Review
(Property/Casualty Insurance Edition) (August 1992): 61-62, 98.

You might also like