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

📄 func2.asp

📁 功能最强大的ASP网站
💻 ASP
字号:




<%

sub PopErr(Mesg)
%>
 <script language='javascript'>
<!--
alert('<%=Mesg%>');
history.go(-1);
-->
</script>     
<%
response.end
end sub

sub PopErr2(Mesg)
%>
 <script language='javascript'>
<!--
alert('<%=Mesg%>');
-->
</script>     
<%
end sub

sub print_chcountry(slt)%>
<option value='中国大陆' <%if slt="中国大陆" then response.write "selected" end if%>>中国大陆</option>
<option value='香港特别行政区' <%if slt="香港特别行政区" then response.write "selected" end if%>>香港特别行政区</option>
<option value='台湾地区' <%if slt="台湾地区" then response.write "selected" end if%>>台湾地区</option>
<option value='澳门特别行政区' <%if slt="澳门特别行政区" then response.write "selected" end if%>>澳门特别行政区</option>
<option value='其他' <%if slt="其他" then response.write "selected" end if%>>其他</option>
<%
end sub

sub print_encountry(slt)%>
<option value='China' <%if slt="China" then response.write "selected" end if%>>China</option>
<option value='Hong Kong' <%if slt="Hong Kong" then response.write "selected" end if%>>Hong Kong</option>
<option value='Taiwan prov.' <%if slt="Taiwan prov." then response.write "selected" end if%>>Taiwan prov.</option>
<option value='Macau' <%if slt="Macau" then response.write "selected" end if%>>Macau</option>
<option value='Others' <%if slt="Others" then response.write "selected" end if%>>Others</option>
<%
end sub

sub print_chprovince(slt)%>
<option value='北京' <%if slt="北京" then response.write "selected" end if%>>北京</option>
<option value='福建' <%if slt="福建" then response.write "selected" end if%>>福建</option>
<option value='安徽' <%if slt="安徽" then response.write "selected" end if%>>安徽</option>
<option value='重庆' <%if slt="重庆" then response.write "selected" end if%>>重庆</option>
<option value='甘肃' <%if slt="甘肃" then response.write "selected" end if%>>甘肃</option>
<option value='广东' <%if slt="广东" then response.write "selected" end if%>>广东</option>
<option value='广西' <%if slt="广西" then response.write "selected" end if%>>广西</option>
<option value='贵州' <%if slt="贵州" then response.write "selected" end if%>>贵州</option>
<option value='海南' <%if slt="海南" then response.write "selected" end if%>>海南</option>
<option value='河北' <%if slt="河北" then response.write "selected" end if%>>河北</option>
<option value='黑龙江' <%if slt="黑龙江" then response.write "selected" end if%>>黑龙江</option>
<option value='河南' <%if slt="河南" then response.write "selected" end if%>>河南</option>
<option value='湖北' <%if slt="湖北" then response.write "selected" end if%>>湖北</option>
<option value='湖南' <%if slt="湖南" then response.write "selected" end if%>>湖南</option>
<option value='内蒙古' <%if slt="内蒙古" then response.write "selected" end if%>>内蒙古</option>
<option value='江苏' <%if slt="江苏" then response.write "selected" end if%>>江苏</option>
<option value='江西' <%if slt="江西" then response.write "selected" end if%>>江西</option>
<option value='吉林' <%if slt="吉林" then response.write "selected" end if%>>吉林</option>
<option value='辽宁' <%if slt="辽宁" then response.write "selected" end if%>>辽宁</option>
<option value='宁夏' <%if slt="宁夏" then response.write "selected" end if%>>宁夏</option>
<option value='青海' <%if slt="青海" then response.write "selected" end if%>>青海</option>
<option value='山西' <%if slt="山西" then response.write "selected" end if%>>山西</option>
<option value='陕西' <%if slt="陕西" then response.write "selected" end if%>>陕西</option>
<option value='山东' <%if slt="山东" then response.write "selected" end if%>>山东</option>
<option value='上海' <%if slt="上海" then response.write "selected" end if%>>上海</option>
<option value='四川' <%if slt="四川" then response.write "selected" end if%>>四川</option>
<option value='天津' <%if slt="天津" then response.write "selected" end if%>>天津</option>
<option value='西藏' <%if slt="西藏" then response.write "selected" end if%>>西藏</option>
<option value='新疆' <%if slt="新疆" then response.write "selected" end if%>>新疆</option>
<option value='云南' <%if slt="云南" then response.write "selected" end if%>>云南</option>
<option value='浙江' <%if slt="浙江" then response.write "selected" end if%>>浙江</option>
<option value='其他' <%if slt="其他" then response.write "selected" end if%>>其他</option>

