function editable_section(&$properties, $row_count) { if (count($properties) == 0) { return; } print '<table>'; for ($i = 0; $i < $row_count; $i++) { $prop = array_shift($properties); if ($prop === null) { break; } print '<tr>'; print '<td style="width: 10em;">' . $prop[1] . '</td>'; print '<td><input type="text" name="' . $prop[0] . '" size="20" value="' . $prop[2] . '" style="width:95%"></td>'; print '<td style="width: 1.5em;"><a href="?del-name=' . $prop[0] . '&page=chat&subpage=defaults">'; JxWidget::small_delete_icon(); print '</a></td>'; print '</tr>'; } print '</table>'; }
function show_server_files() { $list = server_file_list(); ?> <table style="width: auto; min-width: 27em;"> <tr> <th>File</th> <th style="width: 7em;">Status</th> <th style="width: 1.5em;"></th> <th style=""></th> </tr> <?php foreach ($list as $file) { print '<tr>'; print '<td>' . basename($file[1], '.aiml') . '</td>'; if ($file[2] == 'Loaded') { $color = ' class="green"'; } else { if ($file[2] == 'Load Error') { $color = ' class="red"'; } else { $color = ''; } } print '<td' . $color . '>' . $file[2] . '</td>'; print '<td><a href="?page=import&action=delete-file&file=' . $file[1] . '">'; JxWidget::small_delete_icon(); print '</a></td>'; print '<td>'; if (substr($file[2], 0, 7) != 'Loading') { print '<button type="submit" name="action" value="file-toggle-' . $file[1] . '">'; if ($file[2] == 'Loaded') { print 'Unload'; } else { print 'Load'; } print '</button>'; } print '</td>'; print '</tr>'; } ?> </table> <?php }