<?php

require_once($_SERVER['DOCUMENT_ROOT'] . '/sys/db.php');

foreach ($_POST as $paramName => $paramValue) {
  if ($paramName == "workday_fk")
    $wo_id = $paramValue;
}

$dal = new DAL();
$sql = "SELECT id FROM workday WHERE id = $wo_id LIMIT 1 " ;
$wo_id = $dal->query($sql)->id;
if (null === $wo_id)
  $wo_id = 0;

echo json_encode($wo_id);

?>

