. */ /** * File : details.php * * Detailed informations on an indexed document * * @package indexing_searching * @version 1.3 * @since 10/2005 * @license GPL * @author Claire Figueras */ $core = new core_tools(); $core->test_user(); $core->load_lang(); require_once 'core/manage_bitmask.php'; require_once 'core/class/class_request.php'; require_once 'core/class/class_security.php'; require_once 'apps/' . $_SESSION['config']['app_id'] . '/security_bitmask.php'; require_once 'apps/' . $_SESSION['config']['app_id'] . '/class/class_list_show.php'; require_once 'core/class/class_history.php'; require_once 'core/class/LinkController.php'; require_once 'apps/' . $_SESSION['config']['app_id'] . '/class/class_indexing_searching_app.php'; require_once 'apps/' . $_SESSION['config']['app_id'] . '/class/class_types.php'; if (file_exists( $_SESSION['config']['corepath'] . 'custom/apps/' . $_SESSION['config']['app_id'] . '/definition_mail_categories.php' ) ) { $path = $_SESSION['config']['corepath'] . 'custom/apps/' . $_SESSION['config']['app_id'] . '/definition_mail_categories.php'; } else { $path = 'apps/' . $_SESSION['config']['app_id'] . '/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; } //test service add new version $addNewVersion = false; if ($core->test_service('add_new_version', 'apps', false)) { $addNewVersion = 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); /***********************************************************/ $hist = 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)); } $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; ?> test_right_doc($coll_id, $s_id); //$_SESSION['error'] = 'coll '.$coll_id.', res_id : '.$s_id; if (!$right) { ?> add( $table, $s_id , 'VIEW', 'resview', _VIEW_DETAILS_NUM . $s_id, $_SESSION['config']['databasetype'], 'apps' ); } $modify_doc = check_right( $_SESSION['user']['security'][$coll_id]['DOC']['securityBitmask'], DATA_MODIFICATION ); $delete_doc = check_right( $_SESSION['user']['security'][$coll_id]['DOC']['securityBitmask'], DELETE_RECORD ); //update index with the doctype if (isset($_POST['submit_index_doc'])) { if ( $core->is_module_loaded('entities') && is_array($_SESSION['details']['diff_list']) ) { require_once('modules/entities/class/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 $_SESSION['details']['diff_list']['key_value'] = md5($res_id); } $is->update_mail($_POST, 'POST', $s_id, $coll_id); if ($core->is_module_loaded('tags')) { include_once("modules".DIRECTORY_SEPARATOR."tags".DIRECTORY_SEPARATOR."tags_update.php"); } } //delete the doctype if (isset($_POST['delete_doc'])) { $is ->delete_doc($s_id, $coll_id); ?> update_doc_status($s_id, $coll_id, 'VAL'); ?> 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, entity_label " . $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 ($printDetails) { $Fnm = $_SESSION['config']['tmppath']. '/export_details_' . $_SESSION['user']['UserId'] . '_export.html'; if (file_exists($Fnm)) { unlink($Fnm); } $inF = fopen($Fnm,"w"); fwrite($inF, $detailsExport); fclose($inF); }