<%@page pageEncoding="utf-8" contentType="text/html; charset=utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
	<%@include file="/WEB-INF/navigation/JsAndCss.jsp" %>
    <link href="/umeditor/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <link href="/css/glDatePicker.default.css" rel="stylesheet" />
	<script src="/js/html5.js"></script>
	<script src="/js/ajaxfileupload.js"></script>
	<script src="/datePicker/WdatePicker.js"></script>
    <script type="text/javascript" charset="utf-8" src="/umeditor/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/umeditor/umeditor.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/umeditor/lang/zh-cn/zh-cn.js"></script>
    <script type="text/javascript">
	function getCitys(){
				var id=$("#province").val();
				
				$.post("findCityByProvinceId.do",{"provinceId":id},function(data){
					var obj = document.form.city;
					obj.length=1;
					if(data != null){
						for(i=0;i<data.length;i++){
							obj[i+1]=new Option(data[i].name, data[i].id);
						}
					}
				});
				
			}
			
			function thumbnailFileUpload() {  
	            $.ajaxFileUpload  
	        (  
	            {  
	                url: '/imageUp.jsp',  
	                secureuri: false,  
	                fileElementId: 'thumbnailFile',  
	                dataType: 'json',  
	                beforeSend: function() {  
	                    $("#loading").show();  
	                },  
	                complete: function() {  
	                    $("#loading").hide();  
	                },  
	                success: function(data, status) {  
	                    $('#thumbnail').val("/"+data.url);
	                    $('#label1').html("\(已上传图片\)");
	                },  
	                error: function(data, status, e) {  
	                    alert(e);  
	                }  
	            }  
	        )  
	            return false;  
	        } 
			function mthumbnailFileUpload() {  
	            $.ajaxFileUpload  
	        (  
	            {  
	                url: '/imageUp.jsp',  
	                secureuri: false,  
	                fileElementId: 'mthumbnailFile',  
	                dataType: 'json',  
	                beforeSend: function() {  
	                    $("#loading").show();  
	                },  
	                complete: function() {  
	                    $("#loading").hide();  
	                },  
	                success: function(data, status) {  
	                    $('#mthumbnail').val("/"+data.url);
	                    $('#label2').html("\(已上传图片\)");
	                },  
	                error: function(data, status, e) {  
	                    alert(e);  
	                }  
	            }  
	        )  
	            return false;  
	        }
	</script>
		<style>
.performance_msg {
	font-size: 20px;
}

div.tabs
{
    width:940px;
	height:35px;
	overflow:hidden;
	padding-left:10px;
	margin-top:10px;
}
div.tabs ul li
{
	float:left;
	padding:0 5px;
}
div.tabs ul li a
{
	display:block;
	width:101px;
	height:36px;
	overflow:hidden;
	line-height:36px;
	text-align:center;
}
div.fee_type input, div.fee_type label
{
    border-width: 0px;
    display: block;
    height: 30px;
    line-height: 27px;
    float: left;
    margin-left: 5px;
}
div.fee_type label
{
    margin-left: 3px;
    margin-right: 5px;
}
div.input_info
{
    width: 580px;
    text-align: left;
    margin-left: 10px;
    float: left;
    height: 40px;
}
div.input_info span.info
{
    display:inline-block;
    width:50px;
}
</style>

