<?php
header('Content-type: application/json');
include '../../config/database.php';
function _users_on_off($gid,$mode){
	$conn = _connectDB();
	$sql = "UPDATE groupline SET groupline_over_alert='".$mode."' WHERE groupline_products = 'X4RICH' and  groupline_key='".$gid."'";
	$result = $conn->query($sql);
	$res = ['status'=>true];
	return $res;
}
if(isset($_GET)){
	if(isset($_GET['gid'])){
		$gid = $_GET['gid'];
		$mode = $_GET['mode'];
		echo json_encode(_users_on_off($gid,$mode));
	}
}
