本文整理汇总了PHP中Dashboard::makeURL方法的典型用法代码示例。如果您正苦于以下问题:PHP Dashboard::makeURL方法的具体用法?PHP Dashboard::makeURL怎么用?PHP Dashboard::makeURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dashboard
的用法示例。
在下文中一共展示了Dashboard::makeURL方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
if (!$this->get('full_screen')) {
?>
<div class="topbar">
<div class="topbar-inner">
<div class="container-fluid">
<a class="brand" href="index.php">Tattle </a>
<ul class="nav">
<?
$current_url = fURL::getWithQueryString();
echo '<li' . ($current_url == '' ? ' class="active"' : '') . '><a href="index.php">Alerts</a></li>'. "\n";
$check_list = Check::makeURL('list');
echo '<li' . ($current_url == $check_list ? ' class="active"' : '') . '><a href="' . $check_list . '" >Checks</a></li>' . "\n";
$subscription_list = Subscription::makeURL('list');
echo '<li' . ($current_url == $subscription_list ? ' class="active"' : '') .'><a href="' . $subscription_list . '" >Subscriptions</a></li>' . "\n";
$dashboard_list = Dashboard::makeURL('list');
echo '<li' . ($current_url == $dashboard_list ? ' class="active"' : '') . '><a href="' . $dashboard_list . '">Dashboards</a></li>';
$setting_list = Setting::makeURL('list');
echo '<li' . ($current_url == $setting_list ? ' class="active"' : '') . '><a href="' . $setting_list . '" >Settings</a></li>' . "\n";
if (fAuthorization::checkAuthLevel('admin')) {
$user_list = User::makeURL('list');
echo '<li><a href="' . User::makeURL('list') . '" >Users</a></li>';
}
?>
</ul>
<?php
if (is_numeric(fSession::get('user_id'))) {
?>
<p class="pull-right">
Logged in as <a href="<?php
echo User::makeUrl('edit', fSession::get('user_id'));
示例2:
</td>
<td>
<a href="<?php
echo Dashboard::makeURL('view', $dashboard);
?>
">View</a> |
<a href="<?php
echo Dashboard::makeURL('edit', $dashboard);
?>
">Edit</a> |
<a href="<?php
echo Dashboard::makeURL('delete', $dashboard);
?>
">Delete</a> |
<a href="<?php
echo Dashboard::makeURL('export', $dashboard);
?>
" target="_blank">Export</a>
</td>
<td class="last"><input type="checkbox" name="id_mass_export[]" class="no-margin input-dashboard" value="<?php
echo $dashboard->getDashboardId();
?>
" /></td>
</tr>
<?php
}
?>
<?php
}
?>
</tbody>
示例3: array
<?
$page_title = ($action == 'add' ? 'Add a Line' : 'Edit Line');
$tmpl->set('title', $page_title);
$breadcrumbs[] = array('name' => 'Dashboard', 'url' => Dashboard::makeURL('list'),'active' => false);
//$breadcrumbs[] = array('name' => 'Edit Dashboard', 'url' => Dashboard::makeURL('edit',$graph),'active' => false);
$breadcrumbs[] = array('name' => $graph->prepareName(), 'url' => Graph::makeURL('edit',$graph),'active'=> false);
$breadcrumbs[] = array('name' => $page_title, 'url' => fURL::getWithQueryString(),'active'=> true);
$tmpl->set('breadcrumbs',$breadcrumbs);
$tmpl->place('header');
if (isset($line_id)) {
$query_string = "&line_id=$line_id";
} elseif (isset($graph_id)) {
$query_string = "&graph_id=$graph_id";
} else {
$query_string = '';
}
?>
<div class="row">
<div class="span6">
<form action="<?php
echo fURL::get();
?>
?action=<? echo $action.$query_string; ?>" method="post">
<div class="main" id="main">
<fieldset>
<div class="clearfix">
<label for="line-alias">Alias<em>*</em></label>
<div class="input">
<input id="line-alias" class="span3" type="text" size="30" name="alias" value="<?php
echo $line->encodeAlias();
?>
示例4: catch
fURL::redirect(Dashboard::makeUrl('list'));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/add_edit_dashboard.php';
// --------------------------------- //
} elseif ('add' == $action) {
$dashboard = new Dashboard();
if (fRequest::isPost()) {
try {
$dashboard->populate();
fRequest::validateCSRFToken(fRequest::get('token'));
$dashboard->store();
fMessaging::create('affected', fURL::get(), $dashboard->getName());
fMessaging::create('success', fURL::get(), 'The Dashboard ' . $dashboard->getName() . ' was successfully created');
fURL::redirect(Dashboard::makeURL('edit', $dashboard));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/add_edit_dashboard.php';
} elseif ('view' == $action) {
$url_parts = explode('/', $_SERVER['REQUEST_URI']);
$clean_url = false;
foreach ($url_parts as $url_part) {
if ($url_part == 'dash') {
$clean_url = true;
break;
} else {
array_shift($url_parts);
}
示例5: explode
$array_of_weights = explode(",", $drag_order);
$graphs_in_dashboard = array();
foreach ($array_of_weights as $new_weight) {
$expl = explode(":", $new_weight);
$current_graph = new Graph($expl[0]);
if (!isset($dashboard_id)) {
$dashboard_id = $current_graph->getDashboardId();
} else {
// Check if all the graphs are in the same dashboard
if ($dashboard_id != $current_graph->getDashboardId()) {
$error = true;
break;
}
}
$current_graph->setWeight($expl[1]);
$graphs_in_dashboard[] = $current_graph;
}
}
if (!$error) {
foreach ($graphs_in_dashboard as $graph_to_store) {
$graph_to_store->store();
}
$dashboard = new Dashboard($dashboard_id);
$url_redirect = Dashboard::makeURL('edit', $dashboard);
fMessaging::create("success", "/dashboard.php", "The graphs have been successfully reordered");
} else {
$url_redirect = Dashboard::makeURL('list');
fMessaging::create("success", "/dashboard.php", "An error occured and the graphs couldn't be reordered");
}
fURL::redirect($url_redirect);
}
示例6: catch
<th>Background Color</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<?php
$first = TRUE;
foreach ($dashboards as $dashboard) {
?>
<tr>
<td><?php echo $dashboard->prepareName() ?></td>
<td><?php echo $dashboard->prepareDescription() ?></td>
<td><?php echo $dashboard->prepareColumns() ?></td>
<td><?php echo $dashboard->prepareBackgroundColor() ?></td>
<td>
<a href="<?php echo Dashboard::makeURL('view', $dashboard) ?>">View</a> |
<a href="<?php echo Dashboard::makeURL('edit', $dashboard) ?>">Edit</a> |
<a href="<?php echo Dashboard::makeURL('delete', $dashboard) ?>">Delete</a></td>
</tr>
<?php } ?>
</tbody></table>
<?
} catch (fEmptySetException $e) {
?>
<p class="info">There are currently no Tattle Dashboards available for your account. <a href="<?php echo Dashboard::makeURL('add') ?>">Add one now</a></p>
<?php
}
?>
</div>
<?php $tmpl->place('footer') ?>
示例7:
<?php
$tmpl->set('title', 'Tattle : Self Service Alerts based on Graphite metrics');
$tmpl->set('full_screen', $full_screen);
// $tmpl->set('refresh',$dashboard->getRefreshRate());
$tmpl->place('header');
?>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid text-center navbar-form">
<a href="<?php
echo Dashboard::makeURL('list', $dashboard->getGroupId());
?>
" class="btn btn-primary">Return to list</a>
<a href="<?php
echo Dashboard::makeURL('edit', $dashboard);
?>
" class="btn btn-default">Edit this dashboard</a>
<?php
if ($dashboard->getRefreshRate() > 0) {
?>
<a href="#" class="btn btn-default" id="disable_refresh_btn" onclick="disable_refresh();return false;">Disable refresh</a>
<a href="#" class="btn btn-default" id="enable_refresh_btn" onclick="enable_refresh();return false;" style="display:none;">Enable refresh</a>
<?php
} else {
?>
<a href="#" class="btn btn-default" id="enable_refresh_btn" onclick="window.location.reload(true);">Refresh now</a>
<?php
}
?>
示例8: foreach
this one :
<input type="file" name="uploadedfile" id="fileInput" />
</p>
</form>
<p class="pull-right">
Filter group :
<select id="list_of_filters">
<option value="<?php
echo Dashboard::makeURL('list', -1);
?>
">All dashboards</option>
<?php
foreach (Group::findAll() as $group) {
?>
<option value="<?php
echo Dashboard::makeURL('list', $group->getGroupId());
?>
" <?php
echo $filter_group_id == $group->getGroupId() ? 'selected="selected"' : '';
?>
><?php
echo $group->getName();
?>
</option>
<?php
}
?>
</select>
</p>
</div>
<?php