Vous êtes sur la page 1sur 103

CS 893 GRINGOTTS e-BANK

By Project Group Number: CSEPRJ/2012/ Richa Kaul Parthasarathi Mitra Arpan Nandi Avinay Agarwal Shamik Das 08119001011 08119001014 08119001017 08119001041 08119001043

Under Guidance of Krittibas Parai Submitted to the Department of Computer science & Engineering in partial fulfillment of the requirements for the award of the degree

Bachelor of Technology in Computer Science & Engineering


Year of Submission 2012

Siliguri Institute of Technology


P.O. SUKNA, SILIGURI, DIST. DARJEELING, PIN: 734009 Tel: (0353)2778002/04, Fax: (0353) 2778003

CERTIFICATE OF ORIGINALITY
This is to certify that the project report entitled Gringotts e-Bank submitted to Department of Computer Science and Engineering of Siliguri Institute of Technology in partial fulfilment of the requirement for the award of the degree of Bachelor of Technology in Computer Science and Engineering an authentic and original work carried out by Project Group Number : CSEPRJ/2012/ Sl No 1 2 3 4 5 Name Richa Kaul Parthasarathi Mitra Arpan Nandi Avinay Agarwal Shamik Das Registration No
081190110056 081190110045 081190110011 081190110017 081190110070

Roll No
08119001011 08119001014 08119001017 08119001041 08119001043

The matter embodied in this project is genuine work done by the student and has not been submitted whether to this University or to any other University / Institute for the fulfilment of the requirements of any course of study. Name Richa Kaul Parthasarathi Mitra Arpan Nandi Avinay Agarwal Shamik Das Roll No
08119001011 08119001014 08119001017 08119001041 08119001043

Signature with Date

-------------------------------------Signature of Project Guide Name of the Guide:

-------------------------------------Signature of the HOD Department of ______________

We would like to express our sincere gratitude to Mr. Alok Basu, Head of Department, Computer Science and Engineering Dept., Siliguri Institute of Technology, for encouraging and inspiring us to carry on with the project and for his valuable suggestions. We would also like to thank our Project Guide, Mr. Krittibas Parai, Assistant Professor, Computer Science and Engineering Dept., Siliguri Institute of Technology, for his guidance, encouragement and suggestions at every step. We would also like to thank Mr. Kaushik Nath and Mr. Gobinda Sarkar, Faculty, Computer Science and Engineering Dept., Siliguri Institute of Technology, for providing us with the required facilities and their support for the completion of the project.

1. 2. 3. 4. 5.

RICHA KAUL PARTHASARATHI MITRA ARPAN NANDI AVINAY AGARWAL SHAMIK DAS

_________________________ _________________________ _________________________ _________________________ _________________________

1.

Gringotts e-Banking facility aims at creation of a secure Internet banking system. This will be accessible to all customers who have a valid account ID and password. This system provides the following facilities to the customer: Deposit money Withdraw money Transfer from one account to another Balance enquiry. The term e-Banking refers to a number of ways in which customers can access their banks without having to be physically present at a bank branch. e-Banking relates to every banking business transacted from a customers PC. This can be done through online banking, in which bank transactions are conducted within a closed network, or via Internet banking, which permits the customer to perform transactions from any terminal with access to the Internet. With the concept of e-Banking, a bank can move near to the customers and increase its basic operational strategies. e-Banking will provide customers with a complete new interface and working environment, making transactions much simpler. The major idea is to provide a series of services to the customer through the Internet, and make the customer feel flexible in calling out simple tasks faster instead of making visit to the bank every time. The customer is privileged to use most of the system only as a viewing phase, the only online transaction the customer can do is fund transfer. So, with this e-Banking system customers will have all the privileges sitting at home. They can easily deposit money in their accounts, withdraw and

transfer funds from one account to another, in a simple and smooth interface that is easily understandable and easy to work on.

2.

Customer Satisfaction

e-Banking allows customers to access banking services 24 hours a day, 7 days a week. Like ATMs, e-Banking empowers customers to choose when and where they conduct their banking. A Dynamic net report came to the conclusion that, the more delivery channels a bank offers and the more functions available on an Internet site, the more convenient it becomes for customers to conduct business and the higher the rate of customer acquisition that a bank is likely to experience.

Increase Customer Retention

One of the important advantages of E-Banking is its ability to increase customer retention. Online branches have been shown to dramatically reduce the loss of customers due to relocation needs.

Cost Reduction

Lowered transaction costs are primarily due to two factors: 1. 2. widespread Internet access its low cost in the country

which minimizes transaction processing costs, and the reduction of the number of brick and mortars branches required to service an equivalent number of customers, which dramatically lowers overhead costs.

Gringotts e-Bank is an online banking portal. Hence, it is implied that users should be computer literate and have access to the Internet. The chosen mode of communication is English, as it is widely understood. Currently, e-Banking facility is provided by all major (Private/Public) banks in India and abroad. The need for an e-Bank arose from:

Requirement of customers to save time, by not standing in long queues. Less paperwork and book-keeping by having online accounts.

Some of the banks providing e-banking facility in India are: UCO Bank Axis Bank Allahabad Bank Gringotts is enlisted to provide service to both Indian and international customers. The project was developed with the following technologies:

Front End: PHP, JavaScript, HTML, CSS. Back End: MySQL, Apache Web Server

Feasibility is the measure of how beneficial an information system will be to an organization. Feasibility study is the process by which feasibility is measured. A feasibility study is a preliminary study undertaken before the real work of a project starts. It is conducted to assist decision-makers in determining whether or not to implement a particular project. After feasibility study, management makes a go/no-go decision. The feasibility study can be subdivided into the following categories: i. Operational Feasibility: It is the measure of how well a proposed system solves the problems and takes advantages of the opportunities envisioned for the system. Technical Feasibility: It is a measure of the practicality of a specific technical solution and the availability of technical resources and expertise to implement and maintain it. Economic Feasibility: It is a process of identifying the financial benefits and cost-effectiveness of a project or solution. Economic feasibility is often referred to as cost-benefit analysis (CBA). Schedule Feasibility: It is a measure of how reasonable the project timetable is to meet organizational deadlines and constraints for affecting change. Legal Feasibility: It is a measure of how well a solution can be implemented within existing legal and contractual obligations. The possible issues maybe violation of patent or copyright, constraints imposed by union contracts etc. Cultural Feasibility: It is a measure of how well the solution will be accepted in a given organizational climate.

ii.

iii.

iv.

v.

vi.

The feasibility study of Gringotts e-Bank is as follows:

Operational Feasibility

The transaction processes, be it deposition, withdrawal or transfer of balance, is done very easily owing to a very user-friendly interface. Balance transfer is immediately updated. With the demands of customers rising every day, Gringotts e-Bank narrows down the need of high book-keeping by maintaining records for every transaction of every user, which can be displayed upon request.

Technical Feasibility

The proposed project is technologically practical as all the software and hardware requirements are easily available, and easy to learn and use. The developers have the necessary expertise and skills required to develop the project.

Economic Feasibility

