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

📄 inc_function.asp

📁 Computer SHOP+DATABASE
💻 ASP
📖 第 1 页 / 共 2 页
字号:
	strInputEntry = Replace(strInputEntry, "|", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "&", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "^", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "#", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "$", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "?", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, ";", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, ",", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "<", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, ">", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, """", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "'", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "[", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "]", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "{", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "}", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "!", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "%", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, vbNewLine, " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "●", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "   ", " ", 1, -1, 1)
	strInputEntry = Replace(strInputEntry, "  ", " ", 1, -1, 1)
	
	filterChar = strInputEntry
End function
'-----------------------------------------------------------------------------------
function addMail(intGroup,strName,strMail)
	on error resume next
	Randomize Timer
	strMailCode = Left(strMail,2) & (9876989856 * CInt((RND * 32000) + 100))
	strSQL = "INSERT INTO tb_Email(mail_group,mail_name,mail_email,mail_code) VALUES("
	strSQL = strSQL & intGroup & ",'" & strName & "','" & strMail & "','" & strMailCode & "')"
	Conn.Execute(strSQL)
	addMail = True
End Function
'-----------------------------------------------------------------
'Doi ngay thang sang dang dd/mm/yyyy
Function CDay(dayval)
	If dayval<>"" then
		CDay=Day(dayval) &"/" &Month(dayval) &"/" &Year(dayval)
	Else
		CDay=""
	End if
End Function
'---------------------------------------------------------------------------
Function GetIntro(text,length)
	If Len(text)>length Then
		xpos=InStr(length,text," ")
		If xpos>0 Then
			GetIntro=Left(text,xpos)
		Else	
			xpos=InStr(length-10,text," ")	
			If xpos>0 Then
				GetIntro=Left(text,xpos)
			Else
				GetIntro=Left(text,length)
			End If
		End If
		GetIntro=GetIntro &"..."
	Else
		GetIntro=text
	End If
End Function
'-----------------------------------------------------------------
%>
<SCRIPT language="JavaScript">
function sconfirm(strMess,strURL){
var yn;
yn=window.confirm(strMess);
if (yn==true){
	document.location.href=strURL;
	}
}
function askconf(strMess){
var yn;
yn=window.confirm(strMess);
if (yn==true){
	return true;
	}
return false;
}
function checkFrmOrder(theF){
if (theF.nguoidat.value==""){
alert ("Fullname can not be blank.");
theF.nguoidat.focus();
return (false);
}
if (theF.diachidat.value==""){
alert ("Address can not be blank.");
theF.diachidat.focus();
return (false);
}
if (theF.teldat.value==""){
alert ("Telephone can not be blank.");
theF.teldat.focus();
return (false);
}
if (theF.emaildat.value==""){
alert ("Email can not be blank.");
theF.emaildat.focus();
return (false);
}
if (theF.emaildat.value!="" && (theF.emaildat.value.indexOf('@',0)==-1 || theF.emaildat.value.indexOf('.')==-1)){
	alert ("Email address invalid.");
	theF.emaildat.focus();
	return (false);
}

return (true);
}


function wholereg(theF){
if (theF.fname.value==""){
alert ("First name can not be blank.");
theF.fname.focus();
return (false);
}
if (theF.lname.value==""){
alert ("Last name can not be blank.");
theF.lname.focus();
return (false);
}
if (theF.address.value==""){
alert ("Address can not be blank.");
theF.address.focus();
return (false);
}
if (theF.postcode.value==""){
alert ("Post code can not be blank.");
theF.postcode.focus();
return (false);
}
if (theF.tel.value==""){
alert ("Telephone can not be blank.");
theF.tel.focus();
return (false);
}
if (theF.email.value==""){
alert ("Email can not be blank.");
theF.email.focus();
return (false);
}
if (theF.email.value!="" && (theF.email.value.indexOf('@',0)==-1 || theF.email.value.indexOf('.')==-1)){
	alert ("Email address invalid.");
	theF.email.focus();
	return (false);
}
if (theF.user.value==""){
alert ("User name can not be blank.");
theF.user.focus();
return (false);
}
if (theF.sec_answer.value==""){
alert ("Answer can not be blank.");
theF.sec_answer.focus();
return (false);
}
if (theF.txtUrInterested.value==""){
alert ("Your interested can not be blank.");
theF.txtUrInterested.focus();
return (false);
}

return (true);
}


function openWin(theURL,winName,features) {
  	window.open(theURL,winName,features);
}
function winopen(url){
window.open(url);
}

function winopenproduct(url){
window.open(url,'','height=300,width=300,scrollbars=yes,resizable=yes');
}

function winopen34(url){
window.open(url,'','Height=300,width=400,scrollbars=yes');
}

function openWindow2(url) {
  popupWin = window.open(url,'new_page','width=500,height=220')
}

function insertStr(strValue,anh){

	window.opener.document.form1[anh].value=strValue;
}
</SCRIPT>
<script language="javascript">
var ppimgNW;
function popupImage(src, note, title, css, border) {
  if (border==null) border = 0;
  if (note==null) note = '';
  if (ppimgNW != null) ppimgNW.close();

  ppimgNW = window.open('','POPUPIMAGE','width=1,height=1');
  var doc = ppimgNW.document;
  doc.write('<html>');
  doc.write('<head>');

//  doc.write('<title>Product View</title>');
  if (title!=null) doc.write('<title>'+ title +'</title>');
  doc.write('<style> body {'+css+'} #ppImgText{'+ css +'} #ppImg{cursor:hand}</style></head>');
  doc.write('<body oncontextmenu="return false" leftmargin="0" topmargin="' + border + '">');
  doc.write('<div align="center">');
  doc.write('<img src="' + src + '" id="ppImg" onclick="self.close();" title="Close">');
  doc.write('</div>');
  doc.write('<div style="height:1; width:' + border + '; font-size:4pt;">');
  doc.write('</div>');
  doc.write('<div id="ppImgText" align="center">');
  doc.write('<Font face=Tahoma size=2>'+note+'</Font>');
  doc.write('</div>');
  doc.write('</body>');
  doc.write('</html>');

  doc.write('<' + 'script>');
  doc.write('var resized = false;');
  doc.write('function doResize() {');
  doc.write('  var imgW = ppImg.width, imgH = ppImg.height;');     
  if (note=='' || note==null) {addH=26} else {addH=60};
  doc.write('  window.resizeTo(imgW + 8 +' + border*2 +', imgH + ppImgText.offsetHeight + '+addH+' + '+ border*2 +');');
  doc.write('  setTimeout("doResize()",1000);');

  doc.write('}');
  doc.write('doResize(); ');
  doc.write('</' + 'script>');
}
</script>

⌨️ 快捷键说明

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