<meta http-equiv= "Content-type" content= "text/html; charset=gb2312"
<meta name= "Author" content= "Haiwa"
<title>asp generate barcode </title>
<body
<%
Function Haiwaocde (zfstr)
ZF = zfstr
ZF = replace (ZF, "0", "_|_|__| | _|| _|")
ZF = replace (ZF, "1", "_| | _|__|_|_||")
ZF = replace (ZF, "2", "_|_| | __|_|_||")
ZF = replace (ZF, "3", "_| | _|| __|_|_|")
ZF = replace (ZF, "4", "_|_|__| | _|_||")
ZF = replace (ZF, "5", "_| | _|__|| _|_|")
ZF = replace (ZF, "7", "_|_|__|_| | _||")
ZF = replace (ZF, "6", "_|_| | __|| _|_|")
ZF = replace (ZF, "8", "_| | _|__|_|| _|")
ZF = replace (ZF, "9", "_|_| | __|_|| _|")
ZF = replace (ZF, "a", "_| | _|_|__|_||")
ZF = replace (ZF, "B", "_|_| | _|__|_||")
ZF = replace (ZF, "C", "_| | _|| _|__|_|")
ZF = replace (ZF, "D", "_|_|_| | __|_||")
ZF = replace (ZF, "E", "_| | _|_|| __|_|")
ZF = replace (ZF, "F", "_|_| | _|| __|_|")
ZF = replace (ZF, "G", "_|_|_|__| | _||")
ZF = replace (ZF, "H", "_| | _|_|__|| _|")
ZF = replace (ZF, "I", "_|_| | _|__|| _|")
ZF = replace (ZF, "J", "_|_|_| | __|| _|")
ZF = replace (ZF, "K", "_| | _|_|_|__||")
ZF = replace (ZF, "L", "_|_| | _|_|__||")
ZF = replace (ZF, "M", "_| | _|| _|_|__|")
ZF = replace (ZF, "n", "_|_|_| | _|__||")
ZF = replace (ZF," O "," _| | _|_|| _|__|")
ZF = replace (ZF, "P", "_|_| | _|| _|__|")
ZF = replace (ZF, "R", "_| | _|_|_|| __|")
ZF = replace (ZF, "Q", "_|_|_|_| | __||")
ZF = replace (ZF, "s", "_|_| | _|_|| __|")
ZF = replace (ZF, "T", "_|_|_| | _|| __|")
ZF = replace (ZF, "U", "_| | __|_|_|_||")
ZF = replace (ZF, "V", "_|__| | _|_|_||")
ZF = replace (ZF, W, "_| | __|| _|_|_|")
ZF = replace (ZF, "X", "_|__|_| | _|_||")
ZF = replace (ZF, "Y", "_| | __|_|| _|_|")
ZF = replace (ZF, Z, _|__| | _|| _|_|")
ZF = replace (ZF, "-", "_|__|_|_| | _||")
ZF = replace (ZF, "*", "_|__|_| | _|| _|")
ZF = replace (ZF, "/", "_|__|__|_|__|")
ZF = replace (ZF,%, _|_|__|__|__|)
ZF = replace (ZF, "+", "_|__|_|__|__|")
ZF = replace (ZF, ".", "_| | __|_|_|| _|")
HAIWAOCDE = ZF
End Function
Code_h = 52
Code_w = 2
function Dragcode (ccode)
c = Ccode
c = Replace (c, "_", "<span style=" Height: "&code_H&"; width: "&code_w&"; background: #FFFFFF ' >< /SPAN> ")
c = Replace (c, "|", "<span style=" Height: "&code_H&"; width: "&code_w&"; background: #000000 ' >< /SPAN> ")
Dragcode = C
End Function
Function Checkexp (PATRN,STR)
Set regex=new REGEXP
Regex.pattern=patrn
Regex.ignorecase=true
Regex.global=true
Checkexp = Regex.test (str)
End Function
Code = Request ("C")
If code = "then
Code =" *51windows.net* "
Else
If Checkexp (" ^[abcdefghijklmnopqrstuvwxyz1234567890\+\-\* \/\%\$\.] *$ ", code) then
Code =" * "&code&" * "
Else
Code =" *51windows.net* "
Errstr =" <br><center Style= ' color:red; ' > contains illegal characters </center> "
End If
End If
Ocode = code
Code = LCase (code)
%>
<center>< Form Name= "Form1" method= "post" > Legal characters: ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890 +-*/% $. <br><br><input Name= "C" type= "text" value= "<%=request (" C ")%>" size= "" Maxlength= "" > <input type= "Submit" Name= " Submit "value=" ></form><center>
<div align= "center"
<center>
<table Border= "0" cellpadding= "0" cellspacing= "0" height= "<tr>"
<td height= "align=" "Center" > <%=dragcode (HAIWAOCDE (code))%></td>
</tr>
<tr>
<td height= "align=" center "Style=" Text-align:justify;text-justify:distribute-all-lines; " ><%= (Ocode)%></td>
</tr>
</table>
</center>
</div>
<% =errstr%>
</body>