The most important requirement of the project was XAMPP, which is an all-OS based web server setup that uses the three open-source technologies Apache, MySQL and PHP, and which is easily downloadable from the Internet. Two months.

Schedule Feasibility Legal Feasibility Cultural Feasibility

No foreseeable problems.

No foreseeable problems.

In this planning section, the main emphasis is given on estimated effort and project duration. It was necessary to check the cost estimation of the project. Effort and project cost has been calculated taking almost maximum possible requirements and the cost is calculated accordingly. The options were also kept to customize the software economically usable to the small size organizations. The estimates are made within a limited two months time frame. This project plan was being updated regularly as the project progressed.

2.5
Project scheduling is a process that distributes estimated effort across the project duration by allocating the effort to specific software engineering tasks. It is an important project planning activity. It involves deciding which project tasks would be taken up when. In order to schedule the project activities, a software project manager needs to do the following: 1. Identify all the major tasks needed to complete the project. 2. Break down large tasks into small sub-tasks. Work Breakdown Structure (WBS) tool helps to break down tasks systematically. 3. Determine the dependency among different tasks. 4. Establish the most likely estimates for the time durations necessary to complete the tasks. 5. Allocate resources to tasks using Gantt chart. 6. Plan the starting and ending dates for various tasks. 7. Determine the critical path using Program Evaluation and Review Technique (PERT) / Critical Path Method (CPM). A critical path is the chain of activities that determines the duration of the project. In this project PERT is used for scheduling.

I.

Work Breakdown Structure (WBS) WBS is a graphical tool used to depict hierarchical decomposition of a given project into tasks and subtasks. The goal of a WBS is to identify all the activities that a project must undertake. It is developed before identification of dependencies and estimation of activity durations. In decomposing a project, it is decided which tasks need to be done and in scheduling it is decided in which order to do the tasks. Hence, WBS can also be used as input into the scheduling process.

GRINGOTTS e-BANK APPLICATION

DOCUMENT

REQUIREMENTS SPECIFICATION

DESIGN

CODE

TEST

DATABASE PART

GUI PART

DATABASE PART

GUI PART

II.

Gantt Chart Gantt charts can be used for several purposes- scheduling, budgeting and resource planning. Gantt chart is a bar chart with each bar representing an activity. The bars are drawn against a timeline. The length of each bar is proportional to the length of time planned for the corresponding activity.

III. st

31 May 2011

Program Evaluation and Review Technique (PERT) th st th


18 Sep 1 Oct Jan 2011 2012 28 Feb

31st Mar

12th Apr

2011 2012 2012 It is a technique of representing activities of projects in its proper 2012 graph of tasks/activities. It is used for planning, scheduling and controlling tasks within a project.

In PROJECT PERT chart, instead of making a single estimate of each task, pessimistic, PROPOSA mostLlikely and optimistic estimates are made. The probability distribution of activity time is based upon three different time estimates made for each activity. These are as follows: ANALYSIS Optimistic time- the shortest possible time to complete Pessimistic time- the longest time that an activity could Most likely time- the estimate of the normal time an FEASIBILactivity would take. ITY STUDY PERT chart can be used to determine the earliest/latest start and finish times for each activity, the entire project completion time and the total float/slack time for each activity. DESIGN A critical path for the network is a path consisting of activities with zero 1.

CODE GENERATION

DOCUMENTATIO N

SUBMI T

TESTING

III.

Program Evaluation and Review Technique (PERT) It is a technique of representing activities of projects in its proper sequence and timing. It is used for planning, scheduling and controlling tasks within a project. In PERT chart, instead of making a single estimate for each task, pessimistic, most likely and optimistic estimates are made. The probability distribution of activity time is based upon three different time estimates made for each activity. These are as follows:

Optimistic time (to) - the shortest possible time to complete the activity if all goes well.

Pessimistic time (tp) - the longest time that an activity could take it everything goes wrong. Most likely time (tm) - the estimate of the normal time an activity would take. Expected/average value of activity duration is calculated as: te = ( to + 4 tm + tp ) / 6

PERT chart can be used to determine the earliest/latest start and finish times for each activity, the entire project completion time and total float/slack time for each activity. To build a PERT chart for a project, one must first list all the activities required or completion of the project and estimate how long each will take. Then one must determine the dependence of the activities on each other. The PERT chart gives a graphical representation of this information. PERT Charts consist of network of boxes and arrows. The boxes represent activities and the arrows represent task dependencies.

18th Sep 2011 FEASIBILITY STUDY 1st Oct 2011 23rd Mar 2012

31 May 2011 PROJECT PROPOSAL

st

18 Sep 2011 ANALYSIS

th

DOCUMENTATI ON

DESIGN

12th Apr 2012

CODE GENERATION

SUBMISSION

TESTING

2.6.

I.

Functional Requirements a) Pre-requisites for use of e-Bank: Activated account number with PIN (Personal Identification Number) A bank a/c with sufficient funds if using debit card ($200 or more) b) Input Requirements if already a member: Account number Password c) Input Requirements if not a member: Identity card number Full name Password Deposit amount(min $200) d) Output Requirements Deposit a correct sum to customers a/c Withdraw a sum from customers a/c Transaction receipt Credit automatically added to customers a/c e) Procedure (Operation of System) Log into the system with the account no. and password Enter the option what you want to do transfer, withdraw or deposit The systems database is updated as per the amount entered. If a new user, fill up the registration page. Then use the given account no. and password to log in. Transaction can be done after that as per your needs.

II.

Non-Functional Requirements a) Developmental Constraints The system will depend on the existing banking services provided at ATMs. However, minor additions will be made to accommodate the banking service. It involves being limited to the interface of ATMs in terms of screen size, option buttons, locations and working with the systems of the banking companies. The user interface will have to be consistent with that of the banks. Permission must also be granted by these entities. The companies must have accounts for transfers to be made. The system of the companies must also be configured to accept the transactions by adding the time paid for to respective accounts. The systems of the banks must be integrated to work. b) Constraint on Services Customers must make a minimum deposit ($200), which for economy must exceed tax and charges. No more special constraints are made on the services. c) Data Constraint Most data requirement will be built-in. Only password and a dollar amount in figures will be required as input by the customer, which will be subject to validation. A minimum sum is required but no maximum or increments. d) Time Constraint

The system is confined to be completed in less than 2 months. The team only had a part of each weekend to develop the project. A schedule was worked out and described in the schedule feasibility. Teams were also small, which made it even more challenging.

e) Hardware Interfaces Server Side: Operating System: Windows NT/XP/VISTA/7/ME Processor: Pentium with 1.0 GHz or higher RAM: 512 Mb or more Hard Disk Space: 1 GB or more Client side: Operating System: Windows NT/XP/VISTA/7/ME or UNIX Processor: Pentium with 1.0 GHz or higher RAM: 512 Mb or more

f) Software Interfaces Database: MySQL Application: PHP (PHP Hypertext Preprocessor) Web Server: Apache Web Browser: IE 7 or above, Google Chrome, Mozilla Firefox

