0 ) { $_SESSION[ 'enroll_type' ] = $_GET[ 'enroll_type' ]; } //print 'cwd: ' . getcwd(); $sForm = '
'; $sRequiredField = '
(required field)
'; //alert( 'update: ' . $sUpdate ); switch ( $sUpdate ) { case 1: { if( strlen( $_POST[ 'user_name' ] ) == 0 ) { $sMissingUsername = $sRequiredField; $sUpdate = 0; } if( strlen( $_POST[ 'password' ] ) == 0 ) { $sMissingPassword = $sRequiredField; $sUpdate = 0; } if( strlen( $_POST[ 'confirm_password' ] ) == 0 ) { $sMissingConfirmPassword = $sRequiredField; $sUpdate = 0; } if( $sUpdate == 1 ) { print 'Verify the following information:

'; $sVerifyUsername = '' . $_POST[ 'user_name' ]; $sVerifyPassword = '****'; $sVerifyConfirmPassword = '****'; //$sVerifyURL = '' . $_POST[ 'url' ]; $sVerifyReceiveEmail = '' . $_POST[ 'receive_email' ]; $sUpdate = 2; } break; } case 2: { $sStatus = 'ACT'; switch ( $_SESSION[ 'product' ] ) { case 'counter': { $iLevel = 16; } case 'gallery': { $iLevel = 32; } case 'hosting': { $iLevel = 64; } } $secure_user[0] = 'user_name'; $secure_user[1] = 'password'; $secure_user[2] = 'status'; $secure_user[3] = 'level'; $secure_user[4] = 'receive_email'; $secure_user_value[0] = $_POST[ 'user_name' ]; $secure_user_value[1] = $_POST[ 'password' ]; $secure_user_value[2] = $sStatus; $secure_user_value[3] = $iLevel; $secure_user_value[4] = $_POST[ 'receive_email' ]; $iReturn = insertValues( 'secure_user', $secure_user, $secure_user_value ); if( $iReturn > 0 ) { $query = " insert into customer " . " ( " . " secure_user_id " . //" url " . " ) " . " values " . " ( " . $iReturn . " " . //"'" . $_POST[ 'url' ] . "'" . " ) "; //print 'query: ' . $query . '
'; $result = mysql_query($query) or die("Insert customer query failed."); $iInsertID = mysql_insert_id(); } validateUser( $_POST[ 'user_name' ], $_POST[ 'password' ] ); $sUpdate = 3; break; } } //alert( 'update: ' . $sUpdate ); if( $sUpdate == 0 ) { print 'If this is your first purchase from DarwinsWeb, please enter the following information:

'; $sVerifyUsername = ''; $sVerifyPassword = ''; $sVerifyConfirmPassword = ''; //$sVerifyURL = ''; if( $receive_email == 'no' ) { $sReceivedCheckedNo = 'checked'; } else { $sReceivedCheckedYes = 'checked'; } $sVerifyReceiveEmail .= 'Yes'; $sVerifyReceiveEmail .= 'No'; $sUpdate = 1; } if( $sUpdate < 3 ) { print $sForm; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; /* print ''; print ''; print ''; print ''; */ print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print ''; print '
'; print ''; print '* denotes a required field'; print '
'; print '*Email Address(username):'; print ''; print $sMissingUsername; print $sVerifyUsername; print '
'; print '*Password:'; print ''; print $sMissingPassword; print $sVerifyPassword; print '
'; print '*Confirm Password:'; print ''; print $sMissingConfirmPassword; print $sVerifyConfirmPassword; print '
'; print 'URL:'; print ''; print $sVerifyURL; print '
'; print '
'; print 'Would you like to receive email regarding updates to DarwinsWeb products?'; print '
'; print $sVerifyReceiveEmail; print '
'; print '
'; print '(DarwinsWeb will not sell your email address to third parties.)'; print '
'; if( $sUpdate == 2 ) { print '
'; print ''; print ''; print '
'; } print '
'; print ''; print '
'; print '

'; } else { print 'Thank you for registering.

'; } ?>