<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');
 
foreach ($_POST as $paramName => $paramValue) {
}

$dal = new DAL();

$sql = "SELECT id as ptr_id, start_time, end_time, break_dur " .
       "FROM projectteamrole WHERE 1 ";
$projectteamrole = $dal->query($sql);

foreach ($projectteamrole as $ptr) { 

  $or_id = hexdec(uniqid());

  $sql = "INSERT INTO officerole " .
         "(id, projectteamrole_id, start_time, end_time, break_dur) " .
         "VALUES " .
         "($or_id, $ptr->ptr_id, '$ptr->start_time', " .
         "'$ptr->end_time', $ptr->break_dur) ";

  $result = $dal->query($sql);
}         

echo json_encode($result);

?>