g) Communications Interfaces The Customer must connect to the Internet to access the website:

Dialup Modem of 10 Mbps Broadband Internet Dialup or Broadband Connection with a Internet Provider

2.7.

Iterative Waterfall Model

FEASIBILITY STUDY

REQUIREMENTS ANALYSIS AND SPECIFICATION

DESIGN

Description of the Stages of the Iterative Waterfall Model:

1. Feasibility Study: The feasibility study is used to determine if the project should get the go-ahead. If the project is to proceed, the feasibility study will produce a project plan and budget estimates for the future stages of development. The deliverable at the end of this stage is the feasibility study.

2. Requirements Analysis and Specification: Identify, select and document functional, scheduling and financial requirements. Defines the purpose of the information system. The development team visits the customer and studies their system requirement. They examine the need for possible software automation in the given software system. A deliverable at the end of this stage is the software requirements document.

3. Design: Use programming techniques to design software and hardware within the constraints and objectives set in the earlier stages. A deliverable at the end of this stage is the design specification.

Another deliverable is the test plan.

4. Coding: Implement the program as designed in the earlier stages. The deliverable at the end of this stage is the software program.

5. Testing: Test the software and record the results. A deliverable at the end of this stage is the updated test plan. Another deliverable is the updated design specification.

6. Maintenance: Deliver, install and configure the completed software. Provide maintenance and support of the software. The deliverable at the start of this stage is the operating manual.

2.8.1.

2.1

2.8.2.

CLIENT

CLIENT LOGS IN

ACCOUNT INFO

YES

VALID

NO

CLIENT ACTION

ACTION LOGGED

ACTION PROCESSED

2.8.3.

2.8.4.

Name Account Number Account Number ID Password

Card Number

1
User ID

CREATE

ACCOUNT

Initial Amount Deposited

USER
Day of Account Creation

N
HAS

KEEPS RECORDS (WITHDRAWA L, DEPOSIT, BALANCE TRANSFER)

1
ROLE

N
TRANSACTIONS
Day of transaction Type

ID Event Account Number

Time of transaction

3.

The basic modules in action in this project are five. These modules work together to provide the basic functionality that is expected of any online banking website. These modules are, namely:

1.

Registration of a new User and Login: This module is the part where an existing account-holder logs in with his account number and the password, and a new user registers with his personal information and gets an account in the bank. Checking Balance in the Account

2.

This module works to check balance in the account of an existing account-holder. 3. Deposition of money in the Account This module plays the part of depositing money into the account of the logged in user. Withdrawal of money from the Account This module is the part for withdrawal of money from the account of a user. Transfer of cash from one Account to another This final module implements the feature of transfer of balance from one account to another that takes place by providing the account number of the receiving account.

4.

5.

Data types, of the fields of different tables, have been taken in such a way that it requires limited memory space. Account, password, etc. where number of characters is difficult to assume, has been created having VARCHAR data type. VARCHAR is variable length character, i.e. the size will be changed according to the required characters. All numeric fields are tested and size has been given accordingly. The field where date calculation is required VARCHAR data type has been taken. Unique data is specified by Primary Key.

1. Table List
Table No. Table Name Description

1 2 3 4

acct_no event login myacct

Contains account information. Contains the transaction history. Contains the login information. Contains registration information of user.

2. Table Descriptions I. Table 1: acct_no


Field Name Field Type id Int Field Size 4 Constraint Description Primary Key Stores the user identification

acct used

Varchar Varchar

20 10

numbers provided by the bank. Stores the unique account number of a user. Stores info on whether user holds account or not.

II.

Table 2: event
Field Size 4 Constraint Primary Key Stores Description

Field Name Field Type id Int

acct depo Event Time Day

Varchar Int Varchar Varchar Varchar

20 15 20 30 30

user identification numbers provided by the bank. Stores the unique account number of a user. Stores the balance of the account. Stores the type of the transaction. Stores the time of the transaction. Stores the date of transaction.

the

III.

Table 3: login

Field Name Field Type id Int

Field Size 4

Constraint Primary Key Stores

Description

acct card

Varchar Varchar

20 30

name pword role

Varchar Varchar Varchar

20 80 8

user identification numbers provided by the bank. Unique Key Stores the unique account number of a user. Unique Key Stores the card number provided by the user at the time of registration. Stores the name of the user. Stores the password of the user. Stores the role of the account-holder: user or admin.

the

IV.

Table 4: myacct Field Size 4 Constraint Primary Key Stores Description

Field Name Field Type id Int

acct card

Varchar Varchar

20 30

name

Varchar

30

user identification numbers provided by the bank. Unique key Stores the unique account number of a user. Unique Key Stores the card number provided by the user at the time of registration. Stores the name of the user.

the

depo day

Int Varchar

15 30

Stores the account balance. Stores the date on which the user registered.

3.4.

4.

4.1.

PHP PAGES
main.php

<?php session_start(); session_destroy(); ?> <?php include("header.html"); ?> <html> <head> <title>Untitled Document</title> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> <script type="text/javascript"> function showlayer(layer){ var myLayer = document.getElementById(layer); if(myLayer.style.display=="none" || myLayer.style.display==""){ myLayer.style.display="block"; } else { myLayer.style.display="none"; } } </script> <script language="JavaScript"> function validated(){ var acct = document.s.acct.value; var pword = document.s.pword.value; if(acct==""){ window.alert("Please enter your account number!"); document.s.acct.focus(); return false; } if(pword==""){ window.alert("Please enter your password!"); document.s.pword.focus(); return false;

} } </script> </head> <body> <a href="main.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <center> <form action='login.php' method='post' name='s' onsubmit='return validated()';> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="6" class="td"> <tr align="center"> <td colspan="3"><font color="#000" size="4" face="corbel" style="fontweight:bold">Welcome to Gringotts Banking System!</font></td> </tr> <td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td> <td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000" size="3" face="corbel" style="fontweight:bold">Account No.</font><br> <input type='text' name='acct' size=30 maxlength=20 class=tb3></td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000" size="3" face="corbel" style="fontweight:bold">Password</font><br> <input type='password' name='pword' size=30 maxlength=10 class=tb3></td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td>

<td align="center"><button name="submit" type='submit' class='button1' style="fontweight:bold"> Login</button> <input name="reset" type='reset' value='Reset'class='button1' style="fontweight:bold"></td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#FFF" size="3" face="corbel" style="fontweight:bold"><a href='register.php'><font color='#0000ff'>&lt;&lt; Register here &gt;&gt;</font></a></font></td> <td>&nbsp;</td> </tr> </table></form> </center> <?php include("footer.html"); ?> </body> </html>

Login.php
<html> <body bgcolor='#333333'> <?php session_start(); $acct=$_POST["acct"]; $pword=$_POST["pword"]; include 'db_connect.php'; $sql="SELECT * FROM login WHERE acct='$acct' AND pword=MD5('$pword')"; $result=mysql_query($sql); $row = mysql_fetch_array($result); if (mysql_num_rows($result)) { $acct=$row["acct"]; $name=$row["name"]; $role=$row["role"];

$_SESSION['xacct']=$acct; $_SESSION['xname']=$name; $_SESSION['xrole']=$role; header("Location: myacct.php"); } else { mysql_close($conn); header("Location: main.php"); } ?> </body> </html>

