0, "notifciations" => "Account issue"))); // Import the correct language file for this customer if (isset($_SESSION['jak_lcp_lang']) && file_exists(APP_PATH.'lang/'.$BT_LANGUAGE.'.php')) { include_once(APP_PATH.'lang/'.strtolower($BT_LANGUAGE).'.php'); } else { include_once(APP_PATH.'lang/'.JAK_LANG.'.php'); } // Get the absolute url for the image $base_url = str_replace('template/business/', '', BASE_URL); // Reset some vars $tccount = 0; $cl_tickets = array(); $ctickets = ""; // Now only get the tickets from the logged in client $cl_tickets = $jakdb->select("support_tickets", ["[>]support_departments" => ["depid" => "id"]], ["support_tickets.id", "support_tickets.subject", "support_tickets.updated"], ["AND" => ["support_tickets.opid" => $_SESSION['opid'], "support_tickets.status" => 2, "support_tickets.clientid" => JAK_CLIENTID], "ORDER" => ["support_tickets.updated" => "DESC"], "LIMIT" => 10]); if (isset($cl_tickets) && !empty($cl_tickets)) { foreach ($cl_tickets as $ti) { $ctickets .= '
'.$ti["subject"].'
'.JAK_base::jakTimesince($ti["updated"], JAK_DATEFORMAT, JAK_TIMEFORMAT).'
'; $tccount++; } // Nice format $notimsg = sprintf($jkl['hd164'], $tccount); die(json_encode(array("status" => 1, "notifications" => $notimsg, "tickets" => $ctickets))); } die(json_encode(array("status" => 0, "notifciations" => $jkl['hd165']))); ?>