<?php
$job = 'add';
$title = '新增项目';
$project_id=0;
$project_name="";
$project_code="";
$project_desc="";
$project_state=1;

if(array_key_exists("job", $_REQUEST))
	$job = $_REQUEST['job'];
	
if($job=='mod')
{
	$title = '修改项目';
	$project_id=$_REQUEST['project_id'];
	require_once('../module/module.project.php');
	$project = new CModuleProject();
	$project->InitModule($project_id);
	if($project->module != '')
	{
		$project_name=$project->module->project_name;
		$project_code=$project->module->project_code;
		$project_desc=$project->module->project_desc;
		$project_state=$project->module->project_state;
	}
}
?>
<input type='hidden' id='project_id' value='<?php echo $project_id?>'>
<table border=0 cellspacing='1' cellpadding='0' width=100% bgcolor='#ffffff'>
	<tr bgcolor="#efefef" height=20>
		<td colspan=2>
			<b><span id="project_form_desc"><?php echo $title?></span></b>
			<hr size=1>
		</td>
	</tr>
	<tr>
		<td align=right width=80>项目名称:</td>
		<td><input type=text id="project_name" class=txtput value='<?php echo $project_name?>'></td>
	</tr>
	<tr>
		<td align=right width=80>项目编码:</td>
		<td><input type=text id="project_code" class=txtput size=6 value='<?php echo $project_code?>'></td>
	</tr>
	<tr height=30>
		<td align=right>项目描述:</td>
		<td><input type=text id="project_desc" class=txtput size=40 value='<?php echo $project_desc?>'></td>
	</tr>
	<tr height=30>
		<td align=right>项目状态:</td>
		<td>
			<input type=radio name="project_state" value="1" <?php if($project_state==1) echo "checked"; ?>>开启
			<input type=radio name="project_state" value="0" <?php if($project_state==0) echo "checked"; ?>>关闭
		</td>
	</tr>
	<tr height=30>
		<td colspan=2 bgcolor="#efefef">
				&nbsp;&nbsp;&nbsp;&nbsp;
				<input type=button value=" 提交 " class=button onclick="SubmitProject('<?php echo $job?>')">
				&nbsp;&nbsp;&nbsp;&nbsp;
				<input type=button value=" 取消 " class=button onclick="CloseDialog(0)">
		</td>
	</tr>
</table>