<%
end sub

sub print_enprovince(slt)%>
<option value='Beijing'  <%if slt="Beijing" then response.write "selected" end if%>>Beijing</option>
<option value='Fujian' <%if slt="Fujian" then response.write "selected" end if%>>Fujian</option>
<option value='Anhui'  <%if slt="Anhui" then response.write "selected" end if%>>Anhui</option>
<option value='Chongqing'  <%if slt="Chongqing" then response.write "selected" end if%>>Chongqing</option>
<option value='Gansu'  <%if slt="Gansu" then response.write "selected" end if%>>Gansu</option>
<option value='Guangdong'  <%if slt="Guangdong" then response.write "selected" end if%>>Guangdong</option>
<option value='Guangxi'  <%if slt="Guangxi" then response.write "selected" end if%>>Guangxi</option>
<option value='Guizhou'  <%if slt="Guizhou" then response.write "selected" end if%>>Guizhou</option>
<option value='Hainan'  <%if slt="Hainan" then response.write "selected" end if%>>Hainan</option>
<option value='Hebei'  <%if slt="Hebei" then response.write "selected" end if%>>Hebei</option>
<option value='Heilongjiang'  <%if slt="Heilongjiang" then response.write "selected" end if%>>Heilongjiang</option>
<option value='Henan'  <%if slt="Henan" then response.write "selected" end if%>>Henan</option>
<option value='Hubei'  <%if slt="Hubei" then response.write "selected" end if%>>Hubei</option>
<option value='Hunan'  <%if slt="Hunan" then response.write "selected" end if%>>Hunan</option>
<option value='Inner Mongloia'  <%if slt="Inner Mongloia" then response.write "selected" end if%>>Inner Mongloia</option>
<option value='Jiangsu'  <%if slt="Jiangsu" then response.write "selected" end if%>>Jiangsu</option>
<option value='Jiangxi'  <%if slt="Jiangxi" then response.write "selected" end if%>>Jiangxi</option>
<option value='Jilin'  <%if slt="Jilin" then response.write "selected" end if%>>Jilin</option>
<option value='Liaoning'  <%if slt="Liaoning" then response.write "selected" end if%>>Liaoning</option>
<option value='Ningxia'  <%if slt="Ningxia" then response.write "selected" end if%>>Ningxia</option>
<option value='Qinghai'  <%if slt="Qinghai" then response.write "selected" end if%>>Qinghai</option>
<option value='Shanxi'  <%if slt="Shanxi" then response.write "selected" end if%>>Shanxi</option>
<option value='Shaxi'  <%if slt="Shaxi" then response.write "selected" end if%>>Shaxi</option>
<option value='Shandong'  <%if slt="Shandong" then response.write "selected" end if%>>Shandong</option>
<option value='Shanghai'  <%if slt="Shanghai" then response.write "selected" end if%>>Shanghai</option>
<option value='Sichuan'  <%if slt="Sichuan" then response.write "selected" end if%>>Sichuan</option>
<option value='Tianjin'  <%if slt="Tianjin" then response.write "selected" end if%>>Tianjin</option>
<option value='Tibet'  <%if slt="Tibet" then response.write "selected" end if%>>Tibet</option>
<option value='Xinjiang'  <%if slt="Xinjiang" then response.write "selected" end if%>>Xinjiang</option>
<option value='Yunnan'  <%if slt="Yunnan" then response.write "selected" end if%>>Yunnan</option>
<option value='Zhejiang'  <%if slt="Zhejiang" then response.write "selected" end if%>>Zhejiang</option>
<option value='Others'  <%if slt="Others" then response.write "selected" end if%>>Others</option>
<%
end sub


