示例#1
0
 function output()
 {
     global $main, $vars;
     $main->menu->hide = true;
     $this->tpl['gmap_key_ok'] = include_gmap("?page=gmap&subpage=js&node=" . get('node'));
     return template($this->tpl, __FILE__);
 }
示例#2
0
 function output()
 {
     if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_' . $_POST['form_name'])) {
         return call_user_func(array($this, 'output_onpost_' . $_POST['form_name']));
     }
     global $construct, $main, $vars;
     $main->header->hide = TRUE;
     $main->menu->hide = TRUE;
     $main->footer->hide = TRUE;
     $this->tpl['gmap_key_ok'] = include_gmap("?page=gmap&subpage=pickup_js&object_lat=" . stripslashes(get('object_lat')) . "&object_lon=" . stripslashes(get('object_lon')));
     return template($this->tpl, __FILE__);
 }
示例#3
0
    function output()
    {
        if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_' . $_POST['form_name'])) {
            return call_user_func(array($this, 'output_onpost_' . $_POST['form_name']));
        }
        global $construct, $db, $vars, $main;
        $this->tpl['logged'] = $main->userdata->logged;
        #@#
        #$main->html->body->tpl['logged'] = $main->userdata->logged;#@#
        if ($db->cnt('', 'nodes ' . 'INNER JOIN users_nodes ON users_nodes.node_id = nodes.id ' . 'INNER JOIN users ON users_nodes.user_id = users.id', "nodes.id = " . intval(get('node')) . ' AND users.status = "activated"') == 0) {
            $main->message->set_fromlang('error', 'node_not_found');
            return;
        }
        $this->tpl['node'] = $db->get('nodes.id, nodes.name, nodes.community_id as community_id, nodes.com_wind_id as com_wind_id, communities.name as community_name, communities.windURL as community_windURL, nodes.date_in, nodes.last_modified as date_modified, nodes.latitude, nodes.longitude, nodes.elevation, nodes.info, nodes.internetaccess as node__internetaccess, nodes.internetprovider as node__internetprovider, areas.name as area_name, regions.name as region_name, regions.dns_suffix as region_dnssuffix, users.username AS owner_username, users.email AS owner_email, nodes.declared_status as nodestatus, nodes.autonomy_minutes as autonomy', 'nodes
			LEFT JOIN areas ON nodes.area_id = areas.id
			LEFT JOIN communities ON nodes.community_id = communities.id  
			LEFT JOIN regions ON areas.region_id = regions.id
			LEFT JOIN users_nodes ON users_nodes.node_id = nodes.id
			LEFT JOIN users ON users.id = users_nodes.user_id', "nodes.id = " . intval(get('node')) . " AND (users_nodes.owner = 'Y' OR users_nodes.owner IS NULL)");
        $this->tpl['node'] = $this->tpl['node'][0];
        $this->tpl['link_contact'] = makelink(array("subpage" => "contact"), TRUE);
        $this->tpl['table_ip_ranges'] = $construct->table($this->table_ip_ranges(), __FILE__);
        $this->tpl['table_dns'] = $construct->table($this->table_dns(), __FILE__);
        $this->tpl['table_nameservers'] = $construct->table($this->table_nameservers(), __FILE__);
        $this->tpl['table_links_p2p'] = $construct->table($this->table_links_p2p(), __FILE__);
        $t = $db->get('id, type', 'links', "node_id = " . intval(get('node')));
        foreach ((array) $t as $key => $value) {
            if ($value['type'] == 'ap') {
                $this->tpl['table_links_ap'][$value['id']] = $construct->table($this->table_links_ap($value['id']), __FILE__);
            }
        }
        #@#>
        foreach ((array) $t as $key => $value) {
            if ($value['type'] == 'hs') {
                $this->tpl['table_links_ap'][$value['id']] = $construct->table($this->table_links_ap($value['id']), __FILE__);
            }
        }
        #@#<
        $this->tpl['table_ipaddr_subnets'] = $construct->table($this->table_ipaddr_subnets(), __FILE__);
        $this->tpl['table_services'] = $construct->table($this->table_services(), __FILE__);
        $t = $db->get('id, date_in, view_point, info', 'photos', "node_id = " . intval(get('node')));
        foreach ((array) $t as $key => $value) {
            $this->tpl['photosview'][$value['view_point']] = $value;
            $this->tpl['photosview'][$value['view_point']]['image_s'] = $vars['folders']['photos'] . 'photo-' . $this->tpl['photosview'][$value['view_point']]['id'] . '-s.jpg';
            $this->tpl['photosview'][$value['view_point']]['image'] = $vars['folders']['photos'] . 'photo-' . $this->tpl['photosview'][$value['view_point']]['id'] . '.jpg';
        }
        $this->tpl['link_plot_link'] = makelink(array("page" => "nodes", "subpage" => "plot_link", "a_node" => $this->tpl['node']['id']));
        if (isset($main->userdata->privileges['admin']) && $main->userdata->privileges['admin'] === TRUE || $db->cnt('', "users_nodes", "node_id = " . get('node') . " AND user_id = '" . $main->userdata->user . "'") > 0) {
            $this->tpl['edit_node'] = makelink(array("page" => "mynodes", "node" => get('node')));
        }
        #@# add community_admins
        if ($main->userdata->privileges['cadmin'] && $main->userdata->privileges['cadmin'] === TRUE) {
            $this->tpl['edit_node'] = makelink(array("page" => "mynodes", "node" => get('node')));
        }
        $this->tpl['link_fullmap'] = makelink(array("page" => "gmap", "node" => get('node')));
        $this->tpl['link_gearth'] = makelink(array("page" => "gearth", "subpage" => "download", "node" => get('node'), "show_p2p" => "1", "show_aps" => "1", "show_clients" => "1", "show_unlinked" => "1", "show_links_p2p" => "1", "show_links_client" => "1"));
        if (get('show_map') == "no") {
            $this->tpl['gmap_key_ok'] = "nomap";
        } else {
            $this->tpl['gmap_key_ok'] = include_gmap("?page=gmap&subpage=js&node=" . get('node'));
        }
        return template($this->tpl, __FILE__);
    }
示例#4
0
 function output()
 {
     if ($_SERVER['REQUEST_METHOD'] == 'POST' && method_exists($this, 'output_onpost_' . $_POST['form_name'])) {
         return call_user_func(array($this, 'output_onpost_' . $_POST['form_name']));
     }
     global $construct, $vars, $main;
     $this->tpl['form_search_nodes'] = $construct->form($this->form_search_nodes(), __FILE__);
     $this->tpl['table_nodes'] = $construct->table($this->table_nodes(), __FILE__);
     $this->tpl['link_fullmap'] = makelink(array("page" => "gmap", "node" => get('node')));
     $this->tpl['link_gearth'] = makelink(array("page" => "gearth", "subpage" => "download", "node" => get('node'), "show_p2p" => "1", "show_aps" => "1", "show_clients" => "1", "show_unlinked" => "1", "show_links_p2p" => "1", "show_links_client" => "1"));
     if (get('show_map') == "no") {
         $this->tpl['gmap_key_ok'] = "nomap";
     } else {
         $this->tpl['gmap_key_ok'] = include_gmap("?page=gmap&subpage=js&node=" . get('node'));
     }
     return template($this->tpl, __FILE__);
 }