⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 addeditdebate.asp

📁 后台目录:qwbAdmin/Login.asp 登陆用户名:admin 登陆密码:admin
💻 ASP
📖 第 1 页 / 共 2 页
字号:
</tr>
<tr class="hback"> 
	<td align="right">所属分类:</td> 
    <td>
	  <%	
	  	i=0
		Set ClassRs=User_Conn.Execute("Select ClassID,Title from FS_ME_GroupDebateClass")
		Response.Write("<select name='DebateClass'>"&Chr(10)&Chr(13))
		while not ClassRs.eof
			if classid=ClassRs("ClassID") then
				Response.Write("<option value='"&ClassRs("ClassID")&"' selected>"&ClassRs("title")&"</option>")
			else
				Response.Write("<option value='"&ClassRs("ClassID")&"'>"&ClassRs("title")&"</option>")
			end if
			ClassRs.movenext
		wend
  %>
	</td> 
  </tr> 
      <tr class="hback"> 
          <td align="right">指定用户查看:</td> 
          <td><textarea name="AppointUserNumber" cols="80" id="AppointUserNumber" onKeyUp="ReplaceDot('AppointUserNumber')"><%=AppointUserNumber%></textarea>
		</td> 
      </tr>
      <tr class="hback">
        <td align="right">指定用户组查看:</td>
        <td><select name="userGroup" size="10" multiple>
          <option value="user_all" style="background-color:#014952; color:#FFFFFF;">-个人用户组-</option>
		  
		  <%
		  	Set UserGroupRs=User_Conn.Execute("Select GroupID,GroupName from FS_ME_Group where GroupType=1")
			while not UserGroupRs.eof
				selectedTF=false
				if  not isNull(AppointUserGroup) then
					for ArrayCount=0 to Ubound(AppointUserGroup)
						if not isnumeric(AppointUserGroup(ArrayCount)) then exit for
						if Cint(trim(AppointUserGroup(ArrayCount)))=UserGroupRs("GroupID") then
							selectedTF=true
							exit for
						end if
					next
				end if
				if selectedTF then
					Response.Write("<option value='"&UserGroupRs("GroupID")&"' selected>"&UserGroupRs("GroupName")&"</option>")
				else
					Response.Write("<option value='"&UserGroupRs("GroupID")&"'>"&UserGroupRs("GroupName")&"</option>")
				end if
				UserGroupRs.movenext
			wend
		  %>
        </select> 
          <select name="corpGroup" size="10" multiple>
            <option value="corp_all" style="background-color:#014952; color:#FFFFFF;">-企业用户组-</option>
			<%
			Set UserGroupRs=User_Conn.Execute("Select GroupID,GroupName from FS_ME_Group where GroupType=0")
			while not UserGroupRs.eof
				selectedTF=false
				if  not isNull(AppointUserGroup) then
					for ArrayCount=0 to Ubound(AppointUserGroup)
						if not isnumeric(AppointUserGroup(ArrayCount)) then exit for
						if Cint(trim(AppointUserGroup(ArrayCount)))=UserGroupRs("GroupID") then
							selectedTF=true
							exit for
						end if
					next
				end if
				if selectedTF then
					Response.Write("<option value='"&UserGroupRs("GroupID")&"' selected>"&UserGroupRs("GroupName")&"</option>")
				else
					Response.Write("<option value='"&UserGroupRs("GroupID")&"'>"&UserGroupRs("GroupName")&"</option>")
				end if
				UserGroupRs.movenext
			wend
			%>
            </select></td>
      </tr>
      <tr class="hback">
        <td align="right">锁定:</td>
        <td>
		<%
			if Request.QueryString("Act")="edit" then
				if isLock=1 then
					Response.Write("<input type='radio' name='isLock' value='1' checked>是"&Chr(10)&Chr(13))					
					Response.Write("<input type='radio' name='isLock' value='0' >否"&Chr(10)&Chr(13))
				elseif isLock=0 then
					Response.Write("<input type='radio' name='isLock' value='1' >是"&Chr(10)&Chr(13))					
					Response.Write("<input type='radio' name='isLock' value='0' checked>否"&Chr(10)&Chr(13))
				end if
			else
				Response.Write("<input type='radio' name='isLock' value='1' >是"&Chr(10)&Chr(13))					
				Response.Write("<input type='radio' name='isLock' value='0' checked>否"&Chr(10)&Chr(13))
			end if
		%>
