0', $id_layout ) ); if (empty($data)) { echo '0'; } else { $ids = []; foreach ($data as $key => $value) { $ids[] = $value['id_agent']; } $sql = sprintf( 'UPDATE `tagente_modulo` SET flag = 1 WHERE `id_agente` IN (%s)', implode(',', $ids) ); $result = db_process_sql($sql); if ($result) { echo true; } else { echo '0'; } } return; } if ($load_css_cv === true) { $uniq = get_parameter('uniq', 0); $ratio = get_parameter('ratio', 0); return; } if ($update_maintanance_mode === true) { $idVisualConsole = (int) get_parameter('idVisualConsole', 0); $mode = (bool) get_parameter('mode', false); $values = []; if ($mode === true) { $values['maintenance_mode'] = json_encode( [ 'user' => $config['id_user'], 'timestamp' => time(), ] ); } else { $values['maintenance_mode'] = null; } $result = db_process_sql_update( 'tlayout', $values, ['id' => $idVisualConsole] ); echo json_encode(['result' => $result]); return; } if ($update_grid_style === true) { $idVisualConsole = (int) get_parameter('idVisualConsole', 0); $color = get_parameter('color', '#CCC'); $size = get_parameter('size', '10'); $values = []; $values['grid_color'] = $color; $values['grid_size'] = $size; $result = db_process_sql_update( 'tlayout', $values, ['id' => $idVisualConsole] ); echo json_encode(['result' => $result]); return; }