<?php

require_once '../../../../init.php';
require_once "../../../../includes/ticketfunctions.php";

$activeTemplate = $whmcs->getClientAreaTemplate();
$text = App::getFromRequest('text');
$kbarticles = getKBAutoSuggestions($text);
if (count($kbarticles)) {
    echo json_encode($kbarticles);
}
exit;