27require_once 
'../main.inc.php';
 
   28require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
 
   29require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formfile.class.php';
 
   30require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formprojet.class.php';
 
   31require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
 
   32require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
 
   33require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentcandidature.class.php';
 
   34require_once DOL_DOCUMENT_ROOT.
'/recruitment/lib/recruitment_recruitmentcandidature.lib.php';
 
   45$langs->loadLangs(array(
"recruitment", 
"other", 
"users"));
 
   50$action = 
GETPOST(
'action', 
'aZ09');
 
   51$confirm = 
GETPOST(
'confirm', 
'alpha');
 
   52$cancel = 
GETPOST(
'cancel', 
'aZ09');
 
   53$contextpage = 
GETPOST(
'contextpage', 
'aZ') ? 
GETPOST(
'contextpage', 
'aZ') : 
'recruitmentcandidaturecard'; 
 
   54$backtopage = 
GETPOST(
'backtopage', 
'alpha');
 
   55$backtopageforcancel = 
GETPOST(
'backtopageforcancel', 
'alpha');
 
   61$diroutputmassaction = 
$conf->recruitment->dir_output.
'/temp/massgeneration/'.$user->id;
 
   62$hookmanager->initHooks(array(
'recruitmentcandidaturecard', 
'globalcard')); 
 
   65$extrafields->fetch_name_optionals_label(
$object->table_element);
 
   67$search_array_options = $extrafields->getOptionalsFromPost(
$object->table_element, 
'', 
'search_');
 
   70$search_all = 
GETPOST(
"search_all", 
'alpha');
 
   72foreach (
$object->fields as $key => $val) {
 
   73  if (
GETPOST(
'search_'.$key, 
'alpha')) {
 
   74    $search[$key] = 
GETPOST(
'search_'.$key, 
'alpha');
 
   78if (empty($action) && empty($id) && empty($ref)) {
 
   83include DOL_DOCUMENT_ROOT.
'/core/actions_fetchobject.inc.php'; 
 
   86$permissiontoread = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'read');
 
   87$permissiontoadd = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'write'); 
 
   88$permissiontodelete = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'delete') || ($permissiontoadd && isset(
$object->status) && 
$object->status == $object::STATUS_DRAFT);
 
   89$permissionnote = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'write'); 
 
   90$permissiondellink = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'write'); 
 
   91$upload_dir = 
$conf->recruitment->multidir_output[isset(
$object->entity) ? 
$object->entity : 1];
 
   96$isdraft = ((
$object->status == $object::STATUS_DRAFT) ? 1 : 0);
 
   97$result = 