myacct.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> </head> <body> <a href="myacct.php" class="me">Home</a> <?php include 'db_connect.php'; $sql = "SELECT * FROM myacct WHERE acct='".$_SESSION['xacct']."'";

$result = mysql_query($sql) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result)) { $acct=$row["acct"]; $card=$row["card"]; $name=$row["name"]; $day=$row["day"]; ?> <br><br><br><br><br><br><br><br> <center> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="6" bgcolor="#000000" class="td"> <tr align="center"> <td colspan="3"><font color="#000" size="4" face="verdana" style="fontweight:bold">Welcome to your Account</font></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="33%" align="right"><font color="#000" size="2" face="arial"><b>Account Number</b></font></td> <td width="6%" align="center"><font color="#000" size="2" face="arial">:</font></td> <td width="61%"><font color="#000" size="2" face="arial"><b><?php echo"$acct"; ?></b></font></td> </tr> <tr> <td align="right"><font color="#000" size="2" face="arial"><b>Identity Card</b></font></td> <td align="center"><font color="#000" size="2" face="arial">:</font><br></td> <td><font color="#000" size="2" face="arial"><b><?php echo"$card"; ?></b></font></td> </tr> <tr>

<td align="right"><font color="#000" size="2" face="arial"><b>Full Name</b></font></td> <td align="center"><font color="#000" size="2" face="arial">:</font><br></td> <td><font color="#000" size="2" face="arial"><b><?php echo"$name"; ?></b></font></td> </tr> <tr> <td align="right"><font color="#000" size="2" face="arial"><b>Member Since</b></font></td> <td align="center"><font color="#000" size="2" face="arial">:</font></td> <td><font color="#000" size="2" face="arial"><b><?php echo"$day"; ?></b></font></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> </table> <table width="50%" border="0" align="center" cellpadding="4" cellspacing="3"> <tr align="center"><td> <table width="40%" border="0" align="center" cellpadding="4" cellspacing="3"> <tr align="center"> <td> <form action='balance.php' method='post'> <input type='submit' value='Check Balance' class='button1'></form></td><td> <form action='deposit.php' method='post'> <input type='submit' value='Deposit' class='button1'></form></td><td> <form action='withdrawal.php' method='post'> <input type='submit' value='Withdrawal' class='button1'></form></td><td> <form action='transfer.php' method='post'> <input type='submit' value='Transfer' class='button1'></form></td><td> <form action='main.php' method='post'> <input type='submit' value='Logout' class='button1'></form> </td> </tr>

</table> </td></tr> </table> <?php } ?> </center> </body> </html>

balance.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> </head> <body > <a href="myacct.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <?php include 'db_connect.php'; $sql = "SELECT * FROM myacct WHERE acct='".$_SESSION['xacct']."'"; $result = mysql_query($sql) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result)) { $acct=$row["acct"];

$depo=$row["depo"]; ?> <center> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="4" bgcolor="#000000" class="td"> <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Check Balance</font></td> </tr> <tr> <td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td> <td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Account Number</font><br> <font color="#000000" size="3" face="arial"><b><?php echo"$acct"; ?><b></b></font><br> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Balance</font><br> <font color="#000000" size="3" face="arial"><b>$ <?php echo"$depo"; ?></b></font><br> </td> <td>&nbsp;</td> </tr> <tr>

<td>&nbsp;</td> <td align="center">&nbsp; </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"> <center> <table width="100%" border="0" align="center" cellpadding="2" cellspacing="0" > <tr><td align="right" width='70%'> <form action='transaction.php' method='post'> <input name="submit" type='submit' value='Transaction' class="button1"> </form> </td><td width='30%'> <form action='myacct.php' method='post'> <input name="submit" type='submit' value='Back' class="button1"> </form> </td></tr></table> </td> <td>&nbsp;</td> </tr> </table> </center> <?php } ?> </center> </body> </html>

register.php
<html> <?php include("header.html"); ?> <head> <link href="css/style.css" rel="stylesheet" type="text/css">

<style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> </head> <script language="JavaScript"> function validated(){ var card = document.s.card.value; var name = document.s.name.value; var pword = document.s.pword.value; var pword2 = document.s.pword2.value; var depo = document.s.depo.value; var depoint = parseInt(depo); if(card==""){ window.alert("Please enter your identity card number!"); document.s.card.focus(); return false; } if(name==""){ window.alert("Please enter your name!"); document.s.name.focus(); return false; } if(pword==""){ window.alert("Please write your password!"); document.s.pword.focus(); return false; } if(pword2==""){ window.alert("Please write your password!"); document.s.pword2.focus(); return false; } if(pword !=pword2){ window.alert("Password not match!"); return false;

} if(isNaN(depoint)){ window.alert("Please enter deposit!"); document.s.depo.focus(); return false; } if(depo < 200){ window.alert("Deposit must not less than $200!"); return false; } } </script> <body> <a href="main.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <center> <form action='register_write.php' method='post' name='s' onsubmit='return validated()';> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="4" bgcolor="#000000" class="td"> <tr align="center"> <td colspan="3"><font color="#000" size="4" face="verdana" style="fontweight:bold">Welcome to your Banking System: Registration</font></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="22%" align="right"><font color="#000" size="2" face="verdana" style="font-weight:bold">Identity Card </font></td> <td width="4%" align="center"><font color="#000" size="2" face="verdana" style="font-weight:bold">:</font></td> <td width="74%"><input type='text' name='card' size=30 maxlength=30 class="tb3"></td>

</tr> <tr> <td align="right"><font color="#000" size="2" face="verdana" style="fontweight:bold">Full Name</font></td> <td align="center"><font color="#000" size="2" face="verdana" style="fontweight:bold">:</font></td> <td><input type='text' name='name' size=30 maxlength=30 class="tb3"></td> </tr> <tr> <td align="right"><font color="#000" size="2" face="verdana" style="fontweight:bold">Password</font></td> <td align="center"><font color="#000" size="2" face="verdana" style="fontweight:bold">:</font></td> <td><input type='password' name='pword' size=30 maxlength=10 class="tb3"> <font color="#000" size="1" face="verdana">max 10 digit</font> </td> </tr> <tr> <td align="right"><font color="#000" size="2" face="verdana" style="fontweight:bold">Re-Enter Password </font></td> <td align="center"><font color="#000" size="2" face="verdana" style="fontweight:bold">:</font></td> <td><input type='password' name='pword2' size=30 maxlength=10 class="tb3"> <font color="#000" size="1" face="verdana">max 10 digit</font></td> </tr> <tr> <td align="right"><font color="#000" size="2" face="verdana" style="fontweight:bold">Deposit ($)</font></td> <td align="center"><font color="#000" size="2" face="verdana" style="fontweight:bold">:</font></td> <td><input type='text' name='depo' size=20 maxlength=10 class="tb3"> <font color="#000" size="1" face="verdana">min $200</font> </td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr>

