HEX
Server: Apache
System: Linux www3.pit.tblive.com 5.14.0-687.38.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Aug 12 17:19:12 EDT 2026 x86_64
User: awaldron (1020)
PHP: 8.1.34
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/awaldron/www/archive/ressyn/register.php
<?php

if (isset($_POST[submit])) {
	$success = FALSE;
	
	// Setup form validation requirements
	$valid[0] = array('email', 'Email Address', 'email', TRUE);
	$valid[1] = array(trim($_POST[email]), $db->quickSQL("SELECT user_email FROM user WHERE user_email='".$_POST[email]."'"), 'exists', 'The \'Email Address\' entered cannot be registered because it already exists in our database.');
	$valid[2] = array('pw1', 'New Password', 'none', TRUE);
	$valid[3] = array('pw2', 'Re-Type New Password', 'none', TRUE);
	$valid[4] = array($_POST[pw1], $_POST[pw2], 'equal', 'The passwords entered do not match.');
	
	// Run Validation Function
	$errors = form_validate($_POST, $valid);
	
	// If no errors, process form
	if (!$errors) {
		$regkey = str_random(12);
		
		//Create & Send Confirmation Email
        $message = "You are receiving this email because a new account has been created using this email address at ProTechPTS.com. If you did not request this account, then please ignore this email or contact the administrator at ".ADMIN_EMAIL.".\n\n";
		$message .= "\nTo activate this account, you must click on the link provided:\n";
		$message .= BASE_URL."/account/create?key=".$regkey."\n\n\n";
		$message .= "Afterwards, you will be able to login to ProTechPTS.com using this email address and the password you specified.\n\n";
		$message .= "Thank you,\n\n";
		$message .= "The Web Team\n";
		$message .= "ProTech Professional Technical Services, Inc.\n";
		$message .= BASE_URL."\n";

		$subject = "ProTechPTS.com New Account Confirmation";
		$addhead = "From: " . ADMIN_EMAIL . PHP_EOL . "Reply-To: ".ADMIN_EMAIL;
		mail($_POST[email],$subject,$message,$addhead);		
		
		$db->quickUPDATE("INSERT INTO user (user_email,user_pass,user_regkey) VALUES ('".$_POST[email]."','".md5($_POST[pw1])."','".$regkey."')");

		$success = TRUE;
		$_POST = array();
	}

}

$page_title = "Create an Account";

include("_header.php");

	echo '<div class="sp-content2">'.EOL;

	if ($key_notices) echo $key_notices;
	else if ($key_errors) echo $key_errors;
	else {
		if ($success) {
			echo '<div class="success">Step 1 of your registration is complete.<ul><li> To complete your registration, you must confirm your email address.</li><li> A message has been sent to the email address you specified. You may have to check your SPAM filter for this message.</li><li> Click on the link provided in the message to complete your ProTechPTS.com registration.</li></ul></div><br/><br/><br/><br/><br/>'."\n";
		} else if ($errors) {
			echo $errors.'<br/>';
		}
		
		if (!$success) {
			
			//echo '<p><b>Why should I create a ProTech account?</b>'."\n";
			//echo '<p>A ProTech account allows you to do all kinds of useful things such as adding courses to your Watch List to be informed when they become available in your area.  It also tracks your progress as you attend our courses and maintains transcripts of your achievements. </p>'."\n";
			//echo 'It\'s very simple, just fill out the information below and get started <i>"Charting the Course...to Your Success!"</i> now!</p>'."\n";


			echo '<form name="changepw" action="'.self().'" method="post">'.EOL;
				
				echo '<fieldset title="Create an Account" id="create-account"><legend>&nbsp;&nbsp;Create an Account&nbsp;&nbsp;</legend>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="fname">First Name:</label> ';
				echo '<input type="text" id="fname" maxlength="32" class="login" />';
				echo '</div>'.EOL;

				echo '<div class="form-row">';
				echo '<label for="lname">Last Name:</label> ';
				echo '<input type="text" id="lname" maxlength="32" class="login" />';
				echo '</div>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="pcode">Postal/ZIP Code:</label> ';
				echo '<input type="text" id="pcode" maxlength="32" class="login" />';
				echo '</div>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="car_level">Career Level:</label> ';
				echo select_lookup('career_level');
				echo '</div>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="oldpw">Education Level:</label> ';
				echo select_lookup('degree');
				echo '</div>'.EOL;
				
				echo '<div class="form-row">&nbsp;</div>';
				
				echo '<div class="form-row">';
				echo '<label for="email1">Email Address:</label> ';
				echo '<input type="text" id="email1" maxlength="32" class="login" />';
				echo '</div>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="email2">Confirm Email:</label> ';
				echo '<input type="text" id="email2" maxlength="32" class="login" />';
				echo '</div>'.EOL;
				
				echo '<div class="form-row">&nbsp;</div>';
				
				echo '<div class="form-row">';
				echo '<label for="pass1">Account Password:</label> ';
				echo '<input type="password" id="pass1" maxlength="32" class="login" />';
				echo '</div>'.EOL;
				
				echo '<div class="form-row">';
				echo '<label for="pass2">Confirm Password:</label> ';
				echo '<input type="password" id="pass2" maxlength="32" class="login" />';
				echo '</div>'.EOL;
						
				echo '<div class="form-row2">';
				echo '<input type="submit" name="registersubmit" value="Create Account" class="submit" /> ';
				echo '<input type="button" onclick="window.location.href=\'/home\';" value="Cancel" class="submit" />';
				echo '</div>'.EOL;
													
				echo '</fieldset>'.EOL;	
			
			echo '</form>'.EOL;

		}
	}

	echo '</div>'."\n";
	
include("_footer.php");
?>