<?php
  include "../../mainfile.php";
?>
<?php
  global $xoopsDB;

    //$id = $_POST["hid"];
    $psid = $_POST["sid"];
    $pwk = $_POST["wk"];

    $starttime = $_POST["tmeStart"];
	$endtime = $_POST["tmeEnd"];
?>
<?php
   	$query = "UPDATE punchsys_timetable SET pcInTime='$starttime', pcOutTime='$endtime'  WHERE secid='$psid' AND wkDay='$pwk'";
   	$xoopsDB->queryF($query);
?>
<?php
   	header("Location: main.php?pg=sys&ac=sect&sid=$psid");
?>