本文整理汇总了PHP中Display::GetErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP Display::GetErrorMessage方法的具体用法?PHP Display::GetErrorMessage怎么用?PHP Display::GetErrorMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Display
的用法示例。
在下文中一共展示了Display::GetErrorMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RequestScreenShot
public function RequestScreenShot()
{
// Check the token
if (!Kit::CheckToken()) {
trigger_error(__('Sorry the form has expired. Please refresh.'), E_USER_ERROR);
}
$db =& $this->db;
$response = new ResponseManager();
$displayObject = new Display($db);
$displayId = Kit::GetParam('displayId', _POST, _INT);
if (!$displayObject->RequestScreenShot($displayId)) {
trigger_error($displayObject->GetErrorMessage(), E_USER_ERROR);
}
$response->SetFormSubmitResponse(__('Request Sent.'));
$response->Respond();
}
示例2: DisplayWakeOnLan
/**
* Display Wake On LAN
* @return <XiboAPIResponse>
*/
public function DisplayWakeOnLan()
{
if (!$this->user->PageAuth('display')) {
return $this->Error(1, 'Access Denied');
}
Kit::ClassLoader('Display');
$displayObject = new Display();
$displayId = $this->GetParam('displayId', _INT);
// Try to issue the WOL command
if (!$displayObject->WakeOnLan($displayId)) {
return $this->Error($displayObject->GetErrorNumber(), $displayObject->GetErrorMessage());
}
// Return True
return $this->Respond($this->ReturnId('success', true));
}
示例3: VersionInstructions
public function VersionInstructions()
{
$response = new ResponseManager();
Kit::ClassLoader('media');
Kit::ClassLoader('display');
Kit::ClassLoader('lkmediadisplaygroup');
$displayGroupId = Kit::GetParam('displaygroupid', _POST, _INT);
$mediaId = Kit::GetParam('mediaid', _POST, _INT);
// Make sure we have permission to do this to this display
$auth = $this->user->DisplayGroupAuth($displayGroupId, true);
if (!$auth->edit) {
trigger_error(__('You do not have permission to edit this display group'), E_USER_ERROR);
}
// Make sure we have permission to use this file
$mediaAuth = $this->user->MediaAuth($mediaId, true);
if (!$mediaAuth->view) {
trigger_error(__('You have selected media that you no longer have permission to use. Please reload the form.'), E_USER_ERROR);
}
// Make sure this file is assigned to this display group
$link = new LkMediaDisplayGroup($this->db);
if (!$link->Link($displayGroupId, $mediaId)) {
trigger_error($display->GetErrorMessage(), E_USER_ERROR);
}
// Get the "StoredAs" for this media item
$media = new Media($this->db);
$storedAs = $media->GetStoredAs($mediaId);
// Get a list of displays for this group
$displays = $this->user->DisplayList(array('displayid'), array('displaygroupid' => $displayGroupId));
foreach ($displays as $display) {
// Update the Display with the new instructions
$displayObject = new Display($this->db);
if (!$displayObject->SetVersionInstructions($display['displayid'], $mediaId, $storedAs)) {
trigger_error($displayObject->GetErrorMessage(), E_USER_ERROR);
}
}
$response->SetFormSubmitResponse(__('Version Instructions Set'));
$response->Respond();
}
示例4: foreach
$sth->execute(array());
foreach ($sth->fetchAll() as $row) {
$displayId = Kit::ValidateParam($row['DisplayID'], _INT);
$display = Kit::ValidateParam($row['Display'], _STRING);
$wakeOnLanTime = Kit::ValidateParam($row['WakeOnLanTime'], _STRING);
$lastWakeOnLan = Kit::ValidateParam($row['LastWakeOnLanCommandSent'], _INT);
// Time to WOL (with respect to today)
$timeToWake = strtotime(date('Y-m-d') . ' ' . $wakeOnLanTime);
$timeNow = time();
// Should the display be awake?
if ($timeNow >= $timeToWake) {
// Client should be awake, so has this displays WOL time been passed
if ($lastWakeOnLan < $timeToWake) {
// Call the Wake On Lan method of the display object
if (!$displayObject->WakeOnLan($displayId)) {
print $display . ':Error=' . $displayObject->GetErrorMessage() . '<br/>\\n';
} else {
print $display . ':Sent WOL Message. Previous WOL send time: ' . date('Y-m-d H:i:s', $lastWakeOnLan) . '<br/>\\n';
}
} else {
print $display . ':Display already awake. Previous WOL send time: ' . date('Y-m-d H:i:s', $lastWakeOnLan) . '<br/>\\n';
}
} else {
print $display . ':Sleeping<br/>\\n';
}
print $display . ':N/A<br/>\\n';
}
print __('Done.');
} catch (Exception $e) {
Debug::LogEntry('error', $e->getMessage());
}
示例5: WakeOnLan
/**
* Wake on LAN
*/
public function WakeOnLan()
{
// Check the token
if (!Kit::CheckToken()) {
trigger_error('Token does not match', E_USER_ERROR);
}
$db =& $this->db;
$response = new ResponseManager();
$displayObject = new Display($db);
$displayId = Kit::GetParam('DisplayId', _POST, _INT);
if (!$displayObject->WakeOnLan($displayId)) {
trigger_error($displayObject->GetErrorMessage(), E_USER_ERROR);
}
$response->SetFormSubmitResponse(__('Wake on Lan command sent.'));
$response->Respond();
}