cvs: php-hosts-web / host-add.php

From: Date: Mon, 22 Apr 2002 02:32:13 +0000
Subject: cvs: php-hosts-web / host-add.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-9752@lists.php.net to get a copy of this message
jimw Sun Apr 21 22:32:13 2002 EDT Modified files: /php-hosts-web host-add.php Log: conditionalize calls to addslashes, some other minor cleanups Index: php-hosts-web/host-add.php diff -u php-hosts-web/host-add.php:1.4 php-hosts-web/host-add.php:1.5 --- php-hosts-web/host-add.php:1.4 Sun Apr 21 21:36:09 2002 +++ php-hosts-web/host-add.php Sun Apr 21 22:32:13 2002 @@ -17,22 +17,24 @@ if (empty($useruser)) { $ERRORS[]="User Name left blank"; } if (empty($useremail)) { $ERRORS[]="User Email left blank"; } - $hostname2 = addslashes($hostname); - $hosturl2 = addslashes($hosturl); + if (!get_magic_quotes_gpc()) { + $hostname2 = addslashes($hostname); + $hosturl2 = addslashes($hosturl); + $hostinfourl2 = addslashes($hostinfourl); + $hostemail2 = addslashes($hostemail); + $hostphone2 = addslashes($hostphone); + $hostfax2 = addslashes($hostfax); + $hostcity2 = addslashes($hostcity); + $hoststate2 = addslashes($hoststate); + $useruser2 = addslashes($useruser); + $useremail2 = addslashes($useremail); + } $hosturl2 = eregi_replace("^http://","",$hosturl2); - $hostinfourl2 = addslashes($hostinfourl); $hostinfourl2 = eregi_replace("^http://","",$hostinfourl2); - $hostemail2 = addslashes($hostemail); - $hostphone2 = addslashes($hostphone); - $hostfax2 = addslashes($hostfax); - $hostcity2 = addslashes($hostcity); - $hoststate2 = addslashes($hoststate); - $useruser2 = addslashes($useruser); - $useremail2 = addslashes($useremail); $query = "SELECT * FROM $USERS_TABLE where UserUser='$useruser2'"; $q1 = mysql_query($query) or die ("\"$query\" is a bad query."); - if (mysql_numrows($q1)!=0) { $ERRORS[]="Username <B>$useruser</B> already taken"; } + if (mysql_num_rows($q1)) { $ERRORS[]="Username <B>$useruser</B> already taken"; } if ($ERRORS) { echo "We can't add your listing because of the following errors:<BR>"; @@ -78,7 +80,7 @@ Enter the following information (* denotes a required field): -<FORM METHOD="post" ACTION="host-add.php"> +<form method="post" action="host-add.php"> <INPUT TYPE="hidden" NAME="MODE" value="ADD"> <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5> @@ -101,11 +103,12 @@ <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 <I>phpinfo()</I>. If -you have such a page on your system, enter it's URL here. For security reasons, this -page will <B>not</B> be shown to the public, but may be used by me in the future to -automagically parse out some information on your system.</SMALL> +<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> @@ -149,7 +152,7 @@ <TR VALIGN=top BGCOLOR="<? echo $COLOR["ltpurple"]; ?>"> <TD colspan=2><B>Contact Information</B><BR> -If you plan on editing your company's information, you need to supply us with a username +You need to supply us with a username and password. </TD> </TR> @@ -174,7 +177,6 @@ </TABLE> </FORM> - <? } commonFooter();

« previous php.mirrors (#9752) next »