[Openfirst-cvscommit] projects/admin editprojects.php,NONE,1.1
Brought to you by:
xtimg
From: <dav...@us...> - 2003-10-13 22:48:33
|
Update of /cvsroot/openfirst/projects/admin In directory sc8-pr-cvs1:/tmp/cvs-serv29921/admin Added Files: editprojects.php Log Message: initial upload --- NEW FILE: editprojects.php --- <?php /* * openFIRST.projects - groups.php * * Copyright (C) 2003, * openFIRST Project * Original Author: David Di Biase <dav...@ea...> * * 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. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ // Include globals and set header condense (not coded yet) include("../../config/globals.php"); $header_condense = true; include($header); // Check if user is a member if(! isset($user->user)){ showlogin(); } else { // Remove button process if(isset($_POST['remove'])){ // If a remove confirm is selected then allow the process to continue if(! isset($_POST['confirm'])){ echo "<br><br>Your request to remove the task was denied because you have not confirmed! [ <a href='tasks.php?GroupID=".$_GET['GroupID']."&ProjectID=".$_GET['ProjectID']."'>Tasks</a> ]<br><br>"; die(include($footer)); } // Remove every task related value in the database ofirst_dbquery("DELETE FROM ofirst_projects_projects WHERE ID = '".$_POST['task']."'") or die(ofirst_dberror()); ofirst_dbquery("DELETE FROM ofirst_projects_tasks WHERE ID = '".$_POST['task']."'") or die(ofirst_dberror()); ofirst_dbquery("DELETE FROM ofirst_projects_notes WHERE TaskID = '".$_POST['task']."'") or die(ofirst_dberror()); echo "<br><br>Project removed! [ <a href='index.php'>Main</a> ]<br><br>"; die(include($footer)); } $task_query = mysql_query("SELECT * FROM ofirst_projects_tasks WHERE ID = '".$_GET['ProjectID']."'"); $task = mysql_fetch_object($task_query); if(isset($_POST['editmembers'])){ mysql_query("UPDATE ofirst_projects_projects SET Assigned = '".$_POST['members']."' WHERE ID = '".$_GET['TaskID']."';"); $task_query = mysql_query("SELECT * FROM ofirst_projects_projects WHERE ID = '".$_GET['TaskID']."'"); $task = mysql_fetch_object($group_query); echo "<br>Members list has been updated!"; } ?> <h2>Edit Project <font color="red"><?php echo $task->TaskName; ?></font></h2> <h2><font color="red"></font></h2> <table width="600"> <tr> <td>To edit the users assigned to this project you must add/remove user names from the boxes below. User names should be separated by a comma ie. jsomebody,mnobody,ahypithetical etc. No spaces should be added either. </td> </tr> </table> <p> </p> <form action="editgroups.php?GroupID=<?php echo $_GET['GroupID']; ?>" method="POST"> <p><strong>Group Member List</strong> </p> <p> <textarea name="members" cols="60" rows="10" id="members"><?php echo $task->Assigned; ?></textarea> </p> <p> <input name="editmembers" type="submit" id="editmembers" value="Edit Members"> </p> <p> <input name="confirm" type="checkbox" id="confirm" value="checkbox"> Remove this project and all its related data from the database. <input name="remove" type="submit" id="remove" value="Remove Task"> </form> <?php } include($footer); ?> |