当前位置: 首页>>代码示例>>PHP>>正文


PHP DCL_Sanitize::ToDateTime方法代码示例

本文整理汇总了PHP中DCL_Sanitize::ToDateTime方法的典型用法代码示例。如果您正苦于以下问题:PHP DCL_Sanitize::ToDateTime方法的具体用法?PHP DCL_Sanitize::ToDateTime怎么用?PHP DCL_Sanitize::ToDateTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DCL_Sanitize的用法示例。


在下文中一共展示了DCL_Sanitize::ToDateTime方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ShowResults

 function ShowResults()
 {
     global $g_oSec;
     commonHeader();
     if (!$g_oSec->HasPerm(DCL_ENTITY_ADMIN, DCL_PERM_MODIFY)) {
         return PrintPermissionDenied();
     }
     $begindate = @DCL_Sanitize::ToDateTime($_REQUEST['begindate'] . ' 00:00:00.00');
     $enddate = @DCL_Sanitize::ToDateTime($_REQUEST['enddate'] . ' 23:59:59.99');
     $responsible = DCL_Sanitize::ToInt($_REQUEST['responsible']);
     if ($begindate === null || $enddate === null) {
         commonHeader();
         trigger_error(STR_SEC_DATEERR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
     $objDBPer =& CreateObject('dcl.dbPersonnel');
     $objDBSA =& CreateObject('dcl.dbSecAudit');
     $objDB = new DCLDb();
     $sCols = 'SA.id, ' . $objDBSA->ConvertTimestamp('SA.actionon', 'actionon') . ', SA.actiontxt, SA.actionparam';
     $sCols .= ', ' . $objDBPer->SelectAllColumns('Pers.');
     $sQuery = "SELECT {$sCols}\n\t\t\tFROM {$objDBSA->TableName} SA INNER JOIN {$objDBPer->TableName} Pers on \n\t\t\tSA.id = pers.id \n\t\t\tWHERE SA.actionon BETWEEN " . $objDBSA->DisplayToSQL($begindate) . ' and ' . $objDBSA->DisplayToSQL($enddate);
     if ($responsible == 0) {
         $respname = STR_SEC_ALLUSERS;
     } else {
         $objDBPer->Load($responsible);
         $respname = $objDBPer->short;
         $sQuery .= ' AND SA.id=' . $responsible;
     }
     $sQuery .= ' ORDER BY SA.actionon';
     $reportAr = null;
     if ($objDB->Query($sQuery) != -1) {
         if ($objDB->next_record()) {
             $idx = -1;
             do {
                 $idx++;
                 $reportAr[$idx][] = $objDB->f('short');
                 $reportAr[$idx][] = $objDB->FormatTimeStampForDisplay($objDB->f('actionon'));
                 $reportAr[$idx][] = $objDB->f('actiontxt');
                 $reportAr[$idx][] = $objDB->f('actionparam');
             } while ($objDB->next_record());
         } else {
             trigger_error(STR_SEC_RPTNODATA, E_USER_ERROR);
             $this->Show(false);
             return;
         }
     }
     $obj =& CreateObject('dcl.htmlSecAudit');
     if (!$obj->Render($reportAr, $begindate, $enddate, $respname)) {
         trigger_error(STR_SEC_RPTERROR, E_USER_ERROR);
         $this->Show(false);
         return;
     }
 }
开发者ID:ljvblfz,项目名称:mysoftwarebrasil,代码行数:54,代码来源:class.boSecAudit.inc.php


注:本文中的DCL_Sanitize::ToDateTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。