本文整理汇总了PHP中fURL::getWithQueryString方法的典型用法代码示例。如果您正苦于以下问题:PHP fURL::getWithQueryString方法的具体用法?PHP fURL::getWithQueryString怎么用?PHP fURL::getWithQueryString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fURL
的用法示例。
在下文中一共展示了fURL::getWithQueryString方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: wasResetRequested
/**
* Indicates if a reset was requested for search values
*
* @return boolean If a reset was requested
*/
private static function wasResetRequested()
{
$tail = substr(fURL::getWithQueryString(), -6);
return $tail == '?reset' || $tail == '&reset';
}
示例2: 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();
?>
示例3:
?>
</head>
<body>
<?php
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>
示例4: array
$action = fRequest::getValid('action', array('list', 'add', 'edit', 'delete', 'view'));
$dashboard_id = fRequest::get('dashboard_id', 'integer?');
$graph_id = fRequest::get('graph_id', 'integer?');
$manage_url = $_SERVER['SCRIPT_NAME'];
// --------------------------------- //
if ('edit' == $action) {
try {
$graph = new Graph($graph_id);
$dashboard = new Dashboard($graph->getDashboardId());
$lines = Line::findAll($graph_id);
if (fRequest::isPost()) {
$graph->populate();
fRequest::validateCSRFToken(fRequest::get('token'));
$graph->store();
fMessaging::create('affected', fURL::get(), $graph->getName());
fMessaging::create('success', fURL::getWithQueryString(), 'The Graph ' . $graph->getName() . ' was successfully updated');
fURL::redirect(Dashboard::makeUrl('edit', $dashboard));
}
} catch (fNotFoundException $e) {
fMessaging::create('error', $manage_url, 'The Graph requested, ' . fHTML::encode($graph_id) . ', could not be found');
fURL::redirect($manage_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/add_edit_graph.php';
// --------------------------------- //
} elseif ('add' == $action) {
$graph = new Graph();
$dashboard = new Dashboard($dashboard_id);
if (fRequest::isPost()) {
try {
示例5: redirect
/**
* Redirects the user to the login page
*
* @return void
*/
private static function redirect()
{
self::setRequestedURL(fURL::getWithQueryString());
fURL::redirect(self::$login_page);
}
示例6: getCurrentUrl
/**
* For example: /path?param=value /path/
* @return string
*/
protected function getCurrentUrl()
{
return fURL::getWithQueryString();
}
示例7: catch
fURL::redirect(Graph::makeUrl('edit', $graph));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/delete.php';
// --------------------------------- //
} elseif ('edit' == $action) {
try {
$line = new Line($line_id);
$graph = new Graph($line->getGraphId());
if (fRequest::isPost()) {
$line->populate();
fRequest::validateCSRFToken(fRequest::get('token'));
$line->store();
fMessaging::create('affected', fURL::get(), $graph->getName());
fMessaging::create('success', fURL::getWithQueryString(), 'The Line ' . $line->getAlias() . ' was successfully updated');
}
} catch (fNotFoundException $e) {
fMessaging::create('error', Graph::makeUrl('edit', $graph), 'The Line requested, ' . fHTML::encode($line_id) . ', could not be found');
fURL::redirect(Graph::makeUrl('edit', $graph));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
include VIEW_PATH . '/add_edit_line.php';
// --------------------------------- //
} elseif ('add' == $action) {
$line = new Line();
$graph = new Graph($graph_id);
if (fRequest::isPost()) {
try {
$line->populate();
示例8: array
$over_under_array = array('0' => 'Over', '1' => 'Under');
$breadcrumbs = array();
$breadcrumbs[] = array('name' => 'Home', 'url' => '#', 'active' => false);
error_reporting(E_STRICT | E_ALL);
fCore::enableErrorHandling('html');
fCore::enableExceptionHandling('html');
fTimestamp::setDefaultTimezone($GLOBALS['TIMEZONE']);
fAuthorization::setLoginPage(User::makeURL('login'));
fAuthorization::setAuthLevels(array('admin' => 100, 'user' => 50, 'guest' => 25));
// This prevents cross-site session transfer
fSession::setPath($GLOBALS['SESSION_FILES']);
if (!fAuthorization::checkLoggedIn()) {
if ($GLOBALS['ALLOW_HTTP_AUTH'] && (isset($_SERVER['PHP_AUTH_USER']) && isset($_SERVER['PHP_AUTH_PW']))) {
unset($_SERVER['PHP_AUTH_PW']);
//no need for a clear text password hanging around.
try {
$user = new User(array('username' => $_SERVER['PHP_AUTH_USER']));
// Auto Register User
fAuthorization::setUserToken($user->getEmail());
fAuthorization::setUserAuthLevel($user->getRole());
fSession::set('user_id', $user->getUserId());
fSession::set('user_name', $user->getUsername());
} catch (fNotFoundException $e) {
if (fURL::getWithQueryString() != TATTLE_WEB_ROOT . User::makeURL('add')) {
fMessaging::create('affected', User::makeURL('add'), $_SERVER['PHP_AUTH_USER']);
fMessaging::create('success', User::makeURL('add'), 'The user ' . $_SERVER['PHP_AUTH_USER'] . ' was successfully created');
fURL::redirect(User::makeURL('add'));
}
}
}
}
示例9: redirect
/**
* Redirects the user to the login page
*
* @return void
*/
private static function redirect()
{
fSession::set('requested_url', fURL::getWithQueryString(), __CLASS__ . '::');
fURL::redirect(self::$login_page);
}
示例10: if
<?php
$tmpl->set('title', $action == 'add' ? 'Add a User' : 'Edit User');
$tmpl->place('header');
?>
<div class="row">
<div class="span6">
<form action="<?=fURL::getWithQueryString(); ?>" method="post">
<div class="main" id="main">
<fieldset>
<div class="clearfix">
<label for="user-username">User Name<em>*</em></label>
<div class="input">
<? if ($GLOBALS['ALLOW_HTTP_AUTH']) {
echo $_SERVER['PHP_AUTH_USER']; ?>
<input id="user-username" class="span3" type="hidden" name="username" value="<?=$_SERVER['PHP_AUTH_USER']; ?>">
<? } else { ?>
<input id="user-username" class="span3" type="text" size="30" name="username" value="<?=$user->encodeUsername(); ?>" />
<? } ?>
</div>
</div><!-- /clearfix -->
<div class="clearfix">
<label for="user-email">Email<em>*</em></label>
<div class="input">
<input id="user-email" class="span3" type="text" size="30" name="email" value="<?=$user->encodeEmail(); ?>" />
</div>
</div><!-- /clearfix -->
<? if (!$GLOBALS['ALLOW_HTTP_AUTH'] || ($user->getUserId() == 1)) { ?>
<div class="clearfix">
<label for="user-password">Password<em>*</em></label>
<div class="input">
<input id="user-password" class="span3" type="password" size="30" name="password" value="" />