<!-- #include file="../../../include.asp" --> <% '<!-- '################################################ ' 名称 :ポータルサイト(会社一覧) ' 作成日 :2008/08/22 ' 作成者 :小野 ' 目的 :参加企業一覧の表示 ' 概要 : ' 修正変更: '################################################ '--> ' %> <% 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) & "<BR>") 'Response.Write(RndKaisyaCD(2) & "<BR>") 'Response.Write(RndKaisyaCD(3) & "<BR>") 'Exit Sub %> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=shift_jis"> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Expires" content="-1"> <link href="../../../binx/sj3web.css?<% = TimeUniq() %>" rel="stylesheet" type="text/css"> <title><% = AppTitle %></title> <script language="JScript" src="../../../include.js?<% = TimeUniq() %>"></script> <script language="JScript" src="../../../includesj.js?<% = TimeUniq() %>"></script> <script language="JScript.Encode" src="../../../include_enc.js?<% = TimeUniq() %>"></script> <script language="JScript.Encode" src="../../../includesj_enc.js?<% = TimeUniq() %>"></script> <script type=""text/javascript"" src="../../../javascript.js?<% = TimeUniq() %>"></script> </head> <SCRIPT LANGUAGE="JavaScript"> <!-- ExitFlg = 1; HomeAlias = "<% = HomeAlias %>"; HomeAliasSL = "<% = HomeAliasSL %>"; --> </SCRIPT> <body onkeydown="if(ExitFlg==2)ExitFlg=3;" onBeforeUnload="window.event.returnValue = ExitMsg(ExitFlg)" bgcolor="#5C70B6" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <% 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("参加企業一覧", "")) %> <div id="L0" style="position: absolute; visibility: hidden; left: 0px; top: -2000px;"> <TABLE BORDER="0" CELLSPACING="5" CELLPADDING="0" WIDTH="100%" HEIGHT="100%"> <TR> <TD ALIGN="CENTER"> <TABLE BORDER="0" CELLSPACING="5" CELLPADDING="15" BGCOLOR="#FFFFFF" STYLE="BORDER:1px solid #000000" WIDTH="680" HEIGHT="100%"> <TR> <TD ALIGN="CENTER" BACKGROUND="/<% = HomeAlias %>/images/window_bk.gif?<% = GB_STU %>"> <TABLE WIDTH="600" BORDER="0" CELLSPACING="0" CELLPADDING="0" HEIGHT="100%"> <TR Height="24"> <TD ALIGN="CENTER" VALIGN="TOP" class="tx1416"> 市場 <select size="1" name="ShijoCD" class="tbox4" onChange="tblbtn('portal_kaisha_ichiran.asp?ShijoCD=' + this.value);"> <option value="">全て表示</option> <% Query = "exec SPM市場一覧 '" & GB_SystemCD & "','" & EnshuCD & "'" Set Content = OpenQuery(Query) Do While Not(Content.BOF Or Content.EOF) Response.Write("<option value=""" & Content.Fields("市場CD") & """") If "" & Content.Fields("市場CD") = ShijoCD Then Response.Write(" selected") End If Response.Write(">" & Content.Fields("市場名称") & "</option>" & vbCrLf) Content.MoveNext Loop %> </select> </TD> </TR> <TR> <TD VALIGN="TOP"> <DIV ID="Layer1" STYLE="position:relative; left:0px; top:0px; width:820px; height:100%; z-index:1; border:1px none #000000; overflow:auto;"> <TABLE ID="List" WIDTH="800" BORDER="0" CELLSPACING="0" CELLPADDING="0" STYLE="border-collapse:collapse;" class="tx1416"> <% 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("<TR ALIGN=""CENTER"">" & vbCrLf) Response.Write("<TD ALIGN=""CENTER"">") Response.Write("<img src=""") If "" & Content.Fields("バナー") <> "" 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 & """><BR>" & vbCrLf) Response.Write(Content.Fields("見出し文") & vbCrLf) Response.Write("<BR><BR>" & vbCrLf) Response.Write("</TD>" & vbCrLf) Response.Write("</TR>") End If Next %> </TABLE> </DIV> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </TD> </TR> </TABLE> </div> </body> <% = HtmlFooter %> </html> <% End Sub %>