Changing the IPs for DNS Wizard

Discussion in 'ISPConfig 3 Priority Support' started by tortib, Jan 25, 2015.

  1. tortib

    tortib Member

    Hello,
    I would like to have the IPs showing for the DNS wizard to be the IPs of the server instead of the IPs from the DNS zones. I'm looking at the following file:
    Code:
    /usr/local/ispconfig/interface/web/dns/ajax_get_json.php
    That file shows that there is a query commented out that is:
    Code:
    //$result[] = _search('admin', 'server_ip', "AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
    
    So I tried to remove the comments and then commented out
    Code:
    $result[] = $app->functions->suggest_ips('IPv4');
    so it looks like this:
    Code:
    $result = array();
    // ipv4
    $result[] = _search('admin', 'server_ip', "AND ip_type = 'IPv4' AND (client_id = 0 OR client_id=".$app->functions->intval($_SESSION['s']['user']['client_id']).")");
    //$result[] = $app->functions->suggest_ips('IPv4');
    $json = $app->functions->json_encode($result);
    
    However it doesn't seem to show the popup box that has the server IP listed in there. Would you be able to help me troubleshoot this issue so I can have just the IP(s) from server_ip showing as a suggested IP?

    Thank you.
     
  2. tortib

    tortib Member

    It appears that I had the _search function commented out in the
    /usr/local/ispconfig/interface/web/dns/ajax_get_json.php file. I have uncommented it and now it displays the popup box, but the IP isn't populated inside of it for users only. The administrator user is able to see the IP address but the users themselves do not show the IP.
     
  3. tortib

    tortib Member

    Okay I got it to work.
    Here is the code I used for the $result[] array.
    Code:
    $result[] = _search('admin', 'server_ip', "AND ip_type = 'IPv4'");
     

Share This Page