00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: index.php 5429 2006-02-17 22:59:20Z toddy $
00006 #
00007 # Copyright 2003-2004 (c) Mathieu Roy <yeupou--at--gnu.org>
00008 #
00009 # The Savane project is free software; you can redistribute it and/or
00010 # modify it under the terms of the GNU General Public License
00011 # as published by the Free Software Foundation; either version 2
00012 # of the License, or (at your option) any later version.
00013 #
00014 # The Savane project is distributed in the hope that it will be useful,
00015 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00017 # GNU General Public License for more details.
00018 #
00019 # You should have received a copy of the GNU General Public License
00020 # along with the Savane project; if not, write to the Free Software
00021 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00022
00023 require '../../include/pre.php';
00024
00025 if ($group_id && user_ismember($group_id,'A'))
00026 {
00027 $grp=project_get_object($group_id);
00028
00029 if (!$project->Uses("news"))
00030 { exit_error(_("Error"),_("This Project Has Turned Off News Tracker")); }
00031
00032 if ($update)
00033 {
00034 db_query("UPDATE groups SET "
00035 ."new_news_address=".($form_news_address? "'$form_news_address' " : "''")
00036 . " WHERE group_id=$group_id");
00037 fb("Updated");
00038 }
00039
00040 site_project_header(array('group'=>$group_id,'context'=>'anews'));
00041
00042
00043 print '<p>'._("You can view/change all of this tracker configuration from here.").'</p>';
00044
00045 $res_grp = db_query("SELECT new_news_address FROM groups WHERE group_id=$group_id");
00046 $row_grp = db_fetch_array($res_grp);
00047
00048
00049 print '<h3>'._("News Tracker Email Notification Settings").'</h3>';
00050 print '
00051 <form action="'.$PHP_SELF.'" method="post">
00052 <input type="hidden" name="group_id" value="'.$group_id.'" />';
00053 print '<span class="preinput">'._("Carbon-Copy List:").'</span><br /> <INPUT TYPE="TEXT" NAME="form_news_address" VALUE="'.$row_grp['new_news_address'].'" SIZE="40" MAXLENGTH="255" />';
00054 print '
00055 <p align="center"><input type="submit" name="update" value="'._("Update").'" />
00056 </form>
00057 ';
00058
00059 site_project_footer(array());
00060 }
00061 else
00062 {
00063 exit_permission_denied();
00064 }
00065
00066
00067 ?>