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

📄 pubfun_crm_a.asp

📁 OFFICE办公自动化
💻 ASP
字号:
<%
	function formatDT(s,sformat)
		'格式化日期时间s为要格式化的日期时间,sformat为格式串yyyy表示4位年,yy表示2位年
		'mm表示2位月,m表示一位月,dd表示2位日,d表示一位日
		'hh表示2位小时,h表示一位
		'nn表示2位分,n表示一位
		'ss表示2位秒,s表示一位
		if not isdate(s) then
			formatDT=s
			exit function
		end if
		dim y4,y2,m2,m1,d2,d1,h2,h1,n2,n1,s2,s1
		dim ss1,ss
		ss1=cdate(s)
		y4=year(ss1)
		y2=right(y4,2)
		m1=Month(ss1)
		m2=string(2-len(cstr(month(ss1))),"0") & cstr(month(ss1))
		d1=day(ss1)
		d2=string(2-len(cstr(day(ss1))),"0") & cstr(day(ss1))
		h1=Hour(ss1)
		h2=string(2-len(cstr(hour(ss1))),"0") & cstr(hour(ss1))
		n1=Minute(ss1)
		n2=string(2-len(cstr(Minute(ss1))),"0") & cstr(Minute(ss1))
		s1=Second(ss1)
		s2=string(2-len(cstr(Second(ss1))),"0") & cstr(Second(ss1))
		ss=replace(sformat,"yyyy",y4)
		ss=replace(ss,"yy",y2)
		ss=replace(ss,"mm",m2)
		ss=replace(ss,"m",m1)
		ss=replace(ss,"dd",d2)
		ss=replace(ss,"d",d1)
		ss=replace(ss,"hh",h2)
		ss=replace(ss,"h",h1)
		ss=replace(ss,"nn",n2)
		ss=replace(ss,"n",n1)
		ss=replace(ss,"ss",s2)
		ss=replace(ss,"s",s1)
		formatDT=ss
	end function

	function dostr(s,l)
		dim ss,i,ch,ll
		ss=""
		ll=0
		for i=1 to len(s)
		  ch=mid(s,i,1)
		  if asc(ch)=13 then exit for
		  if asc(ch)<255 and asc(ch)>0 then
			ll=ll+1
		  else
					ll=ll+2
		  end if
		  ss=ss & ch
		  if ll>= l then
			exit for
		  end if
		next
		if len(ss)<len(s) then
		  ss=ss & " ..."
		end if
		dostr=ss
	end function

	function getweekdayname(s)
		on error resume next
		getweekdayname=""
		if not isdate(s) then
			select case trim(cstr(s))
				case "1"
					getweekdayname="星期一"
				case "2"
					getweekdayname="星期二"
				case "3"
					getweekdayname="星期三"
				case "4"
					getweekdayname="星期四"
				case "5"
					getweekdayname="星期五"
				case "6"
					getweekdayname="星期六"
				case "7"
					getweekdayname="星期日"
			end select
		else
			select case Weekday(s,vbMonday)
				case 1
					getweekdayname="星期一"
				case 2
					getweekdayname="星期二"
				case 3
					getweekdayname="星期三"
				case 4
					getweekdayname="星期四"
				case 5
					getweekdayname="星期五"
				case 6
					getweekdayname="星期六"
				case 7
					getweekdayname="星期日"
			end select
		end if
	end function

	Function ShowErrMsg(smsg,stitle,bclose)
%>
	<SCRIPT LANGUAGE=vbscript>
	<!--
		msgbox "<%=smsg%>",vbExclamation,"<%=stitle%>"
		if <%if bclose then response.write "true" else response.write "false"%> then
			window.close
		else
			history.back
		end if
	-->
	</SCRIPT>
<%
	end function

	Function ShowErrMsg_1(smsg,stitle,surl)
%>
	<SCRIPT LANGUAGE=vbscript>
	<!--
		msgbox "<%=smsg%>",vbExclamation,"<%=stitle%>"
		location.href="<%=surl%>"
	-->
	</SCRIPT>
<%
	end function
%>
 

⌨️ 快捷键说明

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