Salin kode sebagai berikut: <%
'/// ***************************************************************************
'Nama File Perpustakaan Publik Umum Nama: PubFunction.asp
'********************************************************************* //
Constgo_back = "<ahref = 'javascript: history.back (1)'> [kembali ke halaman sebelumnya] </a>"
Constcloser = "<ahref = 'javascript: self.close ()'>『 tutup jendela 』</a>"
'// ***************************************************************************
'Pubfgdy (tes, tag, bh) memanggil fungsi nilai yang ditentukan dari string yang ditentukan sesuai dengan pemisah dan label. Parameter: Tes String terpisah, pemisah tag, label BH
'********************************************************************** //
FunctionPubFgdy (tes, tag, bh)
Pubfgdy = ""
iftest <> "" andisnumeric (bh) = truethen
Dimtests
Tes = split (tes & tag, tag)
ifbh <ubound (tes) lalu
Pubfgdy = tes (bh)
endif
kalau tidak
Pubfgdy = ""
fungsi keluar
endif
fungsi endfungsi
'// ***************************************************************************
Fungsi spesifikasi kode pubcodegf (oldtest), parameter: konten asli oldtest, konten baru newtest
'********************************************************************** //
FunctionPubCodegf (oldtest)
DIMNEWTEST: newTest = trim (oldtest)
ifisnull (newTest) oRnewTest = "" thencode_admin = "": Exitfunction
NewTest = ganti (newtest, "'", "" "")
Pubcodegf = newtest
fungsi endfungsi
'// ***************************************************************************
'Pubcodehtml (oldtest) memblokir fungsi kode html, parameter: konten asli oldtest, konten baru newtest
'********************************************************************** //
FunctionPubCodeHTML (OldTest)
DIMNEWTEST: newTest = oldtest
ifisnull (newTest) oRnewTest = "" thenpubcodeehtml = "": ExitFunction
NewTest = ganti (newtest, "<", "<")
NewTest = ganti (newtest, ">", ">")
NewTest = ganti (newtest, chr (39), "'")' Kutipan tunggal
NewTest = ganti (newtest, chr (34), "") 'kutipan ganda
NewTest = ganti (newtest, chr (32), "") 'space
NewTest = ganti (newtest, chr (9), "") 'tabel