Repository navigation
Expand file tree
/
Copy pathUpdated_Notification.php
More file actions
187 lines (158 loc) · 7.34 KB
/
Copy pathUpdated_Notification.php
File metadata and controls
187 lines (158 loc) · 7.34 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
<?php
require './db_connection.php';
require './authchecker.php';
require "./php/currentuser_details.php";
$userdetail = currentuserdetails();
$proresult = null;
if ($userdetail) {
$employeeId = $userdetail["Employee_id"];
$orgcheck = "SELECT * FROM Organization WHERE Employee_id = ?";
$stmt = $conn->prepare($orgcheck);
if ($stmt) { // Check if the prepare method succeeded
$stmt->bind_param("i", $employeeId);
$stmt->execute();
$orgResult = $stmt->get_result();
if ($orgResult->num_rows > 0) {
$orgrow = $orgResult->fetch_assoc();
$organizationName = $orgrow["Organization_Name"];
$query = "SELECT * FROM Project Where Organization_Name='$organizationName' AND Status != 'Disapproved' AND Update_status != 'No'";
$proresult = $conn->query($query);
} else {
$organizationName = $userdetail["Organization_Name"];
$query = "SELECT * FROM Project WHERE Organization_Name = '$organizationName'AND Status != 'Disapproved' AND Update_status != 'No'";
$proresult = $conn->query($query);
}
} else {
echo "Error preparing the organization query: " . $conn->error;
}
} else {
echo "Error: User details not found.";
}
$result = $conn->query($query);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v6.0.0-beta3/css/all.css">
<link rel="stylesheet" href="Styles\All.css" />
<link rel="stylesheet" href="Styles\Typography.css" />
<title>Logs</title>
</head>
<body>
<div class="container">
<!-- App Name -->
<nav class="top">
<div class="large-head">
<div name="title">Project</div>
</div>
<div class="small-circle">
<img src="img\search.png" alt="Back arrow">
</div>
</nav>
<!-- Home page body -->
<!-- <div class="container"> -->
<!-- Scrolling tabs for filtering the data -->
<div class="tab-container">
<div class="tabs" id="tabs">
<href= href="./Notification.php"><button class="tab " data-tab="all">All</button></href=>
<a href="./Approve_Notification.php"><button class="tab " data-tab="approved">Approved</button></a>
<a href="./Dissapprove_Notification.php"><button class=" tab" data-tab="disapproved">Disapproved</button> </a>
<a href="Action_Required_Notification.php"><button class="tab" data-tab="action">Action Required</button> </a>
<a href="./Updated_Notification.php"><button class="tab active" data-tab="updated">Updated </button></a>
</div>
</div>
<script src="JavaScript\dragtabs.js"></script>
<!-- Project Overview Container -->
<?php
if ($result && $result->num_rows > 0) {
while ($row = $result->fetch_assoc()) {
// Access individual fields by column name
$pid = $row["Project_ID"];
$title = $row["Title"];
$cost = $row["Cost"];
$Status = $row["Status"];
$estimated_completion = $row["Estimated_Completion"];
$startedDate = $row["Started_Date"];
$Organization_Name = $row['Organization_Name'];
$employee_id = $row['Employee_id'];
$Update_status = $row['Update_status'];
$query1 = "SELECT * FROM employee where Employee_id=" . $employee_id;
$result1 = $conn->query($query1);
$row1 = $result1->fetch_assoc();
$projectUsername = $row1['Employee_Name'];
if ($Update_status != "No") {
?>
<a href="Details.php?pid=<?php echo $pid ?>">
<div class="wrapper">
<div class="container-row">
<div class="small-logo">
<img src="images/dcslogo.png" alt="dsc_logo" class="container-img">
</div>
<div class="clientname" style="margin-bottom: 10px;">
<p class="container-subhead"> <?php echo $projectUsername ?></p>
</div>
</div>
<div class="track">
<h3>
<p class="container-subhead">
<?php echo $title ?>
</p>
</h3>
</div>
<div class="track">
<div class="container-row space">
<h3>
<p class="container-body">Status -</p>
</h3>
<h3>
<p class="container-body"> <?php echo $Status ?></p>
</h3>
</div>
<div class="container-row space">
<h3>
<p class="container-body">Started on -</p>
</h3>
<h3>
<p class="container-body"> <?php echo $startedDate ?></p>
</h3>
</div>
<div class="container-row space">
<h3>
<p class="container-body">Estimated completion -</p>
</h3>
<h3>
<p class="container-body"> <?php echo $estimated_completion ?></p>
</h3>
</div>
<div class="container-row space">
<h3>
<p class="container-body">Cost -</p>
</h3>
<h3>
<p class="container-body"> <?php echo " $cost ₹" ?></p>
</h3>
</div>
</div>
</div>
<?php
}
}
}
?>
</a>
<!-- </div> -->
<!-- Bottom Navigation Bar -->
<div class="bnav-wrapper">
<div class="bnav">
<a href="Home.php"><img src="images/home.svg" alt="Home"></a>
<a href="Logs.php"><img src="images/Logs.svg" alt="Logs"></a>
<a href="Notification.php">Alerts</a>
<a href="Profile.php"><img src="images/Profile.svg" alt="Profile"></a>
</div>
</div>
</div>
</div>
</body>
</html>