public function handle() { $vl = knl_view_Loader::getInstance(); $menu = knl_lib_perm_Menu::getInstance()->montaMenu(); $vl->setVar("menu", $menu); $vl->display("index"); }
public function monta_Add($view, $nomespace, array $arrValues) { $nome = str_replace(" ", "", $nomespace); $vl = knl_view_Loader::getInstance(); $id_ini = 1; $delHtml = "<a onclick=\"del_div{$nome}(***);\">Del</a>"; $this->FormEditHtml[$nome] = "<div id=\"div_add{$nome}\">"; foreach ($arrValues as $v) { $vl->setVar("recursos", $v); $delHtmlDiv = str_replace("***", "'{$id_ini}'", $delHtml); $this->FormEditHtml[$nome] .= "<div id=\"div_add{$nome}{$id_ini}\">" . $vl->display($view, false, true) . $delHtmlDiv . "</div>\n\n"; $id_ini++; } $vl->setVar("recursos", "x"); $delHtmlDiv = str_replace("***", "'{$id_ini}'", $delHtml); $this->FormEditHtml[$nome] .= "<div id=\"div_add{$nome}{$id_ini}\">" . $vl->display($view, false, true) . $delHtmlDiv . "</div>\n\n"; $id_ini++; $html = $vl->display($view, false, true); $html = str_replace("\"", "\\\"", $html); $stringlimpa = $html; $stringlimpa = str_replace("\n", " ", $stringlimpa); $stringlimpa = str_replace("\v", " ", $stringlimpa); $stringlimpa = str_replace("\f", " ", $stringlimpa); $stringlimpa = str_replace("\r", " ", $stringlimpa); $stringlimpa = str_replace("", " ", $stringlimpa); $html = $stringlimpa; $del = str_replace("\"", "\\\"", $delHtml); $del = str_replace("***", "\"+id{$nome} +\"", $del); $this->FormEditJs .= "\n<script>\nvar id{$nome} = {$id_ini};\n\nfunction del_div{$nome} (id) {\n filho = document.getElementById('div_add{$nome}' + id);\n\tdocument.getElementById('div_add{$nome}').removeChild(filho);\n}\n\nfunction add_div{$nome} () {\n\tvar html = \"{$html}\";\n var del = \"{$del}\";\n var div_add = document.createElement('div');\n div_add.setAttribute('id','div_add{$nome}' + id{$nome});\n\tdocument.getElementById('div_add{$nome}').appendChild(div_add);\n\tdocument.getElementById('div_add{$nome}' + id{$nome}).innerHTML = html + del ;\n\treturn id{$nome}++;\n}\n</script>"; $this->FormEditHtml[$nome] .= "</div>\n\n"; $this->FormEditBtn[$nome] = "<input type=\"button\" onclick=\"add_div{$nome}();\" value=\"{$nomespace}\">\n\n"; }
public static function getInstance() { if (!isset(self::$instance)) { self::$instance = new self(); } return self::$instance; }
public function monta_DocTipoDiv($tipos) { $vl = knl_view_Loader::getInstance(); $this->DocTipoDiv = ""; foreach ($tipos as $v) { $this->DocTipoDiv .= $vl->display($v->get_classe() . "/formfind", false, true); } }
public function monta_Desanexar($actions, $id, $anexoTop) { if (key_exists("desanexar", $actions)) { $vl = knl_view_Loader::getInstance(); $vl->setVar("anexoTop", $anexoTop); $vl->setVar("id", $id); $this->BtnDesanexar = $vl->display('show/BtnDesanexar', false); } }
public function FornFindChar() { $request = knl_lib_Registry::getRequestObj(); $str_parte = $request->getGet('nome'); $cotacao_cli = knl_extensions_cadastronf_cotDao::getInstance()->selectByParteNome($str_parte); $vl = knl_view_Loader::getInstance(); $vl->setVar("cotacao_cli", $cotacao_cli); $vl->display("cadastronf/CotVwAjx", true, true); }
public function monta_PendBtn($pendencias) { $vl = knl_view_Loader::getInstance(); $PendTipo = knl_dao_doc_pendencia_tipo::getInstance(); $this->PendBtnHtml = ""; foreach ($pendencias as $p) { $mPendTipo = $PendTipo->selectById($p->get_id_doc_pendencia_tipo()); $this->PendBtnHtml .= $vl->display("pendlist/Btn" . $mPendTipo->get_descricao(), false); } }
public function monta_DesanexaBtn($arrayFull) { $this->DesanexaBtn = "X"; if (key_exists("desanexar", $arrayFull['docActions'])) { $vl = knl_view_Loader::getInstance(); $vl->setVar("anexoTop", $arrayFull['anexoTop']); $vl->setVar("id", $arrayFull['doc']->get_id()); $this->DesanexaBtn = "<center>" . $vl->display('show/BtnDesanexar', false) . "</center>"; } }
public function mostraEmpresas() { $session = knl_lib_Registry::getSession(); $Empresas = knl_dao_empresa::getInstance(); $lista = $Empresas->selectAll(); $vl = knl_view_Loader::getInstance(); $vl->setVar("lista", $lista); $vl->setVar("empresa_ativa", $Empresas->selectById($session->get_id_empresa())); $vl->display("EmpresaList"); }
public function lstdepto() { $request = knl_lib_Registry::getRequestObj()->getInstance(); $usuario = knl_dao_knl_usuario::getInstance()->selectById($request->GetGet("id_usu")); $Deptos = knl_dao_knl_depto::getInstance(); $arrayDpto = $Deptos->selectAll(); $vl = knl_view_Loader::getInstance(); $vl->setVar("deptos", $arrayDpto); $vl->setVar("usuario", $usuario); $vl->display("UserDepto"); }
public function formadd() { $dDocTp = knl_dao_doc_tipo::getInstance(); $lstDocTp = $dDocTp->selectAll(); $dGrupo = knl_dao_knl_grupo::getInstance(); $lstGrupo = $dGrupo->selectAll(); $vl = knl_view_Loader::getInstance(); $vl->setVar("doctipo", $lstDocTp); $vl->setVar("grupos", $lstGrupo); $vl->display("DocTipoCredForm"); }
public function formadd() { $dPendTipo = knl_dao_doc_pendencia_tipo::getInstance(); $array_PendTp = $dPendTipo->selectAll(); $array_DocSubTp = knl_dao_doc_sub_tipo::getInstance()->selectAll(); $array_grupos = knl_dao_knl_grupo::getInstance()->selectAll(); $vl = knl_view_Loader::getInstance(); $vl->setVar("pendtipo", $array_PendTp); $vl->setVar("docsubtipo", $array_DocSubTp); $vl->setVar("grupos", $array_grupos); $vl->display("RegraPendForm"); }
public function monta_FormsSpec($tipos) { $vl = knl_view_Loader::getInstance(); $js_show = ""; foreach ($tipos as $v) { $this->FormSpec .= ""; $js_show .= "\t\tcase '" . $v->get_id() . "':\n"; $js_show .= ' $("#' . $v->get_classe() . '").clone().appendTo("#formpp");'; $js_show .= "\t\tbreak;\n"; } $this->FormsSpec .= ' <script> function mostraFormpp(formppName){ $("#formpp > div").remove(); switch(formppName){ ' . $js_show . ' } } </script> '; }
public function monta_Cabecalho($cabecalho) { $vl = knl_view_Loader::getInstance(); $this->Cabecalho .= $vl->display("newanexo/" . $cabecalho[0]->get_classe(), false); }
public function MailSend() { $request = knl_lib_Registry::getRequestObj(); $DocShow = knl_lib_doc_DocShow::getInstance(); $doc = $DocShow->getDocumento($request->getPost('doc_id')); $cabecalho = $DocShow->getDocumentoFull($doc); knl_lib_doc_DocMail::getInstance()->enviaMail($doc, $request->getPost("destinatario"), $request->getPost("corpo")); $vl = knl_view_Loader::getInstance(); $vl->setVar("doc", $doc); $vl->setVar("cabecalho", $cabecalho); $vl->display("MailSend"); }
public function monta_Cabecalho($cabecalho) { $vl = knl_view_Loader::getInstance(); $this->Cabecalho = $vl->display("" . $cabecalho['docTipo']->get_classe() . "/cabshow", false, true); }
public function formLogin() { $vh = knl_view_Loader::getInstance(); $vh->display("formlogin"); }
public function monta_FormSpec($cabecalho) { $vl = knl_view_Loader::getInstance(); $this->FormSpec .= $vl->display($cabecalho['docTipo']->get_classe() . "/formedit", false, true); }
public function ExtNewForm() { $vl = knl_view_Loader::getInstance(); $vl->display("ExtensionNewForm"); }
<?php $helperFormEdit = knl_view_w3c_hlp_FormEdit::getInstance(); $pedvenda = $knl_helper->getVar('cabecalho'); $fornecedor = $pedvenda['dpedvendaFull']['forn']; $knl_helper->setVar("head", "<script type=\"text/javascript\" src=\"./extensions/cadastronf/cadcnpj.js\"></script>\n"); $helperFormEdit->monta_Add('dpedvenda/formAddDataEntrega', 'Add', $pedvenda['dpedvendaFull']['dataentrega']); ?> <td valign="top" align="right">Data entrega:<br><?php echo $helperFormEdit->html_btn_Add('Add'); ?> </td><td valign="top"><?php echo $helperFormEdit->html_Add('Add'); ?> </td> <?php $vl = knl_view_Loader::getInstance(); $vl->setVar('fornecedor', $fornecedor); $vl->setVar('cnpj', $fornecedor->get_cnpj()); echo $vl->display('cadastronf/cadeditcnpjform', false, true); echo $vl->display("cadastronf/cadeditform", false, true);
public function formadd() { $vl = knl_view_Loader::getInstance(); //$vl->setVar("deptos",$lstDpto); $vl->display("DeptoForm"); }