restrictedArea($user, 
'recruitment', 
$object->id, 
'recruitment_recruitmentcandidature', 
'recruitmentjobposition', 
'', 
'rowid', $isdraft);
 
  100if (
GETPOST(
"action", 
"aZ09") == 
'create') {
 
  102  preg_match(
'/^(integer|link):(.*):(.*):(.*):(.*)/i', 
$object->fields[
'fk_recruitmentjobposition'][
'type'], $reg);
 
  104    $object->fields[
'fk_recruitmentjobposition'][
'type'] .= 
" AND (t.status:=:1)";
 
  106    $object->fields[
'fk_recruitmentjobposition'][
'type'] .= 
":(t.status:=:1)";
 
  115$parameters = array();
 
  116$reshook = $hookmanager->executeHooks(
'doActions', $parameters, $object, $action); 
 
  121if (empty($reshook)) {
 
  124  $backurlforlist = 
dol_buildpath(
'/recruitment/recruitmentcandidature_list.php', 1);
 
  126  if (empty($backtopage) || ($cancel && empty($id))) {
 
  127    if (empty($backtopage) || ($cancel && strpos($backtopage, 
'__ID__'))) {
 
  128      if (empty($id) && (($action != 
'add' && $action != 
'create') || $cancel)) {
 
  129        $backtopage = $backurlforlist;
 
  131        $backtopage = DOL_URL_ROOT.
'/recruitment/recruitmentcandidature_card.php?id='.(
$id > 0 ? 
$id : 
'__ID__');
 
  135  $triggermodname = 
'RECRUITMENTCANDIDATURE_MODIFY'; 
 
  138  $object->email_fields_no_propagate_in_actioncomm = 1;
 
  139  include DOL_DOCUMENT_ROOT.
'/core/actions_addupdatedelete.inc.php';
 
  140  $object->email_fields_no_propagate_in_actioncomm = 0;
 
  143  include DOL_DOCUMENT_ROOT.
'/core/actions_dellink.inc.php';
 
  146  include DOL_DOCUMENT_ROOT.
'/core/actions_printing.inc.php';
 
  152  include DOL_DOCUMENT_ROOT.
'/core/actions_builddoc.inc.php';
 
  154  if ($action == 
'classin' && $permissiontoadd) {
 
  157  if ($action == 
'confirm_decline' && $confirm == 
'yes' && $permissiontoadd) {
 
  158    $result = 
$object->setStatut($object::STATUS_REFUSED, 
null, 
'', $triggermodname);
 
  164  if ($action == 
'confirm_makeofferordecline' && $permissiontoadd && !
GETPOST(
'cancel', 
'alpha')) {
 
  166      setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CloseAs")), 
null, 
'errors');
 
  167      $action = 
'makeofferordecline';
 
  170      if (
$object->status == $object::STATUS_VALIDATED) {
 
  173        if (
GETPOSTINT(
'status') == $object::STATUS_REFUSED) {
 
  174          $result = 
$object->setStatut($object::STATUS_REFUSED, 
null, 
'', $triggermodname);
 
  179          $result = 
$object->setStatut($object::STATUS_CONTRACT_PROPOSED, 
null, 
'', $triggermodname);
 
  194  if ($action == 
'confirm_closeas' && $permissiontoadd && !
GETPOST(
'cancel', 
'alpha')) {
 
  196      setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"CloseAs")), 
null, 
'errors');
 
  197      $action = 
'makeofferordecline';
 
  200      if (
$object->status == $object::STATUS_CONTRACT_PROPOSED) {
 
  203        if (
GETPOSTINT(
'status') == $object::STATUS_CONTRACT_REFUSED) {
 
  204          $result = 
$object->setStatut($object::STATUS_CONTRACT_REFUSED, 
null, 
'', $triggermodname);
 
  209          $result = 
$object->setStatut($object::STATUS_CONTRACT_SIGNED, 
null, 
'', $triggermodname);
 
  225  if ($action == 
'confirm_create_user' && $confirm == 
'yes' && $user->hasRight(
'user', 
'user', 
'creer')) {
 
  227    $jobposition->fetch(
$object->fk_recruitmentjobposition);
 
  232    $nuser = 
new User($db);
 
  233    $nuser->login = 
GETPOST(
'login', 
'alphanohtml');
 
  235    $nuser->employee = 1;
 
  236    $nuser->firstname = 
$object->firstname;
 
  237    $nuser->lastname = 
$object->lastname;
 
  239    $nuser->personal_email = 
$object->email;
 
  240    $nuser->personal_mobile = 
$object->phone;
 
  241    $nuser->birth = 
$object->date_birth;
 
  242    $nuser->salary = 
$object->remuneration_proposed;
 
  243    $nuser->fk_user = $jobposition->fk_user_supervisor; 
 
  244    $nuser->email = 
$object->email;
 
  246    $result = $nuser->create($user);
 
  250      $langs->load(
"errors");
 
  252      $action = 
'create_user';
 
  262      setEventMessages($langs->trans(
"NewUserCreated", $nuser->login), 
null, 
'mesgs');
 
  270  $triggersendname = 
'RECRUITMENTCANDIDATURE_SENTBYMAIL';
 
  271  $autocopy = 
'MAIN_MAIL_AUTOCOPY_RECRUITMENTCANDIDATURE_TO';
 
  272  $trackid = 
'recruitmentcandidature'.$object->id;
 
  273  include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
 
  285$form = 
new Form($db);
 
  289if ($action == 
'create') {
 
  290  $title    = $langs->trans(
'NewCandidature');
 
  293  $title = 
$object->ref.
" - ".$langs->trans(
'Card');
 
  300if ($action == 
'create') {
 
  303  print 
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
 
  304  print 
'<input type="hidden" name="token" value="'.newToken().
'">';
 
  305  print 
'<input type="hidden" name="action" value="add">';
 
  307    print 
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
 
  309  if ($backtopageforcancel) {
 
  310    print 
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
 
  315  print 
'<table class="border centpercent tableforfieldcreate">'.
"\n";
 
  318  include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_add.tpl.php';
 
  321  include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_add.tpl.php';
 
  323  print 
'</table>'.
"\n";
 
  327  print $form->buttonsSaveCancel(
"Create");
 
  335if (($id || $ref) && $action == 
'edit') {
 
  336  print 
load_fiche_titre($langs->trans(
"RecruitmentCandidature"), 
'', 
'object_'.$object->picto);
 
  338  print 
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
 
  339  print 
'<input type="hidden" name="token" value="'.newToken().
'">';
 
  340  print 
'<input type="hidden" name="action" value="update">';
 
  341  print 
'<input type="hidden" name="id" value="'.$object->id.
'">';
 
  343    print 
'<input type="hidden" name="backtopage" value="'.$backtopage.
'">';
 
  345  if ($backtopageforcancel) {
 
  346    print 
'<input type="hidden" name="backtopageforcancel" value="'.$backtopageforcancel.
'">';
 
  351  print 
'<table class="border centpercent tableforfieldedit">'.
"\n";
 
  354  include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_edit.tpl.php';
 
  357  include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_edit.tpl.php';
 
  363  print $form->buttonsSaveCancel();
 
  369if (
$object->id > 0 && (empty($action) || ($action != 
'edit' && $action != 
'create'))) {
 
  370  $res = 
$object->fetch_optionals();
 
  378  if ($action == 
'delete') {
 
  379    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'DeleteRecruitmentCandidature'), $langs->trans(
'ConfirmDeleteObject'), 
'confirm_delete', 
'', 0, 1);
 
  382  if ($action == 
'deleteline') {
 
  383    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&lineid='.$lineid, $langs->trans(
'DeleteLine'), $langs->trans(
'ConfirmDeleteLine'), 
'confirm_deleteline', 
'', 0, 1);
 
  386  if ($action == 
'clone') {
 
  388    $formquestion = array();
 
  389    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ToClone'), $langs->trans(
'ConfirmCloneAsk', 
$object->ref), 
'confirm_clone', $formquestion, 
'yes', 1);
 
  392  if ($action == 
'makeofferordecline') {
 
  393    $langs->load(
"propal");
 
  396    $formquestion = array(
 
  397      array(
'type' => 
'select', 
'name' => 
'status', 
'label' => 
'<span class="fieldrequired">'.$langs->trans(
"CloseAs").
'</span>', 
'values' => array($object::STATUS_CONTRACT_PROPOSED => 
$object->LibStatut($object::STATUS_CONTRACT_PROPOSED), $object::STATUS_REFUSED => 
$object->LibStatut($object::STATUS_REFUSED))),
 
  398      array(
'type' => 
'text', 
'name' => 
'note_private', 
'label' => $langs->trans(
"Note"), 
'value' => 
'')        
 
  403    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'SetAcceptedRefused'), $text, 
'confirm_makeofferordecline', $formquestion, 
'', 1, 250);
 
  406  if ($action == 
'closeas') {
 
  407    $langs->load(
"propal");
 
  410    $formquestion = array(
 
  411      array(
'type' => 
'select', 
'name' => 
'status', 
'label' => 
'<span class="fieldrequired">'.$langs->trans(
"CloseAs").
'</span>', 
'values' => array($object::STATUS_CONTRACT_SIGNED => 
$object->LibStatut($object::STATUS_CONTRACT_SIGNED), $object::STATUS_CONTRACT_REFUSED => 
$object->LibStatut($object::STATUS_CONTRACT_REFUSED))),
 
  412      array(
'type' => 
'text', 
'name' => 
'note_private', 
'label' => $langs->trans(
"Note"), 
'value' => 
'')        
 
  417    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'SetAcceptedRefused'), $text, 
'confirm_closeas', $formquestion, 
'', 1, 250);
 
  420  if ($action == 
'close') {
 
  421    $langs->load(
"propal");
 
  424    $formconfirm = $form->formconfirm($_SERVER[
"PHP_SELF"].
'?id='.
$object->id, $langs->trans(
'ConfirmClose'), $langs->trans(
'ConfirmCloseAsk'), 
'confirm_close', $formquestion, 
'', 1, 250);
 
  428  if ($action == 
'create_user') {
 
  429    $login = (GETPOSTISSET(
'login') ? 
GETPOST(
'login', 
'alphanohtml') : 
$object->login);
 
  432      include_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
 
  436      $login = strtolower(substr(
$object->firstname, 0, 4)).strtolower(substr(
$object->lastname, 0, 4));
 
  440    $formquestion = array(
 
  441      array(
'label' => $langs->trans(
"LoginToCreate"), 
'type' => 
'text', 
'name' => 
'login', 
'value' => $login)
 
  443    $text .= $langs->trans(
"ConfirmCreateLogin");
 
  444    print $form->formconfirm($_SERVER[
"PHP_SELF"].
"?id=".
$object->id, $langs->trans(
"CreateDolibarrLogin"), $text, 
"confirm_create_user", $formquestion, 
'yes');
 
  448  $parameters = array(
'formConfirm' => $formconfirm, 
'lineid' => $lineid);
 
  449  $reshook = $hookmanager->executeHooks(
'formConfirm', $parameters, $object, $action); 
 
  450  if (empty($reshook)) {
 
  451    $formconfirm .= $hookmanager->resPrint;
 
  452  } elseif ($reshook > 0) {
 
  453    $formconfirm = $hookmanager->resPrint;
 
  462  $linkback = 
'<a href="'.dol_buildpath(
'/recruitment/recruitmentcandidature_list.php', 1).
'?restore_lastsearch_values=1'.(!empty($socid) ? 
'&socid='.$socid : 
'').
'">'.$langs->trans(
"BackToList").
'</a>';
 
  464  $morehtmlref = 
'<div class="refidno">';
 
  465  $morehtmlref .= 
$object->getFullName(
null, 1);
 
  503  if (!empty(
$object->email_msgid)) {
 
  504    $morehtmlref .= 
'<br>'.$langs->trans(
"CreatedBy").
' ';
 
  506    if (
$object->fk_user_creat > 0) {
 
  507      $fuser = 
new User($db);
 
  508      $fuser->fetch(
$object->fk_user_creat);
 
  509      $morehtmlref .= $fuser->getNomUrl(-1);
 
  511    $morehtmlref .= 
' <small class="hideonsmartphone opacitymedium">('.$form->textwithpicto($langs->trans(
"CreatedByEmailCollector"), $langs->trans(
"EmailMsgID").
': '.
$object->email_msgid).
')</small>';
 
  517  $morehtmlref .= 
'</div>';
 
  520  dol_banner_tab($object, 
'ref', $linkback, 1, 
'ref', 
'ref', $morehtmlref);
 
  523  print 
'<div class="fichecenter">';
 
  524  print 
'<div class="fichehalfleft">';
 
  525  print 
'<div class="underbanner clearboth"></div>';
 
  526  print 
'<table class="border centpercent tableforfield">'.
"\n";
 
  529  $keyforbreak = 
'description'; 
 
  530  unset(
$object->fields[
'email']); 
 
  532  include DOL_DOCUMENT_ROOT.
'/core/tpl/commonfields_view.tpl.php';
 
  535  include DOL_DOCUMENT_ROOT.
'/core/tpl/extrafields_view.tpl.php';
 
  541  print 
'<div class="clearboth"></div>';
 
  547  if ($action != 
'presend' && $action != 
'editline') {
 
  548    print 
'<div class="tabsAction">'.
"\n";
 
  549    $parameters = array();
 
  550    $reshook = $hookmanager->executeHooks(
'addMoreActionsButtons', $parameters, $object, $action); 
 
  555    if (empty($reshook)) {
 
  557      if (empty($user->socid)) {
 
  558        print 
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=presend&mode=init&sendto='.urlencode(
$object->email).
'#formmailbeforetitle">'.$langs->trans(
'SendMail').
'</a>'.
"\n";
 
  562      if (
$object->status == $object::STATUS_VALIDATED) {
 
  563        if ($permissiontoadd) {
 
  564          print 
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=confirm_setdraft&token='.
newToken().
'&confirm=yes">'.$langs->trans(
"SetToDraft").
'</a>';
 
  569      if ($permissiontoadd) {
 
  570        print 
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>'.
"\n";
 
  572        print 
'<a class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans(
"NotEnoughPermissions")).
'">'.$langs->trans(
'Modify').
'</a>'.
"\n";
 
  576      if (
$object->status == $object::STATUS_DRAFT) {
 
  577        if ($permissiontoadd) {
 
  579            print 
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=confirm_validate&token='.
newToken().
'&confirm=yes">'.$langs->trans(
"Validate").
'</a>';
 
  581            $langs->load(
"errors");
 
  582            print 
'<a class="butActionRefused" href="" title="'.$langs->trans(
"ErrorAddAtLeastOneLineFirst").
'">'.$langs->trans(
"Validate").
'</a>';
 
  588      if (
$object->status >= $object::STATUS_VALIDATED && 
$object->status < $object::STATUS_CONTRACT_PROPOSED) {
 
  589        if ($permissiontoadd) {
 
  590          print 
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=makeofferordecline&token='.
newToken().
'">'.$langs->trans(
"MakeOffer").
' / '.$langs->trans(
"Decline").
'</a>';
 
  595      if (
$object->status == $object::STATUS_CONTRACT_PROPOSED) {
 
  596        if ($permissiontoadd) {
 
  597          print 
'<a class="butAction" href="'.$_SERVER[
'PHP_SELF'].
'?id='.
$object->id.
'&action=closeas&token='.
newToken().
'">'.$langs->trans(
"Accept").
' / '.$langs->trans(
"Decline").
'</a>';
 
  602      if ($permissiontoadd) {
 
  603        print 
dolGetButtonAction($langs->trans(
"ToClone"), 
'', 
'default', $_SERVER[
'PHP_SELF'].
'?id='.
$object->id.(!empty(
$object->socid) ? 
'&socid='.$object->socid : 
'').
'&action=clone&object=recruitmentcandidature', 
'clone', $permissiontoadd);
 
  607      if (
$object->status == $object::STATUS_CONTRACT_SIGNED) {
 
  608        if ($user->hasRight(
'user', 
'user', 
'creer')) {
 
  609          $useralreadyexists = 
$object->fk_user;
 
  610          if (empty($useralreadyexists)) {
 
  611            print 
'<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=create_user&token='.
newToken().
'">'.$langs->trans(
"CreateDolibarrLogin").
'</a></div>';
 
  613            print 
'<div class="inline-block divButAction"><a class="butActionRefused" href="#">'.$langs->trans(
"CreateDolibarrLogin").
'</a></div>';
 
  616          print 
'<div class="inline-block divButAction"><span class="butActionRefused classfortooltip" href="#" title="'.dol_escape_htmltag($langs->trans(
"NotEnoughPermissions")).
'">'.$langs->trans(
"CreateDolibarrLogin").
"</span></div>";
 
  621      if ($permissiontoadd) {
 
  622        if (
$object->status == $object::STATUS_VALIDATED) {
 
  623          print 
'<a class="butActionDelete" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=close&token='.
newToken().
'">'.$langs->trans(
"Cancel").
'</a>'.
"\n";
 
  624        } elseif (
$object->status == $object::STATUS_REFUSED || 
$object->status == $object::STATUS_CANCELED || 
$object->status == $object::STATUS_CONTRACT_REFUSED) {
 
  625          print 
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=confirm_reopen&confirm=yes&token='.
newToken().
'">'.$langs->trans(
"Re-Open").
'</a>'.
"\n";
 
  630      print 
dolGetButtonAction($langs->trans(
"Delete"), 
'', 
'delete', $_SERVER[
"PHP_SELF"].
'?id='.
$object->id.
'&action=delete&token='.
newToken(), 
'delete', $permissiontodelete);
 
  637  if (
GETPOST(
'modelselected')) {
 
  641  if ($action != 
'presend') {
 
  642    print 
'<div class="fichecenter"><div class="fichehalfleft">';
 
  643    print 
'<a name="builddoc"></a>'; 
 
  645    $includedocgeneration = 1;
 
  648    if ($includedocgeneration) {
 
  650      $relativepath = $objref.
'/'.$objref.
'.pdf';
 
  651      $filedir = 
$conf->recruitment->dir_output.
'/'.
$object->element.
'/'.$objref;
 
  652      $urlsource = $_SERVER[
"PHP_SELF"].
"?id=".
$object->id;
 
  653      $genallowed = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'read'); 
 
  654      $delallowed = $user->hasRight(
'recruitment', 
'recruitmentjobposition', 
'write'); 
 
  655      print $formfile->showdocuments(
'recruitment:RecruitmentCandidature', 
$object->element.
'/'.$objref, $filedir, $urlsource, $genallowed, $delallowed, 
$object->model_pdf, 1, 0, 0, 28, 0, 
'', 
'', 
'', $langs->defaultlang);
 
  659    $tmparray = $form->showLinkToObjectBlock($object, array(), array(
'recruitmentcanidature'), 1);
 
  660    $linktoelem = $tmparray[
'linktoelem'];
 
  661    $htmltoenteralink = $tmparray[
'htmltoenteralink'];
 
  662    print $htmltoenteralink;
 
  664    $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
 
  667    print 
'</div><div class="fichehalfright">';
 
  671    $morehtmlcenter = 
dolGetButtonTitle($langs->trans(
'SeeAll'), 
'', 
'fa fa-bars imgforviewmode', DOL_URL_ROOT.
'/recruitment/recruitmentcandidature_agenda.php?id='.
$object->id);
 
  674    include_once DOL_DOCUMENT_ROOT.
'/core/class/html.formactions.class.php';
 
  676    $somethingshown = $formactions->showactions($object, 
$object->element.
'@recruitment', (is_object(
$object->thirdparty) ? 
$object->thirdparty->id : 0), 1, 
'', $MAXEVENT, 
'', $morehtmlcenter);
 
  678    print 
'</div></div>';
 
  682  if (
GETPOST(
'modelselected')) {
 
  687  $modelmail = 
'recruitmentcandidature_send';
 
  688  $defaulttopic = 
'InformationMessage';
 
  689  $diroutput = 
$conf->recruitment->dir_output;
 
  690  $trackid = 
'recruitmentcandidature'.$object->id;
 
  691  $inreplyto = 
$object->email_msgid;
 
  694  $job->fetch(
$object->fk_recruitmentjobposition);
 
  696  require_once DOL_DOCUMENT_ROOT.
'/user/class/user.class.php';
 
  697  $recruiter = 
new User($db);
 
  698  $recruiter->fetch($job->fk_user_recruiter);
 
  700  $recruitername = $recruiter->getFullName(
'');
 
  701  $recruitermail = (!empty($job->email_recruiter) ? $job->email_recruiter : $recruiter->email);
 
  703  include DOL_DOCUMENT_ROOT.
'/core/tpl/card_presend.tpl.php';
 
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
 
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
 
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
 
Class for RecruitmentCandidature.
 
Class for RecruitmentJobPosition.
 
Class to manage Dolibarr users.
 
dol_buildlogin($lastname, $firstname)
Build a login from lastname, firstname.
 
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
 
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
 
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
 
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
 
dolGetButtonTitle($label, $helpText='', $iconClass='fa fa-file', $url='', $id='', $status=1, $params=array())
Function dolGetButtonTitle : this kind of buttons are used in title in list.
 
dol_get_fiche_end($notab=0)
Return tab footer of a card.
 
newToken()
Return the value of token currently saved into session with name 'newtoken'.
 
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
 
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
 
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
 
dol_sanitizeFileName($str, $newstr='_', $unaccent=1)
Clean a string to use it as a file name.
 
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
 
recruitmentCandidaturePrepareHead($object)
Prepare array of tabs for RecruitmentCandidature.
 
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.