Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function checkemail( $email )
- {
- $isValid = true;
- $atIndex = strrpos( $email, "@" );
- if ( is_bool( $atIndex ) && !$atIndex )
- {
- $isValid = false;
- }
- else
- {
- $domain = substr( $email, $atIndex + 1 );
- $local = substr( $email, 0, $atIndex );
- $localLen = strlen( $local );
- $domainLen = strlen( $domain );
- if ( $localLen < 1 || 64 < $localLen )
- {
- $isValid = false;
- }
- else if ( $domainLen < 1 || 255 < $domainLen )
- {
- $isValid = false;
- }
- else if ( $local[0] == "." || $local[$localLen - 1] == "." )
- {
- $isValid = false;
- }
- else if ( preg_match( "/\\.\\./", $local ) )
- {
- $isValid = false;
- }
- else if ( !preg_match( "/^[A-Za-z0-9\\-\\.]+\$/", $domain ) )
- {
- $isValid = false;
- }
- else if ( preg_match( "/\\.\\./", $domain ) )
- {
- $isValid = false;
- }
- else if ( !preg_match( "/^(\\\\.|[A-Za-z0-9!#%&`_=\\/\$'*+?^{}|~.-])+\$/", str_replace( "\\\\", "", $local ) ) && !preg_match( "/^\"(\\\\\"|[^\"])+\"\$/", str_replace( "\\\\", "", $local ) ) )
- {
- $isValid = false;
- }
- if ( $isValid && !( checkdnsrr( $domain, "MX" ) || checkdnsrr( $domain, "A" ) ) )
- {
- $isValid = false;
- }
- }
- return $isValid;
- }
- header( "Cache-Control: no-cache" );
- header( "Expires: -1" );
- $add = 1;
- if ( !$add && $disable )
- {
- echo "<form name=adduser method=post action=\"add_user.php\"><table><input type=hidden name=add value=1><!--<input type=hidden name=ip value=";
- echo $ip;
- echo ">--><tr><td>Username :</td><td> <input type=text name=username /></td></tr><tr><td>Password : </td><td><input type=text name=password /></td></tr><tr><td>Jobs Allowed : </td><td><input type=text name=jobs_allowed /></td></tr><tr><td>Account Type : </td><td>";
- echo "<S";
- echo "elect name=type><option value=0>Free</option><option value=1>\$5 Paid</option></select></td></tr><!--<tr><td>User ID :</td><td> <input type=text name=userids />";
- echo "<s";
- echo "mall>(seperated by ; in same sequence for aboce usernames, seperated by ;)</small></td><t/r><tr><td>Password : </td><td><input type=text name=password />";
- echo "<s";
- echo "mall>(Must be same for all Usernames Given above)</small></td></tr><tr><td>Keywords To Post For : </td><td><input type=text name=keywords />";
- echo "<s";
- echo "mall>(seperated by ;)</small></td></tr><tr><td>Forum Type :</td><td> ";
- echo "<s";
- echo "elect name=forumtype> <option name=phpbb3 value=phpbb3>phpBB 3</option> <option name=smf value=smf>SMF</option> <option name=vbulletin value=vbulletin>vBulletin</option> </select></td></tr><tr><td>Number of Posts to Make :</td><td><input type=text name=numofposts value=20></td></tr>--><tr><td></td><td><input type=Submit value=Feed Job></td></tr></table></form>";
- echo "";
- }
- else if ( $add )
- {
- include_once( "./connect.php" );
- $sql = "SELECT * FROM `users`;";
- if ( !( $res = mysql_query( $sql, $link ) ) )
- {
- exit( mysql_error( )."<- this time" );
- }
- $count = mysql_num_rows( $res );
- $email = $_POST['email'];
- $password = $_POST['password'];
- $jobs_allowed = $_POST['jobs_allowed'];
- $type = $_POST['type'];
- if ( checkemail( $email ) )
- {
- $go = 1;
- }
- else
- {
- $go = 0;
- header( "Location: index.php?err=bademail" );
- echo "<br>Bad Email Address";
- exit( );
- }
- if ( strlen( $password ) < 5 )
- {
- header( "Location: index.php?err=badpassword" );
- exit( );
- }
- if ( $type != 1 )
- {
- $type = 0;
- }
- switch ( $type )
- {
- case "0" :
- $data = array( "0", "3", "30" );
- break;
- case "1" :
- $data = array( "1", "8", "300" );
- }
- //========================================PAYMENT==============================================//
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement