-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearchResults.php
44 lines (34 loc) · 962 Bytes
/
searchResults.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
<?php
require_once 'header.php';
?>
<div class="fieldset">
<?php
$projects = getProjectsForUser(getCurrentUserId(), $_POST['projectName']);
$output .= "<table class='results'><tr><th class='legend'>Project Name</th><th></th></tr><tbody>";
foreach ($projects as $project)
{
extract($project);
$output .= <<<ABC
<tr>
<td><a href="project.php?id=$projectId">$name</a></td>
<td><a id="removeProject" href="removeProject.php?id=$projectId">[Remove]</a></td>
</tr>
ABC;
}
$output .= "<tbody></table>";
echo($output);
?>
</div>
<?php
require_once 'footer.php';
?>
<script>
$(document).ready(function() {
$('#removeProject').click(function() {
if(confirm("Are you sure you want to delete this Project?")) {
return true;
}
return false;
});
});
</script>