<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 閱讀(516) 評論(0)  編輯  收藏 所屬分類: asp
    主站蜘蛛池模板: 亚洲一区在线视频观看| 精品一区二区三区免费观看| 麻豆高清免费国产一区| 中文字幕人成人乱码亚洲电影| 久久亚洲精品无码av| 在线观看AV片永久免费| 国产无人区码卡二卡三卡免费| 久久国产精品亚洲一区二区| 中文字幕在线免费视频| 亚洲色一色噜一噜噜噜| 亚洲av无码专区在线观看下载| 无码中文在线二区免费| 亚洲人成黄网在线观看| 一级毛片在播放免费| 免费观看无遮挡www的小视频| 亚洲AV无码日韩AV无码导航| 岛国精品一区免费视频在线观看| 亚洲情侣偷拍精品| 日本一区二区在线免费观看| 免费大香伊蕉在人线国产 | 亚洲综合色成在线播放| 福利片免费一区二区三区| 国产免费AV片无码永久免费| 亚洲av永久无码| 国产美女精品视频免费观看| 亚洲人成欧美中文字幕| 日韩在线看片免费人成视频播放| 亚洲色大情网站www| 亚欧日韩毛片在线看免费网站| 久久亚洲国产视频| 花蝴蝶免费视频在线观看高清版 | 亚洲综合无码一区二区三区| 一级毛片免费毛片一级毛片免费| 亚洲男人天堂2017| 1000部国产成人免费视频| 亚洲激情视频网站| 日韩精品无码区免费专区| 亚洲熟女综合一区二区三区| 男女交性永久免费视频播放| 在线观看亚洲网站| 亚洲精品高清在线|