-
Notifications
You must be signed in to change notification settings - Fork 0
/
acc.php
129 lines (111 loc) · 4.16 KB
/
acc.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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<?php include('session.php')?>
<?php
if(isset($_SESSION['accounttype']) && $_SESSION['accounttype']=="Farmers"){
header('location: index.php');
}
?>
<?php
require('server.php');
$id= "";
$accttype="";
$location="";
$username="";
$password="";
$lname="";
$fname="";
$mname="";
$age="";
$sex="";
$educattain="";
$pondarea="";
$unit="";
$pondname="";
$totstock="";
$output = '';
$query = mysqli_query($con,"SELECT * FROM `tblaccounts`");
$count = mysqli_num_rows($query);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1">
<title>Mangrove Crab Farmers Association</title>
<link rel="shortcut icon" href="img/team.ico" />
<link href="css/s10.css" rel="stylesheet" />
<link rel="stylesheet" href="css/bootstrap.css" />
</head>
<body style="background-color:#5FF5F5;">
<div class="topnav">
<div class="r">
<img src="img/bgweb.png" id="rimg"> Admin
</div>
<a href="index.php" id="out" >Sign out</a>
</div>
<div class="topnav2" >
<div class="name">
<span id="n"><strong><?php echo $_SESSION['fname']; ?> <?php echo $_SESSION['mname']; ?> <?php echo $_SESSION['lname']; ?></strong></span>
<br>
Monitoring Agency: <?php echo $_SESSION['username']; ?>
<br>
Admin
</div>
</div>
<div class="menu" >
<div class="menu2">
<a href="admin.php" >File</a>
<a class="active" href="acc.php" >Manage Account</a>
</div>
</div>
<div class="add">
<div class="add2">
<a href="addaccount.php" >Create New Account</a> <br>
</div>
</div>
<div class="scl">
<table class="table">
<thead>
<tr class="trhead">
<td nowrap="nowrap" id="tr2"><strong>Account Type</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Location</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Username</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Password</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Last Name</strong></td>
<td nowrap="nowrap" id="tr2"><strong>First Name</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Middle Name</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Age</strong></td>
<td nowrap="nowrap" id="tr2"><strong>Sex</td>
<td nowrap="nowrap" id="tr2"><strong>Educational Attainment</td>
<td nowrap="nowrap" id="tr2"><strong>Pond Area</td>
<td nowrap="nowrap" id="tr2"><strong>Unit</td>
<td nowrap="nowrap" id="tr2"><strong>Pond Name</td>
<td nowrap="nowrap" id="tr2"><strong>Total Stocks</td>
</tr>
</thead>
<tbody>
<?php while($row = mysqli_fetch_array($query)):?>
<tr>
<td nowrap="nowrap"><?php echo $row['accounttype'];?></td>
<td nowrap="nowrap"><?php echo $row['location'];?></td>
<td nowrap="nowrap"><?php echo $row['username'];?></td>
<td nowrap="nowrap"><?php echo MD5($row['password']);?></td>
<td nowrap="nowrap"><?php echo $row['lname'];?></td>
<td nowrap="nowrap"><?php echo $row['fname'];?></td>
<td nowrap="nowrap"><?php echo $row['mname'];?></td>
<td nowrap="nowrap"><?php echo $row['age'];?></td>
<td nowrap="nowrap"><?php echo $row['sex'];?></td>
<td nowrap="nowrap"><?php echo $row['educattain'];?></td>
<td nowrap="nowrap"><?php echo $row['pondarea'];?></td>
<td nowrap="nowrap"><?php echo $row['unit'];?></td>
<td nowrap="nowrap"><?php echo $row['pondname'];?></td>
<td nowrap="nowrap"><?php echo $row['totstock'];?></td>
<td nowrap="nowrap" ><a href="updateaccount.php?accountid=<?php echo $row['accountid'];?>" class="abt" ><img src="img/edit.png" ></a> <a href="delete3.php?accountid=<?php echo $row['accountid'];?>" class="abt" onClick="return confirm('Are you sure you want to Delete this data?')"><img src="img/trash.png"></a></td>
</tr>
<?php endwhile;?>
</tbody>
</table>
</div>
<div id="footer">
IS FOR GROW OUT POPULATION MANAGEMENT OF MANGROVE CRABS
</div>
</body>
</html>