<% Set db=JHO_Connect() Set rst=Server.CreateObject("ADODB.Recordset") HidePanel=fncCutStr(GetParam("hp")) Category=fncCutStr(IIf(GetParam("cat")<>"", GetParam("cat"), Dat("cat"))) Dat("cat")=Category qCategory=dbQuote(Category) EncodeData() Set TeikeiHTML=GetTeikeiHTML() Panel =TeikeiHTML("Header") Footer=TeikeiHTML("Footer") ' カテゴリ指定がない場合はエラー If Category="" Then ErrorAndExit("Illegal Access") ' カテゴリのログイン設定 SQL="SELECT isnull(AccessFlg, 0) FROM K_CATEGORY_MST WHERE CategoryCode=" & qCategory AddDebug(SQL) rst.Open SQL, db If rst.EOF=False Then AccessFlg=rst(0) Else AccessFlg=-1 rst.Close AccessID="" If AccessFlg<>0 Then If GetParam("login")<>"" Then SQL="SELECT Password FROM K_CATEGORY_PASSWORD WHERE isnull(VoidFlg,0)=0 AND CategoryCode=" & qCategory & " AND ID=" & dbQuote(fncCutStr(GetParam("uid"))) AddDebug(SQL) rst.Open SQL, db If rst.EOF=False Then AddDebug("rst(0)=" & rst(0)) AddDebug("GetParam(password)=" & Trim(GetParam("password"))) If AccessFlg=1 Then Dat("XM")=Trim(GetParam("uid")) If AccessFlg=2 Then If rst(0)=Trim(GetParam("password")) Then Dat("XM")=fncCutStr(Trim(GetParam("uid"))) Dat("PWD")=basp.md5(GetParam("password")) End If End If End If rst.Close End If AddDebug("XM=" & Dat("XM")) EncodeData() Set TeikeiHTML=GetTeikeiHTML() Panel =TeikeiHTML("Header") Footer=TeikeiHTML("Footer") If Len(Dat("XM"))<1 Then If AccessFlg=2 Then InputPassword=GetTemplate("login_password.html") Else InputPassword="" Response.Write GetTemplate("login.html") Response.End Else Dat("_LOGIN")=Now DATA=EncodeData() If Len(DATA)>0 Then AndData="&data=" & DATA:QDATA="?data=" & DATA End If End If HTML=GetContents("include/index_" & Trim(Category) & ".html") If Len(HTML)<1 Then %><% Else Response.Write HTML End If ShowDebug %>