<?
session_start();
include"../plg/ses.php";
include"../plg/kon.php";

$siapa = $_GET['siapa'];

if($siapa=='pusat'){
  $sql = "update kpikar set kunci='Selesai' where lok like'%pusat%'";
  $res = $conn->query($sql);
  echo "<script>location.href='../selesai/';</script>";
}
if($siapa=='pusatopen'){
  $sql = "update kpikar set kunci='Belum' where lok like'%pusat%'";
  $res = $conn->query($sql);
  echo "<script>location.href='../penye/';</script>";
}
if($siapa=='cabang'){
  $sql = "update kpikar set kunci='Selesai' where lok not like'%pusat%'";
  $res = $conn->query($sql);
  echo "<script>location.href='../selesai/';</script>";
}
if($siapa=='cabangopen'){
  $sql = "update kpikar set kunci='Belum' where lok not like'%pusat%'";
  $res = $conn->query($sql);
  echo "<script>location.href='../penye/';</script>";
}


//echo "<script>location.href='../selesai/';</script>";

//header("location:../dashboard/penyelarasan.php");
 //echo "<script>location.href='../dashboard/penyelarasan.php';</script>";
//echo "test";
 //pkvol='$pkvol', pkkua='$pkkua', pkcat='$pkcat', hpkuan='$hpkuan', hpkua='$hpkua'

?>
