<?php
$project_id = $_REQUEST["project_id"];
$issue_typeid = $_REQUEST["issue_typeid"];
$action_id = $_REQUEST["action_id"];
$title = '修改事务处理人员';

require_once('../module/module.flow_action.php');
$action = new CModuleFlowAction();
$action->InitModule($action_id);
$action->InitMember($issue_typeid, 0);

require_once("../module/module.project_workgroup.php");
$groups = new CModuleWorkGroup();
$groups->Init($project_id);

?>
<input type='hidden' id='project_id' value='<?php echo $project_id?>'>
<input type='hidden' id='issue_typeid' value='<?php echo $issue_typeid?>'>
<input type='hidden' id='action_id' value='<?php echo $action_id?>'>

<table border=0 cellspacing='1' cellpadding='0' width=100% bgcolor='#ffffff'>
	<tr bgcolor="#efefef" height=20>
		<td>
			<b><span id="project_form_desc"><?php echo $title?></span></b>
			<?php echo $action->module->action_name?> : 
			<?php echo $action->module->src_status?> => <?php echo $action->module->dst_status?>
			<hr size=1>
		</td>
	</tr>
	<tr height=30>
		<td>
			
			<!------------------------------------------------------------------------------------------------>
			<table>
				<tr>
					<td align=right width=40%>
						<select class=txtput onchange="CallGroupMember()" id="group_id">
							<option value=-1>------选择工作组------</option>
							<?php for($i=0;$i<$groups->GetSize();$i++){?>
								<option value="<?php echo $groups->modules[$i]->group_id?>"><?php echo $groups->modules[$i]->group_name?></option>
							<?php }?>
						</select>
					</td>
					<td align=center>
						<input type=button value=" 整组加入 " class=txtput onclick="AddActionGroup()">
					</td>
					<td width=50></td>
				</tr>
				<tr>
					<td align=right width=40%>
						<select class=txtput size=12 id="group_members" multiple="multiple">
							<option value="-1">------请选择用户------</option>
						</select>
						
						<br>
					</td>
					<td align=center>
						<input type=button value=" 增加 " class=txtput onclick="AddActionMember()">
						<br><br>
						<input type=button value=" 删除 " class=txtput onclick="DelActionMember()">
					</td>
					<td valign="top" width=50%>
						<select class=txtput size=12 id="action_members" multiple="multiple">
							<option value=-1>------事务处理人员------</option>
							<?php for($i=0;$i<sizeof($action->module->members); $i++){?>
								<option value="<?php echo $action->module->members[$i]->member_id?>" > <?php echo $action->module->members[$i]->member_name?> <?php if($action->module->members[$i]->member_type==1){echo "[工作组]";}?></option>
							<?php }?>
						</select>
					</td>
				</tr>
			</table>
			<!------------------------------------------------------------------------------------------------>
			
		</td>
	</tr>
	<tr height=40>
		<td bgcolor="#efefef" align=center>
				<input type=button value=" 提交 " class=button onclick="SubmitActionMember()">
				&nbsp;&nbsp;&nbsp;&nbsp;
				<input type=button value=" 取消 " class=button onclick="CloseDialog(0)">
		</td>
	</tr>
</table>