⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 group_edit.php

📁 Internet Task Management System可以让用户分配和管理一个组织内的任务。ITMS可以发送任务管理通知
💻 PHP
字号:
<?php/* * ITMS ValleyData source file version 1.0 May 11, 2001 * * Enables an ITMS administrator to edit a group * * * Internet Task Management System: An online system used for recording information about and assigning tasks and processes. * Copyright (C) 2001  ValleyData Programming Group * * 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. * * 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 * * See file named "gpl.txt" included with source code or * visit http://www.gnu.org/copyleft/gpl.txt on the internet. */$title="Group Management - Edit";include("header.php");include("adminonly.php");db_open();db_use();$query = "SELECT groupname FROM groups WHERE gid = '$edit_group'";$result = db_query($query); //get group's info$row = db_fetch_row($result);$edit_group_name = $row["GROUPNAME"];//***Caps Updated***if(isset($edit_group_submit)) //if they are edditing the group now{    db_open();    db_use();    $query = "DELETE FROM user_groups WHERE gid = '$edit_group'";    if(db_query($query)) //remove all users from the group    {        foreach($HTTP_POST_VARS as $comboname => $value)        {            if(substr($comboname, 0, 2) == "cb")            {                $user_num = substr($comboname, 2);                $query = "INSERT into user_groups (user_id, gid) VALUES ('$user_num', '$edit_group')";                db_query($query); //add each user that was checked to the group            }        }        message_box("Group Updated Successfully");    }    db_close();}print("<IMG SRC=\"images/group_mgt.jpg\" WIDTH=\"400\" HEIGHT=\"41\" BORDER=\"0\" ALT=\"Group Management\">");?><FORM METHOD="POST" ACTION="group_edit.php"><H3><B>Edit <?php print($edit_group_name); ?>:</B></H3><table>	<tr>    <td>Group's Users:</td>	</tr>	<tr>    <td>        <table>    <?php        $col_num = 0;        $all_users = get_all_users();		foreach($all_users as $user)		{            $col_num++;			if($col_num == 1)				print("<tr>\n");            print("<td>\n");			if(is_user_in_group($user["USER_ID"], $edit_group))//***Caps Updated***				$checked = "checked";			else				$checked = "";			print("<INPUT TYPE=\"checkbox\" " . $checked ." NAME=\"cb" . $user["USER_ID"] . "\">&nbsp;" . $user["NAME"] . "\n");//***Caps Updated***(2)            print("</td>\n");			if($col_num == 4)			{				print("</tr>\n");				$col_num = 0;			}		}    ?>        </table>	</td>    </tr>	<tr>		<td>			<INPUT TYPE="hidden" name="edit_group" value="<?php print($edit_group); ?>">			<INPUT TYPE="submit" name="edit_group_submit" value="Save Changes">			<INPUT TYPE="button" value="Cancel" onClick="location='group_mgt.php'">		</td>	</tr></table></FORM><?phpinclude("footer.php"); ?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -