本文整理汇总了PHP中Calendar::GetMonthOptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Calendar::GetMonthOptions方法的具体用法?PHP Calendar::GetMonthOptions怎么用?PHP Calendar::GetMonthOptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calendar
的用法示例。
在下文中一共展示了Calendar::GetMonthOptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetInputField
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 . '" />';
}
}
示例2: date
<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/>
示例3: Calendar
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