%
main()
Sub main()
If Not(InternetCheck()) Then
Exit Sub
End If
' If Not(VisitorCheck()) Then
' Exit Sub
' End If
If Not(ShopAdminCheck()) Then
Exit Sub
End If
'Response.Write(GB_ShopAdmin)
'Exit Sub
Dim ActShopID
ActShopID = Request("ActShopID")
If LCase(ActShopID) <> LCase(GB_ShopAdmin) Then
Response.Write("別のウィンドウまたは別のタブページで現在と異なるIDでログインしました。
" & vbCrLf)
Response.Write("同一PC上で複数のIDでログインすることはできません。
" & vbCrLf)
Response.Write("
" & vbCrLf)
Response.Write("戻る" & vbCrLf)
Exit Sub
End If
Dim Query
Dim Content
Dim Content2
Dim Folder
Folder = Request("Folder")
'カレントフォルダ
Dim CurFolder
CurFolder = "" & HomeAliasSL & ShopFolderSL & GB_ShopAdmin & Folder '不正なフォルダ指定を防ぐため引数ではなくセッションにする
Dim fso
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Dim Cnt
'新規フォルダ
Dim NewFolder
NewFolder = Request("NewFolder")
If NewFolder <> "" Then
Dim TmpActFolder
TmpActFolder = CurFolder
Dim NewFolderAry
NewFolderAry = Split(NewFolder, "/")
For Cnt = 0 To UBound(NewFolderAry)
'カレントフォルダ以下に再帰作成
If NewFolderAry(Cnt) <> "" Then
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "*", "*")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "?", "?")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "<", "<")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), ">", ">")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), ",", ",")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), ":", ":")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), ";", ";")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "]", "]")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "/", "/")
NewFolderAry(Cnt) = Replace(NewFolderAry(Cnt), "\", "¥")
TmpActFolder = TmpActFolder & NewFolderAry(Cnt) & "/"
If Not(fso.FolderExists(Server.MapPath(TmpActFolder))) Then
fso.CreateFolder(Server.MapPath(TmpActFolder))
End If
End If
Next
End If
'フォルダ削除
Dim DelFolder
DelFolder = Request("DelFolder")
If DelFolder <> "" Then
If fso.FolderExists(Server.MapPath(CurFolder & DelFolder)) Then
Call fso.DeleteFolder(Server.MapPath(CurFolder & DelFolder), True)
End If
End If
'ファイル削除
Dim DelFile
DelFile = Request("DelFile")
If DelFile <> "" Then
If fso.FileExists(Server.MapPath(CurFolder & DelFile)) Then
Call fso.DeleteFile(Server.MapPath(CurFolder & DelFile), True)
End If
End If
'設定されている既定ドキュメントを取得
Dim DefaultDoc
Set Content = QueryGetShop(GB_ShopAdmin, SQLServer, DatabaseName, DatabaseUser, DatabasePass)
If Not(Content.BOF Or Content.EOF) Then
DefaultDoc = "" & Content.Fields("既定ドキュメント")
End If
'規定ドキュメントが削除された場合は規定ドキュメント解除
Dim DefaultDocUpd
DefaultDocUpd = Request("DefaultDocUpd")
If DelFile <> "" Then
If Not(fso.FileExists(Server.MapPath(CurFolder & DefaultDoc))) Then
DefaultDocUpd = "0" '解除フラグを立てる
End If
End If
'既定ドキュメント更新
If DefaultDocUpd <> "" Then
If DefaultDocUpd = "0" Then
'解除
DefaultDoc = ""
ElseIf DefaultDocUpd = "1" Then
'更新
DefaultDoc = Request("NewDefaultDoc")
End If
Query = "exec SPMショップ既定ドキュメント更新 " & GB_ShopAdmin & ", '" & DefaultDoc & "' "
'Response.Write(Query)
'Exit Sub
Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass)
End If
'商品公開フラグ
If Request("Publishing") = "1" Then
Query = "exec SPMショップWebページ公開 " & GB_ShopAdmin & ", '" & Request("Publish") & "' "
'Response.Write(Query)
'Exit Sub
Set Content = SQLQuery(Query, SQLServer, DatabaseName, DatabaseUser, DatabasePass)
End If
Response.Redirect("shopsite.asp?ActShopID=" & ActShopID & "&Folder=" & Folder)
End Sub
%>