<% ' if session("SiteDataBase")="" then ' Response.Write("") ' end if set comm = server.CreateObject ("ADODB.COMMAND") connstr = "driver={SQL Server};server=localhost;uid=work;pwd=1a@s3d$;database=pubs" comm.ActiveConnection = connstr comm.CommandType = &H0004 %> <% 'if session("SiteDataBase")="" then ' Response.Write("") 'end if connstr = "driver={SQL Server};server=localhost;uid=work;pwd=1a@s3d$;database=pubs" set conn=server.createobject("ADODB.CONNECTION") conn.open connstr %> <% function PageOn(MyRecord,MySetPageNum) dim MyRecordSet dim TotalRecord,CurrentPageNo set MyRecordSet = MyRecord if not MyRecordSet.EOF then TotalRecord = MyRecordSet.RecordCount MyRecordSet.PageSize = MySetPageNum CurrentPageNo = trim(Request.QueryString ("pre_page")) if CurrentPageNo="" then CurrentPageNo = 0 else CurrentPageNo = clng(CurrentPageNo) end if if CurrentPageNo<>0 then MyRecordSet.AbsolutePage = CurrentPageNo elseif CurrentPageNo=0 then CurrentPageNo = 1 MyRecordSet.AbsolutePage = CurrentPageNo else Response.Write ("error:1000") end if end if set PageOn = MyRecordSet end function function ViewPageOn(MyRecord,MySetPageNum,MyViewPageNum,MyPageUrl) dim MyRecordSet dim CurrentPageNo,TotalPageNo,BegPage,EndPage,FileUrl,TempPage,FastPage,TempNum dim CheckFlag CheckFlag = instr(1,MyPageUrl,"?",1) if CheckFlag=0 then MyPageUrl = MyPageUrl & "?" elseif CheckFlag>0 then MyPageUrl = MyPageUrl & "&" end if if MyViewPageNum="" then Response.Write ("error:1001") else MyViewPageNum = clng(MyViewPageNum) end if set MyRecordSet = MyRecord MyRecordSet.PageSize = MySetPageNum CurrentPageNo = trim(Request.QueryString ("pre_page")) if CurrentPageNo="" then CurrentPageNo = 1 else CurrentPageNo = clng(CurrentPageNo) end if TotalPageNo = clng(MyrecordSet.PageCount) '**************************************** '分页begin '**************************************** if CurrentPageNo=1 and TotalPageNo=1 then elseif CurrentPageNo=1 and TotalPageNo>1 then if TotalPageNo<=MyViewPageNum then EndPage = TotalPageNo else EndPage = MyViewPageNum end if for i=1 to EndPage if i=CurrentPageNo then Response.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " Response.Write (FileUrl) end if next FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo+1) & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & TotalPageNo & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl Response.Write (FastPage) elseif CurrentPageNo=TotalPageNo then FileUrl = MyPageUrl & "pre_page=" & "1" & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo-1) & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl Response.Write (FastPage) if TotalPageNo<=MyViewPageNum then BegPage = 1 else BegPage = TotalPageNo - MyViewPageNum + 1 end if EndPage = TotalPageNo for i=BegPage to EndPage if i=CurrentPageNo then Response.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " Response.Write (FileUrl) end if next elseif CurrentPageNo>1 and TotalPageNo>1 then FileUrl = MyPageUrl & "pre_page=" & "1" & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo-1) & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl Response.Write (FastPage) if TotalPageNo<=MyViewPageNum then BegPage = 1 EndPage = TotalPageNo else TempNum = cint(MyViewPageNum\2) if CurrentPageNo<=TempNum then BegPage = 1 EndPage = MyViewPageNum else TempPage = CurrentPageNo + TempNum if TempPage>=TotalPageNo then EndPage = TotalPageNo else EndPage = TempPage end if BegPage = CurrentPageNo - TempNum end if end if for i=BegPage to EndPage if i=CurrentPageNo then Response.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " Response.Write (FileUrl) end if next FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo+1) & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & TotalPageNo & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl Response.Write (FastPage) end if '**************************************** '分页begin '**************************************** end function function ViewPageOnCreate(MyRecord,MySetPageNum,MyViewPageNum,MyPageUrl) dim MyRecordSet dim CurrentPageNo,TotalPageNo,BegPage,EndPage,FileUrl,TempPage,FastPage,TempNum dim CheckFlag CheckFlag = instr(1,MyPageUrl,"?",1) if CheckFlag=0 then MyPageUrl = MyPageUrl & "?" elseif CheckFlag>0 then MyPageUrl = MyPageUrl & "&" end if if MyViewPageNum="" then Response.Write ("error:1001") else MyViewPageNum = clng(MyViewPageNum) end if set MyRecordSet = MyRecord MyRecordSet.PageSize = MySetPageNum CurrentPageNo = trim(Request.QueryString ("pre_page")) if CurrentPageNo="" then CurrentPageNo = 1 else CurrentPageNo = clng(CurrentPageNo) end if TotalPageNo = clng(MyrecordSet.PageCount) '**************************************** '分页begin '**************************************** if CurrentPageNo=1 and TotalPageNo=1 then elseif CurrentPageNo=1 and TotalPageNo>1 then if TotalPageNo<=MyViewPageNum then EndPage = TotalPageNo else EndPage = MyViewPageNum end if for i=1 to EndPage if i=CurrentPageNo then file.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " file.Write (FileUrl) end if next FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo+1) & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & TotalPageNo & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl file.Write (FastPage) elseif CurrentPageNo=TotalPageNo then FileUrl = MyPageUrl & "pre_page=" & "1" & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo-1) & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl file.Write (FastPage) if TotalPageNo<=MyViewPageNum then BegPage = 1 else BegPage = TotalPageNo - MyViewPageNum + 1 end if EndPage = TotalPageNo for i=BegPage to EndPage if i=CurrentPageNo then file.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " file.Write (FileUrl) end if next elseif CurrentPageNo>1 and TotalPageNo>1 then FileUrl = MyPageUrl & "pre_page=" & "1" & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo-1) & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl file.Write (FastPage) if TotalPageNo<=MyViewPageNum then BegPage = 1 EndPage = TotalPageNo else TempNum = cint(MyViewPageNum\2) if CurrentPageNo<=TempNum then BegPage = 1 EndPage = MyViewPageNum else TempPage = CurrentPageNo + TempNum if TempPage>=TotalPageNo then EndPage = TotalPageNo else EndPage = TempPage end if BegPage = CurrentPageNo - TempNum end if end if for i=BegPage to EndPage if i=CurrentPageNo then file.Write (""&i&" ") else FileUrl = MyPageUrl & "pre_page=" & i & " class=pageon>" FileUrl = " " file.Write (FileUrl) end if next FileUrl = MyPageUrl & "pre_page=" & (CurrentPageNo+1) & " class=pageon>" FileUrl = " " FastPage = FileUrl FileUrl = MyPageUrl & "pre_page=" & TotalPageNo & " class=pageon>" FileUrl = " " FastPage = FastPage & FileUrl file.Write (FastPage) end if '**************************************** '分页begin '**************************************** end function %> <% function ViewBlock(MyCommand,MySubjectId,MyStyle,MyNum,MyClassName,MyPrefix,picw,pich) dim OutString,i,TempString OutString = "" i = 0 set para1 = MyCommand.CreateParameter ("SubjectId",3,&H0001) set para2 = MyCommand.CreateParameter ("Num",2,&H0001) MyCommand.Parameters.Append (para1) MyCommand.Parameters.Append (para2) MyCommand.Parameters ("SubjectId") = MySubjectId if MyNum<90 then MyCommand.Parameters ("Num") = 1 else MyCommand.Parameters ("Num") = MyNum end if MyCommand.CommandText = "Ext_ViewBlo" set rs = MyCommand.Execute () while not rs.eof and i"" then viewTitle2 = "(" & Title2 & ")" end if SendDate = rs(5) OutSendDate = replace(SendDate,"2002年","") DocFrom = rs(6) PicNum = rs(7) if PicNum>0 then PicNum = "(图)" else PicNum = " " end if DocSort = rs(8) SignDate = rs(9) FilePath = rs(10) select case MyStyle case 10 if len(Title)>19 then Title = mid(Title,1,19) & "…" end if TempString = "" & MyPrefix & "" & Title & "" & PicNum & "" case 3 if len(keyword)>2 then keyword = mid(keyword,1,2)& "" end if if docfrom <>"" then TempString = "
" & title & "
" & DocFrom & "
" & Keyword & "
"& SignDate &"
" end if case 6 if FilePath<>"" and Keyword<>"" then if (i mod 2)=0 then TempString = "
" & MyPrefix & "
" & Title & "" else TempString = "
" & MyPrefix & "
" & Title & "" end if else TempString = "" end if case 1201 if FilePath<>"" and Keyword<>"" then if (i mod 8)=0 then TempString = "
" & MyPrefix & "

