Current Row:[ //0 CARICO TUTTE LE VISUALIZZAZIONI TOTALI PER PODCAST (SOLO 100 PIU' VISTI) $rec = _dbGet("SELECT tb_podcast FROM tb_visualTotali ORDER BY visualizzazioni DESC;"); $vis = array(); while( $rec != NULL ) { $vis[] = $rec['tb_podcast']; $rec = _dbGet(); } //0 CARICO TUTTE LE COLLEZIONI $rec = _dbGet("SELECT id,titolo,descrizione,data,tb_partner,tb_visibilita,seo_name FROM tb_collezione;"); $collezioni = array(); while($rec != NULL) { $collezioni[ $rec['id']] = $rec; $rec = _dbGet(); } if( isset( $collezioni[0])) unset($collezioni[0]); //0 LETTURA $alls = array(); $mem = array(); $num = 0; foreach( $vis as $i ) { $rec = _dbGet("SELECT id,tb_collezione,titolo,data,descrizione,tb_partner,seo_name FROM tb_podcast WHERE (tb_visibilita='1' OR tb_visibilita='2') AND tb_mode='1' AND id ='{$i}';"); if( $rec == NULL ) continue; if(count($alls)>=8) break; $ctemp = $rec['tb_collezione'] ?? 0; if( $ctemp ) { if( ! in_array( $ctemp, $mem)) { $alls[ $rec['id']] = $rec; $mem[] = $ctemp; } } else $alls[ $rec['id']] = $rec; } //0 -- // -------------------------------------------------------------- // Voglio vedere i podcast più visualizzati, anche se fanno // parte della stessa serie. $i4Podcast[0] = ""; $i4Podcast[1] = ""; $i4Podcast[2] = ""; $color = array("#24577a","#59a1a3","#d1f7d1","#57cc99"); foreach( $alls as $i=>$rec ) { $t = $rec['titolo'] ?? ""; $podcastPage = seoGetPodcastOrTriageName( $i ); $d = $rec['descrizione'] ?? ""; // ------------------------------------ $d = $collezioni[ $rec['tb_collezione']]['descrizione'] ?? $d; $t = $collezioni[ $rec['tb_collezione']]['titolo'] ?? $t; // -- $t = htmlspecialchars($t); $d = strip_tags($d); $d = getCutSentence( $d, 100); $colore = $color[$num%4]; //0 IMMAGINE PODCAST //1 ------------------------------------ CONDIVISA //0 alle brutte usiamo l'immagine tampone (nessuna immagine definita) $indirizzoImmagine = "/latitude/green/images/pic01.jpg"; // immagine tampone //0 vediamo se il podcast fa parte di una serie/collezione if( !$rec['tb_collezione'] || _dbGet("SELECT id FROM tb_collezione WHERE id='{$rec['tb_collezione']}' AND immagine IS NOT NULL;") == NULL ) { if( _dbGet("SELECT id FROM tb_podcast WHERE id='{$i}' AND immagine IS NOT NULL;") != NULL ) { $p_id = base64_encode( $i ); $p_campo = base64_encode('immagine'); $p_tabella = base64_encode('tb_podcast'); $indirizzoImmagine = "index.php?fx=ixmage&id={$p_id}&f={$p_campo}&t={$p_tabella}"; // &a={$a}&l={$l} } } else { $p_id = base64_encode( $rec['tb_collezione'] ); $p_campo = base64_encode('immagine'); $p_tabella = base64_encode('tb_collezione'); $indirizzoImmagine = "index.php?fx=ixmage&id={$p_id}&f={$p_campo}&t={$p_tabella}"; // &a={$a}&l={$l} } //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //0 ---------------- $i4Podcast[$num/4] .= << {$t}

{$t}

{$d}

EOT; if( ++$num >= 8 ) break; } $t1 = _dbGet("SELECT valore FROM tb_node WHERE nome='home.ascoltati.titolo';")['valore'] ?? "I più ascoltati"; $what = <<

{$t1}

