26if (!defined(
'NOLOGIN')) {
29if (!defined(
'NOCSRFCHECK')) {
30 define(
"NOCSRFCHECK", 1);
32if (!defined(
'NOIPCHECK')) {
33 define(
'NOIPCHECK',
'1');
35if (!defined(
'NOBROWSERNOTIF')) {
36 define(
'NOBROWSERNOTIF',
'1');
40require
'../../main.inc.php';
51require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
52require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
53require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
54require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
55require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
58$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
61$action =
GETPOST(
'action',
'aZ09');
62$cancel =
GETPOST(
'cancel',
'alpha');
63$SECUREKEY =
GETPOST(
"securekey");
70$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
71$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
73if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
76$offset = $limit * $page;
81 unset($_SESSION[
'email_customer']);
83if (isset($_SESSION[
'email_customer'])) {
84 $email = $_SESSION[
'email_customer'];
92$urlwithroot = DOL_MAIN_URL_ROOT;
113 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
116$conf->dol_hide_topmenu = 1;
117$conf->dol_hide_leftmenu = 1;
120 $langs->load(
"errors");
121 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
127$arrayofcss = array();
129$replacemainarea = (empty(
$conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
130llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
133print
'<span id="dolpaymentspan"></span>'.
"\n";
134print
'<div class="center">'.
"\n";
135print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
136print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
137print
'<input type="hidden" name="action" value="dosign">'.
"\n";
138print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
139print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
140print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
141print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
143print
'<!-- Form to view jobs -->'.
"\n";
147$logosmall =
$mysoc->logo_small;
149$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
159if (!empty($logosmall) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
160 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
161 $urllogofull =
$dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
162} elseif (!empty($logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$logo)) {
163 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
168 print
'<div class="backgreypublicpayment">';
169 print
'<div class="logopublicpayment">';
170 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
173 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>';
179 print
'<div class="backimagepublicrecruitment">';
180 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
185$results =
$object->fetchAll($sortorder, $sortfield, 0, 0,
'(status:=:1)');
189if (is_array($results)) {
190 if (empty($results)) {
192 print $langs->trans(
"NoPositionOpen");
194 print
'<br><br><br>';
195 print
'<span class="opacitymedium">'.$langs->trans(
"WeAreRecruiting").
'</span>';
196 print
'<br><br><br>';
197 print
'<br class="hideonsmartphone">';
199 foreach ($results as $job) {
201 $arrayofpostulatebutton = array();
203 print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
209 if (preg_match(
'/^\((.*)\)$/',
getDolGlobalString(
'RECRUITMENT_NEWFORM_TEXT'), $reg)) {
210 $text .= $langs->trans($reg[1]).
"<br>\n";
214 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
217 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled",
$mysoc->name);
218 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
219 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
220 $text .=
'</td></tr>'.
"\n";
221 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1></td></tr>'.
"\n";
226 print
'<tr><td class="left">';
228 print
'<div class="centpercent" id="tablepublicpayment">';
229 print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
237 print $langs->trans(
"Label").
' : ';
238 print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
241 print $langs->trans(
"DateExpected").
' : ';
243 if (
$object->date_planned > $now) {
246 print $langs->trans(
"ASAP");
251 print $langs->trans(
"Remuneration").
' : ';
258 $tmpuser->fetch(
$object->fk_user_recruiter);
260 print $langs->trans(
"ContactForRecruitment").
' : ';
261 $emailforcontact =
$object->email_recruiter;
262 if (empty($emailforcontact)) {
263 $emailforcontact = $tmpuser->email ??
'';
264 if (empty($emailforcontact)) {
265 $emailforcontact =
$mysoc->email ??
'';
268 print
'<b class="wordbreak">';
269 print $tmpuser->getFullName($langs);
270 print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
275 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0,
'0',
'warning');
278 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0,
'0',
'warning');
287 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
289 $arrayofpostulatebutton[] = array(
290 'url' =>
'/public/recruitment/view.php?ref='.
$object->ref,
291 'label' => $langs->trans(
'ApplyJobCandidature'),
292 'lang' =>
'recruitment',
297 print
'<div class="center">';
298 print dolGetButtonAction(
'', $langs->trans(
"ApplyJobCandidature"),
'default', $arrayofpostulatebutton,
'applicate_'.$object->ref,
true, $params);
304 if ($action !=
'dosubmit') {
305 if ($found && !$error) {
314 print
'</td></tr>'.
"\n";
316 print
'</table>'.
"\n";
318 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.
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.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='', $textonpictotooltip='')
Show information in HTML for admin users or standard users.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
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).
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
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.