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