cvs: phpweb / cvs-php.php

From: Date: Fri, 12 Mar 2004 14:44:18 +0000
Subject: cvs: phpweb / cvs-php.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-23808@lists.php.net to get a copy of this message
derick Fri Mar 12 09:44:18 2004 EDT Modified files: /phpweb cvs-php.php Log: - Apply Arts patch to weed out stupid CVS requests http://cvs.php.net/diff.php/phpweb/cvs-php.php?r1=1.31&r2=1.32&ty=u Index: phpweb/cvs-php.php diff -u phpweb/cvs-php.php:1.31 phpweb/cvs-php.php:1.32 --- phpweb/cvs-php.php:1.31 Thu Sep 11 12:45:13 2003 +++ phpweb/cvs-php.php Fri Mar 12 09:44:18 2004 @@ -1,5 +1,5 @@ <?php -// $Id: cvs-php.php,v 1.31 2003/09/11 16:45:13 goba Exp $ +// $Id: cvs-php.php,v 1.32 2004/03/12 14:44:18 derick Exp $ $_SERVER['BASE_PAGE'] = 'cvs-php.php'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/prepend.inc'; include_once $_SERVER['DOCUMENT_ROOT'] . '/include/email-validation.inc'; @@ -12,7 +12,7 @@ <?php // We have a form submitted, and the user have read all the comments -if (count($_POST) && isset($_POST['checkread'])) { +if (count($_POST) && (!is_array($_POST['purpose']) || !count($_POST['purpose']))) { // Clean up incoming POST vars if (get_magic_quotes_gpc()) { @@ -34,7 +34,7 @@ if (empty($_POST['fullname'])) { $error .= "You must supply your real name. "; } - if (empty($_POST['purpose'])) { + if (empty($_POST['realpurpose'])) { $error .= "You must supply a reason for requesting the CVS account. "; } if (empty($_POST['password'])) { @@ -53,7 +53,7 @@ "name" => $cleaned['fullname'], "email" => $cleaned['email'], "passwd" => $cleaned['password'], - "note" => $cleaned['purpose'] + "note" => $cleaned['realpurpose'] ) ); // Error while posting @@ -127,7 +127,7 @@ } // endif: no data or checkread not checked else { - if (count($_POST) && !isset($_POST['checkread'])) { + if (count($_POST)) { print <<<EOT <p class="formerror"> We could not have said it more clearly. Read everything on @@ -273,8 +273,24 @@ class="max" value="<?php echo clean($_POST['email']);?>" /></td> </tr> <tr> - <th class="subr">Purpose:</th> - <td><textarea cols="50" rows="5" name="purpose" class="max"><?php echo clean($_POST['purpose']);?></textarea></td> + <th class="subr">For what purpose do you require a CVS account:<br/ > + (check all that apply)</th> + <td> +<?php +$purposes = array("Learning PHP", "Coding in PHP", "Reading the PHP source", + "Using PHP extensions", "Creating experimental PHP extensions", + "Submitting a patch to PHP", "Adding notes to the documentation", + "Writing web pages with PHP", "Setting up a php.net mirror site"); + +foreach ($purposes as $i => $p) { ?> + <input type="checkbox" name="purpose[<?php echo $i?>]" value="1" + checked="checked"><?php echo $p; ?><br /> +<?php } ?> + </td> +</tr> +<tr> + <th class="subr">If your intended purpose is not in the list, <br>please state it here:</th> + <td><textarea cols="50" rows="5" name="realpurpose" class="max"><?php echo clean($_POST['realpurpose']);?></textarea></td> </tr> <tr> <th class="subr">User ID:<br /> <small>(single word, lower case)</small></th> @@ -286,20 +302,6 @@ <td><input type="password" size="10" name="password" class="max" value="<?php echo clean($_POST['password']);?>" /></td> </tr> -<?php -// if checkread is set here, we're redisplaying the form because of an error. -if ($_POST['checkread']) { - echo "<input type=\"hidden\" name=\"checkread\" value=\"1\" />\n"; -} -else {?> -<tr> - <th class="subr">You have read <em>all</em> the comments above:</th> - <td> - <input type="checkbox" name="checkread" value="1" /> - </td> -</tr> -<?php -}?> <tr> <th colspan="2"><input type="submit" value="Send Request" /></th> </tr>

« previous php.mirrors (#23808) next »