|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <%
- Option Explicit
-
- Sub put(v)
- response.write v & "<br>"
- End Sub
-
- Sub put_
- put ""
- End Sub
-
- Sub put_error(s)
- put "<span style='color: red; font-weight: bold;'>" & s & "</span>"
- End Sub
- %>
-
-
-
-
-
-
- <%
-
-
-
-
- Migrations.Initialize "Provider=Microsoft.Jet.OLEDB.4.0;Jet OLEDB:Engine Type=5;Data Source=" & Request.ServerVariables("APPL_PHYSICAL_PATH") & "Data\webdata - Copy.mdb;"
-
- Migrations.Tracing = false
- %>
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- <%
- Sub HandleMigration
- putl "<b>Starting Version: " & Migrations.Version & "</b>"
- If Request.Form("mode") = "direct" then
- If Request.Form("direction") = "Up" then
- If Len(Request.Form("to")) > 0 then
- Migrations.MigrateUpTo(Request.Form("to"))
- Else
- Migrations.MigrateUp
- End If
- ElseIf Request.Form("direction") = "Down" then
- If Len(Request.Form("to")) > 0 then
- Migrations.MigrateDownTo(Request.Form("to"))
- Else
- Migrations.MigrateDown
- End If
- End If
- ElseIf Request.Form("mode") = "up_one" then
- Migrations.MigrateUpBy 1
- ElseIf Request.Form("mode") = "down_one" then
- Migrations.MigrateDownBy 1
- End If
- putl "<b style='color: darkgreen'>Final Version: " & Migrations.Version & "</b>"
- End Sub
-
- Sub ShowForm
- %>
- <form action="migrate.asp" method="POST">
- <input type="hidden" name="mode" value="direct">
- <p>
- <b>Direction: </b>
- <select name="direction">
- <option value="Up">Up</option>
- <option value="Down">Down</option>
- </select>
-
- <b>To: </b>
- <input type="text" size="5" name="to">
-
- <input type="Submit" value="Migrate!">
- </p>
- </form>
-
- <form action="migrate.asp" method="POST" style="display: inline">
- <input type="hidden" name="mode" value="up_one">
- <input type="Submit" value="Up 1">
- </form>
-
- <form action="migrate.asp" method="POST">
- <input type="hidden" name="mode" value="down_one">
- <input type="Submit" value="Down 1">
- </form>
-
- <hr>
- <%
- End Sub
-
- Sub Main
- ShowForm
-
- If Len(Request.Form("mode")) > 0 then
- HandleMigration
- Else
- putl "<b>Version: " & Migrations.Version & "</b>"
- End If
- End Sub
- %>
-
- <!doctype html>
- <html>
- <head>
- <style>
- body { font-family: calibri; }
- </style>
- </head>
- <body>
- <% Main %>
- </body>
- </html>
|