Ejemplo n.º 1
0
function GetInputField($paramDTO)
{
    $calendar = new Calendar();
    switch ($paramDTO->tipoParametro) {
        // case 1 INTEIRO - input simples, cai no caso default
        // case 2 STRING  - input simples, cai no caso default
        case 3:
            $properties = 'style="width:50%;"';
            // DATETIME  - cria um datetime picker
            return '<input ' . $properties . ' class="datepick" type="text" readonly="readonly" name="parametro' . $paramDTO->id . '" value="' . $paramDTO->valor . '" />';
        case 4:
            $properties = 'style="width:50%;"';
            // BOOLEAN  - cria um combobox com opções sim e não
            $trueSelected = $paramDTO->valor == 'true' ? 'selected="selected"' : '';
            $falseSelected = $paramDTO->valor == 'false' ? 'selected="selected"' : '';
            return '<select ' . $properties . ' name="parametro' . $paramDTO->id . '" ><option ' . $trueSelected . ' value="true" >Sim</option><option ' . $falseSelected . ' value="false" >Não</option></select>';
        case 5:
            $properties = 'style="width:50%;"';
            // MÊS      - cria um combobox com os meses
            return '<select ' . $properties . ' name="parametro' . $paramDTO->id . '" >' . $calendar->GetMonthOptions($paramDTO->valor) . '</select>';
        default:
            $properties = 'style="width:50%;"';
            return '<input ' . $properties . ' type="text" name="parametro' . $paramDTO->id . '" value="' . $paramDTO->valor . '" />';
    }
}
    <label class="left" style="width:99%; text-align: left; <?php 
echo $searchMethod == 3 ? "display:inline;" : "display:none;";
?>
">Equipamento<br/>
        <select name="equipmentCode" style="width: 98%;" ></select>
    </label>
    <div style="clear:both; <?php 
echo $searchMethod == 3 ? "display:inline;" : "display:none;";
?>
">
        <br/>
    </div>
    <label class="left" style="width:45%; text-align: left;">Mês da Despesa<br/>
        <select name="month" style="width:95%;height:30px;" ><?php 
$calendar = new Calendar();
echo $calendar->GetMonthOptions(0);
?>
</select>
    </label>
    <label class="left" style="width:45%; text-align: left;">Ano da Despesa<br/>
        <input type="text" name="year" style="width:95%;height:30px;" value="<?php 
echo date('Y');
?>
" ></input>
    </label>
    <br/>
    <label class="left" style="width:99%; text-align: left; ">Despesa Mensal Área Técnica<br/>
        <input type="text" name="despesaMensal" style="width:98%;height:25px;" value="" ></input>
    </label>
    <div style="clear:both;">
        <br/>
Ejemplo n.º 3
0
echo $billing->id;
?>
" >Demonstrativo</a><br/><br/>
            <a href="#" id="invoiceLink" rel="<?php 
echo $invoiceNum;
?>
" >Nota Fiscal</a><br/><br/>
        </fieldset>
        <div style="clear:both;">
            <br/>
        </div>

        <label>Mes Referência<br/>
        <select name="mesReferencia" style="width:250px;height:30px;" ><?php 
$calendar = new Calendar();
echo $calendar->GetMonthOptions($billing->mesReferencia);
?>
</select>
        </label>

        <label>Ano Referência<br/>
        <input type="text" name="anoReferencia" size="45" value="<?php 
echo $billing->anoReferencia;
?>
" />
        </label>
        <div style="clear:both;">
            <br/><br/>
        </div>

        <a href="<?php