本文整理汇总了PHP中project::get_navigation_links方法的典型用法代码示例。如果您正苦于以下问题:PHP project::get_navigation_links方法的具体用法?PHP project::get_navigation_links怎么用?PHP project::get_navigation_links使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::get_navigation_links方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
{
global $person_query;
global $project;
global $TPL;
$db = new db_alloc();
$db->query($person_query);
while ($db->next_record()) {
$person = new person();
$person->read_db_record($db);
$person->set_values("person_");
$TPL["graphTitle"] = urlencode($person->get_name());
include_template($template_name);
}
}
$projectID = $_POST["projectID"] or $projectID = $_GET["projectID"];
if ($projectID) {
$project = new project();
$project->set_id($projectID);
$project->select();
$TPL["navigation_links"] = $project->get_navigation_links();
$person_query = prepare("SELECT person.*\n FROM person, projectPerson\n WHERE person.personID = projectPerson.personID\n AND projectPerson.projectID=%d", $project->get_id());
} else {
if ($_GET["personID"]) {
$person_query = prepare("SELECT * FROM person WHERE personID = %d ORDER BY username", $_GET["personID"]);
} else {
$person_query = prepare("SELECT * FROM person ORDER BY username");
}
}
$TPL["projectID"] = $projectID;
$TPL["main_alloc_title"] = "Allocation Graph - " . APPLICATION_NAME;
include_template("templates/personGraphM.tpl");
示例2: get_list
public static function get_list($_FORM)
{
/*
* This is the definitive method of getting a list of projects that need a sophisticated level of filtering
*
*/
global $TPL;
$filter = project::get_list_filter($_FORM);
$debug = $_FORM["debug"];
$debug and print "<pre>_FORM: " . print_r($_FORM, 1) . "</pre>";
$debug and print "<pre>filter: " . print_r($filter, 1) . "</pre>";
$_FORM["return"] or $_FORM["return"] = "html";
if ($_FORM["personID"]) {
$from .= " LEFT JOIN projectPerson on projectPerson.projectID = project.projectID ";
}
if (is_array($filter) && count($filter)) {
$filter = " WHERE " . implode(" AND ", $filter);
}
$q = "SELECT project.*, client.* \n FROM project" . $from . "\n LEFT JOIN client ON project.clientID = client.clientID \n " . $filter . " \n GROUP BY project.projectID \n ORDER BY projectName";
// Zero is a valid limit
if ($_FORM["limit"] || $_FORM["limit"] === 0 || $_FORM["limit"] === "0") {
$q .= prepare(" LIMIT %d", $_FORM["limit"]);
}
$debug and print "Query: " . $q;
$db = new db_alloc();
$db->query($q);
while ($row = $db->next_record()) {
$print = true;
$p = new project();
$p->read_db_record($db);
$row["projectName"] = $p->get_name($_FORM);
$row["projectLink"] = $p->get_project_link($_FORM);
$row["navLinks"] = $p->get_navigation_links();
$label = $p->get_name($_FORM);
$_FORM["showProjectType"] and $label .= " [" . $p->get_project_type() . "]";
$row["label"] = $label;
$rows[$row["projectID"]] = $row;
}
return (array) $rows;
}