25if (!defined(
'NOLOGIN')) {
28if (!defined(
'NOCSRFCHECK')) {
29 define(
"NOCSRFCHECK", 1);
31if (!defined(
'NOIPCHECK')) {
32 define(
'NOIPCHECK',
'1');
34if (!defined(
'NOBROWSERNOTIF')) {
35 define(
'NOBROWSERNOTIF',
'1');
39require
'../../main.inc.php';
40require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
47$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
50$action =
GETPOST(
'action',
'aZ09');
51$cancel =
GETPOST(
'cancel',
'alpha');
52$email =
GETPOST(
'email',
'alpha');
58 unset($_SESSION[
'email_customer']);
60if (isset($_SESSION[
'email_customer'])) {
61 $email = $_SESSION[
'email_customer'];
68 print $langs->trans(
'ErrorBadParameters').
" - ref missing";
78$urlwithroot = DOL_MAIN_URL_ROOT;
81if (empty($conf->recruitment->enabled)) {
91 if (!empty($backtopage)) {
92 header(
"Location: ".$backtopage);
98if ($action ==
"view" || $action ==
"presend" || $action ==
"dosubmit") {
100 $display_ticket =
false;
103 array_push(
$object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Ref")));
106 if (!strlen($email)) {
108 array_push(
$object->errors, $langs->trans(
"ErrorFieldRequired", $langs->transnoentities(
"Email")));
113 array_push(
$object->errors, $langs->trans(
"ErrorEmailInvalid"));
119 $ret =
$object->fetch(
'', $ref);
138 if ($error || $errors) {
140 if ($action ==
"dosubmit") {
149$triggersendname =
'CANDIDATURE_SENTBYMAIL';
151$autocopy =
'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO';
152$trackid =
'recruitmentcandidature'.$object->id;
153include DOL_DOCUMENT_ROOT.
'/core/actions_sendmails.inc.php';
165 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
168$conf->dol_hide_topmenu = 1;
169$conf->dol_hide_leftmenu = 1;
171if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) {
172 $langs->load(
"errors");
173 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
179$arrayofcss = array();
181$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
182llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
185print
'<span id="dolpaymentspan"></span>'.
"\n";
186print
'<div class="center">'.
"\n";
187print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
188print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
189print
'<input type="hidden" name="action" value="dosubmit">'.
"\n";
190print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
191print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
192print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
193print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
195print
'<!-- Form to view job -->'.
"\n";
199$logosmall = $mysoc->logo_small;
201$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
211if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
212 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
213 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
214} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
215 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
216 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
220 print
'<div class="backgreypublicpayment">';
221 print
'<div class="logopublicpayment">';
222 if (!empty($mysoc->url)) {
223 print
'<a href="'.$mysoc->url.
'" target="_blank" rel="noopener">';
225 print
'<img id="dolpaymentlogo" src="'.$urllogofull.
'">';
226 if (!empty($mysoc->url)) {
231 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>';
237 print
'<div class="backimagepublicrecruitment">';
238 print
'<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
243print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
249 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
250 $text .= $langs->trans($reg[1]).
"<br>\n";
254 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
257 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
258 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
259 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
260 $text .=
'</td></tr>'.
"\n";
261 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1><br></td></tr>'.
"\n";
266print
'<tr><td class="left">';
268print
'<div with="100%" id="tablepublicpayment">';
269print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
277print $langs->trans(
"Label").
' : ';
278print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
281print $langs->trans(
"DateExpected").
' : ';
283if (
$object->date_planned > $now) {
286 print $langs->trans(
"ASAP");
291print $langs->trans(
"Remuneration").
' : ';
297$tmpuser =
new User($db);
298$tmpuser->fetch(
$object->fk_user_recruiter);
300print $langs->trans(
"ContactForRecruitment").
' : ';
301$emailforcontact =
$object->email_recruiter;
302if (empty($emailforcontact)) {
303 $emailforcontact = $tmpuser->email;
304 if (empty($emailforcontact)) {
305 $emailforcontact = $mysoc->email;
308print
'<b class="wordbreak">';
309print $tmpuser->getFullName(-1);
310print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
315 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0,
'0',
'warning');
318 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0,
'0',
'warning');
327print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
333if ($action !=
'dosubmit') {
334 if ($found && !$error) {
343print
'</td></tr>'.
"\n";
345print
'</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.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
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.
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.