sc_actionbar_disabled[$buttonName]) && $this->sc_actionbar_disabled[$buttonName]) { return ' disabled'; } return ''; } function actionBar_getStateHide($buttonName) { if (isset($this->sc_actionbar_hidden[$buttonName]) && $this->sc_actionbar_hidden[$buttonName]) { return ' sc-actionbar-button-hidden'; } return ''; } //--- function monta_grid($linhas = 0) { global $nm_saida; clearstatcache(); $this->NM_cor_embutida(); if (isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['field_display']) && !empty($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['field_display'])) { foreach ($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['field_display'] as $NM_cada_field => $NM_cada_opc) { $this->NM_cmp_hidden[$NM_cada_field] = $NM_cada_opc; } } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['usr_cmp_sel']) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['usr_cmp_sel'])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['usr_cmp_sel'] as $NM_cada_field => $NM_cada_opc) { $this->NM_cmp_hidden[$NM_cada_field] = $NM_cada_opc; } } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['php_cmp_sel']) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['php_cmp_sel'])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['php_cmp_sel'] as $NM_cada_field => $NM_cada_opc) { $this->NM_cmp_hidden[$NM_cada_field] = $NM_cada_opc; } } if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'] = array(); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_init']) { return; } $this->inicializa(); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['charts_html'] = ''; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->Lin_impressas = 0; $this->Lin_final = FALSE; $this->grid($linhas); $this->nm_fim_grid(); } else { if (strpos(" " . $this->Ini->SC_module_export, "grid") !== false) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { } else { $this->cabecalho(); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { } else { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nmgrp_apl_opcao= (isset($_SESSION['sc_session']['scriptcase']['embutida_form_pdf']['grid_empresa'])) ? "pdf" : $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao']; if ($nmgrp_apl_opcao != "pdf") { $this->nmgp_barra_top(); } if ($nmgrp_apl_opcao != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print') { if ($this->Ini->grid_search_change_fil) { $seq_search = 1; foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'] as $cmp => $def) { $Seq_grid = $seq_search; $Cmp_grid = $cmp; $Def_grid = array('descr' => $def['descr'], 'hint' => $def['hint']); $Lin_grid_add = $this->grid_search_tag_ini($Cmp_grid, $Def_grid, $Seq_grid); $NM_func_grid_add = "grid_search_" . $Cmp_grid; $Lin_grid_add .= $this->$NM_func_grid_add($Seq_grid, 'S', $def['opc'], $def['val'], $nmgp_tab_label[$Cmp_grid]); $Lin_grid_add .= $this->grid_search_tag_end(); $this->Ini->Arr_result['grid_search_add'][] = array ('field' => $cmp, 'tag' => NM_charset_to_utf8($Lin_grid_add)); $seq_search++; } } elseif (!$this->Proc_link_res) { $this->html_grid_search(); } } unset ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['save_grid']); $this->grid(); if ($nmgrp_apl_opcao != "pdf") { $this->nmgp_barra_bot(); } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } if (strpos(" " . $this->Ini->SC_module_export, "resume") !== false) { $Gera_res = true; } else { $Gera_res = false; } if (strpos(" " . $this->Ini->SC_module_export, "chart") !== false) { $Gera_graf = true; } else { $Gera_graf = false; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['print_all'] && empty($this->nm_grid_sem_reg) && ($Gera_res || $Gera_graf) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] != "sc_free_total") { $this->Res->monta_html_ini_pdf(); $this->Res->monta_resumo(); $this->Res->monta_html_fim_pdf(); if ($Gera_graf) { $this->grafico_pdf(); } } $flag_apaga_pdf_log = TRUE; if (!$this->Print_All && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf") { $flag_apaga_pdf_log = FALSE; } $this->nm_fim_grid($flag_apaga_pdf_log); if (!$this->Print_All && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual"; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] == "print") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_ant']; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] = ""; } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_ant'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao']; } function resume($linhas = 0) { $this->Lin_impressas = 0; $this->Lin_final = FALSE; $this->grid($linhas); } //--- function inicializa() { global $nm_saida, $NM_run_iframe, $rec, $nmgp_chave, $nmgp_opcao, $nmgp_ordem, $nmgp_chave_det, $nmgp_quant_linhas, $nmgp_quant_colunas, $nmgp_url_saida, $nmgp_parms; // $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['orig_pesq'] = "grid"; if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Ind_lig_mult'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Ind_lig_mult'] = 0; } $this->Img_embbed = false; $this->nm_data = new nm_data("pt_br"); $this->pdf_label_group = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['label_group'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['label_group'] : "N"; $this->pdf_all_cab = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['all_cab'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['all_cab'] : "S"; $this->pdf_all_label = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['all_label'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_pdf']['all_label'] : "S"; $this->Fix_bar_top = false; $this->Fix_bar_bottom = false; $this->Grid_body = 'id="sc_grid_body"'; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->Grid_body = ""; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['fix_top'])) { $this->Fix_bar_top = ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['fix_top'] == "S") ? true : false; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['fix_bot'])) { $this->Fix_bar_bottom = ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['fix_bot'] == "S") ? true : false; } $this->Css_Cmp = array(); $NM_css = file($this->Ini->root . $this->Ini->path_link . "grid_empresa/grid_empresa_grid_" .strtolower($_SESSION['scriptcase']['reg_conf']['css_dir']) . ".css"); foreach ($NM_css as $cada_css) { $Pos1 = strpos($cada_css, "{"); $Pos2 = strpos($cada_css, "}"); $Tag = explode(",", trim(substr($cada_css, 1, $Pos1 - 1))); $Css = substr($cada_css, $Pos1 + 1, $Pos2 - $Pos1 - 1); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $this->Css_Cmp[$Tag[0]] = $Css; } else { $this->Css_Cmp[$Tag[0]] = ""; } } if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'] .= "nome_empresa?#?" . "Nome" . "?@?"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'] .= "cnpj_empresa?#?" . "CNPJ" . "?@?"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'] .= "uf_empresa?#?" . "UF" . "?@?"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label'] .= "municipio_empresa?#?" . "Municipio" . "?@?"; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_search_add'])) { $nmgp_tab_label = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label']; if (!empty($nmgp_tab_label)) { $nm_tab_campos = explode("?@?", $nmgp_tab_label); $nmgp_tab_label = array(); foreach ($nm_tab_campos as $cada_campo) { $parte_campo = explode("?#?", $cada_campo); $nmgp_tab_label[$parte_campo[0]] = $parte_campo[1]; } } $Seq_grid = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_search_add']['seq']; $Cmp_grid = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_search_add']['cmp']; $Def_grid = array('descr' => $nmgp_tab_label[$Cmp_grid], 'hint' => $nmgp_tab_label[$Cmp_grid]); $Lin_grid_add = $this->grid_search_tag_ini($Cmp_grid, $Def_grid, $Seq_grid); $NM_func_grid_add = "grid_search_" . $Cmp_grid; $Lin_grid_add .= $this->$NM_func_grid_add($Seq_grid, 'S', '', array(), $nmgp_tab_label[$Cmp_grid]); $Lin_grid_add .= $this->grid_search_tag_end(); $this->Arr_result = array(); $Temp = ob_get_clean(); $this->Arr_result['grid_add'][] = NM_charset_to_utf8($Lin_grid_add); $oJson = new Services_JSON(); echo $oJson->encode($this->Arr_result); unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_search_add']); exit; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dyn_search_aut_comp'])) { $NM_func_aut_comp = "lookup_ajax_" . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dyn_search_aut_comp']['cmp']; $parm = ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($_GET['q'])) ? sc_convert_encoding($_GET['q'], $_SESSION['scriptcase']['charset'], "UTF-8") : $_GET['q']; $nmgp_def_dados = $this->$NM_func_aut_comp($parm); ob_end_clean(); $count_aut_comp = 0; $resp_aut_comp = array(); foreach ($nmgp_def_dados as $Ind => $Lista) { if (is_array($Lista)) { foreach ($Lista as $Cod => $Valor) { if ($_GET['cod_desc'] == "S") { $Valor = $Cod . " - " . $Valor; } $resp_aut_comp[] = array('label' => $Valor , 'value' => $Cod); $count_aut_comp++; } } if ($count_aut_comp == $_GET['max_itens']) { break; } } $oJson = new Services_JSON(); echo $oJson->encode($resp_aut_comp); unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dyn_search_aut_comp']); exit; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $this->Ini->Embutida_iframe) { if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'] = array(); } } elseif ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'print') { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'] = array(); } $this->force_toolbar = false; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['force_toolbar'])) { $this->force_toolbar = true; unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['force_toolbar']); } $this->Tem_tab_vert = false; $this->width_tabula_quebra = "0px"; $this->width_tabula_display = "none"; if (isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit']) && $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] != '') { if ($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] == "on") {$_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] = "S";} if ($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] == "off") {$_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] = "N";} $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] = $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit']; } $this->grid_emb_form = false; $this->grid_emb_form_full = false; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_form']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_form']) { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_form_full']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_form_full']) { $this->grid_emb_form_full = true; } else { $this->grid_emb_form = true; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] = "N"; } } if ($this->Ini->SC_Link_View || ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['psq_edit'] == 'N')) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] = "N"; } $this->NM_cont_body = 0; $this->NM_emb_tree_no = false; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $_SESSION['sc_session'][$this->Ini->sc_page]['NM_arr_tree'] = array(); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ind_tree'] = 0; } elseif (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['emb_tree_no']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['emb_tree_no']) { $this->NM_emb_tree_no = true; } $this->aba_iframe = false; $this->Print_All = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['print_all']; if ($this->Print_All) { $this->Ini->nm_limite_lin = $this->Ini->nm_limite_lin_prt; } if (isset($_SESSION['scriptcase']['sc_aba_iframe'])) { foreach ($_SESSION['scriptcase']['sc_aba_iframe'] as $aba => $apls_aba) { if (in_array("grid_empresa", $apls_aba)) { $this->aba_iframe = true; break; } } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['iframe_menu'] && (!isset($_SESSION['scriptcase']['menu_mobile']) || empty($_SESSION['scriptcase']['menu_mobile']))) { $this->aba_iframe = true; } $this->nmgp_botoes['exit'] = "on"; $this->nmgp_botoes['first'] = "on"; $this->nmgp_botoes['back'] = "on"; $this->nmgp_botoes['forward'] = "on"; $this->nmgp_botoes['last'] = "on"; $this->nmgp_botoes['filter'] = "on"; $this->nmgp_botoes['pdf'] = "on"; $this->nmgp_botoes['xls'] = "on"; $this->nmgp_botoes['xml'] = "on"; $this->nmgp_botoes['json'] = "on"; $this->nmgp_botoes['csv'] = "on"; $this->nmgp_botoes['export'] = "on"; $this->nmgp_botoes['qtline'] = "on"; $this->nmgp_botoes['rows'] = "on"; $this->nmgp_botoes['new'] = "on"; $this->nmgp_botoes['insert'] = "on"; $this->nmgp_botoes['sel_col'] = "on"; $this->nmgp_botoes['qsearch'] = "on"; $this->nmgp_botoes['groupby'] = "on"; $this->nmgp_botoes['gridsave'] = "on"; $this->nmgp_botoes['gridsavesession'] = "on"; $this->nmgp_botoes['reload'] = "on"; $this->Cmps_ord_def['cod_empresa'] = " asc"; $this->Cmps_ord_def['nome_empresa'] = " asc"; $this->Cmps_ord_def['cnpj_empresa'] = " asc"; $this->Cmps_ord_def['municipio_empresa'] = " asc"; $this->Cmps_ord_def['uf_empresa'] = " asc"; $this->Cmps_ord_def['criado_data_empresa'] = " desc"; $this->Cmps_ord_def['criado_user_empresa'] = " asc"; if (isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['btn_display']) && !empty($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['btn_display'])) { foreach ($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['btn_display'] as $NM_cada_btn => $NM_cada_opc) { $this->nmgp_botoes[$NM_cada_btn] = $NM_cada_opc; } } $this->Proc_link_res = false; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_resumo']) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_resumo'])) { $this->Proc_link_res = true; $this->nmgp_botoes['filter'] = 'off'; $this->nmgp_botoes['groupby'] = 'off'; $this->nmgp_botoes['dynsearch'] = 'off'; $this->nmgp_botoes['qsearch'] = 'off'; $this->nmgp_botoes['gridsave'] = 'off'; $this->nmgp_botoes['exit'] = 'off'; } $this->sc_proc_grid = false; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word'] || $this->Ini->sc_export_ajax_img) { $this->NM_raiz_img = $this->Ini->root; } else { $this->NM_raiz_img = ""; } $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; $this->nm_where_dinamico = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_ant']; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca']) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'])) { $Busca_temp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca']; if ($_SESSION['scriptcase']['charset'] != "UTF-8") { $Busca_temp = NM_conv_charset($Busca_temp, $_SESSION['scriptcase']['charset'], "UTF-8"); } $this->nome_empresa = (isset($Busca_temp['nome_empresa'])) ? $Busca_temp['nome_empresa'] : ""; $tmp_pos = (is_string($this->nome_empresa)) ? strpos($this->nome_empresa, "##@@") : false; if ($tmp_pos !== false && !is_array($this->nome_empresa)) { $this->nome_empresa = substr($this->nome_empresa, 0, $tmp_pos); } $this->cnpj_empresa = (isset($Busca_temp['cnpj_empresa'])) ? $Busca_temp['cnpj_empresa'] : ""; $tmp_pos = (is_string($this->cnpj_empresa)) ? strpos($this->cnpj_empresa, "##@@") : false; if ($tmp_pos !== false && !is_array($this->cnpj_empresa)) { $this->cnpj_empresa = substr($this->cnpj_empresa, 0, $tmp_pos); } $this->uf_empresa = (isset($Busca_temp['uf_empresa'])) ? $Busca_temp['uf_empresa'] : ""; $tmp_pos = (is_string($this->uf_empresa)) ? strpos($this->uf_empresa, "##@@") : false; if ($tmp_pos !== false && !is_array($this->uf_empresa)) { $this->uf_empresa = substr($this->uf_empresa, 0, $tmp_pos); } $this->municipio_empresa = (isset($Busca_temp['municipio_empresa'])) ? $Busca_temp['municipio_empresa'] : ""; $tmp_pos = (is_string($this->municipio_empresa)) ? strpos($this->municipio_empresa, "##@@") : false; if ($tmp_pos !== false && !is_array($this->municipio_empresa)) { $this->municipio_empresa = substr($this->municipio_empresa, 0, $tmp_pos); } } $this->nm_field_dinamico = array(); $this->nm_order_dinamico = array(); $this->sc_where_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $this->sc_where_atual = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $this->sc_where_filtro = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro']; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "muda_qt_linhas") { unset($rec); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "muda_rec_linhas") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "muda_qt_linhas"; } ob_start(); $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'on'; if (!isset($_SESSION['usr_login'])) {$_SESSION['usr_login'] = "";} if (!isset($this->sc_temp_usr_login)) {$this->sc_temp_usr_login = (isset($_SESSION['usr_login'])) ? $_SESSION['usr_login'] : "";} ?> css_grid(); ?> sc_temp_usr_login = $this->sc_temp_usr_login; if (isset($this->sc_temp_usr_login)) {$_SESSION['usr_login'] = $this->sc_temp_usr_login;} $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'off'; $this->SC_Buf_onInit = ob_get_clean();; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['maximized']) { $tmpDashboardApp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['dashboard_app']; if (isset($_SESSION['scriptcase']['dashboard_toolbar'][$tmpDashboardApp]['grid_empresa'])) { $tmpDashboardButtons = $_SESSION['scriptcase']['dashboard_toolbar'][$tmpDashboardApp]['grid_empresa']; $this->nmgp_botoes['first'] = $tmpDashboardButtons['grid_navigate'] ? 'on' : 'off'; $this->nmgp_botoes['back'] = $tmpDashboardButtons['grid_navigate'] ? 'on' : 'off'; $this->nmgp_botoes['last'] = $tmpDashboardButtons['grid_navigate'] ? 'on' : 'off'; $this->nmgp_botoes['forward'] = $tmpDashboardButtons['grid_navigate'] ? 'on' : 'off'; $this->nmgp_botoes['summary'] = $tmpDashboardButtons['grid_summary'] ? 'on' : 'off'; $this->nmgp_botoes['qsearch'] = $tmpDashboardButtons['grid_qsearch'] ? 'on' : 'off'; $this->nmgp_botoes['dynsearch'] = $tmpDashboardButtons['grid_dynsearch'] ? 'on' : 'off'; $this->nmgp_botoes['filter'] = $tmpDashboardButtons['grid_filter'] ? 'on' : 'off'; $this->nmgp_botoes['sel_col'] = $tmpDashboardButtons['grid_sel_col'] ? 'on' : 'off'; $this->nmgp_botoes['sort_col'] = $tmpDashboardButtons['grid_sort_col'] ? 'on' : 'off'; $this->nmgp_botoes['goto'] = $tmpDashboardButtons['grid_goto'] ? 'on' : 'off'; $this->nmgp_botoes['qtline'] = $tmpDashboardButtons['grid_lineqty'] ? 'on' : 'off'; $this->nmgp_botoes['navpage'] = $tmpDashboardButtons['grid_navpage'] ? 'on' : 'off'; $this->nmgp_botoes['pdf'] = $tmpDashboardButtons['grid_pdf'] ? 'on' : 'off'; $this->nmgp_botoes['xls'] = $tmpDashboardButtons['grid_xls'] ? 'on' : 'off'; $this->nmgp_botoes['xml'] = $tmpDashboardButtons['grid_xml'] ? 'on' : 'off'; $this->nmgp_botoes['json'] = $tmpDashboardButtons['grid_json'] ? 'on' : 'off'; $this->nmgp_botoes['csv'] = $tmpDashboardButtons['grid_csv'] ? 'on' : 'off'; $this->nmgp_botoes['rtf'] = $tmpDashboardButtons['grid_rtf'] ? 'on' : 'off'; $this->nmgp_botoes['word'] = $tmpDashboardButtons['grid_word'] ? 'on' : 'off'; $this->nmgp_botoes['doc'] = $tmpDashboardButtons['grid_doc'] ? 'on' : 'off'; $this->nmgp_botoes['print'] = $tmpDashboardButtons['grid_print'] ? 'on' : 'off'; $this->nmgp_botoes['new'] = $tmpDashboardButtons['grid_new'] ? 'on' : 'off'; $this->nmgp_botoes['img'] = $tmpDashboardButtons['img'] ? 'on' : 'off'; $this->nmgp_botoes['html'] = $tmpDashboardButtons['html'] ? 'on' : 'off'; $this->nmgp_botoes['reload'] = $tmpDashboardButtons['grid_reload'] ? 'on' : 'off'; if (isset($tmpDashboardButtons['grid_rows'])) {$this->nmgp_botoes['rows'] = $tmpDashboardButtons['grid_rows'] ? 'on' : 'off';} } } if (isset($_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['insert']) && $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['insert'] != '') { $this->nmgp_botoes['new'] = $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['insert']; $this->nmgp_botoes['insert'] = $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['insert']; } if (isset($_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['update']) && $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['update'] != '') { $this->nmgp_botoes['update'] = $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['update']; } if (isset($_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['delete']) && $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['delete'] != '') { $this->nmgp_botoes['delete'] = $_SESSION['scriptcase']['sc_apl_conf']['form_empresa']['delete']; } if ($this->Ini->Embutida_iframe) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sub_cons_iframe_btns'] as $BTN => $BTN_opc) { $this->nmgp_botoes[$BTN] = $BTN_opc; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $nmgp_ordem = ""; $rec = "ini"; } // if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { include_once($this->Ini->path_embutida . "grid_empresa/grid_empresa_total.class.php"); } else { include_once($this->Ini->path_aplicacao . "grid_empresa_total.class.php"); } $dir_raiz = strrpos($_SERVER['PHP_SELF'],"/") ; $dir_raiz = substr($_SERVER['PHP_SELF'], 0, $dir_raiz + 1) ; $this->nm_location = $this->Ini->sc_protocolo . $this->Ini->server . $dir_raiz; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf'] != "pdf") { $_SESSION['scriptcase']['contr_link_emb'] = $this->nm_location; } else { $_SESSION['scriptcase']['contr_link_emb'] = "pdf"; } } else { $this->nm_location = $_SESSION['scriptcase']['contr_link_emb']; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf'] = $_SESSION['scriptcase']['contr_link_emb']; } $this->Tot = new grid_empresa_total($this->Ini->sc_page); $this->Tot->Db = $this->Db; $this->Tot->Erro = $this->Erro; $this->Tot->Ini = $this->Ini; $this->Tot->Lookup = $this->Lookup; if (empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid'] = 10; } if (isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['rows']) && !empty($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['rows'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid'] = $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['rows']; unset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['rows']); } if (isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['cols']) && !empty($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['cols'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_col_grid'] = $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['cols']; unset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['cols']); } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['rows'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['rows']; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['cols'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_col_grid'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['cols']; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "muda_qt_linhas") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual" ; if (!empty($nmgp_quant_linhas) && !is_array($nmgp_quant_linhas)) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid'] = $nmgp_quant_linhas ; } } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_lin_grid']; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] == "sc_free_total") { if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select'] = array(); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select']['cod_empresa'] = 'asc'; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select_orig'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select']; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] == "sc_free_total") { if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_quebra'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_quebra'] = array(); } } if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'] = "" ; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_ant'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_cmp'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_label'] = ""; } if (!empty($nmgp_ordem)) { $nmgp_ordem = str_replace('\"', '"', $nmgp_ordem); if (!isset($this->Cmps_ord_def[$nmgp_ordem])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual" ; } else { $Ordem_tem_quebra = false; foreach($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_quebra'] as $campo => $resto) { foreach($resto as $sqldef => $ordem) { if ($sqldef == $nmgp_ordem) { $Ordem_tem_quebra = true; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "inicio" ; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'] = ""; $ordem = ($ordem == "asc") ? "desc" : "asc"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_quebra'][$campo][$nmgp_ordem] = $ordem; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_cmp'] = $nmgp_ordem; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_label'] = trim($ordem); } } } if (!$Ordem_tem_quebra) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'] = $nmgp_ordem ; } } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "ordem") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "inicio" ; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_ant'] == $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid']) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc'] != " desc") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc'] = " desc" ; } else { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc'] = " asc" ; } } else { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc'] = $this->Cmps_ord_def[$nmgp_ordem]; } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_label'] = trim($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc']); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_ant'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid']; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_cmp'] = $nmgp_ordem; } if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = 0 ; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] = 0 ; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_edit']) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_edit'] = false; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "inicio") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "edit" ; } } if (!empty($nmgp_parms) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual"; $rec = "ini"; } if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']) || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['prim_cons'] || !empty($nmgp_parms)) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['prim_cons'] = false; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_ant'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'] = ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro'] = ""; } if (!empty($this->nm_where_dinamico)) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq'] .= $this->nm_where_dinamico; } $this->sc_where_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $this->sc_where_atual = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $this->sc_where_filtro = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro']; $this->sc_where_atual_f = (!empty($this->sc_where_atual)) ? "(" . trim(substr($this->sc_where_atual, 6)) . ")" : ""; $this->sc_where_atual_f = str_replace("%", "@percent@", $this->sc_where_atual_f); $this->sc_where_atual_f = "NM_where_filter*scin" . str_replace("'", "@aspass@", $this->sc_where_atual_f) . "*scout"; // //--------- // $nmgp_opc_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao']; if (isset($rec)) { if ($rec == "ini") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "inicio" ; } elseif ($rec == "fim") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "final" ; } else { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "avanca" ; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] = $rec; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] > 0) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']-- ; } } } $this->NM_opcao = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao']; if ($this->NM_opcao == "print") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] = "print" ; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual" ; if ($this->Ini->sc_export_ajax) { $this->Img_embbed = true; } } // $this->count_ger = 0; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "final" || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] == "all") { $Gb_geral = "quebra_geral_" . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby']; $this->Tot->$Gb_geral(); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral'][1] ; $this->count_ger = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral'][1]; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_dinamic']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_dinamic'] != $this->nm_where_dinamico) { unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral']); } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_dinamic'] = $this->nm_where_dinamico; if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral']) || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq'] != $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_ant'] || $nmgp_opc_orig == "edit") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['contr_total_geral'] = "NAO"; unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total']); $Gb_geral = "quebra_geral_" . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby']; $this->Tot->$Gb_geral(); } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral'][1] ; $this->count_ger = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['tot_geral'][1]; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] == "all") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] = $this->count_ger; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "inicio"; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "inicio" || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pesq") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = 0 ; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "final") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total'] - $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid']; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] < 0) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = 0 ; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "retorna") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] - $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid']; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] < 0) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = 0 ; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "avanca" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total'] > $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print" && substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'], 0, 7) != "detalhe" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual"; } $this->Rec_ini = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] - $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid']; if ($this->Rec_ini < 0) { $this->Rec_ini = 0; } $this->Rec_fim = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] + $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] + 1; if ($this->Rec_fim > $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total']) { $this->Rec_fim = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_total']; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] > 0) { $this->Rec_ini++ ; } $this->nmgp_reg_start = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio']; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] > 0) { $this->nmgp_reg_start--; } $this->nm_grid_ini = $this->nmgp_reg_start + 1; if ($this->nmgp_reg_start != 0) { $this->nm_grid_ini++; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $this->Ini->Apl_paginacao == "FULL") { $this->Ini->Qtd_reg_ajax_grid = $this->count_ger; } else { $this->Ini->Qtd_reg_ajax_grid = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid']; } //----- if (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_sybase)) { $nmgp_select = "SELECT cod_empresa, nome_empresa, cnpj_empresa, municipio_empresa, uf_empresa, obs_empresa, str_replace (convert(char(10),criado_data_empresa,102), '.', '-') + ' ' + convert(char(8),criado_data_empresa,20), criado_user_empresa from " . $this->Ini->nm_tabela; } elseif (in_array(strtolower($this->Ini->nm_tpbanco), $this->Ini->nm_bases_mysql)) { $nmgp_select = "SELECT cod_empresa, nome_empresa, cnpj_empresa, municipio_empresa, uf_empresa, obs_empresa, criado_data_empresa, criado_user_empresa from " . $this->Ini->nm_tabela; } else { $nmgp_select = "SELECT cod_empresa, nome_empresa, cnpj_empresa, municipio_empresa, uf_empresa, obs_empresa, criado_data_empresa, criado_user_empresa from " . $this->Ini->nm_tabela; } $nmgp_select .= " " . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $nmgp_order_by = ""; $campos_order_select = ""; foreach($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_select'] as $campo => $ordem) { if ($campo != $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid']) { if (!empty($campos_order_select)) { $campos_order_select .= ", "; } $campos_order_select .= $campo . " " . $ordem; } } $campos_order = ""; foreach($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_quebra'] as $campo => $resto) { foreach($resto as $sqldef => $ordem) { $format = $this->Ini->Get_Gb_date_format($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'], $campo); $campos_order = $this->Ini->Get_date_order_groupby($sqldef, $ordem, $format, $campos_order); } } if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'])) { if (!empty($campos_order)) { $campos_order .= ", "; } $nmgp_order_by = " order by " . $campos_order . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_grid'] . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_desc']; } elseif (!empty($campos_order_select)) { if (!empty($campos_order)) { $campos_order .= ", "; } $nmgp_order_by = " order by " . $campos_order . $campos_order_select; } elseif (!empty($campos_order)) { $nmgp_order_by = " order by " . $campos_order; } if (substr(trim($nmgp_order_by), -1) == ",") { $nmgp_order_by = " " . substr(trim($nmgp_order_by), 0, -1); } if (trim($nmgp_order_by) == "order by") { $nmgp_order_by = ""; } $nmgp_select .= $nmgp_order_by; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['order_grid'] = $nmgp_order_by; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" || $this->Ini->Apl_paginacao == "FULL") { $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nmgp_select; $this->rs_grid = $this->Db->Execute($nmgp_select) ; } else { $_SESSION['scriptcase']['sc_sql_ult_comando'] = "SelectLimit($nmgp_select, " . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] + 2) . ", $this->nmgp_reg_start)" ; $this->rs_grid = $this->Db->SelectLimit($nmgp_select, $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] + 2, $this->nmgp_reg_start) ; } if ($this->rs_grid === false && !$this->rs_grid->EOF && $GLOBALS["NM_ERRO_IBASE"] != 1) { $this->Erro->mensagem(__FILE__, __LINE__, "banco", $this->Ini->Nm_lang['lang_errm_dber'], $this->Db->ErrorMsg()); exit ; } if ($this->rs_grid->EOF || ($this->rs_grid === false && $GLOBALS["NM_ERRO_IBASE"] == 1)) { $this->force_toolbar = true; $this->nm_grid_sem_reg = $this->Ini->Nm_lang['lang_errm_empt']; } else { $this->cod_empresa = $this->rs_grid->fields[0] ; $this->cod_empresa = (string)$this->cod_empresa; $this->nome_empresa = $this->rs_grid->fields[1] ; $this->cnpj_empresa = $this->rs_grid->fields[2] ; $this->municipio_empresa = $this->rs_grid->fields[3] ; $this->uf_empresa = $this->rs_grid->fields[4] ; $this->obs_empresa = $this->rs_grid->fields[5] ; $this->criado_data_empresa = $this->rs_grid->fields[6] ; $this->criado_user_empresa = $this->rs_grid->fields[7] ; $this->SC_seq_register = $this->nmgp_reg_start ; $this->SC_seq_page = 0; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] = $this->nmgp_reg_start ; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['inicio'] != 0 && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']++ ; $this->SC_seq_register = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']; $this->rs_grid->MoveNext(); $this->cod_empresa = $this->rs_grid->fields[0] ; $this->nome_empresa = $this->rs_grid->fields[1] ; $this->cnpj_empresa = $this->rs_grid->fields[2] ; $this->municipio_empresa = $this->rs_grid->fields[3] ; $this->uf_empresa = $this->rs_grid->fields[4] ; $this->obs_empresa = $this->rs_grid->fields[5] ; $this->criado_data_empresa = $this->rs_grid->fields[6] ; $this->criado_user_empresa = $this->rs_grid->fields[7] ; } } $this->NM_hidden_filters = ($this->Ini->Embutida_iframe && !empty($this->nm_grid_sem_reg) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['initialize']) ? true : false; $this->nmgp_reg_inicial = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] + 1; $this->nmgp_reg_final = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] + $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid']; $this->nmgp_reg_final = ($this->nmgp_reg_final > $this->count_ger) ? $this->count_ger : $this->nmgp_reg_final; // if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word'] && !$this->Ini->sc_export_ajax) { require_once($this->Ini->path_lib_php . "/sc_progress_bar.php"); $this->pb = new scProgressBar(); $this->pb->setRoot($this->Ini->root); $this->pb->setDir($_SESSION['scriptcase']['grid_empresa']['glo_nm_path_imag_temp'] . "/"); $this->pb->setProgressbarMd5($_GET['pbmd5']); $this->pb->initialize(); $this->pb->setReturnUrl("./"); $this->pb->setReturnOption($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['word_return']); $this->pb->setTotalSteps($this->count_ger); } if ($this->Ini->Proc_print && $this->Ini->Export_html_zip && !$this->Ini->sc_export_ajax) { require_once($this->Ini->path_lib_php . "/sc_progress_bar.php"); $this->pb = new scProgressBar(); $this->pb->setRoot($this->Ini->root); $this->pb->setDir($_SESSION['scriptcase']['grid_empresa']['glo_nm_path_imag_temp'] . "/"); $this->pb->setProgressbarMd5($_GET['pbmd5']); $this->pb->initialize(); $this->pb->setReturnUrl("./"); $this->pb->setReturnOption($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['print_return']); $this->pb->setTotalSteps($this->count_ger); } if (!$this->Ini->sc_export_ajax && !$this->Print_All && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pdf_res'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf'] != "pdf") { //---------- Gauge ---------- ?> > Empresa :: PDF " GMT"> Ini->str_google_fonts) && !empty($this->Ini->str_google_fonts)) { ?> \r\n"); } } function NM_grid_nome_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['nome_empresa']) || $this->NM_cmp_hidden['nome_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->nome_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->nome_empresa)); } else { $conteudo = sc_strip_script($this->nome_empresa); $conteudo_original = sc_strip_script($this->nome_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'nome_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'nome_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_grid_cnpj_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['cnpj_empresa']) || $this->NM_cmp_hidden['cnpj_empresa'] != "off") { $conteudo = NM_encode_input(sc_strip_script($this->cnpj_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->cnpj_empresa)); if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } else { if (strlen($conteudo) < 14) { $conteudo = str_repeat(0, 14 - strlen($conteudo)) . $conteudo; } elseif (strlen($conteudo) > 14) { $conteudo = substr($conteudo, strlen($conteudo) - 14); } nmgp_Form_CicCnpj($conteudo) ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'cnpj_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'cnpj_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_grid_municipio_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['municipio_empresa']) || $this->NM_cmp_hidden['municipio_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->municipio_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->municipio_empresa)); } else { $conteudo = sc_strip_script($this->municipio_empresa); $conteudo_original = sc_strip_script($this->municipio_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'municipio_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'municipio_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_grid_uf_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['uf_empresa']) || $this->NM_cmp_hidden['uf_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->uf_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->uf_empresa)); } else { $conteudo = sc_strip_script($this->uf_empresa); $conteudo_original = sc_strip_script($this->uf_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'uf_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'uf_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_grid_obs_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['obs_empresa']) || $this->NM_cmp_hidden['obs_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->obs_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->obs_empresa)); } else { $conteudo = sc_strip_script($this->obs_empresa); $conteudo_original = sc_strip_script($this->obs_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'obs_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'obs_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_grid_criado_data_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['criado_data_empresa']) || $this->NM_cmp_hidden['criado_data_empresa'] != "off") { $conteudo = NM_encode_input(sc_strip_script($this->criado_data_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->criado_data_empresa)); if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } else { if (substr($conteudo, 10, 1) == "-") { $conteudo = substr($conteudo, 0, 10) . " " . substr($conteudo, 11); } if (substr($conteudo, 13, 1) == ".") { $conteudo = substr($conteudo, 0, 13) . ":" . substr($conteudo, 14, 2) . ":" . substr($conteudo, 17); } $conteudo_x = $conteudo; nm_conv_limpa_dado($conteudo_x, "YYYY-MM-DD HH:II:SS"); if (is_numeric($conteudo_x) && $conteudo_x > 0) { $this->nm_data->SetaData($conteudo, "YYYY-MM-DD HH:II:SS"); $conteudo = $this->nm_data->FormataSaida($this->nm_data->FormatRegion("DH", "ddmmaaaa;hhiiss")); } } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'criado_data_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'criado_data_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = "NOWRAP"; } else { $this->SC_nowrap = "NOWRAP"; } $nm_saida->saida(" \r\n"); } } function NM_grid_criado_user_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['criado_user_empresa']) || $this->NM_cmp_hidden['criado_user_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->criado_user_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->criado_user_empresa)); } else { $conteudo = sc_strip_script($this->criado_user_empresa); $conteudo_original = sc_strip_script($this->criado_user_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'criado_user_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'criado_user_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida(" \r\n"); } } function NM_calc_span() { $this->NM_colspan = 11; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $this->NM_colspan++; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf'] == "pdf") { $this->NM_colspan--; } foreach ($this->NM_cmp_hidden as $Cmp => $Hidden) { if ($Hidden == "off") { $this->NM_colspan--; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $this->NM_colspan--; } } function nm_quebra_pagina($nm_parms) { global $nm_saida; if ($this->nmgp_prim_pag_pdf && $nm_parms == "pagina") { $this->nmgp_prim_pag_pdf = false; return; } $this->Ini->nm_cont_lin++; if (($this->Ini->nm_limite_lin > 0 && $this->Ini->nm_cont_lin > $this->Ini->nm_limite_lin) || $nm_parms == "pagina" || $nm_parms == "resumo" || $nm_parms == "total") { $nm_saida->saida("
Ini->Nm_lang['lang_pdff_gnrt']; ?>...
progress_grid = $this->rs_grid->RecordCount(); $this->progress_pdf = 0; $this->progress_res = isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pivot_charts']) ? sizeof($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pivot_charts']) : 0; $this->progress_graf = 0; $this->progress_tot = 0; $this->progress_now = 0; $this->progress_lim_tot = 0; $this->progress_lim_now = 0; if (-1 < $this->progress_grid) { $this->progress_lim_qtd = (250 < $this->progress_grid) ? 250 : $this->progress_grid; $this->progress_lim_tot = floor($this->progress_grid / $this->progress_lim_qtd); $this->progress_pdf = floor($this->progress_grid * 0.25) + 1; $this->progress_tot = $this->progress_grid + $this->progress_pdf + $this->progress_res + $this->progress_graf; $str_pbfile = $this->Ini->root . $this->Ini->path_imag_temp . '/sc_pb_' . session_id() . '.tmp'; $this->progress_fp = fopen($str_pbfile, 'w'); grid_empresa_pdf_progress_call("PDF\n", $this->Ini->Nm_lang); grid_empresa_pdf_progress_call($this->Ini->path_js . "\n", $this->Ini->Nm_lang); grid_empresa_pdf_progress_call($this->Ini->path_prod . "/img/\n", $this->Ini->Nm_lang); grid_empresa_pdf_progress_call($this->progress_tot . "\n", $this->Ini->Nm_lang); fwrite($this->progress_fp, "PDF\n"); fwrite($this->progress_fp, $this->Ini->path_js . "\n"); fwrite($this->progress_fp, $this->Ini->path_prod . "/img/\n"); fwrite($this->progress_fp, $this->progress_tot . "\n"); $lang_protect = $this->Ini->Nm_lang['lang_pdff_strt']; if (!NM_is_utf8($lang_protect)) { $lang_protect = sc_convert_encoding($lang_protect, "UTF-8", $_SESSION['scriptcase']['charset']); } grid_empresa_pdf_progress_call($this->progress_tot . "_#NM#_" . "1_#NM#_" . $lang_protect . "...\n", $this->Ini->Nm_lang); fwrite($this->progress_fp, "1_#NM#_" . $lang_protect . "...\n"); flush(); } } $nm_fundo_pagina = ""; header("X-XSS-Protection: 1; mode=block"); header("X-Frame-Options: SAMEORIGIN"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("saida(" \"http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd\">\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Empresa\r\n"); $nm_saida->saida(" \r\n"); if ($_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $this->NM_opcao != "pdf") { $nm_saida->saida(" \r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $css_body = ""; } else { $css_body = "margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;"; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav'] && !$this->Ini->sc_export_ajax) { $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $confirmButtonClass = ''; $cancelButtonClass = ''; $confirmButtonText = $this->Ini->Nm_lang['lang_btns_cfrm']; $cancelButtonText = $this->Ini->Nm_lang['lang_btns_cncl']; $confirmButtonFA = ''; $cancelButtonFA = ''; $confirmButtonFAPos = ''; $cancelButtonFAPos = ''; if (isset($this->arr_buttons['bsweetalert_ok']) && isset($this->arr_buttons['bsweetalert_ok']['style']) && '' != $this->arr_buttons['bsweetalert_ok']['style']) { $confirmButtonClass = 'scButton_' . $this->arr_buttons['bsweetalert_ok']['style']; } if (isset($this->arr_buttons['bsweetalert_cancel']) && isset($this->arr_buttons['bsweetalert_cancel']['style']) && '' != $this->arr_buttons['bsweetalert_cancel']['style']) { $cancelButtonClass = 'scButton_' . $this->arr_buttons['bsweetalert_cancel']['style']; } if (isset($this->arr_buttons['bsweetalert_ok']) && isset($this->arr_buttons['bsweetalert_ok']['value']) && '' != $this->arr_buttons['bsweetalert_ok']['value']) { $confirmButtonText = $this->arr_buttons['bsweetalert_ok']['value']; } if (isset($this->arr_buttons['bsweetalert_cancel']) && isset($this->arr_buttons['bsweetalert_cancel']['value']) && '' != $this->arr_buttons['bsweetalert_cancel']['value']) { $cancelButtonText = $this->arr_buttons['bsweetalert_cancel']['value']; } if (isset($this->arr_buttons['bsweetalert_ok']) && isset($this->arr_buttons['bsweetalert_ok']['fontawesomeicon']) && '' != $this->arr_buttons['bsweetalert_ok']['fontawesomeicon']) { $confirmButtonFA = $this->arr_buttons['bsweetalert_ok']['fontawesomeicon']; } if (isset($this->arr_buttons['bsweetalert_cancel']) && isset($this->arr_buttons['bsweetalert_cancel']['fontawesomeicon']) && '' != $this->arr_buttons['bsweetalert_cancel']['fontawesomeicon']) { $cancelButtonFA = $this->arr_buttons['bsweetalert_cancel']['fontawesomeicon']; } if (isset($this->arr_buttons['bsweetalert_ok']) && isset($this->arr_buttons['bsweetalert_ok']['display_position']) && 'img_right' != $this->arr_buttons['bsweetalert_ok']['display_position']) { $confirmButtonFAPos = 'text_right'; } if (isset($this->arr_buttons['bsweetalert_cancel']) && isset($this->arr_buttons['bsweetalert_cancel']['display_position']) && 'img_right' != $this->arr_buttons['bsweetalert_cancel']['display_position']) { $cancelButtonFAPos = 'text_right'; } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if ($_SESSION['scriptcase']['proc_mobile'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $forced_mobile = (isset($_SESSION['scriptcase']['force_mobile']) && $_SESSION['scriptcase']['force_mobile']) ? 'true' : 'false'; $sc_app_data = json_encode([ 'forceMobile' => $forced_mobile, 'appType' => 'grid', 'improvements' => true, 'displayOptionsButton' => false, 'displayScrollUp' => true, 'bottomToolbarFixed' => true, 'mobileSimpleToolbar' => true, 'scrollUpPosition' => 'A', 'toolbarOrientation' => 'H', 'mobilePanes' => 'true', 'navigationBarButtons' => unserialize('a:5:{i:0;s:14:"sys_format_ini";i:1;s:14:"sys_format_ret";i:2;s:15:"sys_format_rows";i:3;s:14:"sys_format_ava";i:4;s:14:"sys_format_fim";}'), 'langs' => [ 'lang_refined_search' => html_entity_decode($this->Ini->Nm_lang['lang_refined_search'], ENT_COMPAT, $_SESSION['scriptcase']['charset']), 'lang_summary_search_button' => html_entity_decode($this->Ini->Nm_lang['lang_summary_search_button'], ENT_COMPAT, $_SESSION['scriptcase']['charset']), 'lang_details_button' => html_entity_decode($this->Ini->Nm_lang['lang_details_button'], ENT_COMPAT, $_SESSION['scriptcase']['charset']), ], ]); ?> saida(" Ini->str_schema_all . "_sweetalert.css\" />\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida(" Ini->path_prod . "/third/jquery_plugin/viewerjs/viewer.css\" />\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->path_prod . "/third/jquery/css/smoothness/jquery-ui.css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->path_prod . "/third/jquery_plugin/dropdown_check_list/css/ui.dropdownchecklist.standalone.css\" type=\"text/css\" />\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("Ini->path_prod . "/third/tippyjs/light.css\">\r\n"); $nm_saida->saida("Ini->path_prod . "/third/tippyjs/light-border.css\">\r\n"); $nm_saida->saida("Ini->path_prod . "/third/tippyjs/material.css\">\r\n"); $nm_saida->saida("Ini->path_prod . "/third/tippyjs/translucent.css\">\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $Fix_Bar_top_height = 0; if ($this->Fix_bar_top) { $Fix_Bar_top_height = "((typeof(getAppData) != 'undefined' && getAppData().improvements) && $('#sc_grid_toobar_top').outerHeight()) ? 0 : $('#sc_grid_toobar_top').outerHeight()"; } $nm_saida->saida("\r\n"); $nm_saida->saida(" Ini->path_prod . "/third/jquery_plugin/thickbox/thickbox.css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" Ini->Str_btn_css . "\" /> \r\n"); $nm_saida->saida(" Ini->str_schema_all . "_filter.css\" /> \r\n"); $nm_saida->saida(" Ini->str_schema_all . "_filter" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css\" /> \r\n"); $nm_saida->saida(" Ini->str_schema_all . "_appdiv.css\" /> \r\n"); $nm_saida->saida(" Ini->str_schema_all . "_appdiv" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css\" /> \r\n"); if ($_SESSION['scriptcase']['proc_mobile'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $gridOrderUnusedVisivility = $_SESSION['scriptcase']['proc_mobile'] ? 'visible' : 'hidden'; $gridOrderUnusedOpacity = $_SESSION['scriptcase']['proc_mobile'] ? '0.5' : '1'; $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $fixColNotFixedVisivility = $_SESSION['scriptcase']['proc_mobile'] ? 'visible' : 'hidden'; $fixColNotFixedOpacity = $_SESSION['scriptcase']['proc_mobile'] ? '1' : '1'; $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida("\r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $nm_saida->saida(" Ini->path_prod . "/third/font-awesome/6/css/all.min.css\" type=\"text/css\" media=\"screen,print\" />\r\n"); } $nm_saida->saida("\r\n"); if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['num_css'])) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['num_css'] = rand(0, 1000); } $write_css = true; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !$this->Print_All && $this->NM_opcao != "print" && $this->NM_opcao != "pdf") { $write_css = false; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_pdf']) { $write_css = true; } if ($write_css) {$NM_css = @fopen($this->Ini->root . $this->Ini->path_imag_temp . '/sc_css_grid_empresa_grid_' . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['num_css'] . '.css', 'w');} if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->NM_field_over = 0; $this->NM_field_click = 0; $Css_sub_cons = array(); if (($this->NM_opcao == "print" && $GLOBALS['nmgp_cor_print'] == "PB") || ($this->NM_opcao == "pdf" && $GLOBALS['nmgp_tipo_pdf'] == "pb") || ($_SESSION['scriptcase']['contr_link_emb'] == "pdf" && $GLOBALS['nmgp_tipo_pdf'] == "pb")) { $NM_css_file = $this->Ini->str_schema_all . "_grid_bw.css"; $NM_css_dir = $this->Ini->str_schema_all . "_grid_bw" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css"; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css_bw'])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css_bw'] as $Apl => $Css_apl) { $Css_sub_cons[] = $Css_apl; $Css_sub_cons[] = str_replace(".css", $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css", $Css_apl); } } } else { $NM_css_file = $this->Ini->str_schema_all . "_grid.css"; $NM_css_dir = $this->Ini->str_schema_all . "_grid" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css"; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css'])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css'] as $Apl => $Css_apl) { $Css_sub_cons[] = $Css_apl; $Css_sub_cons[] = str_replace(".css", $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css", $Css_apl); } } } if (is_file($this->Ini->path_css . $NM_css_file)) { $NM_css_attr = file($this->Ini->path_css . $NM_css_file); foreach ($NM_css_attr as $NM_line_css) { if (substr(trim($NM_line_css), 0, 16) == ".scGridFieldOver" && strpos($NM_line_css, "background-color:") !== false) { $this->NM_field_over = 1; } if (substr(trim($NM_line_css), 0, 17) == ".scGridFieldClick" && strpos($NM_line_css, "background-color:") !== false) { $this->NM_field_click = 1; } $NM_line_css = str_replace("../../img", $this->Ini->path_imag_cab , $NM_line_css); if ($write_css) {@fwrite($NM_css, " " . $NM_line_css . "\r\n");} } } if (is_file($this->Ini->path_css . $NM_css_dir)) { $NM_css_attr = file($this->Ini->path_css . $NM_css_dir); foreach ($NM_css_attr as $NM_line_css) { if (substr(trim($NM_line_css), 0, 16) == ".scGridFieldOver" && strpos($NM_line_css, "background-color:") !== false) { $this->NM_field_over = 1; } if (substr(trim($NM_line_css), 0, 17) == ".scGridFieldClick" && strpos($NM_line_css, "background-color:") !== false) { $this->NM_field_click = 1; } $NM_line_css = str_replace("../../img", $this->Ini->path_imag_cab , $NM_line_css); if ($write_css) {@fwrite($NM_css, " " . $NM_line_css . "\r\n");} } } if (!empty($Css_sub_cons)) { $Css_sub_cons = array_unique($Css_sub_cons); foreach ($Css_sub_cons as $Cada_css_sub) { if (is_file($this->Ini->path_css . $Cada_css_sub)) { $compl_css = str_replace(".", "_", $Cada_css_sub); $temp_css = explode("/", $compl_css); if (isset($temp_css[1])) { $compl_css = $temp_css[1];} $NM_css_attr = file($this->Ini->path_css . $Cada_css_sub); foreach ($NM_css_attr as $NM_line_css) { $NM_line_css = str_replace("../../img", $this->Ini->path_imag_cab , $NM_line_css); if ($write_css) {@fwrite($NM_css, " ." . $compl_css . "_" . substr(trim($NM_line_css), 1) . "\r\n");} } } } } } if ($write_css) {@fclose($NM_css);} $this->NM_css_val_embed .= "win"; $this->NM_css_ajx_embed .= "ult_set"; if(isset($this->Ini->str_google_fonts) && !empty($this->Ini->str_google_fonts)) { $nm_saida->saida(" Ini->str_google_fonts . "\" />\r\n"); } if (!$write_css) { $nm_saida->saida(" Ini->str_schema_all . "_grid.css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" Ini->str_schema_all . "_grid" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->str_schema_all . "_tab.css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" Ini->str_schema_all . "_tab" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css\" type=\"text/css\" media=\"screen\" />\r\n"); } elseif ($this->NM_opcao == "print" || $this->Print_All) { $nm_saida->saida(" \r\n"); } else { $nm_saida->saida(" Ini->path_imag_temp . "/sc_css_grid_empresa_grid_" . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['num_css'] . ".css\" type=\"text/css\" media=\"screen\" />\r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $nm_saida->saida(" Ini->str_schema_all . "_btngrp.css\" type=\"text/css\" media=\"screen\" />\r\n"); $nm_saida->saida(" Ini->str_schema_all . "_btngrp" . $_SESSION['scriptcase']['reg_conf']['css_dir'] . ".css\" type=\"text/css\" media=\"screen\" />\r\n"); } $str_iframe_body = ($this->aba_iframe) ? 'marginwidth="0px" marginheight="0px" topmargin="0px" leftmargin="0px"' : ''; $nm_saida->saida(" \r\n"); if (!$write_css) { $nm_saida->saida(" Ini->path_link . "grid_empresa/grid_empresa_grid_" . strtolower($_SESSION['scriptcase']['reg_conf']['css_dir']) . ".css\" />\r\n"); } else { $nm_saida->saida(" \r\n"); } if (!empty($this->SC_Buf_onInit)) { $nm_saida->saida("" . $this->SC_Buf_onInit . "\r\n"); } $nm_saida->saida(" \r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $this->Ini->nm_ger_css_emb) { $this->Ini->nm_ger_css_emb = false; $nm_saida->saida(" \r\n"); } $this->css_body_embutida = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['css_body_embutida'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['css_body_embutida'] : ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $remove_margin = isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_margin']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_margin'] ? 'margin: 0; ' : ''; $remove_border = isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_border']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_border'] ? 'border-width: 0; ' : ''; $remove_background = isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_background']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_background'] ? 'background-color: transparent; background-image: none; ' : ''; $vertical_center = ''; $nm_saida->saida(" css_scGridPage . " sc-app-grid\" " . $str_iframe_body . " style=\"" . $remove_margin . $remove_background . $vertical_center . $css_body . $this->css_body_embutida . "\">\r\n"); $nm_saida->saida(" " . $this->Ini->Ajax_result_set . "\r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && !$this->Print_All && strpos(" " . $this->Ini->SC_module_export, "grid") !== false) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] == "sc_free_total") { $nm_saida->saida("

