*/ 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"; 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; $core = new core_tools(); $core->test_user(); $core->load_lang(); $resId = ''; if (isset($_REQUEST['value']) && !empty($_REQUEST['value'])) { $resId = $_REQUEST['value']; } $users = 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]; } $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' ) { $users->add( $table, $resId , 'VIEW', _VIEW_DOC_NUM . $resId, $_SESSION['config']['databasetype'], 'apps' ); } $modifyDoc = false; $deleteDoc = false; /* $modifyDoc = check_right( $_SESSION['user']['security'][$collId]['DOC']['securityBitmask'], DATA_MODIFICATION ); $deleteDoc = check_right( $_SESSION['user']['security'][$collId]['DOC']['securityBitmask'], DELETE_RECORD ); if(isset($_POST['submit_index_doc'])) { if($core->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' => $collId, 'res_id' => $resId, '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", $resId, $collId); } //delete the doctype if(isset($_POST['delete_doc'])) { $is ->delete_doc( $resId, $collId); ?> connect(); $compFields = ''; $db->query("select type_id from " . $table . " where res_id = " . $resId); if ($db->nb_result() > 0) { $res = $db->fetch_object(); $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) { $caseSqlComplementary = " , 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, type_id " . $compFields . $caseSqlComplementary . " from " . $table . " where res_id = " . $resId ); } ?>






nb_result() == 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 = $db->fetch_object(); $typeId = $res->type_id; $typist = $res->typist; $format = $res->format; $filesize = $res->filesize; $creationDate = $db->format_date_db($res->creation_date, false); $fingerprint = $res->fingerprint; $workBatch = $res->work_batch; $pageCount = $res->page_count; $isPaper = $res->is_paper; $scanDate = $db->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 = $db->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); } } //$db->show_array($indexes); foreach (array_keys($indexes) as $key) { if (preg_match('/^custom/', $key)) { $tmp = 'doc_' . $key; } else { $tmp = $key; } if ($indexes[$key]['type'] == "date") { $res->$tmp = $db->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'] = $db->show_string($res->$tmp); } else if ($indexes[$key]['type'] == "date") { $indexes[$key]['show_value'] = $db->format_date_db($res->$tmp, true); } } //$db->show_array($indexes); $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(); ?>