<?php

// COMMONS + DB

require "include/common.php";

// SESSION MUST BE ACTIVE

$session_id = check_session_post();

// LOG PLAYER ACTION

player_action($session_id, "", "", "", "LOG OUT", "Player just logged out, session id " . $session_id . " ended.");

// UPDATE SESSION

$sql = "update hynek_sessions set active = 0 where id = '" . $session_id . "';";
db_query($sql);

// RESPOND

response_json_ok(array()); // will exit()