@ 2015-09-16T18:34:36Z <?php
$wdUses = array();
$ssUses = array();
$monthArray = array();
$subTime = date('Y-m-d', strtotime('-1 years'));
$currentTime = date('Y-m-d');
echo $subTime;
$wdLog = AuditLog::findAllInDateRangeWithProductIdsAndActionId(date('y-m-d h', $subTime) ,$currentTime, 1, 1);
$ssLog = AuditLog::findAllInDateRangeWithProductIdsAndActionId(date('y-m-d h', $subTime) ,$currentTime, 3, 1);
for($i = 0; $i < 12; $i++)
{
$startTime = date('Y-m-d', strtotime('-$i months'));
$endTime = date('Y-m-d', strtotime('-($i +1) months'));
foreach ($wdLog as $log)
{
if( $log->getDateTime() >= $subtime && $log->getDateTime() < $endTime )
{
++$wdUses[$i];
}
}
foreach ($ssLog as $log)
{
if( $log->getDateTime() >= $subtime && $log->getDateTime() < $endTime )
{
++$ssUses[$i];
}
}
$monthArray[$i] = $startTime();
}
$wdUses = json_encode($wdUses);
$ssUses = json_encode($ssUses);
$monthArray = json_encode($monthArray);
echo $wdUses;
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Output for 8.0.0 - 8.0.30 , 8.1.0 - 8.1.28 , 8.2.0 - 8.2.18 , 8.3.0 - 8.3.6 2014-09-16
Fatal error: Uncaught Error: Class "AuditLog" not found in /in/o3kZW:12
Stack trace:
#0 {main}
thrown in /in/o3kZW on line 12
Process exited with code 255 . Output for 7.0.0 - 7.0.20 , 7.1.0 - 7.1.20 , 7.2.0 - 7.2.33 , 7.3.16 - 7.3.33 , 7.4.0 - 7.4.33 2014-09-16
Fatal error: Uncaught Error: Class 'AuditLog' not found in /in/o3kZW:12
Stack trace:
#0 {main}
thrown in /in/o3kZW on line 12
Process exited with code 255 . Output for 5.4.0 - 5.4.45 , 5.5.0 - 5.5.38 , 5.6.0 - 5.6.28 2014-09-16
Fatal error: Class 'AuditLog' not found in /in/o3kZW on line 12
Process exited with code 255 . preferences:dark mode live preview
205.6 ms | 402 KiB | 271 Q