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";
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") {
148$triggersendname =
'CANDIDATURE_SENTBYMAIL';
150$autocopy =
'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO';
151$trackid =
'recruitmentcandidature'.$object->id;
152include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
164 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
167$conf->dol_hide_topmenu = 1;
168$conf->dol_hide_leftmenu = 1;
170if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) {
171 $langs->load(
"errors");
172 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
178$arrayofcss = array();
180$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
181llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
184print
'<span id="dolpaymentspan"></span>'.
"\n";
185print
'<div class="center">'.
"\n";
186print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
187print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
188print
'<input type="hidden" name="action" value="dosubmit">'.
"\n";
189print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
190print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
191print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
192print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
194print
'<!-- Form to view job -->'.
"\n";
198$logosmall = $mysoc->logo_small;
200$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
210if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
211 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
212 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
213} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
214 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
215 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
219 print
'<div class="backgreypublicpayment">';
220 print
'<div class="logopublicpayment">';
221 if (!empty($mysoc->url)) {
222 print
'<a href="'.$mysoc->url.
'" target="_blank" rel="noopener">';
224 print
'<img id="dolpaymentlogo" src="'.$urllogofull.
'">';
225 if (!empty($mysoc->url)) {
230 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>';
236 print
'<div class="backimagepublicrecruitment">';
237 print
'<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
242print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
248 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
249 $text .= $langs->trans($reg[1]).
"<br>\n";
253 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
256 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
257 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
258 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
259 $text .=
'</td></tr>'.
"\n";
260 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1><br></td></tr>'.
"\n";
265print
'<tr><td class="left">';
267print
'<div with="100%" id="tablepublicpayment">';
268print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
276print $langs->trans(
"Label").
' : ';
277print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
280print $langs->trans(
"DateExpected").
' : ';
282if (
$object->date_planned > $now) {
285 print $langs->trans(
"ASAP");
290print $langs->trans(
"Remuneration").
' : ';
296$tmpuser =
new User($db);
297$tmpuser->fetch(
$object->fk_user_recruiter);
299print $langs->trans(
"ContactForRecruitment").
' : ';
300$emailforcontact =
$object->email_recruiter;
301if (empty($emailforcontact)) {
302 $emailforcontact = $tmpuser->email;
303 if (empty($emailforcontact)) {
304 $emailforcontact = $mysoc->email;
307print
'<b class="wordbreak">';
308print $tmpuser->getFullName(-1);
309print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
314 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0, 0,
'warning');
317 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0, 0,
'warning');
326print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
332if ($action !=
'dosubmit') {
333 if ($found && !$error) {
342print
'</td></tr>'.
"\n";
344print
'</table>'.
"\n";
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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 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_now($mode='auto')
Return date for now.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
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.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
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.