Index: /trunk/FACT++/www/smartfact/index.js
===================================================================
--- /trunk/FACT++/www/smartfact/index.js	(revision 17022)
+++ /trunk/FACT++/www/smartfact/index.js	(revision 17023)
@@ -203,9 +203,10 @@
 
 
-function submit(script)
+function submit(script, isIrq)
 {
     var inputs = document.getElementsByTagName("input");
 
-    var args = "start="+script+".js";
+    var args = isIrq ? "interrupt="+script : "start="+script+".js";
+
     for (var i=0; i<inputs.length; i++)
         args += "&"+inputs[i].name+"="+inputs[i].value;
@@ -241,5 +242,6 @@
 
     var title  = lines[0];
-    var is_cmd = title[0]=='*';
+    var is_cmd = title[0]=='*' || title[0]=='!';
+    var is_irq = title[0]=='!';
     var script = title.split('|');
     if (is_cmd)
@@ -347,5 +349,5 @@
     if (is_cmd)
     {
-        sp1.onclick = function () { this.style.backgroundColor='rgba(0,0,0,0.77)'; submit(script); this.style.backgroundColor=''; };
+        sp1.onclick = function () { this.style.backgroundColor='rgba(0,0,0,0.77)'; submit(script, is_irq); this.style.backgroundColor=''; };
     }
     else
Index: /trunk/FACT++/www/smartfact/index.php
===================================================================
--- /trunk/FACT++/www/smartfact/index.php	(revision 17022)
+++ /trunk/FACT++/www/smartfact/index.php	(revision 17023)
@@ -169,5 +169,5 @@
 // --------------------------------------------------------------------
 
-if (!isset($_GET['start']) && !isset($_GET['stop']))
+if (!isset($_GET['start']) && !isset($_GET['stop']) && !isset($_GET['interrupt']))
     return header('HTTP/1.0 400 Command not supported');
 
@@ -217,6 +217,5 @@
     if (isset($_GET['msg']))
     {
-        if ($_GET['msg']>=0)
-            $msg = $_GET['msg'];
+        $msg = $_GET['msg'];
         unset($_GET['msg']);
     }
@@ -271,4 +270,34 @@
 }
 
+if (isset($_GET['interrupt']))
+{
+    unset($_GET['interrupt']);
+
+    $irq = "";
+    if (isset($_GET['interrupt']))
+    {
+        $irq = $_GET['irq'];
+        unset($_GET['interrupt']);
+    }
+
+    $args = "";
+    foreach ($_GET as $key => $value)
+        $args .= ' "'.$key.'"="'.$value.'"';
+
+    $cmd = $path.'/dimctrl --user "'.$_SERVER['PHP_AUTH_USER'].'"  --interrupt '.escapeshellarg($irq.$args);
+
+    // Execute
+    $str = exec($cmd, $out, $rc);
+
+    // Logging (mainly for debugging)
+    $d = date("Y/m");
+    $path = "log/".$d;
+    if (!file_exists($path))
+        mkdir($path, 0777, true);
+    $file = fopen($path."/exec.log", "a");
+    fwrite($file, $cmd."\n".$str."\n\n");
+    fclose($file);
+}
+
 if ($rc>1)
     return header('HTTP/1.0 500 Execution failed [rc='.$rc."]");
