24 if (!defined(
'NOLOGIN')) define(
"NOLOGIN", 1);
25 if (!defined(
'NOCSRFCHECK')) define(
"NOCSRFCHECK", 1);
26 if (!defined(
'NOIPCHECK')) define(
'NOIPCHECK',
'1');
27 if (!defined(
'NOBROWSERNOTIF')) define(
'NOBROWSERNOTIF',
'1');
29 require
'../../main.inc.php';
30 require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
33 require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
36 $langs->loadLangs(array(
"companies",
"other",
"recruitment"));
39 $action =
GETPOST(
'action',
'aZ09');
40 $cancel =
GETPOST(
'cancel',
'alpha');
41 $email =
GETPOST(
'email',
'alpha');
47 unset($_SESSION[
'email_customer']);
49 if (isset($_SESSION[
'email_customer'])) {
50 $email = $_SESSION[
'email_customer'];
59 print $langs->trans(
'ErrorBadParameters').
" - ref missing";
62 $object->fetch(
'', $ref);
69 $urlwithroot = DOL_MAIN_URL_ROOT;
78 if (!empty($backtopage))
80 header(
"Location: ".$backtopage);
86 if ($action ==
"view" || $action ==
"presend" || $action ==
"close" || $action ==
"confirm_public_close" || $action ==
"add_message") {
88 $display_ticket =
false;
91 array_push($object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")));
94 if (!strlen($email)) {
96 array_push($object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Email")));
101 array_push($object->errors, $langs->trans(
"ErrorEmailInvalid"));
107 $ret = $object->fetch(
'', $ref);
126 if ($error || $errors) {
128 if ($action ==
"add_message")
140 $triggersendname =
'CANDIDATURE_SENTBYMAIL';
142 $autocopy =
'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO';
143 $trackid =
'recruitmentcandidature'.$object->id;
144 include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
153 if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
155 $conf->dol_hide_topmenu = 1;
156 $conf->dol_hide_leftmenu = 1;
158 if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) {
159 $langs->load(
"errors");
160 print '<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
165 $arrayofjs = array();
166 $arrayofcss = array();
168 $replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
169 llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1);
172 print '<span id="dolpaymentspan"></span>'.
"\n";
173 print '<div class="center">'.
"\n";
174 print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
175 print '<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
176 print '<input type="hidden" name="action" value="dosign">'.
"\n";
177 print '<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
178 print '<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
179 print '<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
180 print '<input type="hidden" name="entity" value="'.$entity.
'" />';
182 print '<!-- Form to sign -->'.
"\n";
184 print '<table id="dolpaymenttable" summary="Payment form" class="center">'.
"\n";
188 $logosmall = $mysoc->logo_small;
189 $logo = $mysoc->logo;
190 $paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
191 if (!empty($conf->global->$paramlogo)) $logosmall = $conf->global->$paramlogo;
192 elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_;
197 if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall))
199 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
200 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
201 } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo))
203 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
204 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
209 print '<div class="backgreypublicpayment">';
210 print '<div class="logopublicpayment">';
211 print '<img id="dolpaymentlogo" src="'.$urllogo.
'"';
214 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
215 print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans(
"PoweredBy").
'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.
'/theme/dolibarr_logo.svg" width="80px"></a></div>';
222 if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT))
224 $langs->load(
"recruitment");
225 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) $text .= $langs->trans($reg[1]).
"<br>\n";
226 else $text .= $conf->global->RECRUITMENT_NEWFORM_TEXT.
"<br>\n";
227 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
231 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
232 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
233 $text .=
' - <span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation);
234 $text .=
'</td></tr>'.
"\n";
235 $text .=
'<tr><td class="textpublicpayment"><h1>'.$object->label.
'</h1><br></td></tr>'.
"\n";
240 print '<tr><td class="left">';
242 print '<div with="100%" id="tablepublicpayment">';
243 print '<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
251 print $langs->trans(
"Label").
' : ';
252 print '<b>'.dol_escape_htmltag($object->label).
'</b><br>';
255 print $langs->trans(
"DateExpected").
' : ';
257 if ($object->date_planned > $now) {
260 print $langs->trans(
"ASAP");
265 print $langs->trans(
"Remuneration").
' : ';
271 $tmpuser =
new User($db);
272 $tmpuser->fetch($object->fk_user_recruiter);
274 print $langs->trans(
"ContactForRecruitment").
' : ';
275 $emailforcontact = $object->email_recruiter;
276 if (empty($emailforcontact)) {
277 $emailforcontact = $tmpuser->email;
278 if (empty($emailforcontact)) {
279 $emailforcontact = $mysoc->email;
282 print '<b class="wordbreak">';
283 print $tmpuser->getFullName(-1);
284 print ' - '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0, 1);
288 if ($object->status == RecruitmentJobPosition::STATUS_RECRUITED) {
289 print info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0, 0,
'warning');
291 if ($object->status == RecruitmentJobPosition::STATUS_CANCELED) {
292 print info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0, 0,
'warning');
299 $text = $object->description;
301 print '<input type="hidden" name="ref" value="'.$object->ref.
'">';
307 if ($action !=
'dosubmit')
309 if ($found && !$error)
318 print '</td></tr>'.
"\n";
320 print '</table>'.
"\n";
321 print '</form>'.
"\n";
326 htmlPrintOnlinePaymentFooter($mysoc, $langs);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
Class to manage Dolibarr users.
dol_print_error_email($prefixcode, $errormessage= '', $errormessages=array(), $morecss= 'error', $email= '')
Show a public email and error code to contact if technical error.
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
Class for RecruitmentJobPosition.
print
Draft customers invoices.
dol_print_date($time, $format= '', $tzoutput= 'auto', $outputlangs= '', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
isValidEmail($address, $acceptsupervisorkey=0)
Return true if email syntax is ok.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin= '1', $morecss= '', $textfordropdown= '')
Show information for admin users or standard users.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $keepmoretags= '', $escapeonlyhtmltags=0)
Returns text escaped for inclusion in HTML alt or title tags, or into values of HTML input fields...