<?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/>. */ $refURL = $_GET['refURL']; if (RequestUtil::isExpenseContractPath($refURL) || RequestUtil::isRevenueContractPath($refURL)) { $title = _get_contracts_breadcrumb_title_drilldown(); } if (RequestUtil::isPendingExpenseContractPath($refURL) || RequestUtil::isPendingRevenueContractPath($refURL)) { $title = _get_pending_contracts_breadcrumb_title_drilldown(); } $domain = 'Contracts';
/** Returns Contracts page title and Breadcrumb */ static function getContractBreadcrumbTitle() { $bottomURL = $_REQUEST['expandBottomContURL']; if (preg_match('/magid/', $bottomURL)) { $magid = RequestUtil::getRequestKeyValueFromURL("magid", $bottomURL); $contract_number = _get_master_agreement_details($magid); return $contract_number['contract_number']; } elseif (preg_match('/agid/', $bottomURL)) { $agid = RequestUtil::getRequestKeyValueFromURL("agid", $bottomURL); $contract_number = _get_child_agreement_details($agid); return $contract_number['contract_number']; } elseif (preg_match('/contract/', $bottomURL) && preg_match('/pending_contract_transactions/', $bottomURL)) { $contract_number = RequestUtil::getRequestKeyValueFromURL("contract", $bottomURL); return $contract_number; } else { if (isset($bottomURL) && preg_match('/transactions/', $bottomURL)) { $smnid = RequestUtil::getRequestKeyValueFromURL("smnid", $bottomURL); $dashboard = RequestUtil::getRequestKeyValueFromURL("dashboard", $bottomURL); $title = NodeSummaryUtil::getInitNodeSummaryTitle($smnid); if ($smnid == 720 && $dashboard != 'mp') { $title = ''; } if (preg_match('/^contracts_landing/', current_path()) && preg_match('/status\\/A/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Active Expense Contracts Transactions'; } elseif (preg_match('/^contracts_landing/', current_path()) && preg_match('/status\\/R/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Registered Expense Contracts Transactions'; } elseif (preg_match('/^contracts_revenue_landing/', current_path()) && preg_match('/status\\/A/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Active Revenue Contracts Transactions'; } elseif (preg_match('/^contracts_revenue_landing/', current_path()) && preg_match('/status\\/R/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Registered Revenue Contracts Transactions'; } elseif (preg_match('/^contracts_pending_exp_landing/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Pending Expense Contracts Transactions'; } elseif (preg_match('/^contracts_pending_rev_landing/', current_path())) { $title = RequestUtil::getDashboardTitle() . ' ' . $title . ' ' . ' Pending Revenue Contracts Transactions'; } } elseif (preg_match('/^contracts_landing/', current_path()) && preg_match('/status\\/A/', current_path())) { $title = _get_contracts_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Active Expense Contracts'; } elseif (preg_match('/^contracts_landing/', current_path()) && preg_match('/status\\/R/', current_path())) { $title = _get_contracts_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Registered Expense Contracts'; } elseif (preg_match('/^contracts_revenue_landing/', current_path()) && preg_match('/status\\/A/', current_path())) { $title = _get_contracts_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Active Revenue Contracts'; } elseif (preg_match('/^contracts_revenue_landing/', current_path()) && preg_match('/status\\/R/', current_path())) { $title = _get_contracts_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Registered Revenue Contracts'; } elseif (preg_match('/^contracts_pending_exp_landing/', current_path())) { $title = _get_pending_contracts_breadcrumb_title_drilldown() . ' ' . RequestUtil::getDashboardTitle() . ' Pending Expense Contracts'; } elseif (preg_match('/^contracts_pending_rev_landing/', current_path())) { $title = _get_pending_contracts_breadcrumb_title_drilldown() . ' ' . RequestUtil::getDashboardTitle() . ' Pending Revenue Contracts'; } else { global $checkbook_breadcrumb_title; $title = $checkbook_breadcrumb_title; } } return html_entity_decode($title); }