-
Notifications
You must be signed in to change notification settings - Fork 1
/
picLookup.php
72 lines (48 loc) · 1.58 KB
/
picLookup.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
<html>
<?php
include('globalsetup.php');
setupHeader();
//print("is setup, user is $myusername<br/>");
$picId = $_GET['picId'];
if(isset($_POST['editId'])) {
$picId = $_POST['editId'];
submitUpdates();
closeAndReloadParent();
}
showPicDetail($picId);
function submitUpdates() {
//$santized = addslashes($unclean);
$editId = $_POST['editId'];
$editOnDisplay = $_POST['editOnDisplay'];
$editOnDashboard = $_POST['editOnDashboard'];
editDisplayItem($editId, $editOnDisplay, $editOnDashboard);
}
function showPicDetail($picId) {
global $isAdmin;
//Get the user's data
$result = getDisplayItem($picId);
while($row = mysql_fetch_array($result))
{
if($isAdmin >= 1) {
print '<form name="input" action="picLookup.php" method="post">';
} else {print '<div class="popupText">';}
echo "<b>Owner Username:</b> <br/>" . $row['ownerUsername'] . "<br/><br/>";
echo '<img src="' . $row['thumbLocation'] . '" alt="Pic" " >';
echo '<br/>';
if(!$isAdmin) {
echo "<b>Active?</b> <br/>" . getBinaryImage($row['onDisplay']) . "<br/><br/>";
} else {
echo "<br/><br/>";
echo "<b>Currently on 7k Display?</b> <br/>" . getCheckboxText("editOnDisplay", $row['onDisplay']) . "<br/><br/>";
echo "<b>Currently on Dashboard?</b> <br/>" . getCheckboxText("editOnDashboard", $row['onDash']) . "<br/><br/>";
echo '<input type="hidden" name="editId" value="' . $row['id'] . '" />';
}
}
if($isAdmin >= 1) {
echo '<input type="submit" value="Submit Changes">
</form> '; } else {
print "</div>";
}
}
?>
</html>