source: admin/ogAdmSources/ogAdmWebCon/includes/HTMLCTESELECT.php @ e42f34e

918-git-images-111dconfigfileconfigure-oglivegit-imageslgromero-new-oglivemainmaint-cronmount-efivarfsmultivmmultivm-ogboot-installerogClonningEngineogboot-installer-jenkinsoglive-ipv6test-python-scriptsticket-301ticket-50ticket-50-oldticket-577ticket-585ticket-611ticket-612ticket-693ticket-700ubu24tplunification2use-local-agent-oglivevarios-instalacionwebconsole3
Last change on this file since e42f34e was 8964f9b, checked in by ramon <ramongomez@…>, 16 years ago

Resstructuración de trunk.

git-svn-id: https://opengnsys.es/svn/trunk@390 a21b9725-9963-47de-94b9-378ad31fedc9

  • Property mode set to 100644
File size: 1.7 KB
Line 
1<?
2// *************************************************************************************************************************************************
3// Aplicación WEB: ogAdmWebCon.
4// Autor: José Manuel Alonso (E.T.S.I.I.) Universidad de Sevilla
5// Fecha Creación:2003-2004
6// Fecha Última modificación: Febrero-2005
7// Nombre del fichero: HTMLCTESELECT.php
8// Descripción :
9//              Crea la etiqueta html <SELECT> de valores constantes
10//      Parametros:
11//              - parametros:Una cadena con la forma valor=literal separada por un caracter INTRO
12//              - nombreid: Nombre del desplegable (atributo HTML name)
13//              - clase: Clase que define su estilo
14//              - defaultlit: Literal de la primera opción cuyo valor es siempre 0
15//              - valorselec: Valor del item que saldrá seleccionado por defecto
16//              - ancho: Anchura del desplegable
17//              - eventochg: Nombre de la función que se ejecutará en respuesta al evento onchange
18// *************************************************************************************************************************************************
19function HTMLCTESELECT($parametros,$nombreid,$clase,$defaultlit,$valorselec,$ancho,$eventochg=""){
20        if (!empty($eventochg)) $eventochg='onchange="'.$eventochg.'(this);"';
21        $opciones=split(chr(13),$parametros);
22        $SelectHtml= '<SELECT '.$eventochg.' class= "'.$clase.'" id='.$nombreid.' name="'.$nombreid.'" style="WIDTH: '.$ancho.'">';
23        if (!empty($defaultlit)) $SelectHtml.= '<OPTION value="0">'.$defaultlit.'</OPTION>';
24        for($i=0;$i<sizeof($opciones);$i++){
25                $item=split("=",$opciones[$i]);
26                $SelectHtml.= '<OPTION value="'.$item[0].'"';
27                if($valorselec==$item[0]) $SelectHtml.=" selected ";
28                $SelectHtml.= '>'.$item[1].'</OPTION>';
29        }
30        return($SelectHtml);
31}
Note: See TracBrowser for help on using the repository browser.