www-thermferm/archives.php

changeset 517
5fd12d9f3f84
parent 397
00ca08f5a6f8
child 536
e833bbd5e733
--- a/www-thermferm/archives.php	Sun Jun 25 13:02:06 2017 +0200
+++ b/www-thermferm/archives.php	Mon Jun 26 13:58:11 2017 +0200
@@ -1,6 +1,6 @@
 <?php
 /*****************************************************************************
- * Copyright (C) 2015
+ * Copyright (C) 2015-2017
  *   
  * Michiel Broek <mbroek at mbse dot eu>
  *
@@ -50,6 +50,7 @@
     global	$my_style;
 
     $name = urldecode($_GET['name']);
+    $return = urldecode($_GET['return']);
 
     $answer = send_cmd('GLOBAL GET');
     $arr = explode("\r\n", $answer);
@@ -92,8 +93,13 @@
     $outstr .= '    <div id="title">'.PHP_EOL;
     $outstr .= '     ThermFerm '.$version.PHP_EOL;
     $outstr .= '    </div>'.PHP_EOL;
-    $outstr .= '    <form action="archives.php" style="margin:30px; float:right">'.PHP_EOL;
-    $outstr .= '     <input type="submit" id="archives" value="Archives directory" />'.PHP_EOL;
+    if ("$return" == "archives") {
+    	$outstr .= '    <form action="archives.php" style="margin:30px; float:right">'.PHP_EOL;
+    	$outstr .= '     <input type="submit" id="archives" value="Archives directory" />'.PHP_EOL;
+    } else {
+	$outstr .= '    <form action="index.php" style="margin:30px; float:right">'.PHP_EOL;
+	$outstr .= '     <input type="submit" id="archives" value="Dashboard" />'.PHP_EOL;
+    }
     $outstr .= '    </form>'.PHP_EOL;
     $outstr .= '   </div> <!-- header -->'.PHP_EOL;
     $outstr .= '   <div id="content">'.PHP_EOL;
@@ -303,7 +309,7 @@
 	    $outstr .= '       <td class="setup">'.$f[2].'</td>'.PHP_EOL;
 	    $outstr .= '       <td class="setup">'.$f[3].'</td>'.PHP_EOL;
 	    $outstr .= '       <td class="setup"><a href="archives.php?action=dl&amp;name='.$name.'">Download</a>';
-	    $outstr .= ' <a href="archives.php?action=view&amp;name='.$name.'">View</a></td>'.PHP_EOL;
+	    $outstr .= ' <a href="archives.php?action=view&amp;return=archives&amp;name='.$name.'">View</a></td>'.PHP_EOL;
 	    $outstr .= '      </tr>'.PHP_EOL;
 	    $j++;
 	}

mercurial