CHOOSE THE APP:";
$no_result = "
';
}else{
if (count($_POST["test-".$lang.""]) > 0 || count($_SESSION["test-".$lang.""]) > 0) {
if (count($_POST["test-".$lang.""]) > 0) {
$_SESSION["test-".$lang.""] = $_POST["test-".$lang.""];
}
//SELECT * FROM `wyrp_11_postmeta` WHERE `meta_value` LIKE 'I want make new friends' ORDER BY `post_id` DESC
$rows = $wpdb->get_results("SELECT DISTINCT $wpdb->posts.ID, $wpdb->posts.post_title
FROM $wpdb->posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
WHERE $wpdb->posts.post_status = 'publish'
AND $wpdb->postmeta.meta_value LIKE '%".$_SESSION["test-".$lang.""]."%'
AND $wpdb->postmeta.meta_key = 'test-".$lang."'
AND $wpdb->posts.ID
IN (SELECT post_id FROM `wyrp_11_postmeta` WHERE meta_key='_test-".$lang."')
ORDER BY $wpdb->posts.post_title ASC");
// loop through the results
if( $rows )
{
echo $title;
foreach( $rows as $row )
{
// load image src
// - https://www.advancedcustomfields.com/resources/field-types/image/
$src = wp_get_attachment_image_src( get_post_thumbnail_id($row->ID), 'full'); //medium
?>
';
?>
NO RESULTS
";
$url = "http://apps.id-ict.eu/en/training-content/thebestapp/";
$name_button = "New search apps";
$no_select = "GO BACK AND CHOOSE ONE OF OPTIONS";
}else if ($lang == "es"){
$title = "Elige una aplicación:
"; $no_result = "No se han obtenido resultados
";
$url = "http://apps.id-ict.eu/es/contenido-formativo/lamejorapp/";
$name_button = "Nueva búsqueda";
$no_select = "Por favor, elige una opción";
}else if ($lang == "sl"){
$title = "Izberi program/aplikacijo:
"; $no_result = "Ni zadetkov
";
$url = "http://apps.id-ict.eu/sl/uvod/izberi-aplikacijo/";
$name_button = "Novo iskanje programa/aplikacije";
$no_select = "Prosim, izberi eno od možnosti";
}else if ($lang == "hr"){
$title = "ODABERI APLIKACIJU:
"; $no_result = "NEMA REZULTATA
";
$url = "http://apps.id-ict.eu/hr/uvod-2/izberite-najboljso-app/";
$name_button = "PRETRAŽI NOVU APLIKACIJU";
$no_select = "MOLIMO ODABERITE OPCIJU";
}else if ($lang == "it"){
$title = "Scegli un'app:
"; $no_result = "Nessun risultato trovato
";
$url = "http://apps.id-ict.eu/it/introduzione/scegli-la-migliore-app/";
$name_button = "Nuova ricerca";
$no_select = "Per favore, scegli un'opzione";
}else if ($lang == "pt"){
$title = "Escolher uma app:
"; $no_result = "Nenhum resultado encontrado
";
$url = "http://apps.id-ict.eu/pt/introducao/escolha-a-melhor-app/";
$name_button = "Nova pesquisa";
$no_select = "Por favor, seleciona uma opção";
}else if ($lang == "de"){
$title = "Wähle eine App aus:
"; $no_result = "Keine Ergebnisse
";
$url = "http://apps.id-ict.eu/de/einfuhrung/wahlen-sie-die-beste-app-aus";
$name_button = "Neue App-Suche";
$no_select = "Bitte wähle eine Option aus";
}
if (count($_POST["test-".$lang.""]) == 0) { //No ha seleccionado ninguna opción
echo ''.$no_select.'
';
echo '