<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%> <%@ page import="com.fredck.FCKeditor.*" %> <%@taglib prefix="ww" uri="webwork" %> <% String contextPath = request.getContextPath(); %> <%@include file="../../head.jsp" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>发起活动</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="<%=contextPath %>/framework/images/layout.css" rel="stylesheet" type="text/css" /> <link href="<%=contextPath %>/framework/images/style.css" rel="stylesheet" type="text/css" /> <link href="<%=contextPath %>/YXTWebPage/groups/style.css" rel="stylesheet" type="text/css"/> <link href="<%=contextPath %>/YXTWebPage/groups/style1.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" href="<%=contextPath %>/framework/css/win.css"> <style type="text/css">@import url(../htmleditor/style.css);</style> <style> /* -- 选项卡two -- */ .tab_two,.tab_two1,.tab_two2 { width:1000px; margin:0 auto; } #tab_two_menu,#tab_two_menu1,#tab_two_menu2 { height:27px; width:1000px; background-image: url(<%=contextPath %>/framework/images/tabbg2a.gif); background-repeat: no-repeat; background-position: 0 0; background-color:green; } #tab_two_menu li,#tab_two_menu1 li,#tab_two_menu2 li { float:left; width:140px; height:23px; line-height:23px; font-size:14px; color:#1f376d; text-align:center; background:url(<%=contextPath %>/framework/images/tabbg2a.gif) 0 -34px no-repeat; cursor:pointer; } #tab_two_menu li A,#tab_two_box li A { color:#1f376d; TEXT-DECORATION: none } #tab_two_menu li.current,#tab_two_menu1 li.current,#tab_two_menu2 li.current { font-weight:bold; background:url(<%=contextPath %>/framework/images/tabbg2a.gif) 0 -64px no-repeat; } #tab_two_box,#tab_two_box1,#tab_two_box2{ width:1000px; border:1px solid #e4e4e4; border-top:0; } #tab_two_box ul,#tab_two_box1 ul,#tab_two_box2 ul{ padding:6px 0; } #tab_two_box ul li,#tab_two_box1 ul li,#tab_two_box2 ul li { padding-left:10px; line-height:180%; color:#1F376D; } .input4 { BACKGROUND: #2171C5; BORDER-BOTTOM: #f4f4f4 1px solid; BORDER-LEFT: #f4f4f4 1px solid; BORDER-RIGHT: #f4f4f4 1px solid; BORDER-TOP: #f4f4f4 1px solid; COLOR: #ffffff; FONT-FAMILY: "arial"; FONT-SIZE: 12px ; height: 20px; width: 60px} </style> <script type="text/javascript"src="<%=request.getContextPath() %>/YXTWebPage/album/js/jquery.js"></script> <script type="text/javascript"src="<%=request.getContextPath() %>/YXTWebPage/album/js/jquery-1.3.2.js"></script> <script type='text/javascript' src='<%=request.getContextPath() %>/dwr/interface/UserDwr.js'></script> <script type='text/javascript' src='<%=request.getContextPath() %>/dwr/engine.js'></script> <script type='text/javascript' src='<%=request.getContextPath() %>/dwr/util.js'></script> <script type="text/javascript" src="<%=contextPath %>/framework/js/jquery-1.3.2.min.js"></script> <script type="text/javascript" src="<%=contextPath %>/YXTWebPage/groups/js/jquery.jTab.js"></script> <script type=text/javascript language=javascript src="<%=contextPath %>/YXTWebPage/groups/js/script_common.js" ></script> <script type=text/javascript language=javascript src="<%=contextPath %>/YXTWebPage/groups/js/script_menu.js" ></script> <script type=text/javascript language=javascript src="<%=contextPath %>/YXTWebPage/groups/js/script_ajax.js" ></script> <script type=text/javascript language=javascript src="<%=contextPath %>/YXTWebPage/groups/js/script_face.js" ></script> <script type=text/javascript language=javascript src="<%=contextPath %>/YXTWebPage/groups/js/script_manage.js" ></script> <SCRIPT type="text/javascript" src="<%=contextPath %>/YXTWebPage/event/js/editor_function.js"></SCRIPT> <script type="text/javascript" src="<%=request.getContextPath()%>/framework/js/win.js"></script> <script language="javascript"> var i=0; $(function(){ $(".tab_two").jTab({ menutag: "#tab_two_menu li", boxtag: "#tab_two_box > ul", cur: i }); }); </script> <SCRIPT type=text/javascript charset=gbk> //活动分类 var eventclass = []; <ww:iterator value="eventTypeList" status="index" > eventclass["<ww:property value="typeId"/>"] = {}; eventclass["<ww:property value="typeId"/>"]["classid"] = '<ww:property value="typeId"/>'; eventclass["<ww:property value="typeId"/>"]["classname"] = '<ww:property value="name"/>'; eventclass["<ww:property value="typeId"/>"]["poster"] = '<ww:property value="poster"/>'; eventclass["<ww:property value="typeId"/>"]["template"] = '<ww:property value="template"/>'; eventclass["<ww:property value="typeId"/>"]["displayorder"] = '<ww:property value="typeId"/>'; </ww:iterator> function trim(str){ for(var i = 0 ; i<str.length && str.charAt(i)==" " ; i++ ) ; for(var j =str.length; j>0 && str.charAt(j-1)==" " ; j--) ; if(i>j) return ""; return str.substring(i,j); } // 获取编辑器中HTML内容 function getEditorHTMLContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return(oEditor.GetXHTML(true)); } // 获取编辑器中文字内容 function getEditorTextContents(EditorName) { var oEditor = FCKeditorAPI.GetInstance(EditorName); return(oEditor.EditorDocument.body.innerText); } // 设置编辑器中内容 function SetEditorContents(EditorName, ContentStr) { var oEditor = FCKeditorAPI.GetInstance(EditorName) ; oEditor.SetHTML(ContentStr) ; } function reset_eventclass(classid){ var o = FCKeditorAPI.GetInstance('testfck'); var selclass = eventclass[classid]; var append =false;// 是否添加 if(selclass && selclass['template'] && (trim(o.GetXHTML(true).replace(/<br[ \/]*>|<div><\/div>/img, '')) == "" || confirm("要添加站长设定的活动分类模板到活动介绍吗?"))){ append = true; } if (append){ o.SetHTML(selclass['template'] + "<br/>" + o.GetXHTML(true)); document.getElementById("classid_info").innerHTML = "请参考站长 设定的模板填写活动介绍"; } } //展开高级设置 function toggle_advanced(){ var el = document.getElementById("advanced_info"); if (el.style.display == "none"){ el.style.display = ""; document.getElementById("toggle_advanced").innerHTML = "隐藏高 级设置"; } else { el.style.display = "none"; document.getElementById("toggle_advanced").innerHTML = "展开高 级设置"; } } //检查提交 function check_eventpost(){ // 活动类型 if (parseInt(document.getElementById("classid").value) < 0){ alert("活动类型必须选择。"); document.getElementById("classid").focus(); return false; } // 标题 var val = trim(document.getElementById("title").value); if ( val == "" ){ alert("活动标题不能为空!"); document.getElementById("title").focus(); return false; } else if ( val.replace(/[^\x00-\xff]/g, "**").length > 80){ alert("活动标题太长,请限制在80个字符内!"); document.getElementById("title").focus(); return false; } // 活动地点 if(document.getElementById('CITY1').value == ""){ alert("活动举办城市不能为空。"); document.getElementById("CITY1").focus(); return false; } // 报名时间,起始-结束时间 var deadline = parsedate(document.getElementById("deadline").value).getTime(); var starttime = parsedate(document.getElementById("starttime").value).getTime(); var endtime = parsedate(document.getElementById("endtime").value).getTime(); var nowtime = new Date().getTime(); if (starttime < nowtime){ alert("活动开始时间不能早于现在。"); document.getElementById("starttime").focus(); return false; } if (endtime - deadline < 0){ alert("报名截止时间不能晚于活动结束时间。"); document.getElementById("deadline").focus(); return false; } if (endtime - starttime < 0){ alert("活动结束时间不能早于开始时间。"); document.getElementById("endtime").focus(); return false; } if (endtime - starttime > 60 * 24 * 3600 * 1000){ alert("活动持续时间不能超过 60 天。"); document.getElementById("endtime").focus(); return false; } // 限制人数 if (! /^[0-9]{1,8}$/.test($("limitnum").value)){ alert("活动人数输入不正确。"); document.getElementById("limitnum").focus(); return false; } var makefeed = document.getElementById('makefeed'); if(makefeed) { if(makefeed.checked == false) { if(!confirm("友情提醒:您确定此次发布不产生动态吗?\n有了动 态,好友才能及时看到你的更新。")) { return false; } } } // 编辑器内容同步 //edit_save(); var o = FCKeditorAPI.GetInstance('testfck'); // 活动描述,默认可能有一个<br/>或<div></div>,需要去掉再判断 val = trim(o.GetXHTML(true).replace(/<br[ \/]*>|<div><\/div>/img,'')); if (val == ""){ alert("活动描述不能为空。"); return false; } } </SCRIPT> <script type="text/javascript"> this.onload=function(){ UserDwr.getParantQuestTypes(ajaxPROVINCE1); //UserDwr.getParantPROVINCETypes(ajaxPROVINCE); } function ajaxPROVINCE1(result){ var sel=DWRUtil.getValue("PROVINCE1"); DWRUtil.removeAllOptions("PROVINCE1"); document.getElementById("PROVINCE1").options.add(new Option("-- 请选择省份--","")); DWRUtil.addOptions("PROVINCE1",result,"PId","provinceName"); DWRUtil.setValue("PROVINCE1",sel); } function ajaxPROVINCE(result){ var sel=DWRUtil.getValue("PROVINCE"); DWRUtil.removeAllOptions("PROVINCE"); document.getElementById("PROVINCE").options.add(new Option("--请 选择省份--","")); DWRUtil.addOptions("PROVINCE",result,"PId","provinceName"); DWRUtil.setValue("PROVINCE",sel); } function changeTypeOne1(id) { //alert(id); UserDwr.getParantCityTypes1(id,ajaxCity1); } function ajaxCity1(result){ var sel=DWRUtil.getValue("CITY1"); DWRUtil.removeAllOptions("CITY1"); document.getElementById("CITY1").options.add(new Option("--请选 择地市--","")); DWRUtil.addOptions("CITY1",result,"CId","cityName"); DWRUtil.setValue("CITY1",sel); } function changeTypeOne(id) { //alert(id); UserDwr.getParantCityTypes(id,ajaxCity); } function ajaxCity(result){ var sel=DWRUtil.getValue("CITY"); DWRUtil.removeAllOptions("CITY"); document.getElementById("CITY").options.add(new Option("--请选择 地市--","")); DWRUtil.addOptions("CITY",result,"CId","cityName"); DWRUtil.setValue("CITY",sel); } </script> <script type="text/javascript"> function swfUpload() { win =new Win( { title:"上传海报", id:"select", type:"model", left:"30", top:"100", width:"500", height:"100", src:yxt_framework+"/YXTWebPage/event/uploadEventPhoto.jsp" }); win.show(); } </script> </head> <body> <DIV id=append_parent></DIV> <DIV id=ajaxwaitid></DIV> <table width="1000" border="0" align="center" cellpadding="4" cellspacing="0" class="table_zone2"> <tr> <td width="669" height="34" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="129" colspan="3"><table width="100%" height="137" border="0" align="center" cellpadding="0" cellspacing="1"> <tr> <td width="100%" height="26"><table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="42" height="39"> <img src="<%=contextPath %>/framework/images/group.bmp" width="16" height="19" /></td> <td ><div align="left" class="text_title02">活动 </div></td> <!-- <td width="110"> <a class=publish href="redirectTopicAdd.action">+ 发表新话题</a></td> --> <td width="110"> </td> <td width="12" height="19"> </td> </tr> </table></td> </tr> <tr> <td height="103" valign="top"><table width="100%" height="64" border="0" cellpadding="4" cellspacing="0"> <tr> <td width="100%" valign="top"> <!--排名选项卡开始 --> <DIV class=tab_two> <UL id=tab_two_menu> <LI class=active> <A href="#"><SPAN>发起活动 </SPAN></A></LI> <LI><A href="#"><SPAN>返回活动首页</SPAN></A> </LI> </UL> <DIV id=tab_two_box> <DIV class=c_form style="width:990px;"> <FORM id=edit_form name=edit_form action="addEvent.action" method="post" onsubmit="return check_eventpost()"> <!-- encType="multipart/form-data" --> <TABLE class=infotable cellSpacing=4 cellPadding=4 width="100%"> <TBODY> <TR> <TH>活动名称 *</TH> <TD><INPUT class=t_input id=title name="eventVO.eventName" maxLength=80 size=56 > </TD></TR> <TR> <TH>活动城市 *</TH> <TD id=citybox> <select name="eventVO.provinceId" id="PROVINCE1" onchange="changeTypeOne1(this.value)" style="width:106px"> </select> <select name="eventVO.cityId" id="CITY1" style="width:106px" > <option value="">-请选择地市-</option> </select> </TD></TR> <TR> <TH>活动地点</TH> <TD><INPUT class=t_input id=location name="eventVO.area" maxLength=80 size=56 > </TD></TR> <TR> <TH>活动时间 *</TH> <TD> <SCRIPT type="text/javascript" src="<%=contextPath %>/YXTWebPage/event/js/script_calendar.js"></SCR IPT> <INPUT id=starttime name="eventVO.startTime" onclick="showcalendar(event,this,1,'', '')" value="" > 至 <INPUT id=endtime name="eventVO.endTime" onclick="showcalendar(event,this,1,'', '')" value="" > </TD> </TR> <TR> <TH>报名截止 *</TH> <TD><INPUT id=deadline name="eventVO.stopTime" onclick="showcalendar(event,this,1,'', '')" value=""> </TD></TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>活动分类 *</TH> <TD> <SELECT id=classid onchange=reset_eventclass(this.value) name="eventVO.typeId"> <OPTION value=-1 selected>请选择活动分类 </OPTION> <OPTION value=1>生活/聚会</OPTION> <OPTION value=2>出行/旅游</OPTION> <OPTION value=4>电影/演出</OPTION> <OPTION value=3>比赛/运动</OPTION> <OPTION value=5>教育/讲座</OPTION> <OPTION value=6>其它</OPTION> </SELECT> <DIV id=classid_info></DIV> </TD> </TR> <TR> <TD colSpan=2> <% FCKeditor oFCKeditor ; oFCKeditor = new FCKeditor( request, "testfck" ) ; oFCKeditor.setBasePath( request.getContextPath() + "/fckeditor/" ) ; oFCKeditor.setWidth("800"); oFCKeditor.setHeight("500"); oFCKeditor.setToolbarSet("Default"); //String contentString = (String) request.getAttribute("testfck"); //if(contentString != null) { // oFCKeditor.setValue( contentString ); //} out.println( oFCKeditor.create() ) ; %> </TD> </TR> <!-- <INPUT id="sharepic" name="eventVO.sharePic" type="checkbox" value="1"> <LABEL for=sharepic>同时把海报共享到活动相册</LABEL> </TD></TR> <TR> <TH>关联群组</TH> <TD><SELECT name="eventVO.groupId"> <OPTION value="" selected>选择关联群组</OPTION> <ww:iterator value="groupList" status="index" > <OPTION value="<ww:property value="groupId"/>"><ww:property value="groupName"/></OPTION> </ww:iterator> </SELECT> 必须是您自己创建的群组,关联后活动话题会同步到该 群组。 </TD> </TR> --> </TBODY> </TABLE> <TABLE class="infotable" id="advanced_info" style="DISPLAY: block" cellSpacing="4" cellPadding="4" width="100%"> <TBODY> <TR> <TH width=100>活动人数</TH> <TD> <INPUT id="limitnum" maxLength="8" size="4" value="0" name="eventVO.limitNumber"> <SPAN class="tiptext">活动参加人数限制,设为 0 表示无限制。 </SPAN> </TD> </TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>活动隐私 </TH> <TD><SELECT id=public name="eventVO.joinType"> <OPTION value=2 selected>公开活动,所有人可见可 加入</OPTION> <OPTION value=1>半公开活动,所有人可见, 邀请才 能加入</OPTION> <OPTION value=0>私密活动,被邀请者可见</OPTION> </SELECT> </TD> </TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>报名信息 </TH> <TD>如果要求参加者填写报名信息(最多255个字符),你 可以在此处给出一个格式模板。留空表示不要求填写。 <BR><TEXTAREA id=template name="eventVO.template" rows=4 cols=72></TEXTAREA> </TD> </TR> </TBODY> </TABLE> <!-- <TABLE class=infotable cellSpacing=4 cellPadding=4 width="100%"> <TBODY> <TR> <TD colSpan=2> <A id=toggle_advanced onclick="toggle_advanced(); this.blur(); return false;" href="#">展开高级设置</A> </TD> </TR> </TBODY> </TABLE> <TABLE class=infotable id=advanced_info style="DISPLAY: none" cellSpacing=4 cellPadding=4 width="100%"> <TBODY> <TR> <TH width=100>活动人数</TH> <TD> <INPUT id=limitnum maxLength=8 size=4 value=0 name=limitnum> <SPAN class=tiptext>活动参加人数限制,设为 0 表 示无限制。 </SPAN> </TD> </TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>活动隐私 </TH> <TD><SELECT id=public name=public> <OPTION value=2 selected>公开活动,所有人可见可 加入</OPTION> <OPTION value=1>半公开活动,所有人可见, 邀请才 能加入</OPTION> <OPTION value=0>私密活动,被邀请者可见</OPTION> </SELECT> </TD> </TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>活动选项 </TH> <TD><INPUT id=allowinvite type=checkbox CHECKED value=1 name=allowinvite> <LABEL for=allowinvite>允许参与者邀请好友,被邀请 者加入活动不需要审核 </LABEL> <BR><INPUT id=allowpic type=checkbox CHECKED value=1 name=allowpic> <LABEL for=allowpic>允许参与者共享活动照片 </LABEL> <BR><INPUT id=allowpost type=checkbox CHECKED value=1 name=allowpost> <LABEL for=allowpost>允许所有人发布留言 </LABEL> <BR><INPUT id=verify type=checkbox value=1 name=verify> <LABEL for=verify>参加活动需要审批 </LABEL> <BR><INPUT id=allowfellow type=checkbox value=1 name=allowfellow> <LABEL for=allowfellow>允许参加 者携带朋友,携带朋友数会占用活动参与者名额 </LABEL> </TD> </TR> <TR> <TH style="VERTICAL-ALIGN: top" width=100>报名信息 </TH> <TD>如果要求参加者填写报名信息(最多255个字符),你 可以在此处给出一个格式模板。留空表示不要求填写。 <BR><TEXTAREA id=template name=template rows=4 cols=72></TEXTAREA> </TD> </TR> </TBODY> </TABLE> --> <TABLE class=infotable cellSpacing=4 cellPadding=4 width="100%"> <TBODY> <!-- <TR> <TH width=100>动态选项</TH> <TD><INPUT id=makefeed type=checkbox CHECKED value=1 name="eventVO.feed"> 产生动态 </TD> </TR> --> <TR> <TH style="VERTICAL-ALIGN: top">活动海报</TH> <TD> <INPUT type="button" id = "swfupload" class="input4" value=上传图片 onclick="swfUpload()" /><BR> </TD> </TR> <TR> <TH width=100> </TH> <TD> <INPUT class=submit type=submit value=提交> </TD> </TR> </TBODY> </TABLE> </FORM> </DIV> </DIV> </DIV> <!--排名选项卡结束 --> </td> </tr> </table></td> </tr> </table></td> </tr> </table></td> <td width="331" valign="top"><br /> <br /></td> </tr> </table> <table width="1000" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td height="19"> </td> </tr> <tr> <td height="52" background="<%=contextPath %>/framework/images/foot.jpg"><table width="200" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="text_foot"><div align="center">2009 copyright</div></td> </tr> </table></td> </tr> </table> </body> </html>