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

📄 supprig.asp

📁 一个购物网站
💻 ASP
字号:
<!--#include file="starproc.inc" -->
<%
          set con=Server.CreateObject("ADODB.Connection")
          con.open "PROVIDER=SQLOLEDB;DATA SOURCE=210.34.136.243;UID=user37;PWD=;DATABASE=project0104"
          set rst=Server.CreateObject("ADODB.Recordset")
          rst.open "select cSupplierID from Supplier",con 
          while not rst.eof
             for i=0 to rst.fields.count-1
                getsupplierid=rst.fields("cSupplierID")
                next
            rst.movenext
          wend
          SupplierID=cInt(getsupplierid)
          ItempSupplierID=SupplierID+1
          VtempSupplierID=CStr(ItempSupplierID)
          VtempSupplierID1="0000"+VtempSupplierID
          textSupplierID=right(VtempSupplierID1,5)

   
%>



<html>
<head>
<title>MY Favorite</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="vbscript">

function checksuppliername(txtSupplierName)
    dim sn
    sn=trim(txtSupplierName)
    if Len(sn)=0 then
	msgbox"The  Name can not be empty!"
    end if 
end function
function checksupplieraddress(txtSupplierAddress)
   dim sa
   sa=trim(txtSupplierAddress)
   if Len(sa)=0 then
	msgbox"Address can not be empty!"
   end if 
end function
function checksuppliercity(txtSupplierCity)
   dim sc
   sc=trim(txtSupplierCity)
   if Len(sc)=0 then
	msgbox"City can not be empty!"
   end if 
end function
function checksupplierzipcode(txtSupplierZipCode)
   dim szc
   szc=trim(txtSupplierZipCode)
   if Len(szc)=0 then
	msgbox"Zip Code can not be empty!"
   
    else 
         if not IsNumeric(szc) then
      	   msgbox"Zip Code should be numeric"
	 end if 
    end if 
end function
function checkmailid(txtEmailID)
   dim smi
   smi=trim(txtEmailID)
   if Len(smi)=0 then
      msgbox " The email should not be blank"
   end if
   if smi<>"" then
         
          if Instr(1,smi,"@")=0 then
		msgbox"The wrong  Email ,it must contain @"
	  end if 
   end if
end function
function checkfaxnumber(txtFaxNumber)
    dim fn
    fn=trim(txtFaxNumber)
    if Len(fn)=0 then
        msgbox"Please enter the fax"
       else 
          if not IsNumeric(fn) then
		msgbox "The fax number should be numeric"
           end if
     end if
end function
function checkphoneno(txtPhoneNo)
    dim fn
   fn=trim(txtPhoneNo)
    if Len(fn)=o then
        msgbox" it can't be empty!"
	else 
		if not IsNumeric(fn) then
			msgbox"Invalid Number,please enter it again"
                end if 
    end if 
end function

</script>
</head>

<body bgcolor="#FFCC99" text="#000000">
  <form name="form1" method="post" action="insertsupp.asp">
<table width="53%" height="299">
  <tr> 
    <td width="32%">SupplierID</td>
    <td width="68%"> 
       <input type="text" name="txtSupplierID" value=<%=Server.HTMLEncode(textSupplierID)%> >
    </td>
  </tr>
  <tr> 
    <td width="32%">SupplierName</td>
    <td width="68%"> 
      <input type="text" name="txtSupplierName" value="" onBlur="checksuppliername(txtSupplierName.value)">
    </td>
  </tr>
  <tr> 
    <td width="32%">SupplierAddress</td>
    <td width="68%"> 
      <input type="text" name="txtSupplierAddress" value="" onBlur="checksupplieraddress(txtSupplierAddress.value)">
    </td>
  </tr>
  <tr> 
    <td width="32%">SupplierCity</td>
    <td width="68%"> 
      <input type="text" name="txtSupplierCity" value="" onBlur="checksuppliercity(txtSupplierCity.value)">
    </td>
  </tr>
  <tr> 
    <td width="32%">SupplierZipCode</td>
    <td width="68%"> 
      <input type="text" name="txtSupplierZipCode" value="" onBlur="checksupplierzipcode(txtSupplierZipCode.value)">
    </td>
  </tr>
  <tr> 
    <td width="32%">EmailID</td>
    <td width="68%"> 
      <input type="text" name="txtEmailID" value="" onBlur="checkmailid(txtEmailID.value)">
    </td>
  </tr>
  <tr>
    <td width="32%">FaxNumber</td>
    <td width="68%">
      <input type="text" name="txtFaxNumber" value="" onBlur="checkfaxnumber(txtFaxNumber.value)">
    </td>
  </tr>
  <tr> 
    <td width="32%">Phone No</td>
    <td width="68%"> 
      <input type="text" name="txtPhoneNo" value="" onBlur="checkphoneno(txtPhoneNo.value)">
    </td>
  </tr>
  <tr> 
    <td colspan="2" height="35"> 
      <input type="submit" name="Submit" value="AddSuplier" >
    </td>
  </tr>
</table>
</form>
<%
call showLogo()
%>
</body>
</html>

⌨️ 快捷键说明

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