%
'
'
%>
<%
main()
Sub main()
If Not(SessionCheck()) Then
Exit Sub
End If
Dim Query
Dim Content
Dim ShijoCD
ShijoCD = Request("ShijoCD")
Dim TmpCnt
TmpCnt = 0
Dim RndKaisyaCD
ReDim RndKaisyaCD(0)
Query = "exec SPPポータル会社取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '', '" & GB_GakuseiNo & "'" '会社CD未指定の場合は一覧取得
Set Content = OpenQuery(Query)
Do While Not(Content.BOF Or Content.EOF)
If ShijoCD = "" Or "" & Content.Fields("市場CD") = ShijoCD Then
TmpCnt = TmpCnt + 1
ReDim PreServe RndKaisyaCD(TmpCnt)
RndKaisyaCD(TmpCnt) = Content.Fields("会社CD")
End If
Content.MoveNext
Loop
'1/2の確率で昇順/降順入れ替え
Randomize
If Int(Rnd() * 2) > 0 Then
Dim RndKaisyaCDTmp
ReDim RndKaisyaCDTmp(UBound(RndKaisyaCD))
For TmpCnt = 1 To UBound(RndKaisyaCD)
RndKaisyaCDTmp(TmpCnt) = RndKaisyaCD(UBound(RndKaisyaCD) - (TmpCnt - 1))
Next
For TmpCnt = 1 To UBound(RndKaisyaCD)
RndKaisyaCD(TmpCnt) = RndKaisyaCDTmp(TmpCnt)
Next
End If
'シャッフル
Dim Shuffle1
Dim Shuffle2
Dim TmpKaisyaCD
For TmpCnt = 1 To UBound(RndKaisyaCD) * UBound(RndKaisyaCD) '配列数の2乗ループ
Randomize
Shuffle1 = Int(Rnd() * UBound(RndKaisyaCD)) + 1 '1〜配列数のランダムな数値を取得
Randomize
Shuffle2 = Int(Rnd() * UBound(RndKaisyaCD)) + 1 '1〜配列数のランダムな数値を取得
'2つの配列の中身を入れ替える
TmpKaisyaCD = RndKaisyaCD(Shuffle1)
RndKaisyaCD(Shuffle1) = RndKaisyaCD(Shuffle2)
RndKaisyaCD(Shuffle2) = TmpKaisyaCD
Next
'Response.Write(RndKaisyaCD(1) & "
")
'Response.Write(RndKaisyaCD(2) & "
")
'Response.Write(RndKaisyaCD(3) & "
")
'Exit Sub
%>
<% = HtmlHeader("") %>
<%
Response.Write(HtmlDesign(11))
If GB_Gyosyu <> "S" Then
Response.Write(HttpL3_1("閉じる", "ExitFlg=0;top.window.close()", "", "", "", "", "", "", "", ""))
Else
Response.Write(HttpL3_1(" 自社サイトの編集 ", "tblbtn('portal_kaisha_edit.asp?ShijoCD=" & ShijoCD & "');", "閉じる", "ExitFlg=0;top.window.close()", "", "", "", "", "", ""))
End If
Response.Write(HttpL4("参加企業一覧", ""))
%>
市場
|
<%
For TmpCnt = 1 To UBound(RndKaisyaCD)
Query = "exec SPPポータル会社取得 '" & GB_SystemCD & "', '" & EnshuCD & "', '" & RndKaisyaCD(TmpCnt) & "', '" & GB_GakuseiNo & "'"
Set Content = OpenQuery(Query)
If Not(Content.BOF Or Content.EOF) Then
Dim onClickValue
onClickValue = "tblbtn('portal_kaisha_view.asp?ViewKaisyaCD=" & Content.Fields("会社CD") & "&ShijoCD=" & ShijoCD & "')"
Response.Write("" & vbCrLf)
Response.Write("")
Response.Write(" "" Then
Response.Write(FPortal & "/" & GB_EnshuCD & "/" & Content.Fields("会社CD") & "/" & Content.Fields("バナー"))
Else
Response.Write("/" & HomeAlias & "/images/default_banner.gif?" & GB_STU)
End If
Response.Write(""" WIDTH=""360"" HEIGHT=""40"" style=""cursor:hand;"" onClick=""" & onClickValue & """> " & vbCrLf)
Response.Write(Content.Fields("見出し文") & vbCrLf)
Response.Write("
" & vbCrLf)
Response.Write(" | " & vbCrLf)
Response.Write(" ")
End If
Next
%>
|
|
|
<% = HtmlFooter %>
<%
End Sub
%>