-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdashboard.php
More file actions
executable file
·152 lines (139 loc) · 7.92 KB
/
dashboard.php
File metadata and controls
executable file
·152 lines (139 loc) · 7.92 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
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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<?php
session_start();
#################### Login & License Validation ####################
require("temp/validate.login.temp.php"); #
$license_path = "license/".$_SESSION['license_username']."/license.json"; #
require("auth/license.validate.functions.php"); #
require("temp/validate.license.temp.php"); #
#################### Login & License Validation ####################
######################## Database Connection #######################
require("auth/config.php"); #
require("auth/functions.php"); #
$conn = conn("localhost", "root", "", "unitySync"); #
######################## Database Connection #######################
// echo "<pre>";
// print_r($_SESSION);
// exit();
$title = "Dashboard";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('temp/head.temp.php'); ?>
</head>
<body>
<?php include('temp/aside.temp.php'); ?>
<main class="content">
<?php include('temp/nav.temp.php'); ?>
<?php
################################ Role Validation ################################
if (validationRole($conn, $_SESSION['project'], $_SESSION['role'], "dashboard") === true) {
################################ Role Validation ################################
?>
<div class="py-4">
<div class="dropdown">
<button class="btn btn-gray-800 d-inline-flex align-items-center me-2 dropdown-toggle"
data-bs-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<svg class="icon icon-xs me-2" fill="none" stroke="currentColor" viewbox="0 0 24 24"
xmlns="http://www.w3.org/2000/svg">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2"
d="M12 6v6m0 0v6m0-6h6m-6 0H6"></path>
</svg>
New Task
</button>
<div class="dropdown-menu dashboard-dropdown dropdown-menu-start mt-2 py-1">
<a class="dropdown-item d-flex align-items-center" href="#">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewbox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path
d="M8 9a3 3 0 100-6 3 3 0 000 6zM8 11a6 6 0 016 6H2a6 6 0 016-6zM16 7a1 1 0 10-2 0v1h-1a1 1 0 100 2h1v1a1 1 0 102 0v-1h1a1 1 0 100-2h-1V7z">
</path>
</svg>
Add User
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewbox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path
d="M7 3a1 1 0 000 2h6a1 1 0 100-2H7zM4 7a1 1 0 011-1h10a1 1 0 110 2H5a1 1 0 01-1-1zM2 11a2 2 0 012-2h12a2 2 0 012 2v4a2 2 0 01-2 2H4a2 2 0 01-2-2v-4z">
</path>
</svg>
Add Widget
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewbox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path
d="M5.5 13a3.5 3.5 0 01-.369-6.98 4 4 0 117.753-1.977A4.5 4.5 0 1113.5 13H11V9.413l1.293 1.293a1 1 0 001.414-1.414l-3-3a1 1 0 00-1.414 0l-3 3a1 1 0 001.414 1.414L9 9.414V13H5.5z">
</path>
<path d="M9 13h2v5a1 1 0 11-2 0v-5z"></path>
</svg>
Upload Files
</a>
<a class="dropdown-item d-flex align-items-center" href="#">
<svg class="dropdown-icon text-gray-400 me-2" fill="currentColor" viewbox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
clip-rule="evenodd"></path>
</svg>
Preview Security
</a>
<div role="separator" class="dropdown-divider my-1"></div>
<a class="dropdown-item d-flex align-items-center" href="#">
<svg class="dropdown-icon text-danger me-2" fill="currentColor" viewbox="0 0 20 20"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M12.395 2.553a1 1 0 00-1.45-.385c-.345.23-.614.558-.822.88-.214.33-.403.713-.57 1.116-.334.804-.614 1.768-.84 2.734a31.365 31.365 0 00-.613 3.58 2.64 2.64 0 01-.945-1.067c-.328-.68-.398-1.534-.398-2.654A1 1 0 005.05 6.05 6.981 6.981 0 003 11a7 7 0 1011.95-4.95c-.592-.591-.98-.985-1.348-1.467-.363-.476-.724-1.063-1.207-2.03zM12.12 15.12A3 3 0 017 13s.879.5 2.5.5c0-1 .5-4 1.25-4.5.5 1 .786 1.293 1.371 1.879A2.99 2.99 0 0113 13a2.99 2.99 0 01-.879 2.121z"
clip-rule="evenodd"></path>
</svg>
Upgrade to Pro
</a>
</div>
</div>
</div>
<div class="row justify-content-lg-center">
<div class="col-12 mb-4">
<div class="card border-0 bg-yellow-100 shadow">
<div class="card-header d-sm-flex flex-row align-items-center border-yellow-200 flex-0">
<div class="d-block mb-3 mb-sm-0">
<div class="fs-5 fw-normal mb-2">Sales Value</div>
<h2 class="fs-3 fw-extrabold">$10,567</h2>
<div class="small mt-2"><span class="fw-normal me-2">Yesterday</span> <span
class="fas fa-angle-up text-success"></span> <span
class="text-success fw-bold">10.57%</span></div>
</div>
<div class="btn-group ms-auto" role="group" aria-label="Basic example"><button type="button"
class="btn btn-secondary active">Day</button> <button type="button"
class="btn btn-secondary">Month</button> <button type="button"
class="btn btn-secondary">Year</button>
</div>
</div>
<div class="card-body p-2">
<div id="chart"></div>
</div>
</div>
</div>
</div>
<?php include('temp/footer.temp.php'); ?>
<?php } else { ?>
<div style="height: 80vh;" class="position-relative">
<img class="position-absolute start-0 end-0 top-0 bottom-0 m-auto"
src="assets/img/welcome.png" alt="" height="460" />
</div>
<?php } ?>
</main>
<?php include('temp/script.temp.php'); ?>
<script>
$(function() {
<?php if (isset($_GET['m'])) { ?>
<?php if ($_GET['m'] == "login_true") { ?>
notify("success", "Hi <?=$_SESSION['name']?>, You are successfully logged In.");
<?php }elseif ($_GET['m'] == "masti") { ?>
notify("error", "Masti kr rya shorya.");
<?php } ?>
<?php } ?>
});
</script>
</body>
</html>