Skip to content

Commit 15991d9

Browse files
committed
first commit
0 parents  commit 15991d9

File tree

115 files changed

+7503
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+7503
-0
lines changed

action_style.css

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
body {
2+
background-color: #FAFAFA;
3+
}
4+
5+
.flex-container {
6+
display: -webkit-flex;
7+
display: flex;
8+
flex-direction: column;
9+
margin-left: 256px;
10+
width: auto;
11+
12+
height: auto;
13+
-webkit-flex-wrap: wrap;
14+
flex-wrap: wrap;
15+
background-color: #FAFAFA;
16+
}
17+
18+
.flex-item {
19+
display: -webkit-flex;
20+
display: flex;
21+
22+
background-color: #FAFAFA;
23+
width: auto;
24+
height: auto;
25+
margin: 10px;
26+
}
27+
28+
@media screen and (max-width: 855px)
29+
{
30+
.flex-container {
31+
margin: auto;
32+
}
33+
}
34+
35+
p[id="info"] {
36+
font-size: 24px;
37+
margin-left: 20px;
38+
margin-right: 20px;
39+
40+
font-family: Roboto-Regular;
41+
}
42+
43+
.button {
44+
background-color: #4CAF50;
45+
border: none;
46+
color: white;
47+
font-family: OpenSans-Bold;
48+
49+
padding: 15px 32px;
50+
text-align: center;
51+
text-decoration: none;
52+
display: inline-block;
53+
font-size: 18px;
54+
margin-left: 20px;
55+
56+
margin-right: 20px;
57+
cursor: pointer;
58+
border-radius: 3px;
59+
}
60+
61+
.button:hover {
62+
opacity: 0.8;
63+
}

add_beneficiary.php

+104
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
<?php
2+
include "validate_customer.php";
3+
4+
include "header.php";
5+
6+
include "customer_navbar.php";
7+
8+
include "customer_sidebar.php";
9+
10+
include "session_timeout.php";
11+
?>
12+
13+
14+
<!DOCTYPE html>
15+
<html>
16+
<head>
17+
18+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
19+
20+
<link rel="stylesheet" href="customer_add_style.css">
21+
</head>
22+
23+
<body>
24+
25+
<form class="add_customer_form" action="add_beneficiary_action.php" method="post">
26+
27+
<div class="flex-container-form_header">
28+
29+
<h1 id="form_header">Please fill in beneficiary details...</h1>
30+
</div>
31+
32+
33+
<div class="flex-container">
34+
<div class=container>
35+
<label>First Name :</label><br>
36+
37+
<input name="fname" size="30" type="text" required />
38+
</div>
39+
<div class=container>
40+
41+
<label>Last Name :</b></label><br>
42+
<input name="lname" size="30" type="text" required />
43+
44+
</div>
45+
</div>
46+
47+
<div class="flex-container">
48+
<div class=container>
49+
50+
<label>Account No :</label>
51+
<br>
52+
53+
<input name="acno" size="25" type="text" required />
54+
55+
</div>
56+
</div>
57+
58+
<div class="flex-container">
59+
60+
<div class=container>
61+
<label>Email-ID :</label><br>
62+
63+
<input name="email" size="30" type="text" required />
64+
</div>
65+
66+
<div class=container>
67+
<label>Phone No. :</b></label><br>
68+
69+
<input name="phno" size="30" type="text" required />
70+
</div>
71+
</div>
72+
73+
74+
<div class="flex-container">
75+
<div class="container">
76+
77+
<a href="beneficiary.php" class="button">Go Back</a>
78+
</div>
79+
80+
81+
<div class="container">
82+
<button type="submit">Submit</button>
83+
</div>
84+
85+
86+
<div class="container">
87+
<button type="reset" class="reset" onclick="return confirmReset();
88+
">Reset</button>
89+
</div>
90+
</div>
91+
92+
</form>
93+
94+
<script>
95+
function confirmReset()
96+
{
97+
return confirm('Do you really want to reset?')
98+
}
99+
</script>
100+
101+
102+
</body>
103+
104+
</html>

add_beneficiary_action.php

