\t\n"; $feed.= "\n"; } //$feed.= " editor@swprog.com\n"; //$feed.= " webmastro@swprog.com\n"; //$feed.= " 5\n"; /* $feed.= " Docs\n"; $feed.= " Rating\n"; $feed.= " Skip\n"; $feed.= " Skip\n"; */ $feed.= " \n"; $feed.= " https://www.swprog.com/immagini/feedlog.png\n"; $feed.= " logo\n"; $feed.= " https://www.swprog.com/\n"; $feed.= " 144\n"; //la dimensione max pare che sia 144, prima era 200 $feed.= " 80\n"; //$feed.= " descrizione\n"; $feed.= " \n"; // News di mblog mysql_select_db("Sql158486_2", $db); $sql = "SELECT * FROM message ORDER BY data desc LIMIT 10;"; $result = mysql_query($sql); $i = 0; while ($r = mysql_fetch_array($result)) { $id = $r["titolo"]; $data = $r["data"]; $ora_messaggio = $r["ora"]; $titolo = $r["titolo"]; $text = $r["text"]; $guid = $r["guid"]; $ora = substr($ora_messaggio,0,2); $minuti = substr($ora_messaggio,3,2); $giorno = substr($data,8,2); $mese = substr($data,5,2); $anno = substr($data,0,4); $data = date("r", mktime ($ora, $minuti, 0, $mese, $giorno, $anno)); if ($i == 0) { $feed.= " ".$data."\n"; $i++; } $url = "https://www.swprog.com/mblog/".$guid."/"; $testo = strip_tags($text); if (strlen($testo) > 160) { $testo = substr($testo, 0, 160); $testo = substr($testo, 0, strrpos($testo,' ')); $testo = $testo." ..."; } $testo = htmlspecialchars($testo); $feed.= " \n"; $feed.= " ".htmlspecialchars($titolo)."\n"; $feed.= " ".htmlspecialchars($url)."\n"; //$feed.= " ".htmlspecialchars($text)."\n"; $feed.= " ".$testo."\n"; //$feed.= " ".$autore."\n"; //$feed.= " ".$argomento."\n"; $feed.= " ".htmlspecialchars($data)."\n"; //$feed.= " https://www.swprog.com/rss/howto.php\n"; $feed.= " \n"; //$feed.= " ".htmlspecialchars("")."\n"; //$feed.= " ".htmlspecialchars("")."\n"; //?????$feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); } // Tutto il resto mysql_select_db("Sql158486_1", $db); $sql = "SELECT * FROM article ORDER BY data desc;"; $result = mysql_query($sql); $i = 0; while ($r = mysql_fetch_array($result)) { $title = $r["titolo"]; $url = $r["url"]; $descrizione = $r["descrizione"]; $autore = $r["autore"]; $argomento = $r["argomento"]; $data = $r["data"]; $ora = $r["ora"]; $tipo = $r["tipo"]; if ($tipo != "") { $ora = substr($ora,0,2); $minuti = substr($ora,3,2); $giorno = substr($data,8,2); $mese = substr($data,5,2); $anno = substr($data,0,4); $data = date("r", mktime ($ora, $minuti, 0, $mese, $giorno, $anno));; if ($i == 0) { $feed.= " ".$data."\n"; $i++; } $preurl = ""; switch($tipo) { case "a": $preurl = "https://www.swprog.com/articoli/"; break; case "h": $preurl = "https://www.swprog.com/howto/"; break; case "g": $preurl = "https://www.swprog.com/guide/"; break; case "e": $preurl = "https://www.swprog.com/guide/"; break; case "r": $preurl = "https://www.swprog.com/recensioni/"; break; case "t": $preurl = "https://www.swprog.com/tools/"; break; case "s": $preurl = "https://www.swprog.com/script/"; break; case "f": $preurl = "https://www.swprog.com/reference/"; break; case "l": $preurl = "https://www.swprog.com/reference/"; break; } $url = $preurl.$url; $feed.= " \n"; $feed.= " ".htmlspecialchars($title)."\n"; $feed.= " ".htmlspecialchars($url)."\n"; $feed.= " ".htmlspecialchars($descrizione)."\n"; //$feed.= " ".$autore."\n"; $feed.= " ".$argomento."\n"; $feed.= " ".htmlspecialchars($data)."\n"; //$feed.= " https://www.swprog.com/rss/articoli.php\n"; $feed.= " \n"; //$feed.= " ".htmlspecialchars("")."\n"; //$feed.= " ".htmlspecialchars("")."\n"; //?????$feed.= $this->_createAdditionalElements($this->items[$i]->additionalElements, " "); } } $feed.= " \n"; $feed.= "\n"; echo $feed; ?>