26if (!defined(
'NOLOGIN')) {
29if (!defined(
'NOCSRFCHECK')) {
30 define(
"NOCSRFCHECK", 1);
32if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
35if (!defined(
'NOBROWSERNOTIF')) {
36 define(
'NOBROWSERNOTIF',
'1');
40$entity = (!empty($_GET[
'entity']) ? (int) $_GET[
'entity'] : (!empty($_POST[
'entity']) ? (int) $_POST[
'entity'] : 1));
41define(
"DOLENTITY", $entity);
44require
'../../main.inc.php';
55require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
56require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
57require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
58require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
59require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
62$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
65$action =
GETPOST(
'action',
'aZ09');
66$cancel =
GETPOST(
'cancel',
'alpha');
67$SECUREKEY =
GETPOST(
"securekey");
74$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
75$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
77if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
80$offset = $limit * $page;
85 unset($_SESSION[
'email_customer']);
87if (isset($_SESSION[
'email_customer'])) {
88 $email = $_SESSION[
'email_customer'];
96$urlwithroot = DOL_MAIN_URL_ROOT;
117 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
120$conf->dol_hide_topmenu = 1;
121$conf->dol_hide_leftmenu = 1;
124 $langs->load(
"errors");
125 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
131$arrayofcss = array();
133$replacemainarea = (empty(
$conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
134llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
137print
'<span id="dolpaymentspan"></span>'.
"\n";
138print
'<div class="center">'.
"\n";
139print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
140print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
141print
'<input type="hidden" name="action" value="dosign">'.
"\n";
142print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
143print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
144print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
145print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
147print
'<!-- Form to view jobs -->'.
"\n";
151$logosmall =
$mysoc->logo_small;
153$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
163if (!empty($logosmall) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
164 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
165 $urllogofull =
$dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
166} elseif (!empty($logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$logo)) {
167 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
172 print
'<div class="backgreypublicpayment">';
173 print
'<div class="logopublicpayment">';
174 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
177 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>';
183 print
'<div class="backimagepublicrecruitment">';
184 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
189$results =
$object->fetchAll($sortorder, $sortfield, 0, 0,
'(status:=:1)');
193if (is_array($results)) {
194 if (empty($results)) {
196 print $langs->trans(
"NoPositionOpen");
198 print
'<br><br><br>';
199 print
'<span class="opacitymedium">'.$langs->trans(
"WeAreRecruiting").
'</span>';
200 print
'<br><br><br>';
201 print
'<br class="hideonsmartphone">';
203 foreach ($results as $job) {
205 $arrayofpostulatebutton = array();
207 print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
213 if (preg_match(
'/^\((.*)\)$/',
getDolGlobalString(
'RECRUITMENT_NEWFORM_TEXT'), $reg)) {
214 $text .= $langs->trans($reg[1]).
"<br>\n";
218 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
221 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled",
$mysoc->name);
222 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
223 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
224 $text .=
'</td></tr>'.
"\n";
225 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1></td></tr>'.
"\n";
230 print
'<tr><td class="left">';
232 print
'<div class="centpercent" id="tablepublicpayment">';
233 print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
241 print $langs->trans(
"Label").
' : ';
242 print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
245 print $langs->trans(
"DateExpected").
' : ';
247 if (
$object->date_planned > $now) {
250 print $langs->trans(
"ASAP");
255 print $langs->trans(
"Remuneration").
' : ';
261 $tmpuser =
new User($db);
262 $tmpuser->fetch(
$object->fk_user_recruiter);
264 print $langs->trans(
"ContactForRecruitment").
' : ';
265 $emailforcontact =
$object->email_recruiter;
266 if (empty($emailforcontact)) {
267 $emailforcontact = $tmpuser->email ??
'';
268 if (empty($emailforcontact)) {
269 $emailforcontact =
$mysoc->email ??
'';
272 print
'<b class="wordbreak">';
273 print $tmpuser->getFullName($langs);
274 print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
279 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0,
'0',
'warning');
282 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0,
'0',
'warning');
291 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
293 $arrayofpostulatebutton[] = array(
294 'url' =>
'/public/recruitment/view.php?ref='.
$object->ref,
295 'label' => $langs->trans(
'ApplyJobCandidature'),
296 'lang' =>
'recruitment',
301 print
'<div class="center">';
302 print dolGetButtonAction(
'', $langs->trans(
"ApplyJobCandidature"),
'default', $arrayofpostulatebutton,
'applicate_'.$object->ref,
true, $params);
308 if ($action !=
'dosubmit') {
309 if ($found && !$error) {
318 print
'</td></tr>'.
"\n";
320 print
'</table>'.
"\n";
322 print
'<br><br class="hideonsmartphone"><br class="hideonsmartphone"><br class="hideonsmartphone">'.
"\n";
if(! $sortfield) if(! $sortorder) $object
global $dolibarr_main_url_root
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.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
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 public pages.
dol_now($mode='gmt')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
GETPOSTINT($paramname, $method=0, $nodefault=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='', $cssfordropdown='info_admin')
Show information in HTML for admin users or standard users.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.