*/ require 'core/class/class_request.php'; require 'apps/' . $_SESSION['config']['app_id'] . '/class/class_list_show.php'; require_once 'core/class/class_security.php'; require_once 'core/class/class_history.php'; require_once 'core/manage_bitmask.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_indexing_searching_app.php"; require_once "apps" . DIRECTORY_SEPARATOR . $_SESSION['config']['app_id'] . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_types.php"; $core = new core_tools(); $core->test_user(); $core->load_lang(); $resId = ''; if (isset($_REQUEST['value']) && !empty($_REQUEST['value'])) { $resId = $_REQUEST['value']; } $hist = new history(); $security = new security(); $func = new functions(); $request = new request; $type = new types(); //$_SESSION['req'] ='details'; //$_SESSION['indexing'] = array(); $is = new indexing_searching_app(); $table = ''; $isView = false; if (isset($_SESSION['collection_id_choice']) && ! empty($_SESSION['collection_id_choice']) ) { $collId = $_SESSION['collection_id_choice']; } else { $collId = $_SESSION['user']['collections'][0]; } if ($collId == 'letterbox_coll') { 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; $table = $security->retrieve_view_from_coll_id($collId); $isView = true; if (empty($table)) { $table = $security->retrieve_table_from_coll($collId); $isView = false; } $_SESSION['id_to_view'] = $resId; $_SESSION['doc_id'] = $resId; $right = $security->test_right_doc($collId, $resId); if (! $right && $resId <> '') { include('apps/'.$_SESSION['config']['app_id'].'/no_right.php'); exit; } if ($resId == '') { echo '

' . _NO_RESULTS . '

'; exit; } if (isset($resId) && ! empty($resId) && $_SESSION['history']['resview'] == 'true' ) { $hist->add( $table, $resId , 'VIEW','resview', _VIEW_DOC_NUM . $resId, $_SESSION['config']['databasetype'], 'apps' ); } $modifyDoc = false; $deleteDoc = false; if (empty($_SESSION['error'])) { $db = new Database(); $compFields = ''; $stmt = $db->query("SELECT type_id FROM " . $table . " WHERE res_id = ?", array($resId)); if ($stmt->rowCount() > 0) { $res = $stmt->fetchObject(); $typeId = $res->type_id; $indexes = $type->get_indexes($typeId, $collId, 'minimal'); for ($i = 0; $i < count($indexes); $i ++) { // In the view all custom from res table begin with doc_ if (preg_match('/^custom_/', $indexes[$i])) { $compFields .= ', doc_' . $indexes[$i]; } else { $compFields .= ', ' . $indexes[$i]; } } } $caseSqlComplementary = ''; if ($core->is_module_loaded('cases') == true && $table == 'res_view_letterbox') { $caseSqlComplementary = " , case_id"; } $stmt = $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, type_id " . $compFields . $caseSqlComplementary . " FROM " . $table . " WHERE res_id = ?", array($resId) ); } ?>






rowCount() == 0) { ?>


.


true, 'img_priority' => true, 'img_type_id' => true, 'img_doc_date' => true, 'img_admission_date' => true, 'img_nature_id' => true, 'img_subject' => true, 'img_process_limit_date' => true, 'img_author' => true, 'img_destination' => true, 'img_arbox_id' => true, 'img_project' => true ); $res = $stmt->fetchObject(); $typeId = $res->type_id; $typist = $res->typist; $format = $res->format; $filesize = $res->filesize; $creationDate = functions::format_date_db($res->creation_date, false); $fingerprint = $res->fingerprint; $workBatch = $res->work_batch; $pageCount = $res->page_count; $isPaper = $res->is_paper; $scanDate = functions::format_date_db($res->scan_date); $scanUser = $res->scan_user; $scanLocation = $res->scan_location; $scanWkstation = $res->scan_wkstation; $scanBatch = $res->scan_batch; $docLanguage = $res->doc_language; $closingDate = functions::format_date_db($res->closing_date, false); $indexes = $type->get_indexes($typeId, $collId); if ($core->is_module_loaded('cases') == true) { require_once 'modules/cases/class/class_modules_tools.php'; $case = new cases(); if ($res->case_id <> '') { $caseProperties = $case->get_case_info($res->case_id); } } foreach (array_keys($indexes) as $key) { if (preg_match('/^custom/', $key)) { $tmp = 'doc_' . $key; } else { $tmp = $key; } if ($indexes[$key]['type'] == "date") { $res->{$tmp} = functions::format_date_db($res->{$tmp}, false); } $indexes[$key]['value'] = $res->{$tmp}; $indexes[$key]['show_value'] = $res->{$tmp}; if ($indexes[$key]['type'] == "string") { $indexes[$key]['show_value'] = functions::show_string($res->{$tmp}); } else if ($indexes[$key]['type'] == "date") { $indexes[$key]['show_value'] = functions::format_date_db($res->{$tmp}, true); } } // $processData = $is->get_process_data($collId, $resId); $status = $res->status; if (! empty($status)) { require_once 'core/class/class_manage_status.php'; $statusObj = new manage_status(); $resStatus = $statusObj->get_status_data($status); if ($modifyDoc) { $canBeModified = $statusObj->can_be_modified($status); if (! $canBeModified) { $modifyDoc = false; } } } $dataMode = 'full'; if ($modifyDoc) { $dataMode = 'form'; } foreach (array_keys($indexes) as $key) { $indexes[$key]['opt_index'] = true; if ($indexes[$key]['type_field'] == 'select') { for ($i = 0; $i < count($indexes[$key]['values']); $i ++) { if ($indexes[$key]['values'][$i]['id'] == $indexes[$key]['value']) { $indexes[$key]['show_value'] = $indexes[$key]['values'][$i]['label'] ; break; } } } if (! $modifyDoc) { $indexes[$key]['readonly'] = true; $indexes[$key]['type_field'] = 'input'; } else { $indexes[$key]['readonly'] = false; } } $data = get_general_data($collId, $resId, $dataMode, $paramData); ?>

load_js(); ?>