<?php
while(ob_get_level()>0)ob_end_clean();header('Content-Type: application/json; charset=utf-8');require_once dirname(__DIR__,2).'/core/lib/global_search.php';$query=cmsGlobalSearchNormalizeQuery($_GET['q']??'');$results=cmsGlobalSearch($db,(array)($adminAccess??[]),$query,30);echo json_encode(['code'=>200,'query'=>$query,'results'=>$results],JSON_UNESCAPED_UNICODE|JSON_UNESCAPED_SLASHES);exit;
