当前位置: 首页>>代码示例>>PHP>>正文


PHP Check::acknowledgeCheck方法代码示例

本文整理汇总了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');
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:result.php

示例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';
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:result.php


注:本文中的Check::acknowledgeCheck方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。