示例#1
0
                  <h3 class="box-title">Listagem de usuários</h3>
                  <a class="btn btn-info btn-flat pull-right" href="ViewUsersObj.php" title="Atualizar resultados" data-toggle="tooltip" data-placement="left"><i class="fa fa-refresh"></i></a>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <table id="dataT" class="table table-bordered table-hover">
                    <thead>
                      <tr>
                        <th>Usuário</th>
                        <th>Tipo</th>
                        <th>Opções</th>
                      </tr>
                    </thead>
                    <tbody>
                    <?php 
$listar = new Usuarios();
$list = $listar->listarUsuarios();
if ($list != null) {
    foreach ($list as $line) {
        ?>
                      <tr class="odd gradeX">
                        <form name="view" action="EditUserObj.php" method="post">
                        <td><?php 
        echo $line->nome;
        ?>
</td>
                        <td><?php 
        echo $line->tipo;
        ?>
</td>
                        <td>
                          <input type='hidden' name='id' value='<?php 
示例#2
0
文件: Front.php 项目: domazos/sstt
 public function displayContent($pagina)
 {
     $smarty = new Front();
     switch ($pagina) {
         case 'index':
             $this->displayHeader();
             if (!$this->isLoged()) {
                 $smarty->caching = false;
                 $smarty->display('index.tpl');
                 #$this->logOut();
             } else {
                 $smarty->caching = false;
                 $smarty->display('panel_gestion.tpl');
             }
             $this->displayFooter();
             break;
         case 'panel_gestion':
             if ($this->isLoged()) {
                 extract($_SESSION);
                 $this->displayHeader();
                 $smarty->caching = false;
                 $smarty->assign('root_dir', _ROOT_DIR_);
                 $smarty->assign('tipo_usuario', $tipoUser);
                 $smarty->display('panel_gestion.tpl');
                 $this->displayFooter();
             } else {
                 $this->logOut();
             }
             break;
         case 'gestion_usuarios':
             if ($this->isLoged()) {
                 extract($_SESSION);
                 include "Usuarios.php";
                 $usuarios = new Usuarios();
                 $this->displayHeader();
                 $smarty->caching = false;
                 $smarty->assign('root_dir', _ROOT_DIR_);
                 $smarty->assign('tipo_usuario', $tipoUser);
                 $smarty->assign('usuarios', $usuarios->listarUsuarios());
                 $smarty->assign('cuantos_usuarios', $usuarios->cuantosUsuarios());
                 $smarty->assign('tipos_usuario', $usuarios->tiposUsuario(0));
                 $smarty->display('gestion_usuarios.tpl');
                 $this->displayFooter();
             } else {
                 $this->logOut();
             }
             break;
         case 'gestion_contratos':
             if ($this->isLoged()) {
                 extract($_SESSION);
                 include "Contratos.php";
                 include "Clientes.php";
                 $contratos = new Contratos();
                 $clientes = new Clientes();
                 $id_usuario = ($tipoUser == 3 or $tipoUser == 4) ? $userid : 0;
                 $this->displayHeader();
                 $smarty->caching = false;
                 $smarty->assign('root_dir', _ROOT_DIR_);
                 $smarty->assign('tipo_usuario', $tipoUser);
                 $smarty->assign('contratos', $contratos->listarContratos($id_usuario));
                 $smarty->assign('cuantos_contratos', $contratos->cuantosContratos($id_usuario));
                 $smarty->assign('tipos_cliente', $clientes->cargaTipos(0));
                 $smarty->assign('regiones', $clientes->cargaRegiones(0));
                 $smarty->assign('tipo_contrato', $contratos->tiposContrato(0));
                 $smarty->assign('familias', $contratos->familiaContrato(1));
                 $smarty->assign('tecnico_asignado', $nombreUser);
                 $smarty->assign('id_tecnico', $userid);
                 $smarty->assign('respuesta_tipo', $contratos->listarRespuestasTipo(0));
                 $smarty->assign('estados_ppto', $contratos->listarEstadoPresupuesto(0));
                 #$smarty->assign('tope_diagnostico', $contratos->getWorkingDays($fecha_recepcion_f, $fecha_tope_d));
                 $smarty->display('gestion_contratos.tpl');
                 $this->displayFooter();
             } else {
                 $this->logOut();
             }
             break;
         case 'gestion_clientes':
             if ($this->isLoged()) {
                 extract($_SESSION);
                 include "Clientes.php";
                 $clientes = new Clientes();
                 $this->displayHeader();
                 $smarty->caching = false;
                 $smarty->assign('root_dir', _ROOT_DIR_);
                 $smarty->assign('tipo_usuario', $tipoUser);
                 $smarty->assign('clientes', $clientes->listarClientes());
                 $smarty->assign('cuantos_clientes', $clientes->cuantosClientes());
                 $smarty->assign('regiones', $clientes->cargaRegiones(0));
                 $smarty->assign('tipos_cliente', $clientes->cargaTipos(0));
                 $smarty->display('gestion_clientes.tpl');
                 $this->displayFooter();
             } else {
                 $this->logOut();
             }
             break;
         case 'vb_cliente':
             extract($_REQUEST);
             $id_contrato = base64_decode($i);
             include "Contratos.php";
             $contrato = new Contratos();
             $this->displayHeaderCliente();
             $smarty->caching = false;
             $smarty->assign('root_dir', _ROOT_DIR_);
             $smarty->assign('id_contrato', $id_contrato);
             $smarty->assign('info', $contrato->detalleContrato($id_contrato));
             $smarty->display('vb_cliente.tpl');
             $this->displayFooter();
             break;
         case 'gestion_repuestos':
             extract($_REQUEST);
             extract($_SESSION);
             include "Repuestos.php";
             $repuestos = new Repuestos();
             $this->displayHeader();
             $smarty->caching = false;
             $smarty->assign('root_dir', _ROOT_DIR_);
             $smarty->assign('repuestos', $repuestos->listarRepuestos());
             $smarty->assign('cuantos_repuestos', $repuestos->cuantosRepuestos());
             $smarty->assign('tipo_usuario', $tipoUser);
             $smarty->display('gestion_repuestos.tpl');
             $this->displayFooter();
             break;
         case 'carga_repuestos':
             extract($_REQUEST);
             include "Repuestos.php";
             $repuestos = new Repuestos();
             $this->displayHeader();
             $smarty->caching = false;
             $smarty->assign('root_dir', _ROOT_DIR_);
             $smarty->display('carga_repuestos.tpl');
             $this->displayFooter();
             break;
         default:
             $this->displayHeader();
             $smarty->display('index.tpl');
             $this->displayFooter();
     }
 }
示例#3
0
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
	<title>Loja 412 | Painel de Controle</title>
</head>
<body>
<h1>Usu�rios</h1>
<a href='criarUsuario.php'>Criar usu�rio</a><br /><br />
<table cellspacing="2" cellpadding="5" border="1">
	<tr>
		<th>ID</th>
		<th>Usu�rio</th>
		<th>Op��es</th>
	</tr>
	<?php 
foreach ($usuarios->listarUsuarios() as $usuario) {
    echo "<tr>";
    echo "<td>" . $usuario['id'] . "</td>\n";
    echo "<td>" . $usuario['usuario'] . "</td>\n";
    echo "<td><a href='alterarUsuario.php?id=" . $usuario['id'] . "'>Alterar</a> - <a href='removerUsuario.php?id=" . $usuario['id'] . "'>Remover</a></td>\n";
    echo "</tr>";
}
?>
</table>

<h1>Produtos</h1>
<a href='criarProduto.php'>Criar produto</a><br /><br />
<table cellspacing="2" cellpadding="5" border="1">
	<tr>
		<th>ID</th>
		<th>Produto</th>