本文整理汇总了PHP中Check::acknowledgeCheck方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::acknowledgeCheck方法的具体用法?PHP Check::acknowledgeCheck怎么用?PHP Check::acknowledgeCheck使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::acknowledgeCheck方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?php
include 'inc/init.php';
fAuthorization::requireLoggedIn();
$action = fRequest::getValid('action', array('list', 'add', 'edit', 'delete', 'ackAll', 'notifyAll'));
$result_id = fRequest::get('result_id', 'integer');
$check_id = fRequest::get('check_id', 'integer');
$manage_url = $_SERVER['SCRIPT_NAME'];
/*------------------------------------*/
if ($action == 'ackAll') {
try {
$check = new Check($check_id);
if (fRequest::isPost()) {
fRequest::validateCSRFToken(fRequest::get('token'));
//$check->acknowledgeCheck();
Check::acknowledgeCheck($check, NULL, true);
fMessaging::create('success', $manage_url, 'The alerts for ' . $check->getName() . ' were successfully acknowledged');
//fURL::redirect($manage_url);
}
} catch (fNotFoundException $e) {
fMessaging::create('error', $manage_url, 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
fURL::redirect($manage_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/ackAll_results.php';
} else {
if ($action == 'notifyAll') {
try {
$check = new Check($check_id);
$subject_mail = fRequest::get('subject_mail');
示例2: array
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/graphite-tattle/inc/init.php';
fAuthorization::requireLoggedIn();
$action = fRequest::getValid('action', array('list', 'add', 'edit', 'delete', 'ackAll'));
$result_id = fRequest::get('result_id', 'integer');
$check_id = fRequest::get('check_id');
$manage_url = '/graphite-tattle/';
/*------------------------------------*/
fCore:
expose($action);
if ($action == 'ackAll') {
try {
$check = new Check($check_id);
if (fRequest::isPost()) {
fRequest::validateCSRFToken(fRequest::get('token'));
$check->acknowledgeCheck();
fMessaging::create('success', $manage_url, 'The alerts for the check ' . $check->getTitle() . ' were successfully acknowledged');
fURL::redirect($manage_url);
}
} catch (fNotFoundException $e) {
fMessaging::create('error', $manage_url, 'The check requested, ' . fHTML::encode($date) . ', could not be found');
fURL::redirect($manage_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include DOC_ROOT . '/views/ackAll_results.php';
} else {
$check_results = Check_Result::findActive($check_id);
include DOC_ROOT . '/views/list_check_results.php';
}