<?php
/**
* This is the main web entry point for HuMo-gen.
*
* If you are reading this in your web browser, your server is probably
* not configured correctly to run PHP applications!
*
* See the manual for basic setup instructions
*
* http://www.huubmons.nl/software/
*
* ----------
*
* Copyright (C) 2008-2009 Huub Mons,
* Klaas de Winkel, Jan Maat, Jeroen Beemster, Louis Ywema, Theo Huitema,
* Reni Janssen, Yossi Beck
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
// *** Version line, DO NOT CHANGE THIS LINE ***
// Versie nummering: 1.1.1.1 (hoofdnummer, subnummer, update, etc.)
$humo_option["versie"]='4.6.2'; // Version line, DO NOT CHANGE THIS LINE
// *** RC release candidate. Eventueel RC2, RC3. ***
//$humo_option["versie"]='RC1 20-10-2009'; // Version line, DO NOT CHANGE THIS LINE
// *** Beta (niet stabiel genoeg voor productie, wel al deels functioneel). ***
//$humo_option["versie"]='BETA versie 01-02-2011'; // Version line, DO NOT CHANGE THIS LINE
// *** Alpha versie is niet stabiel genoeg voor productie ***
//$humo_option["versie"]='ALPHA versie 27-11-2009'; // Version line, DO NOT CHANGE THIS LINE
//$humo_option["versie"]='TEST versie 27-01-2011'; // Version line, DO NOT CHANGE THIS LINE
//$humo_option["versie"]='EXPERIMENTELE VERSIE 13-11-2009'; // Version line, DO NOT CHANGE THIS LINE
$kop='database_naam';
include("header.php");
include("menu.php");
echo '<script type="text/javascript">';
echo 'checkCookie();';
echo '</script>';
// *** Select family tree ***
$datasql = mysql_query("SELECT * FROM humo_trees LEFT JOIN humo_tree_texts
ON humo_trees.tree_id=humo_tree_texts.treetext_tree_id
AND humo_tree_texts.treetext_language='".$Taalkeuze."' ORDER BY tree_order",$db);
$num_rows = mysql_num_rows($datasql);
// *** Reset search field if a new genealogy is selected ***
if (isset($_GET['database']) OR isset($urlpart[0])){
unset($_SESSION["save_pers_firstname"]);
unset($_SESSION["save_pers_lastname"]);
unset ($_SESSION["save_zoekdeelpers_firstname"]);
unset($_SESSION["save_zoekdeelpers_lastname"]);
}
//*** Search screen ***
$pers_firstname='';
if (isset($_SESSION["save_pers_firstname"])){ $pers_firstname=$_SESSION["save_pers_firstname"]; }
$search_partpers_firstname='';
if (isset($_SESSION["save_zoekdeelpers_firstname"])){
$search_partpers_firstname=$_SESSION["save_zoekdeelpers_firstname"]; }
$pers_lastname='';
if (isset($_SESSION["save_pers_lastname"])){ $pers_lastname=$_SESSION["save_pers_lastname"]; }
$search_partpers_lastname='';
if (isset($_SESSION["save_zoekdeelpers_lastname"])){
$search_partpers_lastname=$_SESSION["save_zoekdeelpers_lastname"]; }
$zoekdatabase='geselecteerd';
if (isset($_SESSION["save_zoekdatabase"])){ $zoekdatabase=$_SESSION["save_zoekdatabase"]; }
// ***********************************************************************************************
// ** Main index class ***
// ***********************************************************************************************
include("include/mainindex_cls.php");
$hoofdindex = new hoofdindex_cls();
// *** Can be used for extra box in lay-out ***
echo '<div id="mainmenu_centerbox">';
// *** Select family tree ***
$datasql = mysql_query("SELECT * FROM humo_trees LEFT JOIN humo_tree_texts
ON humo_trees.tree_id=humo_tree_texts.treetext_tree_id
AND humo_tree_texts.treetext_language='".$Taalkeuze."' ORDER BY tree_order",$db);
$num_rows = mysql_num_rows($datasql);
if ($num_rows>1){
echo '<div id="mainmenu_left">';
echo '<div class="mainmenu_bar fonts">'.$language["main_select_tree"].'</div>';
// *** List of family trees ***
echo $hoofdindex->stambomen_lijst($datasql);
echo '</div>';
}
//echo '<div id="mainmenu_center" class="stamboom_tekst">';
$center_id="mainmenu_center";
if ($num_rows<=1){
$center_id="mainmenu_center_alt";
}
echo '<div id="'.$center_id.'" class="stamboom_tekst fonts">';
// *** Get genealogical data ***
$tree_prefix_geselecteerd=$_SESSION['tree_prefix'];
if (isset($_GET['tree_prefix_gegevens'])){
// *** Check if genealogy exists ***
$datasql = mysql_query("SELECT * FROM humo_trees
WHERE tree_prefix='".veilig($_GET['tree_prefix_gegevens'])."'",$db);
if (@mysql_num_rows($datasql)==1){
$tree_prefix_geselecteerd=$_GET['tree_prefix_gegevens'];
}
}
$sql = "SELECT * FROM humo_trees LEFT JOIN humo_tree_texts
ON humo_trees.tree_id=humo_tree_texts.treetext_tree_id
AND treetext_language='".$Taalkeuze."' WHERE tree_prefix='".veilig($tree_prefix_geselecteerd)."' ORDER BY tree_order";
$datasql = mysql_query($sql,$db);
@$dataDb=mysql_fetch_object($datasql);
echo '<div class="mainmenu_bar fonts">';
if ($num_rows>1){ echo $language["main_selected_tree"].': '; }
// *** Variabele $treetext_name is gevuld in menu.php ***
echo $treetext_name;
echo '</div>';
if ($tree_prefix_geselecteerd==''){
//echo '<h2>'.$language["main_login_first"].'</h2>';
echo '<h2><a href="login.php">'.$language["main_login_first"].'</a></h2>';
}
else{
// *** Date and number of persons/ families ***
//echo ' <i>'.$hoofdindex->gegevens().', <a href="statistics.php">'.$language["main_statistics"].'</a></i><br>';
echo ' <i>'.$hoofdindex->gegevens().'</i><br>';
if($hoofdindex->gegevens()!="") {echo $dirmark2;}
// *** Owner genealogy ***
echo $hoofdindex->eigenaar();
//echo '<span style="text-align:left;">'; // WERKT NIET IN IE.
// *** Show tekst en source genealogy ***
if ($dataDb->treetext_mainmenu_text!=''){
echo '<p>'.nl2br($dataDb->treetext_mainmenu_text); echo $dirmark2.'</p>';
}
if (isset($dataDb->treetext_mainmenu_source) AND $dataDb->treetext_mainmenu_source!=''){
echo '<p><i>'.nl2br($dataDb->treetext_mainmenu_source).'</i>'; echo $dirmark2.'</p>';
}
//*** Most frequent names ***
echo $hoofdindex->achternamen().$dirmark2.'<br><br>';
echo $hoofdindex->alfabet().$dirmark2.'<br><br>';
echo $hoofdindex->extra_linken().$dirmark2.'<br><br>';
}
// echo '<div class="humoversie">'.$language["main_humo-gen"]." (".$humo_option["versie"].")</div>\n";
echo '</div>';
echo '<div id="mainmenu_right" class="fonts">';
echo '<div class="mainmenu_bar fonts">'.$language["main_search"].'</div>';
// *** search ***
$hoofdindex->zoekvak();
echo '</div>';
echo '</div>'; // end of center_box
echo '<div class="humoversie">'.$language["main_humo-gen"]." (".$humo_option["versie"].")</div>\n";
include("footer.php");
?>