การคัดลอกรหัสมีดังนี้:
-
-
'| การตั้งค่าตัวแปร
-
ctitle = "รูปภาพที่อัปโหลดทั้งหมด (หมายเหตุ: ต่อไปนี้เป็นรูปภาพทั้งหมดด้านล่างโฟลเดอร์รูปภาพไม่ใช่ทุกภาพที่ถูกต้อง!)" 'ชื่อ
CPICTYPE = "JPEG, JPG, GIF, PNG, BMP" 'ประเภทภาพ (ใช้ "," แยกรูปแบบภาพ)
Cheight = 120'Thumbnail ความสูง
cwidth = 120'Thumbout width
ceachlinemax = 5'number ของรูปภาพที่แสดงต่อบรรทัด
ceachpageMax = 20'Number of pictures ที่แสดงต่อหน้า
pic_path = "/uploadpic/" 'ตั้งเส้นทางที่ภาพอยู่
-
'| กำหนดฟังก์ชัน
-
functiongetExt (ชื่อ)
getExt = ขวา (ชื่อ 3)
endfunction
functionsispic (ชื่อไฟล์, pictype)
ext = getExt (ชื่อไฟล์)
ispic = false
typelist = split (pictype, ",")
forii = lbound (typelist) toubound (typelist)
Ifucase (ext) = ucase (typelist (ii)) แล้ว
ispic = true
ออกจาก
endif
ต่อไป
endfunction
FunctionPageBar (หน้า, pagetotal)
Response.write "[<ahref =" & request.serverVariables ("script_name") & "? page =" & (หน้า 1) & "ชื่อเรื่อง = หน้าก่อนหน้า> หน้าก่อนหน้า </a>]"
Response.write "<ahref =" & request.serverVariables ("script_name") & "? page = 1title = home> <<</a>"
i = pagestart
dowhilei <หน้า
Response.write "<ahref =" & request.serverVariables ("script_name") & "? page =" & i & "title =" "หน้า" & i & ""> ["& i &"] </a> "
i = i+1