function form_subnet()
 {
     global $db, $vars, $lang;
     $form_subnet = new form(array('FORM_NAME' => 'form_subnet'));
     $form_subnet->db_data('subnets.ip_start, subnets.ip_end, subnets.type, subnets.link_id, subnets.client_node_id');
     $links = $db->get('links.id AS value, links.type, links.ssid, nodes.name, links.peer_node_id, "" AS output', "links\n\t\t\t\t\t\t\tLEFT JOIN nodes ON links.peer_node_id = nodes.id", "(links.type = 'ap' OR links.type = 'p2p') AND node_id = " . intval(get('node')), "", "links.type ASC, links.date_in ASC");
     foreach ((array) $links as $key => $value) {
         $links[$key]['output'] .= $lang['db']['links__type-' . $value['type']] . ' - ';
         if ($value['type'] == 'ap') {
             $links[$key]['output'] .= $links[$key]['ssid'];
         }
         if ($value['type'] == 'p2p') {
             $links[$key]['output'] .= $links[$key]['name'] . ' (#' . $links[$key]['peer_node_id'] . ')';
         }
     }
     $form_subnet->db_data_enum('subnets.link_id', $links);
     $clients = $db->get('cl_n.id AS value, ap_l.ssid, cl_n.name, cl_n.id, "" AS output', "links AS cl_l " . "LEFT JOIN links AS ap_l ON cl_l.peer_ap_id = ap_l.id\n\t\t\t\t\t\t\tLEFT JOIN nodes AS ap_n ON ap_l.node_id = ap_n.id " . "LEFT JOIN nodes AS cl_n ON cl_l.node_id = cl_n.id", "cl_l.type = 'client' AND ap_l.type = 'ap' AND ap_l.node_id = " . intval(get('node')), "", "ap_l.date_in ASC, cl_l.date_in ASC");
     foreach ((array) $clients as $key => $value) {
         $clients[$key]['output'] = '[' . $lang['db']['links__type-ap'] . ' ' . $clients[$key]['ssid'] . '] - ' . $clients[$key]['name'] . ' (#' . $clients[$key]['id'] . ')';
     }
     $form_subnet->db_data_enum('subnets.client_node_id', $clients);
     $form_subnet->db_data_values("subnets", "id", get('subnet'));
     if (get('subnet') != 'add') {
         $form_subnet->data[0]['value'] = long2ip($form_subnet->data[0]['value']);
         $form_subnet->data[1]['value'] = long2ip($form_subnet->data[1]['value']);
     }
     return $form_subnet;
 }
 function form_range()
 {
     global $construct, $db, $vars, $main;
     $form_range = new form(array('FORM_NAME' => 'form_range'));
     $form_range->db_data('ip_ranges.ip_start, ip_ranges.ip_end, ip_ranges.info, ip_ranges.status');
     $form_range->db_data_values("ip_ranges", "id", get('iprange'));
     $form_range->data[0]['value'] = long2ip($form_range->data[0]['value']);
     $form_range->data[1]['value'] = long2ip($form_range->data[1]['value']);
     $tmp = $db->get('users.email, users_nodes.owner', 'users, users_nodes, ip_ranges', "users_nodes.user_id = users.id AND users_nodes.node_id = ip_ranges.node_id AND ip_ranges.id = '" . get("iprange") . "'");
     if (!isset($form_range->info['email_all'])) {
         $form_range->info['email_all'] = '';
     }
     if (!isset($form_range->info['email_owner'])) {
         $form_range->info['email_owner'] = '';
     }
     foreach ((array) $tmp as $key => $value) {
         $form_range->info['email_all'] .= $value['email'] . ', ';
         if ($value['owner'] == 'Y') {
             $form_range->info['email_owner'] .= $value['email'] . ', ';
         }
     }
     $form_range->info['email_all'] = substr($form_range->info['email_all'], 0, -2);
     $form_range->info['email_owner'] = substr($form_range->info['email_owner'], 0, -2);
     $t = $db->get('nodes.id, nodes.name', 'nodes, ip_ranges', "ip_ranges.node_id = nodes.id AND ip_ranges.id = '" . get('iprange') . "'");
     $form_range->info['node_name'] = $t[0]['name'];
     $form_range->info['node_id'] = $t[0]['id'];
     $form_range->info['hostmaster_username'] = $main->userdata->info['username'];
     $form_range->info['hostmaster_name'] = $main->userdata->info['name'];
     $form_range->info['hostmaster_surname'] = $main->userdata->info['surname'];
     return $form_range;
 }