<tr> <td> <?php $day=date("j M Y"); $time=date( "g:i:sa"); echo "<input type='hidden' name='day' value='$day'>"; echo "<input type='hidden' name='time' value='$time'>"; ?> </td> <td align="center">&nbsp; </td> <td><input name="submit" type='submit' value='Register' class="button1"> <input name="reset" type='reset' value='Reset' class="button1"></td> </tr> </table> </form></center> </body> </html>

register_preview.php
<html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> </head> <body> <a href="main.php" class="me">Home</a> <?php $acct=$_GET['acct']; include 'db_connect.php'; $sql = "SELECT * FROM myacct WHERE acct='$acct'"; $result = mysql_query($sql) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result)) {

$acct=$row["acct"]; $card=$row["card"]; $name=$row["name"]; $day=$row["day"]; ?> <br><br><br><br><br><br><br><br> <center> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="3" class="td"> <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Registration Complete(Collect the info:)</font></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td width="37%" align="right"><font color="#000000" size="3" face="arial"><b>Account Number</b></font></td> <td width="7%" align="center"><font color="#000000" size="3" face="arial">:</font></td> <td width="56%"><font color="#000000" size="3" face="arial"><b><?php echo"$acct"; ?></b></font></td> </tr> <tr> <td align="right"><font color="#000000" size="3" face="arial"><b>Identity Card</b> </font></td> <td align="center"><font color="#000000" size="3" face="arial">:</font><br> </td> <td><font color="#000000" size="3" face="arial"><b><?php echo"$card"; ?></b></font></td> </tr> <tr>

<td align="right"><font color="#000000" size="3" face="arial"><b>Full Name</b></font></td> <td align="center"><font color="#000000" size="3" face="arial">:</font><br> </td> <td><font color="#000000" size="3" face="arial"><b><?php echo"$name"; ?></b></font></td> </tr> <tr> <td align="right">&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr align="center"> <td colspan="3"> <form action='main.php' method='post' > <input type='submit' value='Proceed' class="button1"> </form></td> </tr> </table> </center> <?php } ?> </body> </html>

register_write.php
<html> <body bgcolor='#333333'> <?php include 'db_connect.php'; $sql = "SELECT * FROM acct_no WHERE used='no' order by id LIMIT 0,1"; $result = mysql_query($sql) or die("SQL select statement failed"); $row = mysql_fetch_array($result); if (mysql_num_rows($result)){ $acct = $row["acct"];

$card = $_POST["card"]; $name = $_POST["name"]; $pword = $_POST["pword"]; $depo= $_POST["depo"]; $time = $_POST["time"]; $day = $_POST["day"]; $sql2 = "INSERT INTO myacct(acct, card, name, depo, day) VALUES ('$acct', '$card', '$name', '$depo', '$day')"; $result2 = mysql_query($sql2) or die(" <script language='JavaScript'> window.alert('Sorry, you already register!') </script> <meta http-equiv='REFRESH' content='0; url=register.php'> "); $sql3 = "INSERT INTO login(acct, card, name, pword, role) VALUES ('$acct', '$card', '$name', MD5('$pword'), 'user')"; $result3 = mysql_query($sql3) or die(" <script language='JavaScript'> window.alert('Sorry, you already register!') </script> <meta http-equiv='REFRESH' content='0; url=register.php'> "); $sql4 = "INSERT INTO event(acct, depo, event, time, day) VALUES ('$acct', '$depo', 'Deposit', '$time', '$day')"; $result4 = mysql_query($sql4); $sql5 = "UPDATE acct_no SET used = 'yes' WHERE acct = '$acct'"; $result5 = mysql_query($sql5); if ($result5){ header("Location: register_preview.php?acct=$acct"); } else{ die(mysql_error()); }

} else{ echo "<script language='JavaScript'> window.alert('System error, Ask administration for further detail!') </script> <meta http-equiv='REFRESH' content='0; url=main.php'>"; } ?></body></html>

transaction.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> </head> <body> <a href="myacct.php" class="me">Home</a> <br><br><br><br> <center> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="0" bgcolor="#000000" class="td"> <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Transactions</font></td>

</tr> <tr> <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="2"> <tr> <td>&nbsp;</td> </tr> <tr> <td> <?php include 'db_connect.php'; $sql = "SELECT * FROM event WHERE acct='$xacct' ORDER BY id DESC"; $result = mysql_query($sql); echo "<table width='100%' border='1' align='center' bgcolor='#000000'>"; echo "<tr><td align='center'><font color='#00FF00' size='2' face='arial'><b>No</b></font></td>"; echo "<td align='center'><font color='#00FF00' size='2' face='arial'><b>Transaction</b></font></td>"; echo "<td align='center'><font color='#00FF00' size='2' face='arial'><b>Value ($)<b/></font></td>"; echo "<td align='center'><font color='#00FF00' size='2' face='arial'><b>Date</b></font></td>"; echo "<td align='center'><font color='#00FF00' size='2' face='arial'><b>Time</b></font></td></tr>"; $counter=1; while ($row = mysql_fetch_array($result)) { $acct=$row["acct"]; $depo=$row["depo"]; $event=$row["event"]; $time=$row["time"]; $day=$row["day"]; echo "<tr><td align='center'><font color='#00FF00' size='1' face='verdana'>$counter</font></td>"; echo "<td align='center'><font color='#00FF00' size='1' face='verdana'>$event</font></td>"; echo "<td align='center'><font color='#00FF00' size='1' face='verdana'>$ $depo</font></td>";

echo "<td align='center'><font color='#00FF00' size='1' face='verdana'>$day</font></td>"; echo "<td align='center'><font color='#00FF00' size='1' face='verdana'>$time</font></td></tr>"; $counter++; } echo "</table>"; ?> </td> </tr> </table></td> </tr> <tr> <td align="center">&nbsp;</td> </tr> <tr> <td align="center"> <form action='myacct.php' method='post' > <input type='submit' value='back' class="button1"> </form></td> </tr> </table> </center> </body> </html>

transfer.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <html>

<head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> <script language="JavaScript"> function validated(){ var acct2 = document.s.acct2.value; var myacct = document.s.myacct.value; if(acct2==""){ window.alert("Please enter account number!"); document.s.acct2.focus(); return false; } if(acct2==myacct){ window.alert("You are not allow to transfer to your own account!"); return false; } } </script> </head> <body> <a href="myacct.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <center> <form action='transfer2.php' method='post' name='s' onsubmit='return validated()';> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="4" class="td"> <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Transfer money to other account</font></td> </tr> <tr>

<td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td> <td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Account Number</font><br> <font color="#000000" size="2" face="arial"> <input type='text' name='acct2' size=30 maxlength=20 class="tb3"><b> <input type='hidden' name='myacct' value='<?php echo"$xacct"; ?>'> </font><br> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"> <font color="#000000" size="3" face="arial">&nbsp;</font> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp; </td> <td>&nbsp;</td> </tr> </table> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="0"> <tr> <td width="52%" align="right"> <input type='submit' value='Confirm' class="button1"></form> </td> <td width="48%"> <form action='myacct.php' method='post'> <input type='submit' value='Back' class="button1"> </form></td> </tr>

