if ($usu->ativo == "0") { $tpl->checknao = "checked='checked'"; $tpl->checksim = ""; } if (strlen($usu->foto) > 0) { $tpl->IMG_USER = "******" . $usu->foto . "' class='file-preview-image' alt='imagem do usuário' title='imagem do usuário''>"; } } $rsPerfil = $perfil->getRows(0, 999, array("id" => "asc"), array("empresa" => "=" . EMPRESA)); foreach ($rsPerfil as $key => $p) { $tpl->idItem = $p->id; $tpl->labelItem = $p->descricao; if ($p->id == $idPerfilUsu) { $tpl->checkItem = "selected"; } else { $tpl->checkItem = ""; } $tpl->block("BLOCK_ITEM"); } $rsUnidade = $unidade->getRows(0, 999, array("descricao" => "asc"), array("empresa" => "=" . EMPRESA)); foreach ($rsUnidade as $key => $p) { $tpl->idItem = $p->id; $tpl->labelItem = $p->descricao; if ($p->id == $idUnidadeUsu) { $tpl->checkItem = "selected"; } else { $tpl->checkItem = ""; } $tpl->block("BLOCK_ITEM_UNIDADE"); } $tpl->show();
<?php $tpl = new Template("view/templates/blank_page.html"); $tpl->addFile("CONTENT", "view/index/registro.html"); $tpl->addFile("INC_LATERAL_DIREITA", "view/includes/lateral_direita.html"); include "includes/montaEmpresa.php"; include "includes/formLogin.php"; include "includes/mensagem.php"; $unidade = new Unidade(); $rs = $unidade->getRows(); foreach ($rs as $key => $uni) { $tpl->LABEL_UNIDADE_CAD = $uni->descricao; $tpl->block("BLOCK_UNIDADE_CADASTRO"); } $tpl->show();