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); }
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); }
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>'; }
<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