</table> </center> </body> </html>

transfer2.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> <script language="JavaScript"> function validated(){ var depos = document.s.depos.value; var depo = document.s.depo.value; var deposint = parseInt(depos); var depos2 = depos <= 9; var bal = depo-depos; if(depos==""){ window.alert("Please enter transfer value!"); document.s.depos.focus(); return false; } if(isNaN(deposint)){ window.alert("Please enter transfer value!");

document.s.depos.focus(); return false; } if(depos2){ window.alert("Transfer value must not less than $10!"); return false; } if(bal < 10){ window.alert("Sorry, your balance is not enough. Minimum balance in your account must not less than $10!"); return false; } } </script> </head> <body> <a href="myacct.php" class="me">Home</a> <br><br><br><br><br><br> <?php $acct2=$_POST["acct2"]; include 'db_connect.php'; $sql = "SELECT acct, card, name FROM myacct WHERE acct='$acct2'"; $result = mysql_query($sql) or die("SQL select statement failed"); $row = mysql_fetch_array($result); if (mysql_num_rows($result)){ $acct=$row["acct"]; $card=$row["card"]; $name=$row["name"]; ?> <form action='transfer_write.php' method='post' name='s' onsubmit='return validated()';> <center> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="4" class="td"> <tr align="center">

<td colspan="3"><font color="#000000" size="4" face="verdana">Transfer money to other account</font></td> </tr> <tr> <td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td> <td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Account Number</font> <br> <font color="#000000" size="3" face="arial"><b><?php echo"$acct"; ?></b></font> <input type='hidden' name='acct' value='<?php echo"$acct"; ?>'> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Identity Card</font><br> <font color="#000000" size="3" face="arial"><b><?php echo"$card"; ?></b></font> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Name</font> <br> <font color="#000000" size="3" face="arial"><b><?php echo"$name"; ?></b></font> </td> <td> <?php $day=date("j M Y");

$time=date( "g:i:sa"); echo "<input type='hidden' name='day' value='$day'>"; echo "<input type='hidden' name='time' value='$time'>"; ?> <?php } else { echo "<script language='JavaScript'>"; echo "window.alert('Account number not exist.')"; echo "</script>"; echo "<meta http-equiv='REFRESH' content='0; url=transfer.php'>"; } $sql2 = "SELECT depo FROM myacct WHERE acct='$xacct'"; $result2 = mysql_query($sql2) or die("SQL select statement failed"); $row = mysql_fetch_array($result2); if (mysql_num_rows($result2)){ $depo=$row["depo"]; echo "<input type='hidden' name='depo' value='$depo'>"; } ?> </td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"> <font color="#000000" size="2" face="arial"><b>$ </b></font> <input type='text' name='depos' size=30 maxlength=10 class="tb3"> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td>

<td align="center">&nbsp; </td> <td>&nbsp;</td> </tr> </table> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="0" > <tr> <td width="55%" align="right"> <input type='submit' value='Transfer' class="button1"></form> </td> <td width="45%"> <form action='transfer.php' method='post'> <input type='submit' value='Back' class="button1"> </form></td> </tr> </table> </center> </body> </html>

transfer_write.php
<html> <body bgcolor='#333333'> <?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <?php include 'db_connect.php'; $acct=$_POST["acct"]; $depos=$_POST["depos"];

$time = $_POST["time"]; $day = $_POST["day"]; $sql = "SELECT * FROM myacct WHERE acct = '$acct'"; $result = mysql_query($sql) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result)) { $acct = $row["acct"]; $depo= $row["depo"]; } $bal = $depo+$depos; $sql2 = "UPDATE myacct SET depo = '$bal' WHERE acct = '$acct'"; $result2 = mysql_query($sql2); $sql2 = "SELECT * FROM myacct WHERE acct = '$xacct'"; $result2 = mysql_query($sql2) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result2)) { $depo= $row["depo"]; } $bal2 = $depo - $depos; $sql2 = "UPDATE myacct SET depo = '$bal2' WHERE acct = '$xacct'"; $result2 = mysql_query($sql2); $sql3 = "INSERT INTO event(acct, depo, event, time, day) VALUES ('$xacct', '$depos', 'Transfer', '$time', '$day')"; $result3 = mysql_query($sql3); if ($result3){ header("Location: myacct.php"); } else{ die(mysql_error()); } ?> </body> </html>

withdrawal.php

<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <?php include 'db_connect.php'; $sql = "SELECT * FROM myacct WHERE acct='".$_SESSION['xacct']."'"; $result = mysql_query($sql) or die("SQL select statement failed"); while ($row = mysql_fetch_array($result)) { $acct=$row["acct"]; $depo=$row["depo"]; ?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> <script language="JavaScript"> function validated(){ var wdraw = document.s.wdraw.value; var wdrawint = parseInt(wdraw); var depo = document.s.depo.value; var bal = depo-wdraw; if(wdraw==""){ window.alert("Please enter withdrawal value!"); document.s.wdraw.focus(); return false; } if(isNaN(wdrawint)){ window.alert("Please enter withdrawal value!");

document.s.wdraw.focus(); return false; } if(wdraw <= 9){ window.alert("Withdrawal value must not less than $10!"); return false; } if(bal < 10){ window.alert("Sorry, your balance is not enough. Minimum balance in your account must not less than $10!"); return false; } } </script> </head> <body > <a href="myacct.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <center> <form action='withdrawal_write.php' method='post' name='s' onsubmit='return validated()';> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="3" class="td" > <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Withdraw from your account</font></td> </tr> <tr> <td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td> <td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td>

<td align="center"><font color="#000000" size="1" face="verdana">Account Number</font><br> <font color="#000000" size="2" face="arial"><b><?php echo"$acct"; ?><b></b></font><br> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"> <font color="#000000" size="2" face="arial"><b>$ </b></font><input type='text' name='wdraw' size=30 maxlength=10 class="tb3"> <input type='hidden' name='depo' value="<?php echo"$depo"; ?>"> <?php $day=date("j M Y"); $time=date( "g:i:sa"); echo "<input type='hidden' name='day' value='$day'>"; echo "<input type='hidden' name='time' value='$time'>"; ?> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp; </td> <td>&nbsp;</td> </tr> </table> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="3" > <tr> <td width="55%" align="right"> <input type='submit' value='Withdrawal' class="button1"></form>

</td> <td width="45%"> <form action='myacct.php' method='post'> <input type='submit' value='Back' class="button1"> </form></td> </tr> </table> <?php } ?> </center> </body> </html>

withdrawal_write.php
<html> <body bgcolor='#333333'> <?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <?php include 'db_connect.php'; $wdraw=$_POST["wdraw"]; $time = $_POST["time"]; $day = $_POST["day"]; $sql = "SELECT * FROM myacct WHERE acct = '$xacct'"; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $acct = $row["acct"];

