<%@ language=vbscript %> <% '学校数 const gakusu=45 const retu=6 dim gaku(46),data(6,46),sei(2) dim sanka(46),kc(6) '初期値 gaku(1)="土佐女":gaku(2)="明徳":gaku(3)="土佐":gaku(4)="学芸":gaku(5)="中央":gaku(6)="高知":gaku(7)="土佐塾":gaku(8)="高専":gaku(9)="室戸":gaku(10)="中芸" gaku(11)="安芸":gaku(12)="城山":gaku(13)="山田":gaku(14)="嶺北":gaku(15)="岡豊":gaku(16)="東":gaku(17)="南":gaku(18)="追手前":gaku(19)="丸の内" gaku(20)="小津":gaku(21)="国際":gaku(22)="高岡":gaku(23)="佐川":gaku(24)="須崎総":gaku(25)="梼原":gaku(26)="窪川":gaku(27)="四万十":gaku(28)="中村" gaku(29)="清水":gaku(30)="宿毛":gaku(31)="吾北":gaku(32)="西土佐":gaku(33)="海洋":gaku(34)="高知農":gaku(35)="春野" gaku(36)="幡多農":gaku(37)="桜ケ丘":gaku(38)="東工":gaku(39)="高知工":gaku(40)="宿毛工":gaku(41)="伊野商":gaku(42)="大方":gaku(43)="高知商":gaku(44)="高ろう" gaku(45)="みかづき" ' ' sei(1)="m":sei(2)="f" ' for i=1 to 6 kc(i)=0 next ' for i=1 to retu for j=1 to gakusu data(i,j)=0 next next ' for i=1 to gakusu sanka(i)=0 next ' kk=0 'CSVファイルに接続します。 data3=Server.MapPath("hdd.csv") Set fso=Server.CreateObject("Scripting.FileSystemObject") Set ft=fso.OpenTextFile(data3) hh=ft.readAll for k=1 to 2 for j=1 to gakusu kd=0 ks=0 'CSV用 datafile = Server.MapPath(sei(k) & "_" & gaku(j) & ".csv") Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject") if ObjFSO.FileExists(datafile) then Set ObjTS = ObjFSO.OpenTextFile(datafile) Do While Not ObjTS.AtEndOfStream dat2 = Split(ObjTS.Readline,",") if dat2(1)=gaku(j) then select case sei(k) case "m" ''''''''''''''' if dat2(4)<>"" then'''''''''''団体 tm=CInt(dat2(4)) tm2=(tm\10)+1 if data(1,j)"" then '''''ダブル kd=kd+1 data(2,j)=kd/2 sanka(j)=1 end if if dat2(8)<>"" then'''' シングル ks=ks+1 data(3,j)=ks sanka(j)=1 end if case "f" if dat2(4)<>"" then tm=CInt(dat2(4)) tm2=(tm\10)+1 if data(4,j)"" then kd=kd+1 data(5,j)=kd/2 sanka(j)=1 end if if dat2(8)<>"" then ks=ks+1 data(6,j)=ks sanka(j)=1 end if ' end select end if loop ObjTS.Close end if next next ft.Close Set ObjTS =Nothing Set ObjFSO = Nothing ' dtt=date & "_(" & time & ")" %> 申込チェック <% =dtt %>

<%= hh %>

<% for k=1 to gakusu %> <% gaku_n=gaku(k)%> <% t_m=data(1,k) :kc(1)=kc(1)+t_m %> <% d_m=data(2,k) :kc(2)=kc(2)+d_m %> <% s_m=data(3,k) :kc(3)=kc(3)+s_m %> <% t_f=data(4,k) :kc(4)=kc(4)+t_f %> <% d_f=data(5,k) :kc(5)=kc(5)+d_f %> <% s_f=data(6,k) :kc(6)=kc(6)+s_f %> <% if sanka(k)=1 then %> <% kk=kk+1 %> <% if t_m<>0 then %> <% else %> <% end if %> <% if d_m<>0 then %> <% else %> <% end if %> <% if s_m<>0 then %> <% else %> <% end if %> <% if t_f<>0 then %> <% else %> <% end if %><% if d_f<>0 then %> <% else %> <% end if %> <% if s_f<>0 then %> <% else %> <% end if %> <% end if %> <% next %>
___ ___ 男子 女子
NO 学校名 団体 ダブル シング 団体 ダブル シング
<%=kk %> <% =gaku_n %><% =t_m %><% ="." %><% =d_m %><% ="." %><% =s_m %><% ="." %><% =t_f %><% ="." %><% =d_f %><% ="." %><% =s_f %><% ="." %>
<% =kc(1) %> <% =kc(2) %> <% =kc(3) %> <% =kc(4) %> <% =kc(5) %> <% =kc(6) %>
<% Server.Execute "syuukei.asp" %>