Пример #1
0
                          </td>
                      </tr>  
                      <!-- <tr><td colspan="2"><span>Escolha os equipamentos e clique em avançar para definir a quantidade:</span></td></tr> -->
                      <tr>
                              <td colspan="2">
                                  <div id="equipamentos">
                                   <!-- <select id="exames" name="exames[]" size="5" multiple style="width:270px"> -->
                                      <?php 
    $epi = new Epi();
    $epis = $epi->get_name_all_epi();
    $data = array();
    $data_selected = array();
    for ($i = 0; $i < count($epis); $i++) {
        $data[$i] = array("id" => $epis[$i][0], "nome_epi" => $epis[$i][1]);
    }
    RendDoubleSelect::showDoubleDropDownAlert($data, $data_selected, "id", "nome_epi", "", "sel_epis1", "selecionados", "hd_Epis", "130px", "Equipamentos", "Selecionados");
    ?>
                                   <!-- </select> -->
                                </div>
                              </td>
                     </tr>
                     <tr>
                        <td colspan="3" style="text-align:center">
                          <input style="width:80px;" type="submit" name="button" class="button" id="buttonAvancar" onclick="selectAll()" value="Cadastrar">
                          <input style="width:80px;" name="button" class="button" onclick="window.location.href='add_epiXfunc.php'" id="button" value="Cancelar">
                        </td>
                     </tr>
                  </table>
               </form>
   <?php 
} else {
Пример #2
0
    static function showDoubleDropDownAlert(array $lista1, array $lista2, $campoid, $campoTexto, $campoGrupo, $nomeCombo1, $nomeCombo2, $hdTemp, $height = "220px", $titleAvaliable = "Disponível(is)", $titleSelected = "Selecionado(s)")
    {
        ?>
<table style="text-align:left ;width:96%">
	  <tr>
	    <td  class="f-tabela-lista" style="width:45%"><span style="float:left"><b> <?php 
        echo $titleAvaliable;
        ?>
 </b></span> <div style="margin-top:2px;float:left; margin-left:10px; height:10px; width:10px; background-color:#f33"></div> <div style="float:left; margin-left:5px;"><span style="font-size:12px; color:#565656;">(Estoque baixo)</span></div><br>
				 <select name="<?php 
        echo $nomeCombo1;
        ?>
" id="<?php 
        echo $nomeCombo1;
        ?>
"
	multiple="multiple" style="width: 100%; height: <?php 
        echo $height;
        ?>
;" 
					onClick="return false"
					onDblClick="moveSelectedOptionsAlert(this.form['<?php 
        echo $nomeCombo1;
        ?>
'],this.form['<?php 
        echo $nomeCombo2;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)">
                 <?php 
        $arr = $lista1;
        if ($campoGrupo != "") {
            RendDoubleSelect::loadDropDownOptGroup($arr, $campoid, $campoTexto, $campoGrupo, "");
        } else {
            RendDoubleSelect::loadDropDownArray($arr, $campoid, $campoTexto, "");
        }
        ?>
				 </select> 
				 </td>
				 <td style="width:10%" align="center">
				
			  <input type="hidden" name="<?php 
        echo $hdTemp;
        ?>
" value="">	
				
	<INPUT TYPE="button" style="width:48px" class="botao" NAME="right" VALUE=" &gt; "
			    title="Select Item" ONCLICK="moveSelectedOptionsAlert(this.form['<?php 
        echo $nomeCombo1;
        ?>
'],this.form['<?php 
        echo $nomeCombo2;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)">
              <br>
	<!-- <INPUT TYPE="button" style="width:48px" class="botao" NAME="right" VALUE="&gt;&gt;" title="Select All" ONCLICK="moveAllOptions(this.form['<?php 
        echo $nomeCombo1;
        ?>
