}
    echo "</table>";
    echo strpos($msg, '<form') ? $msg : '<pre>' . $msg . '</pre>';
} else {
    if ($action == 'node-devices') {
        echo "<h2>Node devices</h2>";
        echo "Here's the list of node devices available on the host machine. You can dump the information about the node devices there so you have simple way " . "to check presence of the devices using this page.<br /><br />";
        $ret = false;
        if (array_key_exists('subaction', $_GET)) {
            $name = $_GET['name'];
            if ($_GET['subaction'] == 'dumpxml') {
                $ret = 'XML dump of node device <i>' . $name . '</i>:<br /><br />' . htmlentities($lv->get_node_device_xml($name, false));
            }
        }
        echo "Host node devices capability list: ";
        $tmp = $lv->get_node_device_cap_options();
        for ($i = 0; $i < sizeof($tmp); $i++) {
            echo "<a href=\"?action={$_GET['action']}&amp;cap={$tmp[$i]}\">{$tmp[$i]}</a>";
            if ($i < sizeof($tmp) - 1) {
                echo ', ';
            }
        }
        echo "<br /><br />";
        $tmp = $lv->get_node_devices(array_key_exists('cap', $_GET) ? $_GET['cap'] : false);
        echo "<table>\n\t\t\t<tr>\n\t\t\t <th>Device name {$spaces}</th>\n\t\t\t <th>{$spaces} Identification {$spaces}</th>\n\t\t\t <th>{$spaces} Driver name {$spaces}</th>\n\t\t\t <th>{$spaces} Vendor {$spaces}</th>\n\t\t\t <th>{$spaces} Product {$spaces}</th>\n\t\t\t <th>{$spaces} Action {$spaces}</th>\n\t\t\t</tr>";
        for ($i = 0; $i < sizeof($tmp); $i++) {
            $tmp2 = $lv->get_node_device_information($tmp[$i]);
            $act = !array_key_exists('cap', $_GET) ? "<a href=\"?action={$_GET['action']}&amp;subaction=dumpxml&amp;name={$tmp2['name']}\">Dump configuration</a>" : "<a href=\"?action={$_GET['action']}&amp;subaction=dumpxml&amp;cap={$_GET['cap']}&amp;name={$tmp2['name']}\">Dump configuration</a>";
            if ($tmp2['capability'] == 'system') {
                $driver = '-';
                $vendor = array_key_exists('hardware_vendor', $tmp2) ? $tmp2['hardware_vendor'] : '';