. */ /** * @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_tools = new core_tools(); $core_tools->test_user(); $core_tools->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(); $show_file = $is->show_index_frame($_SESSION['upfile']['format']); $ext_list = $is->filetypes_showed_indexation(); $ext = strtolower($_SESSION['upfile']['format']); if($_SESSION['origin'] == "scan") { //echo 'modules/indexing_searching'.DIRECTORY_SEPARATOR.'tmp'.DIRECTORY_SEPARATOR.'tmp_file_'.$_SESSION['upfile']['md5'].'.'.$ext; 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(); } elseif(isset($_SESSION['upfile']['mime']) && !empty($_SESSION['upfile']['mime']) && isset($_SESSION['upfile']['format']) && !empty($_SESSION['upfile']['format']) && $_SESSION['upfile']['error'] <> 1) { if($show_file) { 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"); $ext = strtolower($_SESSION['upfile']['format']); if(file_exists($_SESSION['config']['tmppath'].DIRECTORY_SEPARATOR.'tmp_file_'.$_SESSION['user']['UserId'].'.'.$ext)) { $loc = $_SESSION['config']['MaarchUrl'].$_SESSION['config']['tmppath'].DIRECTORY_SEPARATOR.'tmp_file_'.$_SESSION['user']['UserId'].'.'.$ext; readfile($loc); } exit(); } else { ?> <?php echo $_SESSION['config']['applicationname']; ?>
"._FILE_LOADED_BUT_NOT_VISIBLE. _ONLY_FILETYPES_AUTHORISED."
"; } else { echo "

"._PROBLEM_LOADING_FILE_TMP_DIR.".
"; } ?>   <?php echo $_SESSION['config']['applicationname']; ?> 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'] =''; ?>