<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    ?

    ??1
    ??2 ' author?:?jack
    ??3 ' date???:?2005-11-12
    ??4 ' email??:?jieck422@163.com
    ??5 ' 文件存放解決辦法:
    ??6 ' 把文件全部存放在saveFolder中,每個文件夾存放數量saveCount為2000個文件,用記錄集的id整除saveCount(id\saveCount)
    ??7 ' 所得整數定為該文件所在目錄,文件名就是該id號。例如:saveFolder="F:\test",saveCount=2000,在表中有一記錄,其id為47(47\2000=0),該
    ??8 ' 文件生成后存放的目錄為F:\test\0\47.shtml
    ??9 dim ?ID,myconn,zhli
    ?10 ' ''''''''''''''''''''''''''''''''''''''在此添加過濾器
    ?11 ID = request.querystring( " id " )
    ?12 set ?myconn = new ?GetConnection
    ?13 if ?myconn.openRS( " select?a.E_name,a.E_date,a.E_zhouqi,a.E_changban,a.E_begindate,a.E_enddate,a.E_address,a.E_zhanguan,a.E_content,case?a.E_xingzhi?when?0?then?'國際展會'?when?1?then?'國內展會'?else?'國內展會'?end?as?xiangzhi,a.E_company,a.E_chengban,a.E_beizhu,b.[name],b.Phone,b.Fax,b.Email,b.Qymc?from?zhanhui?a,qiang_qyml?b?where?a.Exhib_ID= " & ID & " ?and?a.gsid=b.id " ) = false ? then
    ?14 myconn.errMassege? " 記錄集為空,請檢查ID是否正確!^_^ "
    ?15 response.end
    ?16 else
    ?17 set ?zhli = new ?ZhanHui_listinfo
    ?18 zhli.letModAddress = " F:\test\li.shtml "
    ?19 zhli.letSaveFolder = " F:\test\ "
    ?20 zhli.letSaveCount = 2000
    ?21 zhli.letContent = zhli.readContent
    ?22 zhli.replaceContent? " {$E_name$} " ,myconn.rs( 0 )
    ?23 zhli.replaceContent? " {$E_date$} " ,myconn.rs( 1 )
    ?24 zhli.replaceContent? " {$E_zhouqi$} " ,myconn.rs( 2 )
    ?25 zhli.replaceContent? " {$E_changban$} " ,myconn.rs( 3 )
    ?26 zhli.replaceContent? " {$E_begindate$} " ,myconn.rs( 4 )
    ?27 zhli.replaceContent? " {$E_enddate$} " ,myconn.rs( 5 )
    ?28 zhli.replaceContent? " {$E_address$} " ,myconn.rs( 6 )
    ?29 zhli.replaceContent? " {$E_zhanguan$} " ,myconn.rs( 7 )
    ?30 zhli.replaceContent? " {$E_content$} " ,myconn.rs( 8 )
    ?31 zhli.replaceContent? " {$E_xingzhi$} " ,myconn.rs( 9 )
    ?32 zhli.replaceContent? " {$E_company$} " ,myconn.rs( 10 )
    ?33 zhli.replaceContent? " {$E_chengban$} " ,myconn.rs( 11 )
    ?34 zhli.replaceContent? " {$E_beizhu$} " ,myconn.rs( 12 )
    ?35 zhli.replaceContent? " {$linkman$} " ,myconn.rs( 13 )
    ?36 zhli.replaceContent? " {$linkphone$} " ,myconn.rs( 14 )
    ?37 zhli.replaceContent? " {$linkfax$} " ,myconn.rs( 15 )
    ?38 zhli.replaceContent? " {$linkemail$} " ,myconn.rs( 16 )
    ?39 zhli.replaceContent? " {$companyname$} " ,myconn.rs( 17 )
    ?40 zhli.asp2html?zhli.makefilename(ID),zhli.getContent
    ?41 end ? if
    ?42
    ?43 class?ZhanHui_listinfo
    ?44 ? ' 文件生成類
    ?45 ? private ?modAddress,saveFolder,fso,ts,content,saveCount
    ?46 ? ' modAddress---------摸班地址
    ?47 ? ' saveFolder---------存放目錄
    ?48 ? ' content------------模版內容
    ?49 ? ' saveCount----------存放數量
    ?50 ? private ? sub ?class_initialize() ' 類初始化
    ?51 ? set ?fso = Server.CreateObject( " SCRIPTING.FILESYSTEMOBJECT " )
    ?52 ? end?sub
    ?53
    ?54 ? public ? property ? let ?letSaveCount(str)
    ?55 ?saveCount = str
    ?56 ? end?property
    ?57
    ?58 ? ' let?saveFolder
    ?59 ? public ? property ? let ?letSaveFolder(str)
    ?60 ?saveFolder = str
    ?61 ? end?property
    ?62
    ?63 ? ' let?modAddress
    ?64 ? public ? property ? let ?letModAddress(str)
    ?65 ?modAddress = str
    ?66 ? end?property
    ?67
    ?68 ? ' let?Content
    ?69 ? public ? property ? let ?letContent(str)
    ?70 ?content = str
    ?71 ? end?property
    ?72 ? ' get?Content
    ?73 ? public ? property ? get ?getContent
    ?74 ?getContent = content
    ?75 ? end?property
    ?76
    ?77 ? public ? function ?makefilename(ID) ' 文件名以及路徑
    ?78 ?foldername = ID \ saveCount
    ?79 ? if ? not ?fso.FolderExists(saveFolder & foldername)? then
    ?80 ?fso.createfolder(saveFolder & foldername)
    ?81 ? end ? if
    ?82 ?makefilename = saveFolder & foldername & " \ " & ID & " .shtml "
    ?83 ? end?function
    ?84
    ?85 ? public ? function ?readContent() ' 讀取摸班內容
    ?86 ? set ?readts = fso.OpenTextFile(modAddress, 1 )
    ?87 ?readcontent = readts.ReadAll()
    ?88 ?readts.close
    ?89 ? end?function
    ?90
    ?91 ? public ? function ?replaceContent(strOne,strTwo) ' 替換內容
    ?92 ?content = replace (content,strOne,strTwo)
    ?93 ? end?function
    ?94
    ?95 ? public ? sub ?asp2html(filename,filecontent) ' 生成shtml文件
    ?96 ? set ?writets = fso.CreateTextFile(filename, true )
    ?97 ?writets.Write(filecontent)
    ?98 ?writets.close
    ?99 ? end?sub
    100
    101 end ?class
    102
    103 class?GetConnection
    104 ' ??連接數據庫類
    105 ' ??調用方法:
    106 ' ??dim?myconn
    107 ' ??set?myconn=new?GetConnection
    108 '
    109 ? private ?conn,connStr
    110 ? public ?rs
    111 ? private ? sub ?class_initialize() ' 類初始化
    112 ?connStr = " Provider=SQLOLEDB.1;?Data?Source=(local);?Initial?Catalog=myDATABASE;?User?ID=sa;?Password= "
    113 ? ' 在此修改數據庫連接
    114 ? set ?conn = Server.CreateObject( " ADODB.Connection " )
    115 ?conn.open?connStr
    116 ? end?sub
    117
    118 ? public ? function ?openRS(sql)
    119 ? set ?rs = conn.execute(sql)
    120 ? if ?rs.eof? and ?rs.bof? then
    121 ?openRS = false
    122 ? else
    123 ?openRS = true
    124 ? end ? if
    125 ? end?function
    126
    127 ? public ? sub ?errMassege(mm)?
    128 ?response.write( " <center><p><font?size=7?color=red> " & mm & " </font></p><center> " )?
    129 ? end?sub
    130
    131 ? private ? sub ?class_terminate() ' 銷毀類
    132 ?conn.close
    133 ? set ?conn = nothing
    134 ? end?sub
    135
    136 end ?class
    137
    138
    posted on 2006-06-26 11:00 jackstudio 閱讀(509) 評論(0)  編輯  收藏 所屬分類: asp
    主站蜘蛛池模板: 最近中文字幕mv免费高清视频7| 久久最新免费视频| 777爽死你无码免费看一二区| 在线精品亚洲一区二区三区| 鲁啊鲁在线视频免费播放| 最新免费jlzzjlzz在线播放| 中文字幕在线观看亚洲视频| 国产一卡二卡3卡四卡免费| 亚洲国产中文在线二区三区免| 亚洲黄色免费在线观看| 亚洲综合综合在线| 在线观看的免费网站| 亚洲中文字幕久久精品无码A| 好吊妞在线成人免费| 亚洲精品无码久久| 全黄性性激高免费视频| 曰批全过程免费视频观看免费软件| 亚洲国产aⅴ综合网| 中国在线观看免费的www| 亚洲成av人在线视| 一级女人18毛片免费| 亚洲欧美黑人猛交群| 亚洲精品国自产拍在线观看| 中文字幕免费播放| 亚洲综合色一区二区三区小说| 国产在线国偷精品产拍免费| 国产99久久亚洲综合精品| 中国亚洲女人69内射少妇| 国产精品免费无遮挡无码永久视频 | 亚洲人成网站18禁止| 免费亚洲视频在线观看| 高清永久免费观看| 亚洲色成人网一二三区| 成人超污免费网站在线看| 日本高清不卡中文字幕免费 | 国产一级淫片视频免费看| 一区二区三区免费高清视频| 午夜亚洲国产理论秋霞| 欧美三级在线电影免费| 亚美影视免费在线观看| 亚洲成a人片在线网站|