$news_contents['link_family_tree'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
        $news_contents['link_main'] = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . $global_config['rewrite_exturl'], true);
        $news_contents['ftitle'] = $global_array_fam[$fid]['title'];
        $array_mod_title[] = array('title' => $news_contents['title'], 'link' => $news_contents['link_main']);
        $body_contents = $db->query('SELECT bodyhtml as bodytext, rule, content, imgposition, copyright, allowed_send, allowed_print, allowed_save, gid FROM ' . NV_PREFIXLANG . '_' . $module_data . '_bodyhtml_' . ceil($news_contents['id'] / 2000) . ' where id=' . $news_contents['id'])->fetch();
        $news_contents = array_merge($news_contents, $body_contents);
        unset($body_contents);
        if ($news_contents['id'] > 0 and $array_op[2] == "Manager") {
            $array_mod_title[] = array('title' => $lang_module['manager'], 'link' => $base_url_rewrite);
            $contents = manager_theme($news_contents, $list_users, $array_keyword, $content_comment);
        } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree and $count_op == 4 and $array_op[3] != '') {
            $link_alias_family_tree = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
            $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $link_alias_family_tree);
            $contents = nv_theme_genealogy_detail($news_contents, $info_users, $array_parentid, $OrgChart);
        } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree) {
            $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $base_url_rewrite);
            $contents = view_family($news_contents, $list_users, $array_keyword, $content_comment);
        }
        $id_profile_googleplus = $news_contents['gid'];
        $page_title = $news_contents['title'];
        $key_words = implode(', ', $key_words);
        $description = $news_contents['hometext'];
    } else {
        $contents = no_permission($global_array_fam[$fid]['groups_view']);
    }
} else {
    $contents = no_permission($global_array_fam[$fid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';
        $contents = detail_theme($news_contents, $array_keyword, $content_comment);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_made_up) {
        $array_mod_title[] = array('title' => $lang_module['made_up'], 'link' => $base_url_rewrite);
        $contents = view_detail('made_up', $news_contents, $array_keyword, $content_comment);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_convention) {
        $array_mod_title[] = array('title' => $lang_module['convention'], 'link' => $base_url_rewrite);
        $contents = view_detail('convention', $news_contents, $array_keyword, $content_comment);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_collapse) {
        $array_mod_title[] = array('title' => $lang_module['collapse'], 'link' => $base_url_rewrite);
        $contents = view_detail('collapse', $news_contents, $array_keyword, $content_comment);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_anniversary) {
        $array_mod_title[] = array('title' => $lang_module['anniversary'], 'link' => $base_url_rewrite);
        $contents = view_detail('anniversary', $news_contents, $array_keyword, $content_comment);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree and $count_op == 4 and $array_op[3] != '') {
        $link_alias_family_tree = nv_url_rewrite(NV_BASE_SITEURL . 'index.php?' . NV_LANG_VARIABLE . '=' . NV_LANG_DATA . '&' . NV_NAME_VARIABLE . '=' . $module_name . '&' . NV_OP_VARIABLE . '=' . $global_array_fam[$news_contents['fid']]['alias'] . '/' . $news_contents['alias'] . '/' . $alias_family_tree . $global_config['rewrite_exturl'], true);
        $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $link_alias_family_tree);
        $contents = nv_theme_genealogy_detail($news_contents, $info_users, $array_parentid, $OrgChart);
    } elseif ($news_contents['id'] > 0 and $array_op[2] == $alias_family_tree) {
        $array_mod_title[] = array('title' => $lang_module['family_tree'], 'link' => $base_url_rewrite);
        $contents = view_family($news_contents, $info_users, $array_keyword, $content_comment, $OrgChart);
    }
    $id_profile_googleplus = $news_contents['gid'];
    $page_title = $news_contents['title'];
    $key_words = implode(', ', $key_words);
    $description = $news_contents['hometext'];
} else {
    $contents = no_permission($global_array_fam[$fid]['groups_view']);
}
include NV_ROOTDIR . '/includes/header.php';
echo nv_site_theme($contents);
include NV_ROOTDIR . '/includes/footer.php';