00001 <?php
00002 # This file is part of the Savane project
00003 # <http://gna.org/projects/savane/>
00004 #
00005 # $Id: index.php 5466 2006-02-21 17:15:23Z toddy $
00006 #
00007 # Copyright 1999-2000 (c) The SourceForge Crew
00008 # Copyright 2000-2003 (c) Free Software Foundation
00009 #
00010 # Copyright 2004 (c) ...
00011 #
00012 # The Savane project is free software; you can redistribute it and/or
00013 # modify it under the terms of the GNU General Public License
00014 # as published by the Free Software Foundation; either version 2
00015 # of the License, or (at your option) any later version.
00016 #
00017 # The Savane project is distributed in the hope that it will be useful,
00018 # but WITHOUT ANY WARRANTY; without even the implied warranty of
00019 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00020 # GNU General Public License for more details.
00021 #
00022 # You should have received a copy of the GNU General Public License
00023 # along with the Savane project; if not, write to the Free Software
00024 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00025
00026
00027 require "../../include/pre.php";
00028
00029 if (user_ismember(1,'A'))
00030 {
00031
00032 if ($post_changes)
00033 {
00034
00035
00036
00037
00038 if ($people_cat)
00039 {
00040
00041 $sql="INSERT INTO people_job_category (name) VALUES ('$cat_name')";
00042 $result=db_query($sql);
00043 if (!$result)
00044 {
00045 print db_error();
00046 fb(_("Error inserting value"));
00047 }
00048
00049 fb(_("Category Inserted"));
00050
00051 }
00052 else if ($people_skills)
00053 {
00054
00055 $sql="INSERT INTO people_skill (name) VALUES ('$skill_name')";
00056 $result=db_query($sql);
00057 if (!$result)
00058 {
00059 print db_error();
00060 fb(_("Error inserting value"));
00061 }
00062
00063 fb(_("Skill Inserted"));
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 }
00092
00093 }
00094
00095
00096
00097
00098 if ($people_cat)
00099 {
00100
00101
00102
00103
00104 print site_header(array('title'=>'Add/Change Categories'));
00105
00106
00107 print '<h2>'._("Add Job Categories").'</h2>';
00108
00109
00110
00111
00112 $sql="select category_id,name from people_job_category";
00113 $result=db_query($sql);
00114 print "<P>";
00115 if ($result && db_numrows($result) > 0)
00116 {
00117 utils_show_result_set($result,_("Existing Categories"),'people_cat');
00118 }
00119 else
00120 {
00121 print '
00122 <h1>'._("No job categories").'</h1>';
00123 print db_error();
00124 }
00125
00126
00127 print '<p>';
00128 print '<h3>'._("Add a new job category:").'</h3>';
00129 print '<p>';
00130 print '<form action="'.$PHP_SELF.'" method="post">';
00131 print '<input type="hidden" name="people_cat" value="y" />';
00132 print '<input type="hidden" name="post_changes" value="y" />';
00133 print '<h4>'._("New Category Name:").'</h4>';
00134 print '<input type="text" name="cat_name" value="" size="15" maxlength="30" /><br />';
00135 print '<p>';
00136 print '<strong><span class="warn">'._("Once you add a category, it cannot be deleted").'</span></strong></p>';
00137 print '<p>';
00138 print '<input type="submit" name="submit" value="'._("Add").'" /></p>';
00139 print '</form>';
00140
00141
00142 site_project_footer(array());
00143
00144 }
00145 else if ($people_skills)
00146 {
00147
00148
00149
00150 print site_header(array('title'=>'Add/Change People Skills'));
00151
00152
00153 print '<h2>'._("Add Job Skills").'</h2>';
00154
00155
00156
00157
00158 $sql="select skill_id,name from people_skill";
00159 $result=db_query($sql);
00160 print "<p>";
00161 if ($result && db_numrows($result) > 0)
00162 {
00163 utils_show_result_set($result,_("Existing Skills"),"people_skills");
00164 }
00165 else
00166 {
00167 print db_error();
00168 print "\n<h2>"._("No Skills Found").'</h2>';
00169 }
00170
00171 print '<p><h3>'._("Add a new skill:").'</h3></p>';
00172 print '<p>;
00173 <form action="'.$PHP_SELF.'" method="post">
00174 <input type="hidden" name="people_skills" value="y" />
00175 <input type="hidden" name="post_changes" value="y" /></p>';
00176 print '<h4>'._("New Skill Name:").'</h4>';
00177 print '<input type="text" name="skill_name" value="" size="15" maxlength="30" /><br />';
00178 print '<p><strong><span class="warn">'._("Once you add a skill, it cannot be deleted").'</span></strong></p>';
00179 print '<p><input type="submit" name="submit" value="'._("Add").'" /></p>';
00180 print '</form>';
00181
00182 site_project_footer(array());
00183
00184 }
00185 else
00186 {
00187
00188
00189
00190
00191 print site_header(array('title'=>'People Administration'));
00192
00193 print '<h2>'._("Help Wanted Administration").'</h2>';
00194
00195 print '<p><a href="'.$PHP_SELF.'?people_cat=1">'._("Add Job Categories").'</a><br />';
00196 # print "\nAdd categories of bugs like, 'mail module','gant chart module','interface', etc<P>";
00197
00198 print "\n<a href=\"$PHP_SELF?people_skills=1\">"._("Add Job Skills").'</a><br />';
00199 # print "\nAdd Groups of bugs like 'future requests','unreproducible', etc<P>";
00200
00201 site_project_footer(array());
00202 }
00203
00204 }
00205 else
00206 {
00207 exit_permission_denied();
00208 }
00209 ?>