{$i4Podcast[0]}
{$i4Podcast[1]}
{$i4Podcast[2]}
EOT; return $what; ] ********************************************************************************************************************* Prev Row:[ //0 CARICO TUTTE LE COLLEZIONI $rec = _dbGet("SELECT id,titolo,descrizione,data,tb_partner,tb_visibilita,seo_name FROM tb_collezione;"); $collezioni = array(); while($rec != NULL) { $collezioni[ $rec['id']] = $rec; $rec = _dbGet(); } if( isset( $collezioni[0])) unset($collezioni[0]); //0 CARICO TUTTI I $PARTNER $rec = _dbGet("SELECT id,titolo FROM tb_partner;"); $partner = array(); while($rec != NULL) { $partner[ $rec['id']] = $rec['titolo'] ?? ""; $rec = _dbGet(); } //2 -------------------------------------------------------------- //2 Voglio vedere i podcast recentemente prodotti. //2 Se fanno parte di una serie, prendo unicamente il più recente. //2 Non prendo podcast che fanno parte della stessa serie. //0 tb_partner == 4 -> TALKING NAT $q = <<$rec ) { $id_p = $rec['tb_partner'] ?? 0; $partnerPage = seoGetPartnerName( $id_p ); $p = $partner[$id_p] ?? ""; if( !isset( $prt[$p])) { $prt[$p] = true; if( $id_p != 4 ) $elenco3Partner .= '
  • ' . $p . '
  • ' . "\n"; } $t = $rec['titolo'] ?? ""; $d = $rec['descrizione'] ?? ""; // ------------------------------------ $d = $collezioni[ $rec['tb_collezione']]['descrizione'] ?? $d; $t = $collezioni[ $rec['tb_collezione']]['titolo'] ?? $t; // -- $t = htmlspecialchars($t); $d = strip_tags($d); $d = getCutSentence( $d, 200); $podcastPage = seoGetPodcastOrTriageName( $i ); $colore = $color[$idx]; $idx = ($idx + 1) % 3; //0 IMMAGINE PODCAST //1 ------------------------------------ CONDIVISA //0 alle brutte usiamo l'immagine tampone (nessuna immagine definita) $indirizzoImmagine = "/latitude/green/images/pic01.jpg"; // immagine tampone //0 vediamo se il podcast fa parte di una serie/collezione if( !$rec['tb_collezione'] || _dbGet("SELECT id FROM tb_collezione WHERE id='{$rec['tb_collezione']}' AND immagine IS NOT NULL;") == NULL ) { if( _dbGet("SELECT id FROM tb_podcast WHERE id='{$i}' AND immagine IS NOT NULL;") != NULL ) { $p_id = base64_encode( $i ); $p_campo = base64_encode('immagine'); $p_tabella = base64_encode('tb_podcast'); $indirizzoImmagine = "index.php?fx=ixmage&id={$p_id}&f={$p_campo}&t={$p_tabella}"; // &a={$a}&l={$l} } } else { $p_id = base64_encode( $rec['tb_collezione'] ); $p_campo = base64_encode('immagine'); $p_tabella = base64_encode('tb_collezione'); $indirizzoImmagine = "index.php?fx=ixmage&id={$p_id}&f={$p_campo}&t={$p_tabella}"; // &a={$a}&l={$l} } //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //1 ------------------------------------ CONDIVISA //0 ---------------- $i3Podcast .= << {$t} EOT; } } $t1 = _dbGet("SELECT valore FROM tb_node WHERE nome='home.recenti.titolo';")['valore'] ?? "Podcast più recenti"; $s1 = _dbGet("SELECT valore FROM tb_node WHERE nome='home.recenti.sottotitolo';")['valore'] ?? "Questi sono i tre podcast più recenti che sono stati commissionati dai seguenti partner:"; $what = <<

    I più recenti

    {$i3Podcast}
    EOT; return $what; ]
    Fatal error: Uncaught ErrorException: Implicit conversion from float 0.25 to int loses precision in /var/www/html/index.php(743) : eval()'d code:91 Stack trace: #0 /var/www/html/index.php(743) : eval()'d code(91): exceptions_error_handler(8192, 'Implicit conver...', '/var/www/html/i...', 91) #1 /var/www/html/index.php(743): eval() #2 /var/www/html/index.php(1036): please_execTuttVariab(Array, '\t\t\t\t\t\t\t<!-- One...') #3 /var/www/html/index.php(958): replaceExec(Array, '\t{{=getSezione3...', false) #4 /var/www/html/index.php(2132): _parser(Array) #5 {main} thrown in /var/www/html/index.php(743) : eval()'d code on line 91