<%@ page contentType="text/html; charset=GBK" session="false"%>
<%@ taglib uri="/cmsTag" prefix="cms"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<%
			response.setHeader("Pragma", "No-cache");
			response.setHeader("Cache-Control", "no-cache");
			response.setDateHeader("Expires", 0);
		%>
		<cms:SystemDataModel id='${param.modelId}'>
			<title>审核${DataModel.modelName}</title>

			<link rel="stylesheet" type="text/css" href="../../style/default/main.css" />

			<!--加载 js -->
			<script type="text/javascript" src="../common/js/jquery-1.7.gzjs"></script>
		    <script type="text/javascript" src="../javascript/commonUtil.js"></script>
		    <script type="text/javascript" src="../../fckeditor/fckeditor.js"></script>	
		    <script type="text/javascript" src="../javascript/editorMediaUtil.js"></script>
			<script language="javascript" type="text/javascript" src="../javascript/My97DatePicker/WdatePicker.js"></script>
			<script type="text/javascript">
				base="<cms:Domain/>/";
			</script>
	</head>


	<body>
		<form id="userDefineContentForm" name="userDefineContentForm" method="post">
			<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#b5d6e6">
				<tr>

					<td height="22" class="head_title">
						<img src="../../core/style/default/images/title_y.gif" />
						<span class="STYLE1">编辑${DataModel.modelName}</span>
					</td>

				</tr>

				<tr>
					<td>
						<table width="100%" cellspacing=1 cellpadding=0 align=center border="0" bgcolor="#FFFFFF">
							<tr>
								<td>
									<table width="100%" cellspacing=10 cellpadding=1 align=center border="0">
										<tr>
											<td width="12%" class="title_td">
												所属栏目:
											</td>
											<td width="88%">
												<select name="classId" id="classId">
													<option value="-9999">
														选择所属栏目
													</option>

													<cms:DisplayClass modelId="${DataModel.dataModelId}" initClassId="${param.classId}" />
												</select>
											</td>
										</tr>
										<cms:Content modelId="${param.modelId}" id="${param.contentId}">
											<tr>
												<td class="title_td" width="12%">
													标题:
												</td>
												<td width="88%">
													<textarea id="title" name="title" cols="53" rows="2" class="f_text">${Info.title}</textarea>
												</td>
											</tr>
											<!-- 自定义模型Html开始 -->
											<cms:SystemModelFiledList modelId="${DataModel.dataModelId}">
												<cms:SystemModelFiled>
													<tr>
														<td class="title_td" width="12%">
															${ModelFiled.showName}:
														</td>
														<td width="88%">
															${ModelFiled.editModeLayoutHtml}
														</td>
													</tr>
												</cms:SystemModelFiled>
											</cms:SystemModelFiledList>


											<!-- 自定义模型Html结束 -->

											<tr>
												<td class="title_td" width="12%">
													引导图:
												</td>
												<td width="88%">
													<iframe src="UploadContentGuideImg.jsp?imgFileURL=${Info.homeImage}&contentId=${Info.contentId}" scrolling="no" frameborder="0" id="guideImgFrame" name="uguideImgFrame"></iframe>
												</td>
											</tr>
											<tr>
												<td class="title_td" width="12%">
													内容属性:
												</td>
												<td width="88%">
													<input type="checkbox" id="topFlag" name="topFlag" value="1">
													<span class="style12">固顶</span>
													<input type="checkbox" id="commendFlag" name="commendFlag" value="1">
													<span class="style12">推荐</span>
													<input type="checkbox" id="hotFlag" name="hotFlag" value="1">
													<span class="style12">热点</span>

												</td>
											</tr>

											<tr>
												<td class="title_td" width="12%">
													内容分类:
												</td>
												<td width="88%">
													<input type="checkbox" id="photoArticleType" name="photoArticleType" value="1">
													<span class="style12">图文</span>
													<input type="checkbox" id="videoType" name="videoType" value="1">
													<span class="style12">视频</span>
													<input type="checkbox" id="attachType" name="attachType" value="1">
													<span class="style12">附件</span>
												</td>
											</tr>

											<tr>
												<td class="title_td" width="12%">
													发布时间:
												</td>
												<td width="88%">
													<table width="405" border="0" cellpadding="0" cellspacing="0">
														<tr>
															<td width="37%">
																<input id="appearStartDateTime" name="appearStartDateTime" size="21" maxlength="30" type="text" value="${Info.appearStartDateTime}" class="f_input_time" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'});" />
															</td>
															<td width="7%" class="font_style_center">
																至
															</td>
															<td width="56%">
																<input id="appearEndDateTime" name="appearEndDateTime" size="21" maxlength="30" type="text" value="${Info.appearEndDateTime}" class="f_input_time" onmousedown="javascript:WdatePicker({skin:'twoer',dateFmt:'yyyy-MM-dd HH:mm:ss'});" />
															</td>
													</table>
												</td>
											</tr>
									</table>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="feet" colspan="2" />
				</tr>
			</table>



			<br>
			<br>
			
			
		

			<center>
				<cms:WorkflowActionUIHelp contentId="${param.contentId}">
					<button type="button" id="save" onclick="submitEditUserDefineContentInfo(${Action.toStepId});">
						<img src="../../core/style/default/images/add-act.png" alt="" />
						${Action.passActionName}
					</button>
				&nbsp;&nbsp;&nbsp;
				</cms:WorkflowActionUIHelp>
				<button type="button" id="save" onclick="">
					<img src="../../core/style/default/images/add-act.png" alt="" />
					注释
				</button>
				&nbsp;&nbsp;&nbsp;
			
				<button type="reset">
					<img src="../../core/style/default/images/reset-act.png" alt="" onClick="return confirm('真的重置吗？')" />
					重置
				</button>
			</center>



			<input type="hidden" id="modelId" name="modelId" value="${param.modelId}" />

			<input type="hidden" id='contentId' name="contentId" value="${param.contentId}" />
			
			<input type="hidden" id='censorState' name="censorState" value="${Info.censorState}" />
			
			<input type="hidden" id="homeImage" name="homeImage" value="${Info.homeImage}"/>
			
			<input name="mode" type="hidden" id='homeImageMode' name='homeImageMode' value="">

			<input type="hidden" id="toStepId" name="toStepId" />
		</form>
	</body>

</html>
<script type="text/javascript" language="javascript">
//model
initRadio('topFlag','${Info.topFlag}');
initRadio('commendFlag','${Info.commendFlag}');
initRadio('hotFlag','${Info.hotFlag}');
initRadio('photoArticleType','${Info.photoArticleType}');
initRadio('videoType','${Info.videoType}');
initRadio('attachType','${Info.attachType}');

function submitEditUserDefineContentInfo(toStepId)
{   
    document.getElementById('toStepId').value=toStepId;
	var homeImageVal = document.getElementById('homeImage').value;
	var targetImgUrl = document.all.guideImgFrame.contentWindow.document.getElementById("newImgVal").value;
	
	if(homeImageVal != targetImgUrl)
	{
		document.all.homeImage.value=targetImgUrl;
	}
	
    userDefineContentForm.action="../../content/editUserDefineContent.cmd";
    userDefineContentForm.submit();
}
</script>
</cms:Content>
</cms:SystemDataModel>
