Location: PHPKode > projects > phpMyPrepaid > phpmyprepaid/www/include/account/create_NF_ID.php
<?php
	//////////////////////////////////////////////////////////////////////////		
	//	File written by Carl Peterson including part of function 	//
	//	mkPassword by Max Dobbie-Holman					//
	//	Released under the GPL						//
	//	This file creates the username/password combos			//
	//	This file is a hack to get arround redclaired functions.	//
	//	If you can think of a better way of doing this, let me know.	//
	//////////////////////////////////////////////////////////////////////////


	//////////////////////////////////////////////////////////////////////////
	//	LOOP AS MANY TIMES AS $number FROM CARD CREATION		//
	//////////////////////////////////////////////////////////////////////////
if (!isset($oreon))
	exit();
for ($i=0;$i < $number;$i++)
{
	for ($j=0;$j<1;$j++) // ------> CLEAN ME
	{
		
		//////////////////////////////////////////////////////////
		//	GET THE DOMAIN AND PREFIX FROM SESSION		//
		//////////////////////////////////////////////////////////
		$domain = getLocDomain($_SESSION['locID']);
		
		if ($usedomainname) $atdomain	= "@$domain";
		else
			$atdomain= "";
		//	unset($_SESSION['prefix']);
		
		//////////////////////////////////////////////////////////////////////////
		//	CREATE A RANDOM ID CONSISTING OF 6 LETTERS AND A NUMBER		//
		//////////////////////////////////////////////////////////////////////////
		if( $buttonID == "CR_Quick" or $buttonID == "CR_Timed" or $buttonID == "CR_Expiration" or $buttonID == "CR_Octets" ){
			$uname=keygen($name_lgth,"username",$use_caps,$use_numeric);
			if ($debug) echo "RANDOM ID NAME LENGHT $name_length KEYGENN \n".$uname." \n";	
			
			$ID = ($prefix .$uname. $atdomain.$suffix);
		}
		
		//////////////////////////////////////////////////////////////////////////
		//		CREATE A RANDOM PASSWORD OF EIGHT LETTERS		//
		//////////////////////////////////////////////////////////////////////////
		if ($use_pid=="1") $PASS= $use_pid_passwd;
        else if($buttonID == "CR_Quick" or $buttonID == "CR_Timed" or $buttonID == "CR_Expiration" or $buttonID == "CR_Octets" )
           
		  $PASS = keygen($passwd_lgth,"passwd",$use_caps,$use_numeric);
		if ($debug) echo " 3 PASSWD LGHT $passd_lght KEYGENN\n".$PASS." \n";	
		
		//////////////////////////////////////////////////////////////////////////
		//		ADD THE USERNAME AND PASSWORD TO AN ARRAY		//
		//	We cheat here and use the username as the key and the value	//
		//	as the password.  This has the added benifit of ensuring that	//
		//	they get all unique usernames although they would end up with	//
		//	a card less then they ordered.  We still need to error check	//
		//	the usernames and passwords to make sure they don't already 	//
		//	exist in the database.
		//////////////////////////////////////////////////////////////////////////
		if($buttonID == "CR_subscription_time" or $buttonID == "CR_subscription_octets" or $buttonID == "CR_subscription_expiration" ){
			$id=($_POST['UserName']);
			$PASS=($_POST['UserPasswd']);
			if ($PASS=='') $PASS=keygen($passwd_lgth,"passwd",$use_caps,$use_numeric);
			
			$ID = ($id . $atdomain);
		}
		$UserPass[$ID] = $PASS;	
		
		
		
	}
}
?>
Return current item: phpMyPrepaid