'打印注册年限表框,PID:产品ID号, UserLevel:用户级别
sub PrintRegTime( PID, UserLevel ) %>
		<select size='1' class='form' name="applytime1">
		<option value="1">1</option>
		<option value="2">2</option>
		<option value="3">3</option>
		<option value="4">4</option>
		<option value="5">5</option>
		<option value="6">6</option>
		<option value="7">7</option>
		<option value="8">8</option>
		<option value="9">9</option>
		<option value="10">10</option>
		</select>		
		×
		<select size='1' class='form' name="applytime2" size='10'>
		<%
			sql = "select * from ProductPrice where PID='" & PID & "' and levelcode='"&UserLevel&"'"
			set rsp = conn.execute(sql)
			set rspp = conn.execute ("select * from product where ID='" & PID & "'")
			if rsp.eof or rspp.eof then
				session("mesg")="无法生成产品报价,可能是产品或价格设置不对"
				Response.Redirect "../result.asp"
			end if
			if rsp("A")<> "" then response.write "<option value='A'> "&rsp("A")&"元/"&rspp("A") & rspp ("priceType")&"</option> "
			if rsp("B")<> "" then response.write "<option value='B'> "&rsp("B")&"元/"&rspp("B") & rspp ("priceType")&"</option> "
			if rsp("C")<> "" then response.write "<option value='C'> "&rsp("C")&"元/"&rspp("C") & rspp ("priceType")&"</option> "
			if rsp("D")<> "" then response.write "<option value='D'> "&rsp("D")&"元/"&rspp("D") & rspp ("priceType")&"</option> "
			if rsp("E")<> "" then response.write "<option value='E'> "&rsp("E")&"元/"&rspp("E") & rspp ("priceType")&"</option> "
		%>
	</select>
<%
end sub

sub PrintRegInfo(PID)
set rspp = conn.execute ("select * from product where ID='" & PID & "'")
if rspp.eof then
	session("mesg")="产品不存在"
	Response.Redirect "../result.asp"
end if
if len(rspp("applyinfo")) > 1 then
%>
<img src='../images/dotdb.gif' width='10' height='10'> 
<font color='#000000'><%=rspp("applyInfo")%></font>
<%
end if
rspp.close
end sub

function CreateSearchSql(OrderType, status, username, sorttype, domainname ,strTmp, strTmp2, strTmp3)
status = request("status")
username=trim(request("username"))
sorttype = request("sorttype")
domainname = trim(request("domainname"))
if sorttype = "" then sorttype = "0"
if status = "" then status = "0"

	select case status
		case	"0"
			strTmp = " where  (status='正常')  "
		case	"1"
			strTmp = " where status in ('过期','欠费','暂停','删除')  "
		case	"2"
			strTmp = " where status not in ('正常','过期','欠费','暂停','删除')  "
		case	"3"
			strTmp = " where 1=1 "
	end select 
	
	if username <> "" then strTmp = strTmp & " and username like '%" & username & "%' "
	if domainname <> "" then strTmp2 = " and domainname like '%" & domainname & "%' "
	if sorttype = "0" then
		strTmp3 = " order by regtime desc "
	else
		strTmp3 = " order by regend "
	end if
end function

sub PrintSearchForm(OrderType, status, username, sorttype, domainname ,ActURL, width, Title)
%>
<table border=1 bordercolor=#3770A9 bordercolordark=#ffffff cellpadding=3 cellspacing=0 width=<%=width%>% class='size09' align='center'>
<form method="POST" action="<%=ActURL%>">
<tr><td class='color01' bgcolor='#efefef' align="center" colspan="10"><b><%=Title%></b></tr>
<tr>
<td class='color01' bgcolor='#efefef'>
	
		用户名<input type="text" name="username" size="10" class="form" value="<%=username%>">
		域名 <input type="text" name="domainname" size="10" class="form" value="<%=domainname%>">
	
		状态
		<select name="status">
					 <option value="0">正常
					<option value="1" <%if status="1" then response.write "selected"%>>非正常
					<option value="2" <%if status="2" then response.write "selected"%>>其它
					<option value="3" <%if status="3" then response.write "selected"%>>全部
					</select>
		排序
				<select name="sorttype">
					 <option value="0">注册日期
					<option value="1" <%if sorttype="1" then response.write "selected"%>>到期日期
					</select>
					&nbsp;&nbsp;<input type='submit' class='form' value='搜索符合条件的记录' name='B1'></td></form> </tr>

