-
Notifications
You must be signed in to change notification settings - Fork 0
/
showMatchedItemsUserLost.php
73 lines (62 loc) · 2.61 KB
/
showMatchedItemsUserLost.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
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
<div class="card"><h2>
<?php echo $row["ItemName"]; ?>
</h2>
<?php
if($dRow["isInstitution"] == 1)
$found = "Found In ";
else
$found = "Found By ";
?>
<h4 style="float:right"><?php echo($found) ?><a href="viewComments.php?id=<?php echo($row["FinderID"]) ?>" style="color:#EDB100">
<?php
echo $dRow["Name"];
?>
</a></h4>
<h4>
<p class="outset"><h4>
<?php echo $row["Location"] . ', ' . $row["Date"]; ?>
</h4></p><p>
<?php echo $row["Descript"]; ?>
</p>
<p>
<! When this button is pressed call the recievedItem function with $row["ItemID"] as the
argument>
<?php
if($matchedRow["Status"] == 1)
{
$itemUSerID = $row["FinderID"]; // SORRY FOR THIS VARIABLE
$USerID = $_SESSION["id"];
?>
<button class="button" onclick="document.getElementById('<?php echo("popup" . $itemUSerID) ?>').classList.toggle('show');">Recieved from Finder</button>
<div class="formPopup" id="<?php echo("popup" . $itemUSerID) ?>">
<button class="button" onclick="document.getElementById('<?php echo("popup" . $itemUSerID) ?>').classList.toggle('show');">X</button>
<form action="leaveComment.php?CommenterID=<?php echo($USerID) ?>&CommentedID=<?php echo($itemUSerID) ?>&itemID=<?php echo($row['ID']) ?>" class="formContainer" method="POST">
<div class="rate">
<b>Rate and Comment the Finder: </b>
<br>
<input type="radio" id="<?php echo($itemUSerID . "star5") ?>" name="rate" value="5" />
<label for="<?php echo($itemUSerID . "star5") ?>" title="text">5 stars</label>
<input type="radio" id="<?php echo($itemUSerID . "star4") ?>" name="rate" value="4" />
<label for="<?php echo($itemUSerID . "star4") ?>" title="text">4 stars</label>
<input type="radio" id="<?php echo($itemUSerID . "star3") ?>" name="rate" value="3" />
<label for="<?php echo($itemUSerID . "star3") ?>" title="text">3 stars</label>
<input type="radio" id="<?php echo($itemUSerID . "star2") ?>" name="rate" value="2" />
<label for="<?php echo($itemUSerID . "star2") ?>" title="text">2 stars</label>
<input type="radio" id="<?php echo($itemUSerID . "star1") ?>" name="rate" value="1" />
<label for="<?php echo($itemUSerID . "star1") ?>" title="text">1 star</label>
</div><br>
<textarea name="textArea" placeholder="Leave a comment..." required></textarea><br>
<button class="button" onclick="location.href='itemRecieved.php?itemID=<?php echo($row["ID"]) ?> & matchedID = <?php echo($matchedRow["ID"])?>'" >Don't Leave Comment</button>
<input type="submit" name="submitButton" class="button">
</form>
</div>
<?php
}
else
{
?>
<button class="buttonInactive">Not Yet Returned</button>
<?php
}
?>
</div>