You are here

function _support_overview_alert in Support Ticketing System 7

Same name and namespace in other branches
  1. 6 support_overview/support_overview.module \_support_overview_alert()

Add CSS classes to highlight clients and users with old tickts.

2 calls to _support_overview_alert()
support_overview_page_user in support_overview/support_overview.module
support_overview_summary in support_overview/support_overview.module
Display support ticket overview, highlighting ticket queues with tickets older than a configurable age limit.

File

support_overview/support_overview.module, line 413
support_overview.module

Code

function _support_overview_alert($time) {
  if (!empty($time)) {
    $alert3 = variable_get('support_overview_alert3', 0);
    $alert2 = variable_get('support_overview_alert2', 0);
    $alert1 = variable_get('support_overview_alert1', 0);

    // Level 3 alert
    if ($alert3 && time() - $time > $alert3) {
      return ' alert3';
    }

    // Level 2 alert
    if ($alert2 && time() - $time > $alert2) {
      return ' alert2';
    }

    // Level 1 alert
    if ($alert1 && time() - $time > $alert1) {
      return ' alert1';
    }
  }
}