<?
  //include "../../mainfile.php";
  include "include/dbcon.php";
?>
<?
  $pimgpath = $_POST["himgpath"];
  $pschName = $_POST["txtSchName"];
//  $passverify = $_POST["radPassverify"];
//  $maxpunchtime = $_POST["txtMaxpunchtime"];
  $adminpass = $_POST["txtAdminPass"];
  $pejpass = $_POST["txtPajPass"];

//  $autolate = $_POST["autolate"];
//  $lateId = $_POST["lateId"];

  $gbname = $_POST["gbname"];
  $gtname = $_POST["gtname"];
  $stype = $_POST["stype"];
?>
<?
  $query = "UPDATE xoops_sps_system SET schName='$pschName', imgPath='$pimgpath'";
  mysqli_query($conn,$query);

  $query = "UPDATE punchsys_setting 
              SET passverify='$passverify', maxpunchtime='$maxpunchtime', stype='$stype', lateId='$lateId', autolate='$autolate', gbname='$gbname', gtname='$gtname'";
  mysqli_query($conn,$query);
  
  $query = "UPDATE punchsys_staff
              SET `password`='$adminpass' WHERE id='admin'";
  mysqli_query($conn,$query);

  $query = "UPDATE punchsys_staff
              SET `password`='$pejpass' WHERE id='pejabat'";
  mysqli_query($conn,$query);
?>
<?
  header("Location: main.php?pg=sys&ac=stt");
?>