Esempio n. 1
0
    $description = $file['description'];
    $keywords = $file['keywords'];
    $priority = $file['priority'];
    $hot_item = $file['hot_item'];
} else {
    require $GO_THEME->theme_path . "header.inc";
    require "add_file.inc";
    require $GO_THEME->theme_path . "footer.inc";
    exit;
}
$link_back = 'edit.php?site_id=' . $site_id . '&file_id=' . $file_id . '&folder_id=' . $folder_id;
//set the page title for the header file
$page_title = $lang_modules['cms'];
//get the site template
if ($site = $cms->get_site($site_id)) {
    $template = $cms->get_template($site['template_id']);
}
$pagestyle = isset($template) ? $template['additional_style'] : '';
$pagestyle = str_replace("\r", '', $pagestyle);
$pagestyle = str_replace("\n", '', $pagestyle);
$pagestyle = str_replace("\t", '', $pagestyle);
$pagestyle = str_replace("'", '"', $pagestyle);
$pagestyle = str_replace(' ', '', $pagestyle);
//create htmlarea
$htmlarea = new htmlarea();
$htmlarea->add_button('insert', $cms_insert_file, $GO_CONFIG->control_url . 'htmlarea/images/go_image.gif', 'false', "function insertObject()\r\n    {\r\n    popup('select.php?site_id=" . $site_id . "', '600', '400');\r\n    }");
$qn_plugin = $GO_MODULES->get_plugin('questionnaires');
if ($qn_plugin) {
    $htmlarea->add_button('insert_qn', 'Vragenlijst invoegen', $GO_CONFIG->control_url . 'htmlarea/images/questionnaire.gif', 'false', "function insertQN()\r\n    {\r\n    popup('questionnaires/select.php?site_id=" . $site_id . "', '300', '400');\r\n    }");
}
$com_plugin = $GO_MODULES->get_plugin('components');
Esempio n. 2
0
//load Group-Office
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//load the CMS module class library
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$template_id = isset($_REQUEST['template_id']) ? $_REQUEST['template_id'] : 0;
if ($template_id > 0) {
    $template = $cms->get_template($template_id);
    if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $template['acl_write'])) {
        header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php');
        exit;
    }
}
//create a tab window
$tpl_table = new tabtable('template_tab', $cms_theme, '100%', '100%', '100', '', true);
switch ($task) {
    case 'save_template':
        if ($_SERVER['REQUEST_METHOD'] == 'POST') {
            $name = trim($_POST['name']);
            $restrict_editor = isset($_POST['restrict_editor']) ? $_POST['restrict_editor'] : '';
            if ($name == '') {
                $feedback = '<p class="Error">' . $error_missing_field . '</p>';
            } else {
<?php

/*
  Copyright Intermesh 2003
  Author: Merijn Schering <*****@*****.**>
  Version: 1.0 Release date: 08 July 2003

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.
*/
require "../../Group-Office.php";
$cms_module = $GO_MODULES->get_module('cms');
require $cms_module['class_path'] . 'cms.class.inc';
$cms = new cms();
if ($template = $cms->get_template($_REQUEST['template_id'])) {
    header('Content-Type: text/css');
    #header('Content-Length: '.strlen($template['style']));
    header("Cache-Control: max-age=2592000");
    header('Content-Disposition: inline; filename=stylesheet.css');
    echo $template['style'];
    exit;
}