Source for file cteste.modulo.php

Documentation is available at cteste.modulo.php

  1. <?php
  2.     /**
  3.      * teste.modulo.php
  4.      * 
  5.      * Módulo pra testes
  6.      *
  7.      * @copyright 2008 Soomp
  8.      * @author Marcio Merlone <mmerlone@gmail.com>
  9.      * @version 1.0
  10.      * @since 20/12/2006
  11.      * @package Soomp
  12.      */
  13.     /* $Id: cteste.modulo.php,v 1.1 2007/05/24 20:24:27 mmerlone Exp $ */
  14.  
  15.     require_once(CFG_LOCAL_FRAMEWORK.'control.classe.php');
  16.     /**
  17.      * Classe controladora para testes e exemplos
  18.      */
  19.     class cteste extends control{
  20.         /**
  21.          * @name array $arrAs define os $_GET['a'] permitidos pelo módulo
  22.          */
  23.         public $acoes = array('lista'    => 0);    // Listagem
  24.     
  25.         /**
  26.          * @name array $arrPerms define as permissões para cada grupo.
  27.          */
  28.         public $permissoes = array();
  29.  
  30.         /**
  31.          * Construtor do controlador se necessário
  32.          */
  33.         public function __construct(){
  34.             require_once(CFG_PATH.'classes/teste.classe.php');
  35.         }
  36.  
  37.         /**
  38.           * Exibe a listagem de objetos
  39.          */
  40.         public function lista(requisicao &$req){
  41.  
  42.             if($this->_smarty(&& $this->_dbUser()){
  43.  
  44.                 $g new grupo();
  45.                 
  46.                 $idListagem    $this->getIntIdListagem();
  47.                 $intPag        $this->getIntPag();
  48.                 $arrAcoes    array('delmulti' => array('id' => 31'value' => 'Remove selecionados'));
  49.  
  50.                 $lista $g->initPage($intPag$idListagemtrue);
  51.                 $this->setPagePrefs($lista);
  52.                 $lista->setComboAcoes($arrAcoes);
  53.                 $lista->legenda 'Grupos';
  54.                 $lista $g->Page($lista);
  55.  
  56.                 $req->outputHead();
  57.                 $this->smarty->assign('lista'$lista);
  58.                 $this->smarty->assign('pk'CFG_GRUPO_DB_PK);
  59.                 $this->smarty->jsSrc('j/usuario.lista.js');
  60.                 $this->smarty->js('jsVarsLista.tpl');
  61.                 $this->smarty->display('grupo.lista.tpl');
  62.  
  63.                 echo '<div style="float: left; width: 100%"><hr><h1>Dump de um grupo carregado e um objeto de listagem:</h1><br><pre style="border: 1px dotted blue; font-family: mono;">';
  64.                 $g->Load('PK_GRUPO="0"');
  65.                 var_dump($g);
  66.                 echo "-------------------------------------\n";
  67.                 var_dump($lista);
  68.                 echo '</pre></div>';
  69.  
  70.                 $req->outputFoot();
  71.                 return;
  72.             }
  73.         }
  74.     }
  75. ?>

Documentation generated on Sun, 09 Mar 2008 23:51:21 -0300 by phpDocumentor 1.4.0

SourceForge.net Logo Support This Project