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';
41require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
44require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
45require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
48$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
51$action =
GETPOST(
'action',
'aZ09');
52$cancel =
GETPOST(
'cancel',
'alpha');
53$SECUREKEY =
GETPOST(
"securekey");
60$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
61$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
63if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
66$offset = $limit * $page;
71 unset($_SESSION[
'email_customer']);
73if (isset($_SESSION[
'email_customer'])) {
74 $email = $_SESSION[
'email_customer'];
82$urlwithroot = DOL_MAIN_URL_ROOT;
85if (empty($conf->recruitment->enabled)) {
103 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
106$conf->dol_hide_topmenu = 1;
107$conf->dol_hide_leftmenu = 1;
110 $langs->load(
"errors");
111 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
117$arrayofcss = array();
119$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
120llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
123print
'<span id="dolpaymentspan"></span>'.
"\n";
124print
'<div class="center">'.
"\n";
125print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
126print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
127print
'<input type="hidden" name="action" value="dosign">'.
"\n";
128print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
129print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
130print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
131print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
133print
'<!-- Form to view jobs -->'.
"\n";
137$logosmall = $mysoc->logo_small;
139$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
149if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
150 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
151 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
152} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
153 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
154 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
158 print
'<div class="backgreypublicpayment">';
159 print
'<div class="logopublicpayment">';
160 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
163 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>';
169 print
'<div class="backimagepublicrecruitment">';
170 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
175$results =
$object->fetchAll($sortorder, $sortfield, 0, 0,
'(status:=:1)');
179if (is_array($results)) {
180 if (empty($results)) {
182 print $langs->trans(
"NoPositionOpen");
184 print
'<br><br><br>';
185 print
'<span class="opacitymedium">'.$langs->trans(
"WeAreRecruiting").
'</span>';
186 print
'<br><br><br>';
187 print
'<br class="hideonsmartphone">';
189 foreach ($results as $job) {
191 $arrayofpostulatebutton = array();
193 print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
199 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
200 $text .= $langs->trans($reg[1]).
"<br>\n";
204 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
207 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
208 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
209 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
210 $text .=
'</td></tr>'.
"\n";
211 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1></td></tr>'.
"\n";
216 print
'<tr><td class="left">';
218 print
'<div class="centpercent" id="tablepublicpayment">';
219 print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
227 print $langs->trans(
"Label").
' : ';
228 print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
231 print $langs->trans(
"DateExpected").
' : ';
233 if (
$object->date_planned > $now) {
236 print $langs->trans(
"ASAP");
241 print $langs->trans(
"Remuneration").
' : ';
247 $tmpuser =
new User($db);
248 $tmpuser->fetch(
$object->fk_user_recruiter);
250 print $langs->trans(
"ContactForRecruitment").
' : ';
251 $emailforcontact =
$object->email_recruiter;
252 if (empty($emailforcontact)) {
253 $emailforcontact = $tmpuser->email;
254 if (empty($emailforcontact)) {
255 $emailforcontact = $mysoc->email;
258 print
'<b class="wordbreak">';
259 print $tmpuser->getFullName($langs);
260 print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
265 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0,
'0',
'warning');
268 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0,
'0',
'warning');
277 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
279 $arrayofpostulatebutton[] = array(
280 'url' =>
'/public/recruitment/view.php?ref='.
$object->ref,
281 'label' => $langs->trans(
'ApplyJobCandidature'),
282 'lang' =>
'recruitment',
287 print
'<div class="center">';
288 print
dolGetButtonAction(
'', $langs->trans(
"ApplyJobCandidature"),
'default', $arrayofpostulatebutton,
'applicate_'.$object->ref,
true, $params);
294 if ($action !=
'dosubmit') {
295 if ($found && !$error) {
304 print
'</td></tr>'.
"\n";
306 print
'</table>'.
"\n";
308 print
'<br><br class="hideonsmartphone"><br class="hideonsmartphone"><br class="hideonsmartphone">'.
"\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.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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).
dolGetButtonAction($label, $text='', $actionType='default', $url='', $id='', $userRight=1, $params=array())
Function dolGetButtonAction.
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_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.
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.