session_destroy();
    header("Location: login.php");
}
$Worker = new Worker($mysqli);
$getvar = key($_GET);
if (empty($_GET)) {
    Header("Location: ?office=peakontor");
}
$office = $_GET["office"];
if (isset($_GET["delete"])) {
    $Worker->deletePacket($office, $_GET["delete"]);
}
$keyword = "";
if (isset($_GET["keyword"])) {
    $keyword = $_GET["keyword"];
    $packet_array = $Worker->getPacketData($office, $keyword);
} else {
    $packet_array = $Worker->getPacketData($office);
}
?>

	<p>Tere, <?php 
echo $_SESSION["logged_in_user_email"];
?>
.</p>
	
	<br><br>
	
	<form action="dataWorker.php" method="get">
		
		<input type='hidden' name='office' value="<?php