"; $ret=str_replace('�' . $myvar, $vardata[$myvar], $ret); } return $ret; } $dbh=mysql_pconnect($server,$login,$password); $db=$mydatabase; if(mysql_select_db($db)==FALSE) { if($mydatabase=="") { $mydatabase="test"; } $dbh=mysql_connect(); $db=$mydatabase; if(mysql_select_db($db)==FALSE) { if($server=="" && $login=="" && $password=="" && $mydatabase=="") { display_lng_text("LIB_INC_NO_PARAM"); exit; } else { display_lng_text("LIB_INC_BAD_PARAM"); exit; } } } function affiche_pied_page($MainLink) { global $dbh; /* global $FAMILY; if($MainLink==true) { echo "

 

"; display_lng_text("LIB_INC_MAIN"); echo "
"; }*/ mysql_close($dbh); echo "

 

"; display_lng_text("LIB_INC_OXG"); echo "
"; } function affiche_pied_page_admin($MainLink) { if($MainLink==true) { echo "

 

"; display_lng_text("LIB_INC_LNK_ADMIN"); echo ""; } echo "

"; display_lng_text("LIB_INC_OXG"); } function affiche_lien_individu($id_family, $id_individual, $bAffichePatronyme=true, $bAfficheDate=false) { global $bSosa, $bEvntShort; if($id_family!=-1) { $sReqFam="and id_family=$id_family"; } else { $sReqFam=""; } if($bEvntShort==false) { $sReqCont=" and contemporary=1 "; } else { $sReqCont=""; $sReqCont=" and contemporary=1 "; } $sInd=""; $sReq = "select first_name, libelle "; if($bSosa==true) { $sReq .= ", sosa "; } $sReq .= ", date_naissance, date_deces, contemporary "; $sReq .= " from oxg_individuals, oxg_patronyms "; $sReq .= "where id_individual='$id_individual' "; $sReq .= "and oxg_individuals.id_patronym=oxg_patronyms.id_patronym "; $sReq .= $sReqFam; $result = mysql_query( $sReq ) or mysql_die(); if($row = mysql_fetch_array($result)); { $sInd.=""; if($row['first_name']=="") { $sInd.="?"; } else { $sInd.=$row['first_name']; } if($bAffichePatronyme==true) { $sInd.=" $row[libelle]"; } $sInd.=""; if($bSosa==true && $row['sosa']!='-1') { $sInd=$sInd." $row[sosa]"; } if($bAfficheDate==true && ($row['date_naissance']!="" || $row['date_deces']!="")) { $sInd.=" ("; if($row['date_naissance']!="") { $sInd.="$row[date_naissance]"; } else { $sInd.="?"; } if($row['date_deces']!="") { $sInd.=" - "; $sInd.="$row[date_deces]"; } $sInd.=")"; } } if ($row['first_name']=="" AND $row[libelle]=="") { return "?"; } else { if ($bEvntShort==false and $row['contemporary']==0) {return decode_lng_text('PRIVATE_MSG');} else {return $sInd;} } } function affiche_lien_arbre($id_family, $id_individual) { if($id_family!=-1) { $sReqFam="and id_family=$id_family"; } else { $sReqFam=""; } $sReq = "select id_father, id_mother from oxg_individuals where id_individual=$id_individual $sReqFam"; $result = mysql_query( $sReq ) or mysql_die(); $sLink=""; if($row = mysql_fetch_array($result)) { if($row['id_father']!=-1 || $row['id_mother']!=-1) { $sLink ="\""; "; $sLink.="\"";"; } } return $sLink; } function mysql_die($error = "") { global $strError, $strMySQLSaid, $strBack, $sql_query; echo " $strError

"; if(isset($sql_query) && !empty($sql_query)) { display_lng_text("ERR_MYSQL"); echo " : $sql_query

"; } if(!empty($error)) { echo $strMySQLSaid.$error; echo "

"; } echo $strMySQLSaid.mysql_error(); echo "

"; // echo "

$strBack"; // exit; } function decode_date($sValDate) { $pos = strpos($sValDate, ":"); $sDate = substr($sValDate,0,$pos); list($year, $month, $day) = split('[/.-]', $sDate); if($month!="?") { $month=decode_lng_text("MONTH$month"); } else { $month=""; } if($day=="?") { $day=""; } return "$day $month $year"; } function donne_ind_evnt($id_family, $id_evnt) { if($id_family!=-1) { $sReqFam="and id_family=$id_family"; } else { $sReqFam=""; } $sRes=""; $sql_query = "select id_father, type_father from oxg_events where id_event=$id_evnt $sReqFam"; $result_ind = mysql_query( $sql_query ) or mysql_die(); $row_ind = mysql_fetch_array($result_ind); if($row_ind['type_father']==0) { $sRes=$row_ind['id_father']; } else { $sRes=donne_ind_evnt($id_family, $row_ind['id_father']); } return $sRes; } function display_country_flags($path, $file) { global $sLang; if($sLang!="fra") { echo ""; echo "   "; } if($sLang!="eng") { echo ""; echo "   "; } if($sLang!="nld") { echo ""; echo "   "; } if($sLang!="cro") { echo ""; echo "   "; } if($sLang!="pol") { echo ""; echo "   "; } if($sLang!="rus") { echo ""; echo "   "; } if($sLang!="deu") { echo ""; echo "   "; } if($sLang!="spa") { echo ""; echo "   "; } if($sLang!="prt") { echo ""; echo "   "; } if($sLang!="tur") { echo ""; echo "   "; } } ?> <? echo $sTitle; ?>