. */ /** * 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'; $_SESSION['basket_used'] = $_SESSION['current_basket']['id']; 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 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; // } if (!isset($_REQUEST['coll_id'])) { $_REQUEST['coll_id'] = ''; } $_SESSION['doc_convert'] = array(); $_SESSION['stockCheckbox'] = ''; $_SESSION['save_list']['fromDetail'] = "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); /***********************************************************/ $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; $_SESSION['current_basket']['coll_id'] = $coll_id; if (isset($_GET['id']) && !empty($_GET['id'])) { $s_id = addslashes($func->wash($_GET['id'], 'num', _THE_DOC)); } $db = new Database(); $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'])) { /*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')) { $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 .= ""; ?>

' . _BACK . ''; }else{ echo '' . _BACK . ''; }*/ echo ''; } } ?>

   

 

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

";?>

'' ) { $path = $_SESSION['config']['coreurl'] . '/custom/' . $_SESSION['custom_override_id'] . '/apps/' . $_SESSION['config']['app_id']; } else {*/ $path = $_SESSION['config']['businessappurl']; //} ?>

"._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 .= "
"; ?> is_module_loaded('tags') && ($core->test_service('tag_view', 'tags',false) == 1)) { include_once("modules".DIRECTORY_SEPARATOR."tags".DIRECTORY_SEPARATOR ."templates/details/index.php"); }*/ ?>
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 ''; /*****************/ } //Identifiant du courrier en cours $idCourrier=$_GET['id']; //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; ?> is_module_loaded('fileplan') && ($core->test_service('put_doc_in_fileplan', 'fileplan', false) == 1) && $fileplanLabel <> "") { ?>
'._THESAURUS.'
:


is_module_loaded('tags') && ($core->test_service('tag_view', 'tags', false) == 1)) { include_once('modules/tags/templates/details/index.php'); } } ?>
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')) { $category = $data['category_id']['value']; $detailsExport .= "

"._DIFF_LIST."

"; ?>
test_service('update_list_diff_in_details', 'entities', false) || $core->test_service('add_copy_in_indexing_validation', 'entities', false)) { if($core->test_service('add_copy_in_indexing_validation', 'entities', false) && $_SESSION['user']['UserId'] != 'superadmin'){ $onlyCC = '&only_cc'; } echo '
'; echo '
'; echo ''; ?>


get_listinstance($s_id, false, $coll_id); $_SESSION['details']['difflist_type'] = $diff_list->get_difflist_type($_SESSION['details']['diff_list']['difflist_type']); # Include display of list $roles = $diff_list->list_difflist_roles(); $difflist = $_SESSION['details']['diff_list']; require_once 'modules/entities/difflist_display.php'; //if (($core->test_service('update_list_diff_in_details', 'entities', false)) && (!$core->test_service('add_copy_in_process', 'entities', false))) { ?>

 

test_service('print_folder_doc', 'visa', false)) { require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php"; ?>

showPrintFolder($coll_id, $table, $_SESSION['doc_id']); ?>
is_module_loaded('visa')) { require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php"; $visa = new visa(); if($visa->nbVisa($s_id,$coll_id) == 0){ $style = 'font-size:2em;color:#9AA7AB;padding-left: 15px;padding-right: 15px;'; }else{ $style = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } ?>

test_service('config_visa_workflow', 'visa', false)) { $modifVisaWorkflow = true; } ?>
getList($s_id, $coll_id, $modifVisaWorkflow, 'VISA_CIRCUIT', '','Y'); ?>



<<  
is_module_loaded('avis')) { require_once "modules" . DIRECTORY_SEPARATOR . "avis" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "avis_controler.php"; $avis = new avis_controler(); if($avis->nbAvis($s_id,$coll_id) == 0){ $style = 'font-size:2em;color:#9AA7AB;padding-left: 15px;padding-right: 15px;'; }else{ $style = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } ?>

test_service('config_avis_workflow_in_detail', 'avis', false)) { $modifAvisWorkflow = true; } ?>
getList($s_id, $coll_id, $modifAvisWorkflow, 'AVIS_CIRCUIT', '','Y'); ?>



