. */ /** * @brief Frame to show the file to index (action index_mlb.php) * * @file file_iframe.php * @author Claire Figueras * @date $date$ * @version $Revision$ * @ingroup indexing_searching_mlb */ $func = new functions(); $core = new core_tools(); $core->test_user(); $core->load_lang(); require_once 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'class_indexing_searching_app.php'; $is = new indexing_searching_app(); $extension = explode(".",$_SESSION['upfile']['name']); $count_level = count($extension)-1; $the_ext = $extension[$count_level]; $_SESSION['upfile']['format'] = $the_ext; $extList = $is->filetypes_showed_indexation(); if (isset($_SESSION['upfile']['format'])) { $showFile = $is->show_index_frame($_SESSION['upfile']['format']); $ext = strtolower($_SESSION['upfile']['format']); } else { $showFile = false; $ext = ''; } if ($_SESSION['origin'] == "scan") { if (file_exists( $_SESSION['config']['tmppath'] . 'tmp_file_' . $_SESSION['upfile']['md5'] . '.' . $ext ) ) { header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: ".$_SESSION['upfile']['mime']); header( "Content-Disposition: inline; filename=" . basename('maarch') . "." . $ext . ";" ); header("Content-Transfer-Encoding: binary"); $loc = $_SESSION['config']['tmppath'] . 'tmp_file_' . $_SESSION['upfile']['md5'] . '.' . $ext; readfile($loc); } else { echo "
PROBLEM DURING FILE SEND"; } exit(); } else if (isset($_SESSION['upfile']['mime']) && ! empty($_SESSION['upfile']['mime']) && isset($_SESSION['upfile']['format']) && ! empty($_SESSION['upfile']['format']) && $_SESSION['upfile']['error'] <> 1 ) { if ($showFile) { $mimeType = $is->get_mime_type($_SESSION['upfile']['format']); //print_r($_SESSION['upfile']);exit; header("Pragma: public"); header("Expires: 0"); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: public"); header("Content-Description: File Transfer"); header("Content-Type: ".$mimeType); header( "Content-Disposition: inline; filename=" . basename('maarch') . "." . $ext . ";" ); header("Content-Transfer-Encoding: binary"); $ext = strtolower($_SESSION['upfile']['format']); if (file_exists($_SESSION['upfile']['local_path'])) { $loc = $_SESSION['upfile']['local_path']; readfile($loc); } exit(); } else { $core->load_html(); $core->load_header(); //time = $core->get_session_time_expire(); ?>
" . _FILE_LOADED_BUT_NOT_VISIBLE . _ONLY_FILETYPES_AUTHORISED . "
"; } else { echo "

" . _PROBLEM_LOADING_FILE_TMP_DIR . ".
"; } ?>   load_html(); $core->load_header(); ?> return_bytes(ini_get("upload_max_filesize")); echo "

" . _MAX_SIZE_UPLOAD_REACHED . " (" . round($filesize / 1024, 2) . "Ko Max)
"; } else { echo "

" . $_SESSION['error'] . " " . _ONLY_FILETYPES_AUTHORISED . " :
"; } $_SESSION['error'] = ''; ?>