00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: editgroupinfo.php 5441 2006-02-19 13:53:40Z toddy $
00006 #
00007 # Copyright 1999-2000 (c) The SourceForge Crew
00008 # Copyright 2000-2003 (c) Free Software Foundation
00009 # Mathieu Roy <yeupou--at--gnu.org>
00010 #
00011 # Copyright 2004 (c) ...
00012 #
00013 # The Savane project is free software; you can redistribute it and/or
00014 # modify it under the terms of the GNU General Public License
00015 # as published by the Free Software Foundation; either version 2
00016 # of the License, or (at your option) any later version.
00017 #
00018 # The Savane project is distributed in the hope that it will be useful,
00019 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00020 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00021 # GNU General Public License for more details.
00022 #
00023 # You should have received a copy of the GNU General Public License
00024 # along with the Savane project; if not, write to the Free Software
00025 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00026
00027
00028 require "../../include/pre.php";
00029 require $GLOBALS['sys_www_topdir']."/include/vars.php";
00030
00031 session_require(array('group'=>$group_id,'admin_flags'=>'A'));
00032
00033 if ($update)
00034 {
00035
00036 group_add_history ('Changed Public Info','',$group_id);
00037
00038 $result=db_query('UPDATE groups SET '
00039 ."group_name='".htmlspecialchars($form_group_name)."',"
00040 ."short_description='".htmlspecialchars($form_shortdesc)."',"
00041 ."long_description='".$form_longdesc."',"
00042
00043 ."devel_status='$form_devel_status' "
00044 ."WHERE group_id=$group_id");
00045
00046 if (!$result)
00047 { fb(_("Update failed.").' '.db_error()); }
00048 }
00049
00050 # update info for page
00051 $res_grp = db_query("SELECT * FROM groups WHERE group_id=$group_id");
00052 if (db_numrows($res_grp) < 1)
00053 {
00054 exit_no_group();
00055 }
00056 $row_grp = db_fetch_array($res_grp);
00057
00058
00059 site_project_header(array('title'=>_("Editing Public Info"),'group'=>$group_id,'context'=>'ahome'));
00060
00061
00062
00063 # ####################################### General Description
00064
00065 print '
00066 <form action="'.$PHP_SELF.'" method="post">
00067 <input type="hidden" name="group_id" value="'.$group_id.'" />
00068 </p>
00069
00070 <p><span class="preinput">'
00071 ._("Descriptive Group Name (no HTML):").'
00072 </span>
00073 <br /><input type="text" size="60" maxlen="254" name="form_group_name" value="'.$row_grp['group_name'].'" />
00074 </p>
00075
00076 <p><span class="preinput">'
00077 ._("Short Description (255 Character Max, no HTML):").'
00078 </span>
00079 <br /><textarea cols="70" rows="3" wrap="virtual" name="form_shortdesc">
00080 '.$row_grp['short_description'].'</textarea></p>
00081
00082 <p><span class="preinput">'
00083 ._("Long Description:").'
00084 </span>
00085 <br /><textarea cols="70" rows="10" wrap="virtual" name="form_longdesc">'.$row_grp['long_description'].'</textarea></p>';
00086
00087 $type_id = $row_grp['type'];
00088 $result1 = db_query("SELECT * FROM group_type WHERE type_id='$type_id'");
00089 $row_grp1 = db_fetch_array($result1);
00090
00091 if($DEVEL_STATUS1 = $row_grp1['devel_status_array']){
00092 $DEVEL_STATUS=preg_split("/\n/",$DEVEL_STATUS1);
00093 }
00094
00095 if ($project->CanUse("devel_status"))
00096 {
00097 print '
00098 <p><span class="preinput">'
00099 ._("Development Status:").'</span><br /><select name="form_devel_status">';
00100 while (list($k,$v) = each($DEVEL_STATUS))
00101 {
00102 print '<option value="'.$k.'"';
00103 if ($k == $row_grp['devel_status'])
00104 { print ' SELECTED'; }
00105 print '>'.$v;
00106 echo '</option>';
00107 }
00108 print '</select></p>';
00109 }
00110
00111 echo '
00112 <p><input type="submit" name="update" value="'._("Update").'" />
00113 </form>
00114 ';
00115
00116 site_project_footer(array());
00117
00118 ?>