<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
session_start();
include_once "../config/database.php";
include_once "../resources/offering.php";
include_once '../config/properties.php';
$offering = new Offering();
if (!isset($_SESSION['uid'])) {
    echo "<script>window.location='../index.php';</script>";
} else {
$offering_id=$_GET['oid'];
$lesson_id=$_GET['lid'];
$user_id=$_SESSION['uid'];
$offering->offering_id=$offering_id;
$offering->lesson_id=$lesson_id;
$offering->user_id=$user_id;
$offering->last_updated_ts=$date_time;
if ($offering->lesson_track_insert()) {
    $result = TRUE;
}
echo $result;
}