canOpen()) {
echo "{status : 0,error:'"._DOC_LOCKER_RES_ID."".$res_id.""._DOC_LOCKER_USER." ".$_SESSION['userLock']."'}";
exit();
}
require_once "modules" . DIRECTORY_SEPARATOR . "visa" . DIRECTORY_SEPARATOR
. "class" . DIRECTORY_SEPARATOR
. "class_modules_tools.php";
include('apps'.DIRECTORY_SEPARATOR.$_SESSION['config']['app_id'].DIRECTORY_SEPARATOR.'definition_mail_categories.php');
require_once("core".DIRECTORY_SEPARATOR."class".DIRECTORY_SEPARATOR."class_security.php");
$sec =new security();
$core =new core_tools();
$data = get_general_data($coll_id, $res_id, 'minimal');
/* Partie centrale*/
$left_html = '';
//Onglet document
if ($selectedCat != 'outgoing'){
$pathScriptTab = $_SESSION['config']['businessappurl'].'index.php?display=true&dir=indexing_searching&page=view_resource_controler&visu&id='. $res_id.'&collid='.$coll_id;
$left_html .= '
'._INCOMING.' '.$nbr_notes.'';
$left_html .= '';
$left_html .= '';
}
//Onglet Circuit
$pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&page=show_visa_tab&module=visa&resId='.$res_id.'&collId='.$coll_id.'&destination=';
$left_html .= ''._VISA_WORKFLOW.'';
$left_html .= ''._VISA_WORKFLOW.'
';
$left_html .= '';
$left_html .= '';
//LOAD TOOLBAR BADGE
$toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=visa&page=load_toolbar_visa&origin=parent&resId='.$res_id.'&collId='.$coll_id;
$js .='loadToolbarBadge(\'visa_tab\',\''.$toolbarBagde_script.'\');';
//Onglet Avancement
$pathScriptTab = $_SESSION['config']['businessappurl'].'index.php?display=true&dir=indexing_searching&page=document_workflow_history&id='. $res_id .'&coll_id='. $coll_id.'&load&size=full';
$left_html .= 'Avancement '.$nbr_notes.'';
$left_html .= ''. _WF .'
';
$left_html .= '';
$left_html .= '
';
$left_html .= '
';
$pathScriptTab = $_SESSION['config']['businessappurl'].'index.php?display=true&dir=indexing_searching&page=document_history&id='. $res_id .'&coll_id='. $coll_id.'&load&size=full';
$left_html .= '';
$left_html .= '';
$left_html .= ' '. _ALL_HISTORY .'';
$left_html .= '';
$left_html .= '';
$left_html .= '';
//Onglet notes
if ($core->is_module_loaded('notes')) {
$pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=notes&page=notes&identifier=' . $res_id . '&origin=document&coll_id=' . $coll_id . '&load&size=full';
$left_html .= '' . _NOTES . '' . _NOTES . '
';
//LOAD TOOLBAR BADGE
$toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=notes&page=load_toolbar_notes&origin=parent&resId='.$res_id.'&collId='.$coll_id;
$js .='loadToolbarBadge(\'notes_tab\',\''.$toolbarBagde_script.'\');';
}
/* Partie droite */
$right_html = '';
$visa = new visa();
$tab_path_rep_file = $visa->get_rep_path($res_id, $coll_id);
$cptAttach = count($tab_path_rep_file);
if ($cptAttach < 6) {
$viewMode = 'extended';
} elseif ($cptAttach < 10) {
$viewMode = 'small';
} else {
$viewMode = 'verysmall';
}
for ($i = 0; $i < $cptAttach; $i++) {
$num_rep = $i + 1;
if ($viewMode == 'verysmall') {
$titleRep = $i + 1;
} elseif ($viewMode == 'small') {
$titleRep = substr($_SESSION['attachment_types'][$tab_path_rep_file[$i]['attachment_type']], 0, 10);
} else {
if (strlen($tab_path_rep_file[$i]['title']) > 15)
$titleRep = substr($_SESSION['attachment_types'][$tab_path_rep_file[$i]['attachment_type']], 0, 15) . '...';
else
$titleRep = $_SESSION['attachment_types'][$tab_path_rep_file[$i]['attachment_type']];
}
if ($tab_path_rep_file[$i]['attachment_type'] == 'signed_response') {
$titleRep = '' . $titleRep;
}
$pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=visa&page=view_pdf_attachement&res_id_master=' . $res_id . '&id=' . $tab_path_rep_file[$i]['res_id'];
$right_html .= '' . $titleRep
. ' ';
if($i==0){
$right_html .= '';
} else {
$right_html .= '';
}
$right_html .= '';
//$right_html .= '';
}
$pathScriptTab = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=attachments&page=frame_list_attachments&template_selected=documents_list_attachments_simple&load&attach_type_exclude=converted_pdf,print_folder';
$right_html .= 'PJ';
//LOAD TOOLBAR BADGE
$toolbarBagde_script = $_SESSION['config']['businessappurl'] . 'index.php?display=true&module=attachments&page=load_toolbar_attachments&origin=parent&resId='.$res_id.'&collId='.$coll_id;
$js .='loadToolbarBadge(\'attachments_tab\',\''.$toolbarBagde_script.'\');';
if ($core_tools->is_module_loaded('attachments')) {
require 'modules/templates/class/templates_controler.php';
$templatesControler = new templates_controler();
$templates = array();
$templates = $templatesControler->getAllTemplatesForProcess($curdest);
$_SESSION['destination_entity'] = $curdest;
//var_dump($templates);
$right_html .= '';
$right_html .= '
';
$right_html .= '
';
$right_html .= '
' . _PJ . ', ' . _ATTACHEMENTS . '
';
$right_html .= '
';
$right_html .= '
';
if ($core_tools->is_module_loaded('templates')) {
$right_html .= '';
}
$right_html .= '';
$right_html .= '';
$right_html .= '
';
$right_html .= '
';
//$right_html .= '
';
$right_html .= '
';
}
$right_html .= '';
$valid_but = 'valid_action_form( \'index_file\', \'index.php?display=true&page=manage_action&module=core\', \''.$_REQUEST['action'].'\', \''.$res_id.'\', \'res_letterbox\', \'null\', \''.$coll_id.'\', \'page\');';
//echo "{status : 1,avancement:'".$avancement_html."',circuit:'".$circuit_html."',notes_dt:'".$notes_html_dt."',notes_dd:'".$notes_html_dd."'}";
echo "{status : 1,left_html:'".addslashes($left_html)."',right_html:'".addslashes($right_html)."',valid_button:'".addslashes($valid_but)."',id_rep:'".$tab_path_rep_file[0]['res_id']."',is_vers_rep:'".$tab_path_rep_file[0]['is_version']."',exec_js:'".addslashes($js)."'}";
exit();