+99
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?php
2+
include "validate_customer.php";
3+
include "header.php";
4+
5+
include "customer_navbar.php";
6+
include "customer_sidebar.php";
7+
8+
include "session_timeout.php";
9+
10+
$fname = mysqli_real_escape_string($conn, $_POST["fname"]);
11+
12+
$lname = mysqli_real_escape_string($conn, $_POST["lname"]);
13+
14+
$acno = mysqli_real_escape_string($conn, $_POST["acno"]);
15+
16+
$email = mysqli_real_escape_string($conn, $_POST["email"]);
17+
18+
$phno = mysqli_real_escape_string($conn, $_POST["phno"]);
19+
20+
21+
$id = $_SESSION['loggedIn_cust_id'];
22+
$sql0 = "SELECT cust_id FROM customer WHERE first_name='".$fname."' AND
23+
24+
last_name='".$lname."' AND
25+
26+
account_no='".$acno."' AND
27+
email='".$email."' AND
28+
phone_no='".$phno."'";
29+
$result = $conn->query($sql0);
30+
31+
32+
$success = 0;
33+
if ($result->num_rows > 0) {
34+
$row = $result->fetch_assoc();
35+
$beneficiary_id = $row["cust_id"];
36+
37+
38+
if ($id != $beneficiary_id) {
39+
$sql1 = "INSERT INTO beneficiary".$id." VALUES(
40+
NULL,
41+
42+
'$beneficiary_id',
43+
'$email',
44+
'$phno',
45+
'$acno'
46+
47+
)";
48+
49+
if (($conn->query($sql1) === TRUE)) {
50+
$success = 1;
51+
}
52+
}
53+
54+
else {
55+
$success = -1;
56+
}
57+
}
58+
?>
59+
60+
<!DOCTYPE html>
61+
<html>
62+
<head>
63+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
64+
65+
<link rel="stylesheet" href="action_style.css">
66+
</head>
67+
68+
<body>
69+
<div class="flex-container">
70+
<div class="flex-item">
71+
72+
<?php
73+
if ($success == 1) { ?>
74+
<p id="info"><?php echo "Beneficiary successfully added !\n"; ?></p>
75+
<?php } ?>
76+
77+
78+
<?php
79+
if ($success == 0) { ?>
80+
<p id="info"><?php echo "Invalid data entered/Connection error !\n"; ?></p>
81+
<?php } ?>
82+
83+
84+
<?php
85+
if ($success == -1) { ?>
86+
<p id="info"><?php echo "Can't add self as beneficiary !\n"; ?></p>
87+
88+
<?php } ?>
89+
</div>
90+
91+
<div class="flex-item">
92+
<a href="beneficiary.php" class="button">Go Back</a>
93+
</div>
94+
</div>
95+
96+
97+
</body>
98+
99+
</html>

admin_home.php

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?php
2+
include "validate_admin.php";
3+
include "header.php";
4+
5+
include "user_navbar.php";
6+
include "admin_sidebar.php";
7+
8+
include "session_timeout.php";
9+
?>
10+
11+
<!DOCTYPE html>
12+
13+
<html>
14+
15+
<head>
16+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
17+
<link rel="stylesheet" href="admin_home_style.css">
18+
</head>
19+
20+
21+
<body>
22+
<div class="flex-container">
23+
<div class="flex-item">
24+
<h1 id="customer">
25+
WELCOME ADMIN !
26+
27+
</h1>
28+
<p id="customer" style="max-width:800px">
29+
30+
ADMIN HAS ALL POWER !!! </p>
31+
32+
</div>
33+
</div>
34+
35+
</body>
36+
</html>
37+
38+
<?php include "easter_egg.php"; ?>

admin_home_style.css

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
.flex-container {
2+
display: -webkit-flex;
3+
display: flex;
4+
-webkit-flex-direction: column;
5+
6+
flex-direction: column;
7+
margin-left: 256px;
8+
width: auto;
9+
height: auto;
10+
-webkit-flex-wrap: wrap;
11+
12+
flex-wrap: wrap;
13+
}
14+
15+
.flex-item {
16+
width: auto;
17+
height: auto;
18+
margin: 10px;
19+
margin-left: auto;
20+
21+
margin-right: auto;
22+
}
23+
24+
h1[id="customer"] {
25+
margin: 20px;
26+
line-height: normal;
27+
font-family: Roboto-Light;
28+
29+
font-size: 40px;
30+
text-align: center;
31+
color: #212121;
32+
line-height: 55px;
33+
border-bottom: 2px solid #212121;
34+
35+
padding: 30px 100px;
36+
}
37+
38+
p[id="customer"] {
39+
max-width: 600px;
40+
margin: 20px;
41+
font-size: 30px;
42+
font-family: Roboto-Regular;
43+
44+
color: #212121;
45+
line-height: 42px;
46+
padding: 10px 100px;
47+
}
48+
49+
@media screen and (max-width: 1080px) {
50+
h1[id="customer"] {
51+
padding: 30px 0px;
52+
}
53+
54+
55+
p[id="customer"] {
56+
padding: 10px 0px;
57+
}
58+
}
59+
60+
@media screen and (max-width: 855px) {
61+
.flex-container {
62+
margin: auto;
63+
}
64+
}

0 commit comments

Comments
 (0)