'],this.form['<?php 
        echo $nomeCombo2;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)"> -->
              <BR>
	<INPUT TYPE="button" style="width:48px" class="botao" NAME="left" VALUE=" &lt; " title="Remove Item" ONCLICK="moveSelectedOptionsAlert(this.form['<?php 
        echo $nomeCombo2;
        ?>
'],this.form['<?php 
        echo $nomeCombo1;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)">
              <br>
	<!-- <INPUT TYPE="button" style="width:48px" class="botao" NAME="left" VALUE="&lt;&lt;" title="Remove All" ONCLICK="moveAllOptions(this.form['<?php 
        echo $nomeCombo2;
        ?>
'],this.form['<?php 
        echo $nomeCombo1;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)">	 -->
			  
			           
				 </td>
				 <td class="f-tabela-lista" style="width:45%">
				 <span><b><?php 
        echo $titleSelected;
        ?>
</b></span><br>
				 <!-- <select id="<?php 
        echo $nomeCombo2;
        ?>
" name="exames" size="5" style="width: 100%; height: <?php 
        echo $height;
        ?>
;" multiple onDblClick="moveSelectedOptionsAlert(this.form['<?php 
        echo $nomeCombo2;
        ?>
'],this.form['<?php 
        echo $nomeCombo1;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)" > -->
	<select name="selecionados[]" id="<?php 
        echo $nomeCombo2;
        ?>
" multiple style="width: 100%; height: <?php 
        echo $height;
        ?>
;" onDblClick="moveSelectedOptionsAlert(this.form['<?php 
        echo $nomeCombo2;
        ?>
'],this.form['<?php 
        echo $nomeCombo1;
        ?>
'],true,this.form['<?php 
        echo $hdTemp;
        ?>
'].value)">
                  <?php 
        $arr = $lista2;
        if ($campoGrupo != "") {
            RendDoubleSelect::loadDropDownOptGroup($arr, $campoid, $campoTexto, $campoGrupo, "");
        } else {
            RendDoubleSelect::loadDropDownArray($arr, $campoid, $campoTexto, "");
        }
        ?>
				
				
				</select>
	     
               
				 </td>
			  </tr>
	</table><?php 
    }
Пример #3
0
                     <!-- <tr> <td><span>Descrição:</span></td> <td ><input type="text" id="desc" name="desc" style="width:100px;"></td><td><span style="font-size:12px; color:#555;">(Ex. de descrição: Das 8:00 às 12:00 e das 13:00 às 18:00)</span></td></tr> <!- nome -->
                     <tr> <td ><span>Codigo:</span></td> <td><input type="text" id="codigo" name="codigo"></td></tr> <!-- ini exp -->
                     <tr> <td ><span>Descrição:</span></td> <td><input type="text" id="descricao" name="descricao"></td></tr> <!-- ini exp -->
                     <tr><td colspan="2"><span>Selecione os exames necessários para essa função:</span></td></tr>
                     <tr>
                        <td colspan="2">
                           <!-- <select id="exames" name="exames[]" size="5" multiple style="width:270px"> -->
                              <?php 
$exame = new Exame();
$exames = $exame->get_name_all_exames();
$data = array();
for ($i = 0; $i < count($exames); $i++) {
    $data[$i] = array("id" => $exames[$i][0], "name" => $exames[$i][1]);
}
$data_selected = array();
RendDoubleSelect::showDoubleDropDown($data, $data_selected, "id", "name", "", "sel_exames1", "selecionados", "hd_exames", "130px", "Exames", "Selecionados");
?>
                           <!-- </select> -->
                        </td>
                     </tr>
                     <!-- <tr><td colspan="2"><span style="color:#898989">Segure Ctrl para múltiplas seleções</span></td></tr>   -->
                     <tr>
                        <td colspan="3" style="text-align:center">
                          <input class="button" type="submit" onclick="selectAll()" name="button" id="button" value="Cadastrar">                          
                        </td>
                     </tr>
                  </table>
               </form>