This repository was archived by the owner on Mar 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-stats.php
More file actions
75 lines (58 loc) · 1.87 KB
/
admin-stats.php
File metadata and controls
75 lines (58 loc) · 1.87 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
<?
$ticketsCount = mysql_query( "SELECT * FROM tickets_entry" ) or die("SELECT Error: ".mysql_error());
$numRows = mysql_num_rows($ticketsCount);
$usersCount = mysql_query( "SELECT * FROM users" ) or die("SELECT Error: ".mysql_error());
$usersnumRows = mysql_num_rows($usersCount);
$stat = "Completed";
$percentCount = mysql_query("SELECT * FROM tickets_entry where Ticket_Status = '". $stat ."'");
//$percentCount = mysql_query("SELECT Ticket_Status,COUNT(*) FROM tickets_entry WHERE Ticket_Status='Completed'");
$percentnumRows = mysql_num_rows($percentCount);
$Uncompleted = $numRows - $percentnumRows;
$totalticketspercent = number_format((($numRows - $Uncompleted) * 100) / $numRows);
?>
<div class="row">
<div class="col-sm-3">
<div class="hero-widget well well-sm">
<div class="icon">
<i class="glyphicon glyphicon-inbox"></i>
</div>
<div class="text">
<var><?echo $numRows;?></var>
<label class="text-muted">Total Tickets</label>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="hero-widget well well-sm">
<div class="icon">
<i class="glyphicon glyphicon-star"></i>
</div>
<div class="text">
<var><?echo $usersnumRows;?></var>
<label class="text-muted"><a href="user-list.php">Total Engineers</a></label>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="hero-widget well well-sm">
<div class="icon">
<i class="glyphicon glyphicon-tags"></i>
</div>
<div class="text">
<var><?echo $Uncompleted;?></var>
<label class="text-muted">Uncompleted Tickets</label>
</div>
</div>
</div>
<div class="col-sm-3">
<div class="hero-widget well well-sm">
<div class="icon">
<i class="glyphicon glyphicon-stats"></i>
</div>
<div class="text">
<var><?echo $totalticketspercent;?>%</var>
<label class="text-muted">Tickets Completed</label>
</div>
</div>
</div>
</div>