+44 (0)1223 659363 contact@acep.org.uk

Payment

Please review your order

[insert_php]
global $wpdb;
$customers = $wpdb->get_var(“SELECT freetype FROM wp_fsq_data ORDER BY id DESC LIMIT 1”);
$pinfo = $wpdb->get_var(“SELECT pinfo FROM wp_fsq_data ORDER BY id DESC LIMIT 1”);
//echo $customers.PHP_EOL;
//echo $pinfo.PHP_EOL;
//echo “


“;

$findme=”value”;
$len=strlen($customers);
$pos = strpos($customers, $findme);
$posnew=strpos($pinfo,$findme);

$howmany=strposnth($pinfo,’textinput’,3);
$howmantstr=substr($pinfo,$howmany,strlen($pinfo)-$howmany);
$howmany=strposnth($howmantstr,’value’,1);
$howmantstr=substr($howmantstr,$howmany,strlen($pinfo)-$howmany);
$howmanya=strposnth($howmantstr,'”‘,2);
$howmanyb=strposnth($howmantstr,'”‘,3);
$howmantstr=substr($howmantstr,$howmanya+1,$howmanyb-$howmanya-1);
$howmany=$howmantstr;

$optpos=strposnth($pinfo,’options’,1);
$optstring=substr($pinfo,$optpos,strlen($pinfo)-$optpos);
$opta=strposnth($optstring,'”‘,2);
$optb=strposnth($optstring,'”‘,3);
$optselect=substr($optstring,$opta+1,$optb-$opta-1);

if ($optselect==”0″){$optname=”Consultation & Engagement”;}
if ($optselect==”1″){$optname=”Digital Skills”;}
if ($optselect==”2″){$optname=”Governing Body”;}
if ($optselect==”3″){$optname=”Occupational Health”;}
if ($optselect==”4″){$optname=”Bespoke Development”;}

echo “Your audit type: “.$optname.”“.PHP_EOL;

echo “Toal number of participants under license for audit: “.$howmany.PHP_EOL;
$newbie=substr($customers,$pos+7,$len-($pos+7));
//echo $pos.PHP_EOL;
//echo $posnew.PHP_EOL;
//echo $newbie.PHP_EOL;

$emailstr=substr($pinfo,$posnew+6,strlen($pinfo)-6);
$posnew=strpos($emailstr,'”‘);
$emailstr=substr($emailstr,$posnew+1,strlen($emailstr)-$posnew);
$posnewer=strpos($emailstr,'”‘);
$emailstr=substr($emailstr,0,$posnewer);

echo “Your email address: “.$emailstr.PHP_EOL;
$prefix=substr($emailstr,0,2);
$uniqid = uniqid($prefix);
echo “Your transaction ID: “.$uniqid.PHP_EOL;

echo “


“;
$findme='”‘;
$findme2=’;’;
$qone=strpos($newbie,$findme);
$qtwo=strpos($newbie,$findme2);
$ticketone=substr($newbie,$qone+1,$qtwo-$qone-2);
//echo $qone.PHP_EOL;
//echo $qtwo.PHP_EOL;
//echo “YOUR NEW RESULT>”.$ticketone.PHP_EOL;

$newbie2=substr($newbie,$qone,$len-$qone);
//echo $newbie2;
$customers=$newbie2;
//echo “PROCESSING>”.$customers.PHP_EOL;

$findme=”value”;
$len=strlen($customers);
$pos = strpos($customers, $findme);
$newbie=substr($customers,$pos+7,$len-($pos+7));
//echo $pos.PHP_EOL;
//echo $newbie.PHP_EOL;
$findme='”‘;
$findme2=’;’;
$qone=strpos($newbie,$findme);
$qtwo=strpos($newbie,$findme2);
$tickettwo=substr($newbie,$qone+1,$qtwo-$qone-2);
//echo $qone.PHP_EOL;
//echo $qtwo.PHP_EOL;
//echo “YOUR NEW RESULT>”.$ticketone.PHP_EOL;

$newbie2=substr($newbie,$qone,$len-$qone);
//echo $newbie2;
$customers=$newbie2;
//echo “PROCESSING>”.$customers.PHP_EOL;

$findme=”value”;
$len=strlen($customers);
$pos = strpos($customers, $findme);
$newbie=substr($customers,$pos+7,$len-($pos+7));
//echo $pos.PHP_EOL;
//echo $newbie.PHP_EOL;
$findme='”‘;
$findme2=’;’;
$qone=strpos($newbie,$findme);
$qtwo=strpos($newbie,$findme2);
$ticketthree=substr($newbie,$qone+1,$qtwo-$qone-2);
//echo $qone.PHP_EOL;
//echo $qtwo.PHP_EOL;
//echo “YOUR NEW RESULT>”.$ticketone.PHP_EOL;

//echo $ticketone.PHP_EOL;
//echo $tickettwo.PHP_EOL;
//echo $ticketthree.PHP_EOL;

if (!empty($ticketone)) {$description=”Start-up”;$amount=$ticketone;}
if (!empty($tickettwo)) {$description=”SME”;$amount=$tickettwo;}
if (!empty($ticketthree)) {$description=”Enterprise”;$amount=$ticketthree;}

echo “You have chosen :”.$description.” account”.PHP_EOL;
echo “The total cost for this service is £”.$amount;
echo “
“;
echo “Please proceed to the secure checkout and enter the billing address and card details”;

$amount=$amount*100;
$newdes=”Skills Audit “.$description;
$sux=”http://www.consultationlab.org/setmeup?eid=”.$emailstr.”&numuser=”.$howmany.”&tid=”.$uniqid.”&opts=”.$optselect;

$shorty=”[stripe name=’Card billing address’ success_redirect_url=’$sux’ description=’$newdes’ amount=$amount billing=’true’]”;

echo do_shortcode($shorty);

function strposnth($haystack,$needle,$n){
$offset = 0;
for($i=1;$i<=$n;$i++){ $indx = strpos($haystack, $needle, $offset); if($i == $n || $indx === false) return $indx; else { $offset = $indx+1; } } return false; } [/insert_php] Once payment has been made we will send you a receipt by email and a link to your audit configuration settings.