forked from ndlibersa/usage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publisherPlatformList.php
executable file
·62 lines (39 loc) · 2.07 KB
/
publisherPlatformList.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
<?php
$pageTitle = "Edit Publishers / Platforms";
include 'templates/header.php';
?>
<script type="text/javascript" src="js/publisherPlatformList.js"></script>
<table class="headerTable">
<tr><td>
<div class="headerText">Publisher / Platform Update</div>
<br />
<?php
echo "<div style='line-height:130%;margin-left:5px;text-align:left;'>\n";
$platforms = new Platform();
$platform = array();
$platformArray = $platforms->getPlatformArray();
if (count($platformArray) > 0){
foreach($platformArray as $platform) {
echo "<div style='margin-bottom:15px;'>";
echo "<span class='PlatformText'>" . $platform['name'] . "</span> <a href='publisherPlatform.php?platformID=" . $platform['platformID'] . "' class='smallLink'>view / edit</a>";
echo "<br /> <a href=\"javascript:showPublisherList('" . $platform['platformID'] . "');\"><img src='images/arrowright.gif' style='border:0px' alt='show publisher list' id='image_" . $platform['platformID'] . "'></a> <a href=\"javascript:showPublisherList('" . $platform['platformID'] . "');\" id='link_" . $platform['platformID'] . "'>show publisher list</a><br />";
echo "<div id='div_" . $platform['platformID'] . "' style='display:none;width:600px;margin-left:40px'>";
$platformObj = new Platform(new NamedArguments(array('primaryKey' => $platform['platformID'])));
//loop through each publisher under this platform
$publisherPlatform = new PublisherPlatform();
foreach($platformObj->getPublisherPlatforms() as $publisherPlatform) {
$publisher = new Publisher(new NamedArguments(array('primaryKey' => $publisherPlatform->publisherID)));
echo $publisher->name . " <a href='publisherPlatform.php?publisherPlatformID=" . $publisherPlatform->publisherPlatformID . "'>view / edit</a><br />";
}
echo "</div>";
echo "</div>";
}
}else{
echo "<i>No publishers / platforms found.</i>";
}
echo "</div>\n";
?>
</td>
</tr>
</table>
<?php include 'templates/footer.php'; ?>