Beispiel #3
0
 function form_range()
 {
     global $construct, $db, $vars, $main;
     if (!$this->has_edit_access()) {
         $main->message->set_fromlang('info', 'no_privilege');
     }
     $form_range = new form(array('FORM_NAME' => 'form_range'));
     $form_range->db_data('ip_ranges.ip_start, ip_ranges.ip_end, ip_ranges.info, ip_ranges.status');
     #removed: ip_ranges.nodeid #bug
     $form_range->db_data_values("ip_ranges", "id", get('iprange'));
     $form_range->data[0]['value'] = long2ip($form_range->data[0]['value']);
     $form_range->data[1]['value'] = long2ip($form_range->data[1]['value']);
     $tmp = $db->get('users.email, users_nodes.owner', 'users, users_nodes, ip_ranges', "users_nodes.user_id = users.id AND users_nodes.node_id = ip_ranges.node_id AND ip_ranges.id = '" . get("iprange") . "'");
     $form_range->info['email_all'] = null;
     $form_range->info['email_owner'] = null;
     foreach ((array) $tmp as $key => $value) {
         $form_range->info['email_all'] .= $value['email'] . ', ';
         if ($value['owner'] == 'Y') {
             $form_range->info['email_owner'] .= $value['email'] . ', ';
         }
     }
     $form_range->info['email_all'] = isset($form_range->info['email_all']) ? substr($form_range->info['email_all'], 0, -2) : null;
     $form_range->info['email_owner'] = isset($form_range->info['email_owner']) ? substr($form_range->info['email_owner'], 0, -2) : null;
     $t = $db->get('nodes.id, nodes.name', 'nodes, ip_ranges', "ip_ranges.node_id = nodes.id AND ip_ranges.id = '" . get('iprange') . "'");
     $form_range->info['node_name'] = $t[0]['name'];
     $form_range->info['node_id'] = $t[0]['id'];
     $form_range->info['hostmaster_username'] = $main->userdata->info['username'];
     $form_range->info['hostmaster_name'] = $main->userdata->info['name'];
     $form_range->info['hostmaster_surname'] = $main->userdata->info['surname'];
     return $form_range;
 }
 function form_zone()
 {
     global $db, $vars, $main;
     $form_zone = new form(array('FORM_NAME' => 'form_zone'));
     $form_zone->db_data('dns_zones.name, dns_zones.info, dns_zones_nameservers.nameserver_id, dns_zones.status');
     $form_zone->db_data_values("dns_zones", "id", get('zone'));
     $form_zone->db_data_pickup("dns_zones_nameservers.nameserver_id", "dns_nameservers", $db->get('dns_nameservers.id AS value, CONCAT(dns_nameservers.name, ".", nodes.name_ns, ".", "' . $vars['dns']['ns_zone'] . '") AS output', "dns_zones_nameservers, dns_nameservers, nodes", "dns_nameservers.node_id = nodes.id AND dns_nameservers.id = dns_zones_nameservers.nameserver_id AND dns_zones_nameservers.zone_id = '" . get('zone') . "'"), TRUE);
     $tmp = $db->get('users.email, users_nodes.owner', 'users, users_nodes, dns_zones', "users_nodes.user_id = users.id AND users_nodes.node_id = dns_zones.node_id AND dns_zones.id = '" . get("zone") . "'");
     foreach ((array) $tmp as $key => $value) {
         $form_zone->info['email_all'] .= $value['email'] . ', ';
         if ($value['owner'] == 'Y') {
             $form_zone->info['email_owner'] .= $value['email'] . ', ';
         }
     }
     $form_zone->info['email_all'] = substr($form_zone->info['email_all'], 0, -2);
     $form_zone->info['email_owner'] = substr($form_zone->info['email_owner'], 0, -2);
     $t = $db->get('nodes.id, nodes.name', 'nodes, dns_zones', "dns_zones.node_id = nodes.id AND dns_zones.id = '" . get('zone') . "'");
     $form_zone->info['node_name'] = $t[0]['name'];
     $form_zone->info['node_id'] = $t[0]['id'];
     $form_zone->info['hostmaster_username'] = $main->userdata->info['username'];
     $form_zone->info['hostmaster_name'] = $main->userdata->info['name'];
     $form_zone->info['hostmaster_surname'] = $main->userdata->info['surname'];
     $t = $db->get('type', 'dns_zones', "id = '" . get('zone') . "'");
     if ($t[0]['type'] == 'forward') {
         $form_zone->data[0]['value'] .= "." . $vars['dns']['root_zone'];
     }
     return $form_zone;
 }
 function form_community()
 {
     #global $db, $vars;
     global $main, $db, $vars, $lang;
     $form_community = new form(array('FORM_NAME' => 'form_community'));
     $form_community->db_data('communities.id as community_id, communities.name, communities.windURL, communities.TOS, communities.fullname, communities.dnstld, communities.ns1,communities.ns2, communities.central-node as cnode, communities.admins AS cadmins_ids');
     $form_community->db_data_values("communities", "id", get('community'));
     if (get('community') != 'add') {
         #$table_communities->data[$i]['ns1'] = long2ip($table_communities->data[$i]['ns1']);
         #$table_communities->data[$i]['ns2'] = long2ip($table_communities->data[$i]['ns2']);
         $form_community->data[5]['value'] = long2ip($form_community->data[5]['value']);
         $form_community->data[6]['value'] = long2ip($form_community->data[6]['value']);
     }
     $form_community->data[7]['Field'] = 'cnode';
     $form_community->data[8]['Field'] = 'cadmins_ids';
     $form_community->data[8]['fullField'] = 'cadmins_ids';
     #if (get('node') == 'add') {
     $temp = $db->get("users.id AS value, users.username AS output", "users", "users.id = '" . $main->userdata->user . "'");
     #} else {
     #	$temp = $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = ".intval(get('node'))." AND users_nodes.owner = 'Y'");
     #}
     $form_community->db_data_pickup("cadmins_ids", "users", $temp);
     #$form_community->db_data_pickup("users_nodes.user_id", "users", $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = ".intval(get('node'))." AND users_nodes.owner != 'Y'"), TRUE);
     #if (get('node') != 'add') {
     ######$form_community->db_data_pickup("users_nodes.user_id", "users", $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = ".intval(get('node'))." AND users_nodes.owner != 'Y'"), TRUE);
     #	} else {
     #$form_community->db_data_pickup("users_nodes.user_id", "users", null, TRUE);
     #	}
     $form_community->db_data_remove('community_id');
     return $form_community;
 }
 function form_cname()
 {
     global $db, $vars;
     $form_cname = new form(array('FORM_NAME' => 'form_cname'));
     $form_cname->db_data('ip_cname.hostname, ip_cname.cname, ip_cname.info');
     $form_cname->db_data_values("ip_cname", "id", get('cname'));
     return $form_cname;
 }
 function form_nameserver()
 {
     global $db, $vars;
     $form_nameserver = new form(array('FORM_NAME' => 'form_nameserver'));
     $form_nameserver->db_data('dns_nameservers.name' . (get('nameserver') == 'add' ? ", dns_nameservers.ip" : ""));
     $form_nameserver->db_data_values("dns_nameservers", "id", get('nameserver'));
     return $form_nameserver;
 }
 function form_nameserver()
 {
     global $db, $vars;
     $form_nameserver = new form(array('FORM_NAME' => 'form_nameserver'));
     $form_nameserver->db_data('dns_nameservers.name, dns_nameservers.ip, dns_nameservers.status');
     $form_nameserver->db_data_values("dns_nameservers", "id", get('nameserver'));
     $form_nameserver->data[1]['value'] = long2ip($form_nameserver->data[1]['value']);
     return $form_nameserver;
 }
 function form_services()
 {
     global $db, $vars;
     $form_services = new form(array('FORM_NAME' => 'form_services'));
     $form_services->db_data('services.id, services.title, services.protocol, services.port');
     $form_services->db_data_values("services", "id", get('service'));
     $form_services->db_data_remove('services__id');
     return $form_services;
 }
 function form_ipaddr()
 {
     global $db, $vars;
     $form_ipaddr = new form(array('FORM_NAME' => 'form_ipaddr'));
     $form_ipaddr->db_data('ip_addresses.hostname, ip_addresses.ip, ip_addresses.mac, ip_addresses.type, ip_addresses.always_on, ip_addresses.info');
     $form_ipaddr->db_data_values("ip_addresses", "id", get('ipaddr'));
     if (get('ipaddr') != 'add') {
         $form_ipaddr->data[1]['value'] = long2ip($form_ipaddr->data[1]['value']);
     }
     return $form_ipaddr;
 }
