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

📄 question.asp

📁 WEB客户管理系统+小型OA系统。一个不错的程序
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>问题集</title>
<style type="text/css">
<!--
.STYLE5 {font-size: 20px}
.STYLE6 {color: #777777}
.STYLE9 {font-size: 12px; }
.STYLE10 {font-size: 20px; color: #777777; }
-->
</style>
</head>
<%
Rem Session("CRM_account") 用户帐号
Rem Session("CRM_name") 用户名
Rem Session("CRM_level") 用户等级

If Session("CRM_account") = "" Or Session("CRM_name") = "" Or Session("CRM_level") <= 0 Then Response.Redirect("login.asp")
%>

<!--#include file="Connections/conn.asp" -->

<script language="javascript">
  function check()
  {
      if (document.form3.question.value=="")
	  {
	  alert("问题不能为空!")
	  return false
	  }
   }  

</script>

<%
'if action="addnew" then
question=request.Form("question")
	if question<>"" then
	Set rs = Server.CreateObject("ADODB.Recordset")
	rs.open "select * from question",conn,3,2

	rs.addnew
	rs("username")=request.Form("username")
	rs("msgtype")="question"
	rs("addtime")=now()
	rs("info")="问题:<br>"&request.Form("question")
	rs("typeid")=rs("msgid")
	rs.update
	rs.close
	end if
'end if
%>

<body style="background-color: menu;" >
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr id="oHead" style="display: block;">
    <td height="1" valign="top"> 
      <table width="958" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="958" height="5"><img src="images/null.gif" width="1" height="1"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="menu">
        <tr> 
          <td align="left" background='images/tab_top_background_runner.gif'> <table width="5" border="0" align="left" cellpadding="0" cellspacing="0">
            <tr>
              <td><img src="images/null.gif" width="1" height="1"></td>
            </tr>
          </table>
          <table onClick="window.location.replace('listAll.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr > 
              <td><img src="images/tab_on_left.gif" width="16" height="24"></td>
              <td background="images/tab_on_middle.gif"><span class="STYLE9">查看所有数据</span></td>
              <td><img src="images/tab_on_right.gif" width="16" height="24"></td>
            </tr>
          </table>
          <table onClick="window.location.replace('addData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr>   
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">添加数据</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>	  
          <table onClick="window.location.replace('advanceSearch.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">高级搜索</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
          <table onClick="window.location.replace('dataForm.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">数据报表</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
          <table onClick="window.location.replace('exportData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">数据导出</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
		  <table onClick="window.location.replace('question.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">问题集</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
		  <table onClick="window.location.replace('plan.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">计划与总结</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
<% If Session("CRM_level") = 9 Then %>
          <table onClick="window.location.replace('transData.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
            <tr> 
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">数据转移</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
          <table onClick="window.location.replace('manageUser.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
              <tr> 
                <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
                <td background="images/tab_off_middle.gif"><span class="STYLE9">用户管理</span></td>
                <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
              </tr>
            </table>
			<table onClick="window.location.replace('system_level.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="left">
              <tr> 
                <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
                <td background="images/tab_off_middle.gif"><span class="STYLE9">系统设置</span></td>
                <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
              </tr>
            </table>
<% End If %>
            <table onClick="window.location.replace('logout.asp')" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="right">
              <tr>    
              <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
              <td background="images/tab_off_middle.gif"><span class="STYLE9">注销</span></td>
              <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
            </tr>
          </table>
            <table onClick="window.location.reload();" style="cursor: hand;" border="0" cellspacing="0" cellpadding="0" align="right">
              <tr> 
                <td><img src="images/tab_off_left.gif" width="16" height="24"></td>
                <td background="images/tab_off_middle.gif"><span class="STYLE9">刷新</span></td>
                <td><img src="images/tab_off_right.gif" width="16" height="24"></td>
              </tr>
            </table></td>
      </tr>
    </table>
<form id="form1" name="form1" method="post" action="search.asp">
  <div align="center">问题搜索:
    <label>
    <input name="search" type="text" id="search" />
    <input type="submit" name="Submit" value="搜 索" />
</label>
    <div align="right"><a href="question.asp?action=<%="myquestion"%>"> <font class="STYLE9">我的问题</a>
      </div>
  </div>
</form>
<hr align="center" width="800" />
<p align="center" class="STYLE5 STYLE6">问题锦集</p>
<%
typeid=request.QueryString("typeid")
if typeid<>"" then
conn.execute("delete from question where typeid="&typeid)
end if


set rs=server.CreateObject("adodb.recordset")
sql="select * from [question] where msgtype='question' order by addtime desc"
rs.open sql,conn,3,1
     if rs.recordcount>0 then
	 dim num,pagenum,page,lablenum
	     rs.pagesize=20
		 num=rs.recordcount
		 pagenum=rs.pagecount
		 page=request("page")
			 if page<>"" then
				 page=cint(page)
				 if err.number<>0 then
				 err.clear
				 page=1
				 end if
				 
				 if page<1 then
				 page=1
				 end if
				 
			 else
				 page=1
			 end if
			 
		 if page*rs.pagesize > num and not((page-1)*rs.pagesize < num)then
			 page=1
		 end if
		rs.absolutepage = page 
		

%>	
<form id="form2" name="form2" method="post" action="?">
  <table width="800" border="0" align="center" bordercolor="#999999" bgcolor="#CCCCCC">
    <tr>
      <td width="40"><div align="center" class="STYLE9">发言人</div></td>
      <td width="555"><div align="center" class="STYLE9">主要问题</div></td>
      <td width="137"><span class="STYLE9">问题提出时间</span></td>
	  <% If Session("CRM_level") = 9 Then %>
      <td width="50"><div align="center">删除</div></td>
	  <td width="50"><div align="center">回复</div></td>
	  <%end if%>
    </tr>
  </table>
  <%

  do while not rs.eof 
  typeid=rs("typeid")
  
  if i mod 2=0 then
  %>
  <table width="800" border="0" align="center" bordercolor="#AAAAAA"  bgcolor="#CCCCCC"> 
  <%else%>
  <table width="800" border="0" align="center" bordercolor="#AAAAAA"  bgcolor="#999999">
  <%end if%>
  <%set ps=conn.execute("select * from [question] where typeid="&typeid&" order by addtime asc")%>

	<%while not ps.eof%>
	 <tr>
      <td width="42"  bgcolor="menu" align="center"><span class="STYLE9"><%=ps("username")%></span></td>
      <%
	  if ps("msgid")=rs("typeid") then
	  %>
	  <td width="554" bgcolor="menu"><span class="STYLE9"><%=ps("info")%></span></td>
	  <%else%>
	  <td width="554" bgcolor="menu"><span class="STYLE9"><font color="blue"><%=ps("info")%></font></span></td>
      <%end if%>
	  <td width="137" bgcolor="menu" align="center"><span class="STYLE9"><%=ps("addtime")%></span></td>
      <% If Session("CRM_level") = 9 Then %>
	  <td width="49" bgcolor="menu" align="center"><a href="question.asp?typeid=<%=ps("typeid")%>">删除</a></td>
	  <td width="49" bgcolor="menu" align="center"><a href="q_list.asp?typeid=<%=ps("typeid")%>" class="STYLE9">回复</a></td>
	  <%end if%>
    </tr>
	<%
	ps.movenext
	wend
	ps.close
	%>
	<br>
  </table>

 	<%i=i+1
	if i>=rs.pagesize then Exit do
	
  rs.movenext
 
 loop
 
 rs.close
end if
  %>
    <!--当前页的记录显示结束,以下代码为记录集分页链接代码-->
<table width="70%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr> 
<td height="35"> 
<div align="right">
<font color="#333333">
共有 <%=num%> 个问题 | 
<a href=question.asp?page=1>首页</a> | 
<%if page>1 then%><a href=question.asp?page=<%=page-1%>><%end if%>上一页</a> | 
<%if page<pagenum then%><a href=question.asp?page=<%=page+1%>><%end if%>下一页</a> | 
<a href=question.asp?page=<%=pagenum%>>尾页</a> | 
页次:<%=page%>/<%=pagenum%>页 | 
共<%=pagenum%>页
</font>
</div>
</td>
</tr>
</table>
<!--记录集分页链接代码结束,记录集为空时执行以下代码-->
		
</form>
 
<p>&nbsp;</p>
<hr width="800" />
<p align="center" class="STYLE10">提出新问题</p>
<form id="form3" name="form3" method="post" action="" onsubmit="return check();">
  <table width="560" border="0" align="center" bordercolor="#AAAAAA">
    <tr>
      <td width="82" bordercolor="#AAAAAA"><span class="STYLE9">发言人:</span></td>
      <td width="468" bordercolor="#AAAAAA"><span class="STYLE9">
        <label>
        <input name="username" type="text" id="username" value="<%=Session("CRM_name")%>" size="30" readonly="true">
        </label>
      </span></td>
    </tr>
    <tr>
      <td bordercolor="#AAAAAA"><span class="STYLE9">主要问题:</span></td>
      <td bordercolor="#AAAAAA"><span class="STYLE9">
        <label>
        <textarea name="question" cols="60" rows="8" id="question"></textarea>
        </label>
      </span></td>
    </tr>
    <tr>
      <td colspan="2" bordercolor="#AAAAAA" align="center"><span class="STYLE9">
        <label>
        <input type="submit" name="Submit2" value="提 交" />
        </label>
      </span></td>
    </tr>
  </table>
</form>
<p align="center" class="STYLE10">&nbsp;</p>
</body>
</html>

⌨️ 快捷键说明

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