... | ... |
@@ -227,6 +227,9 @@ function NewsSection($sourceHTML) { |
227 | 227 |
function printHTMLAll(channel) { |
228 | 228 |
var win = window.open("sources/all-"+channel, '_blank'); |
229 | 229 |
} |
230 |
+ function printPDFAll(channel) { |
|
231 |
+ var win = window.open("sources/all-"+channel, '_blank'); |
|
232 |
+ } |
|
230 | 233 |
function printPDF() { |
231 | 234 |
var filename = 'test.pdf' |
232 | 235 |
var margin = { top: 0, left: 10, right: 0, bottom: 0 }; |
... | ... |
@@ -10,13 +10,16 @@ if ($xml === false) { |
10 | 10 |
echo 'Failed to read RSS'; |
11 | 11 |
} else { |
12 | 12 |
$channel = array(); |
13 |
- $channel['name'] = "conspiracy.html"; |
|
13 |
+ $channel['name'] = "conspiracy"; |
|
14 | 14 |
$channel['title'] = $xml->channel->title; |
15 | 15 |
$channel['link'] = $xml->channel->link; |
16 | 16 |
$channel['description'] = $xml->channel->description; |
17 | 17 |
$channel['pubDate'] = $xml->channel->pubDate; |
18 | 18 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
19 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
20 | 23 |
$cpt=0; |
21 | 24 |
foreach ($xml->channel->item as $item) { |
22 | 25 |
$article = array(); |
... | ... |
@@ -7,13 +7,16 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "franceinfo.html"; |
|
10 |
+ $channel['name'] = "franceinfo"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
17 | 20 |
$cpt=0; |
18 | 21 |
foreach ($xml->channel->item as $item) { |
19 | 22 |
$article = array(); |
... | ... |
@@ -7,13 +7,16 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "lemonde.html"; |
|
10 |
+ $channel['name'] = "lemonde"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
17 | 20 |
$cpt=0; |
18 | 21 |
foreach ($xml->channel->item as $item) { |
19 | 22 |
$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'] = "lesinrocks.html"; |
|
10 |
+ $channel['name'] = "lesinrocks"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- //echo '<h4>' . $channel['title'] . '</h4>'; |
|
17 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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(); |
... | ... |
@@ -7,11 +7,14 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "liberation.html"; |
|
10 |
+ $channel['name'] = "liberation"; |
|
11 | 11 |
$channel['title'] = $xml->title; |
12 | 12 |
$channel['pubDate'] = $xml->updated; |
13 | 13 |
$channel['timestamp'] = strtotime($xml->updated); |
14 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
14 |
+ echo '<h4>' . $channel['title'].PHP_EOL; |
|
15 |
+ 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; |
|
16 |
+ 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; |
|
17 |
+ echo '</h4>'.PHP_EOL; |
|
15 | 18 |
$cpt=0; |
16 | 19 |
foreach ($xml->entry as $item) |
17 | 20 |
{ |
... | ... |
@@ -7,13 +7,16 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "lobs.html"; |
|
10 |
+ $channel['name'] = "lobs"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.urlencode($channel['name']).'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
17 | 20 |
$cpt=0; |
18 | 21 |
foreach ($xml->channel->item as $item) { |
19 | 22 |
$article = array(); |
... | ... |
@@ -7,13 +7,16 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "numerama.html"; |
|
10 |
+ $channel['name'] = "numerama"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
17 | 20 |
$cpt=0; |
18 | 21 |
foreach ($xml->channel->item as $item) { |
19 | 22 |
$article = array(); |
... | ... |
@@ -7,13 +7,16 @@ if ($xml === false) { |
7 | 7 |
echo 'Failed to read RSS'; |
8 | 8 |
} else { |
9 | 9 |
$channel = array(); |
10 |
- $channel['name'] = "slatefr.html"; |
|
10 |
+ $channel['name'] = "slatefr"; |
|
11 | 11 |
$channel['title'] = $xml->channel->title; |
12 | 12 |
$channel['link'] = $xml->channel->link; |
13 | 13 |
$channel['description'] = $xml->channel->description; |
14 | 14 |
$channel['pubDate'] = $xml->channel->pubDate; |
15 | 15 |
$channel['timestamp'] = strtotime($xml->channel->pubDate); |
16 |
- echo '<h4>' . $channel['title'].'<button id="html-btn" onclick="printHTMLAll(\''.$channel['name'].'\')" style="display:inline;"><img src="img/html5.png" width="24px" height="24px"></button></h4>'.PHP_EOL; |
|
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; |
|
17 | 20 |
$cpt=0; |
18 | 21 |
foreach ($xml->channel->item as $item) { |
19 | 22 |
$article = array(); |