Skip to content

Commit

Permalink
Final update
Browse files Browse the repository at this point in the history
  • Loading branch information
IkramulMurad committed Apr 26, 2017
1 parent 2614423 commit 18bdf70
Show file tree
Hide file tree
Showing 46 changed files with 68 additions and 50,043 deletions.
Binary file added Book/ATM.pptx
Binary file not shown.
2 changes: 1 addition & 1 deletion atmp/admin/admin_addcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if($_POST){
$errors = array();
Expand Down
2 changes: 1 addition & 1 deletion atmp/admin/admin_addclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if($_POST){
$errors = array();
Expand Down
2 changes: 1 addition & 1 deletion atmp/admin/admin_home.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["logout"])){
session_destroy();
Expand Down
2 changes: 1 addition & 1 deletion atmp/admin/admin_login.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if($_POST){
$_SESSION["id"] = $_POST["id"];
Expand Down
2 changes: 1 addition & 1 deletion atmp/admin/admin_scanface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if($_POST){
$path = 'C:\\Python27\\python.exe';
Expand Down
2 changes: 1 addition & 1 deletion atmp/admin/admin_success.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["home"])){
header('Location: admin_home.php');
Expand Down
Binary file modified atmp/atm_machine/alert.mp3
Binary file not shown.
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_cardauthentication.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["face"])){
header('Location: atm_face.php');
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_cardenter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

$myfile = fopen("alert.txt", "w"); fwrite($myfile, "0"); fclose($myfile);

Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_cardinactive.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["submit"])){
header('Location: atm_cardenter.php');
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_cardinvalid.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["submit"])){
header('Location: atm_cardenter.php');
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_confirmclient.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</div>

<script>
setInterval(checkVariableValue, 5000);
setInterval(checkVariableValue, 2500);
function checkVariableValue() {
$.ajax({
method: 'POST',
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_face.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

$query = "SELECT account_number FROM card WHERE card_number = '" . $_SESSION["card_no"] . "'";
$res = mysqli_query($conn, $query);
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_insecureattempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
$myfile = fopen("alert.txt", "w"); fwrite($myfile, "1"); fclose($myfile);

session_destroy();
header('Refresh : 18; url = atm_cardenter.php');
header('Refresh : 7; url = atm_cardenter.php');
?>

<!DOCTYPE html>
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_invalidface.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["submit"])){
header('Location: atm_face.php');
Expand Down
4 changes: 2 additions & 2 deletions atmp/atm_machine/atm_invalidpin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if(isset($_POST["submit"])){
header('Location: atm_pin.php');
Expand All @@ -32,7 +32,7 @@
<h1>ATM
<span>Fraud Detection System</span>
</h1>
<p style="font-size: 20px;">Invalid PIN!</p>
<p style="font-size: 20px;">Incorrect PIN!</p>

<label>
<span>&nbsp;</span>
Expand Down
2 changes: 1 addition & 1 deletion atmp/atm_machine/atm_pin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

if($_POST){
$errors = array();
Expand Down
14 changes: 2 additions & 12 deletions atmp/atm_machine/atm_success.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,14 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";

if(isset($_SESSION["balance"]) && isset($_SESSION["account_no"])){
$balance = $_SESSION["balance"];
$acc_no = $_SESSION["account_no"];
}

if(isset($_SESSION["blnc"]) && isset($_SESSION["acc_no"])){
$balance = $_SESSION["blnc"];
$acc_no = $_SESSION["acc_no"];
}
//if($conn) echo "Connected Successfully";

$myfile = fopen("query.txt", "r"); $query = fread($myfile, filesize("query.txt")); fclose($myfile);
mysqli_query($conn, $query);

$myfile = fopen("atrl.txt", "w"); fwrite($myfile, "0"); fclose($myfile);

header('Refresh : 15; url = atm_cardenter.php');
header('Refresh : 7; url = atm_cardenter.php');
?>

<!DOCTYPE html>
Expand Down
2 changes: 0 additions & 2 deletions atmp/atm_machine/atm_transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,12 @@
$myfile = fopen("query.txt", "w"); fwrite($myfile, $query); fclose($myfile);

if ($_SESSION["auth"] == "face") {
//mysqli_query($conn, $query);
header('Location: atm_success.php');
exit();
}
else if($_SESSION["auth"] == "pin"){
$myfile = fopen("../client/clrl.txt", "w"); fwrite($myfile, "1"); fclose($myfile);

//header('Location: atm_success.php');
header('Location: atm_confirmclient.php');
exit();
}
Expand Down
2 changes: 1 addition & 1 deletion atmp/client/client_card_deactivation.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
</div>

<script>
setInterval(checkVariableValue, 5000);
setInterval(checkVariableValue, 2500);
function checkVariableValue() {
$.ajax({
method: 'POST',
Expand Down
4 changes: 2 additions & 2 deletions atmp/client/client_insecureattempt.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
header('Refresh : 4; url = client_card_deactivation.php');
header('Refresh : 3; url = client_card_deactivation.php');
?>

<!DOCTYPE html>
Expand All @@ -18,7 +18,7 @@
<span>Fraud Detection System</span>
</h1>

<p style="font-size: 20px;">Insecure Transaction Attempt.</p>
<p style="font-size: 20px;">A report message is sent.</p>

</div>

Expand Down
5 changes: 2 additions & 3 deletions atmp/client/client_successful.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
$db = "projectDB";

$conn = mysqli_connect($server, $user, $password, $db);
if($conn) echo "Connected Successfully";
//if($conn) echo "Connected Successfully";

header('Refresh : 4; url = client_card_deactivation.php');
header('Refresh : 3; url = client_card_deactivation.php');
?>

<!DOCTYPE html>
Expand All @@ -29,7 +29,6 @@
<span>Fraud Detection System</span>
</h1>
<p style="font-size: 20px;">Transaction Succesfull!</p>
<p style="font-size: 20px;">Thank You</p>

</form>

Expand Down
43 changes: 43 additions & 0 deletions atmp/database/dbfinal.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@

CREATE TABLE `admin` (
`id` int(10) NOT NULL,
`password` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


INSERT INTO `admin` (`id`, `password`) VALUES
(1, '1234');


CREATE TABLE `card` (
`card_number` int(10) NOT NULL,
`account_number` int(10) NOT NULL,
`pin` varchar(50) NOT NULL,
`card_state` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


CREATE TABLE `user` (
`name` varchar(50) NOT NULL,
`account_number` int(10) NOT NULL,
`password` varchar(50) NOT NULL,
`balance` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


ALTER TABLE `admin`
ADD PRIMARY KEY (`id`);


ALTER TABLE `card`
ADD PRIMARY KEY (`card_number`);

ALTER TABLE `user`
ADD PRIMARY KEY (`account_number`);

ALTER TABLE card
ADD CONSTRAINT fk_account_number
FOREIGN KEY (account_number)
REFERENCES user(account_number)
ON UPDATE CASCADE
ON DELETE CASCADE;
Binary file removed atmp/face_recognition/dataset/user_1202_1.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_10.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_11.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_12.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_13.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_14.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_15.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_16.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_17.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_18.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_19.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_2.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_20.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_3.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_4.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_5.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_6.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_7.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_8.jpg
Binary file not shown.
Binary file removed atmp/face_recognition/dataset/user_1202_9.jpg
Binary file not shown.
Loading

0 comments on commit 18bdf70

Please sign in to comment.