OSDN Git Service

タイプミスでした
authoryamat0jp <terukohietori@gmail.com>
Mon, 20 Jan 2020 08:49:49 +0000 (17:49 +0900)
committeryamat0jp <terukohietori@gmail.com>
Mon, 20 Jan 2020 08:49:49 +0000 (17:49 +0900)
WebModuleUnit1.pas

index fcc58a5..d1eea68 100644 (file)
@@ -499,14 +499,19 @@ begin
 end;
 
 function TWebModule1.mente: Boolean;
+var
+  s: string;
 begin
   if FDTable3.FieldByName('mente').AsBoolean = true then
   begin
+    s:=Request.QueryFields.Values['db'];
+    if s <> '' then
+      s:='?db='+s;
     result := true;
     Response.Content :=
       '<p><br><h1 style=text-align:center>\82½\82¾\82¢\82Ü\83\81\83\93\83e\83i\83\93\83X\92\86\82Å\82·^_^</h1>' +
-      Format('<p style=text-align:center><a href=%s/admin>\8aÇ\97\9d\8eÒ\97p\83\8d\83O\83C\83\93</a>',
-      [Request.ScriptName]);
+      Format('<p style=text-align:center><a href=%s/admin%s>\8aÇ\97\9d\8eÒ\97p\83\8d\83O\83C\83\93</a>',
+      [Request.ScriptName,s]);
   end
   else
     result := false;
@@ -1015,6 +1020,9 @@ var
   i: Integer;
   s: string;
 begin
+  Response.ContentType := 'text/html; charset="utf-8"';
+  if mente = true then
+    Exit;
   s := Request.QueryFields.Values['db'];
   if s <> '' then
     FDTable1.Locate('dbnum', s, []);
@@ -1024,9 +1032,7 @@ begin
   index.Tag := i;
   tagstr := '/index';
   Self.Tag := Integer(@tagstr);
-  Response.ContentType := 'text/html; charset="utf-8"';
-  if mente = false then
-    Response.Content := index.Content;
+  Response.Content := index.Content;
 end;
 
 procedure TWebModule1.WebModule1jumpAction(Sender: TObject;