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

📄 wxl_conn.asp

📁 诚信商店系统源代码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!--#include file="conn.asp"-->


<%


'根据ID取出操作员名称
function GetOperName(tmpID)
  set tmpSql1=server.createobject("ADODB.recordset")
  if tmpID="" then tmpID=0
  tmpSql1.open "select str_sOperName from web_SysOperators where int_sOperID="&tmpID,conn,1,1
  if not tmpSql1.eof then
    GetOperName=tmpSql1(0)
  else
    GetOperName=""
  end if  
  tmpSql1.close
  set tmpSql1=nothing
end function

'根据strSQL判断是否有相同记录
function IsIn(strSQL) 
  set tmpSql1=server.createobject("ADODB.recordset")
  tmpSql1.open strSQL,conn,1,1
  IsIn=not tmpSql1.eof
  tmpSql1.close
  set tmpSql1=nothing
end function

'根据strSQL获取ID
function GetID(strSQL) 
  set tmpSql1=server.createobject("ADODB.recordset")
'  response.write strSQL
  tmpSql1.open strSQL,conn,1,1
  if tmpSql1(0)<>"" then
    GetID=tmpSql1(0)
  else
    GetID=1
  end if
  tmpSql1.close
  set tmpSql1=nothing
end function


  'sub DelFile(tmpFileName)
   ' if tmpFileName<>"" then
	'	set FileObj=server.CreateObject("Scripting.FileSystemObject")
	'	FilePath=server.mappath(tmpFileName)
	'	if FileObj.FileExists(FilePath) then
	'	   FileObj.DeleteFile FilePath
	'	end if
	'	set FileObj=nothing
	'end if
  'end sub

  function html(str)
    on error resume next
    dim result
    dim l
    if isnull(str) then
       html=""
       exit function
    end if

    l=len(str)
    result=""
	dim i
	for i = 1 to l
	    select case mid(str,i,1)
	      case chr(34)
	        result=result+"&quot;"
	      case "&"
	        result=result+"&amp;"
	      case "<"
	        result=result+"&lt;"
	      case ">"
	        result=result+"&gt;"	        
	      case "'"
	        result=result+"''"
	      case chr(13)
	        result=result+"<br>"
	      case chr(9)
	        result=result+"&nbsp;&nbsp;&nbsp;&nbsp;"
	      case chr(32)	           
	        if i+1<=l and i-1>0 then
	          if mid(str,i+1,1)=chr(32) or mid(str,i+1,1)=chr(9) or mid(str,i-1,1)=chr(32) or mid(str,i-1,1)=chr(9)  then	                      
	           result=result+"&nbsp;"
	          else
	            result=result+" "
	          end if
	        else
	          result=result+"&nbsp;"	                    
	        end if
	      case else
	        result=result+mid(str,i,1)
        end select
       next 
       if err.number<>0 then err.clear
       html=result
   end function

  function Shtml(str)
    on error resume next
    dim result
    dim l
    if isnull(str) then
       html=""
       exit function
    end if
    l=len(str)
    result=""
	dim i
	for i = 1 to l
	    select case mid(str,i,1)
	      case chr(34)
	        result=result+"&quot;"
	      case "'"
	        result=result+"''"
	      case else
	        result=result+mid(str,i,1)
        end select
       next 
       if err.number<>0 then err.clear
       Shtml=result
   end function
   
   function UnShtml(strInput)
     dim sstrResult
     sstrResult = strInput
     sstrResult = Replace(sstrResult,"&nbsp;"," ")
     sstrResult = Replace(sstrResult,"''","'")
     sstrResult = Replace(sstrResult,"&quot;",chr(34))
     UnShtml = sstrResult
    end function 
   
   function UnHtml(strInput)
     dim sstrResult
	 if strInput<>"" then
     sstrResult = strInput
     sstrResult = Replace(sstrResult,"<br>",chr(13))
     sstrResult = Replace(sstrResult,"&nbsp;"," ")
     sstrResult = Replace(sstrResult,"''","'")
     sstrResult = Replace(sstrResult,"&quot;",chr(34))
     sstrResult = Replace(sstrResult,"&amp;","&")
	 end if
     UnHtml = sstrResult
    end function  

sub HtmlHead(Title)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=Title%></title>
<LINK href="/program/js/newcss.css" type=text/css rel=stylesheet>
</head>

<body leftMargin="15" topMargin="0"><%if void="db" then
response.write conn
end if%>

<div align="center">
  <table border="0"  cellspacing="0" cellpadding="3" align="center">
    <tr>
      <td width="100%" height="5" align="right"></td>
    </tr>
    <tr>
      <td width="100%" height="100%" valign="top">

  <table border="0" width="99%" cellpadding="0" cellspacing="1"  bgcolor="#0063C6">
    <tr>
      <td valign="top" align="center" bgcolor="#FFFFFF">

          <table border="0" width="100%" cellspacing="0" cellpadding="0" align="center" background="/program/images/bg1.gif">
            <tr>
              <td style="font-size:11pt; color:#FFFFFF">&nbsp;<b><%=Title%></b></td>
			  <td height="25" align="right"><a href="javascript:location.href='/program/welcome.asp';"><img border="0" src="/program/images/button03.jpg"></a>
			  </td>
			  <td width="2"></td>
            </tr>
          </table>
		  <table width='100%' bgcolor=#ffffff><tr height=15><td>&nbsp;</td></tr></table>
