forked from pasosdeJesus/SIVeL
-
Notifications
You must be signed in to change notification settings - Fork 1
/
usyroles.php
78 lines (65 loc) · 1.94 KB
/
usyroles.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
// vim: set expandtab tabstop=4 shiftwidth=4 foldmethod=marker fileencoding=utf-8:
/**
* Usuarios y Roles.
*
* PHP version 5
*
* @category SIVeL
* @package SIVeL
* @author Vladimir Támara <[email protected]>
* @copyright 2004 Dominio público. Sin garantías.
* @license https://www.pasosdejesus.org/dominio_publico_colombia.html Dominio Público. Sin garantías.
* @version CVS: $Id: usyroles.php,v 1.28.2.1 2011/09/07 02:52:24 vtamara Exp $
* @link http://sivel.sf.net
*/
/**
* Usuarios y Roles.
*/
require_once 'aut.php';
require_once $_SESSION['dirsitio'] . '/conf.php';
require_once 'misc.php';
$aut_usuario = "";
autenticaUsuario($dsn, $accno, $aut_usuario, 12);
$tabla = 'usuario';
encabezado_envia("Usuarios");
echo '<table border="0" width="100%"><tr>
<td style = "white-space: nowrap;background-color:#CCCCCC;" align="center"
valign = "top" colspan="2"><b>Usuarios</b></td></tr></table>';
$d = objeto_tabla($tabla);
if (PEAR::isError($d)) {
die($d->getMessage());
}
$k = $d->keys();
$titulo = $_DB_DATAOBJECT_FORMBUILDER['CONFIG']['select_display_field'];
if (isset($d->fb_select_display_field)) {
$titulo = $d->fb_select_display_field;
}
$d->find();
while ($d->fetch()) {
$vd = get_object_vars($d);
$t = $vd['nombre'] . " (" . $vd['id_usuario'] . ")";
$pk = "";
if (is_array($k)) {
$sep = "";
foreach ($k as $nl) {
$pk .= $sep . $nl . "=".($d->$nl);
$sep = ",";
}
}
echo sprintf(
'<a href = "detusyrol.php?id=%s">
%s</a><br>',
urlencode($pk),
htmlentities($t)
);
}
echo '<pr> </pr><table border="0" width="100%"
style = "white-space: nowrap; background-color:#CCCCCC;"><tr>' .
'<td align = "left">' .
'<a href = "detusyrol.php">Nuevo</a>' .
'</td><td align = "right">' .
'<a href = "index.php"><b>Menú Principal</b></a>' .
'</td></tr></table>';
pie_envia()
?>