dolibarr 25.0.0-alpha
view.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2020 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
4 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 3 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
26if (!defined('NOLOGIN')) {
27 define("NOLOGIN", 1); // This means this output page does not require to be logged.
28}
29if (!defined('NOCSRFCHECK')) {
30 define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
31}
32if (!defined('NOIPCHECK')) {
33 define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
34}
35if (!defined('NOBROWSERNOTIF')) {
36 define('NOBROWSERNOTIF', '1');
37}
38
39// For MultiCompany module.
40// Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
41// Because 2 entities can have the same ref.
42$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
43define("DOLENTITY", $entity);
44
45// Load Dolibarr environment
46require '../../main.inc.php';
58require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
59require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
60require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
61require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
62require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
63require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
64require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php';
65require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
66
67
68// Load translation files required by the page
69$langs->loadLangs(array("companies", "other", "recruitment", "mails"));
70
71// Get parameters
72$action = GETPOST('action', 'aZ09');
73$cancel = GETPOST('cancel', 'alpha');
74$email = GETPOST('email', 'alpha');
75$firstname = GETPOST('firstname', 'alpha');
76$lastname = GETPOST('lastname', 'alpha');
77$birthday = GETPOST('birthday', 'alpha');
78$phone = GETPOST('phone', 'alpha');
79$message = GETPOST('message', 'alpha');
80$SECUREKEY = GETPOST("securekey");
81$requestedremuneration = GETPOST('requestedremuneration', 'alpha');
82$suffix = GETPOST("suffix", 'alpha');
83
84$ref = GETPOST('ref', 'alpha');
85
86if (GETPOST('btn_view')) {
87 unset($_SESSION['email_customer']);
88}
89if (isset($_SESSION['email_customer'])) {
90 $email = $_SESSION['email_customer'];
91}
92
94
95if (!$ref) {
96 print $langs->trans('ErrorBadParameters')." - ref missing";
97 exit;
98}
99
100
101// Define $urlwithroot
102// $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
103// $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
104$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
105$backtopage = $urlwithroot.'/public/recruitment/index.php';
106
107// Security check
108if (!isModEnabled("recruitment")) {
109 httponly_accessforbidden('Module Recruitment not enabled');
110}
111
112// Done before the actions, so no application can be recorded when the public interface is disabled
113if (!getDolGlobalInt('RECRUITMENT_ENABLE_PUBLIC_INTERFACE')) {
114 $langs->load("errors");
115 print '<div class="error">'.$langs->trans('ErrorPublicInterfaceNotEnabled').'</div>';
116 $db->close();
117 exit();
118}
119
120$object->fetch(0, $ref);
121if (!is_object($user)) {
122 $user = new User($db);
123}
124
125// A draft job position is not published, it must not be shown nor receive applications
126if ($object->id <= 0 || $object->status == RecruitmentJobPosition::STATUS_DRAFT) {
127 $langs->load("errors");
128 httponly_accessforbidden($langs->trans('ErrorRecordNotFound'), 404);
129}
130$user->loadDefaultValues();
131$errmsg = "";
132
133$extrafields = new ExtraFields($db);
134
135$captchaobj = null;
136if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT')) {
137 require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
138 $captcha = getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_HANDLER', 'standard');
139 // List of directories where we can find captcha handlers
140 $dirModCaptcha = array_merge(
141 array(
142 'main' => '/core/modules/security/captcha/'
143 ),
144 is_array($conf->modules_parts['captcha']) ? $conf->modules_parts['captcha'] : array()
145 );
146 $fullpathclassfile = '';
147 foreach ($dirModCaptcha as $dir) {
148 $fullpathclassfile = dol_buildpath($dir."modCaptcha".ucfirst($captcha).'.class.php', 0, 2);
149 if ($fullpathclassfile) {
150 break;
151 }
152 }
153 if ($fullpathclassfile) {
154 include_once $fullpathclassfile;
155 // Charging the numbering class
156 $classname = "modCaptcha".ucfirst($captcha);
157 if (class_exists($classname)) {
158 $captchaobj = new $classname($db, $conf, $langs, $user);
159 '@phan-var-force ModeleCaptcha $captchaobj';
161 } else {
162 print 'Error, the captcha handler class '.$classname.' was not found after the include';
163 }
164 } else {
165 print 'Error, the captcha handler '.$captcha.' has no class file found modCaptcha'.ucfirst($captcha);
166 }
167}
168
169/*
170 * Actions
171 */
172
173if ($cancel) {
174 if (!empty($backtopage)) {
175 header("Location: ".$backtopage);
176 exit;
177 }
178}
179
180if ($action == "dosubmit") { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls)
181 $error = 0;
182 $db->begin();
183 if (!strlen($ref)) {
184 $error++;
185 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")));
186 $action = 'view';
187 }
188 // Only a job position still open can receive an application
190 $error++;
191 array_push($object->errors, $langs->trans($object->status == RecruitmentJobPosition::STATUS_RECRUITED ? "JobClosedTextCandidateFound" : "JobClosedTextCanceled"));
192 $action = 'view';
193 }
194 if (!strlen($email)) {
195 $error++;
196 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
197 $action = 'view';
198 } else {
199 if (!isValidEmail($email)) {
200 $error++;
201 array_push($object->errors, $langs->trans("ErrorEmailInvalid"));
202 $action = 'view';
203 }
204 }
205 if (!strlen($lastname)) {
206 $error++;
207 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname")));
208 $action = 'view';
209 }
210
211 // Check Captcha code if is enabled
212 $ok = false;
213 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT') && is_object($captchaobj)) {
214 if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) {
215 $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod
216 } else {
217 print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()';
218 }
219 if (!$ok) {
220 $error++;
221 $langs->load('errors');
222 array_push($object->errors, $langs->trans("ErrorBadValueForCode"));
223 $action = 'view';
224 }
225 }
226 if (!$error) {
227 $sql = "SELECT rrc.rowid FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rrc";
228 $sql .= " WHERE rrc.email = '". $db->escape($email)."'";
229 $sql .= " AND rrc.entity IN (". getEntity($object->element, 0).")";
230 $resql = $db->query($sql);
231 if ($resql) {
232 $num = $db->num_rows($resql);
233 if ($num > 0) {
234 $error++;
235 setEventMessages($langs->trans("ErrorRecruitmmentCandidatureAlreadyExists", $email), null, 'errors');
236 }
237 } else {
238 dol_print_error($db);
239 $error++;
240 }
241 } else {
242 setEventMessages($object->error, $object->errors, 'errors');
243 }
244
245 if (!$error) { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls)
246 $candidature = new RecruitmentCandidature($db);
247
248 $candidature->firstname = GETPOST('firstname', 'alpha');
249 $candidature->lastname = GETPOST('lastname', 'alpha');
250 $candidature->email = GETPOST('email', 'alpha');
251 $candidature->phone = GETPOST('phone', 'alpha');
252 $candidature->date_birth = GETPOST('birthday', 'alpha');
253 $candidature->requestedremuneration = GETPOST('requestedremuneration', 'alpha');
254 $candidature->description = GETPOST('message', 'alpha');
255 $candidature->fk_recruitmentjobposition = $object->id;
256
257 $candidature->ip = getUserRemoteIP();
258
259 // Test MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS
260 $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
261
262 if (checkNbPostsForASpeceificIp($candidature, $nb_post_max) <= 0) {
263 $error++;
264 $errmsg .= implode('<br>', $candidature->errors);
265 }
266
267 // Fill array 'array_options' with data from add form
268 $extrafields->fetch_name_optionals_label($candidature->table_element);
269 $ret = $extrafields->setOptionalsFromPost(null, $candidature);
270 if ($ret < 0) {
271 $error++;
272 $errmsg .= $candidature->error;
273 }
274
275 if (!$error) {
276 $result = $candidature->create($user);
277 if ($result <= 0) {
278 $error++;
279 $errmsg .= implode('<br>', $candidature->errors);
280 }
281 }
282 if (!$error) {
283 $result = $candidature->validate($user);
284 if ($result <= 0) {
285 $error++;
286 $errmsg .= implode('<br>', $candidature->errors);
287 }
288 }
289 }
290
291 if (!$error) {
292 $db->commit();
293 setEventMessages($langs->trans("RecruitmentCandidatureSaved"), null);
294 header("Location: " . $backtopage);
295 exit;
296 } else {
297 $db->rollback();
298 $action = "view";
299 }
300}
301
302// Actions to send emails (for ticket, we need to manage the addfile and removefile only)
303$triggersendname = 'CANDIDATURE_SENTBYMAIL';
304$paramname = 'id';
305$autocopy = 'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO'; // used to know the automatic BCC to add
306$trackid = 'recruitmentcandidature'.$object->id;
307include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
308
309
310/*
311 * View
312 */
313
314$form = new Form($db);
315$now = dol_now();
316
317$head = '';
318if (getDolGlobalString('MAIN_RECRUITMENT_CSS_URL')) {
319 $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_RECRUITMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
320}
321
322$conf->dol_hide_topmenu = 1;
323$conf->dol_hide_leftmenu = 1;
324
325if (!getDolGlobalInt('RECRUITMENT_ENABLE_PUBLIC_INTERFACE')) {
326 $langs->load("errors");
327 print '<div class="error">'.$langs->trans('ErrorPublicInterfaceNotEnabled').'</div>';
328 $db->close();
329 exit();
330}
331
332$arrayofjs = array();
333$arrayofcss = array();
334
335$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
336llxHeader($head, $langs->trans("PositionToBeFilled"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1, 1);
337dol_htmloutput_errors($errmsg);
338
339print '<span id="dolpaymentspan"></span>'."\n";
340print '<div class="center">'."\n";
341print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
342print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
343print '<input type="hidden" name="action" value="dosubmit">'."\n";
344print '<input type="hidden" name="tag" value="'.GETPOST("tag", 'alpha').'">'."\n";
345print '<input type="hidden" name="suffix" value="'.$suffix.'">'."\n";
346print '<input type="hidden" name="securekey" value="'.$SECUREKEY.'">'."\n";
347print '<input type="hidden" name="entity" value="'.$entity.'" />';
348print "\n";
349print '<!-- Form to view job -->'."\n";
350
351// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
352// Define logo and logosmall
353$logosmall = $mysoc->logo_small;
354$logo = $mysoc->logo;
355$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
356if (getDolGlobalString($paramlogo)) {
357 $logosmall = getDolGlobalString($paramlogo);
358} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
359 $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO');
360}
361//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
362// Define urllogo
363$urllogo = '';
364$urllogofull = '';
365if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) {
366 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall);
367 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
368} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) {
369 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo);
370 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
371}
372// Output html code for logo
373if ($urllogo) {
374 print '<div class="backgreypublicpayment">';
375 print '<div class="logopublicpayment">';
376 if (!empty($mysoc->url)) {
377 print '<a href="'.$mysoc->url.'" target="_blank" rel="noopener">';
378 }
379 print '<img id="dolpaymentlogo" src="'.$urllogofull.'">';
380 if (!empty($mysoc->url)) {
381 print '</a>';
382 }
383 print '</div>';
384 if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) {
385 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>';
386 }
387 print '</div>';
388}
389
390if (getDolGlobalString('RECRUITMENT_IMAGE_PUBLIC_INTERFACE')) {
391 print '<div class="backimagepublicrecruitment">';
392 print '<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('RECRUITMENT_IMAGE_PUBLIC_INTERFACE').'">';
393 print '</div>';
394}
395
396
397print '<table id="dolpaymenttable" summary="Job position offer" class="center">'."\n";
398
399// Output introduction text
400$text = '';
401if (getDolGlobalString('RECRUITMENT_NEWFORM_TEXT')) {
402 $reg = array();
403 if (preg_match('/^\‍((.*)\‍)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
404 $text .= $langs->trans($reg[1])."<br>\n";
405 } else {
406 $text .= getDolGlobalString('RECRUITMENT_NEWFORM_TEXT') . "<br>\n";
407 }
408 $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
409}
410if (empty($text)) {
411 $text .= '<tr><td class="textpublicpayment" colspan=2><br>'.$langs->trans("JobOfferToBeFilled", $mysoc->name);
412 $text .= ' &nbsp; - &nbsp; <strong>'.$mysoc->name.'</strong>';
413 $text .= ' &nbsp; - &nbsp; <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation).'</span>';
414 $text .= '</td></tr>'."\n";
415 $text .= '<tr><td class="textpublicpayment" colspan=2><h1 class="paddingleft paddingright">'.$object->label.'</h1><br></td></tr>'."\n";
416}
417print $text;
418
419// Output payment summary form
420print '<tr><td class="left" colspan=2>';
421
422print '<div with="100%" id="tablepublicpayment">';
423print '<div class="opacitymedium">'.$langs->trans("ThisIsInformationOnJobPosition").' :</div>'."\n";
424
425$error = 0;
426$found = true;
427
428print '<br>';
429
430// Label
431print $langs->trans("Label").' : ';
432print '<b>'.dol_escape_htmltag($object->label).'</b><br>';
433
434// Date
435print $langs->trans("DateExpected").' : ';
436print '<b>';
437if ($object->date_planned > $now) {
438 print dol_print_date($object->date_planned, 'day');
439} else {
440 print $langs->trans("ASAP");
441}
442print '</b><br>';
443
444// Remuneration
445print $langs->trans("Remuneration").' : ';
446print '<b>';
447print dol_escape_htmltag($object->remuneration_suggested);
448print '</b><br>';
449
450// Contact
451$tmpuser = new User($db);
452$tmpuser->fetch($object->fk_user_recruiter);
453
454print $langs->trans("ContactForRecruitment").' : ';
455$emailforcontact = $object->email_recruiter;
456if (empty($emailforcontact)) {
457 $emailforcontact = $tmpuser->email ?? '';
458 if (empty($emailforcontact)) {
459 $emailforcontact = $mysoc->email ?? '';
460 }
461}
462print '<b class="wordbreak">';
463print $tmpuser->getFullName($langs);
464print ' &nbsp; '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0, 'envelope');
465print '</b>';
466print '</b><br>';
467
469 print info_admin($langs->trans("JobClosedTextCandidateFound"), 0, 0, '0', 'warning');
470}
472 print info_admin($langs->trans("JobClosedTextCanceled"), 0, 0, '0', 'warning');
473}
474
475print '<br>';
476
477// Description
478
479$text = $object->description;
480print $text;
481print '<input type="hidden" name="ref" value="'.$object->ref.'">';
482
483print '</div>'."\n";
484print "\n";
485
486
487if ($action != 'dosubmit') {
488 if ($found && !$error) {
489 // We are in a management option and no error
490 print '</td></tr>'."\n";
491 print '<tr><td class="titlefieldcreate fieldrequired left">'.$langs->trans("Lastname").'</td><td class="left">';
492 print '<input type="text" class="flat minwidth400 --success" name="lastname" maxlength="128" value="'.$lastname.'">';
493 print '</td></tr>'."\n";
494
495 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Firstname").'</td><td class="left">';
496 print '<input type="text" class="flat minwidth400 --success" name="firstname" maxlength="128" value="'.$firstname.'">';
497 print '</td></tr>'."\n";
498
499 print '<tr><td class="titlefieldcreate fieldrequired left">'.$langs->trans("Email").'</td><td class="left">';
500 print img_picto("", "email", 'class="pictofixedwidth"').'<input type="text" class="flat minwidth100 --success" name="email" value="'.$email.'">';
501 print '</td></tr>'."\n";
502
503 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Phone").'</td><td class="left">';
504 print $form->showPhoneInput($phone, 'phone', 0, 'phone', 'flat minwidth100 --success');
505 print '</td></tr>'."\n";
506
507 print '<tr><td class="titlefieldcreate left minwidth300">'.$langs->trans("DateOfBirth").'</td><td class="left">';
508 print $form->selectDate($birthday, 'birthday', 0, 0, 1, "", 1, 0);
509 print '</td></tr>'."\n";
510
511 print '<tr><td class="titlefieldcreate left">'.$langs->trans("RequestedRemuneration").'</td><td class="left">';
512 print '<input type="text" class="flat minwidth100 --success" name="requestedremuneration" value="'.$requestedremuneration.'">';
513 print '</td></tr>'."\n";
514
515 // Other attributes
517 $parameters = array();
518 $parameters['tpl_context'] = 'public'; // define template context to public
519 $parameters['tdclass'] = 'left';
520 $extrafields->fetch_name_optionals_label("recruitment_recruitmentcandidature");
521 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
522
523 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Message").'</td><td class="left">';
524 print '<textarea class="flat quatrevingtpercent" rows="'.ROWS_5.'" name="message">'.$message.'</textarea>';
525 print '</td></tr>'."\n";
526
527 // Display Captcha code if is enabled
528 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT') && is_object($captchaobj)) {
529 print '<tr><td class="titlefield"><label><span class="fieldrequired">'.$langs->trans($captchaobj->getFieldInputTitle()).'</span></label></td><td><br>';
530 if (method_exists($captchaobj, 'getCaptchaCodeForForm')) {
531 print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod
532 } else {
533 print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()';
534 }
535 print '<br></td></tr>';
536 }
537 print '<tr><td colspan=2>';
538 print $form->buttonsSaveCancel('Submit', 'Cancel');
539 print '</td></tr>'."\n";
540 } else {
541 dol_print_error_email('ERRORSUBMITAPPLICATION');
542 }
543} else {
544 // Print
545}
546
547print '</td></tr>'."\n";
548
549print '</table>'."\n";
550
551print '</form>'."\n";
552print '</div>'."\n";
553print '<br>';
554
555
557
558llxFooter('', 'public');
559
560$db->close();
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
global $dolibarr_main_url_root
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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.
Definition wrapper.php:73
Class to manage standard extra fields.
Class to manage generation of HTML components Only common components must be here.
Class for RecruitmentCandidature.
Class for RecruitmentJobPosition.
Class to manage Dolibarr users.
htmlPrintOnlineFooter($fromcompany, $langs, $addformmessage=0, $suffix='', $object=null)
Show footer of company in HTML public pages.
global $mysoc
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
dol_now($mode='gmt')
Return date for now.
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0, $nodefault=0)
Return value of a param into GET or POST supervariable.
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
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).
getUserRemoteIP($trusted=0)
Return the real IP of remote user.
isValidEmail($address, $acceptsupervisorkey=0, $acceptuserkey=0)
Return true if email syntax is ok.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
dol_print_error_email($prefixcode, $errormessage='', $errormessages=array(), $morecss='error', $email='')
Show a public email and error code to contact if technical error.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
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)
Definition html.lib.php:181
checkNbPostsForASpeceificIp($object, $nb_post_max)
Check if the object exceeded the number of posts for a specific ip in the same week.
httponly_accessforbidden($message='1', $http_response_code=403, $stringalreadysanitized=0)
Show a message to say access is forbidden and stop program.