Esempio n. 1
0
function axcelerate_transact($contactVars)
{
    $url = axcelerate_get_url() . "/api/accounting/transaction/";
    return postAXData($url, $contactVars);
}
Esempio n. 2
0
            $websitename = $tdata['websiteName'];
        }
        db::insertQuery("update courses set CourseName = '" . $courseName . "', websiteName = '" . $websitename . "', Code = '" . $courseCode . "', Type = '" . $courseType . "', deleted = '0' where CourseID = '" . $courseID . "'");
        golog("Updated {$courseID}");
        //dlog("Updated $courseID Type P","sync");
    }
    $locationTotal++;
}
$coursedata = db::runQuery("select * from courses");
db::insertQuery("update events set enrolmentOpen = '0', processed = '0', active = '0'");
golog("Set all events to processing and non active");
dlog("Marking all events as not open, not processed and not active.", "sync");
foreach ($coursedata as $course) {
    $courseType = $course['Type'];
    $courseID = intval($course['CourseID']);
    $url = axcelerate_get_url() . "/api/course/instances?type=" . $courseType . "&id=" . $courseID;
    $courses = getAXData($url);
    if ($courseID == "9137") {
        //var_dump($url);
        //var_dump($courses);
    }
    foreach ($courses as $singlecourse) {
        $courseID = db::esc($singlecourse->ID);
        $instanceID = db::esc($singlecourse->INSTANCEID);
        $locationDataName = db::esc($singlecourse->LOCATION);
        $startDateTime = db::esc($singlecourse->STARTDATE);
        $endDateTime = db::esc($singlecourse->FINISHDATE);
        $courseData = date("Y-m-d", strtotime("" . $startDateTime . ""));
        //NEDS TO BE DATE OF START DATE
        $cost = db::esc($singlecourse->COST);
        $maxparticipants = db::esc($singlecourse->MAXPARTICIPANTS);
Esempio n. 3
0
function axcelerate_testenrolment($contactVars)
{
    $url = axcelerate_get_url() . "/api/course/enrol";
    return postAXData($url, $contactVars);
}