www-thermferm/profiles.php

changeset 136
264e5ee5abfc
parent 134
f05601490415
child 137
e4518fd9b626
equal deleted inserted replaced
135:0882292322b3 136:264e5ee5abfc
84 } 84 }
85 } 85 }
86 86
87 87
88 88
89 /*
90 * @link Edit profile
91 * @link Add profile
92 */
89 function profile_list() { 93 function profile_list() {
90 94
91 $sock = open_socket(); 95 $sock = open_socket();
92 if ($sock == false) { 96 if ($sock == false) {
93 echo ""; 97 echo "";
110 $outstr .= ' <div id="errors">'.PHP_EOL; 114 $outstr .= ' <div id="errors">'.PHP_EOL;
111 $outstr .= ' </div> <!-- errors -->'.PHP_EOL; 115 $outstr .= ' </div> <!-- errors -->'.PHP_EOL;
112 116
113 $outstr .= ' <div id="etable">'.PHP_EOL; 117 $outstr .= ' <div id="etable">'.PHP_EOL;
114 $outstr .= ' <table class="setup">'.PHP_EOL; 118 $outstr .= ' <table class="setup">'.PHP_EOL;
115 $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; 119 $outstr .= ' <tr style="background-color: #FFCC01;">'.PHP_EOL;
120 $outstr .= ' <td class="setup">UUID</td>'.PHP_EOL;
121 $outstr .= ' <td class="setup">Name</td>'.PHP_EOL;
122 $outstr .= ' <td class="setup">Steps</td>'.PHP_EOL;
123 $outstr .= ' <td class="setup">Edit</td>'.PHP_EOL;
124 $outstr .= ' </tr>'.PHP_EOL;
116 125
117 if (startsWith($arr[0], "212")) { 126 if (startsWith($arr[0], "212")) {
118 $j = 1; 127 $j = 1;
119 while (1) { 128 while (1) {
120 if (strcmp($arr[$j], ".") == 0) 129 if (strcmp($arr[$j], ".") == 0)
121 break; 130 break;
122 $f = explode(",", $arr[$j]); 131 $f = explode(",", $arr[$j]);
123 $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; 132 $busy = 0;
133 $outstr .= ' <tr class="setup">'.PHP_EOL;
134 $outstr .= ' <td class="setup">'.$f[0].'</td>'.PHP_EOL;
135 $outstr .= ' <td class="setup">'.$f[1].'</td>'.PHP_EOL;
136 $outstr .= ' <td class="setup">'.$f[2].'</td>'.PHP_EOL;
137 if ($busy == 1)
138 $outstr .= ' <td class="setup">Busy</td>'.PHP_EOL;
139 else
140 $outstr .= ' <td class="setup"><a href="profiles.php?action=edit&amp;UUID='.$f[0].'">Edit</a></td>'.PHP_EOL;
141 $outstr .= ' </tr>'.PHP_EOL;
124 $j++; 142 $j++;
125 } 143 }
126 } 144 }
127 145
128 $outstr .= ' </table>'.PHP_EOL; 146 $outstr .= ' </table>'.PHP_EOL;

mercurial