<<  
"._PROCESS.""; $nb_attach = ''; if ($core->is_module_loaded('attachments')) { $countAttachments = "SELECT res_id, creation_date, title, format FROM " . $_SESSION['tablename']['attach_res_attachments'] . " WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and attachment_type NOT IN ('response_project','signed_response','outgoing_mail_signed','converted_pdf','outgoing_mail','print_folder') and (status <> 'TMP' or (typist = ? and status = 'TMP'))"; $db = new Database(); $stmt = $db->query($countAttachments, array($_SESSION['doc_id'], $_SESSION['collection_id_choice'], $_SESSION['user']['UserId'])); if ($stmt->rowCount() > 0) { $nb_attach = $stmt->rowCount(); $class = 'nbRes'; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } else { $nb_attach = '0'; $class = 'nbResZero'; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; } } ?>
is_module_loaded('attachments')) { require 'modules/templates/class/templates_controler.php'; $templatesControler = new templates_controler(); $templates = array(); $templates = $templatesControler->getAllTemplatesForProcess($data['destination']['value']); $detailsExport .= "

"._ATTACHED_DOC." :

"; $selectAttachments = "SELECT res_id, creation_date, title, format FROM ".$_SESSION['tablename']['attach_res_attachments'] ." WHERE res_id_master = ? and coll_id = ? and status <> 'DEL' and attachment_type NOT IN ('response_project','outgoing_mail_signed', 'signed_response','converted_pdf','outgoing_mail','print_folder') and (status <> 'TMP' or (typist = ? and status = 'TMP'))"; $stmt = $db->query($selectAttachments, array($_SESSION['doc_id'], $_SESSION['collection_id_choice'], $_SESSION['user']['UserId'])); ?>
is_module_loaded('templates') && (!isset($_SESSION['current_basket']['id']) && $core->test_service('edit_attachments_from_detail', 'attachments', false)) || isset($_SESSION['current_basket']['id'])) { */ if ($core->is_module_loaded('templates') && ($core->test_service('edit_attachments_from_detail', 'attachments', false))) { ?>


"; ?>
'DEL' and (attachment_type = 'response_project' or attachment_type = 'outgoing_mail_signed' or attachment_type = 'outgoing_mail' or attachment_type = 'signed_response') and (status <> 'TMP' or (typist = ? and status = 'TMP'))"; $stmt = $db->query($countAttachments, array($_SESSION['doc_id'], $_SESSION['collection_id_choice'], $_SESSION['user']['UserId'])); if ($stmt->rowCount() > 0) { $nb_rep = $stmt->rowCount(); $class = 'nbRes'; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; }else{ $nb_rep = '0'; $class = 'nbResZero'; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; } ?>
is_module_loaded('templates') && ($core->test_service('edit_attachments_from_detail', 'attachments', false))) { ?>



<<  
is_module_loaded('notes')) { require_once "modules" . DIRECTORY_SEPARATOR . "notes" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php"; $notes_tools = new notes(); //Count notes $nbr_notes = $notes_tools->countUserNotes($s_id, $coll_id); // if ($nbr_notes > 0 ) $nbr_notes = ' ('.$nbr_notes.')'; else $nbr_notes = ''; if ($nbr_notes == 0){ $class = 'nbResZero'; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; }else{ $class = 'nbRes'; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } //Notes iframe ?>
is_module_loaded('cases') == true) { if ($res->case_id <> '') { $style = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; }else{ $style = 'font-size:2em;color:#9AA7AB;padding-left: 15px;padding-right: 15px;'; } ?>
test_service('join_res_case', 'cases',false) == 1) { ?>
case_id<>''){ ?>
test_service('sendmail', 'sendmail', false) === true) { require_once "modules" . DIRECTORY_SEPARATOR . "sendmail" . DIRECTORY_SEPARATOR . "class" . DIRECTORY_SEPARATOR . "class_modules_tools.php"; $sendmail_tools = new sendmail(); //Count mails $nbr_emails = $sendmail_tools->countUserEmails($s_id, $coll_id); if ($nbr_emails > 0 ){ $class = 'nbRes'; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } else { $class = 'nbResZero'; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; } ?>
execute_modules_services( $_SESSION['modules_services'], 'details', 'frame', 'sendmail', 'sendmail' ); ?>
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'] = ''; ?>
' . $extend_title_for_versions . ''; ?>
   | 
test
nbDirectLink( $_SESSION['doc_id'], $_SESSION['collection_id_choice'], 'all' ); if($nbLink == 0){ $class="nbResZero"; $style = 'display:none;font-size: 10px;'; $style2 = 'color:#9AA7AB;font-size:2em;padding-left: 15px;padding-right: 15px;'; }else{ $class="nbRes"; $style = 'font-size: 10px;'; $style2 = 'font-size:2em;padding-left: 15px;padding-right: 15px;'; } $Links = ''; //if ($nbLink > 0) { $Links .= ''; $Links .= '
'; // $Links .= '

'; // $Links .= _LINK_TAB; // $Links .= '

'; if ($core->test_service('add_links', 'apps', false)) { include_once 'apps/'.$_SESSION['config']['app_id'].'/add_links.php'; } $Links .= ''; $Links .= '
'; //} echo $Links; ?>
"; $_SESSION['doc_convert'] = array(); $_SESSION['doc_convert']['details_result'] = $detailsExport; $core = new core_tools(); $_SESSION['info'] = ''; /*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); }*/