Beispiel #1
0
            $website->setMeta('language', $_POST['language']);
            $website->setMeta('favicon', $_POST['favicon']);
            $website->setMeta('metas', $_POST['metas']);
            if (!$cms_message && !$website->hasError()) {
                $website->writeToPersistence();
                CMS_tree::regenerateAllPages(true);
                $log = new CMS_log();
                $log->logMiscAction(CMS_log::LOG_ACTION_WEBSITE_EDIT, $cms_user, "Website : " . $website->getLabel());
                $dialog->reloadAll();
                header("Location: websites.php?cms_message_id=" . MESSAGE_ACTION_OPERATION_DONE . "&" . session_name() . "=" . session_id());
                exit;
            }
        }
        break;
}
$dialog->setBackLink("websites.php");
$title = $cms_language->getMessage(MESSAGE_PAGE_TITLE);
$dialog->setTitle($title);
if ($cms_message) {
    $dialog->setActionMessage($cms_message);
}
$grand_root = CMS_tree::getRoot();
$tree_href = PATH_ADMIN_SPECIAL_TREE_WR;
$tree_href .= '?root=' . $grand_root->getID();
//$tree_href .= '&pageLink=website.php'.chr(167).chr(167).'website_root=%s'.chr(167).'cms_action=set_root'.chr(167).'website='.$website->getID();
$tree_href .= '&encodedPageLink=' . base64_encode('website.php' . chr(167) . chr(167) . 'website_root=%s' . chr(167) . 'cms_action=set_root' . chr(167) . 'website=' . $website->getID());
$tree_href .= '&backLink=websites.php';
$tree_href .= '&title=' . urlencode($cms_language->getMessage(MESSAGE_PAGE_TREE_TITLE));
$tree_href .= '&heading=' . urlencode($cms_language->getMessage(MESSAGE_PAGE_TREE_HEADING));
$website_root = $website->getRoot();
$content = '
Beispiel #2
0
define('MESSAGE_PAGE_EXPORT_XML_FORMAT', 1636);
define('MESSAGE_PAGE_EXPORT_PHP_FORMAT', 1637);
define('MESSAGE_PAGE_EXPORT_OPTIONS', 1638);
//Create page object
$dialog = new CMS_dialog();
//checks rights
if (!$cms_user->hasAdminClearance(CLEARANCE_ADMINISTRATION_EDITVALIDATEALL)) {
    $dialog->setContent($cms_language->getMessage(MESSAGE_PAGE_ERROR_MODULE_RIGHTS));
    $dialog->show();
    exit;
}
$import = new CMS_module_import();
$dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_MODULE_IMPORT_TITLE));
$format = io::post('format', '', 'xml');
$options = io::post('options', 'is_array', !io::post('action') ? $import->getDefaultParameters() : array());
$dialog->setBackLink('modules_admin.php');
$content = '<form action="' . $_SERVER['SCRIPT_NAME'] . '" method="post" enctype="multipart/form-data">
				<input type="hidden" name="action" value="import" />
				<fieldset>
					<legend>' . $cms_language->getMessage(MESSAGE_PAGE_EXPORT_OPTIONS) . '</legend>';
$importParams = $import->getAvailableParameters($cms_language);
foreach ($importParams as $param => $label) {
    $content .= '<label>
							<input type="checkbox" name="options[]" value="' . $param . '"' . (in_array($param, $options) ? ' checked="checked"' : '') . ' />
							' . $label . '
						</label><br />';
}
$content .= '	</fieldset><br />
				<fieldset>
					<legend>' . $cms_language->getMessage(MESSAGE_PAGE_MODULE_IMPORT_PATCH) . '</legend>
					<input type="file" name="file" />
Beispiel #3
0
}
//add title
$title = $title ? SensitiveIO::sanitizeHTMLString($title) : $cms_language->getMessage(MESSAGE_PAGE_TITLE);
$pageTitle = $frame && !$onClick ? '<a href="' . CMS_session::getSessionVar('treeHref') . '" target="_self" class="admin_frame">' . $title . '</a>' : $title;
$dialog->setTitle($pageTitle);
$dialog->changeColor();
//add message if any
if ($cms_message) {
    $dialog->setActionMessage($cms_message);
}
//add back link
if ($backLink) {
    //links are coded in query string and so ? are replaced by §§ and ampersands are replaced with § to avoid confusion
    $bl = str_replace(chr(167) . chr(167), "?", $backLink);
    $bl = str_replace(chr(167), "&", $bl);
    $dialog->setBackLink(SensitiveIO::sanitizeHTMLString($bl));
}
//first make a diff beetween current queried Root and all user sections to see wich sections missing.
$getRoot = array($startRoot);
$displayed = array();
$cms_root = CMS_tree::getRoot();
$sectionsRoots = CMS_session::getSessionVar('sectionsRoots');
foreach ($getRoot as $aRootID) {
    if ($pages[$aRootID]) {
        $treeRoot = $pages[$aRootID];
    } else {
        $treeRoot = CMS_tree::getPageByID($aRootID);
        $pages[$aRootID] = $treeRoot;
    }
    if (!$treeRoot || $treeRoot->hasError()) {
        die("Unknown tree root to display ...");
Beispiel #4
0
                        CMS_file::chmodFile(FILES_CHMOD, PATH_MODULES_FILES_FS . '/' . $moduleCodename . '/public/.htaccess');
                    }
                    header("Location: modules_admin.php?moduleCodename=" . $moduleCodename . "&cms_message_id=" . MESSAGE_ACTION_OPERATION_DONE . "&" . session_name() . "=" . session_id());
                    exit;
                } else {
                    $cms_message .= "\n" . $cms_language->getMessage(MESSAGE_FORM_ERROR_DIRECTORY_CREATION, array($moduledir->getName(), $moduleDeleted->getName(), $moduleEdited->getName(), $modulePublic->getName()));
                }
            }
        }
        break;
}
//page dialog
$dialog = new CMS_dialog();
if (is_object($module)) {
    $dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_TITLE_EDIT, array($module->getLabel($cms_language))));
    $dialog->setBackLink('modules_admin.php?moduleCodename=' . $moduleCodename);
} else {
    $dialog->setTitle($cms_language->getMessage(MESSAGE_PAGE_TITLE_CREATE));
    $dialog->setBackLink('modules_admin.php');
}
if ($cms_message) {
    $dialog->setActionMessage($cms_message);
}
$content = '
<form action="' . $_SERVER["SCRIPT_NAME"] . '" method="post">
<input type="hidden" name="cms_action" value="validate" />
<input type="hidden" name="moduleCodename" value="' . $moduleCodename . '" />
<table border="0" cellpadding="2" cellspacing="2">
<tr>
	<td class="admin" align="right">' . $cms_language->getMessage(MESSAGE_PAGE_FIELD_LABEL) . '</td>
	<td>