* obtain it through the world-wide-web, please send a note to * license@php.net so we can mail you a copy immediately. * * @category pearweb * @package PEPr * @author Tobias Schlitt <*****@*****.**> * @author Daniel Convissor <*****@*****.**> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License * @version $Id$ */ /** * Obtain the common functions and classes. */ require_once 'pepr/pepr.php'; if (!($proposal = proposal::get($dbh, (int) @$_GET['id']))) { response_header('PEPr :: Comments :: Invalid Request'); echo "<h1>Comments for</h1>\n"; report_error('The requested proposal does not exist.'); response_footer(); exit; } $id = $proposal->id; response_header('PEPr :: Comments :: ' . htmlspecialchars($proposal->pkg_name)); echo '<h1>Comments for "' . htmlspecialchars($proposal->pkg_name) . ""</h1>\n"; display_pepr_nav($proposal); if ($auth_user && $proposal->getStatus() == 'proposal') { include_once 'HTML/QuickForm2.php'; $form = new HTML_QuickForm2('comment', 'post', array('action' => 'pepr-comments-show.php?id=' . $id)); $form->removeAttribute('name'); $c = $form->addElement('textarea', 'comment', array('cols' => 70, 'rows' => 20, 'required' => 'required', 'placeholder' => 'Hi. Can I politely suggest that...', 'id' => 'comment_field'))->setLabel('Comments:');
* license@php.net so we can mail you a copy immediately. * * @category pearweb * @package PEPr * @author Tobias Schlitt <*****@*****.**> * @author Daniel Convissor <*****@*****.**> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License * @version $Id$ */ /** * Obtain the common functions and classes. */ require_once 'pepr/pepr.php'; $handle = htmlspecialchars(@$_GET['handle']); if (!($proposal =& proposal::get($dbh, @$_GET['id'])) || !$handle) { response_header('PEPr :: Vote Details :: Invalid Request'); echo "<h1>Vote Details</h1>\n"; report_error('The requested proposal or user does not exist.'); response_footer(); exit; } response_header('PEPr :: Vote Details :: ' . htmlspecialchars($proposal->pkg_name) . ' :: ' . $handle); echo '<h1>Vote Details for "' . htmlspecialchars($proposal->pkg_name) . '" by '; echo $handle . "</h1>\n"; display_pepr_nav($proposal); ?> <table border="0" cellspacing="0" cellpadding="2" style="width: 100%"> <tr>
* license@php.net so we can mail you a copy immediately. * * @category pearweb * @package PEPr * @author Tobias Schlitt <*****@*****.**> * @author Daniel Convissor <*****@*****.**> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License * @version $Id$ */ /** * Obtain the common functions and classes. */ require_once 'pepr/pepr.php'; require_once 'HTML/QuickForm2.php'; if (!isset($_GET['id']) || !($proposal = proposal::get($dbh, $_GET['id']))) { response_header('PEPr :: Votes :: Invalid Request'); echo "<h1>Proposal Votes</h1>\n"; report_error('The requested proposal does not exist.'); response_footer(); exit; } response_header('PEPr :: Votes :: ' . htmlspecialchars($proposal->pkg_name)); echo '<h1>Proposal Votes for "' . htmlspecialchars($proposal->pkg_name) . "\"</h1>\n"; if ($auth_user && $proposal->mayVote($dbh, $auth_user->handle)) { $form = new HTML_QuickForm2('vote', 'post', array('action' => 'pepr-votes-show.php?id=' . $proposal->id)); $form->removeAttribute('name'); $form->addDataSource(new HTML_QuickForm2_DataSource_Array(array('value' => 1))); $vote = $form->addElement('select', 'value', array('id' => 'vote_field', 'required' => 'required')); $vote->loadOptions(array(1 => '+1', 0 => '0', -1 => '-1')); $vote->setLabel("Vote:");
* license@php.net so we can mail you a copy immediately. * * @category pearweb * @package PEPr * @author Tobias Schlitt <*****@*****.**> * @author Daniel Convissor <*****@*****.**> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License * @version $Id$ */ /** * Obtain the common functions and classes. */ require_once 'pepr/pepr.php'; $proposal_id = isset($_GET['id']) ? (int) $_GET['id'] : false; if (!$proposal_id || !($proposal =& proposal::get($dbh, $proposal_id))) { response_header('PEPr :: Details :: Invalid Request'); echo "<h1>Proposal for</h1>\n"; report_error('The requested proposal does not exist.'); response_footer(); exit; } response_header('PEPr :: Details :: ' . htmlspecialchars($proposal->pkg_name)); echo '<h1>Proposal for "' . htmlspecialchars($proposal->pkg_name) . ""</h1>\n"; display_pepr_nav($proposal); $description = $proposal->getParsedDescription(); ?> <table border="0" cellspacing="0" cellpadding="2" style="width: 100%"> <tr>
* license@php.net so we can mail you a copy immediately. * * @category pearweb * @package PEPr * @author Tobias Schlitt <*****@*****.**> * @author Daniel Convissor <*****@*****.**> * @copyright Copyright (c) 1997-2005 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License * @version $Id$ */ auth_require('pear.pepr'); // Obtain the common functions and classes. include_once 'pepr/pepr.php'; $karma =& new Damblan_Karma($dbh); ob_start(); if ($proposal = proposal::get($dbh, @$_GET['id'])) { response_header('PEPr :: Editor :: ' . htmlspecialchars($proposal->pkg_name)); echo '<h1>Proposal Editor for "' . htmlspecialchars($proposal->pkg_name); echo '" (' . $proposal->getStatus(true) . ")</h1>\n"; if (!$proposal->mayEdit($auth_user->handle) && empty($_GET['next_stage'])) { report_error('You are not allowed to edit this proposal,' . ' probably due to it having reached the "' . $proposal->getStatus(true) . '" phase.' . ' If this MUST be edited, contact someone ELSE' . ' who has pear.pepr.admin karma.'); response_footer(); exit; } if ($proposal->compareStatus('>', 'proposal') && $karma->has($auth_user->handle, 'pear.pepr.admin') && empty($_GET['next_stage'])) { report_error('This proposal has reached the "' . $proposal->getStatus(true) . '" phase.' . ' Are you SURE you want to edit it?', 'warnings', 'WARNING:'); } $proposal->getLinks($dbh); $id = $proposal->id; } else { $proposal = proposal::fromOld(isset($_GET['old']) ? $_GET['old'] : null);
echo "<h1>Delete Proposal</h1>\n"; report_success('Proposal deleted successfully.'); echo '<p>'; echo make_link('/pepr/', 'Back to PEPr Home Page'); echo "</p>\n"; response_footer(); exit; } if (empty($_GET['id'])) { response_header('PEPr :: Delete :: Invalid Request'); echo "<h1>Delete Proposal</h1>\n"; report_error('The requested proposal does not exist.'); response_footer(); exit; } $proposal = proposal::get($dbh, $_GET['id']); if (!$proposal) { response_header('PEPr :: Delete :: Invalid Request'); echo "<h1>Delete Proposal</h1>\n"; report_error('The requested proposal does not exist.'); response_footer(); exit; } $karma = new Damblan_Karma($dbh); $form = new HTML_QuickForm2('delete-proposal', 'post', array('action' => 'pepr-proposal-delete.php?id=' . $proposal->id)); ob_start(); response_header('PEPr :: Delete :: ' . htmlspecialchars($proposal->pkg_name)); echo '<h1>Delete Proposal "' . htmlspecialchars($proposal->pkg_name) . ""</h1>\n"; if (!$proposal->mayEdit($auth_user->handle)) { report_error('You are not allowed to delete this proposal,' . ' probably due to it having reached the "' . $proposal->getStatus(true) . '" phase.' . ' If this MUST be deleted, contact someone ELSE' . ' who has pear.pepr.admin karma.'); response_footer();