top.window.location = '../../index.php'"; exit; } require_once __DIR__ . "/" . "../../includes/include_geral_new.inc.php"; require_once __DIR__ . "/" . "../../includes/classes/ConnectPDO.php"; use includes\classes\ConnectPDO; $conn = ConnectPDO::getInstance(); $auth = new AuthNew($_SESSION['s_logado'], $_SESSION['s_nivel'], 1); $_SESSION['s_page_admin'] = $_SERVER['PHP_SELF']; // $suggestions = '[{}]'; ?> <?= APP_NAME; ?> <?= VERSAO; ?>

 

TRANS('TYPE_TEXT'), 'number' => TRANS('TYPE_NUMBER'), 'select' => TRANS('TYPE_SELECT'), 'select_multi' => TRANS('TYPE_SELECT_MULTI'), 'date' => TRANS('TYPE_DATE'), 'time' => TRANS('TYPE_TIME'), 'datetime' => TRANS('TYPE_DATETIME'), 'textarea' => TRANS('TYPE_TEXTAREA'), 'checkbox' => TRANS('TYPE_CHECKBOX') ]; array_multisort($typeList, SORT_LOCALE_STRING); /* Formulários que terão campos customizados */ $tableList = [ 'ocorrencias' => TRANS('TICKETS'), 'equipamentos' => TRANS('ASSETS'), 'clients' => TRANS('CLIENTS'), ]; $COD = (isset($_GET['cod']) && !empty($_GET['cod']) ? (int)$_GET['cod'] : ''); if (empty($COD)) { $custom_fields = getCustomFields($conn, null, null, null, null); } else { $custom_fields = getCustomFields($conn, $_GET['cod']); /* Options to select */ $optionsText = ""; $field_options = []; $field_options = getCustomFieldOptionValues($conn, $COD); foreach ($field_options as $option) { if (strlen((string)$optionsText)) $optionsText .= ","; $optionsText .= $option['option_value']; } } $registros = count($custom_fields); if ((!isset($_GET['action'])) && !isset($_POST['submit'])) { ?>

' : ''); $field_required = ($row['field_required'] == 1 ? '' : ''); $checkbox_checked = ($row['field_type'] == "checkbox" && $row['field_default_value'] == "on" ? '' : $row['field_default_value']); ?>
/> />
/> />
>  
/> />
/> />
/> />