. */ use Models\Module; use Util\Query; include_once __DIR__.'/../../core.php'; $structure = Module::find((new Module())->getByField('name', 'Prima nota', Models\Locale::getPredefined()->id)); if (!empty($_SESSION['superselect']['mastrini'])) { $id_record = $_SESSION['superselect']['mastrini']; $where = 'co_movimenti.idmastrino IN ('.implode(',', $id_record).')'; $id_record = json_decode($righe); unset($_SESSION['superselect']['mastrini']); } else { $where = 'co_movimenti.idmastrino='.prepare($id_record); } // RISULTATI VISIBILI Query::setSegments(false); $query = Query::getQuery($structure, $where, 0, []); $query = Modules::replaceAdditionals($structure->id, $query); $query = str_replace('1=1', '1=1 AND '.$where, $query); $records = Query::executeAndCount($query); $campi = []; foreach ($records['results'][0] as $key => $value) { $campi[] = $key; } unset($campi[0]);