<?php
/**
 * Top menu for Ocean 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.26 2004/11/03 20:47:32 yalnifj Exp $
 *
 * @package PhpGedView
 * @subpackage Themes
 */
?>
<tr>
    <td>
        <div align="center">
            <table width="100%">
                <tr>
                    <td align="center" valign="top" width="10%">
                        <?php print_menu(get_gedcom_menu()); ?>
                    </td>
                    <td align="center" valign="top" width="10%">
                        <?php
                        //-- mygedview menu
                        $menu = array();
                        $menu["label"] = $pgv_lang["mygedview"];
                        $menu["labelpos"] = "down";
				$menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["large"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["descendant"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["timeline"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["relationship"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["ancestry"]["small"];
							$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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["fanchart"]["small"];
							$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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["hourglass"]["small"];
							$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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["indis"]["large"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["indis"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["cfamily"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["source"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["place"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["media"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["large"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["calendar"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["reports"]["large"];;
			            $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["clippings"]["large"];
                    $menu["link"] = "clippings.php";
                    $menu["class"] = "menuitem";
                    $menu["hoverclass"] = "menuitem_hover";
                    print_menu($menu);
                    print "</td>";
                    }
                    ?>
                    <td align="center" valign="top" width="10%">
                        <?php
                        $menu = array();
                        $menu["label"] = $pgv_lang["search"];
                        $menu["labelpos"] = "down";
				$menu["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["search"]["large"];
                        $menu["link"] = "search.php";
                        $menu["class"] = "menuitem";
                        $menu["hoverclass"] = "menuitem_hover";
                        print_menu($menu);
                        ?>
                    </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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["large"];
                    $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["large"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["small"];
                        $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["icon"] = $PGV_IMAGE_DIR."/".$PGV_IMAGES["help"]["small"];
                        $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>
        </div>
    </td>
</tr>
</table><br />
</div><!-- close div for div id="header" -->
<?php print "<div id=\"content\" style=\"direction: $TEXT_DIRECTION;\">\n"; ?>