25 require
'../main.inc.php';
26 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formadmin.class.php';
27 require_once DOL_DOCUMENT_ROOT.
'/core/class/html.formcompany.class.php';
28 require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
29 require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
30 require_once DOL_DOCUMENT_ROOT.
'/core/lib/website.lib.php';
31 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
32 require_once DOL_DOCUMENT_ROOT.
'/core/class/doleditor.class.php';
33 require_once DOL_DOCUMENT_ROOT.
'/website/class/website.class.php';
36 $langs->loadLangs(array(
'errors',
'admin',
'companies',
'website'));
38 $action =
GETPOST(
'action',
'alpha') ?
GETPOST(
'action',
'alpha') :
'view';
39 $confirm =
GETPOST(
'confirm',
'alpha');
40 $backtopage =
GETPOST(
'backtopage',
'alpha');
42 $rowid =
GETPOST(
'rowid',
'alpha');
51 $limit =
GETPOST(
'limit',
'int') ?
GETPOST(
'limit',
'int') : $conf->liste_limit;
52 $sortfield =
GETPOST(
'sortfield',
'aZ09comma');
53 $sortorder =
GETPOST(
'sortorder',
'aZ09comma');
55 if (empty($page) || $page == -1) {
58 $offset = $limit * $page;
59 $pageprev = $page - 1;
60 $pagenext = $page + 1;
63 $hookmanager->initHooks(array(
'admin'));
65 $arrayofparameters = array(
'WEBSITE_USE_WEBSITE_ACCOUNTS'=>array(
'css'=>
'minwidth200'));
72 include DOL_DOCUMENT_ROOT.
'/core/actions_setmoduleoptions.inc.php';
82 llxHeader(
'', $langs->trans(
"WebsiteSetup"));
84 $titre = $langs->trans(
"WebsiteSetup");
85 $linkback =
'<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.
'/admin/modules.php').
'">'.$langs->trans(
"BackToModuleList").
'</a>';
92 $head[$h][0] = DOL_URL_ROOT.
"/admin/website.php";
93 $head[$h][1] = $langs->trans(
"WebSites");
94 $head[$h][2] =
'website';
97 $head[$h][0] = DOL_URL_ROOT.
"/admin/website_options.php";
98 $head[$h][1] = $langs->trans(
"Options");
99 $head[$h][2] =
'options';
105 if ($action ==
'edit') {
106 print
'<form method="POST" action="'.$_SERVER[
"PHP_SELF"].
'">';
107 print
'<input type="hidden" name="token" value="'.newToken().
'">';
108 print
'<input type="hidden" name="action" value="update">';
110 print
'<table class="noborder centpercent">';
111 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
113 foreach ($arrayofparameters as $key => $val) {
114 print
'<tr class="oddeven"><td>';
115 print
$form->textwithpicto($langs->trans($key), $langs->trans($key.
'Tooltip'));
116 print
'</td><td><input name="'.$key.
'" class="flat '.(empty($val[
'css']) ?
'minwidth200' : $val[
'css']).
'" value="'.
getDolGlobalString($key).
'"></td></tr>';
121 print
'<br><div class="center">';
122 print
'<input class="button button-save" type="submit" value="'.$langs->trans(
"Save").
'">';
128 print
'<table class="noborder centpercent">';
129 print
'<tr class="liste_titre"><td class="titlefield">'.$langs->trans(
"Parameter").
'</td><td>'.$langs->trans(
"Value").
'</td></tr>';
131 foreach ($arrayofparameters as $key => $val) {
132 print
'<tr class="oddeven"><td>';
133 print
$form->textwithpicto($langs->trans($key), $langs->trans($key.
'Tooltip'));
134 print
'</td><td>'.getDolGlobalString($key).
'</td></tr>';
139 print
'<div class="tabsAction">';
140 print
'<a class="butAction" href="'.$_SERVER[
"PHP_SELF"].
'?action=edit&token='.
newToken().
'">'.$langs->trans(
"Modify").
'</a>';
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
if($cancel &&! $id) if($action=='add' &&! $cancel) if($action=='delete') if($id) $form
Actions.
load_fiche_titre($titre, $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='')
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.
if(!function_exists('utf8_encode')) if(!function_exists('utf8_decode')) getDolGlobalString($key, $default='')
Return dolibarr global constant string value.
GETPOSTISSET($paramname)
Return true if we are in a context of submitting the parameter $paramname from a POST of a form.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.