cvs: pearweb /include pear-format-html.php /public_html account-edit.php account-mail.php account-request.php release-upload.php
| From: | Daniel Convissor | Date: | Tue, 05 Oct 2004 18:38:46 +0000 |
| Subject: | cvs: pearweb /include pear-format-html.php /public_html account-edit.php account-mail.php account-request.php release-upload.php | ||
| Groups: | php.pear.cvs php.pear.core | ||
| Request: | Send a blank email to pear-cvs+get-24621@lists.php.net to get a copy of this message | ||
danielc Tue Oct 5 14:38:46 2004 EDT
Modified files:
/pearweb/include pear-format-html.php
/pearweb/public_html account-edit.php account-mail.php
account-request.php release-upload.php
Log:
* Take advantage of HTML_Form's new constants.
http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.150&r2=1.151&ty=u Index: pearweb/include/pear-format-html.php diff -u pearweb/include/pear-format-html.php:1.150 pearweb/include/pear-format-html.php:1.151 --- pearweb/include/pear-format-html.php:1.150 Wed Sep 22 01:20:01 2004 +++ pearweb/include/pear-format-html.php Tue Oct 5 14:38:46 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: pear-format-html.php,v 1.150 2004/09/22 05:20:01 danielc Exp $ + $Id: pear-format-html.php,v 1.151 2004/10/05 18:38:46 danielc Exp $ */ PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'error_handler'); @@ -990,7 +990,8 @@ } $_SESSION['captcha_time'] = time(); } - return 'Type <img src="/captcha-image.php" alt="If you are unable to' + return 'Type <img src="/captcha-image.php?x=' . time() + . '" alt="If you are unable to' . ' read this image, click the help link to the right of' . ' the input box" align="top" /> into this box...' . ' <input type="text" size="4" maxlength="4" name="captcha" />' http://cvs.php.net/diff.php/pearweb/public_html/account-edit.php?r1=1.35&r2=1.36&ty=u Index: pearweb/public_html/account-edit.php diff -u pearweb/public_html/account-edit.php:1.35 pearweb/public_html/account-edit.php:1.36 --- pearweb/public_html/account-edit.php:1.35 Sat Jul 24 14:01:46 2004 +++ pearweb/public_html/account-edit.php Tue Oct 5 14:38:46 2004 @@ -15,11 +15,13 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-edit.php,v 1.35 2004/07/24 18:01:46 danielc Exp $ + $Id: account-edit.php,v 1.36 2004/10/05 18:38:46 danielc Exp $ */ auth_require(); +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; if (isset($_GET['handle'])) { @@ -140,40 +142,28 @@ } -$th = 'class="form-label_left"'; -$td = 'class="form-input"'; - $form = new HTML_Form($_SERVER['PHP_SELF'], 'post'); $form->addText('name', '<span class="accesskey">N</span>ame:', - $row['name'], 40, null, 'accesskey="n"', - $th, $td); + $row['name'], 40, null, 'accesskey="n"'); $form->addText('email', 'Email:', - $row['email'], 40, null, '', - $th, $td); + $row['email'], 40, null); $form->addCheckbox('showemail', 'Show email address?', - $row['showemail'], '', - $th, $td); + $row['showemail']); $form->addText('homepage', 'Homepage:', - $row['homepage'], 40, null, '', - $th, $td); + $row['homepage'], 40, null); $form->addText('wishlist', 'Wishlist URI:', - $row['wishlist'], 40, null, '', - $th, $td); + $row['wishlist'], 40, null); $form->addText('pgpkeyid', 'PGP Key ID:' . '<p class="cell_note">(Without leading 0x)</p>', - $row['pgpkeyid'], 40, 8, '', - $th, $td); + $row['pgpkeyid'], 40, 8); $form->addTextarea('userinfo', 'Additional User Information:', - $row['userinfo'], 40, 5, null, '', - $th, $td); + $row['userinfo'], 40, 5, null); $form->addTextarea('cvs_acl', 'CVS Access:', - $cvs_acl, 40, 5, null, '', - $th, $td); -$form->addSubmit('submit', 'Submit', '', - $th, $td); + $cvs_acl, 40, 5, null); +$form->addSubmit('submit', 'Submit'); $form->addHidden('handle', $handle); $form->addHidden('command', 'update'); $form->display('class="form-holder" style="margin-bottom: 2em;"' @@ -187,16 +177,12 @@ $form = new HTML_Form($_SERVER['PHP_SELF'], 'post'); $form->addPlaintext('<span class="accesskey">O</span>ld Password:', $form->returnPassword('password_old', '', 40, 0, - 'accesskey="o"'), - $th, $td); + 'accesskey="o"')); $form->addPassword('password', 'Password', - '', 10, null, '', - $th, $td); + '', 10, null); $form->addCheckbox('PEAR_PERSIST', 'Remember username and password?', - '', '', - $th, $td); -$form->addSubmit('submit', 'Submit', '', - $th, $td); + ''); +$form->addSubmit('submit', 'Submit'); $form->addHidden('handle', $handle); $form->addHidden('command', 'change_password'); $form->display('class="form-holder" cellspacing="1"', http://cvs.php.net/diff.php/pearweb/public_html/account-mail.php?r1=1.14&r2=1.15&ty=u Index: pearweb/public_html/account-mail.php diff -u pearweb/public_html/account-mail.php:1.14 pearweb/public_html/account-mail.php:1.15 --- pearweb/public_html/account-mail.php:1.14 Wed Sep 22 01:43:48 2004 +++ pearweb/public_html/account-mail.php Tue Oct 5 14:38:46 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-mail.php,v 1.14 2004/09/22 05:43:48 danielc Exp $ + $Id: account-mail.php,v 1.15 2004/10/05 18:38:46 danielc Exp $ */ /** @@ -32,6 +32,8 @@ $errors = array(); } +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; // {{{ printForm @@ -48,31 +50,21 @@ } } - $th = 'class="form-label_left"'; - $td = 'class="form-input"'; - $form = new HTML_Form($_SERVER['PHP_SELF'] . '?handle=' . $_GET['handle'], 'post', 'contact'); $form->addText('name', 'Y<span class="accesskey">o</span>ur Name:', - $data['name'], 40, null, 'accesskey="o"', - $th, $td); - $form->addPlaintext('CAPTCHA:', generate_captcha(), - $th, $td); + $data['name'], 40, null, 'accesskey="o"'); + $form->addPlaintext('CAPTCHA:', generate_captcha()); $form->addText('email', 'Email Address:', - $data['email'], 40, null, '', - $th, $td); + $data['email'], 40, null); $form->addCheckBox('copy_me', 'Send me a copy of this mail:', - $data['copy_me'], '', - $th, $td); + $data['copy_me']); $form->addText('subject', 'Subject:', - $data['subject'], 40, null, '', - $th, $td); + $data['subject'], 40, null); $form->addTextarea('text', 'Text:', - $data['text'], 35, 10, null, '', - $th, $td); - $form->addSubmit('submit', 'Submit', '', - $th, $td); + $data['text'], 35, 10, null); + $form->addSubmit('submit', 'Submit'); $form->display('class="form-holder"' . ' cellspacing="1"', 'Send Email', 'class="form-caption"'); http://cvs.php.net/diff.php/pearweb/public_html/account-request.php?r1=1.45&r2=1.46&ty=u Index: pearweb/public_html/account-request.php diff -u pearweb/public_html/account-request.php:1.45 pearweb/public_html/account-request.php:1.46 --- pearweb/public_html/account-request.php:1.45 Sat Aug 14 11:25:40 2004 +++ pearweb/public_html/account-request.php Tue Oct 5 14:38:46 2004 @@ -15,9 +15,11 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-request.php,v 1.45 2004/08/14 15:25:40 danielc Exp $ + $Id: account-request.php,v 1.46 2004/10/05 18:38:46 danielc Exp $ */ +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; $display_form = true; @@ -173,48 +175,34 @@ $form = new HTML_Form($_SERVER['PHP_SELF'] . '#requestform', 'post'); $form->addText('handle', 'Use<span class="accesskey">r</span>name:', - @$_POST['handle'], 12, 20, 'accesskey="r"', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['handle'], 12, 20, 'accesskey="r"'); $form->addText('firstname', 'First Name:', - @$_POST['firstname'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['firstname'], 20, null); $form->addText('lastname', 'Last Name:', - @$_POST['lastname'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['lastname'], 20, null); $form->addPassword('password', 'Password:', - '', 10, null, '', - 'class="form-label_left"', 'class="form-input"'); - $form->addPlaintext('CAPTCHA:', - generate_captcha(), - 'class="form-label_left"', 'class="form-input"'); + '', 10, null); + $form->addPlaintext('CAPTCHA:', generate_captcha()); $form->addText('email', 'Email Address:', - @$_POST['email'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['email'], 20, null); $form->addCheckbox('showemail', 'Show email address?', - @$_POST['showemail'], '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['showemail']); $form->addText('homepage', 'Homepage:', - @$_POST['homepage'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['homepage'], 20, null); $form->addPlaintext('Purpose of your PEAR account:' . '<p class="cell_note">(Check all that apply)</p>', - $purposechecks, - 'class="form-label_left"', 'class="form-input"'); + $purposechecks); $form->addTextarea('purpose', 'If your intended purpose is not in the list, please state it here:', - stripslashes(@$_POST['purpose']), 40, 5, null, '', - 'class="form-label_left"', 'class="form-input"'); + stripslashes(@$_POST['purpose']), 40, 5, null); $form->addTextarea('moreinfo', 'More relevant information about you:' . '<p class="cell_note">(optional)</p>', - stripslashes(@$_POST['moreinfo']), 40, 5, null, '', - 'class="form-label_left"', 'class="form-input"'); + stripslashes(@$_POST['moreinfo']), 40, 5, null); $form->addCheckbox('comments_read', 'You have read all of the comments above:', - @$_POST['comments_read'], '', - 'class="form-label_left"', 'class="form-input"'); - $form->addSubmit('submit', 'Submit Query', '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['comments_read']); + $form->addSubmit('submit', 'Submit Query'); $form->display('class="form-holder" cellspacing="1"', 'Request Account', 'class="form-caption"'); http://cvs.php.net/diff.php/pearweb/public_html/release-upload.php?r1=1.43&r2=1.44&ty=u Index: pearweb/public_html/release-upload.php diff -u pearweb/public_html/release-upload.php:1.43 pearweb/public_html/release-upload.php:1.44 --- pearweb/public_html/release-upload.php:1.43 Wed Jul 14 22:35:06 2004 +++ pearweb/public_html/release-upload.php Tue Oct 5 14:38:46 2004 @@ -15,20 +15,21 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: release-upload.php,v 1.43 2004/07/15 02:35:06 danielc Exp $ + $Id: release-upload.php,v 1.44 2004/10/05 18:38:46 danielc Exp $ */ auth_require('pear.dev'); define('HTML_FORM_MAX_FILE_SIZE', 16 * 1024 * 1024); // 16 MB +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); + require_once 'HTML/Form.php'; $display_form = true; $display_verification = false; $success = false; $errors = array(); -$th = 'class="form-label_left"'; -$td = 'class="form-input"'; PEAR::pushErrorHandling(PEAR_ERROR_RETURN); @@ -188,9 +189,8 @@ $form->addFile('distfile', '<label for="f" accesskey="i">D<span class="accesskey">i</span>' . 'stribution File</label>', - HTML_FORM_MAX_FILE_SIZE, 40, '', 'id="f"', $th, $td); - $form->addSubmit('upload', 'Upload!', '', - $th, $td); + HTML_FORM_MAX_FILE_SIZE, 40, '', 'id="f"'); + $form->addSubmit('upload', 'Upload!'); $form->display('class="form-holder" cellspacing="1"', 'Upload', 'class="form-caption"'); } @@ -238,29 +238,20 @@ } $form =& new HTML_Form($_SERVER['PHP_SELF'], 'post'); - $form->addPlaintext('Package:', $info['package'], - $th, $td); - $form->addPlaintext('Version:', $info['version'], - $th, $td); - $form->addPlaintext('Summary:', htmlspecialchars($info['summary']), - $th, $td); - $form->addPlaintext('Description:', nl2br(htmlspecialchars($info['description'])), - $th, $td); - $form->addPlaintext('Release State:', $info['release_state'], - $th, $td); - $form->addPlaintext('Release Date:', $info['release_date'], - $th, $td); - $form->addPlaintext('Release Notes:', nl2br(htmlspecialchars($info['release_notes'])), - $th, $td); + $form->addPlaintext('Package:', $info['package']); + $form->addPlaintext('Version:', $info['version']); + $form->addPlaintext('Summary:', htmlspecialchars($info['summary'])); + $form->addPlaintext('Description:', nl2br(htmlspecialchars($info['description']))); + $form->addPlaintext('Release State:', $info['release_state']); + $form->addPlaintext('Release Date:', $info['release_date']); + $form->addPlaintext('Release Notes:', nl2br(htmlspecialchars($info['release_notes']))); // Don't show the next step button when errors found if (!count($errors)) { - $form->addSubmit('verify', 'Verify Release', '', - $th, $td); + $form->addSubmit('verify', 'Verify Release'); } - $form->addSubmit('cancel', 'Cancel', '', - $th, $td); + $form->addSubmit('cancel', 'Cancel'); $form->addHidden('distfile', $tmpfile); $form->display('class="form-holder" cellspacing="1"', 'Please verify that the following release information is correct',
http://cvs.php.net/diff.php/pearweb/include/pear-format-html.php?r1=1.150&r2=1.151&ty=u Index: pearweb/include/pear-format-html.php diff -u pearweb/include/pear-format-html.php:1.150 pearweb/include/pear-format-html.php:1.151 --- pearweb/include/pear-format-html.php:1.150 Wed Sep 22 01:20:01 2004 +++ pearweb/include/pear-format-html.php Tue Oct 5 14:38:46 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: pear-format-html.php,v 1.150 2004/09/22 05:20:01 danielc Exp $ + $Id: pear-format-html.php,v 1.151 2004/10/05 18:38:46 danielc Exp $ */ PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, 'error_handler'); @@ -990,7 +990,8 @@ } $_SESSION['captcha_time'] = time(); } - return 'Type <img src="/captcha-image.php" alt="If you are unable to' + return 'Type <img src="/captcha-image.php?x=' . time() + . '" alt="If you are unable to' . ' read this image, click the help link to the right of' . ' the input box" align="top" /> into this box...' . ' <input type="text" size="4" maxlength="4" name="captcha" />' http://cvs.php.net/diff.php/pearweb/public_html/account-edit.php?r1=1.35&r2=1.36&ty=u Index: pearweb/public_html/account-edit.php diff -u pearweb/public_html/account-edit.php:1.35 pearweb/public_html/account-edit.php:1.36 --- pearweb/public_html/account-edit.php:1.35 Sat Jul 24 14:01:46 2004 +++ pearweb/public_html/account-edit.php Tue Oct 5 14:38:46 2004 @@ -15,11 +15,13 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-edit.php,v 1.35 2004/07/24 18:01:46 danielc Exp $ + $Id: account-edit.php,v 1.36 2004/10/05 18:38:46 danielc Exp $ */ auth_require(); +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; if (isset($_GET['handle'])) { @@ -140,40 +142,28 @@ } -$th = 'class="form-label_left"'; -$td = 'class="form-input"'; - $form = new HTML_Form($_SERVER['PHP_SELF'], 'post'); $form->addText('name', '<span class="accesskey">N</span>ame:', - $row['name'], 40, null, 'accesskey="n"', - $th, $td); + $row['name'], 40, null, 'accesskey="n"'); $form->addText('email', 'Email:', - $row['email'], 40, null, '', - $th, $td); + $row['email'], 40, null); $form->addCheckbox('showemail', 'Show email address?', - $row['showemail'], '', - $th, $td); + $row['showemail']); $form->addText('homepage', 'Homepage:', - $row['homepage'], 40, null, '', - $th, $td); + $row['homepage'], 40, null); $form->addText('wishlist', 'Wishlist URI:', - $row['wishlist'], 40, null, '', - $th, $td); + $row['wishlist'], 40, null); $form->addText('pgpkeyid', 'PGP Key ID:' . '<p class="cell_note">(Without leading 0x)</p>', - $row['pgpkeyid'], 40, 8, '', - $th, $td); + $row['pgpkeyid'], 40, 8); $form->addTextarea('userinfo', 'Additional User Information:', - $row['userinfo'], 40, 5, null, '', - $th, $td); + $row['userinfo'], 40, 5, null); $form->addTextarea('cvs_acl', 'CVS Access:', - $cvs_acl, 40, 5, null, '', - $th, $td); -$form->addSubmit('submit', 'Submit', '', - $th, $td); + $cvs_acl, 40, 5, null); +$form->addSubmit('submit', 'Submit'); $form->addHidden('handle', $handle); $form->addHidden('command', 'update'); $form->display('class="form-holder" style="margin-bottom: 2em;"' @@ -187,16 +177,12 @@ $form = new HTML_Form($_SERVER['PHP_SELF'], 'post'); $form->addPlaintext('<span class="accesskey">O</span>ld Password:', $form->returnPassword('password_old', '', 40, 0, - 'accesskey="o"'), - $th, $td); + 'accesskey="o"')); $form->addPassword('password', 'Password', - '', 10, null, '', - $th, $td); + '', 10, null); $form->addCheckbox('PEAR_PERSIST', 'Remember username and password?', - '', '', - $th, $td); -$form->addSubmit('submit', 'Submit', '', - $th, $td); + ''); +$form->addSubmit('submit', 'Submit'); $form->addHidden('handle', $handle); $form->addHidden('command', 'change_password'); $form->display('class="form-holder" cellspacing="1"', http://cvs.php.net/diff.php/pearweb/public_html/account-mail.php?r1=1.14&r2=1.15&ty=u Index: pearweb/public_html/account-mail.php diff -u pearweb/public_html/account-mail.php:1.14 pearweb/public_html/account-mail.php:1.15 --- pearweb/public_html/account-mail.php:1.14 Wed Sep 22 01:43:48 2004 +++ pearweb/public_html/account-mail.php Tue Oct 5 14:38:46 2004 @@ -15,7 +15,7 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-mail.php,v 1.14 2004/09/22 05:43:48 danielc Exp $ + $Id: account-mail.php,v 1.15 2004/10/05 18:38:46 danielc Exp $ */ /** @@ -32,6 +32,8 @@ $errors = array(); } +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; // {{{ printForm @@ -48,31 +50,21 @@ } } - $th = 'class="form-label_left"'; - $td = 'class="form-input"'; - $form = new HTML_Form($_SERVER['PHP_SELF'] . '?handle=' . $_GET['handle'], 'post', 'contact'); $form->addText('name', 'Y<span class="accesskey">o</span>ur Name:', - $data['name'], 40, null, 'accesskey="o"', - $th, $td); - $form->addPlaintext('CAPTCHA:', generate_captcha(), - $th, $td); + $data['name'], 40, null, 'accesskey="o"'); + $form->addPlaintext('CAPTCHA:', generate_captcha()); $form->addText('email', 'Email Address:', - $data['email'], 40, null, '', - $th, $td); + $data['email'], 40, null); $form->addCheckBox('copy_me', 'Send me a copy of this mail:', - $data['copy_me'], '', - $th, $td); + $data['copy_me']); $form->addText('subject', 'Subject:', - $data['subject'], 40, null, '', - $th, $td); + $data['subject'], 40, null); $form->addTextarea('text', 'Text:', - $data['text'], 35, 10, null, '', - $th, $td); - $form->addSubmit('submit', 'Submit', '', - $th, $td); + $data['text'], 35, 10, null); + $form->addSubmit('submit', 'Submit'); $form->display('class="form-holder"' . ' cellspacing="1"', 'Send Email', 'class="form-caption"'); http://cvs.php.net/diff.php/pearweb/public_html/account-request.php?r1=1.45&r2=1.46&ty=u Index: pearweb/public_html/account-request.php diff -u pearweb/public_html/account-request.php:1.45 pearweb/public_html/account-request.php:1.46 --- pearweb/public_html/account-request.php:1.45 Sat Aug 14 11:25:40 2004 +++ pearweb/public_html/account-request.php Tue Oct 5 14:38:46 2004 @@ -15,9 +15,11 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: account-request.php,v 1.45 2004/08/14 15:25:40 danielc Exp $ + $Id: account-request.php,v 1.46 2004/10/05 18:38:46 danielc Exp $ */ +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); require_once 'HTML/Form.php'; $display_form = true; @@ -173,48 +175,34 @@ $form = new HTML_Form($_SERVER['PHP_SELF'] . '#requestform', 'post'); $form->addText('handle', 'Use<span class="accesskey">r</span>name:', - @$_POST['handle'], 12, 20, 'accesskey="r"', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['handle'], 12, 20, 'accesskey="r"'); $form->addText('firstname', 'First Name:', - @$_POST['firstname'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['firstname'], 20, null); $form->addText('lastname', 'Last Name:', - @$_POST['lastname'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['lastname'], 20, null); $form->addPassword('password', 'Password:', - '', 10, null, '', - 'class="form-label_left"', 'class="form-input"'); - $form->addPlaintext('CAPTCHA:', - generate_captcha(), - 'class="form-label_left"', 'class="form-input"'); + '', 10, null); + $form->addPlaintext('CAPTCHA:', generate_captcha()); $form->addText('email', 'Email Address:', - @$_POST['email'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['email'], 20, null); $form->addCheckbox('showemail', 'Show email address?', - @$_POST['showemail'], '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['showemail']); $form->addText('homepage', 'Homepage:', - @$_POST['homepage'], 20, null, '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['homepage'], 20, null); $form->addPlaintext('Purpose of your PEAR account:' . '<p class="cell_note">(Check all that apply)</p>', - $purposechecks, - 'class="form-label_left"', 'class="form-input"'); + $purposechecks); $form->addTextarea('purpose', 'If your intended purpose is not in the list, please state it here:', - stripslashes(@$_POST['purpose']), 40, 5, null, '', - 'class="form-label_left"', 'class="form-input"'); + stripslashes(@$_POST['purpose']), 40, 5, null); $form->addTextarea('moreinfo', 'More relevant information about you:' . '<p class="cell_note">(optional)</p>', - stripslashes(@$_POST['moreinfo']), 40, 5, null, '', - 'class="form-label_left"', 'class="form-input"'); + stripslashes(@$_POST['moreinfo']), 40, 5, null); $form->addCheckbox('comments_read', 'You have read all of the comments above:', - @$_POST['comments_read'], '', - 'class="form-label_left"', 'class="form-input"'); - $form->addSubmit('submit', 'Submit Query', '', - 'class="form-label_left"', 'class="form-input"'); + @$_POST['comments_read']); + $form->addSubmit('submit', 'Submit Query'); $form->display('class="form-holder" cellspacing="1"', 'Request Account', 'class="form-caption"'); http://cvs.php.net/diff.php/pearweb/public_html/release-upload.php?r1=1.43&r2=1.44&ty=u Index: pearweb/public_html/release-upload.php diff -u pearweb/public_html/release-upload.php:1.43 pearweb/public_html/release-upload.php:1.44 --- pearweb/public_html/release-upload.php:1.43 Wed Jul 14 22:35:06 2004 +++ pearweb/public_html/release-upload.php Tue Oct 5 14:38:46 2004 @@ -15,20 +15,21 @@ +----------------------------------------------------------------------+ | Authors: | +----------------------------------------------------------------------+ - $Id: release-upload.php,v 1.43 2004/07/15 02:35:06 danielc Exp $ + $Id: release-upload.php,v 1.44 2004/10/05 18:38:46 danielc Exp $ */ auth_require('pear.dev'); define('HTML_FORM_MAX_FILE_SIZE', 16 * 1024 * 1024); // 16 MB +define('HTML_FORM_TH_ATTR', 'class="form-label_left"'); +define('HTML_FORM_TD_ATTR', 'class="form-input"'); + require_once 'HTML/Form.php'; $display_form = true; $display_verification = false; $success = false; $errors = array(); -$th = 'class="form-label_left"'; -$td = 'class="form-input"'; PEAR::pushErrorHandling(PEAR_ERROR_RETURN); @@ -188,9 +189,8 @@ $form->addFile('distfile', '<label for="f" accesskey="i">D<span class="accesskey">i</span>' . 'stribution File</label>', - HTML_FORM_MAX_FILE_SIZE, 40, '', 'id="f"', $th, $td); - $form->addSubmit('upload', 'Upload!', '', - $th, $td); + HTML_FORM_MAX_FILE_SIZE, 40, '', 'id="f"'); + $form->addSubmit('upload', 'Upload!'); $form->display('class="form-holder" cellspacing="1"', 'Upload', 'class="form-caption"'); } @@ -238,29 +238,20 @@ } $form =& new HTML_Form($_SERVER['PHP_SELF'], 'post'); - $form->addPlaintext('Package:', $info['package'], - $th, $td); - $form->addPlaintext('Version:', $info['version'], - $th, $td); - $form->addPlaintext('Summary:', htmlspecialchars($info['summary']), - $th, $td); - $form->addPlaintext('Description:', nl2br(htmlspecialchars($info['description'])), - $th, $td); - $form->addPlaintext('Release State:', $info['release_state'], - $th, $td); - $form->addPlaintext('Release Date:', $info['release_date'], - $th, $td); - $form->addPlaintext('Release Notes:', nl2br(htmlspecialchars($info['release_notes'])), - $th, $td); + $form->addPlaintext('Package:', $info['package']); + $form->addPlaintext('Version:', $info['version']); + $form->addPlaintext('Summary:', htmlspecialchars($info['summary'])); + $form->addPlaintext('Description:', nl2br(htmlspecialchars($info['description']))); + $form->addPlaintext('Release State:', $info['release_state']); + $form->addPlaintext('Release Date:', $info['release_date']); + $form->addPlaintext('Release Notes:', nl2br(htmlspecialchars($info['release_notes']))); // Don't show the next step button when errors found if (!count($errors)) { - $form->addSubmit('verify', 'Verify Release', '', - $th, $td); + $form->addSubmit('verify', 'Verify Release'); } - $form->addSubmit('cancel', 'Cancel', '', - $th, $td); + $form->addSubmit('cancel', 'Cancel'); $form->addHidden('distfile', $tmpfile); $form->display('class="form-holder" cellspacing="1"', 'Please verify that the following release information is correct',