本文整理汇总了PHP中Check::makeUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::makeUrl方法的具体用法?PHP Check::makeUrl怎么用?PHP Check::makeUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::makeUrl方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
<?
$page_title = $action == 'add' ? 'Add a Subscription' : 'Edit Subscription';
$tmpl->set('title', $page_title);
$breadcrumbs[] = array('name' => 'Checks', 'url' => Check::makeUrl('list'),'active' => false);
$breadcrumbs[] = array('name' => $check->getName(),'url'=> Check::makeUrl('edit',$check),'active' => false);
$breadcrumbs[] = array('name' => $page_title , 'url' => fURL::getWithQueryString(),'active' => false);
$tmpl->set('breadcrumbs',$breadcrumbs);
$tmpl->place('header');
$query_string = '';
if (isset($check_id)) {
$query_string .= "&check_id=$check_id";
}
if (isset($subscription_id)) {
$query_string .= "&subscription_id=$subscription_id";
}
?>
<div class="row">
<div class="span4">
<form class="form-stacked" action="<?php
echo fURL::get();
?>
?action=<?php
echo $action . $query_string;
?>
" method="post">
<div class="main" id="main">
<fieldset>
<div class="clearfix">
<label for="check-threshold">Alert State<em>*</em></label>
<div class="input">
示例2:
<?php
$tmpl->set('title', 'Self Service Alerts based on Graphite metrics');
$active_tab_alerts = " class=active";
$tmpl->set('breadcrumbs',$breadcrumbs);
$tmpl->place('header');
try {
$checks->tossIfEmpty();
$affected = fMessaging::retrieve('affected', fURL::get());
?>
<a class="small btn primary" href="<?= Check::makeUrl('add');?>">Add Check</a>
<table class="zebra-striped">
<thead>
<tr>
<th><?=fCRUD::printSortableColumn('name','Name'); ?></th>
<th><?=fCRUD::printSortableColumn('target','Target'); ?></th>
<th><?=fCRUD::printSortableColumn('warn','Warn'); ?></th>
<th><?=fCRUD::printSortableColumn('error','Error'); ?></th>
<th><?=fCRUD::printSortableColumn('sample','Sample'); ?></th>
<th><?=fCRUD::printSortableColumn('baseline','Baseline'); ?></th>
<th><?=fCRUD::printSortableColumn('over_under','Over/Under'); ?></th>
<th><?=fCRUD::printSortableColumn('visiblity','Visibility'); ?></th>
<th>Action</th>
</tr></thead><tbody>
<?php
$first = TRUE;
foreach ($checks as $check) {
?>
<tr>
<td><?='<a href="' . CheckResult::makeUrl('list',$check) . '">' . $check->prepareName(); ?></a></td>
<td><?=$check->prepareTarget(); ?></td>
示例3: array
<?php
include 'inc/init.php';
fAuthorization::requireLoggedIn();
fRequest::overrideAction();
$breadcrumbs[] = array('name' => 'Checks', 'url' => Check::makeUrl('list'), 'active' => false);
$action = fRequest::getValid('action', array('list', 'add', 'edit', 'delete'));
$sort = fCRUD::getSortColumn(array('name', 'target', 'warn', 'error', 'status', 'timestamp', 'count'));
$sort_dir = fCRUD::getSortDirection('asc');
$check_id = fRequest::get('check_id', 'integer');
$check_list_url = Check::makeURL('list');
// --------------------------------- //
if ('delete' == $action) {
try {
$obj = new Check($check_id);
$delete_text = 'Are you sure you want to delete the check : <strong>' . $obj->getName() . '</strong>?';
if (fRequest::isPost()) {
fRequest::validateCSRFToken(fRequest::get('token'));
$obj->delete();
// Do our own Subscription and CheckResult cleanup instead of using ORM
$subscriptions = Subscription::findAll($check_id);
foreach ($subscriptions as $subscription) {
$subscription->delete();
}
$check_results = CheckResult::findAll($check_id);
foreach ($check_results as $check_result) {
$check_result->delete();
}
fMessaging::create('success', fURL::get(), 'The check ' . $obj->getName() . ' was successfully deleted');
fURL::redirect($check_list_url);
}