put the ad (quote) banners in - last major feature in MISSINGFUNCS

This commit is contained in:
2026-03-02 22:52:45 -07:00
parent c26e7340c7
commit 5fa05bb086
33 changed files with 125 additions and 2 deletions
+12
View File
@@ -16,6 +16,7 @@ import (
"net/http"
"time"
"git.erbosoft.com/amy/amsterdam/database"
"github.com/klauspost/lctime"
"github.com/labstack/echo/v4"
log "github.com/sirupsen/logrus"
@@ -129,6 +130,17 @@ func AmSendPageData(ctxt echo.Context, amctxt AmContext, command string, data an
}
menus[1] = AmMenu("fixed")
amctxt.VarMap().Set("__leftMenus", menus)
ad, err := database.AmGetRandomAd(ctxt.Request().Context())
if err != nil {
ad = &database.Advert{
AdId: -1,
ImagePath: "",
PathStyle: -1,
Caption: nil,
LinkURL: nil,
}
}
amctxt.VarMap().Set("__bannerad", ad)
if tmp := amctxt.GetScratch("frame_suppressLogin"); tmp != nil {
amctxt.VarMap().Set("__suppressLogin", true)
}