. */ /** * File : details.php * * Detailed informations on an indexed document * * @package indexing_searching * @version 1.3 * @since 10/2005 * @license GPL * @author Claire Figueras */ //DECLARATIONS 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; //INSTANTIATE $core = new core_tools(); $hist = new history(); $security = new security(); $func = new functions(); $request= new request; $type = new types(); $is = new indexing_searching_app(); $db = new Database(); //INITIALIZE $core->test_user(); $core->load_lang(); $_SESSION['basket_used'] = $_SESSION['current_basket']['id']; if (!isset($_REQUEST['coll_id'])) { $_REQUEST['coll_id'] = ''; } $_SESSION['doc_convert'] = array(); $_SESSION['save_list']['fromDetail'] = "true"; $s_id = ''; $_SESSION['req'] ='details'; $_SESSION['indexing'] = array(); $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; $_SESSION['current_basket']['coll_id'] = $coll_id; $idCourrier = $_GET['id']; //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 view doc history $viewDocHistory = false; if ($core->test_service('view_doc_history', 'apps', false)) { $viewDocHistory = true; } //test service add new version $addNewVersion = false; if ($core->test_service('add_new_version', 'apps', false)) { $addNewVersion = true; } //test service view_emails_notifs // $viewEmailsNotifs = false; // if ($core->test_service('view_emails_notifs', 'notifications', false)) { // $viewEmailsNotifs = true; // } /****************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); /***********************************************************/ if (isset($_GET['id']) && !empty($_GET['id'])) { $s_id = addslashes($func->wash($_GET['id'], 'num', _THE_DOC)); } $stmt = $db->query("SELECT res_id FROM mlb_coll_ext WHERE res_id = ?", array($s_id)); if ($stmt->rowCount() <= 0) { $_SESSION['error'] = _QUALIFY_FIRST; ?> test_right_doc($coll_id, $s_id); //$_SESSION['error'] = 'coll '.$coll_id.', res_id : '.$s_id; $stmt = $db->query("SELECT typist, creation_date FROM ".$table." WHERE res_id = ?", array($s_id)); $info_mail = $stmt->fetchObject(); $date1 = new DateTime($info_mail->creation_date); $date2 = new DateTime(); $date2->sub(new DateInterval('PT1M')); if (!$right && $_SESSION['user']['UserId'] == $info_mail->typist && $date1 > $date2) { $right = true; $_SESSION['info'] = _MAIL_WILL_DISAPPEAR; } if (!$right) { $_SESSION['error'] = _NO_RIGHT_TXT; ?> 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'])) { $is->update_mail($_POST, 'POST', $s_id, $coll_id); if ($core->is_module_loaded('tags')) { $tags = $_POST['tag_userform']; $tags_list = $tags; include_once("modules".DIRECTORY_SEPARATOR."tags".DIRECTORY_SEPARATOR."tags_update.php"); } //thesaurus if ($core->is_module_loaded('thesaurus')) { require_once 'modules' . DIRECTORY_SEPARATOR . 'thesaurus' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'class_modules_tools.php'; $thesaurus = new thesaurus(); if (! empty($_POST['thesaurus'])) { $thesaurusList = implode('__',$_POST['thesaurus']); }else{ $thesaurusList = ''; } $thesaurus->updateResThesaurusList($thesaurusList,$s_id); } } //delete the doctype if (isset($_POST['delete_doc'])) { $is ->delete_doc($s_id, $coll_id); ?> update_doc_status($s_id, $coll_id, 'VAL'); ?> query($query, array($_REQUEST['id'])); $nbContacts = 0; $frameContacts = ""; $frameContacts = "{"; while ($res = $stmt->fetchObject()) { $nbContacts = $nbContacts + 1; $contact_firstname = str_replace("'", "\'", $res->contact_firstname); $contact_firstname = str_replace('"', " ", $contact_firstname); $contact_lastname = str_replace("'", "\'", $res->contact_lastname); $contact_lastname = str_replace('"', " ", $contact_lastname); $firstname = str_replace("'", "\'", $res->firstname); $firstname = str_replace('"', " ", $firstname); $lastname = str_replace("'", "\'", $res->lastname); $lastname = str_replace('"', " ", $lastname); $society = str_replace("'", "\'", $res->society); $society = str_replace('"', " ", $society); $frameContacts .= "'contact " . $nbContacts . "' : '" . $contact_firstname . " " . $contact_lastname . " " . $firstname . " " . $lastname . " " . $society . " (contact)', "; } $query = "SELECT u.firstname, u.lastname, u.user_id "; $query .= "FROM users u, contacts_res cres "; $query .= "WHERE cres.coll_id = 'letterbox_coll' AND cres.res_id = ? AND cast (u.user_id as varchar) = cres.contact_id "; $query .= "GROUP BY u.firstname, u.lastname, u.user_id"; $stmt = $db->query($query, array($_REQUEST['id'])); while($res = $stmt->fetchObject()){ $nbContacts = $nbContacts + 1; $firstname = str_replace("'","\'", $res->firstname); $firstname = str_replace('"'," ", $firstname); $lastname = str_replace("'","\'", $res->lastname); $lastname = str_replace('"'," ", $lastname); $frameContacts .= "'contact ".$nbContacts."' : '" . $firstname . " " . $lastname . " (utilisateur)', "; } $frameContacts = substr($frameContacts, 0, -2); $frameContacts .= "}"; if (empty($_SESSION['error']) || $_SESSION['indexation']) { $comp_fields = ''; $stmt = $db->query("SELECT type_id FROM ".$table." WHERE res_id = ?", array($s_id)); if ($stmt->rowCount() > 0) { $res = $stmt->fetchObject(); $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"; } $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, alt_identifier, initiator, entity_label " . $comp_fields . $case_sql_complementary . " FROM " . $table . " WHERE res_id = ?", array($s_id) ); } ?>

  (retrieve_coll_label_from_coll_id($coll_id); ?>)







