24define(
'NOSCANPOSTFORINJECTION', 1);
25define(
'NOSTYLECHECK', 1);
28require
'../main.inc.php';
29require_once DOL_DOCUMENT_ROOT.
'/core/lib/admin.lib.php';
30require_once DOL_DOCUMENT_ROOT.
'/core/lib/files.lib.php';
33$langs->loadLangs(array(
"admin",
"other",
"website"));
39$conf->dol_hide_leftmenu = 1;
42$website =
GETPOST(
'website',
'alpha');
43$page =
GETPOST(
'page',
'alpha');
44$pageid =
GETPOST(
'pageid',
'int');
45$action =
GETPOST(
'action',
'aZ09');
57 $action =
'editmedia';
66 $action =
'setashome';
72 $action =
'editcontent';
95if ($action ==
'add') {
98 $objectpage->title =
GETPOST(
'WEBSITE_TITLE');
99 $objectpage->pageurl =
GETPOST(
'WEBSITE_PAGENAME');
100 $objectpage->description =
GETPOST(
'WEBSITE_DESCRIPTION');
101 $objectpage->keywords =
GETPOST(
'WEBSITE_KEYWORD');
103 if (empty($objectpage->title)) {
104 setEventMessages($langs->trans(
"ErrorFieldRequired", $langs->transnoentitiesnoconv(
"WEBSITE_PAGENAME")),
null,
'errors');
109 $res = $objectpage->create($user);
117 setEventMessages($langs->trans(
"PageAdded", $objectpage->pageurl),
null,
'mesgs');
124 $id = $objectpage->id;
128if ($action ==
'delete') {
131 $res = $object->fetch(0, $website);
133 $res = $objectpage->fetch($pageid, $object->fk_website);
136 $res = $objectpage->delete($user);
144 setEventMessages($langs->trans(
"PageDeleted", $objectpage->pageurl, $website),
null,
'mesgs');
146 header(
"Location: ".$_SERVER[
"PHP_SELF"].
'?website='.$website);
162$form =
new Form($db);
166llxHeader(
'', $langs->trans(
"WebsiteSetup"), $help_url,
'', 0,
'',
'',
'',
'',
'',
'<!-- Begin div class="fiche" -->'.
"\n".
'<div class="fichebutwithotherclass">');
168print
"\n".
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST"><div>';
169print
'<input type="hidden" name="token" value="'.newToken().
'">';
170if ($action ==
'create') {
171 print
'<input type="hidden" name="action" value="add">';
177if ($action !=
'preview' && $action !=
'editcontent') {
178 $style =
' margin-bottom: 5px;';
182print
'<div class="centpercent websitebar">';
187print
"</div>\n</form>\n";
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader()
Empty header.
dol_print_error($db='', $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
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.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.