-
const lie = 3 'แก้ไขจำนวนคอลัมน์
const tablewidth = 33% 'กำหนดความกว้างของแบบฟอร์ม
Const TableHeight = 18% 'กำหนดความสูงของตาราง
const imgwidth = 15% 'กำหนดความกว้างของตาราง
const imgheight = 27.5% 'กำหนดความสูงของตาราง
const fontsize = 12px;
const txtwidth = 120 'ภาพความกว้างของตารางข้อความขวา
const txtheight = 18% 'ตารางข้อความขวาสูง
const txtalign = ซ้าย 'รูปภาพวิธีการจัดตำแหน่งข้อความขวา: ซ้ายอยู่ตรงกลางขวาขวาขวา
'อันดับต้น ๆ เน้นว่าไฟล์เป็นไฟล์คำ
ฟังก์ชั่น doctop ()
doctop = <html xmlns: v = urn: schemas-microsoft-com: vml xmlns: o = urn: schemas-microsoft-com: สำนักงาน: w = urn: schmas- microsoft-com: Office: Word XMLNS = http: // // www.w3.org/tr/rec- html40> <head> <title> สร้างผลลัพธ์ </title> <meta http-equiv = เนื้อหาประเภทเนื้อหา = text/html; > </meta> </meta> </ meta> <meta name = progid content = word.document> </ meta> <meta name = gangator content = microsoft word 10> </ meta> <meta name = rinetator content = Microsoft Word 10> <style type = text/css>@ page section1 {margin: 30pt 8.5pt 5.65pt 12pt;} div.section1 {หน้า: ส่วนที่ 1;} ตาราง {ตัวอักษรขนาด: & fontsize &} </meta> < /head>+Chr (13)+Chr (10)
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น imgtotable (fto, fpar, dext)
imgtotable = <width table = & tablewidth & height = & tableHeight & border = 0>
imgtotable = imgtotable+<tr valign = top> <td> <img src = & แทนที่ (ตัวอย่าง, fpar,) & width = & imgwidth & height = & imageighryigh &/> </td>
imgtotable = imgtotable+<td colspan = 2 allign = center>
imgtotable = imgtotable+<width table = & txtwidtht & height = & txtheight &> <td align = & txtalign &> & แทนที่ (fto.name), td align = & txtalign &> นักแสดง </td> </tr> <lign = & txtalign &> ภาษา </td> </tr> <td align = & txtalign &> ความจุ </td> </tr ter> <td align = & txtalign &> พิมพ์ </td> </tr> </table>
imgtotable = imgtotable+</td> </tr> </table>+Chr (13)+Chr (10)
ฟังก์ชันสิ้นสุด
ฟังก์ชั่น imagetodoc (fpath, fpar)
ตั้งค่า fto = fso.createtextfile (fpath &/results.doc, true)
fto.writeline doctop ()
fto.writeline <body topmargin = 0 leftmargin = 0> <width ตาราง = 64 ความสูง = 100% border = 1> <div class = ส่วนที่ 1>
สำหรับการสาธิตแต่ละครั้งใน fpath.files
dext = lcase (fso.getextensionName (ตัวอย่าง)))
ถ้า dext = jpg หรือ deb = gif หรือ dext = png แล้ว
if (i mod lie) = 0 จากนั้น fto.writeline <tr>+chr (13)+chr (10)
i = i+1
fto.writeline <td>
'ใช้สำหรับข้อผิดพลาด
'fto.writeline 123
fto.writeline imgtotable (สาธิต, fpar, dext)
fto.writeline </td>+chr (13)+chr (10)
if (i mod lie) = 0 แล้ว i = 0: fto.writeline </tr>+chr (13)+chr (10)
สิ้นสุดถ้า
ต่อไป
fto.close
Response.write </div> </table> </body>
Response.write & FAO & FPHER &/run ผลลัพธ์ <br />
ตั้งค่า fto = ไม่มีอะไร
ฟังก์ชันสิ้นสุด
ตั้งค่า fso = server.createObject (scripting.filesystemobject)
ตั้งค่า fo = fso.getFolder (Server.mappath (./))
สำหรับการสาธิตแต่ละครั้งใน fpo.subfolders
โทรหา imagetodoc (สาธิต)
ต่อไป
ตั้งค่า fo = ไม่มีอะไร
ตั้งค่า fso = ไม่มีอะไร
-