rowCount() == 0) { ?>


.




'') { ?> true, 'img_priority' => true, 'img_type_id' => true, 'img_doc_date' => true, 'img_admission_date' => true, 'img_nature_id' => true, 'img_reference_number' => true, 'img_subject' => true, 'img_process_limit_date' => true, 'img_author' => true, 'img_destination' => true, 'img_folder' => true, 'img_contact' => true, 'img_confidentiality' => true, ); $res = $stmt->fetchObject(); $typist = $res->typist; $format = $res->format; $filesize = $res->filesize; $creation_date = functions::format_date_db($res->creation_date, false); $chrono_number = $res->alt_identifier; $initiator = $res->initiator; $fingerprint = $res->fingerprint; $work_batch = $res->work_batch; $page_count = $res->page_count; $is_paper = $res->is_paper; $scan_date = functions::format_date_db($res->scan_date); $scan_user = $res->scan_user; $scan_location = $res->scan_location; $scan_wkstation = $res->scan_wkstation; $scan_batch = $res->scan_batch; $doc_language = $res->doc_language; $closing_date = functions::format_date_db($res->closing_date, false); $indexes = $type->get_indexes($type_id, $coll_id); $entityLabel = $res->entity_label; $queryUser = "SELECT firstname, lastname FROM users WHERE user_id = ?"; $stmt = $db->query($queryUser, array($typist)); $resultUser = $stmt->fetchObject(); $queryEntities = "SELECT entity_label FROM entities WHERE entity_id = ?"; $stmt = $db->query($queryEntities, array($initiator)); $resultEntities = $stmt->fetchObject(); $entities = $resultEntities->entity_label; if ($resultUser->lastname <> '') { $typistLabel = $resultUser->firstname . ' ' . $resultUser->lastname; } else { $typistLabel = $typist; } if ($core->is_module_loaded('cases') == true) { require_once('modules/cases/class/class_modules_tools.php'); $case = new cases(); if ($res->case_id <> '') $case_properties = $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} = 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}); } elseif ($indexes[$key]['type'] == "date") { $indexes[$key]['show_value'] = functions::format_date_db($res->{$tmp}, true); } } //$db->show_array($indexes); $process_data = $is->get_process_data($coll_id, $s_id); $status = $res->status; if (!empty($status)) { require_once('core/class/class_manage_status.php'); $status_obj = new manage_status(); $res_status = $status_obj->get_status_data($status); if ($modify_doc) { $can_be_modified = $status_obj->can_be_modified($status); if (!$can_be_modified) { $modify_doc = false; } } } $mode_data = 'full'; if ($modify_doc) { $mode_data = 'form'; } foreach (array_keys($indexes) as $key) { $indexes[$key]['opt_index'] = true; if ($indexes[$key]['type_field'] == 'select') { for($i=0;$ishow_array($indexes); $detailsExport = ''; $detailsExport .= ''; $detailsExport .= "Maarch Details"; $detailsExport .= ""; ?>

