Beispiel #1
0
 public function telaAltUser($users)
 {
     $cv = new View\ControleVisao();
     $index = $cv->getSidebar();
     $t = new Util\MiniTemplator();
     $t->readTemplateFromFile("Html" . DS . "templates" . DS . "alterUser.html");
     $saida = null;
     foreach ($users as $temp) {
         $cell = new Util\MiniTemplator();
         $cell->readTemplateFromFile("Html" . DS . "templates" . DS . "celluser.html");
         $cell->setVariable("id", $temp->getId());
         $cell->setVariable("nome", $temp->getNome());
         $cell->setVariable("email", $temp->getEmail());
         $cell->setVariable("tel", $temp->getTelefone());
         if ($temp->getAtivo()) {
             $cell->setVariable("ativo", "unlock");
         } else {
             $cell->setVariable("ativo", "lock");
         }
         $cell->setVariable("level", $temp->getLevel()->getPermisao());
         $cell->generateOutputToString($saida);
         $t->setVariable("user", $saida);
         $t->addBlock("user");
     }
     $t->generateOutputToString($echo);
     $index->setVariable("conteudo", $echo);
     $index->addBlock("conteudo");
     die($index->generateOutput());
 }
Beispiel #2
0
 public function home()
 {
     $cv = new ControleVisao();
     $t = $cv->getSidebar();
     $t->setVariable("conteudo", " ");
     $t->addBlock("conteudo");
     die($t->generateOutput());
 }