\r\n"); } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $nm_saida->saida(" \r\n"); } $this->Tab_align = "center"; $this->Tab_valign = "top"; $this->Tab_width = " width=\"100%\""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->form_navegacao(); if ($NM_run_iframe != 1) {$this->check_btns();} } $nm_saida->saida(" Tab_align . "\" valign=\"" . $this->Tab_valign . "\" " . $this->Tab_width . ">\r\n"); if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['css_body_embutida'])) { $remove_border = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['css_body_embutida']; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { } else { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word']) { $nm_saida->saida("
Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /> " . $this->Ini->Nm_lang['lang_othr_prcs'] . "...
\r\n"); $nm_saida->saida("
Ini->path_icones . "/scriptcase__NM__ajax_load.gif\" align=\"absmiddle\" /> " . $this->Ini->Nm_lang['lang_othr_prcs'] . "...
\r\n"); $nm_saida->saida("
css_scGridLabel . "\" style=\"display: none; position: absolute\">
\r\n"); } $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print") { if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print") { $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } } } function NM_cor_embutida() { $compl_css = ""; include($this->Ini->path_btn . $this->Ini->Str_btn_grid); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->NM_css_val_embed = "sznmxizkjnvl"; $this->NM_css_ajx_embed = "Ajax_res"; } elseif ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_herda_css'] == "N") { if (($this->NM_opcao == "print" && $GLOBALS['nmgp_cor_print'] == "PB") || ($this->NM_opcao == "pdf" && $GLOBALS['nmgp_tipo_pdf'] == "pb") || ($_SESSION['scriptcase']['contr_link_emb'] == "pdf" && $GLOBALS['nmgp_tipo_pdf'] == "pb")) { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css_bw']['grid_empresa'])) { $compl_css = str_replace(".", "_", $_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css_bw']['grid_empresa']) . "_"; } } else { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css']['grid_empresa'])) { $compl_css = str_replace(".", "_", $_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css']['grid_empresa']) . "_"; } } } $temp_css = explode("/", $compl_css); if (isset($temp_css[1])) { $compl_css = $temp_css[1];} $this->css_scGridPage = $compl_css . "scGridPage"; $this->css_scGridPageLink = $compl_css . "scGridPageLink"; $this->css_scGridToolbar = $compl_css . "scGridToolbar"; $this->css_scGridToolbarPadd = $compl_css . "scGridToolbarPadding"; $this->css_css_toolbar_obj = $compl_css . "css_toolbar_obj"; $this->css_scGridHeader = $compl_css . "scGridHeader"; $this->css_scGridHeaderFont = $compl_css . "scGridHeaderFont"; $this->css_scGridFooter = $compl_css . "scGridFooter"; $this->css_scGridFooterFont = $compl_css . "scGridFooterFont"; $this->css_scGridBlock = $compl_css . "scGridBlock"; $this->css_scGridBlockFont = $compl_css . "scGridBlockFont"; $this->css_scGridBlockAlign = $compl_css . "scGridBlockAlign"; $this->css_scGridTotal = $compl_css . "scGridTotal"; $this->css_scGridTotalFont = $compl_css . "scGridTotalFont"; $this->css_scGridSubtotal = $compl_css . "scGridSubtotal"; $this->css_scGridSubtotalFont = $compl_css . "scGridSubtotalFont"; $this->css_scGridFieldEven = $compl_css . "scGridFieldEven"; $this->css_scGridFieldEvenFont = $compl_css . "scGridFieldEvenFont"; $this->css_scGridFieldEvenVert = $compl_css . "scGridFieldEvenVert"; $this->css_scGridFieldEvenLink = $compl_css . "scGridFieldEvenLink"; $this->css_scGridFieldOdd = $compl_css . "scGridFieldOdd"; $this->css_scGridFieldOddFont = $compl_css . "scGridFieldOddFont"; $this->css_scGridFieldOddVert = $compl_css . "scGridFieldOddVert"; $this->css_scGridFieldOddLink = $compl_css . "scGridFieldOddLink"; $this->css_scGridFieldClick = $compl_css . "scGridFieldClick"; $this->css_scGridFieldOver = $compl_css . "scGridFieldOver"; $this->css_scGridLabel = $compl_css . "scGridLabel"; $this->css_scGridLabelVert = $compl_css . "scGridLabelVert"; $this->css_scGridLabelFont = $compl_css . "scGridLabelFont"; $this->css_scGridLabelLink = $compl_css . "scGridLabelLink"; $this->css_scGroupLabeldOdd = $compl_css . "scGridLabelOddFont"; $this->css_scGroupLabelEven = $compl_css . "scGridLabelEvenFont"; $this->css_scGridTabela = $compl_css . "scGridTabela"; $this->css_scGridTabelaTd = $compl_css . "scGridTabelaTd"; $this->css_scGridBlockBg = $compl_css . "scGridBlockBg"; $this->css_scGridBlockLineBg = $compl_css . "scGridBlockLineBg"; $this->css_scGridBlockSpaceBg = $compl_css . "scGridBlockSpaceBg"; $this->css_scGridLabelNowrap = ""; $this->css_scAppDivMoldura = $compl_css . "scAppDivMoldura"; $this->css_scAppDivHeader = $compl_css . "scAppDivHeader"; $this->css_scAppDivHeaderText = $compl_css . "scAppDivHeaderText"; $this->css_scAppDivContent = $compl_css . "scAppDivContent"; $this->css_scAppDivContentText = $compl_css . "scAppDivContentText"; $this->css_scAppDivToolbar = $compl_css . "scAppDivToolbar"; $this->css_scAppDivToolbarInput = $compl_css . "scAppDivToolbarInput"; $this->css_inherit_bg = "scInheritBg"; $compl_css_emb = ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) ? "grid_empresa_" : ""; $this->css_sep = " "; $this->css_cod_empresa_label = $compl_css_emb . "css_cod_empresa_label"; $this->css_cod_empresa_grid_line = $compl_css_emb . "css_cod_empresa_grid_line"; $this->css_nome_empresa_label = $compl_css_emb . "css_nome_empresa_label"; $this->css_nome_empresa_grid_line = $compl_css_emb . "css_nome_empresa_grid_line"; $this->css_cnpj_empresa_label = $compl_css_emb . "css_cnpj_empresa_label"; $this->css_cnpj_empresa_grid_line = $compl_css_emb . "css_cnpj_empresa_grid_line"; $this->css_municipio_empresa_label = $compl_css_emb . "css_municipio_empresa_label"; $this->css_municipio_empresa_grid_line = $compl_css_emb . "css_municipio_empresa_grid_line"; $this->css_uf_empresa_label = $compl_css_emb . "css_uf_empresa_label"; $this->css_uf_empresa_grid_line = $compl_css_emb . "css_uf_empresa_grid_line"; $this->css_obs_empresa_label = $compl_css_emb . "css_obs_empresa_label"; $this->css_obs_empresa_grid_line = $compl_css_emb . "css_obs_empresa_grid_line"; $this->css_criado_data_empresa_label = $compl_css_emb . "css_criado_data_empresa_label"; $this->css_criado_data_empresa_grid_line = $compl_css_emb . "css_criado_data_empresa_grid_line"; $this->css_criado_user_empresa_label = $compl_css_emb . "css_criado_user_empresa_label"; $this->css_criado_user_empresa_grid_line = $compl_css_emb . "css_criado_user_empresa_grid_line"; } function cabecalho() { if($_SESSION['scriptcase']['proc_mobile'] && method_exists($this, 'cabecalho_mobile')) { $this->cabecalho_mobile(); } else if(method_exists($this, 'cabecalho_normal')) { $this->cabecalho_normal(); } } // //----- function cabecalho_normal() { global $nm_saida; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['compact_mode'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['maximized']) { return; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['cab'])) { return; } if ($this->Ini->Embutida_iframe) { return; } $nm_cab_filtro = ""; $nm_cab_filtrobr = ""; $Str_date = strtolower($_SESSION['scriptcase']['reg_conf']['date_format']); $Lim = strlen($Str_date); $Ult = ""; $Arr_D = array(); for ($I = 0; $I < $Lim; $I++) { $Char = substr($Str_date, $I, 1); if ($Char != $Ult) { $Arr_D[] = $Char; } $Ult = $Char; } $Prim = true; $Str = ""; foreach ($Arr_D as $Cada_d) { $Str .= (!$Prim) ? $_SESSION['scriptcase']['reg_conf']['date_sep'] : ""; $Str .= $Cada_d; $Prim = false; } $Str = str_replace("a", "Y", $Str); $Str = str_replace("y", "Y", $Str); $nm_data_fixa = date($Str); $this->sc_proc_grid = false; $HTTP_REFERER = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : ""; $this->sc_where_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $this->sc_where_atual = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $this->sc_where_filtro = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro']; if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'])) { $pos = 0; $trab_pos = false; $pos_tmp = true; $tmp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq']; while ($pos_tmp) { $pos = strpos($tmp, "##*@@", $pos); if ($pos !== false) { $trab_pos = $pos; $pos += 4; } else { $pos_tmp = false; } } $nm_cond_filtro_or = (substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], $trab_pos + 5) == "or") ? " " . trim($this->Ini->Nm_lang['lang_srch_orr_cond']) . " " : ""; $nm_cond_filtro_and = (substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], $trab_pos + 5) == "and") ? " " . trim($this->Ini->Nm_lang['lang_srch_and_cond']) . " " : ""; $nm_cab_filtro = substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], 0, $trab_pos); $nm_cab_filtrobr = str_replace("##*@@", ", " . $nm_cond_filtro_or . $nm_cond_filtro_and . "
", $nm_cab_filtro); $pos = 0; $trab_pos = false; $pos_tmp = true; $tmp = $nm_cab_filtro; while ($pos_tmp) { $pos = strpos($tmp, "##*@@", $pos); if ($pos !== false) { $trab_pos = $pos; $pos += 4; } else { $pos_tmp = false; } } if ($trab_pos === false) { } else { $nm_cab_filtro = substr($nm_cab_filtro, 0, $trab_pos) . " " . $nm_cond_filtro_or . $nm_cond_filtro_and . substr($nm_cab_filtro, $trab_pos + 5); $nm_cab_filtro = str_replace("##*@@", ", " . $nm_cond_filtro_or . $nm_cond_filtro_and, $nm_cab_filtro); } } $this->nm_data->SetaData(date("Y/m/d H:i:s"), "YYYY/MM/DD HH:II:SS"); $nm_saida->saida(" \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } // //----- function cabecalho_mobile() { global $nm_saida; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['compact_mode'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['maximized']) { return; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['cab'])) { return; } if ($this->Ini->Embutida_iframe) { return; } $nm_cab_filtro = ""; $nm_cab_filtrobr = ""; $Str_date = strtolower($_SESSION['scriptcase']['reg_conf']['date_format']); $Lim = strlen($Str_date); $Ult = ""; $Arr_D = array(); for ($I = 0; $I < $Lim; $I++) { $Char = substr($Str_date, $I, 1); if ($Char != $Ult) { $Arr_D[] = $Char; } $Ult = $Char; } $Prim = true; $Str = ""; foreach ($Arr_D as $Cada_d) { $Str .= (!$Prim) ? $_SESSION['scriptcase']['reg_conf']['date_sep'] : ""; $Str .= $Cada_d; $Prim = false; } $Str = str_replace("a", "Y", $Str); $Str = str_replace("y", "Y", $Str); $nm_data_fixa = date($Str); $this->sc_proc_grid = false; $HTTP_REFERER = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : ""; $this->sc_where_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $this->sc_where_atual = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $this->sc_where_filtro = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro']; if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'])) { $pos = 0; $trab_pos = false; $pos_tmp = true; $tmp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq']; while ($pos_tmp) { $pos = strpos($tmp, "##*@@", $pos); if ($pos !== false) { $trab_pos = $pos; $pos += 4; } else { $pos_tmp = false; } } $nm_cond_filtro_or = (substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], $trab_pos + 5) == "or") ? " " . trim($this->Ini->Nm_lang['lang_srch_orr_cond']) . " " : ""; $nm_cond_filtro_and = (substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], $trab_pos + 5) == "and") ? " " . trim($this->Ini->Nm_lang['lang_srch_and_cond']) . " " : ""; $nm_cab_filtro = substr($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq'], 0, $trab_pos); $nm_cab_filtrobr = str_replace("##*@@", ", " . $nm_cond_filtro_or . $nm_cond_filtro_and . "
", $nm_cab_filtro); $pos = 0; $trab_pos = false; $pos_tmp = true; $tmp = $nm_cab_filtro; while ($pos_tmp) { $pos = strpos($tmp, "##*@@", $pos); if ($pos !== false) { $trab_pos = $pos; $pos += 4; } else { $pos_tmp = false; } } if ($trab_pos === false) { } else { $nm_cab_filtro = substr($nm_cab_filtro, 0, $trab_pos) . " " . $nm_cond_filtro_or . $nm_cond_filtro_and . substr($nm_cab_filtro, $trab_pos + 5); $nm_cab_filtro = str_replace("##*@@", ", " . $nm_cond_filtro_or . $nm_cond_filtro_and, $nm_cab_filtro); } } $this->nm_data->SetaData(date("Y/m/d H:i:s"), "YYYY/MM/DD HH:II:SS"); $nm_saida->saida(" \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } // function label_grid($linhas = 0) { global $nm_saida; static $nm_seq_titulos = 0; $contr_embutida = false; $salva_htm_emb = ""; $this->grid_fixed_column_no = 0; if (1 < $linhas) { $this->Lin_impressas++; } $nm_seq_titulos++; $tmp_header_row = $nm_seq_titulos; if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['exibe_titulos']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['exibe_titulos'] != "S") { } else { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_label']) { if (!isset($_SESSION['scriptcase']['saida_var']) || !$_SESSION['scriptcase']['saida_var']) { $_SESSION['scriptcase']['saida_var'] = true; $_SESSION['scriptcase']['saida_html'] = ""; $contr_embutida = true; } else { $salva_htm_emb = $_SESSION['scriptcase']['saida_html']; $_SESSION['scriptcase']['saida_html'] = ""; } } $nm_saida->saida(" css_scGridLabel . " sc-ui-grid-header-row sc-ui-grid-header-row-grid_empresa-" . $tmp_header_row . "\">\r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_label']) { $nm_saida->saida(" \r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf") { $classColFld = ""; $classColTitle = ""; $classColActions = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; $classColActions = " sc-col-actions"; } $nm_saida->saida(" \r\n"); $this->grid_fixed_column_no++; } foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['field_order'] as $Cada_label) { $NM_func_lab = "NM_label_" . $Cada_label; $this->$NM_func_lab(); $this->grid_fixed_column_no++; } $this->SC_label_rightActionBar(); $nm_saida->saida("\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_label']) { if (isset($_SESSION['scriptcase']['saida_var']) && $_SESSION['scriptcase']['saida_var']) { $Cod_Html = $_SESSION['scriptcase']['saida_html']; $pos_tag = strpos($Cod_Html, "", $Cod_Html); $css_emb = ""; $Cod_Html = $css_emb . $Cod_Html; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cols_emb'] = count($Nm_temp) - 1; if ($contr_embutida) { $_SESSION['scriptcase']['saida_var'] = false; $nm_saida->saida($Cod_Html); } else { $_SESSION['scriptcase']['saida_html'] = $salva_htm_emb . $Cod_Html; } } } $NM_seq_lab = 1; foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels'] as $NM_cmp => $NM_lab) { if (empty($NM_lab) || $NM_lab == " ") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels'][$NM_cmp] = "No_Label" . $NM_seq_lab; $NM_seq_lab++; } } } } function NM_label_cod_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['cod_empresa'])) ? $this->New_label['cod_empresa'] : "#"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['cod_empresa']) || $this->NM_cmp_hidden['cod_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_nome_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['nome_empresa'])) ? $this->New_label['nome_empresa'] : "Nome"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['nome_empresa']) || $this->NM_cmp_hidden['nome_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_cnpj_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['cnpj_empresa'])) ? $this->New_label['cnpj_empresa'] : "CNPJ"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['cnpj_empresa']) || $this->NM_cmp_hidden['cnpj_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_municipio_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['municipio_empresa'])) ? $this->New_label['municipio_empresa'] : "Municipio"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['municipio_empresa']) || $this->NM_cmp_hidden['municipio_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_uf_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['uf_empresa'])) ? $this->New_label['uf_empresa'] : "UF"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['uf_empresa']) || $this->NM_cmp_hidden['uf_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_obs_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['obs_empresa'])) ? $this->New_label['obs_empresa'] : "Observação"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['obs_empresa']) || $this->NM_cmp_hidden['obs_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_criado_data_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['criado_data_empresa'])) ? $this->New_label['criado_data_empresa'] : "Data de criação"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['criado_data_empresa']) || $this->NM_cmp_hidden['criado_data_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function NM_label_criado_user_empresa() { global $nm_saida; $SC_Label = (isset($this->New_label['criado_user_empresa'])) ? $this->New_label['criado_user_empresa'] : "Criado por"; $classColFld = ""; $classColTitle = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; $classColTitle = " sc-col-title"; } if (!isset($this->NM_cmp_hidden['criado_user_empresa']) || $this->NM_cmp_hidden['criado_user_empresa'] != "off") { $nm_saida->saida(" \r\n"); } } function SC_label_rightActionBar() { global $nm_saida; } function scGetColumnOrderRule($fieldName) { $sortRule = 'nosort'; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_cmp'] == $fieldName) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ordem_label'] == 'desc') { $sortRule = 'desc'; } else { $sortRule = 'asc'; } } return $sortRule; } function scGetColumnOrderIcon($fieldName, $sortRule, $skipUnusedClass = false) { $unusedClass = $skipUnusedClass ? '' : ' sc-grid-order-icon-unused'; if ($this->scIsFieldNumeric($fieldName)) { $defaultOffIcon = 'asc' == $this->scGetDefaultFieldOrder($fieldName) ? "fas fa-sort-numeric-down" : "fas fa-sort-numeric-down-alt"; if ('desc' == $sortRule) { return ""; } elseif ('asc' == $sortRule) { return ""; } else { return ""; } } else { $defaultOffIcon = 'asc' == $this->scGetDefaultFieldOrder($fieldName) ? "fas fa-sort-alpha-down" : "fas fa-sort-alpha-down-alt"; if ('desc' == $sortRule) { return ""; } elseif ('asc' == $sortRule) { return ""; } else { return ""; } } } function scIsFieldNumeric($fieldName) { switch ($fieldName) { } return false; } function scGetDefaultFieldOrder($fieldName) { switch ($fieldName) { case "criado_data_empresa": return 'desc'; } return 'asc'; } // //----- function grid($linhas = 0) { global $nm_saida; $fecha_tr = ""; $this->Ini->qual_linha = "par"; $HTTP_REFERER = (isset($_SERVER['HTTP_REFERER'])) ? $_SERVER['HTTP_REFERER'] : ""; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['rows_emb'] = 0; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ini_cor_grid']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ini_cor_grid'] == "impar") { $this->Ini->qual_linha = "impar"; unset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ini_cor_grid']); } } static $nm_seq_execucoes = 0; static $nm_seq_titulos = 0; $this->SC_ancora = ""; $this->Rows_span = 1; $nm_seq_execucoes++; $nm_seq_titulos++; $this->nm_prim_linha = true; $this->Ini->nm_cont_lin = 0; $this->sc_where_orig = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_orig']; $this->sc_where_atual = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq']; $this->sc_where_filtro = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['where_pesq_filtro']; // $SC_Label = (isset($this->New_label['cod_empresa'])) ? $this->New_label['cod_empresa'] : "#"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['cod_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['nome_empresa'])) ? $this->New_label['nome_empresa'] : "Nome"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['nome_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['cnpj_empresa'])) ? $this->New_label['cnpj_empresa'] : "CNPJ"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['cnpj_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['municipio_empresa'])) ? $this->New_label['municipio_empresa'] : "Municipio"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['municipio_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['uf_empresa'])) ? $this->New_label['uf_empresa'] : "UF"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['uf_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['obs_empresa'])) ? $this->New_label['obs_empresa'] : "Observação"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['obs_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['criado_data_empresa'])) ? $this->New_label['criado_data_empresa'] : "Data de criação"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['criado_data_empresa'] = $SC_Label; $SC_Label = (isset($this->New_label['criado_user_empresa'])) ? $this->New_label['criado_user_empresa'] : "Criado por"; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['labels']['criado_user_empresa'] = $SC_Label; if (!$this->grid_emb_form && isset($_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit']) && $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit'] != '') { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] = $_SESSION['scriptcase']['sc_apl_conf']['grid_empresa']['lig_edit']; } if (!empty($this->nm_grid_sem_reg)) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->Lin_impressas++; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cols_emb']) || empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cols_emb'])) { $cont_col = 0; foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['field_order'] as $cada_field) { $cont_col++; } $NM_span_sem_reg = $cont_col - 1; } else { $NM_span_sem_reg = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cols_emb']; } $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['rows_emb']++; $nm_saida->saida(" \r\n"); $nm_saida->saida("##NM@@\r\n"); $this->rs_grid->Close(); } else { $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("
css_scGridTabelaTd . " " . $this->css_scGridPage . "\" colspan=3 style=\"vertical-align: top\">\r\n"); } else { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->NM_calc_span(); $nm_saida->saida(" NM_colspan . "\" class=\"" . $this->css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } else if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { if($this->Tem_tab_vert) { $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } else{ $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } } else{ $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } } $nm_saida->saida("\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scGridHeader . "\" style=\"height:11px; display: block; border-width:0px; \">
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridHeaderFont . "\">Empresacss_scGridHeaderFont . "\">
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scGridTabelaTd . " " . $this->css_scGridPage . "\" colspan=3 style=\"vertical-align: top\">\r\n"); } else { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->NM_calc_span(); $nm_saida->saida(" NM_colspan . "\" class=\"" . $this->css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } else if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { if($this->Tem_tab_vert) { $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } else{ $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } } else{ $nm_saida->saida(" css_scGridTabelaTd . "\" style=\"vertical-align: top\">\r\n"); } } $nm_saida->saida("\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scGridHeader . "\" style=\"height:11px; display: block; border-width:0px; \">
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridHeaderFont . "\">Empresacss_scGridHeaderFont . "\">
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scGridBlockBg . "\" style=\"width: " . $this->width_tabula_quebra . "; display:" . $this->width_tabula_display . ";\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_criado_user_empresa_label'] . "\" > css_inherit_bg . ' ' . $this->css_scGridLabelFont . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_criado_user_empresa_label'] . "\" > css_inherit_bg . ' ' . $this->css_scGridLabelFont . " sc-col-actionbar-left " . $classColFld . $classColTitle . $classColActions . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_criado_user_empresa_label'] . "\" >\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
 
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
", $pos); if ($pos !== false) { $pos_tag = $pos; $pos += 4; } else { $pos_tmp = false; } } $Cod_Html = substr($Cod_Html, 0, $pos_tag); $Nm_temp = explode("css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_cod_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_cod_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('cod_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('cod_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_cod_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_cod_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_nome_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_nome_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('nome_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('nome_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_nome_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_nome_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_cnpj_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_cnpj_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('cnpj_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('cnpj_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_cnpj_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_cnpj_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_municipio_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_municipio_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('municipio_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('municipio_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_municipio_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_municipio_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_uf_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_uf_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('uf_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('uf_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_uf_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_uf_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_obs_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_obs_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $label_labelContent = $label_fieldName; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_criado_data_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_criado_data_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = '; justify-content: center'; $fieldSortRule = $this->scGetColumnOrderRule('criado_data_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('criado_data_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_criado_data_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_criado_data_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_inherit_bg . ' ' . $this->css_scGridLabelFont . $this->css_sep . $this->css_criado_user_empresa_label . " " . $classColFld . $classColTitle . "\" style=\"" . $this->css_scGridLabelNowrap . "" . $this->Css_Cmp['css_criado_user_empresa_label'] . "\" >\r\n"); $label_fieldName = nl2br($SC_Label); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { // label & order $divLabelStyle = ''; $fieldSortRule = $this->scGetColumnOrderRule('criado_user_empresa'); $fieldSortIcon = $this->scGetColumnOrderIcon('criado_user_empresa', $fieldSortRule); if (empty($this->Ini->Label_sort_pos) || $this->Ini->Label_sort_pos == 'right') { $this->Ini->Label_sort_pos = 'right_field'; } if (empty($fieldSortIcon)) { $label_labelContent = "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_field') { $label_labelContent = "
css_criado_user_empresa_label . "\" style=\"display: flex; white-space: nowrap\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_field') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } elseif ($this->Ini->Label_sort_pos == 'right_cell') { $label_labelContent = "
css_criado_user_empresa_label . "\" style=\"display: flex; flex-grow: 1; white-space: nowrap" . $divLabelStyle . "\">" . $label_fieldName . "
" . $fieldSortIcon . "
"; } elseif ($this->Ini->Label_sort_pos == 'left_cell') { $label_labelContent = "
" . $fieldSortIcon . "
" . $label_fieldName . "
"; } else { $label_labelContent = "
" . $label_fieldName . "
"; } $label_labelContent = "css_scGridLabelLink . "\">". $label_labelContent . ""; $label_divLabel = "
". $label_labelContent . "
"; // controls $label_chart = ''; $label_fixedColumn = "grid_fixed_column_no . " sc-op-fix-col-notfixed\" data-fixcolid=\"" . $this->grid_fixed_column_no . "\" id=\"sc-fld-fix-col-" . $this->grid_fixed_column_no . "\">"; $label_divControl = '
' . $label_chart . $label_fixedColumn . '
'; // final label $label_final = '
' . $label_divLabel . $label_divControl . '
'; } else { $label_final = $label_fieldName; } $nm_saida->saida("" . $label_final . "\r\n"); $nm_saida->saida("
css_scGridTabelaTd . " " . "\" colspan = \"$NM_span_sem_reg\" align=\"center\" style=\"vertical-align: top;font-size:12px;\">\r\n"); $nm_saida->saida(" " . $this->nm_grid_sem_reg . "
\r\n"); $nm_saida->saida("
css_scGridTabelaTd . " " . "\" style=\"font-size:12px;\">\r\n"); $nm_id_aplicacao = ""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cab_embutida'] != "S") { $this->label_grid($linhas); } $this->NM_calc_span(); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridFieldOdd . "\" style=\"padding: 0px; font-size:12px;\" colspan = \"" . $this->NM_colspan . "\" align=\"center\">\r\n"); $nm_saida->saida(" " . $this->nm_grid_sem_reg . "\r\n"); $nm_saida->saida("
\r\n"); $this->Lin_final = $this->rs_grid->EOF; if ($this->Lin_final) { $this->rs_grid->Close(); } } } else { if ($this->grid_emb_form_full) { $_SESSION['sc_session'][$this->Ini->sc_page]['form_empresa']['lig_iframe_modal'] = "nmsc_iframe_liga_grid_empresa"; } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print") { $nm_saida->saida("
Grid_body . " class=\"" . $this->css_scGridTabelaTd . " " . $this->css_scGridFieldOdd . "\" align=\"center\" style=\"vertical-align: top;" . $this->css_body_embutida . "font-size:12px;\">\r\n"); if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['force_toolbar'])) { $this->force_toolbar = true; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['force_toolbar'] = true; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida(" " . $this->nm_grid_sem_reg . "\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'sc_grid_body', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $this->Ini->Arr_result['setSrc'][] = array('field' => 'nmsc_iframe_liga_A_grid_empresa', 'value' => 'NM_Blank_Page.htm'); $this->Ini->Arr_result['setSrc'][] = array('field' => 'nmsc_iframe_liga_D_grid_empresa', 'value' => 'NM_Blank_Page.htm'); $this->Ini->Arr_result['setSrc'][] = array('field' => 'nmsc_iframe_liga_E_grid_empresa', 'value' => 'NM_Blank_Page.htm'); $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); } return; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $nm_saida->saida("\r\n"); $nm_saida->saida(" \r\n"); $nm_id_aplicacao = ""; } else { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { } else { $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print") { $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); } $nm_id_aplicacao = " id=\"apl_grid_empresa#?#1\""; } $TD_padding = (!$this->Print_All && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf") ? "padding: 0px !important;" : ""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { } else { $nm_saida->saida(" \r\n"); if ($this->pdf_all_cab == "S") { $this->cabecalho(); } if ($this->pdf_all_label == "S") { $this->label_grid(); } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { }else { $nm_saida->saida("
Grid_body . " class=\"" . $this->css_scGridTabelaTd . "\" style=\"vertical-align: top;text-align: center;" . $TD_padding . $this->css_body_embutida . "\" width=\"100%\">\r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { if ($this->pdf_all_cab != "S") { $this->cabecalho(); } $nm_saida->saida("
css_scGridTabela . "\" id=\"sc-ui-grid-body-e2864620\" align=\"center\" " . $nm_id_aplicacao . " width=\"100%\">\r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { $nm_saida->saida("\r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && $this->pdf_all_label != "S" && $this->pdf_label_group != "S") { $this->label_grid($linhas); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $_SESSION['scriptcase']['saida_html'] = ""; } // $nm_quant_linhas = 0 ; $this->nm_inicio_pag = 0; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf") { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] = 0; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] == "sc_free_total") { $NM_prim_qb = true; } $this->nmgp_prim_pag_pdf = true; $this->Break_pag_pdf = array(); $this->Break_pag_prt = array(); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Config_Page_break_PDF'] = "S"; if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Page_break_PDF'])) { if (isset($this->Break_pag_pdf[$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby']])) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] == "sc_free_group_by") { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Gb_Free_cmp'] as $Cmp_gb => $resto) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Page_break_PDF'][$Cmp_gb] = $this->Break_pag_pdf['sc_free_group_by'][$Cmp_gb]; } } else { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Page_break_PDF'] = $this->Break_pag_pdf[$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby']]; } } else { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Page_break_PDF'] = array(); } } $this->Ini->cor_link_dados = $this->css_scGridFieldEvenLink; $this->NM_flag_antigo = FALSE; $nm_prog_barr = 0; $PB_tot = "/" . $this->count_ger;; $nm_houve_quebra = "N"; while (!$this->rs_grid->EOF && $nm_quant_linhas < $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['qt_reg_grid'] && ($linhas == 0 || $linhas > $this->Lin_impressas)) { $this->Rows_span = 1; $this->NM_field_style = array(); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['doc_word'] && !$this->Ini->sc_export_ajax) { $nm_prog_barr++; $Mens_bar = $this->Ini->Nm_lang['lang_othr_prcs']; if ($_SESSION['scriptcase']['charset'] != "UTF-8") { $Mens_bar = sc_convert_encoding($Mens_bar, "UTF-8", $_SESSION['scriptcase']['charset']); } $this->pb->setProgressbarMessage($Mens_bar . ": " . $nm_prog_barr . $PB_tot); $this->pb->addSteps(1); } if ($this->Ini->Proc_print && $this->Ini->Export_html_zip && !$this->Ini->sc_export_ajax) { $nm_prog_barr++; $Mens_bar = $this->Ini->Nm_lang['lang_othr_prcs']; if ($_SESSION['scriptcase']['charset'] != "UTF-8") { $Mens_bar = sc_convert_encoding($Mens_bar, "UTF-8", $_SESSION['scriptcase']['charset']); } $this->pb->setProgressbarMessage($Mens_bar . ": " . $nm_prog_barr . $PB_tot); $this->pb->addSteps(1); } //---------- Gauge ---------- if (!$this->Ini->sc_export_ajax && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && -1 < $this->progress_grid) { $this->progress_now++; if (0 == $this->progress_lim_now) { $lang_protect = $this->Ini->Nm_lang['lang_pdff_rows']; if (!NM_is_utf8($lang_protect)) { $lang_protect = sc_convert_encoding($lang_protect, "UTF-8", $_SESSION['scriptcase']['charset']); } grid_empresa_pdf_progress_call($this->progress_tot . "_#NM#_" . $this->progress_now . "_#NM#_" . $lang_protect . " " . $this->progress_now . "...\n", $this->Ini->Nm_lang); fwrite($this->progress_fp, $this->progress_now . "_#NM#_" . $lang_protect . " " . $this->progress_now . "...\n"); } $this->progress_lim_now++; if ($this->progress_lim_tot == $this->progress_lim_now) { $this->progress_lim_now = 0; } } $this->Lin_impressas++; $this->cod_empresa = $this->rs_grid->fields[0] ; $this->cod_empresa = (string)$this->cod_empresa; $this->nome_empresa = $this->rs_grid->fields[1] ; $this->cnpj_empresa = $this->rs_grid->fields[2] ; $this->municipio_empresa = $this->rs_grid->fields[3] ; $this->uf_empresa = $this->rs_grid->fields[4] ; $this->obs_empresa = $this->rs_grid->fields[5] ; $this->criado_data_empresa = $this->rs_grid->fields[6] ; $this->criado_user_empresa = $this->rs_grid->fields[7] ; $this->SC_seq_page++; $this->SC_seq_register = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final'] + 1; $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['rows_emb']++; $this->sc_proc_grid = true; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { if ($nm_houve_quebra == "S" || $this->nm_inicio_pag == 0) { if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $this->label_grid($linhas); } $nm_houve_quebra = "N"; } } $this->nm_inicio_pag++; if (!$this->NM_flag_antigo) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']++ ; } $seq_det = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['final']; $this->Ini->cor_link_dados = ($this->Ini->cor_link_dados == $this->css_scGridFieldOddLink) ? $this->css_scGridFieldEvenLink : $this->css_scGridFieldOddLink; $this->Ini->qual_linha = ($this->Ini->qual_linha == "par") ? "impar" : "par"; if ("impar" == $this->Ini->qual_linha) { $this->css_line_back = $this->css_scGridFieldOdd; $this->css_line_fonf = $this->css_scGridFieldOddFont; } else { $this->css_line_back = $this->css_scGridFieldEven; $this->css_line_fonf = $this->css_scGridFieldEvenFont; } $NM_destaque = " onmouseover=\"over_tr(this, '" . $this->css_line_back . "');\" onmouseout=\"out_tr(this, '" . $this->css_line_back . "');\" onclick=\"click_tr(this, '" . $this->css_line_back . "');\""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_opcao'] == "pdf" || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $NM_destaque =""; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $temp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dado_psq_ret']; eval("\$teste = \$this->$temp;"); } $dataActionbarPos = 'left'; $this->grid_fixed_column_no = 0; $this->SC_ancora = $this->SC_seq_page; $nm_saida->saida(" css_line_back . "\" style=\"page-break-inside: avoid;\"" . $NM_destaque . " id=\"SC_ancor" . $this->SC_ancora . "\">\r\n"); if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']){ $nm_saida->saida(" \r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']){ $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] != "N"){ if ($this->grid_emb_form_full) { $_SESSION['sc_session'][$this->Ini->sc_page]['form_empresa']['lig_iframe_modal'] = "nmsc_iframe_liga_grid_empresa"; } $Sc_parent = ($this->grid_emb_form_full) ? "S" : ""; $linkTarget = isset($this->Ini->sc_lig_target['A_@scinf__@scinf_form_empresa']) ? $this->Ini->sc_lig_target['A_@scinf__@scinf_form_empresa'] : (isset($this->Ini->sc_lig_target['A_@scinf_']) ? $this->Ini->sc_lig_target['A_@scinf_'] : null); if (isset($this->Ini->sc_lig_md5["form_empresa"]) && $this->Ini->sc_lig_md5["form_empresa"] == "S") { $Parms_Edt = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_btn_insert*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scoutnmgp_opcao*scinigual*scout"; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'] && isset($linkTarget)) { if ('' != $Parms_Edt && '?@?' != substr($Parms_Edt, -3) && '*scout' != substr($Parms_Edt, -6)) { $Parms_Edt .= '*scout'; } $Parms_Edt .= 'under_dashboard*scin1*scoutdashboard_app*scin' . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['dashboard_app'] . '*scoutown_widget*scin' . $linkTarget . '*scoutparent_widget*scin' . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['own_widget'] . '*scoutcompact_mode*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['compact_mode'] ? '1' : '0') . '*scoutremove_margin*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_margin'] ? '1' : '0') . '*scoutremove_border*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_border'] ? '1' : '0') . '*scoutremove_background*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_background'] ? '1' : '0'); } $Md5_Edt = "@SC_par@" . NM_encode_input($this->Ini->sc_page) . "@SC_par@grid_empresa@SC_par@" . md5($Parms_Edt); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'][md5($Parms_Edt)] = $Parms_Edt; } else { $Md5_Edt = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_btn_insert*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scoutnmgp_opcao*scinigual*scout"; } $Link_Edit = nmButtonOutput($this->arr_buttons, "bform_editar", "nm_gp_submit4('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Edt' , '". (isset($linkTarget) ? $linkTarget : '_self') . "', '', 'form_empresa', '" . $this->SC_ancora . "')", "nm_gp_submit4('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Edt' , '". (isset($linkTarget) ? $linkTarget : '_self') . "', '', 'form_empresa', '" . $this->SC_ancora . "')", "bedit", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" "); $nm_saida->saida($fecha_tr); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { return; } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $_SESSION['scriptcase']['contr_link_emb'] = ""; } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && empty($this->nm_grid_sem_reg) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print") { $nm_saida->saida("
Rows_span . "\" class=\"" . $this->css_scGridBlockBg . "\" style=\"width: " . $this->width_tabula_quebra . "; display:" . $this->width_tabula_display . ";\" style=\"" . $this->Css_Cmp['css_criado_user_empresa_grid_line'] . "\" NOWRAP align=\"\" valign=\"\" HEIGHT=\"0px\"> Rows_span . "\" class=\"" . $this->css_line_fonf . "\" style=\"" . $this->Css_Cmp['css_criado_user_empresa_grid_line'] . "\" NOWRAP align=\"left\" valign=\"top\" WIDTH=\"1px\" HEIGHT=\"0px\">\r\n"); $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcapture", "document.Fpesq.nm_ret_psq.value='" . str_replace(array("'", '"'), array("\'", '\"'), $teste) . "'; nm_escreve_window();", "document.Fpesq.nm_ret_psq.value='" . str_replace(array("'", '"'), array("\'", '\"'), $teste) . "'; nm_escreve_window();", "", "Rad_psq", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_BtnRows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no . "\" NOWRAP align=\"center\" valign=\"top\" WIDTH=\"1px\" HEIGHT=\"0px\">\r\n"); $nm_saida->saida("SC_seq_page . "\">\r\n"); $nm_saida->saida("\r\n"); $nm_saida->saida("saida(">\r\n"); $this->grid_fixed_column_no++;} if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['mostra_edit'] == "N"){ if ($this->grid_emb_form_full) { $_SESSION['sc_session'][$this->Ini->sc_page]['form_empresa']['lig_iframe_modal'] = "nmsc_iframe_liga_grid_empresa"; } $Sc_parent = ($this->grid_emb_form_full) ? "S" : ""; $linkTarget = isset($this->Ini->sc_lig_target['A_@scinf__@scinf_form_empresa']) ? $this->Ini->sc_lig_target['A_@scinf__@scinf_form_empresa'] : (isset($this->Ini->sc_lig_target['A_@scinf_']) ? $this->Ini->sc_lig_target['A_@scinf_'] : null); if (isset($this->Ini->sc_lig_md5["form_empresa"]) && $this->Ini->sc_lig_md5["form_empresa"] == "S") { $Parms_Edt = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_btn_insert*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scoutnmgp_opcao*scinigual*scout"; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'] && isset($linkTarget)) { if ('' != $Parms_Edt && '?@?' != substr($Parms_Edt, -3) && '*scout' != substr($Parms_Edt, -6)) { $Parms_Edt .= '*scout'; } $Parms_Edt .= 'under_dashboard*scin1*scoutdashboard_app*scin' . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['dashboard_app'] . '*scoutown_widget*scin' . $linkTarget . '*scoutparent_widget*scin' . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['own_widget'] . '*scoutcompact_mode*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['compact_mode'] ? '1' : '0') . '*scoutremove_margin*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_margin'] ? '1' : '0') . '*scoutremove_border*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_border'] ? '1' : '0') . '*scoutremove_background*scin' . ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['remove_background'] ? '1' : '0'); } $Md5_Edt = "@SC_par@" . NM_encode_input($this->Ini->sc_page) . "@SC_par@grid_empresa@SC_par@" . md5($Parms_Edt); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'][md5($Parms_Edt)] = $Parms_Edt; } else { $Md5_Edt = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_btn_insert*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scoutnmgp_opcao*scinigual*scout"; } $Link_Edit = nmButtonOutput($this->arr_buttons, "bform_editar", "nm_gp_submit4('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Edt' , '". (isset($linkTarget) ? $linkTarget : '_self') . "', '', 'form_empresa', '" . $this->SC_ancora . "')", "nm_gp_submit4('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Edt' , '". (isset($linkTarget) ? $linkTarget : '_self') . "', '', 'form_empresa', '" . $this->SC_ancora . "')", "bedit", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" \r\n"); $this->grid_fixed_column_no++;} foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['field_order'] as $Cada_col) { $NM_func_grid = "NM_grid_" . $Cada_col; $this->$NM_func_grid(); $this->grid_fixed_column_no++; } $this->SC_grid_rightActionBar(); $nm_saida->saida("\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid'] && $this->nm_prim_linha) { $nm_saida->saida("##NM@@"); $this->nm_prim_linha = false; } $this->rs_grid->MoveNext(); $this->sc_proc_grid = false; $nm_quant_linhas++ ; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" || $this->Ini->Apl_paginacao == "FULL") { $nm_quant_linhas = 0; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { $this->Lin_final = $this->rs_grid->EOF; if ($this->Lin_final) { $this->rs_grid->Close(); } } else { $this->rs_grid->Close(); } if (!$this->rs_grid->EOF) { if (isset($this->NM_tbody_open) && $this->NM_tbody_open) { $nm_saida->saida(" "); } } if ($this->rs_grid->EOF) { if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['exibe_total'] == "S") { $Gb_geral = "quebra_geral_" . $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['SC_Ind_Groupby'] . "_top"; $this->$Gb_geral() ; } } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $nm_saida->saida("X##NM@@X"); } $nm_saida->saida("
" . $Link_Edit . "
Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no . "\" NOWRAP align=\"center\" valign=\"top\" WIDTH=\"1px\" HEIGHT=\"0px\">\r\n"); $nm_saida->saida("SC_seq_page . "\">\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $nm_saida->saida(" \r\n"); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'sc_grid_body', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); } if ($this->Print_All) { $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] = "igual" ; } } function SC_grid_rightActionBar() { global $nm_saida; $dataActionbarPos = 'right'; } function NM_grid_cod_empresa() { global $nm_saida; if (!isset($this->NM_cmp_hidden['cod_empresa']) || $this->NM_cmp_hidden['cod_empresa'] != "off") { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" && isset($_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content']) && $_SESSION['nm_session']['sys_wkhtmltopdf_show_html_content'] == 'Y') { $conteudo = NM_encode_input(sc_strip_script($this->cod_empresa)); $conteudo_original = NM_encode_input(sc_strip_script($this->cod_empresa)); } else { $conteudo = sc_strip_script($this->cod_empresa); $conteudo_original = sc_strip_script($this->cod_empresa); } if ($conteudo === "") { $conteudo = " " ; $graf = "" ; } $str_tem_display = $conteudo; if(!empty($str_tem_display) && $str_tem_display != ' ' && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && !empty($conteudo)) { $str_tem_display = $this->getFieldHighlight('quicksearch', 'cod_empresa', $str_tem_display, $conteudo_original); $str_tem_display = $this->getFieldHighlight('advanced_search', 'cod_empresa', $str_tem_display, $conteudo_original); } $conteudo = $str_tem_display; $classColFld = ""; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != 'print' && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != 'pdf') { $classColFld = " sc-col-fld sc-col-fld-" . $this->grid_fixed_column_no; } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { $this->SC_nowrap = ""; } else { $this->SC_nowrap = ""; } $nm_saida->saida("
Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_cod_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_cod_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_nome_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_nome_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_cnpj_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_cnpj_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_municipio_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_municipio_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_uf_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_uf_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_obs_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_obs_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_criado_data_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_criado_data_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "Rows_span . "\" class=\"" . $this->css_inherit_bg . ' ' . $this->css_line_fonf . $this->css_sep . $this->css_criado_user_empresa_grid_line . " " . $classColFld . "\" style=\"" . $this->Css_Cmp['css_criado_user_empresa_grid_line'] . "\" " . $this->SC_nowrap . " align=\"\" valign=\"top\" HEIGHT=\"0px\">SC_seq_page . "\">" . $conteudo . "
\r\n"); $this->Ini->nm_cont_lin = ($nm_parms == "pagina") ? 0 : 1; if ($this->Print_All) { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['print_navigator']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['print_navigator'] == "Netscape") { $nm_saida->saida("Tab_align . "\" valign=\"" . $this->Tab_valign . "\" " . $this->Tab_width . ">\r\n"); } else { $nm_saida->saida("
Tab_align . "\" valign=\"" . $this->Tab_valign . "\" " . $this->Tab_width . ">\r\n"); } } else { $nm_saida->saida("
 
\r\n"); } if ($nm_parms != "resumo" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf']) { } else { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { $nm_saida->saida(" \r\n"); } $this->cabecalho(); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf_vert']) { $nm_saida->saida(" \r\n"); } } } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); $nm_saida->saida(" css_scGridTabela . "\" align=\"center\" " . $nm_id_aplicacao . " width=\"100%\">\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && ($this->pdf_all_cab == "S" || $this->pdf_all_label == "S")) { $nm_saida->saida(" \r\n"); if ($this->pdf_all_cab == "S") { $this->cabecalho(); } if ($this->pdf_all_label == "S" && $nm_parms != "resumo" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $this->label_grid(); } $nm_saida->saida(" \r\n"); } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && $nm_parms != "resumo" && $nm_parms != "pagina" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $this->label_grid(); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['proc_pdf'] && $this->pdf_label_group != "S" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida_grid']) { $this->nm_inicio_pag = 0; } } } function quebra_geral_sc_free_total_top() { global $nm_saida; if (isset($this->NM_tbody_open) && $this->NM_tbody_open) { $nm_saida->saida(" "); } } function quebra_geral_sc_free_total_bot() { } function nm_conv_data_db($dt_in, $form_in, $form_out) { $dt_out = $dt_in; if (strtoupper($form_in) == "DB_FORMAT") { if ($dt_out == "null" || $dt_out == "") { $dt_out = ""; return $dt_out; } $form_in = "AAAA-MM-DD"; } if (strtoupper($form_out) == "DB_FORMAT") { if (empty($dt_out)) { $dt_out = "null"; return $dt_out; } $form_out = "AAAA-MM-DD"; } if (strtoupper($form_out) == "SC_FORMAT_REGION") { $this->nm_data->SetaData($dt_in, strtoupper($form_in)); $prep_out = (strpos(strtolower($form_in), "dd") !== false) ? "dd" : ""; $prep_out .= (strpos(strtolower($form_in), "mm") !== false) ? "mm" : ""; $prep_out .= (strpos(strtolower($form_in), "aa") !== false) ? "aaaa" : ""; $prep_out .= (strpos(strtolower($form_in), "yy") !== false) ? "aaaa" : ""; return $this->nm_data->FormataSaida($this->nm_data->FormatRegion("DT", $prep_out)); } else { nm_conv_form_data($dt_out, $form_in, $form_out); return $dt_out; } } function nmgp_barra_top_normal() { global $nm_saida, $nm_url_saida, $nm_apl_dependente; $NM_btn = false; $NM_Gbtn = false; if (!$_SESSION['scriptcase']['proc_mobile'] && $this->Fix_bar_top) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if (!$NM_btn && isset($NM_ult_sep)) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setDisplay'][] = array('field' => $NM_ult_sep, 'value' => 'none'); } $nm_saida->saida(" \r\n"); } } function nmgp_barra_top_mobile() { global $nm_saida, $nm_url_saida, $nm_apl_dependente; $NM_btn = false; $NM_Gbtn = false; if (!$_SESSION['scriptcase']['proc_mobile'] && $this->Fix_bar_top) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if (!$NM_btn && isset($NM_ult_sep)) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setDisplay'][] = array('field' => $NM_ult_sep, 'value' => 'none'); } $nm_saida->saida(" \r\n"); } } function nmgp_barra_bot_mobile() { global $nm_saida, $nm_url_saida, $nm_apl_dependente; $NM_btn = false; $NM_Gbtn = false; $this->NM_calc_span(); if (!$_SESSION['scriptcase']['proc_mobile'] && $this->Fix_bar_bottom) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if (!$NM_btn && isset($NM_ult_sep)) { if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setDisplay'][] = array('field' => $NM_ult_sep, 'value' => 'none'); } $nm_saida->saida(" \r\n"); } } function nmgp_barra_top() { if (isset($_SESSION['scriptcase']['proc_mobile']) && $_SESSION['scriptcase']['proc_mobile']) { $this->nmgp_barra_top_mobile(); $this->nmgp_embbed_placeholder_top(); } if (!isset($_SESSION['scriptcase']['proc_mobile']) || !$_SESSION['scriptcase']['proc_mobile']) { $this->nmgp_barra_top_normal(); $this->nmgp_embbed_placeholder_top(); } } function nmgp_barra_bot() { if (isset($_SESSION['scriptcase']['proc_mobile']) && $_SESSION['scriptcase']['proc_mobile']) { $this->nmgp_embbed_placeholder_bot(); $this->nmgp_barra_bot_mobile(); } } function nmgp_embbed_placeholder_top() { global $nm_saida; $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } function nmgp_embbed_placeholder_bot() { global $nm_saida; $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); } function html_grid_search() { global $nm_saida; $this->grid_search_seq = 0; $this->grid_search_str = ""; $this->grid_search_dat = array(); $this->grid_search_str = ""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } $this->NM_case_insensitive = false; $tmp = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['cond_pesq']; $pos = strrpos($tmp, "##*@@"); if ($pos !== false) { $and_or = (substr($tmp, ($pos + 5)) == "and") ? $this->Ini->Nm_lang['lang_srch_and_cond'] : $this->Ini->Nm_lang['lang_srch_orr_cond']; $tmp = substr($tmp, 0, $pos); $this->grid_search_str = str_replace("##*@@", ", " . $and_or . " ", $tmp); } $str_display = empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'])?'none':''; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $nm_saida->saida(" \r\n"); } else { $str_display = empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq']) ? 'none' : ''; $this->Ini->Arr_result['setDisplay'][] = array('field' => 'NM_Grid_Search', 'value' => $str_display); $_SESSION['scriptcase']['saida_html'] = ""; } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['save_grid'])) { $str_display = empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq']) ? 'none' : ''; $this->Ini->Arr_result['setDisplay'][] = array('field' => 'NM_Grid_Search', 'value' => $str_display); } $nm_saida->saida(" \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'NM_Grid_Search', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $_SESSION['scriptcase']['saida_html'] = ""; if (!empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'])) { $this->Ini->Arr_result['exec_JS'][] = array('function' => 'SC_carga_evt_jquery_grid', 'parm' => 'all'); } } if(!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $nm_saida->saida(" \r\n"); } $this->JS_grid_search(); } function grid_search_tag_ini($cmp, $def, $seq) { global $nm_saida; $lin_obj = ""; $lin_obj .= "
"; $lin_obj .= "" . NM_encode_input($def['descr']) . ""; $lin_obj .= ""; return $lin_obj; } function grid_search_tag_end() { global $nm_saida; $lin_obj = "
"; return $lin_obj; } function grid_search_add_tag() { $lin_obj = ""; $All_cmp_search = array('nome_empresa','cnpj_empresa','uf_empresa','municipio_empresa'); $nmgp_tab_label = $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['pesq_tab_label']; if (!empty($nmgp_tab_label)) { $nm_tab_campos = explode("?@?", $nmgp_tab_label); $nmgp_tab_label = array(); foreach ($nm_tab_campos as $cada_campo) { $parte_campo = explode("?#?", $cada_campo); $nmgp_tab_label[$parte_campo[0]] = $parte_campo[1]; } } if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq']) && count($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq']) < 4) { $lin_obj .= "
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridTabelaTd . "\" valign=\"top\"> \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida(" css_scGridToolbar . "\" style=\"padding: 0px; border-spacing: 0px; border-width: 0px; vertical-align: top;\" width=\"100%\" valign=\"top\">\r\n"); $nm_saida->saida(" css_scGridToolbarPadd . "_tr\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridToolbarPadd . "\" nowrap valign=\"middle\" align=\"left\" width=\"33%\"> \r\n"); if (!$this->Ini->SC_Link_View && $this->nmgp_botoes['new'] == "on" && $this->nmgp_botoes['insert'] == "on" && !$this->grid_emb_form) { if ($this->grid_emb_form_full) { $_SESSION['sc_session'][$this->Ini->sc_page]['form_empresa']['lig_iframe_modal'] = "nmsc_iframe_liga_grid_empresa"; } $Sc_parent = ($this->grid_emb_form_full) ? "S" : ""; if (isset($this->Ini->sc_lig_md5["form_empresa"]) && $this->Ini->sc_lig_md5["form_empresa"] == "S") { $Parms_Lig = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_cancel_insert_new*scin1*scoutNM_cancel_return_new*scin1*scoutnmgp_opcao*scinnovo*scoutNM_btn_insert*scinS*scoutNM_btn_new*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scout"; $Md5_Lig = "@SC_par@" . NM_encode_input($this->Ini->sc_page) . "@SC_par@grid_empresa@SC_par@" . md5($Parms_Lig); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'][md5($Parms_Lig)] = $Parms_Lig; } else { $Md5_Lig = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_cancel_insert_new*scin1*scoutNM_cancel_return_new*scin1*scoutnmgp_opcao*scinnovo*scoutNM_btn_insert*scinS*scoutNM_btn_new*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scout"; } $this->nm_btn_exist['new'][] = "sc_b_new_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bnovo", "nm_gp_submit1('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Lig', '_self', 'form_empresa'); return false;;", "nm_gp_submit1('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Lig', '_self', 'form_empresa'); return false;;", "sc_b_new_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if (!$this->Ini->SC_Link_View && $this->nmgp_botoes['qsearch'] == "on" && !$this->NM_hidden_filters) { $nm_saida->saida(" \r\n"); $OPC_cmp = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0] : ""; $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][1] : ""; $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2] : ""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setVar'][] = array('var' => 'change_fast_top', 'value' => ""); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_cmp)) { $OPC_cmp = NM_conv_charset($OPC_cmp, $_SESSION['scriptcase']['charset'], "UTF-8"); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_arg)) { $OPC_arg = NM_conv_charset($OPC_arg, $_SESSION['scriptcase']['charset'], "UTF-8"); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_dat)) { $OPC_dat = NM_conv_charset($OPC_dat, $_SESSION['scriptcase']['charset'], "UTF-8"); } $stateSearchIconClose = 'none'; $stateSearchIconSearch = ''; if(!empty($OPC_dat)) { $stateSearchIconClose = ''; $stateSearchIconSearch = 'none'; } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" css_css_toolbar_obj . "\" style='position: relative; display: inline-block; vertical-align: inherit;'>\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" css_css_toolbar_obj . "_text\" style=\"border-width: 0px;\" name=\"nmgp_arg_fast_search\" value=\"" . NM_encode_input($OPC_dat) . "\" size=\"20\" onChange=\"change_fast_top = 'CH';\" alt=\"{maxLength: 255}\" placeholder=\"" . $this->Ini->Nm_lang['lang_othr_qk_watermark'] . "\"> \r\n"); $nm_saida->saida(" Ini->path_botoes . "/" . $this->Ini->Img_qs_search . "\" onclick=\"nm_gp_submit_qsearch('top');\">\r\n"); $nm_saida->saida(" Ini->path_botoes . "/" . $this->Ini->Img_qs_clean . "\" onclick=\"document.getElementById('SC_fast_search_top').value = '__Clear_Fast__'; nm_gp_submit_qsearch('top');\">\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" "); $NM_btn = true; } if ($this->nmgp_botoes['reload'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "breload", "nm_gp_submit_ajax ('igual', 'breload');", "nm_gp_submit_ajax ('igual', 'breload');", "reload_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } $nm_saida->saida(" css_scGridToolbarPadd . "\" nowrap valign=\"middle\" align=\"center\" width=\"33%\"> \r\n"); if ($this->nmgp_botoes['sel_col'] == "on" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq'] && empty($this->nm_grid_sem_reg) && !$this->grid_emb_form) { $pos_path = strrpos($this->Ini->path_prod, "/"); $path_fields = $this->Ini->root . substr($this->Ini->path_prod, 0, $pos_path) . "/conf/fields/"; $this->nm_btn_exist['sel_col'][] = "selcmp_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcolumns", "scBtnSelCamposShow('" . $this->Ini->path_link . "grid_empresa/grid_empresa_sel_campos.php?path_img=" . $this->Ini->path_img_global . "&path_btn=" . $this->Ini->path_botoes . "&path_fields=" . $path_fields . "&script_case_init=" . NM_encode_input($this->Ini->sc_page) . "&embbed_groupby=Y&toolbar_pos=top', 'top');", "scBtnSelCamposShow('" . $this->Ini->path_link . "grid_empresa/grid_empresa_sel_campos.php?path_img=" . $this->Ini->path_img_global . "&path_btn=" . $this->Ini->path_botoes . "&path_fields=" . $path_fields . "&script_case_init=" . NM_encode_input($this->Ini->sc_page) . "&embbed_groupby=Y&toolbar_pos=top', 'top');", "selcmp_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if (!$this->Ini->SC_Link_View && $this->nmgp_botoes['filter'] == "on" && !$this->grid_emb_form && !$this->NM_hidden_filters) { $this->nm_btn_exist['filter'][] = "pesq_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bpesquisa", "", "", "pesq_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "thickbox", "" . $this->Ini->path_link . "grid_empresa/grid_empresa.php?script_case_init=" . NM_encode_input($this->Ini->sc_page) . "&nmgp_opcao=busca&nmgp_orig_pesq=grid&KeepThis=true&TB_iframe=true&height=0&width=0&modal=true", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if ($this->nmgp_botoes['xls'] == "on" && !$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq'] && empty($this->nm_grid_sem_reg) && !$this->grid_emb_form) { $Tem_xls_res = "n"; $this->nm_btn_exist['xls'][] = "xls_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bexcel", "", "", "xls_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "thickbox", "" . $this->Ini->path_link . "grid_empresa/grid_empresa_config_xls.php?script_case_init=" . $this->Ini->sc_page . "&app_name=grid_empresa&nm_tp_xls=xlsx&nm_tot_xls=S&nm_res_cons=" . $Tem_xls_res . "&nm_ini_xls_res=grid&nm_all_modules=grid&password=n&summary_export_columns=S&origem=cons&language=pt_br&KeepThis=true&TB_iframe=true&modal=true", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } $nm_saida->saida(" css_scGridToolbarPadd . "\" nowrap valign=\"middle\" align=\"right\" width=\"33%\"> \r\n"); if ($this->nmgp_botoes['rows'] == "on" && empty($this->nm_grid_sem_reg)) { $nm_sumario = "[" . $this->Ini->Nm_lang['lang_othr_smry_info'] . "]"; $nm_sumario = str_replace("?start?", $this->nmgp_reg_inicial, $nm_sumario); if ($this->Ini->Apl_paginacao == "FULL") { $nm_sumario = str_replace("?final?", "".$this->count_ger."", $nm_sumario); } else { $nm_sumario = str_replace("?final?", "".$this->nmgp_reg_final."", $nm_sumario); } $nm_sumario = str_replace("?total?", "".$this->count_ger."", $nm_sumario); $nm_saida->saida(" css_css_toolbar_obj . "\" style=\"border:0px;\">" . $nm_sumario . "\r\n"); $NM_btn = true; } if (empty($this->nm_grid_sem_reg) && $this->nmgp_botoes['qtline'] == "on" && $this->Ini->Apl_paginacao != "FULL") { $nm_saida->saida(" css_css_toolbar_obj . "\" style=\"border: 0px;vertical-align: middle;\">" . $this->Ini->Nm_lang['lang_btns_rows'] . "\r\n"); $nm_saida->saida(" \r\n"); $NM_btn = true; } if ($this->nmgp_botoes['first'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['first'][] = "first_top"; if ($this->Rec_ini == 0) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_inicio", "nm_gp_submit_rec('ini');", "nm_gp_submit_rec('ini');", "first_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "disabled", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_inicio", "nm_gp_submit_rec('ini');", "nm_gp_submit_rec('ini');", "first_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } $NM_btn = true; } if ($this->nmgp_botoes['back'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['back'][] = "back_top"; if ($this->Rec_ini == 0) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_retorna", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "back_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "disabled", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_retorna", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "back_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } $NM_btn = true; } if ($this->nmgp_botoes['forward'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['forward'][] = "forward_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_avanca", "nm_gp_submit_rec('" . $this->Rec_fim . "');", "nm_gp_submit_rec('" . $this->Rec_fim . "');", "forward_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if ($this->nmgp_botoes['last'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['last'][] = "last_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_final", "nm_gp_submit_rec('fim');", "nm_gp_submit_rec('fim');", "last_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if (is_file("grid_empresa_help.txt") && !$this->grid_emb_form) { $Arq_WebHelp = file("grid_empresa_help.txt"); if (isset($Arq_WebHelp[0]) && !empty($Arq_WebHelp[0])) { $Arq_WebHelp[0] = str_replace("\r\n" , "", trim($Arq_WebHelp[0])); $Tmp = explode(";", $Arq_WebHelp[0]); foreach ($Tmp as $Cada_help) { $Tmp1 = explode(":", $Cada_help); if (!empty($Tmp1[0]) && isset($Tmp1[1]) && !empty($Tmp1[1]) && $Tmp1[0] == "cons" && is_file($this->Ini->root . $this->Ini->path_help . $Tmp1[1])) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bhelp", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "help_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } } } } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['b_sair'] || $this->grid_emb_form || $this->grid_emb_form_full || (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'])) { $this->nmgp_botoes['exit'] = "off"; } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $this->nm_btn_exist['exit'][] = "sai_top"; if ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='$nm_url_saida'; document.F5.submit();", "document.F5.action='$nm_url_saida'; document.F5.submit();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } elseif (!$this->Ini->Embutida_iframe && !$this->Ini->SC_Link_View && !$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bsair", "document.F5.action='$nm_url_saida'; document.F5.submit();", "document.F5.action='$nm_url_saida'; document.F5.submit();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } } elseif ($this->nmgp_botoes['exit'] == "on") { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_modal']) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "self.parent.tb_remove()", "self.parent.tb_remove()", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "window.close();", "window.close();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); } $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } $nm_saida->saida("
\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'sc_grid_toobar_top', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridTabelaTd . "\" valign=\"top\"> \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida(" css_scGridToolbar . "\" style=\"padding: 0px; border-spacing: 0px; border-width: 0px; vertical-align: top;\" width=\"100%\" valign=\"top\">\r\n"); $nm_saida->saida(" css_scGridToolbarPadd . "_tr\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridToolbarPadd . "\" nowrap valign=\"middle\" align=\"left\" width=\"33%\"> \r\n"); if (!$this->Ini->SC_Link_View && $this->nmgp_botoes['new'] == "on" && $this->nmgp_botoes['insert'] == "on" && !$this->grid_emb_form) { if ($this->grid_emb_form_full) { $_SESSION['sc_session'][$this->Ini->sc_page]['form_empresa']['lig_iframe_modal'] = "nmsc_iframe_liga_grid_empresa"; } $Sc_parent = ($this->grid_emb_form_full) ? "S" : ""; if (isset($this->Ini->sc_lig_md5["form_empresa"]) && $this->Ini->sc_lig_md5["form_empresa"] == "S") { $Parms_Lig = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_cancel_insert_new*scin1*scoutNM_cancel_return_new*scin1*scoutnmgp_opcao*scinnovo*scoutNM_btn_insert*scinS*scoutNM_btn_new*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scout"; $Md5_Lig = "@SC_par@" . NM_encode_input($this->Ini->sc_page) . "@SC_par@grid_empresa@SC_par@" . md5($Parms_Lig); $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['Lig_Md5'][md5($Parms_Lig)] = $Parms_Lig; } else { $Md5_Lig = "cod_empresa*scin" . str_replace('"', "@aspasd@", $this->cod_empresa) . "*scoutSC_glo_par_usr_login*scinusr_login*scoutNM_cancel_insert_new*scin1*scoutNM_cancel_return_new*scin1*scoutnmgp_opcao*scinnovo*scoutNM_btn_insert*scinS*scoutNM_btn_new*scinS*scoutNM_btn_update*scinS*scoutNM_btn_delete*scinS*scoutNM_btn_navega*scinN*scout"; } $this->nm_btn_exist['new'][] = "sc_b_new_top"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bnovo", "nm_gp_submit1('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Lig', '_self', 'form_empresa'); return false;;", "nm_gp_submit1('" . $this->Ini->link_form_empresa . "', '$this->nm_location', '$Md5_Lig', '_self', 'form_empresa'); return false;;", "sc_b_new_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if ($this->nmgp_botoes['reload'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "breload", "nm_gp_submit_ajax ('igual', 'breload');", "nm_gp_submit_ajax ('igual', 'breload');", "reload_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if (!$this->Ini->SC_Link_View && $this->nmgp_botoes['qsearch'] == "on" && !$this->NM_hidden_filters) { $nm_saida->saida(" \r\n"); $OPC_cmp = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0] : ""; $OPC_arg = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][1] : ""; $OPC_dat = (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'])) ? $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2] : ""; if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setVar'][] = array('var' => 'change_fast_top', 'value' => ""); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_cmp)) { $OPC_cmp = NM_conv_charset($OPC_cmp, $_SESSION['scriptcase']['charset'], "UTF-8"); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_arg)) { $OPC_arg = NM_conv_charset($OPC_arg, $_SESSION['scriptcase']['charset'], "UTF-8"); } if ($_SESSION['scriptcase']['charset'] != "UTF-8" && NM_is_utf8($OPC_dat)) { $OPC_dat = NM_conv_charset($OPC_dat, $_SESSION['scriptcase']['charset'], "UTF-8"); } $stateSearchIconClose = 'none'; $stateSearchIconSearch = ''; if(!empty($OPC_dat)) { $stateSearchIconClose = ''; $stateSearchIconSearch = 'none'; } $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" css_css_toolbar_obj . "\" style='position: relative; display: inline-block; vertical-align: inherit;'>\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" css_css_toolbar_obj . "_text\" style=\"border-width: 0px;\" name=\"nmgp_arg_fast_search\" value=\"" . NM_encode_input($OPC_dat) . "\" size=\"20\" onChange=\"change_fast_top = 'CH';\" alt=\"{maxLength: 255}\" placeholder=\"" . $this->Ini->Nm_lang['lang_othr_qk_watermark'] . "\"> \r\n"); $nm_saida->saida(" Ini->path_botoes . "/" . $this->Ini->Img_qs_search . "\" onclick=\"nm_gp_submit_qsearch('top');\">\r\n"); $nm_saida->saida(" Ini->path_botoes . "/" . $this->Ini->Img_qs_clean . "\" onclick=\"document.getElementById('SC_fast_search_top').value = '__Clear_Fast__'; nm_gp_submit_qsearch('top');\">\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" "); $NM_btn = true; } if (is_file("grid_empresa_help.txt") && !$this->grid_emb_form) { $Arq_WebHelp = file("grid_empresa_help.txt"); if (isset($Arq_WebHelp[0]) && !empty($Arq_WebHelp[0])) { $Arq_WebHelp[0] = str_replace("\r\n" , "", trim($Arq_WebHelp[0])); $Tmp = explode(";", $Arq_WebHelp[0]); foreach ($Tmp as $Cada_help) { $Tmp1 = explode(":", $Cada_help); if (!empty($Tmp1[0]) && isset($Tmp1[1]) && !empty($Tmp1[1]) && $Tmp1[0] == "cons" && is_file($this->Ini->root . $this->Ini->path_help . $Tmp1[1])) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bhelp", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "help_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } } } } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['b_sair'] || $this->grid_emb_form || $this->grid_emb_form_full || (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['dashboard_info']['under_dashboard'])) { $this->nmgp_botoes['exit'] = "off"; } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_psq']) { $this->nm_btn_exist['exit'][] = "sai_top"; if ($nm_apl_dependente == 1 && $this->nmgp_botoes['exit'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "document.F5.action='$nm_url_saida'; document.F5.submit();", "document.F5.action='$nm_url_saida'; document.F5.submit();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } elseif (!$this->Ini->Embutida_iframe && !$this->Ini->SC_Link_View && !$this->aba_iframe && $this->nmgp_botoes['exit'] == "on") { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bsair", "document.F5.action='$nm_url_saida'; document.F5.submit();", "document.F5.action='$nm_url_saida'; document.F5.submit();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } } elseif ($this->nmgp_botoes['exit'] == "on") { if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_modal']) && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['sc_modal']) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "self.parent.tb_remove()", "self.parent.tb_remove()", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bvoltar", "window.close();", "window.close();", "sai_top", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); } $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } $nm_saida->saida("
\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'sc_grid_toobar_top', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridTabelaTd . "\" valign=\"top\"> \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida(" css_scGridToolbar . "\" style=\"padding: 0px; border-spacing: 0px; border-width: 0px; vertical-align: top;\" width=\"100%\" valign=\"top\">\r\n"); $nm_saida->saida(" css_scGridToolbarPadd . "_tr\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
css_scGridToolbarPadd . "\" nowrap valign=\"middle\" align=\"left\" width=\"33%\"> \r\n"); if ($this->nmgp_botoes['first'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['first'][] = "first_bot"; if ($this->Rec_ini == 0) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_inicio", "nm_gp_submit_rec('ini');", "nm_gp_submit_rec('ini');", "first_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "disabled", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_inicio", "nm_gp_submit_rec('ini');", "nm_gp_submit_rec('ini');", "first_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } $NM_btn = true; } if ($this->nmgp_botoes['back'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['back'][] = "back_bot"; if ($this->Rec_ini == 0) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_retorna", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "back_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "disabled", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } else { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_retorna", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "nm_gp_submit_rec('" . $this->Rec_ini . "');", "back_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); } $NM_btn = true; } if ($this->nmgp_botoes['rows'] == "on" && empty($this->nm_grid_sem_reg)) { $nm_sumario = "[" . $this->Ini->Nm_lang['lang_othr_smry_info'] . "]"; $nm_sumario = str_replace("?start?", $this->nmgp_reg_inicial, $nm_sumario); if ($this->Ini->Apl_paginacao == "FULL") { $nm_sumario = str_replace("?final?", "".$this->count_ger."", $nm_sumario); } else { $nm_sumario = str_replace("?final?", "".$this->nmgp_reg_final."", $nm_sumario); } $nm_sumario = str_replace("?total?", "".$this->count_ger."", $nm_sumario); $nm_saida->saida(" css_css_toolbar_obj . "\" style=\"border:0px;\">" . $nm_sumario . "\r\n"); $NM_btn = true; } if ($this->nmgp_botoes['forward'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['forward'][] = "forward_bot"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_avanca", "nm_gp_submit_rec('" . $this->Rec_fim . "');", "nm_gp_submit_rec('" . $this->Rec_fim . "');", "forward_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if ($this->nmgp_botoes['last'] == "on" && empty($this->nm_grid_sem_reg) && $this->Ini->Apl_paginacao != "FULL" && !isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opc_liga']['nav'])) { $this->nm_btn_exist['last'][] = "last_bot"; $Cod_Btn = nmButtonOutput($this->arr_buttons, "bcons_final", "nm_gp_submit_rec('fim');", "nm_gp_submit_rec('fim');", "last_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } if (is_file("grid_empresa_help.txt") && !$this->grid_emb_form) { $Arq_WebHelp = file("grid_empresa_help.txt"); if (isset($Arq_WebHelp[0]) && !empty($Arq_WebHelp[0])) { $Arq_WebHelp[0] = str_replace("\r\n" , "", trim($Arq_WebHelp[0])); $Tmp = explode(";", $Arq_WebHelp[0]); foreach ($Tmp as $Cada_help) { $Tmp1 = explode(":", $Cada_help); if (!empty($Tmp1[0]) && isset($Tmp1[1]) && !empty($Tmp1[1]) && $Tmp1[0] == "cons" && is_file($this->Ini->root . $this->Ini->path_help . $Tmp1[1])) { $Cod_Btn = nmButtonOutput($this->arr_buttons, "bhelp", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "nm_open_popup('" . $this->Ini->path_help . $Tmp1[1] . "');", "help_bot", "", "", "", "absmiddle", "", "0px", $this->Ini->path_botoes, "", "", "", "", "", "only_text", "text_right", "", "", "", "", "", "", ""); $nm_saida->saida(" $Cod_Btn \r\n"); $NM_btn = true; } } } } $nm_saida->saida("
\r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['ajax_nav']) { $this->Ini->Arr_result['setValue'][] = array('field' => 'sc_grid_toobar_bot', 'value' => NM_charset_to_utf8($_SESSION['scriptcase']['saida_html'])); $_SESSION['scriptcase']['saida_html'] = ""; } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scAppDivMoldura . "\" style='cursor:pointer; display:none;' onclick=\"$('#id_grid_search_cmd_string').hide();$('#div_grid_search').show();\"> \r\n"); if (is_file($this->Ini->root . $this->Ini->path_img_global . '/' . $this->Ini->App_div_tree_img_exp)) { $nm_saida->saida(" Ini->path_img_global . "/" . $this->Ini->App_div_tree_img_exp . "\" border=0 align='absmiddle' class='scGridFilterTagIconExp'>\r\n"); } $nm_saida->saida(" css_scAppDivHeaderText . "\">\r\n"); $nm_saida->saida(" " . $this->Ini->Nm_lang['lang_othr_dynamicsearch_title_outside'] . "\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" css_scAppDivContentText . "\">" . NM_encode_input(trim($this->grid_search_str)) . "\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
css_scAppDivMoldura . " scGridFilterTag\" style='display:;'> \r\n"); if (is_file($this->Ini->root . $this->Ini->path_img_global . '/' . $this->Ini->App_div_tree_img_col)) { $nm_saida->saida(" Ini->path_img_global . "/" . $this->Ini->App_div_tree_img_col . "\" border=0 align='absmiddle' style='vertical-align: middle; margin-right:4px;'>\r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); if (isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq']) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'] as $cmp => $def) { if (isset($def['label'])) { $this->grid_search_seq++; $lin_obj = $this->grid_search_tag_ini($cmp, $def, $this->grid_search_seq); $nm_saida->saida("" . $lin_obj . "\r\n"); if ($cmp == "nome_empresa") { $this->grid_search_dat[$this->grid_search_seq] = "nome_empresa"; $lin_obj = $this->grid_search_nome_empresa($this->grid_search_seq, 'N', $def['opc'], $def['val'], $def['label']); $nm_saida->saida("" . $lin_obj . "\r\n"); } if ($cmp == "cnpj_empresa") { $this->grid_search_dat[$this->grid_search_seq] = "cnpj_empresa"; $lin_obj = $this->grid_search_cnpj_empresa($this->grid_search_seq, 'N', $def['opc'], $def['val'], $def['label']); $nm_saida->saida("" . $lin_obj . "\r\n"); } if ($cmp == "uf_empresa") { $this->grid_search_dat[$this->grid_search_seq] = "uf_empresa"; $lin_obj = $this->grid_search_uf_empresa($this->grid_search_seq, 'N', $def['opc'], $def['val'], $def['label']); $nm_saida->saida("" . $lin_obj . "\r\n"); } if ($cmp == "municipio_empresa") { $this->grid_search_dat[$this->grid_search_seq] = "municipio_empresa"; $lin_obj = $this->grid_search_municipio_empresa($this->grid_search_seq, 'N', $def['opc'], $def['val'], $def['label']); $nm_saida->saida("" . $lin_obj . "\r\n"); } $lin_obj = $this->grid_search_tag_end(); $nm_saida->saida("" . $lin_obj . "\r\n"); } } } $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); if ($_SESSION['scriptcase']['proc_mobile']) { $this->NM_fil_ant = $this->gera_array_filtros(); $strDisplayFilter = (empty($this->NM_fil_ant))?'none':''; $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
"; foreach ($All_cmp_search as $cada_cmp) { if (!isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['grid_pesq'][$cada_cmp])) { $lin_obj .= " "; $lin_obj .= " "; $lin_obj .= " "; } } $lin_obj .= "
"; $lin_obj .= "
"; $lin_obj .= " " . $nmgp_tab_label[$cada_cmp] . ""; $lin_obj .= "
"; $lin_obj .= "
"; } return $lin_obj; } function grid_search_nome_empresa($ind, $ajax, $opc="", $val=array(), $label='') { $lin_obj = ""; $lin_obj .= " "; return $lin_obj; } function grid_search_cnpj_empresa($ind, $ajax, $opc="", $val=array(), $label='') { $lin_obj = ""; $lin_obj .= " "; return $lin_obj; } function grid_search_uf_empresa($ind, $ajax, $opc="", $val=array(), $label='') { $lin_obj = ""; $lin_obj .= " "; return $lin_obj; } function grid_search_municipio_empresa($ind, $ajax, $opc="", $val=array(), $label='') { $lin_obj = ""; $lin_obj .= " "; return $lin_obj; } function lookup_ajax_nome_empresa($nome_empresa) { $nome_empresa = substr($this->Db->qstr($nome_empresa), 1, -1); $this->NM_case_insensitive = false; $nome_empresa_look = (is_string($nome_empresa) ? substr($this->Db->qstr($nome_empresa), 1, -1) : $nome_empresa); $nmgp_def_dados = array(); $nm_comando = "select distinct nome_empresa from " . $this->Ini->nm_tabela . " where nome_empresa like '%" . $nome_empresa . "%' order by nome_empresa"; $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; if ($rs = $this->Db->SelectLimit($nm_comando, 10, 0)) { while (!$rs->EOF) { $cmp1 = NM_charset_to_utf8(trim($rs->fields[0])); $cmp1 = grid_empresa_pack_protect_string($cmp1); $nmgp_def_dados[] = array($cmp1 => $cmp1); $rs->MoveNext(); } $rs->Close(); return $nmgp_def_dados; } else { echo $this->Db->ErrorMsg(); } } function lookup_ajax_cnpj_empresa($cnpj_empresa) { $cnpj_empresa = substr($this->Db->qstr($cnpj_empresa), 1, -1); $this->NM_case_insensitive = false; $cnpj_empresa_look = (is_string($cnpj_empresa) ? substr($this->Db->qstr($cnpj_empresa), 1, -1) : $cnpj_empresa); $nmgp_def_dados = array(); $nm_comando = "select distinct cnpj_empresa from " . $this->Ini->nm_tabela . " where cnpj_empresa like '%" . $cnpj_empresa . "%' order by cnpj_empresa"; $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; if ($rs = $this->Db->SelectLimit($nm_comando, 10, 0)) { while (!$rs->EOF) { $cmp1 = NM_charset_to_utf8(trim($rs->fields[0])); $cmp1 = grid_empresa_pack_protect_string($cmp1); $nmgp_def_dados[] = array($cmp1 => $cmp1); $rs->MoveNext(); } $rs->Close(); return $nmgp_def_dados; } else { echo $this->Db->ErrorMsg(); } } function lookup_ajax_uf_empresa($uf_empresa) { $uf_empresa = substr($this->Db->qstr($uf_empresa), 1, -1); $this->NM_case_insensitive = false; $uf_empresa_look = (is_string($uf_empresa) ? substr($this->Db->qstr($uf_empresa), 1, -1) : $uf_empresa); $nmgp_def_dados = array(); $nm_comando = "select distinct uf_empresa from " . $this->Ini->nm_tabela . " where uf_empresa like '%" . $uf_empresa . "%' order by uf_empresa"; $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; if ($rs = $this->Db->SelectLimit($nm_comando, 10, 0)) { while (!$rs->EOF) { $cmp1 = NM_charset_to_utf8(trim($rs->fields[0])); $cmp1 = grid_empresa_pack_protect_string($cmp1); $nmgp_def_dados[] = array($cmp1 => $cmp1); $rs->MoveNext(); } $rs->Close(); return $nmgp_def_dados; } else { echo $this->Db->ErrorMsg(); } } function lookup_ajax_municipio_empresa($municipio_empresa) { $municipio_empresa = substr($this->Db->qstr($municipio_empresa), 1, -1); $this->NM_case_insensitive = false; $municipio_empresa_look = (is_string($municipio_empresa) ? substr($this->Db->qstr($municipio_empresa), 1, -1) : $municipio_empresa); $nmgp_def_dados = array(); $nm_comando = "select distinct municipio_empresa from " . $this->Ini->nm_tabela . " where municipio_empresa like '%" . $municipio_empresa . "%' order by municipio_empresa"; $_SESSION['scriptcase']['sc_sql_ult_comando'] = $nm_comando; $_SESSION['scriptcase']['sc_sql_ult_conexao'] = ''; if ($rs = $this->Db->SelectLimit($nm_comando, 10, 0)) { while (!$rs->EOF) { $cmp1 = NM_charset_to_utf8(trim($rs->fields[0])); $cmp1 = grid_empresa_pack_protect_string($cmp1); $nmgp_def_dados[] = array($cmp1 => $cmp1); $rs->MoveNext(); } $rs->Close(); return $nmgp_def_dados; } else { echo $this->Db->ErrorMsg(); } } function gera_array_filtros() { $this->NM_fil_ant = array(); $pos_path = strrpos($this->Ini->path_prod, "/"); $this->NM_path_filter = $this->Ini->root . substr($this->Ini->path_prod, 0, $pos_path) . "/conf/filters/"; $NM_patch = "ISO_ODONTO/grid_empresa"; if (is_dir($this->NM_path_filter . $NM_patch)) { $NM_dir = @opendir($this->NM_path_filter . $NM_patch); while (FALSE !== ($NM_arq = @readdir($NM_dir))) { if (@is_file($this->NM_path_filter . $NM_patch . "/" . $NM_arq)) { $Sc_v6 = false; $NMcmp_filter = file($this->NM_path_filter . $NM_patch . "/" . $NM_arq); $NMcmp_filter = explode("@NMF@", $NMcmp_filter[0]); if (substr($NMcmp_filter[0], 0, 6) == "SC_V6_" || substr($NMcmp_filter[0], 0, 6) == "SC_V8_") { $Name_filter = substr($NMcmp_filter[0], 6); if (!empty($Name_filter)) { $this->NM_fil_ant[$NM_arq][0] = $NM_patch . "/" . $NM_arq; $this->NM_fil_ant[$NM_arq][1] = "" . $this->Ini->Nm_lang['lang_srch_public'] . ""; $Sc_v6 = true; } } if (!$Sc_v6) { $this->NM_fil_ant[$NM_arq][0] = $NM_arq; $this->NM_fil_ant[$NM_arq][1] = "" . $this->Ini->Nm_lang['lang_srch_public'] . ""; } $this->NM_fil_ant[$NM_arq][2] = $Name_filter; } } } return $this->NM_fil_ant; } function JS_grid_search() { global $nm_saida; $nm_saida->saida(" \r\n"); } function getFieldHighlight($filter_type, $field, $str_value, $str_value_original='') { $str_html_ini = '
'; $str_html_fim = '
'; if($filter_type == 'advanced_search') { if ( isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ]) && isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond" ]) && !empty($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ]) && ( $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'qp' || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'eq' || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'ii' ) ) { if($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'qp') { if(is_array($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ] as $ind => $vals) { if(strcasecmp($vals, $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(strcasecmp($vals, $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } else { $keywords = preg_quote($vals, '/'); $str_value = preg_replace('/'. $keywords .'/i', $str_html_ini . '$0' . $str_html_fim, $str_value); } } } else { if(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } else { $keywords = preg_quote($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], '/'); $str_value = preg_replace('/'. $keywords .'/i', $str_html_ini . '$0' . $str_html_fim, $str_value); } } } elseif($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'eq') { if(is_array($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ] as $ind => $vals) { if(strcasecmp($vals, $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(strcasecmp($vals, $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } } } else { if(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } } } elseif($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field . "_cond"] == 'ii') { if(is_array($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ])) { foreach ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ] as $ind => $vals) { if(strcasecmp($vals, substr($str_value, 0, strlen($vals))) == 0) { $str_value = $str_html_ini. substr($str_value, 0, strlen($vals)) .$str_html_fim . substr($str_value, strlen($vals)); } } } else { if(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ], substr($str_value, 0, strlen($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ]))) == 0) { $str_value = $str_html_ini. substr($str_value, 0, strlen($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ])) .$str_html_fim . substr($str_value, strlen($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['campos_busca'][ $field ])); } } } } } elseif($filter_type == 'quicksearch') { if( isset($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0]) && ( ( $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0] == 'SC_all_Cmp' && in_array($field, array('cod_empresa', 'nome_empresa', 'cnpj_empresa', 'municipio_empresa', 'uf_empresa', 'obs_empresa', 'criado_data_empresa', 'criado_user_empresa')) ) || $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0] == $field || strpos($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0], $field . '_VLS_') !== false || strpos($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][0], '_VLS_' . $field) !== false ) ) { if($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][1] == 'qp') { if(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2], $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(!empty($str_value_original) && $str_value_original != ' ' && strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2], $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } else { $keywords = preg_quote($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2], '/'); $str_value = preg_replace('/'. $keywords .'/i', $str_html_ini . '$0' . $str_html_fim, $str_value); } } elseif($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][1] == 'eq') { if(strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2], $str_value) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } elseif(!empty($str_value_original) && $str_value_original != ' ' && strcasecmp($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['fast_search'][2], $str_value_original) == 0) { $str_value = $str_html_ini. $str_value .$str_html_fim; } } } } return $str_value; } function nm_gera_mask(&$nm_campo, $nm_mask) { $trab_campo = $nm_campo; $trab_mask = $nm_mask; $tam_campo = strlen($nm_campo); $trab_saida = ""; $str_highlight_ini = ""; $str_highlight_fim = ""; if(substr($nm_campo, 0, 23) == '
' && substr($nm_campo, -6) == '
') { $str_highlight_ini = substr($nm_campo, 0, 23); $str_highlight_fim = substr($nm_campo, -6); $trab_campo = substr($nm_campo, 23, -6); $tam_campo = strlen($trab_campo); } $mask_num = false; for ($x=0; $x < strlen($trab_mask); $x++) { if (substr($trab_mask, $x, 1) == "#") { $mask_num = true; break; } } if ($mask_num ) { $ver_duas = explode(";", $trab_mask); if (isset($ver_duas[1]) && !empty($ver_duas[1])) { $cont1 = count(explode("#", $ver_duas[0])) - 1; $cont2 = count(explode("#", $ver_duas[1])) - 1; if ($tam_campo >= $cont2) { $trab_mask = $ver_duas[1]; } else { $trab_mask = $ver_duas[0]; } } $tam_mask = strlen($trab_mask); $xdados = 0; for ($x=0; $x < $tam_mask; $x++) { if (substr($trab_mask, $x, 1) == "#" && $xdados < $tam_campo) { $trab_saida .= substr($trab_campo, $xdados, 1); $xdados++; } elseif ($xdados < $tam_campo) { $trab_saida .= substr($trab_mask, $x, 1); } } if ($xdados < $tam_campo) { $trab_saida .= substr($trab_campo, $xdados); } $nm_campo = $str_highlight_ini . $trab_saida . $str_highlight_ini; return; } for ($ix = strlen($trab_mask); $ix > 0; $ix--) { $char_mask = substr($trab_mask, $ix - 1, 1); if ($char_mask != "x" && $char_mask != "z") { $trab_saida = $char_mask . $trab_saida; } else { if ($tam_campo != 0) { $trab_saida = substr($trab_campo, $tam_campo - 1, 1) . $trab_saida; $tam_campo--; } else { $trab_saida = "0" . $trab_saida; } } } if ($tam_campo != 0) { $trab_saida = substr($trab_campo, 0, $tam_campo) . $trab_saida; $trab_mask = str_repeat("z", $tam_campo) . $trab_mask; } $iz = 0; for ($ix = 0; $ix < strlen($trab_mask); $ix++) { $char_mask = substr($trab_mask, $ix, 1); if ($char_mask != "x" && $char_mask != "z") { if ($char_mask == "." || $char_mask == ",") { $trab_saida = substr($trab_saida, 0, $iz) . substr($trab_saida, $iz + 1); } else { $iz++; } } elseif ($char_mask == "x" || substr($trab_saida, $iz, 1) != "0") { $ix = strlen($trab_mask) + 1; } else { $trab_saida = substr($trab_saida, 0, $iz) . substr($trab_saida, $iz + 1); } } $nm_campo = $str_highlight_ini . $trab_saida . $str_highlight_ini; } function check_btns() { } function nm_fim_grid($flag_apaga_pdf_log = TRUE) { global $nm_saida, $nm_url_saida, $NMSC_modal; if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && isset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css'])) { unset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css']); unset($_SESSION['sc_session'][$this->Ini->sc_page]['SC_sub_css_bw']); } if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida']) { return; } if (!$_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['embutida'] && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "pdf" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] != "print" && $_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao_print'] != "print" && !$this->Print_All) { $nm_saida->saida("
css_scGridTabelaTd . "\" style=\"vertical-align: top\"> \r\n"); if (!$_SESSION['scriptcase']['proc_mobile']) { $nm_saida->saida(" \r\n"); } $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); if ($_SESSION['sc_session'][$this->Ini->sc_page]['grid_empresa']['opcao'] == "pdf" || $this->Print_All) { $nm_saida->saida(" \r\n"); return; } $nm_saida->saida(" \r\n"); if ($this->grid_emb_form || $this->grid_emb_form_full) { $nm_saida->saida(" \r\n"); } $nm_saida->saida(" \r\n"); } //--- //--- function form_navegacao() { global $nm_saida, $nm_url_saida; $str_pbfile = $this->Ini->root . $this->Ini->path_imag_temp . '/sc_pb_' . session_id() . '.tmp'; $nm_saida->saida("
saida(" action=\"./\" \r\n"); $nm_saida->saida(" target=\"_self\" style=\"display: none\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
saida(" action=\"./\" \r\n"); $nm_saida->saida(" target=\"_self\" style=\"display: none\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
saida(" action=\"grid_empresa_pesq.class.php\" \r\n"); $nm_saida->saida(" target=\"_self\" style=\"display: none\"> \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
saida(" action=\"./\" \r\n"); $nm_saida->saida(" target=\"_self\" style=\"display: none\"> \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
saida(" action=\"./\" \r\n"); $nm_saida->saida(" target=\"_self\" style=\"display: none\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
saida(" action=\"./\" \r\n"); $nm_saida->saida(" target=\"_self\"> \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" Ini->sc_page) . "\"/> \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida(" \r\n"); $nm_saida->saida("
\r\n"); $nm_saida->saida(" \r\n"); } function css_form() { $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'on'; $aux = " "; return $aux; $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'off'; } function css_grid() { $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'on'; $aux = " "; return $aux; $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'off'; } function css_filter() { $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'on'; $aux = " "; return $aux; $_SESSION['scriptcase']['grid_empresa']['contr_erro'] = 'off'; } } ?>