<?php
/**
 * Top menu for Simplygreen theme
 *
 * phpGedView: Genealogy Viewer
 * Copyright (C) 2002 to 2003 John Finlay and Others
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 *
 * $Id: toplinks.html,v 1.14 2004/11/03 20:47:32 yalnifj Exp $
 *
 * @package PhpGedView
 * @subpackage Themes
 */
?>
<div style="position: relative; z-index: 100;">
    <table width="100%">
        <tr>
            <td align="center" valign="top" width="10%">
                <?php $l_gedcom_menu = get_gedcom_menu();
                $l_gedcom_menu["icon"] = "";
                if (isset($l_gedcom_menu["items"])) {
                for($i=0;$i<count($l_gedcom_menu["items"]);$i++)
                {
                $l_gedcom_menu["items"][$i]["icon"]="";
                }
                }
                print_menu($l_gedcom_menu);
                ?>
            </td>
            <td align="center" valign="top" width="10%">
                <?php
                //-- mygedview menu
                $menu = array();
                $menu["label"] = $pgv_lang["mygedview"];
                $menu["labelpos"] = "down";
                $menu["link"] = "index.php?command=user";
                $menu["class"] = "menuitem";
                $menu["hoverclass"] = "menuitem_hover";
                $menu["flyout"] = "down";
                $menu["submenuclass"] = "submenu";
                $menu["items"] = get_mygedview_submenu();
                print_menu($menu);
                ?>
            </td>
            <td align="center" valign="top" width="10%">
                <?php
                //-- charts menu
                $menu = array();
                $menu["label"] = $pgv_lang["charts"];
                $menu["labelpos"] = "down";
                $menu["link"] = "pedigree.php";
                $menu["class"] = "menuitem";
                $menu["hoverclass"] = "menuitem_hover";
                $menu["flyout"] = "down";
                $menu["submenuclass"] = "submenu";
                $menu["items"] = array();

                $submenu = array();
                $submenu["label"] = $pgv_lang["pedigree_chart"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "pedigree.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["descend_chart"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "descendancy.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["timeline_chart"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "timeline.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["relationship_chart"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "relationship.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

							if (file_exists("ancestry.php")) {
								$submenu = array();
								$submenu["label"] = $pgv_lang["ancestry_chart"];
								$submenu["labelpos"] = "right";
								$submenu["link"] = "ancestry.php";
								$submenu["class"] = "submenuitem";
								$submenu["hoverclass"] = "submenuitem_hover";
								$menu["items"][] = $submenu;
							}

							if (file_exists("fanchart.php") and function_exists("imagecreate")) {
								$submenu = array();
								$submenu["label"] = $pgv_lang["fan_chart"];
								$submenu["labelpos"] = "right";
								$submenu["link"] = "fanchart.php";
								$submenu["class"] = "submenuitem";
								$submenu["hoverclass"] = "submenuitem_hover";
								$menu["items"][] = $submenu;
							}
							
							if (file_exists("hourglass.php")) {
								$submenu = array();
								$submenu["label"] = $pgv_lang["hourglass_chart"];
								$submenu["labelpos"] = "right";
								$submenu["link"] = "hourglass.php";
								$submenu["class"] = "submenuitem";
								$submenu["hoverclass"] = "submenuitem_hover";
								$menu["items"][] = $submenu;
							}

                print_menu($menu);
                ?>
            </td>
            <td align="center" valign="top" width="10%">
                <?php
                //-- lists menu
                $menu = array();
                $menu["label"] = $pgv_lang["lists"];
                $menu["labelpos"] = "down";
                $menu["link"] = "indilist.php";
                $menu["class"] = "menuitem";
                $menu["hoverclass"] = "menuitem_hover";
                $menu["flyout"] = "down";
                $menu["submenuclass"] = "submenu";
                $menu["items"] = array();

                $submenu = array();
                $submenu["label"] = $pgv_lang["individual_list"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "indilist.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["family_list"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "famlist.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["source_list"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "sourcelist.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["place_list"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "placelist.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                global $MULTI_MEDIA;
                if( $MULTI_MEDIA ) {
                $submenu = array();
                $submenu["label"] = $pgv_lang["media_list"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "medialist.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;
                }

                print_menu($menu);
                ?>
            </td>
            <td align="center" valign="top" width="10%">
                <?php
                $menu = array();
                $menu["label"] = $pgv_lang["anniversary_calendar"];
                $menu["labelpos"] = "down";
                $menu["link"] = "calendar.php";
                $menu["class"] = "menuitem";
                $menu["hoverclass"] = "menuitem_hover";
                $menu["submenuclass"] = "submenu";
                $menu["flyout"] = "down";
                $menu["items"] = array();

                $submenu = array();
                $submenu["label"] = $pgv_lang["viewday"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "calendar.php";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["viewmonth"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "calendar.php?action=calendar";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["viewyear"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "calendar.php?action=year";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;	

                print_menu($menu);
                ?>
            </td>
            <?php
            
            if (file_exists("reportengine.php")) {
            print "<td align=\"center\" valign=\"top\" width=\"10%\">";
            $menu = array();
            $menu["label"] = $pgv_lang["reports"];
            $menu["labelpos"] = "down";
            $menu["link"] = "reportengine.php";
            $menu["class"] = "menuitem";
            $menu["hoverclass"] = "menuitem_hover";
            $menu["submenuclass"] = "submenu";
            $menu["flyout"] = "down";
            $menu["items"] = get_reports_submenu();
            
            print_menu($menu);
            print "</td>";
            }
            
            global $ENABLE_CLIPPINGS_CART;
            if ($ENABLE_CLIPPINGS_CART>=getUserAccessLevel()) {
            print "<td align=\"center\" valign=\"top\" width=\"10%\">";
            $menu = array();
            $menu["label"] = $pgv_lang["clippings_cart"];
            $menu["labelpos"] = "down";
            $menu["link"] = "clippings.php";
            $menu["class"] = "menuitem";
            $menu["hoverclass"] = "menuitem_hover";
            print_menu($menu);
            print "</td>";
            }
            ?>
            <?php
            if (file_exists("rs_folders.php")) {
            global $SHOW_RESEARCH_LOG, $PRIV_USER, $PRIV_PUBLIC;
            $username = getUserName();
            if ($SHOW_RESEARCH_LOG>=$PRIV_PUBLIC || (!empty($username) && $SHOW_RESEARCH_LOG>=$PRIV_USER) || userIsAdmin($username)) {
            $menu = array();
            $menu["label"] = $pgv_lang["research_log"];
            $menu["labelpos"] = "down";
            $menu["link"] = "rs_folders.php";
            $menu["class"] = "menuitem";
            $menu["hoverclass"] = "menuitem_hover";
            print "<td align=\"center\" valign=\"top\" width=\"10%\">";
            print_menu($menu);
            print "</td>";
            }
            }
            ?>
            <td align="center" valign="top" width="10%">
                <?php
                global $SHOW_CONTEXT_HELP, $PHP_SELF, $QUERY_STRING, $helpindex;
                //-- help menu
                $menu = array();
                $menu["label"] = $pgv_lang["page_help"];
                $menu["labelpos"] = "down";
                $menu["link"] = "#";
                if (empty($helpindex)) $menu["onclick"] = "return helpPopup('help_".basename($PHP_SELF)."&amp;action=".$action."');";
                else $menu["onclick"] = "return helpPopup('".$helpindex."');";
                $menu["class"] = "menuitem";
                $menu["hoverclass"] = "menuitem_hover";
                $menu["flyout"] = "down";
                $menu["submenuclass"] = "submenu";
                $menu["items"] = array();

                $submenu = array();
                $submenu["label"] = $pgv_lang["help_for_this_page"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "#";
                if (empty($helpindex)) $submenu["onclick"] = "return helpPopup('help_".basename($PHP_SELF)."&amp;action=".$action."');";
                else $submenu["onclick"] = "return helpPopup('".$helpindex."');";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;

                $submenu = array();
                $submenu["label"] = $pgv_lang["help_contents"];
                $submenu["labelpos"] = "right";
                $submenu["link"] = "#";
                $submenu["onclick"] = "return helpPopup('help_contents_help');";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;
                $menu["items"][]="separator";

                $submenu = array();
                if ($_SESSION["show_context_help"]) {
                $submenu["label"] = $pgv_lang["hide_context_help"];
                $submenu["link"] = "$PHP_SELF?$QUERY_STRING&amp;show_context_help=no";
                }
                else {
                $submenu["label"] = $pgv_lang["show_context_help"];
                $submenu["link"] = "$PHP_SELF?$QUERY_STRING&amp;show_context_help=yes";
                }
                $submenu["labelpos"] = "right";
                $submenu["class"] = "submenuitem";
                $submenu["hoverclass"] = "submenuitem_hover";
                $menu["items"][] = $submenu;
                print_menu($menu);
                ?>
            </td>
        </tr>
    </table>
    <br />
</div>
</div><!-- close div for div id="header" -->
<?php print "<div id=\"content\" style=\"direction: $TEXT_DIRECTION;\">\n"; ?>