source: sipes/0.3-modules/ente_planificador_sector/includes/views/handler_field_usuarios_name.inc @ 303fae2

stableversion-3.0
Last change on this file since 303fae2 was 303fae2, checked in by José Gregorio Puentes <jpuentes@…>, 9 años ago

se agregaron los modulos

  • Propiedad mode establecida a 100755
File size: 1.9 KB
Línea 
1<?php
2
3  /**
4  *
5  * Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana
6  * @file handler_field_usuarios_name.inc
7  * Drupal part Module to install ente planificador module
8  * Copyright 2011 Sistema Automatizado para la Planificación Estratégico-Situacional en la Administración Pública Venezolana (CENDITEL)
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
23  *
24  * Probado con un servidor Apache 2.0,
25  * Postgresql version 7.4.7 y 8.1 mysql 5.0.32 y PHP version 4.3.11 y 5.2.0-8
26  *
27  * @author Cenditel Merida - Ing. Jose Puentes
28  * @date 2014/12/19 // (a&#241;o-mes-dia)
29  * @version 0.2 // (0.1)
30  *
31  */
32
33/**
34 * Muestra el nombre de usuario.
35 */
36 class handler_field_usuarios_name extends views_handler_field {
37  function render($values) {
38     $name = '';
39     if ($values->{$this->field_alias}) {
40       $result = db_query("SELECT u.name,u.uid FROM {ente_user_planificador} as e INNER JOIN {users} as u ON u.uid = e.usuario WHERE e.usuario = %d", $values->ente_user_planificador_usuario);
41       $row = db_fetch_object($result);
42       $name = l($row->name, 'user/' . $row->uid, array('html' => true, 'query' => 'destination=administrar_usuarios'));
43     }
44     return $name;
45   }
46 }
Nota: Vea TracBrowser para ayuda de uso del navegador del repositorio.