'; } } ?>

   

 

"._DETAILS_PRINT." : ".$s_id."

";?>

'; } if ($putInValid) { $toolBar .= ' '; } if ($delete_doc) { $toolBar .= ' '; } if ($modify_doc) { $toolBar .= ' '; } $toolBar .= ''; echo $toolBar; ?>

"._FILE_DATA."

";?> ";?> "; ?> "") { $folderTmp = $data[$key]['show_value']; $find1 = strpos($folderTmp, '('); $folder_id = substr($folderTmp, $find1, strlen($folderTmp)); $folder_id = str_replace("(", "", $folder_id); $folder_id = str_replace(")", "", $folder_id); } //$detailsExport .= ""; ?> "; $detailsExport .= ""; ?>  "; echo ''; } } $i++; } } $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; ?>
"; ?> "; if ($folder_id <> "") { echo ""; ?> "; ?> ' .$data[$key]['show_value'] .''; } else if ($data[$key]['field_type'] == 'radio') { for($k=0; $k type="radio" id="" value="" disabled > ' .$data[$key]['show_value'] .''; } else if ($data[$key]['field_type'] == 'date') { ?> type="radio" id="" value="" >is_module_loaded('folder') && ($core->test_service('associate_folder', 'folder',false) == 1)) { ?>
"; ?>
 
"; $detailsExport .= _STATUS; $detailsExport .= ""; $detailsExport .= $res_status['LABEL']; $detailsExport .= ""; $detailsExport .= _CHRONO_NUMBER; $detailsExport .= ""; $detailsExport .= $chrono_number; $detailsExport .= "
"; ?>
0 || ($core->is_module_loaded('tags') && ($core->test_service('tag_view', 'tags', false) == 1)) || ($core->is_module_loaded('thesaurus') && ($core->test_service('thesaurus_view', 'thesaurus', false) == 1))) { ?>


"; ?> "; ?> "; ?> "; $detailsExport .= ""; ?>  "; echo ''; } } $i++; } ?>
"; ?> "; ?> : "; ?> size="40" title="" alt="" /> "; ?>
 
is_module_loaded('tags') && ($core->test_service('tag_view', 'tags', false) == 1)) { include_once('modules/tags/templates/details/index.php'); echo ''; } if ($core->is_module_loaded('thesaurus') && ($core->test_service('thesaurus_view', 'thesaurus', false) == 1)) { require_once 'modules' . DIRECTORY_SEPARATOR . 'thesaurus' . DIRECTORY_SEPARATOR . 'class' . DIRECTORY_SEPARATOR . 'class_modules_tools.php'; $thesaurus = new thesaurus(); $thesaurusListRes = array(); $thesaurusListRes = $thesaurus->getThesaursusListRes($s_id); echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; echo ''; /*****************/ } if ($core->is_module_loaded('fileplan') && ($core->test_service('put_doc_in_fileplan', 'fileplan', false) == 1) && $fileplanLabel <> "") { //Requete pour récupérer position_label $stmt = $db->query("SELECT position_label FROM fp_fileplan_positions INNER JOIN fp_res_fileplan_positions ON fp_fileplan_positions.position_id = fp_res_fileplan_positions.position_id WHERE fp_res_fileplan_positions.res_id=?",array($idCourrier)); while($res_fileplan= $stmt->fetchObject()){ if(!isset($positionLabel)){ $positionLabel=$res_fileplan->position_label; }else{ $positionLabel=$positionLabel." / ".$res_fileplan->position_label; } } //Requete pour récuperer fileplan_label $stmt = $db->query("SELECT fileplan_label FROM fp_fileplan INNER JOIN fp_res_fileplan_positions ON fp_fileplan.fileplan_id = fp_res_fileplan_positions.fileplan_id WHERE fp_res_fileplan_positions.res_id=? AND fp_fileplan.user_id = ?", array($idCourrier,$_SESSION['user']['UserId'])); $res2 = $stmt->fetchObject(); $fileplanLabel=$res2->fileplan_label; $planClassement= $fileplanLabel." / ".$positionLabel; ?>
'._THESAURUS.'
:


is_module_loaded('tags') && ($core->test_service('tag_view', 'tags', false) == 1)) { include_once('modules/tags/templates/details/index.php'); } } ?>
'; $technicalInfo_frame .= '
'; $technicalInfo_frame .= ''; $technicalInfo_frame .= '
'; echo $technicalInfo_frame; } //$core->execute_app_services($_SESSION['app_services'], 'details.php'); $detailsExport .= "

