คัดลอกรหัสดังนี้: <%
-
'ไฟล์ไลบรารีฟังก์ชั่นสาธารณะทั่วไปชื่อ: pubfunction.asp
-
Constgo_back = "<ahref = 'JavaScript: history.back (1)'> [กลับไปที่หน้าก่อนหน้า] </a>"
ConstCloser = "<ahref = 'JavaScript: self.close ()'>『 ปิดหน้าต่าง 』</a>"
-
'pubfgdy (ทดสอบ, แท็ก, BH) เรียกฟังก์ชันค่าที่ระบุของสตริงที่ระบุตามตัวคั่นและฉลาก พารามิเตอร์: ทดสอบสตริงคั่น, ตัวคั่นแท็ก, ฉลาก BH
-
functionpubfgdy (ทดสอบ, แท็ก, BH)
pubfgdy = ""
iftest <> "" Andisnumeric (bh) = truethen
หรี่
การทดสอบ = แยก (ทดสอบ & แท็กแท็ก)
ifbh <ubound (การทดสอบ) จากนั้น
pubfgdy = การทดสอบ (BH)
endif
อื่น
pubfgdy = ""
exitfunction
endif
endfunction
-
'pubcodegf (oldtest) ฟังก์ชั่นข้อกำหนดรหัส, พารามิเตอร์: เนื้อหาต้นฉบับ oldtest, เนื้อหาใหม่ใหม่
-
functionpubcodegf (oldtest)
dimnewtest: newtest = trim (oldtest)
ifisnull (newtest) ORROWTEST = "" thencode_admin = "": exitfunction
newTest = แทนที่ (Newtest, "'", "" "")
pubcodegf = newtest
endfunction
-
'pubcodehtml (oldtest) บล็อกฟังก์ชั่นรหัส HTML, พารามิเตอร์: เนื้อหาต้นฉบับเก่า, เนื้อหาใหม่ใหม่
-
functionpubcodehtml (oldtest)
dimnewtest: newtest = oldtest
ifisnull (newtest) ORROWTEST = "" THEPUBCODEHTML = "": exitFunction
newTest = แทนที่ (Newtest, "<", "<")
newTest = แทนที่ (NewTest, ">", ">")
newTest = แทนที่ (newtest, chr (39), "'') 'คำพูดเดียว
newTest = แทนที่ (Newtest, Chr (34), "") 'คำพูดสองเท่า
newTest = แทนที่ (Newtest, Chr (32), "") 'พื้นที่
newTest = แทนที่ (NewTest, Chr (9), "") 'ตาราง