<%
end sub

sub HtmlEnd()
%>
      </td>
    </tr>
  </table>
</div>

	  </td>
    </tr>
    <tr>
      <td width="100%" height="5"> </td>
    </tr>
  </table>
</div>
</body>
</html>

<%
end sub

sub HtmlHeadOld(Title)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/program/js/style.css" type="text/css">
</head>
<CENTER>
  <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" align=center>
    <tr>
      <td>
        <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" width="100%" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
          <tr bgcolor=#adbee7>
            <td style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><font color=#FFFFFF><%=Title%></font></td>
			</tr>
        </table>
        <table border="0" bgcolor="rgb(214,211,206)" cellspacing="1" style="font-family: 宋体; font-size: 10.5pt; border: 1px ridge">
          <tr>
          <td valign="top">&nbsp; </td>
            <td align="center" >

<%end sub


sub HtmlEndOld()
%>
            </td>
            <td valign="top">&nbsp; </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</CENTER>
</BODY>
</HTML>
<%
end sub

Function GetKey() 
  Dim key_array(57)
  Dim i 
  For i = 0 To 56
    key_array(i) = Chr(65 + i)
  Next
  Randomize
  For i = 0 To 12
   GetKey = GetKey & key_array(Int((56 - 0 + 1) * Rnd + 0))
  Next
End Function


Function Encrypt(strSource)
  Dim Key1 
  Dim Key2 
  Dim bLowData 
  Dim bHigData 
  Dim i 
  Dim strEncrypt 
  Dim strChar 
  Key1 = 65
  Key2 = 135
  For i = 1 To Len(strSource)
    strChar = Mid(strSource, i, 1)
    bLowData = AscB(MidB(strChar, 1, 1)) Xor Key1
    bHigData = AscB(MidB(strChar, 2, 1)) Xor Key2
    strEncrypt = strEncrypt & ChrB(bLowData) & ChrB(bHigData)
  Next
  Encrypt = strEncrypt
End Function

'///////生成下拉日期列表
'//ShowDate strTmp,strBegin,defauYear,defauMonth
'//参数说明strTmp----字段名称,strBegin----距当前年份多少年前,defuYear---默认距当年差多少年,defauMonth----默认显示月份
sub ShowDate(strTmp,strBegin,defauYear,defauMonth)
  BeginYear=year(date)-strBegin
  defauYear=year(date)-defauYear
  response.write "<select name='"&strTmp&"yy'>"
  for i=0 to strBegin 
     response.write  "<option value='"&BeginYear+i&"'"
     if defauYear=BeginYear+i then response.write " selected"
	 response.write ">"&BeginYear+i&"</option>"
  next
  response.write "</select><select name='"&strTmp&"mm'>"
  for i=1 to 12
    response.write " <option value='"&i&"'"
	if defauMonth=i then response.write " selected"
	response.write ">"&i&"</option>"
  next
  response.write "</select><select name='"&strTmp&"dd'>"
  for i=1 to 31
    response.write " <option value='"&i&"'"
	if i=day(now) then response.write " selected"
	response.write ">"&i&"</option>"
  next
  response.write "</select>"
end sub

sub NewShowInfoBox(strPic,strMessage,strAction)
  %>
  <table border="1" bordercolorlight="000000" bordercolordark="FFFFFF" cellspacing="0" bgcolor="#C0C0C0" align=center>
    <tr>
      <td>
        <table border="0" bgcolor="#0099FF" cellspacing="0" cellpadding="2" width="350">
          <tr style="background-color: rgb(0,0,128); color: rgb(255,255,255)">
            <td width="342" style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><font color="FFFFFF">¤提示信息</font></td>
            <td style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><a href="JavaScript:<%=strAction%>"><img src="../images/close.gif" border="0"></a></td>
          </tr>
        </table>
        <table border="0" width="350" cellpadding="4">
          <tr> 
            <td width="59" align="center" valign="top"><font face="Wingdings" color="#0099FF" style="font-size:32pt"><%=strPic%></font></td>
            <td width="269"><p><%=strMessage%></p></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <%
  end sub
  
  sub ShowInfoBox(strPic,strMessage)
  %>
  <table border="1" bordercolorlight="000000" bordercolordark="FFFFFF" cellspacing="0" bgcolor="#C0C0C0" align=center>
    <tr>
      <td>
        <table border="0" bgcolor="#0099FF" cellspacing="0" cellpadding="2" width="350">
          <tr style="background-color: rgb(0,0,128); color: rgb(255,255,255)">
            <td width="342" style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><font color="FFFFFF">¤提示信息</font></td>
            <td style="background-color: rgb(0,0,128); color: rgb(255,255,255)"><a href="JavaScript:window.close()"><img src="../images/close.gif" border="0"></a></td>
          </tr>
        </table>
        <table border="0" width="350" cellpadding="4">
          <tr> 
            <td width="59" align="center" valign="top"><font face="Wingdings" color="#0099FF" style="font-size:32pt"><%=strPic%></font></td>
            <td width="269"><p><%=strMessage%></p></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <%
  end sub

⌨️ 快捷键说明

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