</head>
<body>
	<div class="container">
		<div class="navbar">
			<div class="navbar-inner">
				<%@include file="../navigation/menu.jsp"%>
			</div>
		</div>
		<div class="row">
			<%@include file="../navigation/navigation.jsp"%>
			<div class="span9">
			
				<div class="tabs">
					<ul style="list-style-type: none">
						
						<li><span class="performance_msg">修改会议</span></li>
					</ul>
				</div>
				<form id="edit-profile" class="form-horizontal" name="form" method="post" action="updateMeeting.do?meetingId=${meeting.meetingId }">
					<legend style="margin-top:15px"></legend>

						<div class="control-group">
							<label class="control-label" for="title">会议标题</label>
							<div class="controls">
								<input type="text" class="input-xlarge" id="title"
									name="title" value="${meeting.title }" />
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="title">报名联系电话</label>
							<div class="controls">
								<input type="text" class="input-xlarge" id="contact"
									name="contact" value="${meeting.contact }"/>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="title">外部链接</label>
							<div class="controls">
								<input type="text" class="input-xlarge" id="exurl"
									name="exurl" value="${meeting.exurl }"/>
							</div>
						</div>
						<div class="control-group">
								<label class="control-label" for="province">省市</label>
								<div class="controls">
									<select id="province" class="zzjg_sel1"  name="province" onchange="getCitys()" >
										<option value="0">--请选择城市--</option>
										<c:forEach items="${province }" var="province">
											<option value="${province.id }"  <c:if test="${meeting.province==province.id }">selected</c:if>  >${province.name }</option>
										</c:forEach>
										
									</select>
									<select id="city" class="zzjg_sel1" name="city"  >
										<option value="0">--请选择城市--</option>
										<c:forEach items="${citys }" var="city">
											<option value="${city.id }"  <c:if test="${meeting.city==city.id }">selected</c:if>  >${city.name }</option>
										</c:forEach>
									</select>
								</div>
							</div>
							<div class="control-group">
							<label class="control-label" for="address">会议地址</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="address"
									name="address">${meeting.address }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="organizer">主办方</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="organizer"
									name="organizer">${meeting.organizer }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="organizerSecondary">协办方</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="organizerSecondary"
									name="organizerSecondary">${meeting.organizerSecondary }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="organizerThird">承办方</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="organizerThird"
									name="organizerThird">${meeting.organizerThird }</textarea>
							</div>
						</div>
							<div class="control-group">
								<label class="control-label" for="agenda">会议议程</label>
								<div class="controls">
								<script type="text/plain" id="agenda" style="width:600px;height:240px;"><c:if test="${meeting.agenda==null}">&nbsp;</c:if><c:if test="${meeting.agenda!=null}">${meeting.agenda}</c:if></script>
                                 <div>
                                   <h3 id="focush2"></h3>
                                  </div>
                                 <script type="text/javascript">
                                          //实例化编辑器
                                          var um = UM.getEditor('agenda');

                                 </script>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="description">会议描述</label>
								<div class="controls">
								<script type="text/plain" id="description" style="width:600px;height:240px;"><c:if test="${meeting.description==null}">&nbsp;</c:if><c:if test="${meeting.description!=null}">${meeting.description}</c:if></script>
                                 <div>
                                   <h3 id="focush2"></h3>
                                  </div>
                                 <script type="text/javascript">
                                          //实例化编辑器
                                          var um = UM.getEditor('description');

                                 </script>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="enrollInfo">报名信息</label>
								<div class="controls">
								<script type="text/plain" id="enrollInfo" style="width:600px;height:240px;"><c:if test="${meeting.enrollInfo==null}">&nbsp;</c:if><c:if test="${meeting.enrollInfo!=null}">${meeting.enrollInfo}</c:if></script>
                                 <div>
                                   <h3 id="focush2"></h3>
                                  </div>
                                 <script type="text/javascript">
                                          //实例化编辑器
                                          var um = UM.getEditor('enrollInfo');

                                 </script>
								</div>
							</div>
							
							<div class="control-group">
								<label class="control-label" for="guest">会议嘉宾</label>
								<div class="controls">
								<script type="text/plain" id="guest" style="width:600px;height:240px;"><c:if test="${meeting.guest==null}">&nbsp;</c:if><c:if test="${meeting.guest!=null}">${meeting.guest}</c:if></script>
                                 <div>
                                   <h3 id="focush2"></h3>
                                  </div>
                                 <script type="text/javascript">
                                          //实例化编辑器
                                          var um = UM.getEditor('guest');

                                 </script>
								</div>
							</div>
							<div class="control-group">
								<label class="control-label" for="addressInfo">地址信息</label>
								<div class="controls">
								<script type="text/plain" id="addressInfo" style="width:600px;height:240px;"><c:if test="${meeting.addressInfo==null}">&nbsp;</c:if><c:if test="${meeting.addressInfo!=null}">${meeting.addressInfo}</c:if></script>
                                 <div>
                                   <h3 id="focush2"></h3>
                                  </div>
                                 <script type="text/javascript">
                                          //实例化编辑器
                                          var um = UM.getEditor('addressInfo');

                                 </script>
								</div>
							</div>
							<div class="control-group">
							<label class="control-label" for="input02">会议时间</label>
							<div class="controls">
								<input type="text" class="input-xlarge Wdate" id="input02"
									name="openDate"  value="${meeting.openDate }"  onclick="WdatePicker()"  />
							</div>
						</div>
						<div class="control-group">
								<label class="control-label" for="netvalueUri">缩略图(大图)</label>
								<div class="controls">
									<input id="thumbnailFile" type="file" name="thumbnailFile" class="fimg1"/>
									<input id="thumbnail" type="hidden" name="thumbnail" value="${meeting.thumbnail }"/>
									<button type="button" class="btn btn-primary" onclick="return thumbnailFileUpload();">上传图片</button>
									<label id="label1"><c:if test="${meeting.thumbnail!=null }">(已上传图片)</c:if></label>
								</div>
								
							</div>
							<div class="control-group">
								<label class="control-label" for="netvalueUri">移动端缩略图(小图)</label>
								<div class="controls">
									<input id="mthumbnailFile" type="file" name="mthumbnailFile" class="fimg1"/>
									<input id="mthumbnail" type="hidden" name="mthumbnail" value="${meeting.mthumbnail }"/>
									<button type="button" class="btn btn-primary" onclick="return mthumbnailFileUpload();">上传图片</button>
									<label id="label2"><c:if test="${meeting.mthumbnail!=null }">(已上传图片)</c:if></label>
								</div>
								
							</div>
						
						
							
						<div class="control-group">
							<label class="control-label" for="keyword">关键字</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="keyword"
									name="keyword">${meeting.keyword }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="summary">会议简介</label>
							<div class="controls">
								<textarea type="text" class="input-xlarge" id="summary"
									name="summary">${meeting.summary }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="status">会议状态</label>
							<div class="controls">
								<select name="status" id="status">
								<option value="0" <c:if test="${meeting.status==0 }">selected</c:if> >不显示</option>
								<option value="1" <c:if test="${meeting.status==1 }">selected</c:if> >未召开</option>
								<option value="2" <c:if test="${meeting.status==2 }">selected</c:if> >召开中</option>
								<option value="3" <c:if test="${meeting.status==3 }">selected</c:if> >已召开</option>
								</select>
							</div>
						</div>
						<div class="form-actions">
							<button type="submit" class="btn btn-primary">提交</button>
							<button class="btn" type="reset" onclick="location.href='toMeetingList.do'">返回</button>
						</div>
				</form>
			</div>
		</div>
	</div>
</body>
</html>
