This repository has been archived by the owner on Sep 24, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathviewdetails.php
103 lines (87 loc) · 2.49 KB
/
viewdetails.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?php
//connect to database
require_once('connect/dbconnect.php');
session_start();
$myusername = $_SESSION['myusername'];
session_start();
if(! isset( $_SESSION['myusername'] ) ){
header("location:index2.php");
}
$sql = "select * from user_accounts";
$result = mysql_query($sql);
while($rows = mysql_fetch_array($result)){
if($rows['username']==$_SESSION['myusername']){
if($rows['user_type'] != 'admin'){
header("location:index2.php");
}
}
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Home | BankSys: Simple. Secure. Sure.</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="jquery-1.4.2.min.js"></script>
</head>
<body>
<a name="top"></a>
<? @include('parts/header.php');?>
<?php
//get user applications
$sql = "SELECT * FROM savings_accounts WHERE id = '$_GET[id]'";
$result = mysql_query($sql, $con) or die('Error: ' . mysql_error());
if($rows = mysql_fetch_array($result)){
// echo $rows['user_type'];
$title =$rows[title];
$lname =$rows[lname];
$fname =$rows[fname];
$minitial =$rows[minitial];
$suffix =$rows[suffix];
$momname =$rows[momname];
$birthmonth =$rows[birthmonth];
$birthday =$rows[birthday];
$birthyear =$rows[birthyear];
$sex =$rows[sex];
$civilstatus =$rows[civilstatus];
$nationality =$rows[nationality];
$tin =$rows[tin];
$occupation =$rows[occupation];
$dependents =$rows[dependents];
$email =$rows[email];
$faxnumber =$rows[faxnumber];
$cellnumber =$rows[cellnumber];
$mailingaddress =$rows[mailingaddress];
$homestreet =$rows[homestreet];
$homecity =$rows[homecity];
$homeprovince =$rows[homeprovince];
$homezip =$rows[homezip];
$homephone =$rows[homephone];
$bizstreet =$rows[bizstreet];
$bizcity =$rows[bizcity];
$bizprovince =$rows[bizprovince];
$bizzip =$rows[bizzip];
$bizphone =$rows[bizphone];
$approved =$rows[approved];
$refbranch =$rows[refbranch];
$refbranchcode =$rows[refbranchcode];
}
// echo $sql;
// echo "<br /><br />$myusername!";
?>
<div id="bodydiv">
<h2>View Application Details</h2>
<table>
<tr>
<td><ul>
<li>→ <a href="admin.php">Back</a></li>
<li>→ <? if($approved != "APPROVED") echo '<a href="approve.php?id='.$rows[id].'">Approve</a>'; else echo "Approve";?></li>
<li>→ <a href="disapprove.php?id=<?echo $rows[id]?>">Disapprove</a></li>
</ul>
</td>
</tr>
</table>
<?@include('userdetails.php');?>
</div>
<?@include('parts/footer.php');?>
</body>
</html>