Skip to content
Snippets Groups Projects
Commit 4c5b67e0 authored by Florian Azizian's avatar Florian Azizian
Browse files

FIX #11143 TIME 0:10 set content-type

parent 04c1f1e1
No related branches found
No related tags found
No related merge requests found
...@@ -79,6 +79,7 @@ if (isset($_GET['num'])) { ...@@ -79,6 +79,7 @@ if (isset($_GET['num'])) {
if (empty($return['errors'])) { if (empty($return['errors'])) {
$fileNameBasename = pathinfo($return['fullFilename'], PATHINFO_BASENAME); $fileNameBasename = pathinfo($return['fullFilename'], PATHINFO_BASENAME);
$_SESSION['upfile'][$num]['fileNamePdfOnTmp'] = $fileNameBasename; $_SESSION['upfile'][$num]['fileNamePdfOnTmp'] = $fileNameBasename;
$mimeType = $is->get_mime_type('pdf');
header('Pragma: public'); header('Pragma: public');
header('Expires: 0'); header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
...@@ -135,8 +136,9 @@ if (isset($_GET['num'])) { ...@@ -135,8 +136,9 @@ if (isset($_GET['num'])) {
$core->load_html(); $core->load_html();
$core->load_header(); $core->load_header();
//time = $core->get_session_time_expire();?> //time = $core->get_session_time_expire();?>
<body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php <body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php
$ext = strtolower($_SESSION['upfile'][$num]['format']); $ext = strtolower($_SESSION['upfile'][$num]['format']);
if (file_exists($_SESSION['upfile'][$num]['local_path'])) { if (file_exists($_SESSION['upfile'][$num]['local_path'])) {
echo '<br/><br/><div class="error" style="display:block">' echo '<br/><br/><div class="error" style="display:block">'
...@@ -150,14 +152,14 @@ if (isset($_GET['num'])) { ...@@ -150,14 +152,14 @@ if (isset($_GET['num'])) {
echo '<br/><br/><div class="error" style="display:block">' echo '<br/><br/><div class="error" style="display:block">'
._PROBLEM_LOADING_FILE_TMP_DIR.'.</div>'; ._PROBLEM_LOADING_FILE_TMP_DIR.'.</div>';
} ?> } ?>
&nbsp; &nbsp;
</body> </body>
</html>
<?php </html>
<?php
} }
} }
} else { } else {
$extension = explode('.', $_SESSION['upfile']['name']); $extension = explode('.', $_SESSION['upfile']['name']);
$count_level = count($extension) - 1; $count_level = count($extension) - 1;
$the_ext = $extension[$count_level]; $the_ext = $extension[$count_level];
...@@ -271,8 +273,9 @@ if (isset($_GET['num'])) { ...@@ -271,8 +273,9 @@ if (isset($_GET['num'])) {
$core->load_html(); $core->load_html();
$core->load_header(); $core->load_header();
//time = $core->get_session_time_expire();?> //time = $core->get_session_time_expire();?>
<body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php <body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php
$ext = strtolower($_SESSION['upfile']['format']); $ext = strtolower($_SESSION['upfile']['format']);
if (file_exists($_SESSION['upfile']['local_path'])) { if (file_exists($_SESSION['upfile']['local_path'])) {
echo '<br/><br/><div class="advertissement">' echo '<br/><br/><div class="advertissement">'
...@@ -283,16 +286,18 @@ if (isset($_GET['num'])) { ...@@ -283,16 +286,18 @@ if (isset($_GET['num'])) {
echo '<br/><br/><div class="error" style="display:block">' echo '<br/><br/><div class="error" style="display:block">'
._PROBLEM_LOADING_FILE_TMP_DIR.'.</div>'; ._PROBLEM_LOADING_FILE_TMP_DIR.'.</div>';
} ?> } ?>
&nbsp; &nbsp;
</body> </body>
</html>
<?php </html>
<?php
} }
} else { } else {
$core->load_html(); $core->load_html();
$core->load_header(); ?> $core->load_header(); ?>
<body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php <body style="background: url(static.php?filename=logo_maarch_only.svg) center center no-repeat;background-size: 90%;">
<?php
if (isset($_SESSION['upfile']['error']) if (isset($_SESSION['upfile']['error'])
&& $_SESSION['upfile']['error'] == 1 && $_SESSION['upfile']['error'] == 1
) { ) {
...@@ -315,9 +320,10 @@ if (isset($_GET['num'])) { ...@@ -315,9 +320,10 @@ if (isset($_GET['num'])) {
echo '</ul></div>'; echo '</ul></div>';
} }
$_SESSION['error'] = ''; ?> $_SESSION['error'] = ''; ?>
&nbsp; &nbsp;
</body> </body>
</html>
<?php </html>
<?php
} }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment