$ret = $lv->network_change_xml($name, $_POST['xmldesc']) ? "Network definition has been changed" : 'Error changing network definition: ' . $lv->get_last_error();
                     } else {
                         $ret = 'Editing network XML description: <br /><br /><form method="POST"><table><tr><td>Network XML description: </td>' . '<td><textarea name="xmldesc" rows="25" cols="90%">' . $xml . '</textarea></td></tr><tr align="center"><td colspan="2">' . '<input type="submit" value=" Edit domain XML description "></tr></form>';
                     }
                 } else {
                     $ret = 'XML dump of network <i>' . $name . '</i>:<br /><br />' . htmlentities($lv->get_network_xml($name, false));
                 }
             }
         }
     }
 }
 echo "<h3>List of networks</h3>";
 $tmp = $lv->get_networks(VIR_NETWORKS_ALL);
 echo "<table>\n\t\t\t<tr>\n\t\t\t <th>Network name {$spaces}</th>\n\t\t\t <th>{$spaces} Network state {$spaces}</th>\n\t\t\t <th>{$spaces} Gateway IP Address {$spaces}</th>\n\t\t\t <th>{$spaces} IP Address Range {$spaces}</th>\n\t\t\t <th>{$spaces} Forwarding {$spaces}</th>\n\t\t\t <th>{$spaces} DHCP Range {$spaces}</th>\n\t\t\t <th>{$spaces} Actions {$spaces}</th>\n\t\t\t</tr>";
 for ($i = 0; $i < sizeof($tmp); $i++) {
     $tmp2 = $lv->get_network_information($tmp[$i]);
     if ($tmp2['forwarding'] != 'None') {
         $forward = $tmp2['forwarding'] . ' to ' . $tmp2['forward_dev'];
     } else {
         $forward = 'None';
     }
     if (array_key_exists('dhcp_start', $tmp2) && array_key_exists('dhcp_end', $tmp2)) {
         $dhcp = $tmp2['dhcp_start'] . ' - ' . $tmp2['dhcp_end'];
     } else {
         $dhcp = 'Disabled';
     }
     $activity = $tmp2['active'] ? 'Active' : 'Inactive';
     $act = !$tmp2['active'] ? "<a href=\"?action={$_GET['action']}&amp;subaction=start&amp;name={$tmp2['name']}\">Start network</a>" : "<a href=\"?action={$_GET['action']}&amp;subaction=stop&amp;name={$tmp2['name']}\">Stop network</a>";
     $act .= " | <a href=\"?action={$_GET['action']}&amp;subaction=dumpxml&amp;name={$tmp2['name']}\">Dump network XML</a>";
     if (!$tmp2['active']) {
         $act .= ' | <a href="?action=' . $_GET['action'] . '&amp;subaction=edit&amp;name=' . $tmp2['name'] . '">Edit network</a>';