diff --git a/admin/voipmonitor.php b/admin/voipmonitor.php
index 5ee96845..7cd081cd 100644
--- a/admin/voipmonitor.php
+++ b/admin/voipmonitor.php
@@ -65,7 +65,7 @@ if ($p)
if (isset($_GET['kill']))
kill_process($p);
- xhtml_head(T_("Monitor VoIP Process"),true,false,false,false,10);
+ xhtml_head(T_("Monitor VoIP Process"),true,false,false,false,10,true);
print "
" . T_("Running process:") . " $p
";
@@ -81,7 +81,10 @@ if ($p)
else
{
xhtml_head(T_("Monitor VoIP Process"));
+ print "" . T_("Monitor VoIP Process") . "
";
print "" . T_("Click here to begin monitoring the VoIP Process") . "
";
+ print "" . T_("Outcome of last process run (if any)") . "
";
+ print process_get_last_data();
}
xhtml_foot();
diff --git a/functions/functions.process.php b/functions/functions.process.php
index 7f416d9f..a25ffed9 100644
--- a/functions/functions.process.php
+++ b/functions/functions.process.php
@@ -217,4 +217,27 @@ function process_get_data($process_id)
return "";
}
+/**
+ * Get data from the last process run
+ *
+ * @return string Data from the last process, or an empty string if not available
+ *
+ */
+function process_get_last_data()
+{
+ global $db;
+
+ $sql = "SELECT `data`
+ FROM `process`
+ ORDER BY `process_id` DESC
+ LIMIT 1";
+
+ $rs = $db->GetRow($sql);
+
+ if (!empty($rs))
+ return $rs['data'];
+
+ return "";
+}
+
?>
diff --git a/functions/functions.xhtml.php b/functions/functions.xhtml.php
index d6639ef1..946a5984 100644
--- a/functions/functions.xhtml.php
+++ b/functions/functions.xhtml.php
@@ -39,10 +39,11 @@
* @param bool|array $javascript False for no Javascript otherwise array of Javascript include files
* @param string $bodytext Space in the body element: good for onload='top.close()' to close validly
* @param bool|int $refresh False or 0 for no refresh otherwise the number of seconds to refresh
+ * @param bool $clearrefresh False if we want to pass on any GET request in header, True to clear
*
* @see xhtml_foot()
*/
-function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false)
+function xhtml_head($title="",$body=true,$css=false,$javascript=false,$bodytext=false,$refresh=false,$clearrefresh=false)
{
?>
";
if ($refresh)
+ {
print "
- ";
+ ";
+ }
if (!$body) return;
?>