<?php
/**
 * Sublinks for Minimal 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
 *
 * @package PhpGedView
 * @subpackage Themes
 * @version $Id: sublinks.html,v 1.16 2004/11/30 11:45:39 opus27 Exp $
 */
?>
<table class="sublinks_table" cellspacing="4" cellpadding="4">
    <tr>
        <td class="sublinks_cell, <?php print $TEXT_DIRECTION;?>">
            <?php
            $iconic=false;
            $helpic=false;
            print "<a href=\"pedigree.php?rootid=$pid\">";
            if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["pedigree"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
            print $pgv_lang["pedigree_chart"]."</a>";
            if ($helpic) print_help_link("help_pedigree.php", "qm");

            $ct = preg_match_all("/1\s*FAMS\s*@(.*)@/", $indirec, $match, PREG_SET_ORDER);
            if ($ct>0) {
               print "<br /><a href=\"descendancy.php?pid=$pid\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["descendant"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["desc_chart2"]."</a>";
               if ($helpic) print_help_link("help_descendancy.php", "qm");
            }
            if ($disp) {
               print "<br /><a href=\"timeline.php?pids[0]=$pid\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["timeline"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["timeline_chart"]."</a>";
               if ($helpic) print_help_link("help_timeline.php", "qm");
            }
            $username = getUserName();
            if (!empty($username)) {
               $tuser=getUser($username);
               if (!empty($tuser["gedcomid"][$GEDCOM])) {
                  print "<br /><a href=\"relationship.php?pid1=".$tuser["gedcomid"][$GEDCOM]."&amp;pid2=$pid\">";
                  if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["relationship"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
                  print $pgv_lang["relationship_to_me"]."</a>";
                  if ($helpic) print_help_link("help_relationship.php", "qm");
               }
            }
            if (file_exists("ancestry.php")) {
               print "<br /><a href=\"ancestry.php?rootid=$pid\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["ancestry"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["ancestry_chart"]."</a>";
               if ($helpic) print_help_link("help_ancestry.php", "qm");
            }
            if (file_exists("fanchart.php") and defined("IMG_ARC_PIE") and function_exists("imagettftext")) {
               print "<br /><a href=\"fanchart.php?rootid=$pid\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["fanchart"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["fan_chart"]."</a>";
               if ($helpic) print_help_link("help_fanchart.php", "qm");
            }
            if ($disp && $SHOW_GEDCOM_RECORD) {
               print "<br /><a href=\"javascript:show_gedcom_record();\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["gedcom"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["view_gedcom"]."</a>";
               if ($helpic) print_help_link("help", "qm");
            }
            if (!empty($username)) {
               print "<br /><a href=\"index.php?action=addfav&gid=$pid\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["favorite"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["add_to_my_favorites"]."</a>";
               if ($helpic) print_help_link("help", "qm");
            }
            if ($disp && $ENABLE_CLIPPINGS_CART>=getUserAccessLevel()) {
               print "<br /><a href=\"clippings.php?action=add&amp;id=$pid&amp;type=indi\">";
               if ($iconic) print "<img src=\"".$PGV_IMAGE_DIR."/".$PGV_IMAGES["clippings"]["small"]."\" class=\"icon\" border=\"0\" align=\"middle\" alt=\"\" />";
               print $pgv_lang["add_to_cart"]."</a>";
               if ($helpic) print_help_link("help_clippings.php", "qm");
            }
            ?>
        </td>
    </tr>
</table>
