$teade = "";
$teadeOutro = "";
$paring = "SELECT NP_Riik.ID, NP_Riik.$keel AS Riik, NP_Nimi.Kuu, NP_Nimi.Paev, NP_Nimi.Nimed, NP_Riik.CCode FROM NP_Nimi, NP_Riik WHERE NP_Nimi.RiikID=NP_Riik.ID";
// riik+kuu
if($tyyp == "riik+kuu")
{
$paring .= " AND NP_Riik.ID=$riik AND NP_Nimi.Kuu=$month";
$vLipp = "images/flag_".$country.".png";
$vRiik=riiginimi($keel, $riik, $link);
$htmlMetaDescription = "";
$paringAva = "SELECT NCTextTitle, NCTextGeneral, NCMeta, NCIntro FROM ND_Text_Paev WHERE Month=$month AND Country=\"$country\" AND Language = \"". $keel ."\" LIMIT 1;";
$resultAva = mysqli_query($link, $paringAva);
if(mysqli_num_rows($resultAva)>0)
{
while($row = mysqli_fetch_assoc($resultAva))
{
if($row['NCIntro']<>"")
{
$teade .= $row["NCIntro"]. " ";
}else{
$teade .= $sona["NameDayPageMonthIntro"]. " ";
}
if($row['NCTextTitle']<>"")
{
$teade .= "
". $row["NCTextTitle"]. " ";
}else{
$teade .= " ";
}
if($row['NCTextGeneral']<>"")
{
$teade .= $row["NCTextGeneral"]. " ". $reklaamkeskel;
}
if($row['NCMeta']<>"")
{
$htmlMetaDescription = $row["NCMeta"];
}
} // while
}
if($htmlMetaDescription =="")
{
$queryX = "SELECT Tekst FROM NP_RiikKuuKeel WHERE Riik=\"$country\" AND Kuu=$month AND Keel=\"$keel\";";
$resultX = mysqli_query($link, $queryX);
if($resultX)
{
$tulemusX = mysqli_fetch_assoc($resultX);
$htmlMetaDescription = $tulemusX['Tekst'] ." ". $sona[52];
}
}
// kuu pilt
$secret = 'your-very-long-secret-key-here';
$arg = $htmlH1."-".$month."-".$country."-".$keel;
$signature = hash_hmac('sha256', $arg, $secret);
$koogipilt = "https://img.namecalendar.net/PicMonth.php?month=$month&country=$country&lang=$keel&text=" .urlencode(nc_b64url_encode($htmlH1)) . "&sig=" . $signature;
$teade .= " ";
$teade .= " ";
if(isset($sona["55-".$country]))
{
$teade .= "". $sona[47] . " ";
$teade .= $sona["55-".$country];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// riik+kuu
// nime otsing
if($tyyp == "nimi")
{
// kohalikus keeles nimi
$languages = ['bg', 'be', 'el', 'mk', 'ru', 'sr', 'tr', 'uk'];
if (in_array($keel, $languages))
{
$queryNL = "SELECT NimiLocal FROM Nimi_LocalNimi WHERE BINARY Nimi=\"". $name ."\" AND Keel=\"". $keel ."\" ORDER BY Kuup DESC LIMIT 1;";
$sona_NL = mysqli_query($link, $queryNL);
if(mysqli_num_rows ($sona_NL)>0)
{
$rowNL = mysqli_fetch_assoc($sona_NL);
if($rowNL['NimiLocal']<>"" && $name <> $rowNL['NimiLocal'])
{
$nameLocal = $rowNL['NimiLocal'];
$htmlTitle = $nameLocal. " (". $name ."): ". $sona["PageTitle"];
$htmlH1 = $htmlTitle;
}
}
}
$paring2 = $paring;
$paring .= " AND (NP_Nimi.Nimed = \"$name\" OR NP_Nimi.Nimed Like \"$name,%\" OR NP_Nimi.Nimed Like \"%, $name,%\" OR NP_Nimi.Nimed Like \"%, $name\")";
$paring2 .= " AND NP_Nimi.Nimed Like \"%$name%\" AND (NP_Nimi.Nimed <> \"$name\" AND NP_Nimi.Nimed not Like \"$name,%\" AND NP_Nimi.Nimed not Like \"%, $name,%\" AND NP_Nimi.Nimed not Like \"%, $name\")";
$teadeIntro = $sona["NameIntro"]. " ";
$nimeylevaade = "";
include "k_nimi.php";
// kokkuvõte nimepäevast
if($nimeylevaade<>"")
{
$teade .= "";
$teade .= $sona[43];
$teade .= " ";
$teade .= $nimeylevaade;
$teade .= " ";
}
// --- Pildi otsing ja loomine ---
$koogipilt = "";
$name_safe = mysqli_real_escape_string($link, $name);
$queryX = "
SELECT Pilt
FROM NP_Pilt
WHERE Nimi = '$name_safe'
ORDER BY (BINARY Nimi = '$name_safe') DESC
LIMIT 1;
";
$resultX = mysqli_query($link, $queryX);
if ($rowX = mysqli_fetch_assoc($resultX))
{
$piltFail = trim($rowX['Pilt']);
$nameNoExt = pathinfo($piltFail, PATHINFO_FILENAME);
$koogipilt = "https://img.namecalendar.net/PicName.php?name=" . rawurlencode($nameNoExt) . "&lang=" . $keel;
}
// Fallback kui pilti ei leitud/eitatud
if ($koogipilt === "")
{
$koogipilt = "https://img.namecalendar.net/NamePic.php?name=" . rawurlencode($name)."&lang=" . $keel;
}
// Kuvamine
$teade .= " ";
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
/*
// pildi otsing
$koogipilt = "";
$name_safe = mysqli_real_escape_string($link, $name);
$queryX = "
SELECT Pilt
FROM NP_Pilt
WHERE Nimi = '$name_safe'
ORDER BY (BINARY Nimi = '$name_safe') DESC
LIMIT 1;
";
$resultX = mysqli_query($link, $queryX);
if ($rowX = mysqli_fetch_assoc($resultX)) {
$koogipilt = "img/" . $rowX['Pilt'];
}
if ($koogipilt == "") {
$koogipilt = "NameDay.php?" . $name;
}
$teade .= " ";
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
*/
// nime lisatekst
if($keel<>"" && $name<>"")
{
// täpne nimi (multi-DB over $baasNDTables)
$row2 = nd_find_lisatekstnimi_exact_across_dbs(
$baasNDTables,
$baashost,
$baasuser,
$baaspass,
(string)$keel,
(string)$name
);
if ($row2 !== null)
{
if($row2['Meta']<>"")
{
$htmlMetaDescription = $row2['Meta'];
}
if($row2['Intro']<>"")
{
$teadeIntro = $row2['Intro'];
}
if($row2['Outro']<>"" && $row2['OutroTitle']<>"")
{
$teadeOutro .= " ";
$teadeOutro .= $reklaamkeskel;
$teadeOutro .= " ";
$teadeOutro .= "";
$teadeOutro .= $row2['OutroTitle'];
$teadeOutro .= " ";
$teadeOutro .= $row2['Outro'];
$teadeOutro .= " ";
}
if($row2['Lisatekst']<>"")
{
$teade .= "";
// if (!empty($row2['LisatekstTitle']))
// {
// $teade .= $row2['LisatekstTitle'];
// }else{
$teade .= $sona[44];
// }
$teade .= " ";
$teade .= $row2['Lisatekst'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['Origin']<>"")
{
$teade .= "";
// if (!empty($row2['OriginTitle']))
// {
// $teade .= $row2['OriginTitle'];
// }else{
$teade .= $sona["NameOrigin"];
// }
$teade .= " ";
$teade .= $row2['Origin'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['Gender']<>"")
{
$teade .= "";
// if (!empty($row2['GenderTitle']))
// {
// $teade .= $row2['GenderTitle'];
// }else{
$teade .= $sona["NameGender"];
// }
$teade .= " ";
$teade .= $row2['Gender'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['Mood']<>"")
{
$teade .= "";
// if (!empty($row2['MoodTitle']))
// {
// $teade .= $row2['MoodTitle'];
// }else{
$teade .= $sona["NameMood"];
// }
$teade .= " ";
$teade .= $row2['Mood'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['Languages']<>"")
{
$teade .= "";
$teade .= $sona["NameLanguages"];
$teade .= " ";
$teade .= NameLines($row2['Languages'], $name);
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['Nicknames']<>"")
{
list($first, $rest) = extractFirstRowAndRest($row2['Nicknames']);
$teade .= "";
$teade .= $first;
$teade .= " ";
$teade .= str_replace('
', ' ', $rest);
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['People']<>"")
{
$teade .= "";
$teade .= $sona["NotablePeople"] .": ". $name;
$teade .= " ";
$teade .= str_replace('
', ' ', $row2['People']);
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
$queryArt = "SELECT Link, Pilt FROM NP_Pages WHERE ShowSitemap=1 AND Link=\"". $name ."\";";
$resultArt = mysqli_query($link, $queryArt);
if(mysqli_num_rows ($resultArt)==1)
{
$rowArt = mysqli_fetch_assoc($resultArt);
$pageArt = $rowArt['Link'];
$pagePilt = $rowArt['Pilt'];
$teade .= "";
$teade .= $sona["page-". $pageArt ."-Title"];
$teade .= " ";
$teade .= $sona["page-". $pageArt ."-Intro"];
$teade .= " ";
$teade .= $sona["ReadArticle"].": " ."".$sona["page-". $pageArt ."-Title"] ." ";
$teade .= " ";
if($pagePilt<>"")
{
$pagePilt = pathinfo($pagePilt, PATHINFO_FILENAME);
$teade .= " ";
$teade .= " ";
}
$teade .= $reklaamkeskel;
$teade .= " ";
}
if($row2['LinnText']<>"")
{
list($first, $rest) = extractFirstRowAndRest($row2['LinnText']);
$teade .= "";
$teade .= $first;
$teade .= " ";
$teade .= $rest;
$teade .= " ";
}
if($row2['LinnPilt']<>"")
{
$pagePilt = pathinfo($row2['LinnPilt'], PATHINFO_FILENAME);
$teade .= " ";
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// nime lisatekst
}
// lisateate lõpp
// palindroom
if (isPalindrome($name))
{
$teade .= "";
$teade .= $sona['PalindromeTitle'] .": ". $name;
$teade .= " ";
$teade .= $sona['PalindromeText'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
// isogramm
if (strlen($name) >= 5)
{
if (isIsogram($name))
{
$teade .= "";
$teade .= $sona['IsogramTitle'] .": ". $name;
$teade .= " ";
$teade .= $sona['IsogramText'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// alphabetical order
if (strlen($name) >= 3)
{
if (isAlphabeticalOrder($name))
{
$teade .= "";
$teade .= $sona['AlphabeticalTitle'] .": ". $name;
$teade .= " ";
$teade .= $sona['AlphabeticalText'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// alphabetical order - reverse
if (strlen($name) >= 3)
{
if (isAlphabeticalOrderReverse($name))
{
$teade .= "";
$teade .= $sona['AlphabeticalReverseTitle'] .": ". $name;
$teade .= " ";
$teade .= $sona['AlphabeticalReverseText'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// konstant-kaashäälik
if (strlen($name) >= 5)
{
if (isAlternatingVowelConsonant($name))
{
$teade .= "";
$teade .= $sona['AlternatingVCTitle'] .": ". $name;
$teade .= " ";
$teade .= $sona['AlternatingVCText'];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// mitmekordne topelttäht
if (strlen($name) >= 4)
{
$kokkuDouble = hasDoubleDoubleLetters($name);
if ($kokkuDouble>=2)
{
$teade .= "";
$teade .= $sona['DoubleLetterTitle'] .": ". $name;
$teade .= " ";
$teade .= str_replace('2', $kokkuDouble, $sona['DoubleLetterText']);
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
}
// nimi ka teistpidi
$queryX = "SELECT Nimi FROM NP_Wordplay WHERE ReverseName=1 AND Nimi=\"$name\";";
$resultX = mysqli_query($link, $queryX);
if($rowX = mysqli_fetch_assoc($resultX))
{
$nameMagic = $rowX['Nimi'];
$nameMagic2 = ucfirst(strrev(strtolower($nameMagic)));
$teade .= "";
$teade .= $sona['MirrorMagicTitle'] .": ". $nameMagic ." & " . $nameMagic2;
$teade .= " ";
$teade .= $sona['MirrorMagicText'];
$teade .= " ";
$teade .= $sona["VaataVeel"].": " ."". $nameMagic2 .": ". $sona["PageTitle"] ." ";
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
}
// numereoloogia
$teade .= "";
$teade .= $sona["NumerologyTitle"]. ": ". $name;
$teade .= " ";
$teade .= $sona["NumerologyIntro"] ." ";
$teade .= "". $sona["NumerologyPythagorean"] ." ";
$nr = NumPythagorean($name);
if($nr>0)
{
$teade .= str_replace('
', ' ', $sona["NumerologyPythagorean-". $nr]) ." ";
}
$teade .= $reklaamkeskel;
$teade .= " ";
$teade .= "". $sona["NumerologyChaldean"] ." ";
$nr = NumChaldean($name);
if($nr>0)
{
$teade .= str_replace('
', ' ', $sona["NumerologyChaldean-". $nr]) ." ";
}
$teade .= "". $sona["AstrologyTitle"] ." ";
$teade .= $sona["AstrologyText"] ." ";
$nr = NumPythagorean2($name);
if($nr>0)
{
$teade .= str_replace('
', ' ', $sona["Astrology-". $nr]);
}
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
$teade = $teadeIntro ." ". $teade;
}
// nime otsingu lõpp
// päeva-kuu ja avalehe otsing
if($tyyp == "päev+kuu" || $tyyp == "avaleht")
{
$paring .= " AND NP_Nimi.Kuu=$month AND NP_Nimi.Paev=$day";
}
if($tyyp == "päev+kuu")
{
$htmlMetaDescription = "";
$paringAva = "SELECT NCTextTitle, NCTextGeneral, NCMeta, NCIntro FROM ND_Text_Paev WHERE Month=$month AND Day=$day AND Language = \"". $keel ."\" LIMIT 1;";
$resultAva = mysqli_query($link, $paringAva);
if(mysqli_num_rows($resultAva)>0)
{
while($row = mysqli_fetch_assoc($resultAva))
{
if($row['NCIntro']<>"")
{
$teade .= $row["NCIntro"]. " ";
}else{
$teade .= $sona["NameDayPageDayIntro"]. " ";
}
if($row['NCTextTitle']<>"")
{
$teade .= "". $row["NCTextTitle"]. " ";
}else{
$teade .= " ";
}
if($row['NCTextGeneral']<>"")
{
$teade .= $row["NCTextGeneral"]. " ". $reklaamkeskel;
}
if($row['NCMeta']<>"")
{
$htmlMetaDescription = $row["NCMeta"];
}
} // while
}
// --- Kuupäeva pildi loomine
$secret = 'your-very-long-secret-key-here';
$t1 = $sona["Kuu-".$month];
$arg = $t1."-".$month."-".$day."-".$keel;
$signature = hash_hmac('sha256', $arg, $secret);
$koogipilt = "https://img.namecalendar.net/PicDay.php?month=$month&day=$day&lang=$keel&text=" .urlencode(nc_b64url_encode($t1)) . "&sig=" . $signature;
// Kuvamine
$teade .= " ";
$teade .= " ";
// kuupäeva pilt
if($htmlMetaDescription == "")
{
$queryX = "SELECT Tekst FROM NP_PaevKuuKeel WHERE Paev=$day AND Kuu=$month AND Keel=\"$keel\";";
$resultX = mysqli_query($link, $queryX);
if($resultX)
{
$tulemusX = mysqli_fetch_assoc($resultX);
$htmlMetaDescription = $tulemusX['Tekst'] .". ". $sona[54];
}
}
}
if($tyyp == "avaleht")
{
$teade .= $sona["NameDayPageTodayIntro"];
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
$htmlMetaDescription = $sona[53];
$paringAva = "SELECT NCTextToday FROM ND_Text_Paev WHERE Month=$month AND Day=$day AND Language = \"". $keel ."\" LIMIT 1;";
$resultAva = mysqli_query($link, $paringAva);
if(mysqli_num_rows($resultAva)>0)
{
while($row = mysqli_fetch_assoc($resultAva))
{
if($row['NCTextToday']<>"")
{
$teade .= "";
$teade .= $sona["WhoCelebratesToday"];
$teade .= " ";
$teade .= $row["NCTextToday"]. " ". $reklaamkeskel;;
}
} // while
}
}
// päeva-kuu ja avalehe otsing lõpp
// päring nimekiri va nimi
if($tyyp == "riik+kuu" || $tyyp == "päev+kuu" || $tyyp == "avaleht")
{
$paring .= " ORDER BY NP_Nimi.Kuu, NP_Nimi.Paev, NP_Riik.$keel;";
$result = mysqli_query($link, $paring);
// tulemusi ei ole
if(mysqli_num_rows($result)==0)
{
$teade=$sona[49];
}
}
// päring - nimi
if($tyyp == "nimi")
{
$paring .= " ORDER BY NP_Nimi.Kuu, NP_Nimi.Paev, NP_Riik.$keel;";
$paring2 .= " ORDER BY NP_Nimi.Kuu, NP_Nimi.Paev, NP_Riik.$keel;";
$result = mysqli_query($link, $paring);
$result2 = mysqli_query($link, $paring2);
// tulemusi ei ole
$kasOK = 1;
if(mysqli_num_rows($result)==0 && mysqli_num_rows($result2)==0)
{
$teade .= "";
$teade .= $sona["NoFoundTitle"];
$teade .= " ";
$teade .= $sona["NoFoundDoubleCheck"];
$teade .= " ";
$kasOK = 0;
}
if($kasOK == 0)
{
$queryX = "SELECT Nimi FROM NP_NimiLisa WHERE Nimi=\"". $name ."\" LIMIT 1;";
$resultX = mysqli_query($link, $queryX);
if(mysqli_num_rows ($resultX)==1)
{
$kasOK = 2;
}
}
/*
// kuva populaarset nime
$queryX = "SELECT
Ranked.Position
FROM (
SELECT
Nimi,
Impressions,
ROW_NUMBER() OVER (ORDER BY Impressions DESC) AS Position
FROM NP_Popular
WHERE Period = 365
) AS Ranked
WHERE Position <= 150
AND BINARY Nimi = '". $name ."'
LIMIT 1;";
$resultX = mysqli_query($link, $queryX);
if ($rowX = mysqli_fetch_assoc($resultX))
{
$position = (int)$rowX['Position'];
$teade .= "";
$teade .= $sona["PopularName"];
$teade .= " ";
$teade .= str_replace("10", top10($position), $sona["PopularNameText"]);
$teade .= " ";
}
*/
// lemmikloom
$queryX = "SELECT Tyyp, Gender FROM NP_Lemmik WHERE Nimi=\"". $name ."\" ORDER BY ID LIMIT 1;";
$resultX = mysqli_query($link, $queryX);
if(mysqli_num_rows ($resultX)>0)
{
while($rowX = mysqli_fetch_assoc($resultX))
{
$teade .= "";
$teade .= $sona["PetsAsWell"];
$teade .= " ";
$teade .= $sona["PetsAsWellText"];
$teade .= " ";
$teade .= $sona["FindOutMore"] .": ". "". $sona["page-pets-Title"] ." 🐾";
$teade .= " ";
$teade .= $reklaamkeskel;
$teade .= " ";
break;
}
}
}
// päring nimi
// teksti osa
$htmlSisu .= $teade;
// tabel
if($tyyp == "riik+kuu" || $tyyp == "päev+kuu" || $tyyp == "avaleht")
{
if(mysqli_num_rows($result)>0)
{
$htmlSisu .= "";
if($tyyp == "päev+kuu")
{
$htmlSisu .= $htmlH1. ": ". $sona["NameDayListCompleteNamesCountries"];
}
if($tyyp == "riik+kuu")
{
$htmlSisu .= $htmlH1. ": ". $sona["NameDayListCompleteNamesDates"];
}
if($tyyp == "avaleht")
{
$htmlSisu .= $htmlH1. ": ". $sona["NameDayListCompleteNamesCountries"];
}
$htmlSisu .= " ";
if($tyyp == "päev+kuu")
{
$htmlSisu .= $sona["NameDayListDay"];
}
if($tyyp == "riik+kuu")
{
$htmlSisu .= $sona["NameDayListMonth"];
}
if($tyyp == "avaleht")
{
$htmlSisu .= $sona["NameDayListToday"];
$htmlSisu .= "". $sona[34] .": ". $day ." ". $sona[33] .": ". $sona["Kuu-".$month] . " ";
}
$htmlSisu .= " ";
include "k_tabel.php";
}
}
// tabel - nimi
if($tyyp == "nimi")
{
if(mysqli_num_rows($result)>0 || mysqli_num_rows($result2)>0)
{
if(mysqli_num_rows($result)>0)
{
$htmlSisu .= "";
$htmlSisu .= $sona[45] ." ". $name;
$htmlSisu .= " ";
$htmlSisu .= $sona["NameDayListExact"];
$htmlSisu .= " ";
include "k_tabel.php";
$htmlSisu .= " ";
}
if(mysqli_num_rows($result2)>0)
{
$result = $result2;
$htmlSisu .= "";
$htmlSisu .= $sona[46] ." (". $name .")";
$htmlSisu .= " ";
$htmlSisu .= $sona["NameDayListSimilar"];
$htmlSisu .= " ";
include "k_tabel.php";
}
}
$htmlSisu .= $teadeOutro;
}
// avalehe ja kuupäevade tekst Name Days: Tradition, Meaning, and Celebration
if($tyyp == "avaleht" || $tyyp == "päev+kuu")
{
if($sona[50]<>"")
{
$htmlSisu .= " ";
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "". $sona[47] ." ";
$htmlSisu .= $sona[50];
}
}
// featured names - kuva
if($tyyp == "päev+kuu" || $tyyp == "avaleht")
{
if(isset($allNames))
{
arsort($allNames);
$placeholders = "";
$placeholders2 = "";
while (($nameF = key($allNames)) !== null)
{
if($placeholders<>""){$placeholders .= ", ";}
$placeholders .= "\"". $nameF ."\"";
$placeholders2 .= "WHEN \"". $nameF ."\" THEN ". $allNames[$nameF] ." ";
next($allNames);
}
$placeholders = "SELECT Nimi, Lisatekst, Origin FROM NP_LisatekstNimi WHERE Keel=\"$keel\" AND BINARY Nimi IN ($placeholders) ORDER BY CASE Nimi ". $placeholders2 ."END DESC, RAND() LIMIT 1;";
$resultFeat = mysqli_query($link, $placeholders);
if(mysqli_num_rows ($resultFeat)>0)
{
while($rowFeat = mysqli_fetch_assoc($resultFeat))
{
$htmlSisu .= " ";
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "";
$htmlSisu .= $sona["NameoftheDay"] .": ";
$nameLocal = "";
$languages = ['bg', 'be', 'el', 'mk', 'ru', 'sr', 'tr', 'uk'];
if (in_array($keel, $languages))
{
$queryNL = "SELECT NimiLocal FROM Nimi_LocalNimi WHERE Nimi=\"".$rowFeat["Nimi"] ."\" AND Keel=\"". $keel ."\" ORDER BY Kuup DESC LIMIT 1;";
$sona_NL = mysqli_query($link, $queryNL);
if(mysqli_num_rows ($sona_NL)>0)
{
$rowNL = mysqli_fetch_assoc($sona_NL);
if($rowNL['NimiLocal']<>"" && $name <> $rowNL['NimiLocal'])
{
$nameLocal = $rowNL['NimiLocal'];
}
}
}
if($nameLocal<>"")
{
$htmlSisu .= $nameLocal;
}else{
$htmlSisu .= $rowFeat["Nimi"];
}
$htmlSisu .= " ";
if($tyyp == "avaleht")
{
$htmlSisu .= $sona["NameoftheDayToday"];
}else{
$htmlSisu .= $sona["NameoftheDayText"];
}
$htmlSisu .= "";
$htmlSisu .= $sona[44];
$htmlSisu .= " ";
$htmlSisu .= $rowFeat["Lisatekst"];
$htmlSisu .= " ";
if($rowFeat["Origin"]<>"")
{
$htmlSisu .= "";
$htmlSisu .= $sona["NameOrigin"];
$htmlSisu .= " ";
$htmlSisu .= $rowFeat["Origin"];
$htmlSisu .= " ";
}
$htmlSisu .= " ". $sona["FindOutMore"] .": ". "". $rowFeat["Nimi"] .": ". $sona["PageTitle"] ." ";
$htmlSisu .= " ";
}
}
}
} // featured name
// pilt
if($tyyp == "riik+kuu" || $tyyp == "päev+kuu" || $tyyp == "avaleht")
{
if($tyyp == "riik+kuu")
{
$secret = 'your-very-long-secret-key-here';
$arg = $htmlH1."-".$month."-".$country."-".$keel;
$signature = hash_hmac('sha256', $arg, $secret);
$pilt = "https://img.namecalendar.net/PicMonth2.php?month=$month&country=$country&lang=$keel&text=" .urlencode(nc_b64url_encode($htmlH1)) . "&sig=" . $signature;
$piltAlt = $sona["CelebrationPicture"] ." ". $sona["Riigis-".$country];
}
if($tyyp == "päev+kuu")
{
$secret = 'your-very-long-secret-key-here';
$t1 = $htmlH1;
$arg = $t1."-".$month."-".$day."-".$keel;
$signature = hash_hmac('sha256', $arg, $secret);
$pilt = "https://img.namecalendar.net/PicDay2.php?month=$month&day=$day&lang=$keel&text=" .urlencode(nc_b64url_encode($t1)) . "&sig=" . $signature;
$piltAlt = $sona["CelebrationPicture"];
}
if($tyyp == "avaleht")
{
$pilt = "https://img.namecalendar.net/PicSite.php?pic=NameDay-today-" . $keel . "&lang=$keel";
$piltAlt = $sona["CelebrationPicture"];
}
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= " ";
$htmlSisu .= " ";
}
// riigi artikkel
if($tyyp == "riik+kuu")
{
$htmlSisu .= $sona["NameDayArticle-". $country];
}
// kuidas tähistada - lühidalt
if($tyyp == "päev+kuu" || $tyyp == "avaleht")
{
list($first, $rest) = extractFirstRowAndRest($sona["Celebrate-". rand(1, 30)]);
$htmlSisu .= "";
$htmlSisu .= $first;
$htmlSisu .= " ";
$htmlSisu .= $rest;
$htmlSisu .= " ";
$htmlSisu .= $sona["ReadMore"] .": ". "". $sona["page-celebrate-Title"] ." ";
$htmlSisu .= " ";
}
// populaarsed nimed
if($tyyp == "päev+kuu" || $tyyp == "avaleht")
{
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "";
$htmlSisu .= $sona["MostPopularNames"];
$htmlSisu .= " ";
$htmlSisu .= $sona["MostPopularNamesText"];
$htmlSisu .= " ";
$j = 0;
/*
$queryX = "SELECT NP_Populaarne.Nimi FROM NP_Populaarne WHERE NP_Populaarne.OK>=1 AND NP_Populaarne.Keel=\"$keel\" AND NP_Populaarne.Lehelt<>\"\" GROUP BY NP_Populaarne.Nimi ORDER BY count(NP_Populaarne.Nimi) DESC, NP_Populaarne.Kuupaev DESC LIMIT 5;";
$resultX = mysqli_query($link, $queryX);
if(mysqli_num_rows ($resultX)>0)
{
while($rowX = mysqli_fetch_assoc($resultX))
{
$j++;
$htmlSisu .= "$j. ". $rowX['Nimi'] ." " ;
$htmlSisu .= " ";
}
}
*/
$htmlSisu .= " ";
$htmlSisu .= $sona["FindOutMore"] .": ". "". $sona["page-popular-Title"] ." ";
$htmlSisu .= " ";
}
// riikide loend
if($tyyp == "avaleht" || $tyyp == "päev+kuu")
{
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "";
$htmlSisu .= $sona["ExploreNameDaysbyCountry"];
$htmlSisu .= " ";
$htmlSisu .= $sona["ExploreNameDaysbyCountryText"];
$htmlSisu .= " ";
$htmlSisu .= $sona[32] .": ";
$htmlSisu .= "";
$htmlSisu .= " ";
$t = "";
if($month<>""){$t = "&month=$month";}
$paring = "SELECT CCode, $keel AS Riik FROM NP_Riik ORDER BY $keel";
$result = mysqli_query($link, $paring);
while($row = mysqli_fetch_assoc($result)) {
$vriikID = $row['CCode'];
$vriikNimi = $row['Riik'];
$htmlSisu .= "";
$htmlSisu .= $sona[31] .": ";
$htmlSisu .= "";
$htmlSisu .= "";
$htmlSisu .= " ";
// millal on sinu nimepäev?
// what are name days
if($tyyp == "avaleht")
{
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "";
$htmlSisu .= $sona["page-namedays-Title"];
$htmlSisu .= " ";
$htmlSisu .= $sona["page-namedays-Intro"];
$htmlSisu .= " ";
$htmlSisu .= $sona["ReadMore"] .": ". "". $sona["page-namedays-Title"] ." ";
$htmlSisu .= " ";
}
// lemmikloomad
if($tyyp == "päev+kuu" || $tyyp == "avaleht")
{
$htmlSisu .= $reklaamkeskel;
$htmlSisu .= " ";
$htmlSisu .= "";
$htmlSisu .= $sona["PetsNames2"];
$htmlSisu .= " ";
$htmlSisu .= $sona["PetsAvalehtText"];
$htmlSisu .= " ";
$htmlSisu .= $sona["FindOutMore"] .": ". "". $sona["page-pets-Title"] ." 🐾";
$htmlSisu .= " ";
}
?>
Warning : Cannot modify header information - headers already sent by (output started at /data01/virt102300/domeenid/www.kingsize.ee/namecalendar/k_nimekiri.php:83) in /data01/virt102300/domeenid/www.kingsize.ee/namecalendar/index.php on line 821
Warning : Cannot modify header information - headers already sent by (output started at /data01/virt102300/domeenid/www.kingsize.ee/namecalendar/k_nimekiri.php:83) in /data01/virt102300/domeenid/www.kingsize.ee/namecalendar/index.php on line 822
Laurean: Nimepäev, nime tähendus ja palju muud
Laurean: Nimepäev, nime tähendus ja palju muud