forked from nandishkotadia/JP-code-for-good-hackathon
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathadmincorporate.php
More file actions
91 lines (66 loc) · 1.91 KB
/
admincorporate.php
File metadata and controls
91 lines (66 loc) · 1.91 KB
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
<?php
require 'core.inc.php';
require 'connect.inc.php';
if(loggedin())
{
//echo $_SESSION['user_id'];
//echo $field;
$query = "SELECT `fullname` FROM corp_reg WHERE `id`='".$_SESSION['user_id']."'";
if($query_run = mysql_query($query))
{
if($query_result = mysql_result($query_run, 0, 'fullname'))
{
$a= $query_result;
}
else
{
}
}
//echo $fullname = getfield('fullname');
echo 'Welcome , '.$a.' <span style=""><a class="logout" style="" href="logout.php">Logout</a></span><br>';
}
$var="Select * from corp_details";
$result=mysql_query($var);
?>
<!DOCTYPE html>
<head>
<title>Magic Bus</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
<link rel="stylesheet" type="text/css" href="css/bootstrap-min.css"/>
<link rel="stylesheet" type="text/css" href="css/style.css"/>
</head>
<body>
<div id="wrapper">
<div class="header">
<h1 style="text-align:center;">RUN & URN</h1>
<a href="admin.php"><button class="btn btn-primary btn-lg">back</button></a>
</div>
<h3>Corporate Details</h3>
<table class="table table-striped">
<tr><th>Id</th><th>Corporate Name</th><th>Start Date</th><th>End Date</th><th>Amount</th></tr>
<?php
while($row=mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" .$row['id']."</td><td> ".$row['corporateName'] ."</td> <td>" .$row['startDate'] ."</td><td> " .$row['endDate'] ."</td><td>" .$row['Amount'] ."</td>";
echo "</tr>";
}
?>
</table>
<?php
$count=0;
$sql = "Select count(id) from user_details";
$query_run = mysql_query($sql);
$count=mysql_num_rows($query_run);
/*
while($row=mysql_fetch_assoc($query_run))
{
$count=$row['id'];
}*/
?>
<center><button style="padding-top:20px;padding-bottom:20px;" class="btn btn-danger btn-lg">Total Paticipants:<span><?php echo "\n".$count;?></span></button></center>
</form>
</div>
</div>
</body>
</html>