Ver Mensaje Individual
  #5 (permalink)  
Antiguo 21/11/2011, 13:56
Avatar de vanegasjd
vanegasjd
 
Fecha de Ingreso: octubre-2011
Ubicación: Armenia, Quindio
Mensajes: 20
Antigüedad: 12 años, 7 meses
Puntos: 0
SAludos a Todos !!!

La cuestion es la siguiente
Tengo un formulario con sus respectivos campos

lo que que quiero es que solo salgan las opciones de editar eliminar agregar y guardar para los administradores y almacenista

para los usuarios solo quiero q salga el formulario con los datos registrados...


Código PHP:
Ver original
  1. <a href="<?php echo $this->url(array('controller'=>'materiales','action'=>'anyadir'));?>"><input id="del" type="button" value="Agregar material" style="width: auto;"></a>
  2. <br><br>
  3. <div id="contend">
  4. <table id="tablas" cellpadding="0" cellspacing="0" border="0" class="display">
  5. <thead>
  6.     <tr>
  7.         <th>NOMBRE</th>
  8.         <th>UNIDAD</th>
  9.         <th>DESCRIPCION</th>
  10.         <th>ESTADO</th>
  11.         <th>ALMACEN</th>
  12.         <th>BODEGA</th>
  13.         <th>&nbsp;</th>
  14.     </tr>
  15.     </thead>
  16.     <tbody>
  17.     <?php foreach($this->materiales as $material) : ?>
  18.     <tr>
  19.         <td><?php echo $this->escape($material->nombre);?></td>
  20.         <td><?php echo $this->escape($material->unidad);?></td>
  21.         <td><?php echo $this->escape($material->descripcion);?></td>
  22.         <td><?php echo $this->escape($material->nomestado);?></td>
  23.         <td><?php echo $this->escape($material->nomalmacen);?></td>
  24.         <td><?php echo $this->escape($material->nombodega);?></td>
  25.         <td>
  26.             <a href="<?php echo $this->url
  27. (array('controller'=>'materiales', 'action'=>'editar', 'idmateriales'=>$material->idmateriales));?>"><img src="<?php echo $this->baseUrl()?>/img/tablas/update.png" title="Editar"  style="cursor: pointer; border: 0;" /></a>
  28.             <a href="<?php echo $this->url(array('controller'=>'materiales', 'action'=>'borrar', 'idmateriales'=>$material->idmateriales));?>"><img src="<?php echo $this->baseUrl()?>/img/tablas/cancel.png" title="Eliminar"   style="cursor: pointer; border: 0;" /></a>
  29.         </td>
  30.     </tr>
  31.     <?php endforeach; ?>
  32.     </tbody>
  33. </table>
  34. </div>

Alguien me puede orientar como puedo deshabilitar estas opciones estos metods?

Para los Usuarios

Última edición por GatorV; 21/11/2011 a las 14:24