} elseif ($url_do == 'delete') {
    echo $Servers->delete($url_id);
} elseif ($url_do == 'create_getport') {
    $url_tplid = $GPXIN['tplid'];
    $result_port = @mysql_query("SELECT \r\n    \t\t\t\t    d.port \r\n\t\t\t\t  FROM default_games AS d \r\n\t\t\t\t  LEFT JOIN templates AS t ON \r\n\t\t\t\t    t.cfgid = d.id \r\n\t\t\t\t  WHERE \r\n\t\t\t\t    t.id = '{$url_tplid}' \r\n\t\t\t\t  LIMIT 1") or die('Failed to query for default port');
    $row_port = mysql_fetch_row($result_port);
    $this_port = $row_port[0];
    if (empty($this_port)) {
        echo '(none found)';
    } else {
        echo $this_port;
    }
} elseif ($url_do == 'getinfo') {
    echo $Servers->getcpuinfo($url_id);
} elseif ($url_do == 'getoutput') {
    echo $Servers->getoutput($url_id);
} elseif ($url_do == 'sendscreencmd') {
    $url_cmd = $GPXIN['cmd'];
    echo $Servers->send_screen_cmd($url_id, $url_cmd);
} elseif ($url_do == 'multi_query') {
    // Game or voice or all
    $url_type = $GPXIN['t'];
    if ($url_type == 'g') {
        $sql_where = "WHERE s.type = 'game'";
    } elseif ($url_type == 'v') {
        $sql_where = "WHERE s.type = 'voice'";
    } else {
        $sql_where = '';
    }
    // List servers
    $total_srv = 0;