$depo= $row["depo"]; } $bal= $depo-$wdraw; $sql2 = "UPDATE myacct SET depo = '$bal' WHERE acct = '$xacct'"; $result2 = mysql_query($sql2); $sql3 = "INSERT INTO event(acct, depo, event, time, day) VALUES ('$xacct', '$wdraw', 'Withdrawal', '$time', '$day')"; $result3 = mysql_query($sql3); if ($result3){ header("Location: myacct.php"); } else{ die(mysql_error()); } ?> </body> </html>

deposit.php
<?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <html> <head> <link href="css/style.css" rel="stylesheet" type="text/css"> <style type="text/css"> html{ background: url(data/2.jpg) repeat; } </style> <script language="JavaScript"> function validated(){

var depos = document.s.depos.value; var deposint = parseInt(depos); var depos2 = depos <= 9; if(depos==""){ window.alert("Please enter deposit value!"); document.s.depos.focus(); return false; } if(isNaN(deposint)){ window.alert("Please enter deposit value!"); document.s.depos.focus(); return false; } if(depos2){ window.alert("Sorry, deposit must not less than $10!"); return false; } } </script> </head> <body> <a href="myacct.php" class="me">Home</a> <br><br><br><br><br><br><br><br> <? $xacct=$_SESSION['xacct']?> <center> <form action='deposit_write.php' method='post' name='s' onsubmit='return validated()';> <table width="50%" border="0" align="center" cellpadding="2" cellspacing="3" class="td"> <tr align="center"> <td colspan="3"><font color="#000000" size="4" face="verdana">Deposit money</font></td> </tr> <tr> <td width="20%">&nbsp;</td> <td width="61%">&nbsp;</td>

<td width="19%">&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"><font color="#000000" size="3" face="verdana">Account Number</font><br> <font color="#000000" size="3" face="arial"><b><?php echo"$xacct"; ?></b></font><br> </td> <td> <?php $day=date("j M Y"); $time=date( "g:i:sa"); echo "<input type='hidden' name='day' value='$day'>"; echo "<input type='hidden' name='time' value='$time'>"; ?> </td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp;</td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center"> <font color="#000000" size="3" face="arial"><b>$ </b></font><input type='text' name='depos' size=30 maxlength=10 class="tb3"> </td> <td>&nbsp;</td> </tr> <tr> <td>&nbsp;</td> <td align="center">&nbsp; </td> <td>&nbsp;</td> </tr> </table>

<table width="50%" border="0" align="center" cellpadding="2" cellspacing="3" > <tr> <td width="55%" align="right"> <input type='submit' value='Deposit' class="button1"></form> </td> <td width="45%"> <form action='myacct.php' method='post'> <input type='submit' value='Back' class="button1"> </form></td> </tr> </table> </center> </body> </html>

deposit_write.php
<html> <body bgcolor='#333333'> <?php session_start(); if ($_SESSION['xrole'] != 'user') { header("Location: main.php"); exit(); } ?> <? $xacct=$_SESSION['xacct']?> <?php include 'db_connect.php'; $depos=$_POST["depos"]; $time = $_POST["time"]; $day = $_POST["day"]; $sql = "SELECT * FROM myacct WHERE acct = '$xacct'"; $result = mysql_query($sql) or die("SQL select statement failed");

while ($row = mysql_fetch_array($result)) { $acct = $row["acct"]; $depo= $row["depo"]; } $bal = $depo+$depos; $sql2 = "UPDATE myacct SET depo = '$bal' WHERE acct = '$xacct'"; $result2 = mysql_query($sql2); $sql3 = "INSERT INTO event(acct, depo, event, time, day) VALUES ('$xacct', '$depos', 'Deposit', '$time', '$day')"; $result3 = mysql_query($sql3); if ($result3){ header("Location: myacct.php"); } else{ die(mysql_error()); } ?> </body> </html>

db_connect.php
<?php $dbhost= 'localhost'; $dbuser= 'root'; $conn =mysql_connect($dbhost, $dbuser) or die ("Could not connect to mysql"); $dbname= 'bank'; mysql_select_db($dbname); ?>

HTML PAGES
header.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Greengotts</title> <link href="css/style.css" rel="stylesheet" type="text/css"> </head> <body> <div id="content"> <ul id="nav"> <li id="list1"><a href="main.php"><span>Home</span></a></li> <li id="list2"><a href="register.php"><span>Registration</span></a></li> <li id="list3"><a href="gringotts.html"><span>About Bank</span></a></li> <li id="list4"><a href=""><span>Documentation</span></a></li> <li id="list5"><a href="developers.html"><span>Developers</span></a></li> </ul> </div> </body> </html>

footer.html
<html> <head> </head> <body> <br><br><br><br><br><br><br><br><br><br> <p align="right"><font color="#ffffff" size="2" face="verdana"> Bank </font></p> </body> </html> Copyright Gringotts

gringotts.html
<html> <style type="text/css">

/* Remove margins from the 'html' and 'body' tags, and ensure the page takes up full screen height */ html, body {height:100%; margin:0; padding:0;} /* Set the position and dimensions of the background image. */ #page-background {position:fixed; top:0; left:0; width:100%; height:100%;} /* Specify the position and layering for the content that needs to appear in front of the background image. Must have a higher z-index value than the background image. Also add some padding to compensate for removing the margin from the 'html' and 'body' tags. */ #content {position:relative; z-index:1; padding:10px;} </style> <!-- The above code doesn't work in Internet Explorer 6. To address this, we use a conditional comment to specify an alternative style sheet for IE 6 --> <!--[if IE 6]> <style type="text/css"> html {overflow-y:hidden;} body {overflow-y:auto;} #page-background {position:absolute; z-index:-1;} #content {position:static;padding:10px;} </style> <![endif]--> <body> <div id="page-background"><img src="data/gringotts.jpg" width="100%" height="100%" alt="Smile"></div> <div id="content"> <a href="main.php"><img src="data/home.png" align="bottom" width="70" height="70" vspace=20 hspace=50 /></a> </div> </body> </html>

CSS FILES
css/style.css
* {margin: 0px; padding: 0px;} #nav {

