'') {
// $error_visa = true;
// }
$visa = new visa();
// $curr_visa_wf = $visa->getWorkflow($_SESSION['doc_id'], $_SESSION['current_basket']['coll_id'], 'VISA_CIRCUIT');
// if (count($curr_visa_wf['sign']) == 0){
// $error_visa = true;
// }
$visa->checkResponseProject($_SESSION['doc_id'], $_SESSION['current_basket']['coll_id']);
if ($visa->errorMessageVisa){
$error_visa_response_project = true;
}
if (!$error_visa && !$error_visa_response_project){
require("modules/entities/entities_tables.php");
require_once("modules/entities/class/EntityControler.php");
require_once('modules/entities/class/class_manage_entities.php');
$confirm = false;
$etapes = array('form');
$frm_width='355px';
$frm_height = 'auto';
}
function get_form_txt($values, $path_manage_action, $id_action, $table, $module, $coll_id, $mode )
{
require_once('apps/' . $_SESSION['config']['app_id'] . '/class/class_chrono.php');
$ent = new entity();
$entity_ctrl = new EntityControler();
$servicesCompare = array();
$db = new Database();
$cr = new chrono();
$labelAction = '';
if ($id_action <> '') {
$stmt = $db->query("select label_action from actions where id = ?", array($id_action));
$resAction = $stmt->fetchObject();
$labelAction = $db->show_string($resAction->label_action);
}
$users = array();
$stmt = $db->query("SELECT distinct uc.user_id, u.lastname, u.firstname
FROM usergroup_content uc
LEFT JOIN usergroups_services us on us.group_id = uc.group_id
LEFT JOIN users u on u.user_id = uc.user_id
WHERE us.service_id = 'sign_document'
ORDER BY lastname asc");
while($res = $stmt->fetchObject())
{
array_push($users, array( 'ID' => $res->user_id, 'NOM' => $db->show_string($res->lastname), "PRENOM" => $db->show_string($res->firstname)));
}
$frm_str = '
';
if ($labelAction <> '') {
$frm_str .= '' . $labelAction . ' ' . _NUM;
} else {
$frm_str .= ''._REDIRECT_MAIL.' '._NUM;
}
$values_str = '';
if(empty($_SESSION['stockCheckbox'])){
for($i=0; $i < count($values);$i++) {
$values_str .= $values[$i].', ';
}
}else {
for($i=0; $i < count($_SESSION['stockCheckbox']);$i++) {
$values_str .= $_SESSION['stockCheckbox'][$i].', ';
}
}
$values_str = preg_replace('/, $/', '', $values_str);
if(_ID_TO_DISPLAY == 'res_id'){
$frm_str .= $values_str;
} else if (_ID_TO_DISPLAY == 'chrono_number') {
$chrono_number = $cr->get_chrono_number($values_str, 'res_view_letterbox');
$frm_str .= $chrono_number;
}
$frm_str .= '
';
require 'modules/templates/class/templates_controler.php';
$templatesControler = new templates_controler();
$EntitiesIdExclusion = array();
$entities = $entity_ctrl->getAllEntities();
$countEntities = count($entities);
for ($cptAllEnt = 0;$cptAllEnt<$countEntities;$cptAllEnt++) {
if (!is_integer(array_search($entities[$cptAllEnt]->__get('entity_id'), $servicesCompare))) {
array_push($EntitiesIdExclusion, $entities[$cptAllEnt]->__get('entity_id'));
}
}
$allEntitiesTree = array();
$allEntitiesTree = $ent->getShortEntityTreeAdvanced(
$allEntitiesTree, 'all', '', $EntitiesIdExclusion, 'all'
);
if ($destination <> '') {
$templates = $templatesControler->getAllTemplatesForProcess($destination);
} else {
$templates = $templatesControler->getAllTemplatesForSelect();
}
$frm_str .=''._SUBMIT_COMMENT.':
';
$frm_str .= '