Subversion Repositories oidinfo_new_design

Rev

Rev 2 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2 Rev 33
Line 3... Line 3...
3
 
3
 
4
// This script re-generates the static pages by
4
// This script re-generates the static pages by
5
// taking the template and inserting following data:
5
// taking the template and inserting following data:
6
// - Replace %%CONTENT%% with content
6
// - Replace %%CONTENT%% with content
7
// - Replace %%TITLE%% with the title
7
// - Replace %%TITLE%% with the title
8
// - Replace %%MODIFICATION_DATE%% with the modification date of the raw content file
-
 
9
 
8
 
10
// -----------------------------------------------------------------------------
9
// -----------------------------------------------------------------------------
11
 
10
 
12
// You don't need to run this PHP script using the web browser.
11
// You don't need to run this PHP script using the web browser.
13
// You can run it as shell script in the SSH terminal!
12
// You can run it as shell script in the SSH terminal!
Line 91... Line 90...
91
		file_get_contents(__DIR__ . '/../__template_end.htm');
90
		file_get_contents(__DIR__ . '/../__template_end.htm');
92
 
91
 
93
	// Replace template strings
92
	// Replace template strings
94
	$cont = str_replace('%%CONTENT%%', file_get_contents($input_file), $cont);
93
	$cont = str_replace('%%CONTENT%%', file_get_contents($input_file), $cont);
95
	$cont = str_replace('%%TITLE%%', $title, $cont);
94
	$cont = str_replace('%%TITLE%%', $title, $cont);
96
	$cont = str_replace('%%MODIFICATION_DATE%%', date('d M Y', filemtime($input_file)), $cont);
-
 
97
	if ($output_file == __DIR__ . '/../' . 'index.htm') {
95
	if ($output_file == __DIR__ . '/../' . 'index.htm') {
98
		$cont = str_replace('%%FOOTER_TEXT%%', '&nbsp;'/*'This site is sponsored by <a href="https://www.orange.com">Orange S.A.</a>'*/, $cont);
96
		$cont = str_replace('%%FOOTER_TEXT%%', '&nbsp;'/*'This site is sponsored by <a href="https://www.orange.com">Orange S.A.</a>'*/, $cont);
99
	} else {
97
	} else {
100
		$cont = str_replace('%%FOOTER_TEXT%%', '', $cont);
98
		$cont = str_replace('%%FOOTER_TEXT%%', '', $cont);
101
	}
99
	}