95
99
$this->licensed = Kit::ValidateParam($row[4], _INT);
96
100
$this->inc_schedule = Kit::ValidateParam($row[5], _INT);
97
101
$this->auditing = Kit::ValidateParam($row[6], _INT);
98
$this->email_alert = Kit::ValidateParam($row[7], _INT);
99
$this->alert_timeout = Kit::ValidateParam($row[8], _INT);
102
$this->email_alert = Kit::ValidateParam($row[7], _INT);
103
$this->alert_timeout = Kit::ValidateParam($row[8], _INT);
104
$this->mediaInventoryStatus = Kit::ValidateParam($row[9], _INT);
105
$this->mediaInventoryXml = Kit::ValidateParam($row[10], _HTMLSTRING);
309
315
CASE WHEN display.licensed = 1 THEN '<img src="img/act.gif">' ELSE '<img src="img/disact.gif">' END AS licensed,
310
316
CASE WHEN display.email_alert = 1 THEN '<img src="img/act.gif">' ELSE '<img src="img/disact.gif">' END AS email_alert,
311
317
displaygroup.DisplayGroupID,
312
display.ClientAddress
318
display.ClientAddress,
319
CASE WHEN display.MediaInventoryStatus = 1 THEN '<img src="img/act.gif">'
320
WHEN display.MediaInventoryStatus = 2 THEN '<img src="img/warn.gif">'
321
ELSE '<img src="img/disact.gif">'
322
END AS MediaInventoryStatus,
323
display.MediaInventoryXml
314
325
INNER JOIN lkdisplaydg ON lkdisplaydg.DisplayID = display.DisplayID
315
326
INNER JOIN displaygroup ON displaygroup.DisplayGroupID = lkdisplaydg.DisplayGroupID
341
352
$msgGroupSecurity = __('Group Security');
342
353
$msgClientAddress = __('IP Address');
343
354
$msgDefault = __('Default Layout');
355
$msgStatus = __('Status');
356
$msgMediaInventory = __('Media Inventory');
346
359
<div class="info_table">
385
399
// Do we want to make a VNC link out of the display name?
386
400
$vncTemplate = Config::GetSetting($db, 'SHOW_DISPLAY_AS_VNCLINK');
387
401
$linkTarget = Kit::ValidateParam(Config::GetSetting($db, 'SHOW_DISPLAY_AS_VNC_TGT'), _STRING);
402
$mediaInventoryStatusLight = Kit::ValidateParam($aRow[10], _STRING);
389
404
if ($vncTemplate != '' && $clientAddress != '')
720
736
$response->SetFormSubmitResponse(__('Display Saved.'));
721
737
$response->Respond();
741
* Shows the inventory XML for the display
743
public function MediaInventory()
746
$response = new ResponseManager();
747
$displayId = Kit::GetParam('DisplayId', _GET, _INT);
750
trigger_error(__('No DisplayId Given'));
752
// Get the media inventory xml for this display
753
$SQL = "SELECT MediaInventoryXml FROM display WHERE DisplayId = %d";
754
$SQL = sprintf($SQL, $displayId);
756
if (!$mediaInventoryXml = $db->GetSingleValue($SQL, 'MediaInventoryXml', _HTMLSTRING))
758
trigger_error($db->error());
759
trigger_error(__('Unable to get the Inventory for this Display'), E_USER_ERROR);
762
// Load the XML into a DOMDocument
763
$document = new DOMDocument("1.0");
765
if (!$document->loadXML($mediaInventoryXml))
766
trigger_error(__('Invalid Media Inventory'), E_USER_ERROR);
769
$table = '<table><tr><th>Type</th><th>Id</th><th>Complete</th><th>Last Checked</th><th>MD5</th></tr>';
771
foreach ($document->documentElement->childNodes as $node)
773
$type = $node->getAttribute('type');
774
$id = $node->getAttribute('id');
775
$complete = $node->getAttribute('complete');
776
$lastChecked = $node->getAttribute('lastChecked');
777
$md5 = $node->getAttribute('md5');
780
$complete = __('No');
782
$complete = __('Yes');
784
$table .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td>', $type, $id, $complete, $lastChecked, $md5);
787
$table .= '</table>';
789
$response->SetFormRequestResponse($table, __('Media Inventory'), '550px', '350px');
790
$response->AddButton(__('Close'), 'XiboDialogClose()');
791
$response->Respond();