Files
cs157AOnlineBanking/proj.txt

92 lines
3.2 KiB
Plaintext
Raw Normal View History

2014-10-25 14:06:33 -07:00
Posting Date:
Team Name: Team F8LException
Project Title: Online Banking System
2014-10-25 14:06:33 -07:00
Database Title:
Database Schema
2014-10-25 19:06:37 -07:00
1. Users {id, username, password, checkingAmount, savingsAmount}
int id: autogenerated id number.
String username: Customer's account username.
String password: Customer's account password.
boolean checkingAmount: yes if customer has a checking account.
boolean savingsAmount: yes if customer has a savings account.
2. Transfer {id1, id2, amount, checking, savings}
int id1: sender.
int id2: recipient.
double amount: amount to transfer.
boolean checking: true if amount is coming from checking account.
boolean savings: true if amount is coming from savings account.
3. Loan {id, date, overdue, amount, balance}
int id: sender.
Date date: date of payment.
boolean overdue: true if payment is late.
double amount: amount to pay.
double balance: remaining balance.
2014-10-25 18:43:46 -07:00
2014-10-25 19:06:37 -07:00
4. Checking {id, balance, amount}
int id: customer id.
double balance: checking balance.
double amount: amount to withdraw or deposit.
5. Savings {id, balance, interestRate, amount}
int id: customer id.
double balance: savings balance.
double interestRage: interest rate to add to balance.
double amount: amount to withdraw or deposit.
2014-10-25 18:43:46 -07:00
Functional Requirements
1. Customer can register to create an account.
2. Customer can close their account.
3. Customer can log into their account.
4. Customer can log out of their account.
5. Customer can change password.
6. Customer can reset their password.
7. Customer can check their checking account balance.
8. Customer can check their savings account balance.
9. Customer can withdraw from their accounts.
10. Customer can deposit to their accounts.
11. Customer can view their statements from each account (Checking and Savings).
12. Customer can pay their credit card bill.
13. Administrator can reset non-Admin password.
14. Administrator can view customers who have a zero balance in their checking and/or savings account.
15. Administrator can view who is a late paying their credit card bill.
Requirements Functionalities
//Send Query to Database
function queryMysql($query){
global $conection;
$result = $conection->query($query);
if (!$result) die ($conection->error);
return $result;
}
// Customer Registration
function registration ($username, $password, $checkAmount, $savingsAmount){
$result = queryMysql("INSERT INTO Users(username, password, checkingAmount, savingsAmount)
VALUES ('$username', '$password', '$checkAmount', '$savingsAmount'");
}
// Customer Account Cancellation
function cancelAccount ($username){
$result = queryMysql("DELETE FROM Users WHERE username = '$username'");
}
// Customer Log In
function userLogIn ($username, $password){
$result = queryMysql("SELECT * FROM Users WHERE username='$username' and password='$password'");
}
// Customer Change Password
function checkPassword($username, $oldPass, $newPass){
$result = queryMysql("UPDATE Users SET password = '$newPass' WHERE old.password='$oldPass'");
}
// Reset Customer Password
function resetPassword ($username) {
$salt1 = "qm&h";
$token = hash('f8luser', "$salt1'somePassword'");
$result = queryMysql("UPDATE Users SET password='$token'");
return $token;
}