24if (!defined(
'NOLOGIN')) {
27if (!defined(
'NOCSRFCHECK')) {
28 define(
"NOCSRFCHECK", 1);
30if (!defined(
'NOIPCHECK')) {
31 define(
'NOIPCHECK',
'1');
33if (!defined(
'NOBROWSERNOTIF')) {
34 define(
'NOBROWSERNOTIF',
'1');
38require
'../../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
46$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
49$action =
GETPOST(
'action',
'aZ09');
50$cancel =
GETPOST(
'cancel',
'alpha');
51$email =
GETPOST(
'email',
'alpha');
57 unset($_SESSION[
'email_customer']);
59if (isset($_SESSION[
'email_customer'])) {
60 $email = $_SESSION[
'email_customer'];
67 print $langs->trans(
'ErrorBadParameters').
" - ref missing";
70 $object->fetch(
'', $ref);
77$urlwithroot = DOL_MAIN_URL_ROOT;
80if (empty($conf->recruitment->enabled)) {
90 if (!empty($backtopage)) {
91 header(
"Location: ".$backtopage);
97if ($action ==
"view" || $action ==
"presend" || $action ==
"dosubmit") {
99 $display_ticket =
false;
102 array_push($object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")));
105 if (!strlen($email)) {
107 array_push($object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Email")));
112 array_push($object->errors, $langs->trans(
"ErrorEmailInvalid"));
118 $ret = $object->fetch(
'', $ref);
137 if ($error || $errors) {
139 if ($action ==
"dosubmit") {
150$triggersendname =
'CANDIDATURE_SENTBYMAIL';
152$autocopy =
'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO';
153$trackid =
'recruitmentcandidature'.$object->id;
154include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
165if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) {
166 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
169$conf->dol_hide_topmenu = 1;
170$conf->dol_hide_leftmenu = 1;
172if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) {
173 $langs->load(
"errors");
174 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
180$arrayofcss = array();
182$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
183llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
186print
'<span id="dolpaymentspan"></span>'.
"\n";
187print
'<div class="center">'.
"\n";
188print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
189print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
190print
'<input type="hidden" name="action" value="dosubmit">'.
"\n";
191print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
192print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
193print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
194print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
196print
'<!-- Form to view job -->'.
"\n";
200$logosmall = $mysoc->logo_small;
202$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
203if (!empty($conf->global->$paramlogo)) {
204 $logosmall = $conf->global->$paramlogo;
205} elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) {
206 $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO;
212if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
213 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
214 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
215} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
216 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
217 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
221 print
'<div class="backgreypublicpayment">';
222 print
'<div class="logopublicpayment">';
223 if (!empty($mysoc->url)) {
224 print
'<a href="'.$mysoc->url.
'" target="_blank" rel="noopener">';
226 print
'<img id="dolpaymentlogo" src="'.$urllogofull.
'">';
227 if (!empty($mysoc->url)) {
231 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
232 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>';
237if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) {
238 print
'<div class="backimagepublicrecruitment">';
239 print
'<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE.
'">';
244print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
248if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT)) {
250 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
251 $text .= $langs->trans($reg[1]).
"<br>\n";
253 $text .= $conf->global->RECRUITMENT_NEWFORM_TEXT.
"<br>\n";
255 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
258 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
259 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
260 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation).
'</span>';
261 $text .=
'</td></tr>'.
"\n";
262 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1><br></td></tr>'.
"\n";
267print
'<tr><td class="left">';
269print
'<div with="100%" id="tablepublicpayment">';
270print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
278print $langs->trans(
"Label").
' : ';
279print
'<b>'.dol_escape_htmltag($object->label).
'</b><br>';
282print $langs->trans(
"DateExpected").
' : ';
284if ($object->date_planned > $now) {
287 print $langs->trans(
"ASAP");
292print $langs->trans(
"Remuneration").
' : ';
298$tmpuser =
new User($db);
299$tmpuser->fetch($object->fk_user_recruiter);
301print $langs->trans(
"ContactForRecruitment").
' : ';
302$emailforcontact = $object->email_recruiter;
303if (empty($emailforcontact)) {
304 $emailforcontact = $tmpuser->email;
305 if (empty($emailforcontact)) {
306 $emailforcontact = $mysoc->email;
309print
'<b class="wordbreak">';
310print $tmpuser->getFullName(-1);
311print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
316 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0, 0,
'warning');
319 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0, 0,
'warning');
326$text = $object->description;
328print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
334if ($action !=
'dosubmit') {
335 if ($found && !$error) {
344print
'</td></tr>'.
"\n";
346print
'</table>'.
"\n";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
Class for RecruitmentJobPosition.
const STATUS_RECRUITED
Recruited.
const STATUS_CANCELED
Canceled.
Class to manage Dolibarr users.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML pages.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
httponly_accessforbidden($message=1, $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.