dolibarr 23.0.4
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-2025 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));
43if (is_numeric($entity)) {
44 define("DOLENTITY", $entity);
45}
46
47// Load Dolibarr environment
48require '../../main.inc.php';
60require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentjobposition.class.php';
61require_once DOL_DOCUMENT_ROOT.'/recruitment/class/recruitmentcandidature.class.php';
62require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
63require_once DOL_DOCUMENT_ROOT.'/core/lib/security.lib.php';
64require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
65require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
66require_once DOL_DOCUMENT_ROOT . '/core/lib/public.lib.php';
67require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
68
69
70// Load translation files required by the page
71$langs->loadLangs(array("companies", "other", "recruitment", "mails"));
72
73// Get parameters
74$action = GETPOST('action', 'aZ09');
75$cancel = GETPOST('cancel', 'alpha');
76$email = GETPOST('email', 'alpha');
77$firstname = GETPOST('firstname', 'alpha');
78$lastname = GETPOST('lastname', 'alpha');
79$birthday = GETPOST('birthday', 'alpha');
80$phone = GETPOST('phone', 'alpha');
81$message = GETPOST('message', 'alpha');
82$SECUREKEY = GETPOST("securekey");
83$requestedremuneration = GETPOST('requestedremuneration', 'alpha');
84$suffix = GETPOST("suffix", 'alpha');
85
86$ref = GETPOST('ref', 'alpha');
87
88if (GETPOST('btn_view')) {
89 unset($_SESSION['email_customer']);
90}
91if (isset($_SESSION['email_customer'])) {
92 $email = $_SESSION['email_customer'];
93}
94
96
97if (!$ref) {
98 print $langs->trans('ErrorBadParameters')." - ref missing";
99 exit;
100}
101
102
103// Define $urlwithroot
104// $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
105// $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
106$urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
107$backtopage = $urlwithroot.'/public/recruitment/index.php';
108
109// Security check
110if (!isModEnabled("recruitment")) {
111 httponly_accessforbidden('Module Recruitment not enabled');
112}
113
114// Done before the actions, so no application can be recorded when the public interface is disabled
115if (!getDolGlobalInt('RECRUITMENT_ENABLE_PUBLIC_INTERFACE')) {
116 $langs->load("errors");
117 print '<div class="error">'.$langs->trans('ErrorPublicInterfaceNotEnabled').'</div>';
118 $db->close();
119 exit();
120}
121
122$object->fetch(0, $ref);
123if (!is_object($user)) {
124 $user = new User($db);
125}
126
127// A draft job position is not published, it must not be shown nor receive applications
128if ($object->id <= 0 || $object->status == RecruitmentJobPosition::STATUS_DRAFT) {
129 $langs->load("errors");
130 httponly_accessforbidden($langs->trans('ErrorRecordNotFound'), 404);
131}
132$user->loadDefaultValues();
133$errmsg = "";
134
135$extrafields = new ExtraFields($db);
136
137$captchaobj = null;
138if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT')) {
139 require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
140 $captcha = getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_HANDLER', 'standard');
141 // List of directories where we can find captcha handlers
142 $dirModCaptcha = array_merge(
143 array(
144 'main' => '/core/modules/security/captcha/'
145 ),
146 is_array($conf->modules_parts['captcha']) ? $conf->modules_parts['captcha'] : array()
147 );
148 $fullpathclassfile = '';
149 foreach ($dirModCaptcha as $dir) {
150 $fullpathclassfile = dol_buildpath($dir."modCaptcha".ucfirst($captcha).'.class.php', 0, 2);
151 if ($fullpathclassfile) {
152 break;
153 }
154 }
155 if ($fullpathclassfile) {
156 include_once $fullpathclassfile;
157 // Charging the numbering class
158 $classname = "modCaptcha".ucfirst($captcha);
159 if (class_exists($classname)) {
160 $captchaobj = new $classname($db, $conf, $langs, $user);
161 '@phan-var-force ModeleCaptcha $captchaobj';
163 } else {
164 print 'Error, the captcha handler class '.$classname.' was not found after the include';
165 }
166 } else {
167 print 'Error, the captcha handler '.$captcha.' has no class file found modCaptcha'.ucfirst($captcha);
168 }
169}
170
171/*
172 * Actions
173 */
174
175if ($cancel) {
176 if (!empty($backtopage)) {
177 header("Location: ".$backtopage);
178 exit;
179 }
180}
181
182if ($action == "dosubmit") { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls)
183 $error = 0;
184 $db->begin();
185 if (!strlen($ref)) {
186 $error++;
187 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Ref")));
188 $action = 'view';
189 }
190 // Only a job position still open can receive an application
192 $error++;
193 array_push($object->errors, $langs->trans($object->status == RecruitmentJobPosition::STATUS_RECRUITED ? "JobClosedTextCandidateFound" : "JobClosedTextCanceled"));
194 $action = 'view';
195 }
196 if (!strlen($email)) {
197 $error++;
198 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Email")));
199 $action = 'view';
200 } else {
201 if (!isValidEmail($email)) {
202 $error++;
203 array_push($object->errors, $langs->trans("ErrorEmailInvalid"));
204 $action = 'view';
205 }
206 }
207 if (!strlen($lastname)) {
208 $error++;
209 array_push($object->errors, $langs->trans("ErrorFieldRequired", $langs->transnoentities("Lastname")));
210 $action = 'view';
211 }
212
213 // Check Captcha code if is enabled
214 $ok = false;
215 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT') && is_object($captchaobj)) {
216 if (method_exists($captchaobj, 'validateCodeAfterLoginSubmit')) {
217 $ok = $captchaobj->validateCodeAfterLoginSubmit(); // @phan-suppress-current-line PhanUndeclaredMethod
218 } else {
219 print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method validateCodeAfterLoginSubmit()';
220 }
221 if (!$ok) {
222 $error++;
223 $langs->load('errors');
224 array_push($object->errors, $langs->trans("ErrorBadValueForCode"));
225 $action = 'view';
226 }
227 }
228 if (!$error) {
229 $sql = "SELECT rrc.rowid FROM ".MAIN_DB_PREFIX."recruitment_recruitmentcandidature as rrc";
230 $sql .= " WHERE rrc.email = '". $db->escape($email)."'";
231 $sql .= " AND rrc.entity IN (". getEntity($object->element, 0).")";
232 $resql = $db->query($sql);
233 if ($resql) {
234 $num = $db->num_rows($resql);
235 if ($num > 0) {
236 $error++;
237 setEventMessages($langs->trans("ErrorRecruitmmentCandidatureAlreadyExists", $email), null, 'errors');
238 }
239 } else {
240 dol_print_error($db);
241 $error++;
242 }
243 } else {
244 setEventMessages($object->error, $object->errors, 'errors');
245 }
246
247 if (!$error) { // Test on permission not required here (anonymous action protected by mitigation of /public/... urls)
248 $candidature = new RecruitmentCandidature($db);
249
250 $candidature->firstname = GETPOST('firstname', 'alpha');
251 $candidature->lastname = GETPOST('lastname', 'alpha');
252 $candidature->email = GETPOST('email', 'alpha');
253 $candidature->phone = GETPOST('phone', 'alpha');
254 $candidature->date_birth = GETPOST('birthday', 'alpha');
255 $candidature->requestedremuneration = GETPOST('requestedremuneration', 'alpha');
256 $candidature->description = GETPOST('message', 'alpha');
257 $candidature->fk_recruitmentjobposition = $object->id;
258
259 $candidature->ip = getUserRemoteIP();
260
261 // Test MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS
262 $nb_post_max = getDolGlobalInt("MAIN_SECURITY_MAX_POST_ON_PUBLIC_PAGES_BY_IP_ADDRESS", 200);
263
264 if (checkNbPostsForASpeceificIp($candidature, $nb_post_max) <= 0) {
265 $error++;
266 $errmsg .= implode('<br>', $candidature->errors);
267 }
268
269 // Fill array 'array_options' with data from add form
270 $extrafields->fetch_name_optionals_label($candidature->table_element);
271 $ret = $extrafields->setOptionalsFromPost(null, $candidature);
272 if ($ret < 0) {
273 $error++;
274 $errmsg .= $candidature->error;
275 }
276
277 if (!$error) {
278 $result = $candidature->create($user);
279 if ($result <= 0) {
280 $error++;
281 $errmsg .= implode('<br>', $candidature->errors);
282 }
283 }
284 if (!$error) {
285 $candidature->validate($user);
286 if ($result <= 0) {
287 $error++;
288 $errmsg .= implode('<br>', $candidature->errors);
289 }
290 }
291 }
292
293 if (!$error) {
294 $db->commit();
295 setEventMessages($langs->trans("RecruitmentCandidatureSaved"), null);
296 header("Location: " . $backtopage);
297 exit;
298 } else {
299 $db->rollback();
300 $action = "view";
301 }
302}
303
304// Actions to send emails (for ticket, we need to manage the addfile and removefile only)
305$triggersendname = 'CANDIDATURE_SENTBYMAIL';
306$paramname = 'id';
307$autocopy = 'MAIN_MAIL_AUTOCOPY_CANDIDATURE_TO'; // used to know the automatic BCC to add
308$trackid = 'recruitmentcandidature'.$object->id;
309include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
310
311
312/*
313 * View
314 */
315
316$form = new Form($db);
317$now = dol_now();
318
319$head = '';
320if (getDolGlobalString('MAIN_RECRUITMENT_CSS_URL')) {
321 $head = '<link rel="stylesheet" type="text/css" href="' . getDolGlobalString('MAIN_RECRUITMENT_CSS_URL').'?lang='.$langs->defaultlang.'">'."\n";
322}
323
324$conf->dol_hide_topmenu = 1;
325$conf->dol_hide_leftmenu = 1;
326
327if (!getDolGlobalInt('RECRUITMENT_ENABLE_PUBLIC_INTERFACE')) {
328 $langs->load("errors");
329 print '<div class="error">'.$langs->trans('ErrorPublicInterfaceNotEnabled').'</div>';
330 $db->close();
331 exit();
332}
333
334$arrayofjs = array();
335$arrayofcss = array();
336
337$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
338llxHeader($head, $langs->trans("PositionToBeFilled"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1, 1);
339dol_htmloutput_errors($errmsg);
340
341print '<span id="dolpaymentspan"></span>'."\n";
342print '<div class="center">'."\n";
343print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
344print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
345print '<input type="hidden" name="action" value="dosubmit">'."\n";
346print '<input type="hidden" name="tag" value="'.GETPOST("tag", 'alpha').'">'."\n";
347print '<input type="hidden" name="suffix" value="'.$suffix.'">'."\n";
348print '<input type="hidden" name="securekey" value="'.$SECUREKEY.'">'."\n";
349print '<input type="hidden" name="entity" value="'.$entity.'" />';
350print "\n";
351print '<!-- Form to view job -->'."\n";
352
353// 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)
354// Define logo and logosmall
355$logosmall = $mysoc->logo_small;
356$logo = $mysoc->logo;
357$paramlogo = 'ONLINE_RECRUITMENT_LOGO_'.$suffix;
358if (getDolGlobalString($paramlogo)) {
359 $logosmall = getDolGlobalString($paramlogo);
360} elseif (getDolGlobalString('ONLINE_RECRUITMENT_LOGO')) {
361 $logosmall = getDolGlobalString('ONLINE_RECRUITMENT_LOGO');
362}
363//print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
364// Define urllogo
365$urllogo = '';
366$urllogofull = '';
367if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) {
368 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall);
369 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
370} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) {
371 $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo);
372 $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
373}
374// Output html code for logo
375if ($urllogo) {
376 print '<div class="backgreypublicpayment">';
377 print '<div class="logopublicpayment">';
378 if (!empty($mysoc->url)) {
379 print '<a href="'.$mysoc->url.'" target="_blank" rel="noopener">';
380 }
381 print '<img id="dolpaymentlogo" src="'.$urllogofull.'">';
382 if (!empty($mysoc->url)) {
383 print '</a>';
384 }
385 print '</div>';
386 if (!getDolGlobalString('MAIN_HIDE_POWERED_BY')) {
387 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>';
388 }
389 print '</div>';
390}
391
392if (getDolGlobalString('RECRUITMENT_IMAGE_PUBLIC_INTERFACE')) {
393 print '<div class="backimagepublicrecruitment">';
394 print '<img id="idRECRUITMENT_IMAGE_PUBLIC_INTERFACE" src="' . getDolGlobalString('RECRUITMENT_IMAGE_PUBLIC_INTERFACE').'">';
395 print '</div>';
396}
397
398
399print '<table id="dolpaymenttable" summary="Job position offer" class="center">'."\n";
400
401// Output introduction text
402$text = '';
403if (getDolGlobalString('RECRUITMENT_NEWFORM_TEXT')) {
404 $reg = array();
405 if (preg_match('/^\‍((.*)\‍)$/', $conf->global->RECRUITMENT_NEWFORM_TEXT, $reg)) {
406 $text .= $langs->trans($reg[1])."<br>\n";
407 } else {
408 $text .= getDolGlobalString('RECRUITMENT_NEWFORM_TEXT') . "<br>\n";
409 }
410 $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
411}
412if (empty($text)) {
413 $text .= '<tr><td class="textpublicpayment" colspan=2><br>'.$langs->trans("JobOfferToBeFilled", $mysoc->name);
414 $text .= ' &nbsp; - &nbsp; <strong>'.$mysoc->name.'</strong>';
415 $text .= ' &nbsp; - &nbsp; <span class="nowraponall"><span class="fa fa-calendar secondary"></span> '.dol_print_date($object->date_creation).'</span>';
416 $text .= '</td></tr>'."\n";
417 $text .= '<tr><td class="textpublicpayment" colspan=2><h1 class="paddingleft paddingright">'.$object->label.'</h1><br></td></tr>'."\n";
418}
419print $text;
420
421// Output payment summary form
422print '<tr><td class="left" colspan=2>';
423
424print '<div with="100%" id="tablepublicpayment">';
425print '<div class="opacitymedium">'.$langs->trans("ThisIsInformationOnJobPosition").' :</div>'."\n";
426
427$error = 0;
428$found = true;
429
430print '<br>';
431
432// Label
433print $langs->trans("Label").' : ';
434print '<b>'.dol_escape_htmltag($object->label).'</b><br>';
435
436// Date
437print $langs->trans("DateExpected").' : ';
438print '<b>';
439if ($object->date_planned > $now) {
440 print dol_print_date($object->date_planned, 'day');
441} else {
442 print $langs->trans("ASAP");
443}
444print '</b><br>';
445
446// Remuneration
447print $langs->trans("Remuneration").' : ';
448print '<b>';
449print dol_escape_htmltag($object->remuneration_suggested);
450print '</b><br>';
451
452// Contact
453$tmpuser = new User($db);
454$tmpuser->fetch($object->fk_user_recruiter);
455
456print $langs->trans("ContactForRecruitment").' : ';
457$emailforcontact = $object->email_recruiter;
458if (empty($emailforcontact)) {
459 $emailforcontact = $tmpuser->email ?? '';
460 if (empty($emailforcontact)) {
461 $emailforcontact = $mysoc->email ?? '';
462 }
463}
464print '<b class="wordbreak">';
465print $tmpuser->getFullName($langs);
466print ' &nbsp; '.dol_print_email($emailforcontact, 0, 0, 1, 0, 0, 'envelope');
467print '</b>';
468print '</b><br>';
469
471 print info_admin($langs->trans("JobClosedTextCandidateFound"), 0, 0, '0', 'warning');
472}
474 print info_admin($langs->trans("JobClosedTextCanceled"), 0, 0, '0', 'warning');
475}
476
477print '<br>';
478
479// Description
480
481$text = $object->description;
482print $text;
483print '<input type="hidden" name="ref" value="'.$object->ref.'">';
484
485print '</div>'."\n";
486print "\n";
487
488
489if ($action != 'dosubmit') {
490 if ($found && !$error) {
491 // We are in a management option and no error
492 print '</td></tr>'."\n";
493 print '<tr><td class="titlefieldcreate fieldrequired left">'.$langs->trans("Lastname").'</td><td class="left">';
494 print '<input type="text" class="flat minwidth400 --success" name="lastname" maxlength="128" value="'.$lastname.'">';
495 print '</td></tr>'."\n";
496
497 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Firstname").'</td><td class="left">';
498 print '<input type="text" class="flat minwidth400 --success" name="firstname" maxlength="128" value="'.$firstname.'">';
499 print '</td></tr>'."\n";
500
501 print '<tr><td class="titlefieldcreate fieldrequired left">'.$langs->trans("Email").'</td><td class="left">';
502 print img_picto("", "email", 'class="pictofixedwidth"').'<input type="text" class="flat minwidth100 --success" name="email" value="'.$email.'">';
503 print '</td></tr>'."\n";
504
505 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Phone").'</td><td class="left">';
506 print img_picto("", "phone", 'class="pictofixedwidth"').'<input type="text" class="flat minwidth100 --success" name="phone" value="'.$phone.'">';
507 print '</td></tr>'."\n";
508
509 print '<tr><td class="titlefieldcreate left minwidth300">'.$langs->trans("DateOfBirth").'</td><td class="left">';
510 print $form->selectDate($birthday, 'birthday', 0, 0, 1, "", 1, 0);
511 print '</td></tr>'."\n";
512
513 print '<tr><td class="titlefieldcreate left">'.$langs->trans("RequestedRemuneration").'</td><td class="left">';
514 print '<input type="text" class="flat minwidth100 --success" name="requestedremuneration" value="'.$requestedremuneration.'">';
515 print '</td></tr>'."\n";
516
517 // Other attributes
519 $parameters['tpl_context'] = 'public'; // define template context to public
520 $parameters['tdclass'] = 'left';
521 $extrafields->fetch_name_optionals_label("recruitment_recruitmentcandidature");
522 include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php';
523
524 print '<tr><td class="titlefieldcreate left">'.$langs->trans("Message").'</td><td class="left">';
525 print '<textarea class="flat quatrevingtpercent" rows="'.ROWS_5.'" name="message">'.$message.'</textarea>';
526 print '</td></tr>'."\n";
527
528 // Display Captcha code if is enabled
529 if (getDolGlobalString('MAIN_SECURITY_ENABLECAPTCHA_RECRUITMENT') && is_object($captchaobj)) {
530 print '<tr><td class="titlefield"><label><span class="fieldrequired">'.$langs->trans($captchaobj->getFieldInputTitle()).'</span></label></td><td><br>';
531 if (method_exists($captchaobj, 'getCaptchaCodeForForm')) {
532 print $captchaobj->getCaptchaCodeForForm(''); // @phan-suppress-current-line PhanUndeclaredMethod
533 } else {
534 print 'Error, the captcha handler '.get_class($captchaobj).' does not have any method getCaptchaCodeForForm()';
535 }
536 print '<br></td></tr>';
537 }
538 print '<tr><td colspan=2>';
539 print $form->buttonsSaveCancel('Submit', 'Cancel');
540 print '</td></tr>'."\n";
541 } else {
542 dol_print_error_email('ERRORSUBMITAPPLICATION');
543 }
544} else {
545 // Print
546}
547
548print '</td></tr>'."\n";
549
550print '</table>'."\n";
551
552print '</form>'."\n";
553print '</div>'."\n";
554print '<br>';
555
556
558
559llxFooter('', 'public');
560
561$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
dol_now($mode='gmt')
Return date for now.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2, $allowothertags=array())
Show picto whatever it's its name (generic function)
getDolGlobalInt($key, $default=0)
Return a Dolibarr global constant int value.
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_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.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
info_admin($text, $infoonimgalt=0, $nodiv=0, $admin='1', $morecss='hideonsmartphone', $textfordropdown='', $picto='')
Show information in HTML for admin users or standard users.
dol_htmloutput_errors($mesgstring='', $mesgarray=array(), $keepembedded=0)
Print formatted error messages to output (Used to show messages on html output).
getEntity($element, $shared=1, $currentobject=null)
Get list of entity id to use.
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...
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.