*/ $core = new core_tools(); $core->test_user(); $core->load_lang(); require_once 'core/manage_bitmask.php'; require_once "core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_request.php"; require_once "core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_security.php"; require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "security_bitmask.php"; require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_list_show.php"; require_once "core" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_history.php"; require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_indexing_searching_app.php"; require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_types.php"; if (file_exists( $_SESSION['config']['corepath'] . 'custom'. DIRECTORY_SEPARATOR . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . 'definition_mail_categories.php' ) ) { $path = $_SESSION['config']['corepath'] . 'custom'. DIRECTORY_SEPARATOR . $_SESSION['custom_override_id'] . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . 'definition_mail_categories.php'; } else { $path = 'apps' . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . 'definition_mail_categories.php'; } include_once $path; //test service print_details $printDetails = false; if ($core->test_service('print_details', 'apps', false)) { $printDetails = true; } //test service put_in_validation $putInValid = false; if ($core->test_service('put_in_validation', 'apps', false)) { $putInValid = true; } //test service view technical infos $viewTechnicalInfos = false; if ($core->test_service('view_technical_infos', 'apps', false)) { $viewTechnicalInfos = true; } if(!isset($_REQUEST['coll_id'])) { $_REQUEST['coll_id'] = ""; } $_SESSION['doc_convert'] = array(); /****************Management of the location bar ************/ $init = false; if(isset($_REQUEST['reinit']) && $_REQUEST['reinit'] == "true") { $init = true; } if(isset($_SESSION['indexation'] ) && $_SESSION['indexation'] == true) { $init = true; } $level = ""; if(isset($_REQUEST['level']) && ($_REQUEST['level'] == 2 || $_REQUEST['level'] == 3 || $_REQUEST['level'] == 4 || $_REQUEST['level'] == 1)) { $level = $_REQUEST['level']; } $page_path = $_SESSION['config']['businessappurl'].'index.php?page=details&dir=indexing_searching&coll_id='.$_REQUEST['coll_id'].'&id='.$_REQUEST['id']; $page_label = _DETAILS; $page_id = "details"; $core->manage_location_bar($page_path, $page_label, $page_id, $init, $level); /***********************************************************/ $users = new history(); $security = new security(); $func = new functions(); $request= new request; $type = new types(); $s_id = ""; $_SESSION['req'] ='details'; $_SESSION['indexing'] = array(); $is = new indexing_searching_app(); $coll_id = ''; $table = ''; if(!isset($_REQUEST['coll_id']) || empty($_REQUEST['coll_id'])) { //$_SESSION['error'] = _COLL_ID.' '._IS_MISSING; $coll_id = $_SESSION['collections'][0]['id']; $table = $_SESSION['collections'][0]['view']; $is_view = true; } else { $coll_id = $_REQUEST['coll_id']; $table = $security->retrieve_view_from_coll_id($coll_id); $is_view = true; if(empty($table)) { $table = $security->retrieve_table_from_coll($coll_id); $is_view = false; } } $_SESSION['collection_id_choice'] = $coll_id; if(isset($_GET['id']) && !empty($_GET['id'])) { $s_id = addslashes($func->wash($_GET['id'], "num", _THE_DOC)); } $_SESSION['doc_id'] = $s_id; $right = $security->test_right_doc($coll_id, $s_id); if(!$right) { ?> add($table, $s_id ,"VIEW", _VIEW_DETAILS_NUM.$s_id, $_SESSION['config']['databasetype'],'apps'); } $db = new dbquery(); $db->connect(); $db->query("select res_id from mlb_coll_ext where res_id = " . $s_id); if ($db->nb_result() <= 0) { echo '
' . _QUALIFY_FIRST . '
';exit; ?> is_module_loaded('entities') && is_array($_SESSION['details']['diff_list'])) { require_once('modules'.DIRECTORY_SEPARATOR.'entities'.DIRECTORY_SEPARATOR.'class'.DIRECTORY_SEPARATOR.'class_manage_listdiff.php'); $list = new diffusion_list(); $params = array('mode'=> 'listinstance', 'table' => $_SESSION['tablename']['ent_listinstance'], 'coll_id' => $coll_id, 'res_id' => $s_id, 'user_id' => $_SESSION['user']['UserId'], 'concat_list' => true, 'only_cc' => false); $list->load_list_db($_SESSION['details']['diff_list'], $params); //pb enchainement avec action redirect } $is->update_mail($_POST, "POST", $s_id, $coll_id); } //delete the doctype if(isset($_POST['delete_doc'])) { $is ->delete_doc($s_id, $coll_id); ?> update_doc_status($s_id, $coll_id, "VAL"); ?> connect(); if(empty($_SESSION['error']) || $_SESSION['indexation']) { $comp_fields = ''; $db->query("select type_id from ".$table." where res_id = ".$s_id); if($db->nb_result() > 0) { $res = $db->fetch_object(); $type_id = $res->type_id; $indexes = $type->get_indexes($type_id, $coll_id, 'minimal'); for($i=0; $iis_module_loaded('cases') == true) { $case_sql_complementary = " , case_id"; } $db->query( "select status, format, typist, creation_date, fingerprint, filesize, " . "res_id, work_batch, page_count, is_paper, scan_date, scan_user, " . "scan_location, scan_wkstation, scan_batch, source, doc_language, " . "description, closing_date, alt_identifier " . $comp_fields . $case_sql_complementary . " from " . $table . " where res_id = " . $s_id ); //$db->show(); } ?> "; $_SESSION['doc_convert'] = array(); $_SESSION['doc_convert']['details_result'] = $detailsExport; $core = new core_tools(); if($core->is_module_loaded("doc_converter")) { require_once("modules".DIRECTORY_SEPARATOR."doc_converter".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_modules_tools.php"); $doc_converter = new doc_converter(); $doc_converter->convert_details($detailsExport); } if ($printDetails) { $Fnm = $_SESSION['config']['tmppath'].DIRECTORY_SEPARATOR.'export_details_'.$_SESSION['user']['UserId']."_export.html"; if (file_exists($Fnm)) { unlink($Fnm); } $inF = fopen($Fnm,"w"); fwrite($inF, $detailsExport); fclose($inF); }