24if (!defined(
'NOLOGIN')) {
27if (!defined(
'NOCSRFCHECK')) {
28 define(
"NOCSRFCHECK", 1);
30if (!defined(
'NOIPCHECK')) {
31 define(
'NOIPCHECK',
'1');
33if (!defined(
'NOBROWSERNOTIF')) {
34 define(
'NOBROWSERNOTIF',
'1');
38require
'../../main.inc.php';
39require_once DOL_DOCUMENT_ROOT.
'/recruitment/class/recruitmentjobposition.class.php';
40require_once DOL_DOCUMENT_ROOT.
'/core/class/CMailFile.class.php';
41require_once DOL_DOCUMENT_ROOT.
'/core/lib/security.lib.php';
42require_once DOL_DOCUMENT_ROOT.
'/core/lib/company.lib.php';
43require_once DOL_DOCUMENT_ROOT.
'/core/lib/payments.lib.php';
46$langs->loadLangs(array(
"companies",
"other",
"recruitment"));
49$action =
GETPOST(
'action',
'aZ09');
50$cancel =
GETPOST(
'cancel',
'alpha');
51$SECUREKEY =
GETPOST(
"securekey");
52$entity =
GETPOST(
'entity',
'int') ?
GETPOST(
'entity',
'int') : $conf->entity;
57$limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
58$sortfield =
GETPOST(
'sortfield',
'aZ09comma');
59$sortorder =
GETPOST(
'sortorder',
'aZ09comma');
60$page = GETPOSTISSET(
'pageplusone') ? (
GETPOST(
'pageplusone') - 1) :
GETPOST(
"page",
'int');
61if (empty($page) || $page < 0 ||
GETPOST(
'button_search',
'alpha') ||
GETPOST(
'button_removefilter',
'alpha')) {
64$offset = $limit * $page;
69 unset($_SESSION[
'email_customer']);
71if (isset($_SESSION[
'email_customer'])) {
72 $email = $_SESSION[
'email_customer'];
80$urlwithroot = DOL_MAIN_URL_ROOT;
83if (empty($conf->recruitment->enabled)) {
100if (!empty($conf->global->MAIN_RECRUITMENT_CSS_URL)) {
101 $head =
'<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_RECRUITMENT_CSS_URL.
'?lang='.$langs->defaultlang.
'">'.
"\n";
104$conf->dol_hide_topmenu = 1;
105$conf->dol_hide_leftmenu = 1;
107if (!$conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) {
108 $langs->load(
"errors");
109 print
'<div class="error">'.$langs->trans(
'ErrorPublicInterfaceNotEnabled').
'</div>';
115$arrayofcss = array();
117$replacemainarea = (empty($conf->dol_hide_leftmenu) ?
'<div>' :
'').
'<div>';
118llxHeader($head, $langs->trans(
"PositionToBeFilled"),
'',
'', 0, 0,
'',
'',
'',
'onlinepaymentbody', $replacemainarea, 1, 1);
121print
'<span id="dolpaymentspan"></span>'.
"\n";
122print
'<div class="center">'.
"\n";
123print
'<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">'.
"\n";
124print
'<input type="hidden" name="token" value="'.newToken().
'">'.
"\n";
125print
'<input type="hidden" name="action" value="dosign">'.
"\n";
126print
'<input type="hidden" name="tag" value="'.GETPOST(
"tag",
'alpha').
'">'.
"\n";
127print
'<input type="hidden" name="suffix" value="'.GETPOST(
"suffix",
'alpha').
'">'.
"\n";
128print
'<input type="hidden" name="securekey" value="'.$SECUREKEY.
'">'.
"\n";
129print
'<input type="hidden" name="entity" value="'.$entity.
'" />';
131print
'<!-- Form to view jobs -->'.
"\n";
135$logosmall = $mysoc->logo_small;
137$paramlogo =
'ONLINE_RECRUITMENT_LOGO_'.$suffix;
138if (!empty($conf->global->$paramlogo)) {
139 $logosmall = $conf->global->$paramlogo;
140} elseif (!empty($conf->global->ONLINE_RECRUITMENT_LOGO)) {
141 $logosmall = $conf->global->ONLINE_RECRUITMENT_LOGO_;
147if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.
'/logos/thumbs/'.$logosmall)) {
148 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
149 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/thumbs/'.$logosmall);
150} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.
'/logos/'.$logo)) {
151 $urllogo = DOL_URL_ROOT.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
152 $urllogofull = $dolibarr_main_url_root.
'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.
'&file='.urlencode(
'logos/'.$logo);
156 print
'<div class="backgreypublicpayment">';
157 print
'<div class="logopublicpayment">';
158 print
'<img id="dolpaymentlogo" src="'.$urllogo.
'">';
160 if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
161 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>';
166if (!empty($conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE)) {
167 print
'<div class="backimagepublicrecruitment">';
168 print
'<img id="idPROJECT_IMAGE_PUBLIC_SUGGEST_BOOTH" src="'.$conf->global->RECRUITMENT_IMAGE_PUBLIC_INTERFACE.
'">';
173$results = $object->fetchAll($sortfield, $sortorder, 0, 0, array(
'status' => 1));
176if (is_array($results)) {
177 if (empty($results)) {
179 print $langs->trans(
"NoPositionOpen");
181 print
'<br><br><br>';
182 print
'<span class="opacitymedium">'.$langs->trans(
"WeAreRecruiting").
'</span>';
183 print
'<br><br><br>';
184 print
'<br class="hideonsmartphone">';
186 foreach ($results as $job) {
189 print
'<table id="dolpaymenttable" summary="Job position offer" class="center">'.
"\n";
193 if (!empty($conf->global->RECRUITMENT_NEWFORM_TEXT)) {
195 if (preg_match(
'/^\((.*)\)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
196 $text .= $langs->trans($reg[1]).
"<br>\n";
198 $text .= $conf->global->RECRUITMENT_NEWFORM_TEXT.
"<br>\n";
200 $text =
'<tr><td align="center"><br>'.$text.
'<br></td></tr>'.
"\n";
203 $text .=
'<tr><td class="textpublicpayment"><br>'.$langs->trans(
"JobOfferToBeFilled", $mysoc->name);
204 $text .=
' - <strong>'.$mysoc->name.
'</strong>';
205 $text .=
' - <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation).
'</span>';
206 $text .=
'</td></tr>'.
"\n";
207 $text .=
'<tr><td class="textpublicpayment"><h1 class="paddingleft paddingright">'.$object->label.
'</h1></td></tr>'.
"\n";
212 print
'<tr><td class="left">';
214 print
'<div with="100%" id="tablepublicpayment">';
215 print
'<div class="opacitymedium">'.$langs->trans(
"ThisIsInformationOnJobPosition").
' :</div>'.
"\n";
223 print $langs->trans(
"Label").
' : ';
224 print
'<b>'.dol_escape_htmltag($object->label).
'</b><br>';
227 print $langs->trans(
"DateExpected").
' : ';
229 if ($object->date_planned > $now) {
232 print $langs->trans(
"ASAP");
237 print $langs->trans(
"Remuneration").
' : ';
243 $tmpuser =
new User($db);
244 $tmpuser->fetch($object->fk_user_recruiter);
246 print $langs->trans(
"ContactForRecruitment").
' : ';
247 $emailforcontact = $object->email_recruiter;
248 if (empty($emailforcontact)) {
249 $emailforcontact = $tmpuser->email;
250 if (empty($emailforcontact)) {
251 $emailforcontact = $mysoc->email;
254 print
'<b class="wordbreak">';
255 print $tmpuser->getFullName($langs);
256 print
' '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0,
'envelope');
261 print
info_admin($langs->trans(
"JobClosedTextCandidateFound"), 0, 0, 0,
'warning');
264 print
info_admin($langs->trans(
"JobClosedTextCanceled"), 0, 0, 0,
'warning');
271 $text = $object->description;
273 print
'<input type="hidden" name="ref" value="'.$object->ref.
'">';
279 if ($action !=
'dosubmit') {
280 if ($found && !$error) {
289 print
'</td></tr>'.
"\n";
291 print
'</table>'.
"\n";
293 print
'<br><br class="hideonsmartphone"><br class="hideonsmartphone"><br class="hideonsmartphone">'.
"\n";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
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.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs='', $encodetooutput=false)
Output date in a string format according to outputlangs (or langs if not defined).
dol_now($mode='auto')
Return date for now.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='')
Show information for admin users or standard users.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
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.