$domName = $lv->domain_get_name_by_uuid($_GET['uuid']);
     if ($action == 'domain-start') {
         $ret = $lv->domain_start($domName) ? "Domain has been started successfully" : 'Error while starting domain: ' . $lv->get_last_error();
     } else {
         if ($action == 'domain-stop') {
             $ret = $lv->domain_shutdown($domName) ? "Domain has been stopped successfully" : 'Error while stopping domain: ' . $lv->get_last_error();
         } else {
             if ($action == 'domain-destroy') {
                 $ret = $lv->domain_destroy($domName) ? "Domain has been destroyed successfully" : 'Error while destroying domain: ' . $lv->get_last_error();
             } else {
                 if ($action == 'domain-get-xml' || $action == 'domain-edit') {
                     $inactive = !$lv->domain_is_running($domName) ? true : false;
                     $xml = $lv->domain_get_xml($domName, $inactive);
                     if ($action == 'domain-edit') {
                         if (@$_POST['xmldesc']) {
                             $ret = $lv->domain_change_xml($domName, $_POST['xmldesc']) ? "Domain definition has been changed" : 'Error changing domain definition: ' . $lv->get_last_error();
                         } else {
                             $ret = 'Editing domain XML description: <br /><br /><form method="POST"><table><tr><td>Domain 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 = "Domain XML for domain <i>{$domName}</i>:<br /><br />" . htmlentities($xml);
                     }
                 }
             }
         }
     }
 }
 $doms = $lv->get_domains();
 $domkeys = array_keys($doms);
 echo "<table>\n\t\t\t   <tr>\n\t\t\t\t<th>Name</th>\n\t\t\t\t<th>CPU#</th>\n\t\t\t\t<th>Memory</th>\n\t\t\t\t<th>Disk(s)</th>\n\t\t\t\t<th>NICs</th>\n\t\t\t\t<th>Arch</th>\n\t\t\t\t<th>State</th>\n\t\t\t\t<th>ID / VNC port</th>";
 if ($tmp['active'] > 0 && $lv->supports('screenshot')) {