27 require
'../../main.inc.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/recruitment/lib/recruitment.lib.php';
32 $langs->loadLangs(array(
"admin",
"recruitment"));
34 $action =
GETPOST(
'action',
'aZ09');
45 if ($action ==
'setRECRUITMENT_ENABLE_PUBLIC_INTERFACE') {
47 else dolibarr_set_const($db,
'RECRUITMENT_ENABLE_PUBLIC_INTERFACE', 0,
'chaine', 0,
'', $conf->entity);
50 if ($action ==
'update') {
51 $public =
GETPOST(
'RECRUITMENT_ENABLE_PUBLIC_INTERFACE');
53 $res =
dolibarr_set_const($db,
"RECRUITMENT_ENABLE_PUBLIC_INTERFACE", $public,
'chaine', 0,
'', $conf->entity);
55 if (!($res > 0)) $error++;
69 $form =
new Form($db);
73 llxHeader(
'', $langs->trans(
"RecruitmentSetup"), $help_url);
76 $linkback =
'<a href="'.DOL_URL_ROOT.
'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans(
"BackToModuleList").
'</a>';
83 print '<form action="'.$_SERVER[
"PHP_SELF"].
'" method="post">';
84 print '<input type="hidden" name="action" value="update">';
85 print '<input type="hidden" name="token" value="'.newToken().
'">';
90 print '<span class="opacitymedium">'.$langs->trans(
"PublicInterfaceRecruitmentDesc").
'</span><br><br>';
93 $enabledisablehtml = $langs->trans(
"EnablePublicRecruitmentPages").
' ';
94 if (empty($conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE)) {
96 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setRECRUITMENT_ENABLE_PUBLIC_INTERFACE&token='.
newToken().
'&value=1'.$param.
'">';
97 $enabledisablehtml .=
img_picto($langs->trans(
"Disabled"),
'switch_off');
98 $enabledisablehtml .=
'</a>';
101 $enabledisablehtml .=
'<a class="reposition valignmiddle" href="'.$_SERVER[
"PHP_SELF"].
'?action=setRECRUITMENT_ENABLE_PUBLIC_INTERFACE&token='.
newToken().
'&value=0'.$param.
'">';
102 $enabledisablehtml .=
img_picto($langs->trans(
"Activated"),
'switch_on');
103 $enabledisablehtml .=
'</a>';
105 print $enabledisablehtml;
106 print '<input type="hidden" id="RECRUITMENT_ENABLE_PUBLIC_INTERFACE" name="RECRUITMENT_ENABLE_PUBLIC_INTERFACE" value="'.(empty($conf->global->RECRUITMENT_ENABLE_PUBLIC_INTERFACE) ? 0 : 1).
'">';
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dolibarr_set_const($db, $name, $value, $type= 'chaine', $visible=0, $note= '', $entity=1)
Insert a parameter (key,value) into database (delete old key then insert it again).
setEventMessages($mesg, $mesgs, $style= 'mesgs', $messagekey= '')
Set event messages in dol_events session object.
load_fiche_titre($titre, $morehtmlright= '', $picto= 'generic', $pictoisfullpath=0, $id= '', $morecssontable= '', $morehtmlcenter= '')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
accessforbidden($message= '', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program Calling this function terminate execution ...
recruitmentAdminPrepareHead()
Prepare admin pages header.
dol_get_fiche_head($links=array(), $active= '', $title= '', $notab=0, $picto= '', $pictoisfullpath=0, $morehtmlright= '', $morecss= '', $limittoshow=0, $moretabssuffix= '')
Show tabs of a record.
print
Draft customers invoices.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
dol_get_fiche_end($notab=0)
Return tab footer of a card.