Beispiel #11
0
 function form_link()
 {
     global $db, $vars;
     $form_link = new form(array('FORM_NAME' => 'form_link'));
     $form_link->db_data('links.type, links.peer_node_id, links.peer_ap_id, links.protocol, links.ssid, links.channel, links.frequency, links.status, links.due_date, links.equipment, links.info');
     $form_link->db_data_values("links", "id", get('link'));
     $form_link->db_data_pickup('links.peer_node_id', "nodes", $db->get("links.peer_node_id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "links, nodes", "links.peer_node_id = nodes.id AND links.id = '" . get("link") . "'"));
     $form_link->db_data_pickup('links.peer_ap_id', "links_ap", $db->get("l1.peer_ap_id AS value, l2.ssid AS output", "links AS l1, links AS l2", "l1.peer_ap_id = l2.id AND l1.id = '" . get("link") . "'"));
     $form_link->data[1]['Null'] = '';
     $form_link->data[2]['Null'] = '';
     return $form_link;
 }
 function form_region()
 {
     global $db, $vars;
     $form_region = new form(array('FORM_NAME' => 'form_region'));
     $form_region->db_data('regions.id as region_id, regions.name, regions.ip_start, regions.ip_end,regions.dns_suffix, regions.info, regions.image, regions.min_lat, regions.min_long, regions.max_lat, regions.max_long');
     $form_region->db_data_values("regions", "id", get('region'));
     if (get('region') != 'add') {
         $form_region->data[1]['value'] = long2ip($form_region->data[1]['value']);
         $form_region->data[2]['value'] = long2ip($form_region->data[2]['value']);
     }
     $form_region->db_data_remove('region_id');
     return $form_region;
 }
 function form_ipaddr_rev()
 {
     global $db, $vars;
     $form_ipaddr_rev = new form(array('FORM_NAME' => 'form_ipaddr_rev'));
     $form_ipaddr_rev->db_data('ip_addresses.ip, ip_addresses.hostname,ip_addresses.mac, ip_addresses.type, ip_addresses.always_on, ip_addresses.info,ip_addresses.zone_type');
     $form_ipaddr_rev->db_data_values("ip_addresses", "id", get('ipaddr_rev'));
     if (get('ipaddr_rev') != 'add') {
         $form_ipaddr_rev->data[0]['value'] = long2ip($form_ipaddr_rev->data[0]['value']);
     }
     //Set default as reverse
     $form_ipaddr_rev->data[6]['value'] = 'reverse';
     return $form_ipaddr_rev;
 }
 function form_area()
 {
     global $db, $vars;
     $form_area = new form(array('FORM_NAME' => 'form_area'));
     $form_area->db_data('areas.id, areas.region_id, areas.name, areas.ip_start, areas.ip_end, areas.info');
     $form_area->db_data_enum('areas.region_id', $db->get("id AS value, name AS output", "regions"));
     $form_area->db_data_values("areas", "id", get('area'));
     if (get('area') != 'add') {
         $form_area->data[3]['value'] = long2ip($form_area->data[3]['value']);
         $form_area->data[4]['value'] = long2ip($form_area->data[4]['value']);
     }
     $form_area->db_data_remove('areas__id');
     return $form_area;
 }
 function form_region()
 {
     global $db, $vars;
     $form_region = new form(array('FORM_NAME' => 'form_region'));
     $form_region->db_data('regions.id, regions.name, regions.ip_start, regions.ip_end, regions.v6net, regions.v6prefix, regions.info');
     $form_region->db_data_values("regions", "id", get('region'));
     if (get('region') != 'add') {
         $form_region->data[2]['value'] = long2ip($form_region->data[2]['value']);
         $form_region->data[3]['value'] = long2ip($form_region->data[3]['value']);
         $form_region->data[4]['value'] = inet_ntop($form_region->data[4]['value']);
     }
     $form_region->db_data_remove('regions__id');
     return $form_region;
 }
Beispiel #16
0
 function form_link()
 {
     global $db, $vars;
     $form_link = new form(array('FORM_NAME' => 'form_link'));
     $form_link->db_data('links.type, links.peer_node_id, links.peer_ap_id, links.protocol, links.ssid, links.channel,  links.status, links.equipment, links.info, links.security, links.ip, links.hs_logged_in_msg, links.tspeed, links.throughput, links.ospfcost');
     #@#
     $form_link->db_data_values("links", "id", get('link'));
     #if (get('link') != 'add') {
     $form_link->data[10]['value'] = long2ip($form_link->data[10]['value']);
     #}
     $form_link->db_data_pickup('links.peer_node_id', "nodes", $db->get("links.peer_node_id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "links, nodes", "links.peer_node_id = nodes.id AND links.id = '" . get("link") . "'"));
     $form_link->db_data_pickup('links.peer_ap_id', "links_ap", $db->get("l1.peer_ap_id AS value, l2.ssid AS output", "links AS l1, links AS l2", "l1.peer_ap_id = l2.id AND l1.id = '" . get("link") . "'"));
     $form_link->data[1]['Null'] = '';
     $form_link->data[2]['Null'] = '';
     return $form_link;
 }
 function form_services()
 {
     global $db, $vars;
     $form_services = new form(array('FORM_NAME' => 'form_services'));
     $form_services->db_data('nodes_services.service_id, nodes_services.id, nodes_services.node_id, nodes.id AS nodes__id, nodes_services.ip_id, nodes_services.url, nodes_services.info, nodes_services.status, nodes_services.protocol, nodes_services.port', 'nodes_services', '', '', "");
     $form_services->db_data_enum('nodes_services.service_id', $db->get("id AS value, title AS output", "services", "", "", "title ASC"));
     $ips = $db->get("ip_addresses.id AS value, ip_addresses.hostname AS hostname, ip_addresses.ip AS ip", "ip_addresses " . "INNER JOIN subnets ON subnets.node_id = ip_addresses.node_id AND ip_addresses.ip <= subnets.ip_end AND ip_addresses.ip >= subnets.ip_start", "ip_addresses.node_id = " . intval(get('node')) . " AND subnets.type = 'local'", "subnets.ip_start ASC, ip_addresses.ip ASC");
     foreach ((array) $ips as $key => $value) {
         $ips[$key]['output'] = $ips[$key]['hostname'] . " [" . long2ip($ips[$key]['ip']) . "]";
     }
     $form_services->db_data_enum('nodes_services.ip_id', $ips);
     $form_services->db_data_values("nodes_services", "id", get('service'));
     if (get('service') != 'add') {
         $form_services->db_data_pickup('nodes_services.node_id', "nodes", $db->get("nodes_services.node_id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "nodes_services, nodes", "nodes_services.node_id = nodes.id AND nodes_services.id = " . get("service")));
     } else {
         $form_services->db_data_pickup('nodes_services.node_id', "nodes", $db->get("nodes.id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "nodes", "nodes.id = " . get("node")));
     }
     $form_services->db_data_remove('nodes_services__id');
     return $form_services;
 }
Beispiel #18
0
 function form_user()
 {
     global $main, $db, $vars, $lang;
     $form_user = new form(array('FORM_NAME' => 'form_user'));
     $form_user->db_data('users.username, users.password, users.surname, users.name, users.email, users.phone, users.info, users.language');
     // Hide password...
     $form_user->data[1]['value'] = '';
     // ...and show it as required
     if (get('user') == 'add') {
         $form_user->data[1]['Null'] = '';
     }
     array_splice($form_user->data, 2, 0, array($form_user->data[1]));
     $form_user->data[2]['Field'] .= '_c';
     $form_user->data[2]['fullField'] .= '_c';
     $form_user->data[8]['Type'] = 'enum';
     $form_user->data[8]['Null'] = '';
     $form_user->data[8]['Type_Enums'][0] = array("value" => "", "output" => $lang['default']);
     foreach ($vars['language']['enabled'] as $key => $value) {
         if ($value) {
             array_push($form_user->data[8]['Type_Enums'], array("value" => $key, "output" => $lang['languages'][$key] == '' ? $key : $lang['languages'][$key]));
         }
     }
     if ($main->userdata->privileges['admin'] === TRUE) {
         $form_user->db_data('rights.type, users.status');
         $form_user->data[9]['Type'] = 'enum_multi';
         $form_user->db_data_values_multi("rights", "user_id", get('user'), 'type');
         $form_user->db_data('users_nodes.node_id, users_nodes.node_id');
         $form_user->data[11]['Field'] = 'node_id_owner';
         $form_user->data[11]['fullField'] = 'node_id_owner';
         $form_user->db_data_pickup("node_id_owner", "nodes", $db->get("nodes.id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "users_nodes, nodes", "nodes.id = users_nodes.node_id AND users_nodes.user_id = '" . get('user') . "' AND users_nodes.owner = 'Y'"), TRUE);
         $form_user->db_data_pickup("users_nodes.node_id", "nodes", $db->get("nodes.id AS value, CONCAT(nodes.name, ' (#', nodes.id, ')') AS output", "users_nodes, nodes", "nodes.id = users_nodes.node_id AND users_nodes.user_id = '" . get('user') . "' AND users_nodes.owner != 'Y'"), TRUE);
     }
     $form_user->db_data_values("users", "id", get('user'));
     $form_user->data[1]['value'] = '';
     return $form_user;
 }
Beispiel #19
0
 function form_node()
 {
     global $db, $main;
     $form_node = new form(array('FORM_NAME' => 'form_node'));
     $form_node->db_data('nodes.name, nodes.area_id, nodes.latitude, nodes.longitude, nodes.elevation, nodes.status, nodes.due_date, nodes.info' . ($this->has_owner_access() || get('node') == 'add' ? ', users_nodes.user_id, users_nodes.user_id' : ''));
     if ($this->has_owner_access() || get('node') == 'add') {
         $form_node->data[8]['Field'] = 'user_id_owner';
         $form_node->data[8]['fullField'] = 'user_id_owner';
         if (get('node') == 'add') {
             $temp = $db->get("users.id AS value, users.username AS output", "users", "users.id = '" . $main->userdata->user . "'");
         } else {
             $temp = $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = " . intval(get('node')) . " AND users_nodes.owner = 'Y'");
         }
         $form_node->db_data_pickup("user_id_owner", "users", $temp);
         $form_node->db_data_pickup("users_nodes.user_id", "users", $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = " . intval(get('node')) . " AND users_nodes.owner != 'Y'"), TRUE);
         $form_node->data[9]['Null'] = 'YES';
     }
     if ($main->userdata->privileges['admin'] === true) {
         $form_node->db_data('nodes.id, nodes.name_ns');
     }
     $form_node->db_data_enum('nodes.area_id', $db->get("id AS value, name AS output", "areas", "", "", "name ASC"));
     $form_node->db_data_values("nodes", "id", intval(get('node')));
     return $form_node;
 }
Beispiel #20
0
 function form_node()
 {
     global $db, $main;
     $form_node = new form(array('FORM_NAME' => 'form_node'));
     $form_node->db_data('nodes.name, nodes.area_id, nodes.community_id ,nodes.com_wind_id, nodes.latitude, nodes.longitude, nodes.elevation, nodes.info,nodes.freeifs, nodes.url,  nodes.internetaccess, nodes.internetprovider, nodes.system_identity' . ($this->has_owner_access() || get('node') == 'add' ? ', users_nodes.user_id, users_nodes.user_id' : ''));
     if ($this->has_owner_access() || get('node') == 'add') {
         $form_node->data[13]['Field'] = 'user_id_owner';
         $form_node->data[13]['fullField'] = 'user_id_owner';
         if (get('node') == 'add') {
             $temp = $db->get("users.id AS value, users.username AS output", "users", "users.id = '" . $main->userdata->user . "'");
         } else {
             $temp = $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = " . intval(get('node')) . " AND users_nodes.owner = 'Y'");
         }
         $form_node->db_data_pickup("user_id_owner", "users", $temp);
         #	$form_node->db_data_pickup("users_nodes.user_id", "users", $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = ".intval(get('node'))." AND users_nodes.owner != 'Y'"), TRUE);
         if (get('node') != 'add') {
             $form_node->db_data_pickup("users_nodes.user_id", "users", $db->get("users.id AS value, users.username AS output", "users_nodes, users", "users.id = users_nodes.user_id AND users_nodes.node_id = " . intval(get('node')) . " AND users_nodes.owner != 'Y'"), TRUE);
         } else {
             $form_node->db_data_pickup("users_nodes.user_id", "users", null, TRUE);
         }
         #$form_node->data[1]['Null'] = 'YES';
     }
     if ($main->userdata->privileges['admin'] === TRUE) {
         $form_node->db_data('nodes.id, nodes.name_ns');
     }
     #$#
     if ($main->userdata->privileges['cadmin'] === TRUE) {
         $form_node->db_data('nodes.name_ns');
     }
     #$#
     $form_node->db_data_enum('nodes.area_id', $db->get("id AS value, name AS output", "areas", "", "", "name"));
     #@#*** // changes output
     #DOC: ($select, $from, $where, $group_by, $order_by, $limit)
     $form_node->db_data_enum('nodes.community_id', $db->get("id AS value, name AS output", "communities"));
     #@#*** // changes output
     $form_node->db_data_values("nodes", "id", intval(get('node')));
     return $form_node;
 }