</td>
      </tr>
      <tr class="hback">
        <td align="right">附件地址:</td>
        <td><input name="AccessFile" type="text" id="AccessFile" size="50" value="<%=AccessFile%>"><span id="AccessFile_Alert"></span></td>
      </tr> 
      <tr class="hback"> 
          <td align="right">&nbsp;</td> 
          <td><input type="Button" name="OperateDebateButton" value=" 保存 " onClick="OperateDebateSubmit()"/> 
            <input type="reset" name="Submit2" value=" 重置 " /></td> 
      </tr> 
    </form>
</table> 
</body>
<%
if Request.QueryString("Act")="edit" then
	TopicRs.close
	Set TopicRs=nothing
	ClassRs.close
	Set ClassRs=nothing
	OperateDebateRs.close
	Set OperateDebateRs=nothing
	UserGroupRs.close
	Set UserGroupRs=nothing
	Conn.close
	Set Conn=nothing
	User_Conn.close
	Set User_Conn=nothing
elseif  Request.QueryString("Act")="EditDebate" then
	parentIDRs.close
	Set parentIDRs=nothing
elseif Request.QueryString("Act")="AddChile" then
	currentTopicRs.close
	Set currentTopicRs=nothing
end if
%>
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
var request=true;
var result;
var ParamArray;
try
{
	request=new XMLHttpRequest();
}catch(trymicrosoft)
{
try
{
	request=new ActiveXObject("Msxml2.XMLHTTP")
}catch(othermicrosoft)
{
try
{
	request=new ActiveXObject("Microsoft.XMLHTTP")
}catch(filed)
{
	request=false;
}
}
}
if(!request) alert("Error initializing XMLHttpRequest!");
function getDebate(Obj,Str)
{
	var debateID=Obj.value;
	if(isNaN(debateID))
	{
		document.getElementById("Topic1_Container").innerHTML="";
		document.getElementById("Topic2_Container").innerHTML="";
		return ;
	}else if(debateID==0)
	{
		document.getElementById("Topic1_Container").innerHTML="";
		document.getElementById("Topic2_Container").innerHTML="";
		document.getElementById("current").innerHTML="";
		return ;
	}
	document.getElementById("current").innerHTML="";
	var url="getGroupDebate.asp?name="+Str+"&debateid="+debateID+"&r="+Math.random();//构造url
	request.open("GET",url,true);//建立连接
	request.onreadystatechange = getDebateResult;
	request.send(null);//传送数据,因为数据通过url传递了,所以这里传递的是null
}
function getDebateResult()//当服务器响应的时候就使用这个方法
{
	if(request.readyState ==4)//根据HTTP 就绪状态判断响应是否完成
	{
		if(request.status == 200)//判断请求是否成功
		{
			result=request.responseText;//获得响应的结果,也就是新的<select>
			if(result.indexOf("name='Topic1'")>0)
			{
				document.getElementById("Topic1_Container").innerHTML="|&nbsp;&nbsp;"+result;//将这个结果现实在客户端
				document.getElementById("Topic2_Container").innerHTML=""
			}
			if(result.indexOf("name='Topic2'")>0)
			{
				document.getElementById("Topic2_Container").innerHTML="|&nbsp;&nbsp;"+result;//将这个结果现实在客户端
			}
		}
	}
}
function OperateDebateSubmit()
{	
	var flag1=isEmpty('Title','Title_Alert');
	var flag2=isEmpty('Content','Content_Alert');
	var flag3=isEmpty('AccessFile','AccessFile_Alert');
	if(flag1&&flag2&&flag3)
	{
		document.operateDebate.submit();
	}
}
</script>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -