[insert_php]
$showform = true;

if($_POST[“g-recaptcha-response”] != “”)
{
$captchaurl = ‘https://www.google.com/recaptcha/api/siteverify’;
$captchavars = ‘secret=6Lfboz4UAAAAAIp-AIvqKWcCDExVegKFHcNVPwYo’ . ‘&response=’ . $_POST[“g-recaptcha-response”] . ‘&remoteip=’ . $_SERVER[“REMOTE_ADDR”];
$cch = curl_init( $captchaurl );
curl_setopt( $cch, CURLOPT_POST, 1);
curl_setopt( $cch, CURLOPT_POSTFIELDS, $captchavars);
curl_setopt( $cch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $cch, CURLOPT_HEADER, 0);
curl_setopt( $cch, CURLOPT_RETURNTRANSFER, 1);

$captcharesponse = curl_exec( $cch );

if (true || strpos($captcharesponse, ‘success:true,’) !== false ||
strpos($captcharesponse, ‘timeout-or-duplicate’) !== false )
{
$url = ‘http://api.digitalworkorder.com/Handlers/FreeTrialHandler.ashx’;
$myvars = ‘OrganizationName=’ . $_POST[“OrganizationName”] . ‘&’;
$myvars = $myvars . ‘FirstName=’ . $_POST[“FirstName”] . ‘&’;
$myvars = $myvars . ‘LastName=’ . $_POST[“LastName”] . ‘&’;
$myvars = $myvars . ‘EmailAddress=’ . $_POST[“EmailAddress”] . ‘&’;
$myvars = $myvars . ‘FirstName1=’ . $_POST[“FirstName1”] . ‘&’;
$myvars = $myvars . ‘LastName1=’ . $_POST[“LastName1”] . ‘&’;
$myvars = $myvars . ‘Email1=’ . $_POST[“Email1”] . ‘&’;
$myvars = $myvars . ‘FirstName2=’ . $_POST[“FirstName2”] . ‘&’;
$myvars = $myvars . ‘LastName2=’ . $_POST[“LastName2”] . ‘&’;
$myvars = $myvars . ‘Email2=’ . $_POST[“Email2”] . ‘&’;
$myvars = $myvars . ‘SubscriptionType=’ . $_POST[“mode”];

$ch = curl_init( $url );
curl_setopt( $ch, CURLOPT_POST, 1);
curl_setopt( $ch, CURLOPT_POSTFIELDS, $myvars);
curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt( $ch, CURLOPT_HEADER, 0);
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1);

$response = curl_exec( $ch );

if(strpos($response , ‘Errors were found:’) !== false){
echo $response;
}
else
{
echo $response;
$showform = false;
}
}
}
else
{
if($_POST[“submitbtn”] != “”)
{
echo ‘Please confirm that you are a human‘;
}
else
{
echo ‘Activate your one month free trial of Digital Workorder. Invite up to 2 co-workers and collaborate using all the available features during the trial. Complete the 4 steps below, and receive an activation email to begin.’;
}
}

if($showform)
{

echo ‘

1. Please let us know who you are

Organization Name:
Your First Name:
Your Last Name:
Your Email Address:

2. Invite up to 2 people to try it out with you

You can leave these blank if you want to try the app by yourself. You can always invite others later.

Email First Name Last Name

3. Confirm that you are a human.

4. Press the button below to receive a Trial Activation Email.


‘;

}

echo ‘‘;

[/insert_php]

WordPress Appliance - Powered by TurnKey Linux