</table>
<%
end sub

sub PrintSearchForm2(status, username, sorttype, domainname ,ActURL, width, Title)
%>
<table border=1 bordercolor=#3770A9 bordercolordark=#ffffff cellpadding=3 cellspacing=0 width=<%=width%>% class='size09' align='center'>
<form method="POST" action="<%=ActURL%>">
<tr><td class='color01' bgcolor='#efefef' align="center" colspan="10"><b><%=Title%></b></tr>
<tr>
<td class='color01' bgcolor='#efefef'>
	
		用户名<input type="text" name="username" size="10" class="form" value="<%=username%>">
		域名 <input type="text" name="domainname" size="10" class="form" value="<%=domainname%>">
		状态
		<select name="status">
					 <option value="0">正常
					<option value="1" <%if status="1" then response.write "selected"%>>非正常
					<option value="2" <%if status="2" then response.write "selected"%>>其它
					<option value="3" <%if status="3" then response.write "selected"%>>全部
					</select>
		排序
				<select name="sorttype">
					 <option value="0">注册日期
					<option value="1" <%if sorttype="1" then response.write "selected"%>>到期日期
					</select>
					&nbsp;&nbsp;<input type='submit' class='form' value='搜索符合条件的记录' name='B1'></td></form> </tr>

</table>
<%
end sub


sub PrintSetPage(rs,pagecount)
if not rs.eof then
if not isempty(request("page")) then   
     pagecount=cint(request("page"))   
     else 
     pagecount=1 
     end if
	 if session("PageSize")="" or not IsNumeric(session("PageSize")) then
	 	session("PageSize") = "20"
	 end if
	  rs.pagesize=session("PageSize")
     if pagecount>rs.pagecount or pagecount<=0 then              
     pagecount=1              
     end if              
     if not rs.eof then rs.AbsolutePage=pagecount
end if
end sub

sub PrintPage(pagecount, rs, URL) 
if rs.pagecount > 0 then
%>
<%=pagecount%>/<%=rs.pagecount%>&nbsp;
<% 
i=1
do while i<rs.pagecount+1 %> 
<%if i<> pagecount then%>
<A HREF=<%=URL%>&page=<%=i%>><%=i%></A>
<%else%>
<%=i%>
<%end if%>
<%i=i+1%>
<%loop
end if
end sub

sub PrintRecNum(rs)
%>
<br><img src='../images/dotdb.gif' width='10' height='10'> 
           共计 <%=rs.recordcount%> 条记录<br><br>
<%end sub

function CheckDomainPX(domain)
dim regEx,Matches, Match
set regEx=New RegExp
regEx.Pattern="[^A-Za-z0-9\-]"
regEx.IgnoreCase = True

For i = 1 To Len(domain)
       ThisChr = Mid(domain, i, 1)
        If Abs(Asc(ThisChr)) < &HFF Then
            strReturn = strReturn & ThisChr
        End If
Next
	
Set Matches = regEx.execute(strReturn)
if Matches.count then
	CheckDomainPX ="域名格式不对:域名只能由字符数字和横给组成"
	exit function
end if

if mid(domain,1,1)="-" or mid(domain,len(domain),1)="-" then 
	CheckDomainPX = "域名格式不对:域名的首位和最后一位不能为-"
	exit function
end if

if len(domain) < 3 then
	CheckDomainPX = "域名格式不对:不能少于三位"
	exit function
end if 
end function
%>

⌨️ 快捷键说明

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