<?php
header('Content-type: application/json');
include '../../config/database.php';
function _users_mode_huay($gid,$p){
	$conn = _connectDB();
	$sql = "UPDATE groupline SET groupline_view='VIP',groupline_theme='25line' WHERE groupline_products = '".$p."' and  groupline_key='".$gid."'";
	$result = $conn->query($sql);
	$res = ['status'=>true];
	return $res;
}

if(isset($_GET)){
	if(isset($_GET['gid'])){
		$gid = $_GET['gid'];
		$p = $_GET['p'];
		echo json_encode(_users_mode_huay($gid,$p));
	}else{echo json_encode(['status'=>false]);}
}else{echo json_encode(['status'=>false]);}