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

📄 checkaccount.asp

📁 1 除掉了 时间 限制 2 除掉了 人数 限制 改为 500人 原为5人 3 发现一点小缺陷 增加人员的时候没有判断 登陆名是否重复! 自己写吧~~~:) 4 又 是一点缺陷
💻 ASP
字号:
<!--#include file="../config.ini" -->
<!--#include file="../commfunction.inc" -->
<%
Dim objcheck
Set objcheck=Server.CreateObject("SmartSales.CheckFunction")
objcheck.CheckUserFunction "account","read"
set objcheck=nothing
dim conn
dim rs 
set conn=server.CreateObject("adodb.connection")
set rs=server.CreateObject("adodb.recordset")
conn.Open connstring

if Request.QueryString("orderbyfield")<>"" then
	'排序字段改变返回第一页
	if session("orderbyfield")<>Request.QueryString("orderbyfield") then
		tofirstpage=true
	else
		tofirstpage=false
	end if
	
	'翻页时保持排序方式,不翻页循环改变升序/降序
	if request("turnpage")="" then
		if request("orderby")="" or request("orderby")="desc" then
			session("orderby")="asc"
		else
			session("orderby")="desc"
		end if
		strwhere=strwhere & " order by "&Request.QueryString("orderbyfield")&" "&session("orderby")
	else
		if request("orderbyfield")<>"" then
			strwhere=strwhere & " order by "&Request.QueryString("orderbyfield")&" "&session("orderby")
		end if
	end if	
	
	'保存当前排序字段
	session("orderbyfield")=Request.QueryString("orderbyfield")
else
	strwhere=strwhere & " order by lastmoddate desc,accountlevel desc"
end if
rs.Open "select top 100 * from v_account where account like '%"&request("account")&"%'"&strwhere,conn,1,1

if Request.QueryString("CurPage") = "" or Request("CurPage") = 0 or tofirstpage=true then
	CurPage = 1 
else
	CurPage = cint(Request.QueryString("CurPage"))
end If

if not Rs.eof then
	Rs.PageSize=session("PageSize")
	Rs.AbsolutePage=CurPage
else
	CurPage=0
end if
%>
<html>
<head>
<LINK href="../global.css" rel=STYLESHEET type=text/css>
<LINK href="../tools/menu.css" rel=STYLESHEET type=text/css>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>客户审核</title>
</head>
<body leftmargin="10" rightmargin="10" topmargin="10">
<form name="form1" method="post" action="account.asp"   onsubmit="return GetStrValue();">
  <table width="100%" height="20" border="0" cellpadding="0" cellspacing="0">
    <tr> 
      <td width="10%">&nbsp; </td>
      <td width="18%">
	  <div id=strvalue1 <%if request("strfield")<>"accounttype" and request("strfield")<>"owner" and request("strfield")<>"industry" and request("strfield")<>"province1" or request("strfield")=""  then response.write "style=display:block" else response.write "style=display:none" end if%>> 
        </div>  <div id=strvalue2 <%if request("strfield")="accounttype" then response.write "style=display:block" else response.write "style=display:none" end if%>> 
        </div>
        <div id=strvalue3 <%if request("strfield")="owner" then response.write "style=display:block" else response.write "style=display:none" end if%>> 
        </div>  <div id=strvalue4 <%if request("strfield")="industry" then response.write "style=display:block" else response.write "style=display:none" end if%>> 
        </div>
	    <div id=strvalue5 <%if request("strfield")="province1" then response.write "style=display:block" else response.write "style=display:none" end if%>> 
        </div>
		</td>
      <td>&nbsp; </td>
      <td width=30%><div id=dateformat <%if request("strfield")="lastmoddate" then response.write "style=display:block" else response.write "style=display:none" end if%>></div></td>
    </tr>
    <tr> 
      <td height="25" colspan=4><strong><font size="2" class=title>客户审核</font></strong></td>
    </tr>
    <tr > 
      <td height="16" colspan="4" background="../images/title.gif">&nbsp;</td>
    </tr>
	<tr><td  colspan="4" height=4></td></tr>
  </table>
  <table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#DECFAD">
    <tr bgcolor="#EFEFEF"> 
      <td height="22" align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=account&orderby=<%=session("orderby")%>">客户</a></td>
      <td width="14%"  align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=accounttype&orderby=<%=session("orderby")%>">客户类型</a></td>
      <td width="14%"  align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=industry&orderby=<%=session("orderby")%>">行业</a></td>
      <td width="14%"  align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=accountlevel&orderby=<%=session("orderby")%>">星级</a></td>
      <td width="14%"  align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=owner&orderby=<%=session("orderby")%>">所有者</a></td>
      <td width="14%" align=center><a href="account.asp?CurPage=<%=CurPage%>&strfield=<%=request("strfield")%>&strvalue=<%=request("strvalue")%>&orderbyfield=lastmoddate&orderby=<%=session("orderby")%>">创建日期</a></td>
    </tr>
    <%
  set accountid=rs("accountid")
  set accounttype=rs("accounttype")
  set industry=rs("industry")
  set province1=rs("province1")
  set lastmoddate=rs("lastmoddate")
  set owner=rs("owner")
  set account=rs("account")
  set accountlevel=rs("accountlevel")
  if not rs.eof then
  do while not rs.EOF %>
    <tr bgcolor="#FFFFFF"> 
      <td height="22" align=center><%=account%></td>
      <td align=center><%=accounttype%></td>
      <td align=center><%=industry%></td>
      <td align=center><font color=red><strong> 
        <%
	  if accountlevel<>"" then
	  	if accountlevel>0 then
			for l=1 to accountlevel
				'response.Write "<img src=../images/star1.gif>"
				response.Write "★"				
			next
		end if
	  end if
	  %>
        </strong></font></td>
      <td align=center><%=owner%></td>
      <td align=center valign="middle"><%=rs("createdate")%></td>
    </tr>
    <tr bgcolor="#FFFFFF" border=0  id='tr1<%=i%>' style=display:none> 
      <td colspan=6>&nbsp; </td>
    </tr>
    <%
  rs.MoveNext
  loop
  else
%>
 <tr bgcolor="#FFFFFF"> 
      <td height="22" colspan=6 align=center>无同名客户</td>
     <%end if%>
  </table>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr height="50">
      <td>&nbsp;</td>
    </tr></table>
<%
  rs.Close
  set rs=nothing
  conn.Close 
  set conn=nothing
%>
</form>
</body>
</html>

⌨️ 快捷键说明

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