" & Title & "" elseif ((i mod 8)=7) then TempString = "
" & MyPrefix & "

" & Title & "" else TempString = "
" & MyPrefix & "

" & Title & "" end if else TempString = "" end if case 1202 if FilePath<>"" and Keyword<>"" then if (i mod 6)=0 then TempString = "
" & MyPrefix & "

" & Title & "" elseif ((i mod 6)=5) then TempString = "
" & MyPrefix & "

" & Title & "" else TempString = "
" & MyPrefix & "

" & Title & "" end if else TempString = "" end if end select OutString = OutString & TempString if TempString<>"" then i = i + 1 end if rs.MoveNext() wend rs.close if OutString<>"" then select case MyStyle case 1,11,111,129,139,110,166 OutString = OutString & "更多>>" case 22,52,57 OutString = OutString & "更多" case 201 if (i mod 2)=0 then else OutString = OutString & "" end if case 205,206 if (i mod 2)=0 then else OutString = OutString & "" end if end select end if MyCommand.Parameters.Delete "SubjectId" MyCommand.Parameters.Delete "Num" ViewBlock = OutString end function function ViewBlockZhxxASC(MyCommand,MySubjectId,MyStyle,MyNum,MyClassName,MyPrefix,picw,pich) dim OutString,i,TempString OutString = "" i = 0 set para1 = MyCommand.CreateParameter ("SubjectId",3,&H0001) set para2 = MyCommand.CreateParameter ("Num",2,&H0001) MyCommand.Parameters.Append (para1) MyCommand.Parameters.Append (para2) MyCommand.Parameters ("SubjectId") = MySubjectId MyCommand.Parameters ("Num") = 99 MyCommand.CommandText = "Ext_ViewBlo" set rs = MyCommand.Execute () while not rs.eof and i"" then viewTitle2 = "(" & Title2 & ")" end if SendDate = rs(5) OutSendDate = replace(SendDate,"2002年","") DocFrom = rs(6) PicNum = rs(7) if PicNum>0 then PicNum = "(图)" else PicNum = " " end if DocSort = rs(8) SignDate = rs(9) FilePath = rs(10) select case MyStyle case 601 if len(Title)>23 then Title = mid(Title,1,23) & "…" end if TempString = "" & MyPrefix & "" & Title & "" case 602 TempString = "" & MyPrefix & "" & Title & " (" & Title2 & ")" case 603 TempString = "" & MyPrefix & "" & Title & " (" & Title2 & ")" end select OutString = OutString & TempString if TempString<>"" then i = i + 1 end if rs.MoveNext() wend rs.close if OutString<>"" then select case MyStyle case 1 OutString = OutString & "更多>>" end select end if MyCommand.Parameters.Delete "SubjectId" MyCommand.Parameters.Delete "Num" ViewBlockZhxxASC = OutString end function function GetDateFormat(DataValue,Style) dim yy,mm,dd,hh,min yy = year(DataValue) mm = right("0" & month(DataValue),2) dd = right("0" & day(DataValue),2) hh = right("0" & hour(DataValue),2) min = right("0" & minute(DataValue),2) select case Style case 1 GetDateFormat = mm & "-" & dd & " " & hh & ":" & min case 2 GetDateFormat = mm & "月" & dd & "日" case 3 GetDateFormat = dd & "日" & " " & hh & ":" & min case 4 GetDateFormat = yy & "年" & mm & "月" & dd & "日" case 5 GetDateFormat = yy & "." & mm & "." & dd end select end function %> 武汉大学网络招聘会
 
 
 
 
 
 
 
服装人才网 北京东方易尚科技有限公司 版权所有 京ICP证030536号
Copyright 2002-2006 51haojob.com Inc. All rights reserved.