本文整理匯總了PHP中Graph::makeUrl方法的典型用法代碼示例。如果您正苦於以下問題:PHP Graph::makeUrl方法的具體用法?PHP Graph::makeUrl怎麽用?PHP Graph::makeUrl使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Graph
的用法示例。
在下文中一共展示了Graph::makeUrl方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: catch
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();
fRequest::validateCSRFToken(fRequest::get('token'));
$line->store();
$graph_url = Graph::makeUrl('edit', $graph);
fMessaging::create('affected', $graph_url, $line->getAlias());
fMessaging::create('success', $graph_url, 'The Line ' . $line->getAlias() . ' was successfully created');
fURL::redirect($graph_url);
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/add_edit_line.php';
}
示例2: elseif
include VIEW_PATH . '/add_edit_graph.php';
// --------------------------------- //
} elseif ('add' == $action) {
$graph = new Graph();
$dashboard = new Dashboard($dashboard_id);
if (fRequest::isPost()) {
try {
$graph->populate();
$graph->setStartsAtMidnight(isset($_POST['starts_at_midnight']) ? $_POST['starts_at_midnight'] : false);
fRequest::validateCSRFToken(fRequest::get('token'));
$graphs_in_dashboard = Graph::findAll($dashboard_id);
$graph->setWeight($graphs_in_dashboard->count(TRUE));
$graph->store();
fMessaging::create('affected', $manage_url, $graph->getName());
fMessaging::create('success', $manage_url, 'The Graph ' . $graph->getName() . ' was successfully created');
fURL::redirect(Graph::makeUrl('edit', $graph));
} catch (fExpectedException $e) {
fMessaging::create('error', fURL::get(), $e->getMessage());
}
}
include VIEW_PATH . '/add_edit_graph.php';
} elseif ('delete' == $action) {
$class_name = 'Graph';
try {
$obj = new Graph($graph_id);
$dashboard = new Dashboard($obj->getDashboardId());
$delete_text = 'Are you sure you want to delete the graph : <strong>' . $obj->getName() . '</strong>?';
if (fRequest::isPost()) {
fRequest::validateCSRFToken(fRequest::get('token'));
$obj->delete();
$lines = Line::findAll($graph_id);
示例3: getParamValue
until_moment = until_moment.add("minutes",1);
new_until = until_moment.format("HH:mm_YYYYMMDD");
}
$(".slider img").each(function(){
var url_graph_to_zoom = $(this).attr("src");
var old_from = getParamValue("from",url_graph_to_zoom);
var old_until = getParamValue("until",url_graph_to_zoom);
url_graph_to_zoom = url_graph_to_zoom.replace("from="+old_from,"from="+new_from);
if (old_until == "") {
url_graph_to_zoom += "&until="+new_until;
} else {
url_graph_to_zoom = url_graph_to_zoom.replace("until="+old_until,"until="+new_until);
}
$(this).attr("src",url_graph_to_zoom);
});
}
}
}
}
});
});
});
</script>
<?php
if (!$full_screen) {
echo '<a href="' . Dashboard::makeUrl('edit', $dashboard) . '">Edit Dashboard</a> | <a href="' . Graph::makeUrl('add', $dashboard) . '">Add Graph</a> | <a href="?' . fURL::getQueryString() . '&full_screen=true">Full Screen</a>';
$tmpl->set('show_bubbles', true);
$tmpl->place('footer');
}