Пример #1
0
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
$site_id = isset($_REQUEST['site_id']) ? $_REQUEST['site_id'] : 0;
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$search_word_id = isset($_REQUEST['search_word_id']) ? $_REQUEST['search_word_id'] : 0;
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : 'index.php';
$root_publish_path = $GO_CONFIG->get_setting('cms_publish_path');
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $task == 'save_site') {
    $domain = $cms->prepare_domain(smart_addslashes(trim($_POST['domain'])));
    $name = smart_addslashes(trim($_POST['name']));
    if ($domain == '' || $name == '') {
        $feedback = '<p class="Error">' . $error_missing_field . '</p>';
    } else {
        if ($_POST['site_id'] > 0) {
            if (!($site = $cms->get_site($_POST['site_id']))) {
                $feedback = '<p class="Error">' . $strSaveError . '</p>';
            } else {
                $existing_site = $cms->get_site_by_domain($domain);
                if ($existing_site && $existing_site['id'] != $_POST['site_id']) {
                    $feedback = '<p class="Error">' . $cms_site_exists . '</p>';
                } else {
                    if (isset($_POST['secure'])) {
                        if ($site['acl_read'] == 0) {
                            if (!($acl_read = $GO_SECURITY->get_new_acl('cms read: ' . $domain))) {
                                die($strAclError);
                            }
                        } else {
                            $acl_read = $site['acl_read'];
                        }
                    } else {
Пример #2
0
  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";
//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');
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
$site_id = isset($_REQUEST['site_id']) ? $_REQUEST['site_id'] : 0;
if (!($site = $cms->get_site($site_id))) {
    header('Location: index.php');
}
if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write'])) {
    require $GO_THEME->theme_path . "header.inc";
    require $GO_CONFIG->root_path . 'error_docs/403.inc';
    require $GO_THEME->theme_path . "footer.inc";
    exit;
}
//set the folder id we are in
$folder_id = isset($_REQUEST['folder_id']) ? $_REQUEST['folder_id'] : $site['root_folder_id'];
$link_back = $GO_MODULES->url . 'browse.php?site_id=' . $site_id . '&folder_id=' . $folder_id;
//what to do before output
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
switch ($task) {
    case 'upload':
Пример #3
0
    $image_string = '&nbsp;<img src="' . $GO_THEME->image_url . 'buttons/arrow_up.gif" border="0" />';
    $new_sort_order = "DESC";
}
//adjust sorting because folders because they lack some columns
switch ($cms_settings['sort_field']) {
    case 'cms_files.priority':
        $folders_sort = "priority";
        break;
    case 'cms_files.time':
        $folders_sort = "time";
        break;
    default:
        $folders_sort = "name";
        break;
}
$site = $cms->get_site($site_id);
if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write'])) {
    require $GO_THEME->theme_path . "header.inc";
    require $GO_CONFIG->root_path . 'error_docs/403.inc';
    require $GO_THEME->theme_path . "footer.inc";
    exit;
}
//set the folder id we are in
$folder_id = isset($_REQUEST['folder_id']) ? $_REQUEST['folder_id'] : $site['root_folder_id'];
require $GO_THEME->theme_path . "header.inc";
$folder = $cms->get_folder($folder_id);
echo '<h2>' . get_path($folder['parent_id']) . '/<a href="' . $_SERVER['PHP_SELF'] . '?site_id=' . $site_id . '&folder_id=' . $folder['id'] . '">' . $folder['name'] . '</a></h2>';
echo '<table border="0">';
if ($folder['parent_id'] != 0) {
    echo '<td align="center" width="60" nowrap>';
    echo '<a class="small" href="' . $_SERVER['PHP_SELF'] . '?site_id=' . $site_id . '&folder_id=' . $folder['parent_id'] . '"><img src="' . $GO_THEME->images['uplvl_big'] . '" border="0" height="32" width="32" /><br />omhoog</a></td>';
Пример #4
0
  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";
//load file management class
require $GO_CONFIG->class_path . 'filetypes.class.inc';
$cms_module = $GO_MODULES->get_module('cms');
require $cms_module['class_path'] . 'cms.class.inc';
$cms = new cms();
$filetypes = new filetypes();
$site = $cms->get_site($_REQUEST['site_id']);
if ($site['acl_read'] > 0) {
    $GO_SECURITY->authenticate();
}
if ($site['acl_read'] == 0 || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_read']) || $GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write'])) {
    if ($file = $cms->get_file($_REQUEST['file_id'])) {
        $browser = detect_browser();
        //header('Content-Length: '.$file['size']);
        header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
        if ($browser['name'] == 'MSIE') {
            header('Content-Type: ' . $file['content_type']);
            header('Content-Disposition: inline; filename="' . $file['name'] . '"');
            header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
            header('Pragma: public');
        } else {
            header('Content-Type: ' . $file['content_type']);