本文整理汇总了PHP中CAdminCalendar::CalendarPeriod方法的典型用法代码示例。如果您正苦于以下问题:PHP CAdminCalendar::CalendarPeriod方法的具体用法?PHP CAdminCalendar::CalendarPeriod怎么用?PHP CAdminCalendar::CalendarPeriod使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAdminCalendar
的用法示例。
在下文中一共展示了CAdminCalendar::CalendarPeriod方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: GetAdminFilterHTML
function GetAdminFilterHTML($arProperty, $strHTMLControlName)
{
$from_name = $strHTMLControlName["VALUE"] . '_from';
$to_name = $strHTMLControlName["VALUE"] . '_to';
$from = isset($_REQUEST[$from_name]) ? $_REQUEST[$from_name] : "";
$to = isset($_REQUEST[$to_name]) ? $_REQUEST[$to_name] : "";
return CAdminCalendar::CalendarPeriod($from_name, $to_name, $from, $to);
}
示例2: GetAdminFilterHTML
function GetAdminFilterHTML($arProperty, $strHTMLControlName)
{
$from_name = $strHTMLControlName["VALUE"] . '_from';
$to_name = $strHTMLControlName["VALUE"] . '_to';
$lAdmin = new CAdminList($strHTMLControlName["TABLE_ID"]);
$lAdmin->InitFilter(array($from_name, $to_name));
$from = isset($GLOBALS[$from_name]) ? $GLOBALS[$from_name] : "";
$to = isset($GLOBALS[$to_name]) ? $GLOBALS[$to_name] : "";
return CAdminCalendar::CalendarPeriod($from_name, $to_name, $from, $to);
}
示例3: CalendarPeriod
function CalendarPeriod($sFromName, $sFromVal, $sToName, $sToVal, $sFormName="skform", $show_select="N", $field_select="class=\"typeselect\"", $field_input="class=\"typeinput\"", $size="10")
{
if(class_exists("CAdminCalendar"))
return CAdminCalendar::CalendarPeriod($sFromName, $sToName, $sFromVal, $sToVal, ($show_select=="Y"), $size, ($size > 10));
$arr = array();
$str = "";
if ($show_select=="Y")
{
$sname = $sFromName."_DAYS_TO_BACK";
$str = "
<script type=\"text/javascript\">
function ".$sFromName."_SetDate()
{
var number = document.".$sFormName.".".$sname.".selectedIndex-1;
document.".$sFormName.".".$sFromName.".disabled = false;
if (number>=0)
{
document.".$sFormName.".".$sFromName.".value = dates[number];
document.".$sFormName.".".$sFromName.".disabled = true;
}
}
</script>
";
global $$sname;
$value = $$sname;
if (strlen($value)>0 && $value!="NOT_REF") $ds="disabled";
?><script type="text/javascript">
var dates = new Array();
<?
for ($i=0; $i<=90; $i++)
{
$prev_date = GetTime(time()-86400*$i);
?>dates[<?php
echo $i;
?>
]="<?php
echo $prev_date;
?>
";<?
if (!is_array($arr["reference"])) $arr["reference"] = array();
if (!is_array($arr["reference_id"])) $arr["reference_id"] = array();
$arr["reference"][] = $i." ".GetMessage("TOOLS_DN");
$arr["reference_id"][] = $i;
}
?></script><?
$str .= SelectBoxFromArray($sname, $arr, $value , " ", "onchange=\"".$sFromName."_SetDate()\" ".$field_select);
$str .= " ";
}
$str .=
'<input '.$ds.' '.$field_input.' type="text" name="'.$sFromName.'" id="'.$sFromName.'" size="'.$size.'" value="'.htmlspecialcharsbx($sFromVal).'" /> '."\n".
Calendar($sFromName, $sFormName, $sFromName, $sToName).' ... '."\n".
'<input '.$field_input.' type="text" name="'.$sToName.'" id="'.$sToName.'" size="'.$size.'" value="'.htmlspecialcharsbx($sToVal).'" /> '."\n".
Calendar($sToName, $sFormName, $sFromName, $sToName)."\n";
return '<span style="white-space: nowrap;">'.$str.'</span>';
}
示例4: GetMessage
<td><?php
echo GetMessage("MAIN_EVENTLOG_ID");
?>
:</td>
<td><input type="text" name="find_id" size="47" value="<?php
echo htmlspecialcharsbx($find_id);
?>
"></td>
</tr>
<tr>
<td><?php
echo GetMessage("MAIN_EVENTLOG_TIMESTAMP_X");
?>
:</td>
<td><?php
echo CAdminCalendar::CalendarPeriod("find_timestamp_x_1", "find_timestamp_x_2", $find_timestamp_x_1, $find_timestamp_x_2, false, 15, true);
?>
</td>
</tr>
<tr>
<td><?php
echo GetMessage("MAIN_EVENTLOG_SEVERITY");
?>
:</td>
<td><?php
echo SelectBoxMFromArray("find_severity[]", array("REFERENCE" => array("SECURITY", "WARNING"), "REFERENCE_ID" => array("SECURITY", "WARNING")), $find_severity, GetMessage("MAIN_ALL"));
?>
</td>
</tr>
<tr>
<td><?php