connect();
$labelAction = '';
if ($id_action <> '') {
$db->query("select label_action from actions where id = " . $id_action);
$resAction = $db->fetch_object();
$labelAction = $db->show_string($resAction->label_action);
}
$users = array();
$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 = $db->fetch_object())
{
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);
$frm_str .= $values_str;
$frm_str .= '
';
require 'modules/templates/class/templates_controler.php';
$templatesControler = new templates_controler();
$templates = array();
$EntitiesIdExclusion = array();
$entities = $entity_ctrl->getAllEntities();
$countEntities = count($entities);
//var_dump($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 .= '