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';
56$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
59$action =
GETPOST(
'action',
'aZ09');
60$cancel =
GETPOST(
'cancel',
'alpha');
61$SECUREKEY =
GETPOST(
"securekey");
68$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
69$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
71if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
74$offset = $limit * $page;
79 unset($_SESSION[
'email_customer']);
81if (isset($_SESSION[
'email_customer'])) {
82 $email = $_SESSION[
'email_customer'];
90$urlwithroot = DOL_MAIN_URL_ROOT;
93if (empty(
$conf->recruitment->enabled)) {
111 $head =
'<link rel="stylesheet" type="text/css" href="' .
getDolGlobalString(
'MAIN_RECRUITMENT_CSS_URL').
'?lang='.$langs->defaultlang.
'">'.
"\n";
114$conf->dol_hide_topmenu = 1;
115$conf->dol_hide_leftmenu = 1;
118 $langs->load(
"errors");
119 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
125$arrayofcss = array();
127$replacemainarea = (empty(
$conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
128llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
131print
'<span id="dolpaymentspan"></span>'.
"\n";
132print
'<div class="center">'.
"\n";
133print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
134print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
135print
'<input type="hidden" name="action" value="dosign">'.
"\n";
136print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
137print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
138print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
139print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
141print
'<!-- Form to view jobs -->'.
"\n";
145$logosmall = $mysoc->logo_small;
147$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
157if (!empty($logosmall) && is_readable(
$conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
158 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
159 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
160} elseif (!empty($logo) && is_readable(
$conf->mycompany->dir_output.
'/logos/'.$logo)) {
161 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
162 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.
$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
166 print
'<div class="backgreypublicpayment">';
167 print
'<div class="logopublicpayment">';
168 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
171 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>';
177 print
'<div class="backimagepublicrecruitment">';
178 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="' .
getDolGlobalString(
'RECRUITMENT_IMAGE_PUBLIC_INTERFACE').
'">';
183$results =
$object->fetchAll($sortorder, $sortfield, 0, 0,
'(status:=:1)');
187if (is_array($results)) {
188 if (empty($results)) {
190 print $langs->trans(
"NoPositionOpen");
192 print
'<br><br><br>';
193 print
'<span class="opacitymedium">'.$langs->trans(
"WeAreRecruiting").
'</span>';
194 print
'<br><br><br>';
195 print
'<br class="hideonsmartphone">';
197 foreach ($results as $job) {
199 $arrayofpostulatebutton = array();
201 print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
207 if (preg_match(
'/^\((.*)\)$/',
$conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
208 $text .= $langs->trans($reg[1]).
"<br>\n";
212 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
215 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
216 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
217 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date(
$object->date_creation).
'</span>';
218 $text .=
'</td></tr>'.
"\n";
219 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1></td></tr>'.
"\n";
224 print
'<tr><td class="left">';
226 print
'<div class="centpercent" id="tablepublicpayment">';
227 print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
235 print $langs->trans(
"Label").
' : ';
236 print
'<b>'.dol_escape_htmltag(
$object->label).
'</b><br>';
239 print $langs->trans(
"DateExpected").
' : ';
241 if (
$object->date_planned > $now) {
244 print $langs->trans(
"ASAP");
249 print $langs->trans(
"Remuneration").
' : ';
255 $tmpuser =
new User($db);
256 $tmpuser->fetch(
$object->fk_user_recruiter);
258 print $langs->trans(
"ContactForRecruitment").
' : ';
259 $emailforcontact =
$object->email_recruiter;
260 if (empty($emailforcontact)) {
261 $emailforcontact = $tmpuser->email;
262 if (empty($emailforcontact)) {
263 $emailforcontact = $mysoc->email;
266 print
'<b class="wordbreak">';
267 print $tmpuser->getFullName($langs);
268 print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
273 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0,
'0',
'warning');
276 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0,
'0',
'warning');
285 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
287 $arrayofpostulatebutton[] = array(
288 'url' =>
'/public/recruitment/view.php?ref='.
$object->ref,
289 'label' => $langs->trans(
'ApplyJobCandidature'),
290 'lang' =>
'recruitment',
295 print
'<div class="center">';
296 print
dolGetButtonAction(
'', $langs->trans(
"ApplyJobCandidature"),
'default', $arrayofpostulatebutton,
'applicate_'.$object->ref,
true, $params);
302 if ($action !=
'dosubmit') {
303 if ($found && !$error) {
312 print
'</td></tr>'.
"\n";
314 print
'</table>'.
"\n";
316 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...
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.