<?php
header('Content-type: application/json');
include '../../config/database.php';

function _users_lock($mid,$mode){
	$conn = _connectDB();
	$sql = "UPDATE groupline SET lock_mode='".$mode."' WHERE groupline_api_key='".$mid."'";
	$result = $conn->query($sql);
	$res = ['status'=>true];
	return $res;
}
if(isset($_GET)){
	if(isset($_GET['mid'])){
		$mid = $_GET['mid'];
		$mode = $_GET['mode'];
		echo json_encode(_users_lock($mid,$mode));
	}
}