| ... | ... |
@@ -225,8 +225,10 @@ function NewsSection($sourceHTML) {
|
| 225 | 225 |
downloadInnerHtml(filename, 'article-current','text/html'); |
| 226 | 226 |
} |
| 227 | 227 |
function printHTMLAll(channel) {
|
| 228 |
- var filename = channel+".html"; |
|
| 229 |
- downloadInnerHtmlAll(filename, 'text/html'); |
|
| 228 |
+ var win = window.open("sources/all-"+channel, '_blank');
|
|
| 229 |
+ } |
|
| 230 |
+ function printPDFAll(channel) {
|
|
| 231 |
+ var win = window.open("sources/all-"+channel, '_blank');
|
|
| 230 | 232 |
} |
| 231 | 233 |
function printPDF() {
|
| 232 | 234 |
var filename = 'test.pdf' |
| ... | ... |
@@ -7,14 +7,16 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "aje"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- echo '<h4>' . $channel['title']; |
|
| 16 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 17 |
- echo '</h4>'; |
|
| 16 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 17 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 18 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 19 |
+ echo '</h4>'.PHP_EOL; |
|
| 18 | 20 |
$cpt=0; |
| 19 | 21 |
foreach ($xml->channel->item as $item) {
|
| 20 | 22 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "bbc"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "cna"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "guardian"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "nykrmag"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "nyt"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "scmp"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -7,14 +7,16 @@ if ($xml === false) {
|
| 7 | 7 |
echo 'Failed to read RSS'; |
| 8 | 8 |
} else {
|
| 9 | 9 |
$channel = array(); |
| 10 |
+ $channel['name'] = "smh"; |
|
| 10 | 11 |
$channel['title'] = $xml->channel->title; |
| 11 | 12 |
$channel['link'] = $xml->channel->link; |
| 12 | 13 |
$channel['description'] = $xml->channel->description; |
| 13 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 14 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 15 |
- echo '<h4>' . $channel['title']; |
|
| 16 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 17 |
- echo '</h4>'; |
|
| 16 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 17 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 18 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 19 |
+ echo '</h4>'.PHP_EOL; |
|
| 18 | 20 |
$cpt=0; |
| 19 | 21 |
foreach ($xml->channel->item as $item) {
|
| 20 | 22 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "star"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "stasia"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "stsg"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |
| ... | ... |
@@ -10,14 +10,16 @@ if ($xml === false) {
|
| 10 | 10 |
echo 'Failed to read RSS'; |
| 11 | 11 |
} else {
|
| 12 | 12 |
$channel = array(); |
| 13 |
+ $channel['name'] = "stworld"; |
|
| 13 | 14 |
$channel['title'] = $xml->channel->title; |
| 14 | 15 |
$channel['link'] = $xml->channel->link; |
| 15 | 16 |
$channel['description'] = $xml->channel->description; |
| 16 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
| 17 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
| 18 |
- echo '<h4>' . $channel['title']; |
|
| 19 |
- echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['title'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 20 |
- echo '</h4>'; |
|
| 19 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
| 20 |
+ echo '<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'.html\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 21 |
+ echo '<button id="pdf-btn" onclick="printPDFAll(\''.$channel['name'].'.pdf\')" style="display:inline;"><img src="img/pdf.png" width="24px" height="24px"></button>'.PHP_EOL; |
|
| 22 |
+ echo '</h4>'.PHP_EOL; |
|
| 21 | 23 |
$cpt=0; |
| 22 | 24 |
foreach ($xml->channel->item as $item) {
|
| 23 | 25 |
$article = array(); |