<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中,每個(gè)文件夾存放數(shù)量saveCount為2000個(gè)文件,用記錄集的id整除saveCount(id\saveCount)
    ??7 ' 所得整數(shù)定為該文件所在目錄,文件名就是該id號(hào)。例如: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?'國際展會(huì)'?when?1?then?'國內(nèi)展會(huì)'?else?'國內(nèi)展會(huì)'?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? " 記錄集為空,請(qǐng)檢查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------------模版內(nèi)容
    ?49 ? ' saveCount----------存放數(shù)量
    ?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() ' 讀取摸班內(nèi)容
    ?86 ? set ?readts = fso.OpenTextFile(modAddress, 1 )
    ?87 ?readcontent = readts.ReadAll()
    ?88 ?readts.close
    ?89 ? end?function
    ?90
    ?91 ? public ? function ?replaceContent(strOne,strTwo) ' 替換內(nèi)容
    ?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 ' ??連接數(shù)據(jù)庫類
    105 ' ??調(diào)用方法:
    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 ? ' 在此修改數(shù)據(jù)庫連接
    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) 評(píng)論(0)  編輯  收藏 所屬分類: asp
    主站蜘蛛池模板: 精品福利一区二区三区免费视频 | 亚洲精品午夜久久久伊人| 亚洲JIZZJIZZ妇女| 日本免费大黄在线观看| 亚洲综合区小说区激情区| 亚洲AV成人无码天堂| 亚洲视频在线观看免费| 亚洲va中文字幕无码久久| 精品国产亚洲一区二区三区在线观看| 19禁啪啪无遮挡免费网站| 自怕偷自怕亚洲精品| 污污网站18禁在线永久免费观看| 亚洲人成小说网站色| 人妻视频一区二区三区免费| 亚洲人成网站18禁止久久影院| 在线观看www日本免费网站| 美女扒开屁股让男人桶爽免费| 国产无遮挡色视频免费视频| 亚洲国产模特在线播放| 亚洲国产高清精品线久久| 青青草国产免费国产是公开| 亚洲av无码成人精品区在线播放| 色欲A∨无码蜜臀AV免费播| 特级毛片全部免费播放| 亚洲乱码一二三四区国产| 亚洲欧洲国产精品香蕉网| 中文无码日韩欧免费视频| 国产亚洲精品无码专区| 久久精品乱子伦免费| 亚洲最新黄色网址| 毛片免费观看的视频| 亚洲人成高清在线播放| 国产精品亚洲精品日韩已满| 四虎影视成人永久免费观看视频| 国产91成人精品亚洲精品| 亚洲香蕉成人AV网站在线观看| 韩国18福利视频免费观看| 搜日本一区二区三区免费高清视频 | 久久精品免费全国观看国产| 亚洲色偷偷偷综合网| 亚洲av无码成人精品区在线播放|