3 * Report to view the background services.
5 * Copyright (C) 2013 Brady Miller <brady@sparmy.com>
7 * LICENSE: This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://opensource.org/licenses/gpl-license.php>;.
19 * @author Brady Miller <brady@sparmy.com>
20 * @link http://www.open-emr.org
23 //SANITIZE ALL ESCAPES
24 $sanitize_all_escapes=true;
27 //STOP FAKE REGISTER GLOBALS
28 $fake_register_globals=false;
31 require_once("../globals.php");
37 <?php
html_header_show();?
>
39 <link rel
="stylesheet" href
="<?php echo $css_header;?>" type
="text/css">
41 <title
><?php
echo xlt('Background Services'); ?
></title
>
43 <script type
="text/javascript" src
="../../library/js/jquery-1.7.2.min.js"></script
>
45 <style type
="text/css">
47 /* specifically include & exclude from printing */
53 #report_parameters_daterange {
57 #report_results table {
62 /* specifically exclude some from the screen */
64 #report_parameters_daterange {
73 <body
class="body_top">
75 <span
class='title'><?php
echo xlt('Background Services'); ?
></span
>
77 <form method
='post' name
='theform' id
='theform' action
='background_services.php' onsubmit
='return top.restoreSession()'>
79 <div id
="report_parameters">
83 <div style
='float:left'>
86 <div style
='margin-left:15px'>
87 <a id
='refresh_button' href
='#' class='css_button' onclick
='top.restoreSession(); $("#theform").submit()'>
89 <?php
echo xlt('Refresh'); ?
>
97 </div
> <!-- end of search parameters
-->
103 <div id
="report_results">
108 <?php
echo xlt('Service Name'); ?
>
112 <?php
echo xlt('Active'); ?
>
116 <?php
echo xlt('Automatic'); ?
>
120 <?php
echo xlt('Interval (minutes)'); ?
>
124 <?php
echo xlt('Currently Running'); ?
>
128 <?php
echo xlt('Last Run Started At'); ?
>
132 <?php
echo xlt('Next Scheduled Run'); ?
>
140 <tbody
> <!-- added
for better
print-ability
-->
143 $res = sqlStatement("SELECT *, (`next_run` - INTERVAL `execute_interval` MINUTE) as `last_run_start`" .
144 " FROM `background_services` ORDER BY `sort_order`");
145 while ($row = sqlFetchArray($res)) {
148 <td align
='center'><?php
echo xlt($row['title']); ?
></td
>
150 <td align
='center'><?php
echo ($row['active']) ?
xlt("Yes") : xlt("No"); ?
></td
>
152 <?php
if ($row['active']) { ?
>
153 <td align
='center'><?php
echo ($row['execute_interval'] > 0) ?
xlt("Yes") : xlt("No"); ?
></td
>
155 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
158 <?php
if ($row['active'] && ($row['execute_interval'] > 0)) { ?
>
159 <td align
='center'><?php
echo text($row['execute_interval']); ?
></td
>
161 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
164 <td align
='center'><?php
echo ($row['running']>0) ?
xlt("Yes") : xlt("No"); ?
></td
>
166 <?php
if ( $row['running'] > -1) { ?
>
167 <td align
='center'><?php
echo text($row['last_run_start']); ?
></td
>
169 <td align
='center'><?php
echo xlt('Never'); ?
></td
>
172 <?php
if ( $row['active'] && ($row['execute_interval'] > 0) ) { ?
>
173 <td align
='center'><?php
echo text($row['next_run']); ?
></td
>
175 <td align
='center'><?php
echo xlt('Not Applicable'); ?
></td
>
178 <?php
if ($row['name'] == "phimail") { ?
>
179 <td align
='center'><a href
='direct_message_log.php' onclick
='top.restoreSession()'><?php
echo xlt("View Log"); ?
></a
></td
>
181 <td align
='center'> 
;</td
>
186 } // $row = sqlFetchArray($res) while
190 </div
> <!-- end of search results
-->