z-index:2; background: url(../data/1.png); height: 38px; width: 889px; margin: 0px auto; position: relative; top: 30px; } #nav li { list-style-type: none; float: left; } #nav a { height: 38px; display: block; } #nav span {display: none;} #list1 { width: 107px; } #list2 { width: 195px; } #list3 { width: 196px; } #list4 { width: 195px; } #list5 { width: 196px; } #list1 a:hover { background: url(../data/1.png) 0px -38px no-repeat; } #list2 a:hover { background: url(../data/1.png) -107px -38px no-repeat; } #list3 a:hover { background: url(../data/1.png) -302px -38px no-repeat; } #list4 a:hover { background: url(../data/1.png) -498px -38px no-repeat; } #list5 a:hover { background: url(../data/1.png) -692px -38px no-repeat;

} /* Border Color / Style */ .tb3 { border: 3px double #CCCCCC; width: 230px; } .button1{ background: url(../data/login1.png); text-align:center; width:100px; height:26px; border:0px } .td { background: url(../data/texture.png) repeat; -moz-border-radius: 40px; border-radius: 40px; } .me{ z-index:3; background: url(../data/GG.png); height: 128px; width: 128px; margin: 0px auto; position: relative; top: 70px; display: block; text-indent:-9999px } #img{ border:5px solid black; }

4.2.
Efficiency of code is concerned with the proper use of scarce resources by the system. In computer systems, the resources that are most often considered for efficiency are processor time and memory. An efficient system is one that consumes less processor time and requires less memory. The efficiency of the code or program depends on: Readability: Coding should be readable. Portability: Coding or program should be written in such a form such that it could run on different machines with little or no change. Easy Debugging: Coding should be such that errors could easily be removed or debugged. That is, our coding should be as much error free as possible. Easy Software Development: Software should easily be developed. Commands of programming language are similar to natural languages (English). Short & Precise Coding: Coding should not be lengthy. It should be short and precise. This factor is most important for efficient coding.

To make the code more efficient the following points have been maintained: The whole project has been designed with a modular approach.

Code is optimized by defining user-defined public functions and variables, which have been easily used in different project modules for the readability, understandability of the code. Variables are declared as global or local according to the scope of that variable.

4.3.
Error handling through Field and Form Level Validation: Field validation is done to restrict the user to input accurate data. Such as Name field cannot contain digit, Date must be valid and in DD-MMM-YYYY format. Form Level validation is done to restrict user not to leave important field blank. According to the error proper message has been shown. PHP does not provide direct support for error handling (also known as exception handling). By convention, the programmer is expected to prevent errors from occurring in the first place, and test return values from functions. In a worst case scenario where there is an unavoidable error and no way to recover from it, a PHP programmer usually tries to log the error and terminates the program.

4.4.

Different Global Function & Procedures are being used in this project. Parameters are accordingly passed at the time of calling of these functions.

4.5.

It has been noted during the analysis and design phase that the system goes through various validations in all its operation. In view of the course

many levels of validation checks have been done, which basically relate to the white box testing techniques.

The checks performed are as under: 1. The validation checks are performed on the following input entities as mentioned below: a) User Name b) Password 2. According to the integrity the id field should not be blank, if at all it is kept blank then a message is imparted to maintain the normal input state of the form. 3. Other checks that are performed are by typing an invalid user name (i.e. a username that is not in the database of the project.) In this case too, the normal working of the project is halted with a user message to input an authentic user name. This check is an important one, as it maintains the integrity and security of the system. As in the case of id the field cannot be kept blank, here too the same condition prevails. If such violation attempted then the system automatically detects it and terminates the users further access to the program by means of valid error messages. 4. In data entry field the data that is entered would be checked as per the data type of the different fields defined in the Back End and in the Input Form. If the data field were numeric field then only the numeric values can be entered otherwise if the data field is alphanumeric it would accept the same.

5.
Testing is process of finding differences between the expected behaviors specified by system models and the observed behavior of the system. Testing is defined as the process in which defects are identified, isolated, subjected for rectification and ensured that product is defect free in order to produce the quality product and hence customer satisfaction.

5.1.

Testing Methodologies 1. Black Box Testing 2. White Box Testing

Levels of Testing 1. Unit Testing 2. Module Testing 3. Integration Testing 4. System Testing

Test Cases 1. GUI Test Cases: Total number of features that need to be checked Look and feel Look for default values if at all any (date & time, if at all any required) Look for spell check

T.C.No.

Description Check for all the features in the screen Check for the alignment of the objects as per the validations

Expected value The screen must contain all the features The alignment should be in proper way

Actual value Screen contains all the features Alignment is as per validation

Result OK

OK

2. Positive Test Cases:


The positive flow of the functionality must be considered. Valid inputs must be used for testing.

T.C.No. 1

Description Enter the valid User Name and Password into the respective fields

Expected value It should accept

Actual value Result Accepted OK

3. Negative Test Cases:


Must have negative perception. Invalid inputs must be used for test.

T.C.No. 1

Description Enter the invalid User Name and Password into the respective fields

Expected value It should not accept

Actual value Result Not accepted OK

6.
6.1.
The data security has been implemented by storing the Passwords of the respective User Accounts, in the database, using MD5 Encryption, which is provided by the PHP Interface by default. Thus, the data is amply secure in the database.

7.

For the estimation of the cost of our project we use COCOMO (Consturctive Cost Estimation Model). Our project is considered to be organic as it satisfies the following condition: The project deals with a well understood application problem. The size of the development team is moderate. Now considering the lines of codes of the basic pages (deducting the comment lines, as they will not get executed), we get the following results: PAGE main.php login.php myacct.php register.php register_preview.php register_write.php transaction.php transfer.php transferto.php transfer_write.php withdrawal.php withdrawal_write.php deposit.php deposit_write.php NO. OF LINES 87 33 93 115 68 67 76 83 150 56 115 43 102 44

balance.php Total Lines = = 1217 1.217 KLOC*

85

The sole reason behind using the pages/functions is that, they are critical for the development of Gringotts e-Bank, and remaining pages are based on these pages with minor changes. Now, we can calculate the Development Effort and Development Time of the project: Estimation of Development Effort: Effort = 2.4*(KLOC) 1.05 PM = 2.4*(1.217) 1.05 PM = 2.95 PM

Estimation of Development Time: Tdev = 2.5 * (Effort) 0.38 months = 2.5 * (2.95) 0.38 months = 3.77 months

Assuming the uniform wage amount and other installation requirements as the initial cost of the project, which is assumed to be Rs. 4,000/-. So, the initial cost of the project is = 3.77 X 4,000 = Rs. 15080/-. Adding an extra amount of Rs. 2500/- as the setup cost.

Hence, total cost of the project is Rs. 17580/-; or Rs.18000/- approximately.

8.
It is not possible to develop a system that meets all the requirements of the user. User requirements keep changing as the system is being used. Some of the future enhancements that can be done to this system are: As the technology emerges, it is possible to upgrade the system and can be adaptable to desired environment. Because it is based on object-oriented design, any further changes can be easily adaptable. Based on the future security issues, security can be improved using emerging technologies.

Gringotts e-Bank has beneficial outcomes for both the user as well as the developer; right from maintaining an account to keeping track of every transaction. However, every system is probable to change in due course of time depending on the requirement of the users, and growing demands in the market. Yet, Gringotts e-Bank is a very handy application for the users of such a concern whose main aim is customer satisfaction and attracting new clients towards the organization. It will provide a key to increase the business of the organization and will be a helpful tool to clients who wants to open an account in a bank.

9.
I. BOOKS

Fundamentals of Software Engineering by Rajib Mall Database System Concepts by Silberschatz-Korth-Sudarshan

II.

ONLINE

http://www.ziadraphael.com/ebanking http://rbidocs.rbi.org.in/rdocs/PublicationReport/Pdfs/21595.pdf

10.

a. b. c.

PERT- Program Evaluation and Review Technique KLOC- Kilos of line TDev- Development time

Vous aimerez peut-être aussi