/** Returns Spending page title and Breadcrumb */ static function getSpendingBreadcrumbTitle() { $bottomURL = $_REQUEST['expandBottomContURL']; if (preg_match('/transactions/', current_path())) { $title = SpendingUtil::getSpendingTransactionsTitle(); } elseif (isset($bottomURL) && preg_match('/transactions/', $bottomURL)) { $dtsmnid = RequestUtil::getRequestKeyValueFromURL("dtsmnid", $bottomURL); $smnid = RequestUtil::getRequestKeyValueFromURL("smnid", $bottomURL); if ($dtsmnid > 0) { $title = NodeSummaryUtil::getInitNodeSummaryTitle($dtsmnid); } else { if ($smnid > 0) { $title = NodeSummaryUtil::getInitNodeSummaryTitle($smnid); } else { $last_id = _getLastRequestParamValue($bottomURL); if ($last_id['vendor'] > 0) { $title = _checkbook_project_get_name_for_argument("vendor_id", RequestUtil::getRequestKeyValueFromURL("vendor", $bottomURL)); } elseif ($last_id["agency"] > 0) { $title = _checkbook_project_get_name_for_argument("agency_id", RequestUtil::getRequestKeyValueFromURL("agency", $bottomURL)); } elseif ($last_id["expcategory"] > 0) { $title = _checkbook_project_get_name_for_argument("expenditure_object_id", RequestUtil::getRequestKeyValueFromURL("expcategory", $bottomURL)); } elseif ($last_id["dept"] > 0) { $title = _checkbook_project_get_name_for_argument("department_id", RequestUtil::getRequestKeyValueFromURL("dept", $bottomURL)); } elseif (preg_match("/\\/agid/", $bottomURL)) { $title = _checkbook_project_get_name_for_argument("agreement_id", RequestUtil::getRequestKeyValueFromURL("agid", $bottomURL)); } elseif (preg_match("/\\/magid/", $bottomURL)) { $title = _checkbook_project_get_name_for_argument("master_agreement_id", RequestUtil::getRequestKeyValueFromURL("magid", $bottomURL)); } if (preg_match('/\\/category\\/1/', $bottomURL)) { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Contract Spending Transactions'; } elseif (preg_match('/\\/category\\/2/', $bottomURL)) { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Payroll Spending Transactions'; } elseif (preg_match('/\\/category\\/3/', $bottomURL)) { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Capital Contracts Spending Transactions'; } elseif (preg_match('/\\/category\\/4/', $bottomURL)) { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Others Spending Transactions'; } elseif (preg_match('/\\/category\\/5/', $bottomURL)) { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Trust & Agency Spending Transactions'; } else { $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Total Spending Transactions'; } } } } elseif (preg_match('/\\/category\\/1/', current_path())) { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Contract Spending'; } elseif (preg_match('/\\/category\\/2/', current_path())) { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Payroll Spending'; } elseif (preg_match('/\\/category\\/3/', current_path())) { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Capital Contracts Spending'; } elseif (preg_match('/\\/category\\/4/', current_path())) { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Others Spending'; } elseif (preg_match('/\\/category\\/5/', current_path())) { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Trust & Agency Spending'; } else { $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Total Spending'; } return html_entity_decode($title); }
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ $title = _get_spending_breadcrumb_title_drilldown(); $domain = 'Spending';