blob: 9c03528a7460e24baa2841b4e78679f139d3e3a8 (
plain)
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
<?
// ********************************************************************************************************************
// Aplicación WEB: ogAdmWebCon
// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
// Fecha Creación: Agosto-2010
// Fecha Última modificación: Agosto-2010
// Nombre del fichero: L_Iconos.php
// Descripción :Este fichero implementa el mantenimiento de la tabla Iconos
// ********************************************************************************************************************
include_once("../includes/ctrlacc.php");
include_once("../clases/AdoPhp.php");
include_once("../clases/XmlPhp.php");
include_once("../clases/MenuContextual.php");
include_once("../includes/CreaComando.php");
include_once("../includes/HTMLCTESELECT.php");
include_once("../idiomas/php/".$idioma."/iconos_".$idioma.".php");
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Captura de parámetros
//-------------------------------------------------------------------------------------------------------------------------------------------------
$idtipoicono="";
if (isset($_POST["idtipoicono"])) $idtipoicono=$_POST["idtipoicono"];
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Conexion a la base de datos
//-------------------------------------------------------------------------------------------------------------------------------------------------
$cmd=CreaComando($cadenaconexion);
if (!$cmd) // Fallo conexión con servidor de datos
Header('Location: '.$pagerror.'?herror=2'); // Error de conexión con servidor B.D.
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Búsquedas
//-------------------------------------------------------------------------------------------------------------------------------------------------
$cmd->texto="SELECT * FROM iconos WHERE idicono>0";
if (!empty($idtipoicono)) // Tipo
$cmd->texto.=" AND idtipoicono=".$idtipoicono;
$cmd->texto.=" order by idtipoicono,descripcion ";
$rs=new Recordset;
$rs->Comando=&$cmd;
if (!$rs->Abrir())
RedireccionaError($TbMsg["ERROR_SELECT"]);
?>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<LINK rel="stylesheet" type="text/css" href="../estilos.css">
<SCRIPT language="javascript">
var IE=(navigator.appName=="Microsoft Internet Explorer");
var NS=(navigator.appName=="Netscape");
</SCRIPT>
<SCRIPT language="javascript" src="../clases/jscripts/MenuContextual.js"></SCRIPT>
<SCRIPT language="javascript" src="L_Iconos.js"></SCRIPT>
<? echo '<SCRIPT language="javascript" src="../idiomas/javascripts/'.$idioma.'/iconos_'.$idioma.'.js"></SCRIPT>'?>
</HEAD>
<BODY OnContextMenu="return false">
<P align="center"><SPAN class=textos><? echo $TbMsg["SEARCH_OPT"]; ?> </SPAN></P>
<FORM name="fdatos" action="L_Iconos.php" method="post">
<INPUT type=hidden name=identificador value="0">
<TABLE align=center class=tabla_busquedas>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<TR>
<TH> <? echo $TbMsg["TYPE"] ?> </TD>
<TD ><?
$parametros="0=".chr(13);
$parametros.=$TbMsg["SELECT_WEB"] .chr(13);
$parametros.=$TbMsg["SELECT_ITEMS"] .chr(13);
$parametros.=$TbMsg["SELECT_MENU"] ;
echo '<TD>'.HTMLCTESELECT($parametros, "idtipoicono","estilodesple","",$idtipoicono,100).'</TD>';?>
</TD>
</TR>
</TABLE>
<BR>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<P align=center><A href="#"><img border=0 src="../images/iconos/busquedas.gif" onclick="document.fdatos.submit()" alt="Buscar"></A></P>
</FORM>
<!--------------------------------------------------------------------------------------------------------------------------------------------------->
<P align="center"><SPAN class=textos><? echo $TbMsg["SEARCH_RESULT"]. $rs->numeroderegistros?></SPAN></P>
<TABLE align="center" class="tabla_listados">
<TR>
<TH align="center">A</TH>
<TH align="center"> <? echo $TbMsg["DESCRIP"] ?> </TH>
<TH align="center"> <? echo $TbMsg["NAME"] ?> </TH>
<TH align="center"> </TH>
<TH align="center"> T </TH>
</TR>
<?
$TBtipo[1]="W";
$TBtipo[2]="I";
$TBtipo[3]="F";
while (!$rs->EOF){?>
<TR>
<TD align=center><IMG id=<?=$rs->campos["idicono"]?> style="cursor:hand" onclick="menu_contextual(this)" src="../images/iconos/administrar_off.gif"></TD>
<TD> <? echo ( $TbMsg[basename($rs->campos["descripcion"])] ) ? $TbMsg[basename($rs->campos["descripcion"])] : basename($rs->campos["descripcion"]); ?> </TD>
<TD> <? echo basename($rs->campos["urlicono"])?> </TD>
<TD align=center> <IMG src="./iconos/<? echo $rs->campos["urlicono"] ?>"
<? if ($rs->campos["idtipoicono"]==2) //icono item
echo " width=64 ";
else
echo " width=16 ";
?>
> </TD>
<TD align=center> <? echo $TBtipo[$rs->campos["idtipoicono"]] ?> </TD>
</TR>
<? $rs->Siguiente();}?>
</TABLE>
<?
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Menu contextual
//-------------------------------------------------------------------------------------------------------------------------------------------------
$flotante=new MenuContextual(); // Crea objeto MenuContextual
$XMLcontextual=CreacontextualXMLMenu($TbMsg); // Crea contextual de las acciones
echo $flotante->CreaMenuContextual($XMLcontextual);
?>
</BODY>
</HTML>
<?
//-------------------------------------------------------------------------------------------------------------------------------------------------
// Menus contextuales
//-------------------------------------------------------------------------------------------------------------------------------------------------
function CreacontextualXMLMenu( $TbMsg ){
$layerXML='<MENUCONTEXTUAL';
$layerXML.=' maxanchu=110';
$layerXML.=' idctx="flo_menu"';
$layerXML.=' swimg=1';
$layerXML.=' origen_x=100';
$layerXML.=' origen_y=300';
$layerXML.=' clase="menu_contextual"';
$layerXML.='>';
$layerXML.='<ITEM';
$layerXML.=' alpulsar="consultar()"';
$layerXML.=' imgitem="../images/iconos/consultar.gif"';
$layerXML.=' textoitem="'. $TbMsg["MENU_CONS"] .'"';
$layerXML.='></ITEM>';
$layerXML.='<ITEM';
$layerXML.=' alpulsar="modificar()"';
$layerXML.=' textoitem="'.$TbMsg["MENU_REPLACE"].'"';
$layerXML.=' imgitem="../images/iconos/modificar.gif"';
$layerXML.='></ITEM>';
$layerXML.='<SEPARADOR>';
$layerXML.='</SEPARADOR>';
$layerXML.='<ITEM';
$layerXML.=' alpulsar="borrar()"';
$layerXML.=' imgitem="../images/iconos/eliminar.gif"';
$layerXML.=' textoitem="'. $TbMsg["MENU_DEL"]. '"';
$layerXML.='></ITEM>';
$layerXML.='</MENUCONTEXTUAL>';
return($layerXML);
}
?>
|