www-thermferm/profiles.php

changeset 136
264e5ee5abfc
parent 134
f05601490415
child 137
e4518fd9b626
--- a/www-thermferm/profiles.php	Fri Jul 25 23:28:44 2014 +0200
+++ b/www-thermferm/profiles.php	Sat Jul 26 13:18:00 2014 +0200
@@ -86,6 +86,10 @@
 
 
 
+/*
+ * @link Edit profile
+ * @link Add profile
+ */
 function profile_list() {
 	
     $sock = open_socket();
@@ -112,7 +116,12 @@
 
     $outstr .= '    <div id="etable">'.PHP_EOL;
     $outstr .= '     <table class="setup">'.PHP_EOL;
-    $outstr .= '      <tr style="background-color: #FFCC01;"><td class="setup">UUID</td><td class="setup">Name</td><td class="setup">Steps</td><td class="setup">spare</td></tr>'.PHP_EOL;
+    $outstr .= '      <tr style="background-color: #FFCC01;">'.PHP_EOL;
+    $outstr .= '       <td class="setup">UUID</td>'.PHP_EOL;
+    $outstr .= '       <td class="setup">Name</td>'.PHP_EOL;
+    $outstr .= '       <td class="setup">Steps</td>'.PHP_EOL;
+    $outstr .= '       <td class="setup">Edit</td>'.PHP_EOL;
+    $outstr .= '      </tr>'.PHP_EOL;
 
     if (startsWith($arr[0], "212")) {
     	$j = 1;
@@ -120,7 +129,16 @@
 	    if (strcmp($arr[$j], ".") == 0)
 	    	break;
 	    $f = explode(",", $arr[$j]);
-	    $outstr .= '      <tr class="setup"><td class="setup">'.$f[0].'</td><td class="setup">'.$f[1].'</td><td class="setup">'.$f[2].'</td><td class="setup">bla</td></tr>'.PHP_EOL;
+	    $busy = 0;
+	    $outstr .= '      <tr class="setup">'.PHP_EOL;
+	    $outstr .= '       <td class="setup">'.$f[0].'</td>'.PHP_EOL;
+	    $outstr .= '       <td class="setup">'.$f[1].'</td>'.PHP_EOL;
+	    $outstr .= '       <td class="setup">'.$f[2].'</td>'.PHP_EOL;
+	    if ($busy == 1)
+	    	$outstr .= '       <td class="setup">Busy</td>'.PHP_EOL;
+	    else
+	    	$outstr .= '       <td class="setup"><a href="profiles.php?action=edit&amp;UUID='.$f[0].'">Edit</a></td>'.PHP_EOL;
+	    $outstr .= '      </tr>'.PHP_EOL;
 	    $j++;
     	}
     }

mercurial