27 require_once
"../../main.inc.php";
28 require_once DOL_DOCUMENT_ROOT .
"/core/lib/admin.lib.php";
29 require_once DOL_DOCUMENT_ROOT .
"/webportal/lib/webportal.lib.php";
32 $langs->loadLangs(array(
"admin",
"hrm",
"other",
"website"));
35 $hookmanager->initHooks(array(
'webportalsetup',
'globalsetup'));
38 $action =
GETPOST(
'action',
'aZ09');
39 $backtopage =
GETPOST(
'backtopage',
'alpha');
55 $parameters = array();
56 $reshook = $hookmanager->executeHooks(
'doActions', $parameters,
$object, $action);
63 if (preg_match(
'/^(set|del)_([A-Z_]+)$/', $action, $regs)) {
64 if ($regs[1] ==
'set') {
71 if ($action ==
'updatecss') {
72 dolibarr_set_const($db,
"WEBPORTAL_CUSTOM_CSS",
GETPOST(
'WEBPORTAL_CUSTOM_CSS',
'restricthtml'),
'chaine', 0,
'', $conf->entity);
73 dolibarr_set_const($db,
"WEBPORTAL_PARAMS_REV", ((
int) $conf->global->WEBPORTAL_PARAMS_REV) + 1,
'chaine', 0,
'', $conf->entity);
81 $title =
"WebPortalSetup";
83 $wikihelp =
'EN:First_setup|FR:Premiers_paramétrages|ES:Primeras_configuraciones';
87 $langs->trans($title),
93 '/includes/ace/src/ace.js',
94 '/includes/ace/src/ext-statusbar.js',
95 '/includes/ace/src/ext-language_tools.js',
101 $linkback =
'<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT .
'/admin/modules.php?restore_lastsearch_values=1') .
'">' . $langs->trans(
"BackToModuleList") .
'</a>';
110 echo
'<span class="opacitymedium">' . $langs->trans(
"WebPortalCSS") .
'</span><br><br>';
113 require_once DOL_DOCUMENT_ROOT .
'/core/class/doleditor.class.php';
115 print
'<form enctype="multipart/form-data" method="POST" action="' . $_SERVER[
"PHP_SELF"] .
'">';
117 print
'<input type="hidden" name="token" value="' .
newToken() .
'">';
118 print
'<input type="hidden" name="action" value="updatecss">';
123 print
'<div class="div-table-responsive-no-min">';
124 print
'<table summary="edit" class="noborder centpercent editmode tableforfield">';
126 print
'<tr class="liste_titre">';
127 print
'<td colspan="2">';
131 $doleditor =
new DolEditor(
'WEBPORTAL_CUSTOM_CSS', $customcssValue,
'80%', 400,
'Basic',
'In',
true,
false,
'ace', 10,
'90%');
132 $doleditor->Create(0,
'',
true,
'css',
'css');
133 print
'</td></tr>' .
"\n";
135 print
'</table>' .
"\n";
138 print
'<div class="center">';
139 print
'<input class="button button-save reposition buttonforacesave" type="submit" name="submit" value="' . $langs->trans(
"Save") .
'">';
if($user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
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).
dolibarr_del_const($db, $name, $entity=1)
Delete a constant.
if(GETPOSTISSET('MAIN_AGENDA_XCAL_EXPORTKEY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_PAST_DELAY')) if(GETPOSTISSET('MAIN_AGENDA_EXPORT_CACHE')) if(GETPOSTISSET('AGENDA_EXPORT_FIX_TZ')) if($actionsave) if(!isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $wikihelp
View.
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Class to manage a WYSIWYG editor.
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
newToken()
Return the value of token currently saved into session with name 'newtoken'.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0)
Set event messages in dol_events session object.
getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
webportalAdminPrepareHead()
Prepare admin pages header.