// make sure that the person has enough priviledge...
if(check_user_permission(29) )
{
// get current open customer orders.
?>
|
Last Week |
Last Month |
Last 3 Month |
// priority 1 screenshots.
$sql = "SELECT sum( IF(start_date >= (curdate() - INTERVAL 7 DAY), 1, 0) ) as total_lastweek
, sum( IF(start_date >= (curdate() - INTERVAL 1 month), 1, 0) ) as total_lastmonth
, sum( IF(start_date >= (curdate() - INTERVAL 3 month), 1, 0) ) as total_last3month
FROM screenshot
WHERE priority = 1";
$screenshot_result = $wrapperObj->executeQuery($sql, []);
if ($screenshot_result === false) {
show_pdo_error($sql, $wrapperObj->getLastStatement());
}
$rci = 0;
if ($screenshot_row = $screenshot_result[0])
{
$row_class = (++$rci & 1) ? '' : 'alt';
?>
| Priority 1 |
">=$screenshot_row["total_lastweek"]?> |
">=$screenshot_row["total_lastmonth"]?> |
">=$screenshot_row["total_last3month"]?> |
}
?>
// All screenshots.
$sql = "SELECT sum( IF(start_date >= (curdate() - INTERVAL 7 DAY), 1, 0) ) as total_lastweek
, sum( IF(start_date >= (curdate() - INTERVAL 1 month), 1, 0) ) as total_lastmonth
, sum( IF(start_date >= (curdate() - INTERVAL 3 month), 1, 0) ) as total_last3month
FROM screenshot
WHERE 1";
$screenshot_result = $wrapperObj->executeQuery($sql, []);
if ($screenshot_result === false) {
show_pdo_error($sql, $wrapperObj->getLastStatement());
}
$rci = 0;
if ($screenshot_row =$screenshot_result[0])
{
$row_class = (++$rci & 1) ? 'alt' : '';
?>
| All Screenshots |
">=$screenshot_row["total_lastweek"]?> |
">=$screenshot_row["total_lastmonth"]?> |
">=$screenshot_row["total_last3month"]?> |
}
?>
}
?>