Пример #1
0
/*
  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";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('summary');
require $GO_LANGUAGE->get_language_file('summary');
require $GO_MODULES->class_path . "announcements.class.inc";
$announcements = new announcements();
$link_back = $GO_MODULES->url;
//get the local times
$local_time = get_time();
$year = date("Y", $local_time);
$month = date("m", $local_time);
$day = date("j", $local_time);
$hour = date("H", $local_time);
$min = date("i", $local_time);
$GO_HEADER['auto_refresh']['interval'] = '60';
$GO_HEADER['auto_refresh']['url'] = $GO_MODULES->full_url;
$overlib = new overlib();
$GO_HEADER['head'] = $overlib->get_header();
require $GO_THEME->theme_path . "header.inc";
echo '<form method="post" name="summary_form" action="' . $_SERVER['PHP_SELF'] . '">' . '<table border="0" width="100%" cellspacing="0" cellpadding="10"><tr><td width="50%">' . '<h3>' . $sum_welcome_to . ' ' . $GO_CONFIG->title . '</h3></td><td width="50%" align="right"><h3>';
$date = date($_SESSION['GO_SESSION']['date_format']);
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";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('summary', true);
require $GO_LANGUAGE->get_language_file('summary');
$page_title = $lang_modules['summary'];
require $GO_MODULES->class_path . "announcements.class.inc";
$announcements = new announcements();
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$announcement_id = isset($_REQUEST['announcement_id']) ? $_REQUEST['announcement_id'] : 0;
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : $_SERVER['HTTP_REFERER'];
$link_back = isset($_REQUEST['link_back']) ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
if (isset($_REQUEST['new_sort_field']) && $_REQUEST['new_sort_field'] != '') {
    SetCookie("an_sort_field", $_REQUEST['new_sort_field'], time() + 3600 * 24 * 365, "/", "", 0);
    $_COOKIE['an_sort_field'] = $_REQUEST['new_sort_field'];
}
if (isset($_REQUEST['new_sort_direction']) && $_REQUEST['new_sort_direction'] != '') {
    SetCookie("an_sort_direction", $_REQUEST['new_sort_direction'], time() + 3600 * 24 * 365, "/", "", 0);
    $_COOKIE['an_sort_direction'] = $_REQUEST['new_sort_direction'];
}
if (isset($_REQUEST['delete_announcement_id']) && $_REQUEST['delete_announcement_id'] > 0) {
    $announcement = $announcements->get_announcement($_REQUEST['delete_announcement_id']);
    if ($announcements->delete_announcement($_REQUEST['delete_announcement_id'])) {
Пример #3
0
/*
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";
$GO_SECURITY->authenticate();
$GO_MODULES->authenticate('summary', true);
require $GO_LANGUAGE->get_language_file('summary');
require $GO_MODULES->class_path . "announcements.class.inc";
$announcements = new announcements();
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$announcement_id = isset($_REQUEST['announcement_id']) ? $_REQUEST['announcement_id'] : 0;
$return_to = 'announcements.php';
$link_back = isset($_REQUEST['link_back']) ? $_REQUEST['link_back'] : $_SERVER['REQUEST_URI'];
switch ($task) {
    case 'save_announcement':
        $due_time = date_to_unixtime($_POST['due_time']);
        $title = smart_addslashes(trim($_POST['title']));
        if ($title == '') {
            $feedback = '<p class="Error">' . $error_missing_field . '</p>';
        } else {
            if ($announcement_id > 0) {
                if (!$announcements->update_announcement($_POST['announcement_id'], $title, smart_addslashes($_POST['content']), $due_time)) {
                    $feedback = '<p class="Error">' . $strSaveError . '</p>';
                } else {