"._NOTES."

"; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= ""; $detailsExport .= "
"; $detailsExport .= "

"._NOTES_1."

"; $detailsExport .= "
"; $detailsExport .= " "; $detailsExport .= "
"; $detailsExport .= "

"._NOTES_2."

"; $detailsExport .= "
"; $detailsExport .= " "; $detailsExport .= "
"; $detailsExport .= "

"._NOTES_3."

"; $detailsExport .= "
"; $detailsExport .= " "; $detailsExport .= "
"; if ($core->is_module_loaded('entities')) { require_once('modules/entities/class/class_manage_listdiff.php'); $diff_list = new diffusion_list(); $_SESSION['details']['diff_list'] = $diff_list->get_listinstance($s_id, false, $coll_id); $_SESSION['details']['difflist_type'] = $diff_list->get_difflist_type($_SESSION['details']['diff_list']['difflist_type']); $roles = $diff_list->list_difflist_roles(); json_encode($roles); $roles_str = json_encode($roles); $diffList_frame = ''; $category = $data['category_id']['value']; $detailsExport .= "

"._DIFF_LIST."

"; $onlyCC = ''; if($core->test_service('add_copy_in_indexing_validation', 'entities', false) && $_SESSION['user']['UserId'] != 'superadmin'){ $onlyCC = '&only_cc'; } $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_diffList_tab&module=entities&resId='.$s_id.'&collId='.$coll_id.'&fromDetail=true&category='.$category.'&roles='.urlencode($roles_str).$onlyCC; $diffList_frame .= '
'; $diffList_frame .= '
'; $diffList_frame .= ''; $diffList_frame .='
'; echo $diffList_frame; } //PRINT FOLDER TAB if ($core->test_service('print_folder_doc', 'visa', false)) { $printFolder_frame = ''; require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php"; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_printFolder_tab&module=visa&resId=' . $s_id . '&collId=' . $coll_id . '&table=' . $table; $printFolder_frame .= '
'; $printFolder_frame .= '
'; $printFolder_frame .= ''; $printFolder_frame .= '
'; echo $printFolder_frame; } //VISA TAB if ($core->is_module_loaded('visa')) { $visa_frame = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_visa_tab&module=visa&resId='.$s_id.'&collId='.$coll_id.'&fromDetail=true'; $visa_frame .= '
'; $visa_frame .= '

'._VISA_WORKFLOW.'

'; $visa_frame .= ''; $visa_frame .='
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=visa&page=load_toolbar_visa&resId='.$s_id.'&collId='.$coll_id; $visa_frame .=''; echo $visa_frame; } //AVIS TAB if ($core->is_module_loaded('avis')) { $avis_frame = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_avis_tab&module=avis&resId='.$s_id.'&collId='.$coll_id.'&fromDetail=true'; $avis_frame .= '
'; $avis_frame .= '

'._AVIS_WORKFLOW.'

'; $avis_frame .= ''; $avis_frame .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=avis&page=load_toolbar_avis&resId='.$s_id.'&collId='.$coll_id; $avis_frame .=''; echo $avis_frame; } //ATTACHMENTS TAB if ($core->is_module_loaded('attachments')) { $attachments_frame = ''; $extraParam = '&attach_type_exclude=response_project,signed_response,outgoing_mail_signed,converted_pdf,outgoing_mail,print_folder'; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_attachments_details_tab&module=attachments&resId=' . $s_id . '&collId=' . $coll_id.'&fromDetail=attachments'.$extraParam; $attachments_frame .= '
'; $attachments_frame .= '
'; $attachments_frame .= ''; $responses_frame .= '
'; $detailsExport .= "

"._ATTACHED_DOC." :

"; $detailsExport .= "


"; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=attachments&page=load_toolbar_attachments&resId='.$s_id.'&collId='.$coll_id; $attachments_frame .=''; echo $attachments_frame; } //RESPONSES TAB if ($core->is_module_loaded('attachments')) { $responses_frame = ''; $extraParam = '&attach_type=response_project,outgoing_mail_signed,signed_response,outgoing_mail'; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_attachments_details_tab&module=attachments&fromDetail=response&resId=' . $s_id . '&collId=' . $coll_id.$extraParam; $responses_frame .= '
'; $responses_frame .= '
'; $responses_frame .= ''; $responses_frame .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=attachments&page=load_toolbar_attachments&responses&resId='.$s_id.'&collId='.$coll_id; $responses_frame .=''; echo $responses_frame; } //HISTORY TAB if ($viewDocHistory) { $history_frame = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_history_tab&resId=' . $s_id . '&collId=' . $coll_id; $history_frame .= '
'; $history_frame .= '
'; $history_frame .= ''; $history_frame .= '
'; echo $history_frame; } //NOTES TAB if ($core->is_module_loaded('notes')) { $note = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=notes&page=notes&identifier=' . $s_id . '&origin=document&coll_id=' . $coll_id . '&load&size=full'; $note .= '
'; $note .='
'; $note .= ''; $note .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=notes&page=load_toolbar_notes&resId='.$s_id.'&collId='.$coll_id; $note .=''; echo $note; } //CASES TAB if ($core->is_module_loaded('cases') == true) { $case_frame = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_case_tab&module=cases&collId=' . $coll_id . '&resId='.$s_id; $case_frame .= '
'; $case_frame .= '
'; $case_frame .= ''; $case_frame .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=cases&page=load_toolbar_cases&resId='.$s_id.'&collId='.$coll_id; $case_frame .=''; echo $case_frame; } //SENDMAILS TAB if ($core->test_service('sendmail', 'sendmail', false) === true) { $sendmail = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=sendmail&page=sendmail&identifier='. $s_id . '&origin=document&coll_id=' . $coll_id . '&load&size=medium'; $sendmail .= '
'; $sendmail .= '
'; $sendmail .= ''; $sendmail .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=sendmail&page=load_toolbar_sendmail&resId='.$s_id.'&collId='.$coll_id; $sendmail .=''; echo $sendmail; } //VERSIONS TAB $version = ''; $versionTable = $security->retrieve_version_table_from_coll_id( $coll_id ); $selectVersions = "SELECT res_id FROM " . $versionTable . " WHERE res_id_master = ? and status <> 'DEL' order by res_id desc"; $stmt = $db->query($selectVersions, array($s_id)); $nb_versions_for_title = $stmt->rowCount(); $lineLastVersion = $stmt->fetchObject(); $lastVersion = $lineLastVersion->res_id; if ($lastVersion <> '') { $objectId = $lastVersion; $objectTable = $versionTable; } else { $objectTable = $security->retrieve_table_from_coll( $coll_id ); $objectId = $s_id; $_SESSION['cm']['objectId4List'] = $s_id; } if ($nb_versions_for_title == 0) { $extend_title_for_versions = '0'; $class="nbResZero"; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; } else { $extend_title_for_versions = $nb_versions_for_title; $class="nbRes"; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } $_SESSION['cm']['resMaster'] = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_versions_tab&collId=' . $coll_id . '&resId='.$s_id.'&objectTable='.$objectTable; $version .= '
'; $version .= ' ' . $extend_title_for_versions . ''; $version .= '
'; $version .= '
'; $version .= ''; $version .= '
'; echo $version; //LINKS TAB $Links = ''; $pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_links_tab'; $Links .= ''; $Links .= '
'; $Links .= ''; $Links .= '
'; //LOAD TOOLBAR BADGE $toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=load_toolbar_links&resId='.$s_id.'&collId='.$coll_id; $Links .=''; echo $Links; ?>
var tabricator1 = new Tabricator(\'tabricator1\', \'DT\');'; //OUTGOING CREATION MODE if($_SESSION['indexation'] == true && $category == 'outgoing'){ $is_outgoing_indexing_mode = false; $selectAttachments = "SELECT attachment_type FROM res_view_attachments" ." WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and attachment_type = 'outgoing_mail'"; $stmt = $db->query($selectAttachments, array($_SESSION['doc_id'], $_SESSION['collection_id_choice'])); if($stmt->rowCount()==0){ //launch outgoing_mail creation echo ''; } } $detailsExport .= ""; $_SESSION['doc_convert'] = array(); $_SESSION['doc_convert']['details_result'] = $detailsExport; $_SESSION['info'] = '';