cvs: php-hosts-web / TODO host-add.php showinfo.php /include email-validation.inc
| From: | jim winstead | Date: | Sat, 11 May 2002 17:25:29 +0000 |
| Subject: | cvs: php-hosts-web / TODO host-add.php showinfo.php /include email-validation.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-10118@lists.php.net to get a copy of this message | ||
jimw Sat May 11 13:25:29 2002 EDT
Added files:
/php-hosts-web/include email-validation.inc
Modified files:
/php-hosts-web TODO host-add.php showinfo.php
Log:
update host-add page, handle duplicates more gracefully, and do a little more rigorous data
validation
Index: php-hosts-web/TODO diff -u php-hosts-web/TODO:1.2 php-hosts-web/TODO:1.3 --- php-hosts-web/TODO:1.2 Thu Apr 25 21:24:05 2002 +++ php-hosts-web/TODO Sat May 11 13:25:25 2002 @@ -1,4 +1,3 @@ -* better error handling in host-add.php for duplicate records * expand the initial email after host creation to explain how the editing works * integrate message board listing directly into showinfo.php Index: php-hosts-web/host-add.php diff -u php-hosts-web/host-add.php:1.10 php-hosts-web/host-add.php:1.11 --- php-hosts-web/host-add.php:1.10 Wed Apr 24 23:42:21 2002 +++ php-hosts-web/host-add.php Sat May 11 13:25:25 2002 @@ -1,33 +1,39 @@ -<? -require ("shared.inc"); -commonHeader("Add a Hosting Company Listing"); -?> - -<h3>Add a Hosting Company Listing</h3> - -<? - -if ($MODE=="ADD") { - - unset($ERRORS); - if (empty($hostname)) { $ERRORS[]="Name of company left blank"; } - if (ereg('<', $hostname)) { $ERRORS[]="HTML is not allowed in Name"; } - if (empty($hosturl)) { $ERRORS[]="URL of company left blank"; } - if (empty($hostemail)) { $ERRORS[]="Email for company left blank"; } - if (empty($useremail)) { $ERRORS[]="Contact Email left blank"; } +<?php +require "shared.inc"; +require "email-validation.inc"; + +$errors = array(); + +if ($mode=="add") { + if (empty($hostname)) { + $errors[] = "You must supply a name for the hosting company."; + } + if ($hostname && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(HostName) = LCASE('$hostname')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that name</a>.'; + } + if (empty($hosturl) || !preg_match('/\./',$hosturl)) { + $errors[] = "You must supply a valid URL for the hosting company."; + } + if ($hosturl && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(HostURL) = LCASE('$hosturl')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that URL</a>.'; + } + if (preg_match('/geocities/i',$hosturl)) { + $errors[] = "This is for listing hosting companies, not GeoCities accounts."; + } + if (empty($hostemail) || !is_emailable_address($hostemail)) { + $errors[] = "You must supply a valid email address for the hosting company."; + } + if (empty($contact) || !is_emailable_address($contact)) { + $errors[] = "You must supply a valid email contact address."; + } + if ($contact && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(contact) = LCASE('$contact')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that contact address</a>.'; + } $hosturl = eregi_replace("^http://","",$hosturl); $hostinfourl = eregi_replace("^http://","",$hostinfourl); - if ($ERRORS) { - echo "We can't add your listing because of the following errors:<BR>"; - echo "<UL>\n"; - while (list(,$v)=each($ERRORS)) { - echo "<LI>" . $v . "\n"; - } - echo "</UL>\n"; - echo "Use your browser's back button to correct these errors."; - } else { + if (!$errors) { $password = randomstring(8); $crypt = addslashes(crypt($password,randomstring(2))); @@ -41,7 +47,7 @@ . " HostCity='$hostcity'," . " HostState='$hoststate'," . " HostCountry='$hostcountry'," - . " contact='$useremail'," + . " contact='$contact'," . " password='$crypt'," . " created=NOW(),lastupdate=NOW()"; @@ -52,115 +58,102 @@ $msg.= "listing of PHP Hosting Companies (at http://hosts.php.net/).\n\n"; $msg.= "To update your listing, go to the \"Login\" page, with the following "; $msg.= "username and password:\n\n"; - $msg.= "\tUsername: ".stripslashes($useremail)."\n"; + $msg.= "\tUsername: ".stripslashes($contact)."\n"; $msg.= "\tPassword: $password\n\n"; $msg.= "If you have any questions, email webmaster@php.net.\n\n"; $from = "From: \"PHP Hosting Listing\" <webmaster@php.net>"; - mail(stripslashes($useremail),"PHP Hosting Companies Listing",$msg,$from); + mail(stripslashes($contact),"PHP Hosting Companies Listing",$msg,$from); - echo "<P><B>".htmlentities(stripslashes($hostname))."</B> has been added to the list of PHP hosting companies.</P>\n"; - echo "<P>An email has been sent to ".htmlentities(stripslashes($useremail))." with information on how to edit your listing.</P>\n"; + header("Location: showinfo.php?hostid=$hostid&add=1"); + exit; } -} else { +} +commonHeader("Add a Hosting Company Listing"); ?> +<h3>Add a Hosting Company Listing</h3> +<?php -Enter the following information (* denotes a required field): +if ($errors) display_errors($errors); +?> -<form method="post" action="host-add.php"> -<INPUT TYPE="hidden" NAME="MODE" value="ADD"> +<form method="post" action="<?php echo $PHP_SELF;?>"> +<table border="0" cellspacing="0" cellpadding="5"> + <tr class="header"> + <th colspan="2" align="left">Enter the following Information <small>(* denotes a required field)</small></th> + </tr> + + <tr class="odd"> + <th align="right">Name of Hosting Company:</th> + <td><input type="text" name="hostname" size="30" maxlength="64" value="<?php echo clean($hostname);?>" />*</td> + </tr> + + <tr class="even"> + <th align="right">Main URL:</th> + <td><input type="text" name="hosturl" size="30" maxlength="255" value="<?php echo clean($hosturl);?>" />*<br /><small>This is the main URL for your company.</small></td> + </tr> + + <tr class="odd"> + <th align="right">URL of phpinfo() page:</th> + <td> + <input type="text" name="hostinfourl" size="30" maxlength="255" value="<?php echo clean($hostinfourl);?>" /> + <br /> + <small>In order to better assist people looking for PHP hosting + companies, we suggest that you put a page somewhere on your system + that simply calls <code>phpinfo()</code>. If you have such a page + on your system, enter it's URL here. For security reasons, the URL + for this page will <strong>not</strong> be shown to the public, but + may be used in the future to automagically parse out some information + on your system.</small> + </td> + </tr> + + <tr class="even"> + <th align="right">Info Email:</th> + <td><input type="text" name="hostemail" size="30" maxlength="64" value="<?php echo clean($hostemail);?>" />*<br /><small>Who people should email if they want more info on your company.</small></td> + </tr> + + <tr class="odd"> + <th align="right">Info Phone:</th> + <td><input type="text" name="hostphone" size="15" maxlength="32" value="<?php echo clean($hostphone);?>" /></td> + </tr> + + <tr class="even"> + <th align="right">Info Fax:</th> + <td><input type="text" name="hostfax" size="15" maxlength="32" value="<?php echo clean($hostfax);?>" /></td> + </tr> + + <tr class="odd"> + <th align="right">City:</th> + <td><input type="text" name="hostcity" size="30" maxlength="32" value="<?php echo clean($hostcity);?>" /></td> + </tr> + + <tr class="even"> + <th align="right">State/Province/Region:</th> + <td><input type="text" name="hoststate" size="30" maxlength="32" value="<?php echo clean($hoststate);?>" /></td> + </tr> + + <tr class="odd"> + <th align="right">Country:</th> + <td><select name="hostcountry"><?php listCountries("select",$hostcountry);?></select></td> + </tr> + + <tr class="even"> + <th align="right">Contact Address:</th> + <td><input type="text" name="contact" size="30" maxlength="64" value="<?php echo clean($contact);?>" />*<br /><small>This is the address you use to log in, as well as for us to contact you.</small></td> + </tr> + + <tr> + <td colspan="2" align="center"> + <input type="hidden" name="mode" value="add" /> + <input type="submit" value="Submit Entry" /> + </td> + </tr> +</table> +</form> -<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5> -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><B>Company Information</B></TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Name of Hosting Company: </TD> -<TD><INPUT TYPE="text" NAME="hostname" SIZE=30 MAXLENGTH=64>*</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Main URL: </TD> -<TD><INPUT TYPE="text" NAME="hosturl" SIZE=30 MAXLENGTH=255>*<BR> -<SMALL>This is the main URL for your company.</SMALL> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>URL of PHPInfo page: </TD> -<TD><INPUT TYPE="text" NAME="hostinfourl" SIZE=30 MAXLENGTH=255><BR> -<small>In order to better assist people looking for PHP hosting companies, we -suggest that you put a page somewhere on your system that simply calls -<em>phpinfo()</em>. If you have such a page on your system, enter it's URL -here. For security reasons, this URL will <b>not</b> be shown to the public, -but may be used by us in the future to automagically parse out some information -on your system.</small> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Email: </TD> -<TD><INPUT TYPE="text" NAME="hostemail" SIZE=30 MAXLENGTH=64>*<BR> -<SMALL>Who can people email if they want more info on your company.</SMALL> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Phone: </TD> -<TD><INPUT TYPE="text" NAME="hostphone" SIZE=15 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Fax: </TD> -<TD><INPUT TYPE="text" NAME="hostfax" SIZE=15 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>City: </TD> -<TD><INPUT TYPE="text" NAME="hostcity" SIZE=30 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Province/State: </TD> -<TD><INPUT TYPE="text" NAME="hoststate" SIZE=30 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Country: </TD> -<TD> -<SELECT NAME="hostcountry"><? listCountries();?></SELECT> -</TD> -</TR> - -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><B>Contact Information</B><BR> -You need to supply us with an email address that we can use to contact about -this record. This is also where we will send the password that will allow you -to modify your entry. -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Email: </TD> -<TD><INPUT TYPE="text" NAME="useremail" SIZE=30 MAXLENGTH=64>*<BR> -<SMALL>We will email your password to this address.</SMALL> -</TD> -</TR> - -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><INPUT TYPE="submit" VALUE=" Next "><BR></TD> -</TR> - -</TABLE> -</FORM> -<? -} +<?php commonFooter(); ?> Index: php-hosts-web/showinfo.php diff -u php-hosts-web/showinfo.php:1.7 php-hosts-web/showinfo.php:1.8 --- php-hosts-web/showinfo.php:1.7 Thu Apr 25 21:24:05 2002 +++ php-hosts-web/showinfo.php Sat May 11 13:25:25 2002 @@ -41,6 +41,15 @@ <?php } +if ($add) {?> +<div class="errors"> +Thank you for submitting information about this hosting company. +You should receive an email at the contact address shortly with +instructions on how to log in and edit the entry. +</div> +<?php +} + $verified = verify_host_login(); $general = array( Index: php-hosts-web/include/email-validation.inc +++ php-hosts-web/include/email-validation.inc <?php /* * email_validation.inc * $Id: email-validation.inc,v 1.1 2002/05/11 17:25:25 jimw Exp $ */ // checks that is an *outside* host, and tries to remove anti-SPAM bits function clean_AntiSPAM ($email) { $remove_spam = "[-_]?(NO|I[-_]?HATE|DELETE|REMOVE)[-_]?(THIS)?(ME|SPAM)?[-_]?"; return eregi_replace($remove_spam,"",trim($email)); } function is_emailable_address( $email) { $hosts_regex="lists\.php\.net|chek.*\.com"; $excluded_hosts = ereg($hosts_regex,$email); $email_regex="^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~ ])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~ ]+\\.)+[a-zA-Z]{2,4}\$"; if (!$excluded_hosts && $email != "") { return eregi($email_regex, $email); } else { return false; } } ?>
Index: php-hosts-web/TODO diff -u php-hosts-web/TODO:1.2 php-hosts-web/TODO:1.3 --- php-hosts-web/TODO:1.2 Thu Apr 25 21:24:05 2002 +++ php-hosts-web/TODO Sat May 11 13:25:25 2002 @@ -1,4 +1,3 @@ -* better error handling in host-add.php for duplicate records * expand the initial email after host creation to explain how the editing works * integrate message board listing directly into showinfo.php Index: php-hosts-web/host-add.php diff -u php-hosts-web/host-add.php:1.10 php-hosts-web/host-add.php:1.11 --- php-hosts-web/host-add.php:1.10 Wed Apr 24 23:42:21 2002 +++ php-hosts-web/host-add.php Sat May 11 13:25:25 2002 @@ -1,33 +1,39 @@ -<? -require ("shared.inc"); -commonHeader("Add a Hosting Company Listing"); -?> - -<h3>Add a Hosting Company Listing</h3> - -<? - -if ($MODE=="ADD") { - - unset($ERRORS); - if (empty($hostname)) { $ERRORS[]="Name of company left blank"; } - if (ereg('<', $hostname)) { $ERRORS[]="HTML is not allowed in Name"; } - if (empty($hosturl)) { $ERRORS[]="URL of company left blank"; } - if (empty($hostemail)) { $ERRORS[]="Email for company left blank"; } - if (empty($useremail)) { $ERRORS[]="Contact Email left blank"; } +<?php +require "shared.inc"; +require "email-validation.inc"; + +$errors = array(); + +if ($mode=="add") { + if (empty($hostname)) { + $errors[] = "You must supply a name for the hosting company."; + } + if ($hostname && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(HostName) = LCASE('$hostname')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that name</a>.'; + } + if (empty($hosturl) || !preg_match('/\./',$hosturl)) { + $errors[] = "You must supply a valid URL for the hosting company."; + } + if ($hosturl && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(HostURL) = LCASE('$hosturl')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that URL</a>.'; + } + if (preg_match('/geocities/i',$hosturl)) { + $errors[] = "This is for listing hosting companies, not GeoCities accounts."; + } + if (empty($hostemail) || !is_emailable_address($hostemail)) { + $errors[] = "You must supply a valid email address for the hosting company."; + } + if (empty($contact) || !is_emailable_address($contact)) { + $errors[] = "You must supply a valid email contact address."; + } + if ($contact && ($hostid = mysql_get_one("SELECT HostId FROM hosts WHERE LCASE(contact) = LCASE('$contact')"))) { + $errors[] = 'There is already <a href="showinfo.php?hostid='.$hostid.'">an entry with that contact address</a>.'; + } $hosturl = eregi_replace("^http://","",$hosturl); $hostinfourl = eregi_replace("^http://","",$hostinfourl); - if ($ERRORS) { - echo "We can't add your listing because of the following errors:<BR>"; - echo "<UL>\n"; - while (list(,$v)=each($ERRORS)) { - echo "<LI>" . $v . "\n"; - } - echo "</UL>\n"; - echo "Use your browser's back button to correct these errors."; - } else { + if (!$errors) { $password = randomstring(8); $crypt = addslashes(crypt($password,randomstring(2))); @@ -41,7 +47,7 @@ . " HostCity='$hostcity'," . " HostState='$hoststate'," . " HostCountry='$hostcountry'," - . " contact='$useremail'," + . " contact='$contact'," . " password='$crypt'," . " created=NOW(),lastupdate=NOW()"; @@ -52,115 +58,102 @@ $msg.= "listing of PHP Hosting Companies (at http://hosts.php.net/).\n\n"; $msg.= "To update your listing, go to the \"Login\" page, with the following "; $msg.= "username and password:\n\n"; - $msg.= "\tUsername: ".stripslashes($useremail)."\n"; + $msg.= "\tUsername: ".stripslashes($contact)."\n"; $msg.= "\tPassword: $password\n\n"; $msg.= "If you have any questions, email webmaster@php.net.\n\n"; $from = "From: \"PHP Hosting Listing\" <webmaster@php.net>"; - mail(stripslashes($useremail),"PHP Hosting Companies Listing",$msg,$from); + mail(stripslashes($contact),"PHP Hosting Companies Listing",$msg,$from); - echo "<P><B>".htmlentities(stripslashes($hostname))."</B> has been added to the list of PHP hosting companies.</P>\n"; - echo "<P>An email has been sent to ".htmlentities(stripslashes($useremail))." with information on how to edit your listing.</P>\n"; + header("Location: showinfo.php?hostid=$hostid&add=1"); + exit; } -} else { +} +commonHeader("Add a Hosting Company Listing"); ?> +<h3>Add a Hosting Company Listing</h3> +<?php -Enter the following information (* denotes a required field): +if ($errors) display_errors($errors); +?> -<form method="post" action="host-add.php"> -<INPUT TYPE="hidden" NAME="MODE" value="ADD"> +<form method="post" action="<?php echo $PHP_SELF;?>"> +<table border="0" cellspacing="0" cellpadding="5"> + <tr class="header"> + <th colspan="2" align="left">Enter the following Information <small>(* denotes a required field)</small></th> + </tr> + + <tr class="odd"> + <th align="right">Name of Hosting Company:</th> + <td><input type="text" name="hostname" size="30" maxlength="64" value="<?php echo clean($hostname);?>" />*</td> + </tr> + + <tr class="even"> + <th align="right">Main URL:</th> + <td><input type="text" name="hosturl" size="30" maxlength="255" value="<?php echo clean($hosturl);?>" />*<br /><small>This is the main URL for your company.</small></td> + </tr> + + <tr class="odd"> + <th align="right">URL of phpinfo() page:</th> + <td> + <input type="text" name="hostinfourl" size="30" maxlength="255" value="<?php echo clean($hostinfourl);?>" /> + <br /> + <small>In order to better assist people looking for PHP hosting + companies, we suggest that you put a page somewhere on your system + that simply calls <code>phpinfo()</code>. If you have such a page + on your system, enter it's URL here. For security reasons, the URL + for this page will <strong>not</strong> be shown to the public, but + may be used in the future to automagically parse out some information + on your system.</small> + </td> + </tr> + + <tr class="even"> + <th align="right">Info Email:</th> + <td><input type="text" name="hostemail" size="30" maxlength="64" value="<?php echo clean($hostemail);?>" />*<br /><small>Who people should email if they want more info on your company.</small></td> + </tr> + + <tr class="odd"> + <th align="right">Info Phone:</th> + <td><input type="text" name="hostphone" size="15" maxlength="32" value="<?php echo clean($hostphone);?>" /></td> + </tr> + + <tr class="even"> + <th align="right">Info Fax:</th> + <td><input type="text" name="hostfax" size="15" maxlength="32" value="<?php echo clean($hostfax);?>" /></td> + </tr> + + <tr class="odd"> + <th align="right">City:</th> + <td><input type="text" name="hostcity" size="30" maxlength="32" value="<?php echo clean($hostcity);?>" /></td> + </tr> + + <tr class="even"> + <th align="right">State/Province/Region:</th> + <td><input type="text" name="hoststate" size="30" maxlength="32" value="<?php echo clean($hoststate);?>" /></td> + </tr> + + <tr class="odd"> + <th align="right">Country:</th> + <td><select name="hostcountry"><?php listCountries("select",$hostcountry);?></select></td> + </tr> + + <tr class="even"> + <th align="right">Contact Address:</th> + <td><input type="text" name="contact" size="30" maxlength="64" value="<?php echo clean($contact);?>" />*<br /><small>This is the address you use to log in, as well as for us to contact you.</small></td> + </tr> + + <tr> + <td colspan="2" align="center"> + <input type="hidden" name="mode" value="add" /> + <input type="submit" value="Submit Entry" /> + </td> + </tr> +</table> +</form> -<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5> -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><B>Company Information</B></TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Name of Hosting Company: </TD> -<TD><INPUT TYPE="text" NAME="hostname" SIZE=30 MAXLENGTH=64>*</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Main URL: </TD> -<TD><INPUT TYPE="text" NAME="hosturl" SIZE=30 MAXLENGTH=255>*<BR> -<SMALL>This is the main URL for your company.</SMALL> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>URL of PHPInfo page: </TD> -<TD><INPUT TYPE="text" NAME="hostinfourl" SIZE=30 MAXLENGTH=255><BR> -<small>In order to better assist people looking for PHP hosting companies, we -suggest that you put a page somewhere on your system that simply calls -<em>phpinfo()</em>. If you have such a page on your system, enter it's URL -here. For security reasons, this URL will <b>not</b> be shown to the public, -but may be used by us in the future to automagically parse out some information -on your system.</small> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Email: </TD> -<TD><INPUT TYPE="text" NAME="hostemail" SIZE=30 MAXLENGTH=64>*<BR> -<SMALL>Who can people email if they want more info on your company.</SMALL> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Phone: </TD> -<TD><INPUT TYPE="text" NAME="hostphone" SIZE=15 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Info Fax: </TD> -<TD><INPUT TYPE="text" NAME="hostfax" SIZE=15 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>City: </TD> -<TD><INPUT TYPE="text" NAME="hostcity" SIZE=30 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Province/State: </TD> -<TD><INPUT TYPE="text" NAME="hoststate" SIZE=30 MAXLENGTH=32><BR> -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Country: </TD> -<TD> -<SELECT NAME="hostcountry"><? listCountries();?></SELECT> -</TD> -</TR> - -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><B>Contact Information</B><BR> -You need to supply us with an email address that we can use to contact about -this record. This is also where we will send the password that will allow you -to modify your entry. -</TD> -</TR> - -<TR VALIGN=top> -<TD ALIGN=right>Email: </TD> -<TD><INPUT TYPE="text" NAME="useremail" SIZE=30 MAXLENGTH=64>*<BR> -<SMALL>We will email your password to this address.</SMALL> -</TD> -</TR> - -<TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> -<TD colspan=2><INPUT TYPE="submit" VALUE=" Next "><BR></TD> -</TR> - -</TABLE> -</FORM> -<? -} +<?php commonFooter(); ?> Index: php-hosts-web/showinfo.php diff -u php-hosts-web/showinfo.php:1.7 php-hosts-web/showinfo.php:1.8 --- php-hosts-web/showinfo.php:1.7 Thu Apr 25 21:24:05 2002 +++ php-hosts-web/showinfo.php Sat May 11 13:25:25 2002 @@ -41,6 +41,15 @@ <?php } +if ($add) {?> +<div class="errors"> +Thank you for submitting information about this hosting company. +You should receive an email at the contact address shortly with +instructions on how to log in and edit the entry. +</div> +<?php +} + $verified = verify_host_login(); $general = array( Index: php-hosts-web/include/email-validation.inc +++ php-hosts-web/include/email-validation.inc <?php /* * email_validation.inc * $Id: email-validation.inc,v 1.1 2002/05/11 17:25:25 jimw Exp $ */ // checks that is an *outside* host, and tries to remove anti-SPAM bits function clean_AntiSPAM ($email) { $remove_spam = "[-_]?(NO|I[-_]?HATE|DELETE|REMOVE)[-_]?(THIS)?(ME|SPAM)?[-_]?"; return eregi_replace($remove_spam,"",trim($email)); } function is_emailable_address( $email) { $hosts_regex="lists\.php\.net|chek.*\.com"; $excluded_hosts = ereg($hosts_regex,$email); $email_regex="^([-!#\$%&'*+./0-9=?A-Z^_`a-z{|}~ ])+@([-!#\$%&'*+/0-9=?A-Z^_`a-z{|}~ ]+\\.)+[a-zA-Z]{2,4}\$"; if (!$excluded_hosts && $email != "") { return eregi($email_regex, $email); } else { return false; } } ?>