| <?php | |
| /******************************************************************************* | |
| * Copyright (c) 2010 Eclipse Foundation and others. | |
| * | |
| * This program and the accompanying materials are made available under the | |
| * terms of the Eclipse Public License v. 2.0 which is available at | |
| * http://www.eclipse.org/legal/epl-2.0. | |
| * | |
| * SPDX-License-Identifier: EPL-2.0 | |
| *******************************************************************************/ | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/common.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/debug.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/app.class.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/nav.class.php"); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/eclipse.org-common/system/menu.class.php"); | |
| $App = new App(); | |
| $Nav = new Nav(); | |
| $Menu = new Menu(); | |
| // Not sure who we're protecting this from. | |
| //mustBeCommitter(); | |
| include($App->getProjectCommon()); | |
| require_once($_SERVER['DOCUMENT_ROOT'] . "/projects/classes/Proposal.class.php"); | |
| $proposals = get_proposals(); | |
| ob_start(); | |
| $pageKeywords = ""; | |
| $pageTitle = "Proposals"; | |
| $pageAuthor = "Wayne Beaton"; | |
| ?> | |
| <div id="midcolumn"> | |
| <div class="homeitem"> | |
| <h1><?= $pageTitle ?></h1> | |
| <?php | |
| function sort_by_date($proposal1, $proposal2) { | |
| if ($proposal1->getDate() == $proposal2->getDate()) return 0; | |
| return $proposal1->getDate() > $proposal2->getDate() ? -1 : 1; | |
| } | |
| usort($proposals, 'sort_by_date'); | |
| $counts = array(); | |
| echo "<ul>"; | |
| foreach($proposals as $proposal) { | |
| echo "<li>" . $proposal->asHtml(); | |
| echo "<ul>"; | |
| foreach($proposal->statuses as $status) { | |
| $text = $status->getText(); | |
| $date = $App->getFormattedDate($status->getDate(), 'short'); | |
| echo "<li>$date $text</li>"; | |
| } | |
| echo "</ul>"; | |
| echo "</li>"; | |
| $posted = $proposal->getProposalPosted(); | |
| if ($posted) { | |
| $period = date('Y-m', $posted->getDate()); | |
| @$counts[$period]++; | |
| } | |
| } | |
| echo "</ul>"; | |
| ?> | |
| </div> | |
| </div> | |
| <?php | |
| $html = ob_get_contents(); | |
| ob_end_clean(); | |
| $App->generatePage($theme, $Menu, $Nav, $pageAuthor, $pageKeywords, $pageTitle, $html); | |
| ?> |