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


PHP Check::getName方法代码示例

本文整理汇总了PHP中Check::getName方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::getName方法的具体用法?PHP Check::getName怎么用?PHP Check::getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Check的用法示例。


在下文中一共展示了Check::getName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: User

                     $user = new User($alt->getUserId());
                     $recipients[] = array("mail" => usr_var('alt_email', $user->getUserId()), "name" => $user->getUsername());
                     $alt_ids[] = $alt->getUserId();
                 }
                 $subscriptions = $db->query("SELECT DISTINCT user_id,check_id FROM subscriptions WHERE check_id=" . $check_id . ";");
                 foreach ($subscriptions as $sub) {
                     $user_id = $sub['user_id'];
                     if (!in_array($user_id, $alt_ids) && $user_id != $id_user_session) {
                         $user = new User($sub['user_id']);
                         $recipients[] = array("mail" => $user->getEmail(), "name" => $user->getUsername());
                     }
                 }
                 if (!empty($recipients)) {
                     // Send the mail to everybody
                     notify_multiple_users($user_session, $recipients, $subject_mail, $content_mail);
                     fMessaging::create('success', fURL::get(), 'The mail "' . $subject_mail . '" was successfully sent to all the users who subscribe to "' . $check->getName() . '"');
                 } else {
                     fMessaging::create('error', fURL::get(), "Nobody subscribe to this check");
                 }
             }
         }
     } 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());
     }
     $page_num = fRequest::get('page', 'int', 1);
     $url_redirect = CheckResult::makeURL('list', $check) . "&page=" . $page_num;
     fURL::redirect($url_redirect);
 } else {
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:result.php

示例2: catch

            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully updated');
        }
    } catch (fNotFoundException $e) {
        fMessaging::create('error', fURL::get(), 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
        fURL::redirect($check_list_url);
    } catch (fExpectedException $e) {
        fMessaging::create('error', fURL::get(), $e->getMessage());
    }
    include VIEW_PATH . '/add_edit.php';
    // --------------------------------- //
} elseif ('add' == $action) {
    $check = new Check();
    if (fRequest::isPost()) {
        try {
            $check->populate();
            fRequest::validateCSRFToken(fRequest::get('token'));
            $check->store();
            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully created');
            fURL::redirect($check_list_url);
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit.php';
} else {
    $page_num = fRequest::get('page', 'int', 1);
    $checks = Check::findAll($sort, $sort_dir, $GLOBALS['PAGE_SIZE'], $page_num);
    include VIEW_PATH . '/list_checks.php';
}
开发者ID:nleskiw,项目名称:Graphite-Tattle,代码行数:31,代码来源:check.php

示例3: catch

        fMessaging::create('error', $manage_url, 'The subscription 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 . '/add_edit_subscription.php';
    // --------------------------------- //
} elseif ('add' == $action) {
    $subscription = new Subscription();
    //Load details of the check we are going to subscribe to
    $check = new Check($check_id);
    if (fRequest::isPost()) {
        try {
            $subscription->populate();
            fRequest::validateCSRFToken(fRequest::get('token'));
            $subscription->store();
            fMessaging::create('affected', $manage_url, $check->getName());
            fMessaging::create('success', $manage_url, 'The subscription to ' . $check->getName() . ' was successfully created');
            fURL::redirect($manage_url);
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit_subscription.php';
} else {
    $user = new User(fSession::get('user_id'));
    $page_num = fRequest::get('page', 'int', 1);
    $subscriptions = Subscription::findAll(NULL, fSession::get('user_id'), $GLOBALS['PAGE_SIZE'], $page_num);
    //  $subscriptions = $user->buildSubscriptions();
    include VIEW_PATH . '/list_subscriptions.php';
}
开发者ID:nagyist,项目名称:Tattle,代码行数:31,代码来源:subscription.php

示例4: catch

            fMessaging::create('affected', fURL::get(), $check->getName());
            fMessaging::create('success', fURL::get(), 'The check ' . $check->getName() . ' was successfully updated');
        }
    } catch (fNotFoundException $e) {
        fMessaging::create('error', $check_list_url, 'The check requested, ' . fHTML::encode($check_id) . ', could not be found');
        fURL::redirect($check_list_url);
    } catch (fExpectedException $e) {
        fMessaging::create('error', fURL::get(), $e->getMessage());
    }
    include VIEW_PATH . '/add_edit.php';
    // --------------------------------- //
} elseif ('add' == $action) {
    $check = new Check();
    if (fRequest::isPost()) {
        try {
            $check->populate();
            fRequest::validateCSRFToken(fRequest::get('token'));
            $check->store();
            fMessaging::create('affected', $check_list_url, $check->getName());
            fMessaging::create('success', $check_list_url, 'The check ' . $check->getName() . ' was successfully created');
            fURL::redirect($check_list_url);
        } catch (fExpectedException $e) {
            fMessaging::create('error', fURL::get(), $e->getMessage());
        }
    }
    include VIEW_PATH . '/add_edit.php';
} else {
    //$checks = Check::findUsersActive($sort,$sort_dir);
    $checks = Check::findAll($sort, $sort_dir);
    include VIEW_PATH . '/list_checks.php';
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:31,代码来源:check.php


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