Biographie

[insert_php]

$id= $_GET[id];
$language= $_GET[language];

$language=substr($language,0,2);
$id=substr($id,0,10);

$connect = mysql_connect(“localhost”, “elianyjma”, “72*pI$52”);
mysql_select_db(“elianyjma”, $connect);

//Languages Header
$currentUrl= “/biography-detail/?id=”.$id.”&language=”;

$query=”select * from tblLanguage where active=1;”;
$result = mysql_query($query);

Print “

“;
if (mysql_num_rows($result)) {
while($qry = mysql_fetch_array($result)){
$urlWithNewLanguage=”#”;
if($qry[‘idLanguage’]!=$language){
$urlWithNewLanguage=$currentUrl.$qry[‘idLanguage’];
}
Print ““.$qry[‘languageDescription’];
Print “
“;
}
}
Print “

“;

//**Biography***
$query=”select * from vwBiography where idPeople=$id and idLanguage=’$language’;”;
$result = mysql_query($query);

$direction=”ltr”;
if($language==”HE”){
$direction=”rtl”;
}
$cssStyle=”text-align:justify;direction:”.$direction;

Print “

“;
if (mysql_num_rows($result)) {

$qry = mysql_fetch_array($result);
Print ““;
Print $qry[‘surname’];
Print “
“;
Print $qry[‘name’];
Print ” “;
if($qry[‘imagePath’]!=null){
Print “
“;
Print ““;
Print “
“;
}
Print $qry[‘description’];
}
Print “
“;

//**Publications***
$query=”select * from vwPublications where idPeople=$id and idLanguage=’$language’;”;

$result = mysql_query($query);
$publicationType=””;
$page=”/publication-content/”;

if (mysql_num_rows($result)) {
Print ” “;
while ($qry = mysql_fetch_array($result)) {
if($qry[‘publicationTypeTitle’]!=$publicationType){
$publicationType=$qry[‘publicationTypeTitle’];
Print “

“;
Print $publicationType;
Print “

“;
}
$link=”#”;
if($qry[‘publicationLink’]!=null){
$link=$qry[‘publicationLink’];
}else{
$link=$page.”?id=”.$qry[‘idPublication’].”&language=”.$language;
}
Print ““;
Print $qry[‘title’];
Print “
“;
if($qry[‘yearOfPublication’]!=null){
Print ” (“;
Print $qry[‘yearOfPublication’];
Print “)”;
}
Print “
“;
}
}
Print “

“;
mysql_close($connect);
[/insert_php]

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

This site uses Akismet to reduce spam. Learn how your comment data is processed.