Version: 1.0 Release date: 08 May 2004 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'; require $GO_LANGUAGE->get_language_file('cms'); $datepicker = new date_picker(); $GO_HEADER['head'] = $datepicker->get_header(); $cms_module = $GO_MODULES->get_module('cms'); if (isset($_REQUEST['site_id']) && $cms_module) { require $cms_module['class_path'] . 'cms.class.inc'; require $cms_module['class_path'] . 'cms_site.class.inc'; $cms_site = new cms_site($_REQUEST['site_id']); } $email_to = $GO_CONFIG->webmaster_email; if (isset($cms_site) && $cms_site) { echo $cms_site->generate_header(); if ($site_owner = $GO_USERS->get_user($cms_site['user_id'])) { $email_to = $site_owner['email']; } } else { require $GO_THEME->theme_path . "header.inc"; } if ($_SERVER['REQUEST_METHOD'] == 'POST') { $name_from = smartstrip(trim($_POST['name_from'])); $email_from = smartstrip(trim($_POST['email_from'])); $subject = smartstrip(trim($_POST['subject'])); $mail_body = smartstrip(trim($_POST['mail_body']));
$full_publish_path = $root_publish_path; $dirs = explode($GO_CONFIG->slash, $publish_path); while ($dir = array_shift($dirs)) { $full_publish_path = $full_publish_path . $dir . $GO_CONFIG->slash; if (!file_exists($full_publish_path)) { @mkdir($full_publish_path); } if (!is_writable($full_publish_path)) { $feedback = '<p class="Error">' . $cms_path_not_writable . ': \'' . $full_publish_path . '\'</p>'; break; } } if ($full_publish_path == $root_publish_path . $publish_path) { $cms->set_publishing($site_id, $publish_style, addslashes($publish_path)); require $GO_CONFIG->class_path . 'cms_site.class.inc'; $cms_site = new cms_site($site_id); $cms_site->publish(); if ($close == 'true') { header('Location: ' . $return_to); exit; } } } } } } if ($site_id > 0) { //create a tab window $site = $cms->get_site($site_id); if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $site['acl_write'])) { header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php');