示例#1
0
文件: index.php 项目: verbazend/AWFA
        $currentuser++;
    }
    $enrolVar['source'] = $postVar['source'];
    //Payment Method
    $enrolVar['payment'] = $postVar['payment'];
    $enrolVarp['otherPtype'] = $postVar['otherpaymentselection'];
    //Fields for Credit Card
    $enrolVar['cc'] = $postVar['cc'];
    $enrolVar['expiryM'] = $postVar['expiryM'];
    $enrolVar['expiryY'] = substr($postVar['expiryY'], -2, 2);
    $enrolVar['cvv'] = $postVar['cvv'];
    //Terms & Conditions / mailing opt in
    $enrolVar['opt_in'] = $postVar['opt_in'];
    $enrolVar['terms'] = $postVar['terms'];
    $enrolVar['campaign'] = $postVar['campaign'];
    //$enrolVar['singleinvoice'] = $postVar['singleinvoice'];
    $groupdata = array('processgroupID' => $groupID, 'eventID' => $eventID, 'total_trainee' => $totalUsers, 'single_invoice' => 0, 'campaign_code' => $enrolVar['campaign'], 'cc_num' => $enrolVar['cc'], 'cc_ccv' => $enrolVar['cvv'], 'cc_month' => $enrolVar['expiryM'], 'cc_year' => $enrolVar['expiryY'], 'payment_type' => $enrolVar['payment'], 'userSource' => $enrolVar['source'], 'optinRebook' => $enrolVar['opt_in'], 'terms_agree' => $enrolVar['terms'], 'process_status' => 0);
    $hasGroup = db::runQuery("select count(*) as total from process_group where processgroupID = '{$groupID}'");
    if ($hasGroup[0]['total'] == 0) {
        $insertData = arrtosqltable($groupdata);
        db::insertQuery("insert into |process_group| {$insertData}");
    } else {
        $insertData = arrtosqltable_update($groupdata);
        db::insertQuery("update |process_group| " . $insertData . " where processgroupID = '" . $groupID . "'");
    }
    $result = array('result' => true, 'sessionKey' => $groupID);
    echo json_encode($result);
    //Create contacts for each user
    //Submit to /course/enrolMultiple
    //with contact ID's in array
}
示例#2
0
function arrtosqltable_insert($array)
{
    return arrtosqltable($array);
}