Main Page | Directories | File List | File Members

include/trackers_run/admin/other_settings.php

Go to the documentation of this file.
00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: other_settings.php 5429 2006-02-17 22:59:20Z toddy $
00006 #
00007 #  Copyright 2001-2002 (c) Laurent Julliard, CodeX Team, Xerox
00008 #
00009 #  Copyright 2003-2006 (c) Mathieu Roy <yeupou--gnu.org>
00010 #
00011 # The Savane project is free software; you can redistribute it and/or
00012 # modify it under the terms of the GNU General Public License
00013 # as published by the Free Software Foundation; either version 2
00014 # of the License, or (at your option) any later version.
00015 #
00016 # The Savane project is distributed in the hope that it will be useful,
00017 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00018 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019 # GNU General Public License for more details.
00020 #
00021 # You should have received a copy of the GNU General Public License
00022 # along with the Savane project; if not, write to the Free Software
00023 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00024 
00025 require_directory("project");
00026 
00027 $is_admin_page='y';
00028 
00029 if (!$group_id)
00030 {
00031   exit_no_group();
00032 }
00033 
00034 if (!member_check(0,$group_id, member_create_tracker_flag(ARTIFACT).'2') && !user_ismember($group_id,'A'))
00035 {
00036   # Must be at least Bug Admin or Project Admin
00037   exit_permission_denied();
00038 }
00039 
00040 if ($submit)
00041 {
00042 
00043   group_add_history ('Changed Tracking System Settings','',$group_id);
00044   #blank out any invalid email addresses
00045   if ($email_addresses && !validate_emails($email_addresses) )
00046     {
00047       $email_addresses='';
00048       fb(_("Email Address Appeared Invalid"));
00049     }
00050 
00051   # Update the Bug table now
00052   $result=db_query('UPDATE groups SET '
00053                    .ARTIFACT."_preamble='".htmlspecialchars($form_preamble)."' "
00054                    ."WHERE group_id=$group_id");
00055 
00056   if (!$result)
00057     {
00058       fb(_("Update failed"));
00059     } 
00060   else if (db_affected_rows($result) < 1)
00061     {
00062       fb(_("NO DATA CHANGED!"));
00063     }
00064   else
00065     {
00066       fb(_("SUCCESSFUL UPDATE"));
00067     }
00068 
00069 }
00070 
00071 
00072 ##################
00073 # Show main page #
00074 ##################
00075 
00076 trackers_header_admin(array ('title'=>_("Other Configuration Settings")));
00077 
00078 $res_grp = db_query("SELECT * FROM groups WHERE group_id=$group_id");
00079 if (db_numrows($res_grp) < 1)
00080 {
00081   exit_no_group();
00082 }
00083 $row_grp = db_fetch_array($res_grp);
00084 
00085 echo '<h3>'._("Item Post Form Preamble").'</h3>';
00086 echo '<form action="'.$PHP_SELF.'" method="post">';
00087 
00088 # FIXME: preamble should not be in the groups table!!
00089 echo '<input type="hidden" name="group_id" value="'.$group_id.'" />';
00090 echo '<span class="preinput">'._("Introductory message showing at the top of the item submission form:").'</span>
00091 <br /><textarea cols="70" rows="8" wrap="virtual" name="form_preamble">'.$row_grp[ARTIFACT.'_preamble'].'</textarea>
00092 <br />('._("HTML tags allowed").')';
00093 
00094 echo '
00095 <div class="center"><input type="submit" name="submit" value="'._("Submit").'" /></div>
00096 </form>';
00097 
00098 trackers_footer(array());
00099 
00100 ?>
00101 

Generated on Sun Feb 26 13:23:04 2006 for Savane PHP Frontend Developer Reference by  doxygen 1.4.4