QuickerSite Developer Guidelines

QuickerSite Developer Guidelines

A practical reference for extending QuickerSite — an all-in-one CMS written in classic ASP / VBScript that runs on IIS (5+) and IIS Express. This guide focuses on the parts you actually touch when writing custom code: the object model, the helper library, and the constant engine that lets you embed VBScript anywhere in a page.

Who this is for. Site developers and AI coding agents writing custom scripts inside QuickerSite. Every signature and rule below was extracted directly from the source in asp/includes/. File and line references point at the real implementation so you can verify anything.

The two ways to add custom logic

  1. Constants (recommended). Author a VBScript function in the backsite (bs_constantEdit.asp), stored as a constant of type QS_VBScript. Invoke it anywhere in page content with a shortcode like [MYCODE] or [MYCODE(arg)]. This is the safe, supported path — see chapter 3.
  2. Module / application scripts. Stand-alone .asp files (see modules/) run via the page’s Application path or run() / Server.Execute. Useful for larger features and AJAX endpoints.

Ground rules (read before writing anything)

  • Option Explicit is enforced site-wide (asp/begin.asp:3) — declare every variable with Dim.
  • The page is UTF-8, Response.Buffer = true, no-cache.
  • In production, runtime errors in constants are swallowed — a broken script silently outputs nothing. Always code defensively and test with the Test! button first.
  • Never trust Request(...). Sanitize for output, escape for SQL.

2. Architecture & request flow #

Every public request lands on default.asp, which is a three-line orchestrator:

<!-- #include file="asp/begin.asp"-->
<%=run(execBeforePageLoad)%>
<!-- #include file="asp/process.asp"-->

What begin.asp sets up

asp/begin.asp is the master include. It pulls in ~140 include files (all the classes and helpers) and creates the global objects you will use. By the time your code runs, these already exist:

GlobalTypeWhat it is
dbcls_databaseDatabase access. db.Execute(sql), db.GetDynamicRS.
customercls_customerThe current site/tenant and all its settings. customer.pick(cId) already called.
selectedPagecls_pageThe page being requested (picked by iId or sCode).
logoncls_logonEditAuthentication / logged-in user state.
messagecls_MessagesStatus / error message collector.
cPopupcls_popupPopup / lightbox handler.
cIdfunction → IntegerCurrent customer id. The multi-tenant scoping key for every query.

Rendering pipeline

  1. process.asp decides what the request is (page view, login, form post, search, AJAX…).
  2. The chosen cls_page is rendered via selectedPage.buildTemplate (asp/includes/page.asp:1158), which substitutes [PAGEBODY], [PAGEMENU], meta tags, etc. into the template HTML.
  3. While building the body, treatConstants() (asp/includes/insertConstants.asp) scans the text for [SHORTCODE] tokens and replaces them — including running your VBScript constants. This is where your custom code executes.
Multi-tenant. One QuickerSite install can host many sites, each identified by cId. Almost every table has an iCustomerID column. Always scope your queries with iCustomerID = cId or you will leak/clash data across sites.

3. The constant / CustomFunction engine #

This is the most important chapter for custom development. Understand it and everything else follows.

How a constant is stored

A custom script is a row in tblConstant of type QS_VBScript (value 2), edited in bs_constantEdit.asp. It has three fields:

FieldDB columnPurpose
ParameterssParametersThe VBScript argument list, e.g. iCount, sCategory.
Function bodysValueThe code that produces output.
Global CodesGlobalOptional helper Functions/Classes, loaded via ExecuteGlobal before the body runs.

What QuickerSite does with it

At render time, executeConstant() (asp/includes/insertConstants.asp:246) wraps your body like this and runs it:

function CustomFunction(<your Parameters>)
    <your Function body>
end function
executeConstant = CustomFunction(<actual arguments from the shortcode>)
The Response.Write trick. Before running, the engine text-replaces every response.write in your body with CustomFunction = CustomFunction &. So both of these append to the returned output:
' Style A - looks like normal ASP
Response.Write "<p>Hello</p>"

' Style B - assign directly (identical effect)
CustomFunction = CustomFunction & "<p>Hello</p>"

The hard rules

  • Return a string fragment only. Do not emit <html>/<body>, do not set headers, never call Response.End — your output is spliced into an existing page where the shortcode appears.
  • Errors are silent in production. executeConstant runs under On Error Resume Next; if your script errors, it returns "" and the visitor sees nothing. Errors are only shown in Test! mode.
  • Declare everything (Option Explicit).
  • Nesting is limited. Constants can contain other shortcodes, resolved recursively up to a small depth.

Invoking your constant

[MYCODE]              ' no parameters
[MYCODE(5)]           ' one parameter
[MYCODE(5, "news")]   ' multiple parameters - strings in double quotes

Put the shortcode in any page body, list item, template, header/footer, or even another constant. The matching regex is asp/includes/insertConstants.asp:49.

The author/test loop

  1. Backsite → ASP/VBScripts (bs_scriptList.asp) → new item.
  2. Fill Parameters, Function body, optional Global Code.
  3. Click Test!. The test harness (bs_constantTest.asp) runs the script and shows TEST OK! with the output, or TEST FAILED! with the error. Supply sample parameter values (in double quotes) when prompted.
  4. Save, then insert [YOURNAME] into a page.

4. Globals available to your code #

Because constants run inside the fully-loaded page context, the entire object model and helper library is in scope. The objects you will reach for most:

db — database

Dim rs
Set rs = db.Execute("select sTitle from tblPage where iCustomerID=" & cId & " and bOnline=" & getSQLBoolean(true))
Do While not rs.EOF
    Response.Write "<li>" & sanitize(rs("sTitle")) & "</li>"
    rs.MoveNext
Loop
rs.Close : Set rs = Nothing

customer — current site settings

Common reads: customer.siteName, customer.sDatumFormat, customer.language, customer.sUrl, customer.sQSUrl, customer.bUserFriendlyURL. It also exposes collections like customer.forms, customer.feeds, customer.galleries, customer.constants (each returns a Scripting.Dictionary).

selectedPage — the current page

Common reads: selectedPage.iId, selectedPage.sTitle, selectedPage.sValue, selectedPage.iParentID. Useful methods: selectedPage.subPages(true), selectedPage.listitems(true), selectedPage.parentPage. See cls_page.

cId & localization

cId returns the current customer id (always use it to scope queries). l("key") returns a localized label string.

Convention: the codebase prefixes variables by type — i integer, s string, b boolean, d date. Class fields and DB columns follow the same scheme (e.g. iId, sTitle, bOnline, dCreatedTS).

5. Most-used classes #

Ranked by how often they are instantiated across the codebase (new cls_* count). These are the classes worth knowing. All follow the same lifecycle pattern:

Dim obj
Set obj = new cls_page      ' 1. create
obj.Pick(123)               ' 2. load a row by id (customer-scoped where relevant)
Response.Write obj.sTitle   ' 3. read properties
' obj.getRequestValues()    ' 4. (back-office) fill from Request.Form
' obj.Save                  ' 5. validate + upsert  -> returns True/False
' obj.remove                ' 6. delete (cls_contact calls it .delete)
Set obj = Nothing           ' 7. release

Collections (e.g. customer.forms, page.listitems) return a Scripting.Dictionary keyed by id. Iterate with For Each key In dict ... dict(key) ....

ClassUsesRole
cls_page49Pages, list pages, list items, menu nodes, rendering
cls_mail_message20Email composition/sending
cls_database19DB connection & queries (the db global)
cls_form15Forms + submissions
cls_contact15Site members / intranet users
cls_post13Forum / theme posts & replies
cls_catalogItem12Catalog (product/data) items
cls_menu11Menu / breadcrumb / back-office tree HTML
cls_catalog / cls_feed / cls_gallery / cls_poll / cls_customer / cls_constant6–8Catalogs, RSS feeds, image galleries, polls, the site object, custom-code constants

cls_page most used #

asp/includes/page.asp — one class to rule everything content: normal pages, container/menu pages, list pages and their list items, external links and the homepage.

Key properties

  • iId Primary key (Null for a new, unsaved page).
  • iParentID, iListPageID Parent in the menu tree / owning list page.
  • iCustomerID Owning tenant (defaults to cId).
  • sTitle, sValue, sValueTextOnly Title, HTML body, plain-text body.
  • sCode Application code (uppercase) used by pickByCode and the sCode form field.
  • sUserFriendlyURL SEO slug.
  • bOnline, bDeleted, bContainerPage Published / soft-deleted / is a menu container.
  • iRang Sort order among siblings.
  • dOnlineFrom, dOnlineUntill, dPage Publish window and page date.
  • iHits, iVisitors Counters.
  • sOrderBY Presence marks the page as a list page; defines item sort.
  • iCatalogId, iFormID, iFeedId, iTemplateID, iThemeID Attached catalog / form / feed / template / theme.
  • sProp01sProp08 Eight generic page-block content slots ([PAGE_BLOCK01..08]).

Key methods

  • Pick(id) db Load a page by iId into all properties.
  • pickByCode(sPageCode) db Load by sCode (customer-scoped). pickByCodeNOCID ignores the tenant filter.
  • Save db Validate (Check()) then insert/update tblPage; handles ranking, homepage, cache invalidation. Returns True/False.
  • remove / canBeDeleted() db Delete (soft via bDeleted) and guard checks.
  • subPages(onlineOnly) db Dictionary of child pages (iParentID = iId), by iRang.
  • listitems(onlineOnly) db Dictionary of fully-loaded list items for a list page. fastlistitems is the lightweight variant.
  • parentPage / listPage / theme / catalog / Feed / form Return the related object.
  • getLink(includePijltje) / getSimpleLink / getClickLink(BO) html Anchor HTML to this page.
  • buildTemplate html Full page render (templates + token substitution). Used by the pipeline; rarely called from a constant.
  • addHit() / addVisit() db Increment counters.
  • getRequestValues() Back-office: populate from Request.Form (permission-gated).

cls_database (the db global) #

asp/includes/database.asp — abstracts Access / SQL Server / MySQL behind one object. No public properties; use the global db instance.

  • Execute(sql) Run SQL against the main DB; returns an ADODB recordset (or fires DML). Your workhorse for reads.
  • GetDynamicRS Returns an updatable recordset (CursorType=1, LockType=3) for inserts/edits via .AddNew/.Update.
  • ExecuteLabels(sql) / GetDynamicRSLabels Same, against the separate labels database.
  • getConn() / getConnLabels() Lazily-opened, cached ADODB connections.
SQL portability. Because the DB engine varies, use the helpers getSQLBoolean(b), getSQLDate(d), getSQLDateFunction() and getTOPSyntax(n, sql) instead of hard-coding True/#dates#/TOP.

cls_customer (the customer global) #

asp/includes/customer.asp — the site/tenant: every site-wide setting plus accessors to all content collections. Already loaded as customer.

Useful properties

  • iId, sName, siteName, siteTitle, sURL, sSiteSlogan Identity.
  • sDatumFormat, language Date format & language id.
  • webmasterEmail, webmaster, copyRight Contact / footer info.
  • bUserFriendlyURL, bUseCachingForPages, bShoppingCart, bIntranet, bCatalog Feature flags.
  • sHeader, sFooter, sLeftBanner, sRightBanner Layout HTML.

Useful methods / properties

  • sVDUrl / sQSUrl Site URL with virtual-dir / QuickerSite-dir appended.
  • forms / feeds / galleries / polls / catalogs / templates / themes / constants db Dictionaries of the matching objects.
  • newsletters / newsletterCategories / guestbooks / popups / mails / tickets db More content collections.
  • getHomePageObj The homepage cls_page.
  • iTotalHits / iMaxVisits / nmrbContacts db Lazily-computed stats.
  • cacheConstants / cacheFeeds / cacheGalleries / cachethemes Rebuild the Application caches (call after editing constants programmatically).

cls_contact #

asp/includes/contact.asp — a site member / intranet user (login, profile fields, avatar, permissions, forum posts).

Properties

  • iId, iCustomerID, iStatus Identity & status.
  • sEmail, sNickName, sPw, sAvatar Login & display.
  • fields Dictionary of profile field-id → value.
  • dLastLoginTS, dCreatedTS Timestamps.

Methods

  • Pick(id) / quickPick(id) db Load with / without profile field values.
  • Save(contactFields) db Validate & upsert (pass the field definitions).
  • delete db Remove the contact and all dependents (this is the “remove”).
  • posts db Dictionary of the member’s cls_post.
  • resetPW db Generate a new password & email it.
  • getAvatar / sImgTagAvatar(size) html Avatar HTML (gravatar fallback).
  • savePermissions(iBodyID, iTitleID, iLPID) db Per-page access rights.

The logged-in member is reachable via getContact(id) and the logon object.

cls_form #

asp/includes/form.asp — a form definition, its fields, submission storage, email/autoresponder and an optional on-submit script.

Properties

  • iId, sName, sCode Identity & shortcode.
  • sIntro, sFeedback, sButton, sReset Display text.
  • sTo, sSubject, bSendEmail, bAttachFiles, bCaptcha Mail & behaviour.
  • bAutoResponder, sAutoResponse, sAutoResponseSubject Autoresponder.
  • sRedirect, sScriptUponSubmission Post-submit redirect & custom hook.

Methods

  • Pick(id) / Save / remove db
  • fields db Dictionary of cls_formField by iRang.
  • build(action, align, buttonType, itemID) html Render the full form HTML; on postback it validates, uploads, stores a submission, mails, runs the script, then shows feedback or redirects.
  • submissions / removeAllSubmissions db
To drop a managed form into a page you usually just reference it via the page’s Form setting; in custom code you can render one with Set f = new cls_form : f.Pick(id) : Response.Write f.build("default.asp","","submit",0).

cls_catalog & cls_catalogItem #

asp/includes/catalog.asp + catalogItem.asp — structured, field-driven content (products, directories, datasets) with images, files and an optional attached form.

cls_catalog

  • iId, sName, sItemName, sOrderItemsBy, iPageSize, bSearchable, iFormID
  • Pick(id) / Save / remove db
  • items db Dictionary of cls_catalogItem.
  • fields(sType) db Field definitions; sType filters (“search”,“public”).
  • form / filetypes Related objects.

cls_catalogItem

  • iId, sTitle, iCatalogID, fields (field-id→value), sPicExt, dDate
  • Pick(id) / Save() / remove db
  • showPic(iThumbnailSize) html <img>/lightbox link.
  • sFiche html Item detail view (template-driven).
  • files / submissions db

cls_post #

asp/includes/post.asp — a forum/theme topic or reply (a reply has iPostID set to its parent topic).

  • iId, iThemeID, iPostID, iContactID, sSubject, sBody, sKey, bNeedsToBeValidated
  • Pick(id) / Save / remove db Save also notifies subscribers by email.
  • buildPost(themeObj, showReplies) / buildShortPost html Interactive / compact post HTML.
  • replies(loggedOnAsModerator) db Child replies.
  • contact / theme / parentTopic Related objects.

cls_feed / cls_gallery / cls_poll #

Three “widget” classes with the same shape: Pick(id), Save, remove, a sCode shortcode, and a build that returns ready HTML. They are usually invoked through their dedicated shortcodes ([qs_feed:CODE], [qs_gallery:CODE], [QS_POLL:CODE]) rather than from VBScript.

  • cls_feed (feed.asp) — RSS/ATOM ingestion. sUrl, iMaxItems, iCache, sTemplate; build html fetches & renders.
  • cls_gallery (gallery.asp) — image gallery. sPath, iThumbSize, iPicsInRow, sType (SC/SS/NS…); build html scans the folder & renders thumbnails/slideshow.
  • cls_poll (poll.asp) — voting. sQuestion, Questions (1..15), voting window; build(withdiv) / showresults / registerVote.

cls_constant #

asp/includes/constant.asp — the storage object behind your custom scripts and text/HTML snippets. You rarely instantiate it directly, but it is good to know the shape.

  • iId, sConstant (the name/shortcode), iType (0 text, 1 HTML, 2 VBScript), sValue (body), sParameters, sGlobal
  • dOnlineFrom, dOnlineUntill Optional active window.
  • Pick(id) / Save / remove / getRequestValues() db
  • bOnline / statusString Active-window state.

List all of a site’s constants with customer.constants; the ones of type QS_VBScript are your scripts.

cls_menu & cls_Messages #

cls_menu html

asp/includes/menu.asp — renders navigation HTML.

  • getMenu(pageObj) Public site menu (cached).
  • getIntranetMenu(pageObj) Intranet menu.
  • showParents(pageId, withLink) Breadcrumb trail.
  • cssType, iSubMenuRoot Style selector & forced submenu root.

cls_Messages (the message global)

asp/includes/messages.asp — collects status/error messages shown to the user.

  • add(key) / addError(key) Queue a message by its label key (e.g. message.Add("fb_saveOK")).
  • hasMessages() / hasErrors()
  • showAlert() html Render queued messages as a popup.

6. Helper functions #

Global functions from asp/includes/functions.asp (and a few siblings) — all in scope inside constants. These are the ones you will use constantly.

Output & sanitizing

FunctionDoes
sanitize(s) / quotRep(s)HTML-escape " < >. Use on every dynamic value you output.
quotRepJS(s)Escape a string for inside inline JavaScript.
Server.HTMLEncode(s)Standard ASP HTML-encode (also fine for output).
removeHTML(t)Strip all HTML tags → plain text.
LinkURLs(t)Auto-link URLs/emails and turn newlines into <br>.
show(v)"" if empty, else LinkURLs(v).
splitby(v, n)Insert <br /> every n chars.
clickEmail(addr)Render a mailto: link.

Type conversion & validation

FunctionDoes
isLeeg(v)True if Null/Empty/blank. The primary “is empty” test.
isNumeriek(v)Safe IsNumeric.
convertGetal(v)To number, 0 if invalid. Use on ids/counts/params.
convertStr(v)To string, "" if Null (error-safe).
convertBool(v)To Boolean from 1/0/"true"/"false".
CheckEmailSyntax(s)Regex email validation.
IsAlphaNumeric(s)True if only a-z 0-9 _ - .
GetFileExtension(name)Extension after the last dot.

Dates

FunctionDoes
convertEuroDate(d)Format as dd/mm/yyyy (locale-aware).
convertEuroDateTime(d)Date + time.
formatTimeStamp(ts)Date + HH:MM:SS.
isBetween(from, check, to)True if a date is within a range (open ends allowed).
getDateWithoutSlashToday as a slashless string — handy cache-key fragment.

SQL (engine-aware — use these instead of literals)

FunctionDoes
cIdCurrent customer id — scope every query with it.
cleanUp(s)SQL-escape single quotes (''') for inline string values.
getSQLBoolean(b)Correct boolean literal (True vs 1).
getSQLDate(d) / getSQLDateFunction()Correct date literal / “now” function.
getTOPSyntax(n, sql)Replace [TOP]/[LIMIT] tokens correctly per engine.
sqlCustIdReady-made tblPage.iCustomerID = <cId> clause.

Composition & misc

FunctionDoes
l("key")Localized label text.
run(scriptPath)Server.Execute another ASP fragment (compose larger output).
getHomePage() / getContact(id)Cached cls_page / cls_contact lookups.
UserIP()Real client IP (honors X-Forwarded-For).
EnCrypt(id) / decrypt(s)Obfuscate page ids for URLs (default.asp?iId=…). Not real encryption — never use for secrets.
secCode / QS_secCodeHidden / checkCSRFCSRF token plumbing for your own forms that post back.

7. Constants #

Global const values from asp/includes/constants.asp (and a few from begin.asp). The ones you actually reference in custom code:

Content types

ConstantValueMeaning
QS_textonly0Constant stores plain text.
QS_html1Constant stores HTML.
QS_VBScript2Constant is an executable script (your custom code).
QS_VBScriptIdentifier"#!!QS_VBSCRIPT!!#"Internal marker separating body from parameters.

Layout / placement

ConstantValue
QS_centerAlign / QS_leftAlign / QS_rightAlign / QS_topAlign"center" / "left" / "right" / "top"
pl_Vertical / pl_Horizontal"V" / "H"
QS_nomenu"nomenu"

Environment / misc

ConstantValueMeaning
C_QS_VERSION"4.4"QuickerSite version.
QS_CHARSET"utf-8"Response charset.
QS_defaultPW"admin"Default admin password (must be changed).
QS_ltr / QS_rtl"ltr" / "rtl"Text direction.
QS_feedNoText10000Sentinel: feed shows no body text.

There are also many btn_* back-office button ids and c* action keys (e.g. cLogOff = "logoff", cRegister = "register") used by process.asp dispatch — relevant only if you build back-office or login flows.

8. Database overview #

QuickerSite ships with 54 tables (627 columns). The default install uses an Access (Jet) database; the same schema runs on SQL Server and MySQL via cls_database. The full schema is created by the bootstrap DDL (CREATE TABLE / ALTER TABLE ... ADD COLUMN). This chapter is the map you need when writing custom db.Execute queries.

Reading this with an AI agent? The live, fetchable copy of these docs (including this data model) is at pietercooreman.github.io/QuickerSite/. The prompt builder (chapter 10) embeds that URL so an agent can pull the exact column list on demand.

Conventions

  • Primary key: every table has an autonumber iId (COUNTER) primary key.
  • Tenant scoping: most tables carry iCustomerIDalways filter by = cId. Link/child tables (values, subscriptions, page-rights) scope through their parent instead.
  • Naming: column prefixes encode type — i integer/id, s string, b boolean, d date. Foreign keys read i<Entity>ID (e.g. iCatalogID, iFormID, iContactID).
  • No enforced FKs: relationships are by convention only (Access/Jet) — joins are written in SQL, integrity is maintained in the VBScript classes.

Access type → meaning

DDL typeShown asMeaning
COUNTER NOT NULLPKAutonumber primary key (iId).
LONG / INTEGERIntegerWhole number; ids, counts, flags-as-int.
BITBooleanTrue/False. Compare with getSQLBoolean(true).
DATETIMEDate/timeUse getSQLDate(d) in queries.
TEXT(255)Text(255)Short string (max 255 chars).
MEMOLong textUnbounded text (HTML bodies, templates, notes).

Tables by area

Click a table name to jump to its column list below. “Tenant” = has an iCustomerID column.

TableColsTenantRole
Core
tblConstant9Constants: text, HTML and your custom VBScript snippets (iType 0/1/2).
tblCustomer20The site/tenant and all its settings (the customer object).
tblModule6Registered custom modules (with optional password).
tblPage73Pages, list pages, list items, menu nodes, external links, homepage.
tblPageComment8Visitor comments on a page.
tblSecondAdmin3Second-admin account + per-feature permission flags.
tblTemplate10Page templates (web / print / email / mobile / WAP variants).
Members
tblContact13Site members / intranet users (login, status, avatar).
tblContactField9Profile field definitions for contacts.
tblContactPage4Per-page access rights for a contact (title/body/list).
tblContactRegistration6Pending registrations / activation tickets.
tblContactValues3Per-contact profile field values.
Catalog
tbCatalogItemFields3Per-item field values (note: table name is tb*, not tbl*).
tblCatalog24Catalog definition (products/data sets).
tblCatalogField9Field definitions for a catalog.
tblCatalogFileType3File-type categories for catalog item files.
tblCatalogItem10A catalog item (row).
tblCatalogItemFiles7Files attached to a catalog item.
Forms
tblForm27Form definition (email, autoresponder, redirect, hooks).
tblFormField19Fields belonging to a form.
tblFormFieldValue4Field values for a submission.
tblFormSubmission6A stored form submission.
Widgets
tblCloud6Tag-cloud definition.
tblFeed27RSS/ATOM feed widget definition.
tblGallery38Image gallery widget definition.
tblGuestBook17Guestbook definition (templates, validation).
tblGuestBookItem10Guestbook entries and replies.
tblPoll13Poll definition (question + up to 15 answers sA1..sA15).
tblPollVote5Individual poll votes.
tblPopup15Popup / lightbox definition.
Forum
tblPost14Forum posts: topics and replies (iPostID links a reply).
tblTheme32Forum/theme definition (subscriptions, notifications).
tblThemeSubscription2Contact subscriptions to a theme.
tblThemeTopicSubscription2Contact subscriptions to a single topic.
Newsletter
tblNewsletter11Newsletter (email) definition.
tblNewsletterCategory10Subscriber categories / signup forms.
tblNewsletterCategorySubscriber8Category subscribers.
tblNewsletterLog6Per-subscriber send/read log.
tblNewsletterMailing7A scheduled/sent mailing of a newsletter.
Mail
tblCustomerIntranetMessage5Per-status intranet messages to members.
tblMail7Sent mass-mail records.
tblMailContact2Recipients of a mass mail.
Calendar
tblCalendar8Availability/booking calendar definition.
tblCalendarBooking14A booking against a calendar.
tblEvent16Calendar events.
Shop
tblQShopCategory7Shop product category (self-nesting).
tblQShopMake7Shop product brand/make.
tblQShopProdCat2Product-to-category link table.
tblQShopProduct13Shop product (price, stock, images).
Stats
tblMonitor4Raw visitor-detail monitor log.
tblSession8Visitor session log (browser, referer, IP, start page).
Admin
tblClient8CRM client records (multi-site admin).
tblClientProduct13Products/services billed to a client.
tblPackage14Site package / provisioning template.
Watch-outs. tbCatalogItemFields is spelled tb (not tbl). A few date columns are stored as text (e.g. tblContactRegistration.dCreatedTS is TEXT). tblPage uses createdTS/updatedTS (no d prefix) alongside dUpdatedOn. tblPoll stores answers as sA1..sA15 with matching colour columns sA1c..sA15c.

Key relationships

tblCustomer (iId) ──< tblPage (iCustomerID)
tblPage (iId) ──< tblPage (iParentid)        ' menu tree
tblPage (iId) ──< tblPage (iListPageId)      ' list items
tblPage.iCatalogId  ─> tblCatalog (iId)
tblPage.iFormId     ─> tblForm (iId)
tblPage.iFeedId     ─> tblFeed (iId)
tblPage.iTemplateID ─> tblTemplate (iId)

tblCatalog (iId) ──< tblCatalogField (iCatalogId)
tblCatalog (iId) ──< tblCatalogItem (iCatalogID) ──< tbCatalogItemFields (iItemID)
                                                  └──< tblCatalogItemFiles (iItemID)

tblForm (iId) ──< tblFormField (iFormID)
tblForm (iId) ──< tblFormSubmission (iFormID) ──< tblFormFieldValue (iSubmissionID)

tblContact (iId) ──< tblContactValues (iContactId)   ' profile field values
tblContact (iId) ──< tblContactPage (iContactID)     ' per-page access rights
tblContactField (iId) ─> tblContactValues (iFieldId)

tblTheme (iId) ──< tblPost (iThemeID)
tblPost (iId)  ──< tblPost (iPostID)         ' replies link to their topic

tblNewsletter (iId) ──< tblNewsletterMailing (iNewsletterID)
tblNewsletterCategory (iId) ──< tblNewsletterCategorySubscriber (iCategoryID)

Example: a tenant-safe join

Dim sql, rs
sql = "select i.sTitle, c.sName as catalog " & _
      "from tblCatalogItem i " & _
      "inner join tblCatalog c on i.iCatalogID = c.iId " & _
      "where c.iCustomerID = " & cId & " " & _
      "and i.dOnlineFrom <= " & getSQLDate(Date) & " " & _
      "order by i.dCreatedTS desc"
Set rs = db.Execute(sql)
Do While not rs.EOF
    Response.Write "<li>" & sanitize(rs("sTitle")) & "</li>"
    rs.MoveNext
Loop
rs.Close : Set rs = Nothing

All tables & columns

Alphabetical. Expand a table to see its columns and types.

tbCatalogItemFields 3 columns
ColumnType
iFieldIdInteger
iItemIDInteger
sValueLong text
tblCalendar 8 columns
ColumnType
dCreatedTSDate/time
iContactIDInteger
iCustomerIDInteger
iIdPK
sBGColorText(255)
sFontFamilyText(255)
sNameText(255)
sTemplateLong text
tblCalendarBooking 14 columns
ColumnType
bEOnlyMorningBoolean
bSOnlyAfternoonBoolean
dCreatedTSDate/time
dEndDateDate/time
dStartDateDate/time
dUpdatedTSDate/time
iCalendarIDInteger
iIdPK
iStatusInteger
sEMailText(255)
sNameText(255)
sNotesLong text
sPhoneText(255)
sUniqueKeyText(255)
tblCatalog 24 columns
ColumnType
bAutoThumbBoolean
bOnlineBoolean
bPushRSSBoolean
bSearchableBoolean
bUseShadowBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iAutoCloseInteger
iCustomerIDInteger
iFormIDInteger
iIdPK
iMaxThumbSizeInteger
iPageSizeInteger
sFilePathText(255)
sFormTitleText(255)
sFullImageText(255)
sItemNameText(255)
sItemViewLong text
sNameText(255)
sOrderItemsByText(255)
sResizePicToInteger
sRSSView1Long text
sRSSView2Long text
sRSSView3Long text
tblCatalogField 9 columns
ColumnType
bMandatoryBoolean
bPublicBoolean
bSearchFieldBoolean
iCatalogIdInteger
iIdPK
iRangInteger
sNameText(255)
sTypeText(255)
sValuesLong text
tblCatalogFileType 3 columns
ColumnType
iCatalogIDInteger
iIdPK
sNameText(255)
tblCatalogItem 10 columns
ColumnType
bFormBoolean
dCreatedTSDate/time
dDateDate/time
dOnlineFromDate/time
dOnlineUntillDate/time
dUpdatedTSDate/time
iCatalogIDInteger
iIdPK
sPicExtText(255)
sTitleText(255)
tblCatalogItemFiles 7 columns
ColumnType
dCreatedTSDate/time
dUpdatedTSDate/time
iFileTypeIdInteger
iIdPK
iItemIDInteger
sNameText(255)
sTitleText(255)
tblClient 8 columns
ColumnType
dCreatedTSDate/time
dUpdatedTSDate/time
iIdPK
sAddressLong text
sContactPersonText(255)
sMainEmailText(255)
sNameText(255)
sOtherEmailLong text
tblClientProduct 13 columns
ColumnType
dCreatedTSDate/time
dEndServiceDate/time
dLastRenewalDateDate/time
dStartServiceDate/time
dUpdatedTSDate/time
iClientIDInteger
iIdPK
iPriceInteger
iRenewalInteger
iVatInteger
sInvoiceNrText(255)
sNameText(255)
sNotesLong text
tblCloud 6 columns
ColumnType
dUpdatedTSDate/time
iIdPK
iResetDaysInteger
sCodeText(255)
sKeywordsLong text
sNameText(255)
tblConstant 9 columns
ColumnType
dOnlineFromDate/time
dOnlineUntillDate/time
iCustomerIdInteger
iIdPK
iTypeInteger
sConstantText(255)
sGlobalLong text
sParametersText(255)
sValueLong text
tblContact 13 columns
ColumnType
bGetEmailsFromSiteBoolean
dCreatedTSDate/time
dLastLoginTSDate/time
dLogoutTSDate/time
dUpdatedTSDate/time
iCustomerIDInteger
iIdPK
iStatusInteger
sAvatarText(255)
sEmailText(255)
sNickNameText(255)
sOrigEmailText(255)
sPwText(255)
tblContactField 9 columns
ColumnType
bMandatoryBoolean
bProfileBoolean
bSearchFieldBoolean
iCustomerIDInteger
iIdPK
iRangInteger
sFieldNameText(255)
sTypeText(255)
sValuesLong text
tblContactPage 4 columns
ColumnType
iBodyIDInteger
iContactIDInteger
iLPidInteger
iTitleIDInteger
tblContactRegistration 6 columns
ColumnType
dCreatedTSText(255)
iCustomerIDInteger
iIdPK
sEmailText(255)
sTicketText(255)
sVisitorDetailsLong text
tblContactValues 3 columns
ColumnType
iContactIdInteger
iFieldIdInteger
sValueLong text
tblCustomer 20 columns
ColumnType
adminPasswordText(255)
bAllowNewRegistrationsBoolean
bApplicationBoolean
bCatalogBoolean
bIntranetBoolean
bMonitorBoolean
bUserFriendlyURLBoolean
dCreatedTSDate/time
defaultTemplateInteger
iIdPK
languageInteger
sDatumFormatText(255)
sFooterLong text
sHeaderLong text
siteNameText(255)
siteTitleText(255)
sNameText(255)
sURLText(255)
webmasterText(255)
webmasterEmailText(255)
tblCustomerIntranetMessage 5 columns
ColumnType
bEnabledBoolean
iCustomerIDInteger
iStatusInteger
sBodyLong text
sSubjectText(255)
tblEvent 16 columns
ColumnType
bOnlineBoolean
dCreatedTSDate/time
dEndDateDate/time
dStartDateDate/time
dUpdatedTSDate/time
iCalendarIDInteger
iIdPK
sColorText(255)
sDescriptionLong text
sEndHourText(255)
sLocationText(255)
sPriceText(255)
sStarthourText(255)
sTitleText(255)
sUrlText(255)
sUrlMapText(255)
tblFeed 27 columns
ColumnType
bEnableJSBoolean
bLinkOnTitleBoolean
bOpenLinkInNWBoolean
bRandomBoolean
bShowAuthorBoolean
bShowCategoryBoolean
bShowDateBoolean
bShowTitleBoolean
bTemplateBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iCacheInteger
iCustomerIDInteger
iIdPK
iLimitToInteger
iMaxItemsInteger
iReloadSecInteger
iTitleLimitToInteger
sCodeText(255)
sHTMLAfterText(255)
sHTMLBeforeText(255)
sKeywordsText(255)
sNameText(255)
sPrefixUrlText(255)
sTemplateLong text
sUrlText(255)
sUrlsLong text
tblForm 27 columns
ColumnType
bAttachFilesBoolean
bAutoResponderBoolean
bCaptchaBoolean
bCookieBoolean
bSendEmailBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iCustomerIDInteger
iIdPK
sAutoResponseLong text
sAutoResponseFromEmailText(255)
sAutoResponseFromNameText(255)
sAutoResponseSubjectText(255)
sAutoResponseWebmasterLong text
sButtonText(255)
sCodeText(255)
sCommentLong text
sFeedbackLong text
sIntroLong text
sNameText(255)
sQAalignText(255)
sRedirectText(255)
sRedirectPrefixText(255)
sResetText(255)
sScriptUponSubmissionLong text
sSubjectText(255)
sToLong text
tblFormField 19 columns
ColumnType
bAllowMSBoolean
bAutoResponderBoolean
bMandatoryBoolean
bUseForSendingBoolean
iColsInteger
iFormIDInteger
iIdPK
iMaxFileSizeInteger
iMaxlengthInteger
iRangInteger
iRowsInteger
iSizeInteger
sAllowedExtensionsText(255)
sFileLocationText(255)
sNameText(255)
sPlaceholderText(255)
sRadioPlacementText(255)
sTypeText(255)
sValuesLong text
tblFormFieldValue 4 columns
ColumnType
iFormFieldIdInteger
iIdPK
iSubmissionIDInteger
sValueLong text
tblFormSubmission 6 columns
ColumnType
dCreatedTSDate/time
dUpdatedTSDate/time
iFormIDInteger
iIdPK
iItemIDInteger
sVisitorDetailsLong text
tblGallery 38 columns
ColumnType
bAutoStartSSBoolean
bFSRBoolean
bNSControlNavBoolean
bNSdirectionNavBoolean
bOpenInNewWindowBoolean
bRandomBoolean
bShadowThumbBoolean
bShowFileNameBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iBrowseByInteger
iCustomerIDInteger
iFullImageSizeInteger
iIdPK
iPicsInRowInteger
iSlideShowTimerQSInteger
iSortImagesByInteger
iSpecialEffectInteger
iThumbSizeInteger
iTypeInteger
sBorderText(255)
sBorderColorText(255)
sCodeText(255)
sCustomLinkText(255)
sCycleEffectText(255)
sFullImageText(255)
sHeightText(255)
sNameText(255)
sNextLinkText(255)
sNSCSSText(255)
sNSImgLinksLong text
sPathText(255)
sPreviousLinkText(255)
sStyleImageText(255)
sStyleTableText(255)
sStyleTableCellText(255)
sTypeText(255)
sWidthText(255)
tblGuestBook 17 columns
ColumnType
bRequireValidationBoolean
dOnlineFromDate/time
dOnlineUntilDate/time
iCustomerIDInteger
iIdPK
iPagingInteger
sBlockIPLong text
sCodeText(255)
sEmailText(255)
sFullTemplateLong text
sNameText(255)
sSortbyText(255)
sTemplateLong text
sTemplateErrLong text
sTemplateFormLong text
sTemplateReplyLong text
sWarningApprovalText(255)
tblGuestBookItem 10 columns
ColumnType
bApprovedBoolean
dCreatedTSDate/time
iGuestBookIDInteger
iIdPK
ipText(255)
sKeyText(255)
sMessageByText(255)
sMessageByEmailText(255)
sReplyLong text
sValueLong text
tblMail 7 columns
ColumnType
dDateSentDate/time
iCustomerIDInteger
iIdPK
iNumberRecInteger
sBodyLong text
sBodyBGColorText(255)
sSubjectText(255)
tblMailContact 2 columns
ColumnType
iMailIDInteger
sEmailText(255)
tblModule 6 columns
ColumnType
bBSPwBoolean
iCustomerIDInteger
iIdPK
sDescriptionLong text
sNameText(255)
sPwText(255)
tblMonitor 4 columns
ColumnType
dtsDate/time
iCustomerIDInteger
iIdPK
sDetailLong text
tblNewsletter 11 columns
ColumnType
bOnlineBoolean
iCustomerIDInteger
iIdPK
sBodyBGColorText(255)
sFromEmailText(255)
sFromNameText(255)
sNameText(255)
sStyleLinkText(255)
sSubjectText(255)
sUnsubscribeTextText(255)
sValueLong text
tblNewsletterCategory 10 columns
ColumnType
bRequireBothBoolean
iCustomerIDInteger
iIdPK
sErrorMessageText(255)
sNameText(255)
sNotifEmailText(255)
sSignupFormLong text
sUnsubscribeFBLong text
sUnsubscribeFBTitleText(255)
sWelcomeMessageLong text
tblNewsletterCategorySubscriber 8 columns
ColumnType
bActiveBoolean
dAddedDate/time
iCategoryIDInteger
iCustomerIDInteger
iIdPK
sEmailText(255)
sKeyText(255)
sNameText(255)
tblNewsletterLog 6 columns
ColumnType
bReadBoolean
dWhenDate/time
iIdPK
iMailingIDInteger
iSubscriberIDInteger
sKeyText(255)
tblNewsletterMailing 7 columns
ColumnType
bLogBoolean
bSentBoolean
dSentDateDate/time
iCustomerIDInteger
iIdPK
iNewsletterIDInteger
sCategoryText(255)
tblPackage 14 columns
ColumnType
iIdPK
sCopySiteIDText(255)
sCopySitePathText(255)
sEmailText(255)
sFeedbackMessageLong text
sNameText(255)
sPathCodebaseText(255)
sPathNewSiteText(255)
sPathTemplatesText(255)
sSetupFormLong text
sSubjectWelcomeEmailText(255)
sUrlText(255)
sUrlTemplatesText(255)
sWelcomeEmailLong text
tblPage 73 columns
ColumnType
bAccordeonBoolean
bContainerPageBoolean
bDeletedBoolean
bHideDateBoolean
bHideFromSearchBoolean
bHomepageBoolean
bIntranetBoolean
bLossePaginaBoolean
bLPExternalOINWBoolean
bMenuGroupBoolean
bNocacheBoolean
bOnlineBoolean
bOpenInNewWindowBoolean
bOpenOnloadBoolean
bPushRSSBoolean
createdTSDate/time
dOnlineFromDate/time
dOnlineUntillDate/time
dPageDate/time
dUpdatedOnDate/time
iCatalogIdInteger
iCustomerIDInteger
iFeedIdInteger
iFormIdInteger
iHitsInteger
iHitsRSSInteger
iIdPK
iListPageIdInteger
iLPOpenByDefaultInteger
iParentidInteger
iRangInteger
iReloadInteger
iTemplateIDInteger
iThemeIDInteger
iUpdatedByInteger
iVisitorsInteger
iPMlocationInteger
sApplicationText(255)
sClassNameText(255)
sCodeText(255)
sDescriptionLong text
sExternalURLText(255)
sExternalURLPrefixText(255)
sFormAlignText(255)
sHeaderLong text
sItemPictureText(255)
sKeywordsLong text
sLPExternalURLText(255)
sLPICText(255)
sOrderBYText(255)
sPageCacheLong text
sPageTitleText(255)
sProp01Long text
sProp02Long text
sProp03Long text
sProp04Long text
sProp05Long text
sProp06Long text
sProp07Long text
sProp08Long text
sPwText(255)
sRedirectToText(255)
sRelText(255)
sRSSLinkText(255)
sSEOtitleText(255)
sTitleText(255)
sTitleToBeValidatedText(255)
sUrlRRSImageText(255)
sUserFriendlyURLText(255)
sValueLong text
sValueTextOnlyLong text
sValueToBeValidatedLong text
updatedTSDate/time
tblPageComment 8 columns
ColumnType
dCreatedTSDate/time
iIdPK
IPaddressText(255)
iPageIDInteger
sAuthorText(255)
sEmailText(255)
sValueLong text
sWebsiteText(255)
tblPoll 13 columns
ColumnType
bShowTitleBoolean
dCreatedTSDate/time
dResetDateDate/time
dVoteDeadlineDate/time
dVoteFromDate/time
dVoteUntilDate/time
iCustomerIDInteger
iIdPK
label_numberofvotesText(255)
label_viewresultsText(255)
label_votenowText(255)
sQuestionText(255)
sCodeText(255)
tblPollVote 5 columns
ColumnType
dVoteTSDate/time
iIdPK
IPText(255)
iPollIDInteger
iVoteInteger
tblPopup 15 columns
ColumnType
bEnabledBoolean
dOnlineFromDate/time
dOnlineUntilDate/time
iAutocloseInteger
iCustomerIDInteger
iHeightInteger
iIdPK
iModeInteger
iShowsInteger
iTemplateIDInteger
iWidthInteger
sNameText(255)
sUrlText(255)
sValueLong text
sViewmodeText(255)
tblPost 14 columns
ColumnType
bNeedsToBeValidatedBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iContactIDInteger
iFileSizeInteger
iIdPK
iPostIDInteger
iThemeIDInteger
sAnNameText(255)
sBodyLong text
sFileDescText(255)
sFileNameText(255)
sKeyText(255)
sSubjectText(255)
tblQShopCategory 7 columns
ColumnType
bOnlineBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iCustomerIDInteger
iIdPK
iParentCatIDInteger
sNameText(255)
tblQShopMake 7 columns
ColumnType
bOnlineBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iCustomerIDInteger
iIdPK
sLogoText(255)
sNameText(255)
tblQShopProdCat 2 columns
ColumnType
iCategoryIDInteger
iProductIDInteger
tblQShopProduct 13 columns
ColumnType
bOnlineBoolean
dCreatedTSDate/time
dUpdatedTSDate/time
iCustomerIDInteger
iIdPK
iMakeIDInteger
iStockInteger
sDefaultImageText(255)
sLongDescLong text
sNameText(255)
sPriceAText(255)
sPriceBText(255)
sShortDescLong text
tblSecondAdmin 3 columns
ColumnType
iCustomerIDInteger
iIdPK
sPasswordText(255)
tblSession 8 columns
ColumnType
BrowserText(255)
dTSDate/time
iCustomerIDInteger
iIdPK
RefererLong text
sLanguageText(255)
startpageText(255)
UserIPText(255)
tblTemplate 10 columns
ColumnType
bCompressBoolean
iCustomerIDInteger
iIdPK
sCompressValueLong text
sEmailValueLong text
sMobileValueLong text
sNameText(255)
sPrintValueLong text
sValueLong text
sWAPValueLong text
tblTheme 32 columns
ColumnType
bAllowAPBoolean
bAllowCommentsBoolean
bAllowHTMLBoolean
bCompactListBoolean
bEmbedBoolean
bFileUploadsBoolean
bForwardPostsToModeratorBoolean
bLockedBoolean
bOnlineBoolean
bPushRSSBoolean
bSmileysBoolean
bUploadBoolean
bValidationBoolean
iContactIDInteger
iCustomerIDInteger
iIdPK
iLimitReplyToInteger
iLimitTopicToInteger
iPageSizeInteger
iSearchTypeInteger
iSubLevelInteger
iTypeInteger
iWidthInteger
sBodyNotificationLong text
sCodeText(255)
sColorEvenText(255)
sColorUnevenText(255)
sLabelYourNameText(255)
sNameText(255)
sSubjectNotificationText(255)
sTopicBodyNotificationLong text
sTopicSubjectNotificationText(255)
tblThemeSubscription 2 columns
ColumnType
iContactIDInteger
iThemeIDInteger
tblThemeTopicSubscription 2 columns
ColumnType
iContactIDInteger
iPostIDInteger

9. Custom-code examples #

Each example shows exactly what goes in the Function body box of bs_constantEdit.asp (and the Parameters / Global Code boxes when used). Remember: write a fragment, never a full page, and never call Response.End.

8.1 Hello world & time of day #

Parameters: none — invoke with [GREETING]. (Adapted from modules/module1.asp.)

Dim dHour
dHour = Hour(Now)

If dHour < 12 Then
    Response.Write "Good morning!"
ElseIf dHour < 17 Then
    Response.Write "Good afternoon!"
Else
    Response.Write "Good evening!"
End If

8.2 Using parameters #

Parameters: sName — invoke with [HELLO("Pieter")]. Always coerce and sanitize parameters; they can carry user input.

Dim safeName
safeName = sanitize(convertStr(sName))
If isLeeg(safeName) Then safeName = "stranger"

Response.Write "<p>Hello, " & safeName & "!</p>"
In Test! mode you will be asked for parameter values — type them in double quotes exactly as they would appear inside the brackets, e.g. "Pieter".

8.3 Querying the database #

Parameters: iCount — invoke with [RECENTPAGES(5)]. Shows the most recent online pages of the current site. Note the defensive coding, tenant scoping, engine-aware helpers, and cleanup.

Dim n, sql, rs, html
n = convertGetal(iCount)
If n <= 0 Then n = 5

' [TOP] is rewritten by getTOPSyntax to the right syntax per DB engine
sql = "select [TOP] iId, sTitle from tblPage " & _
      "where iCustomerID=" & cId & " " & _
      "and bOnline=" & getSQLBoolean(true) & " " & _
      "and bDeleted=" & getSQLBoolean(false) & " " & _
      "order by createdTS desc"
sql = getTOPSyntax(n, sql)

html = ""
Set rs = db.Execute(sql)
Do While not rs.EOF
    html = html & "<li><a href=""default.asp?iId=" & EnCrypt(rs("iId")) & """>" & _
           sanitize(rs("sTitle")) & "</a></li>"
    rs.MoveNext
Loop
rs.Close : Set rs = Nothing

If html <> "" Then Response.Write "<ul>" & html & "</ul>"
SQL injection. If a parameter is a string used in a WHERE clause, wrap it: "... and sCode='" & cleanUp(convertStr(sCode)) & "'". For numbers, run them through convertGetal() first. Never paste raw Request/parameter text into SQL.

8.4 Working with page objects #

Parameters: none — invoke with [CHILDLINKS] on any page that has sub-pages. Builds a menu of the current page’s online children using the in-scope selectedPage object.

Dim kids, k, html
Set kids = selectedPage.subPages(true)   ' true = online only

html = ""
For Each k In kids
    html = html & "<li>" & kids(k).getSimpleLink & "</li>"
Next
Set kids = Nothing

If html <> "" Then Response.Write "<ul class=""childnav"">" & html & "</ul>"

The same pattern works for list items via selectedPage.listitems(true), or for any other page by Set p = new cls_page : p.Pick(id).

8.5 Login-aware output #

Parameters: none — invoke with [ADMINONLY]. Renders content only for a logged-in backsite (webmaster) user. (Adapted from modules/module2.asp.)

If Session(Application("QS_CMS_iCustomerID") & "isAUTHENTICATED") = true Then
    ' Webmaster is logged into the backsite
    Response.Write "<div class=""adminbox"">Secret editor note here.</div>"
Else
    ' Not authenticated - output nothing (or a hint)
    ' Response.Write ""
End If

To also allow the second admin, add or Session(Application("QS_CMS_iCustomerID") & "isAUTHENTICATEDSecondAdmin") = true.

8.6 Global Code: reusable helpers #

Put helper Functions/Classes in the Global Code box; they load (via ExecuteGlobal) before the body. Keep the Function body focused on producing output.

Global Code:

Function Euro(n)
    ' format a number as a euro amount
    Euro = "€ " & FormatNumber(convertGetal(n), 2)
End Function

Parameters: iAmountFunction body — invoke with [PRICE(19.95)]:

Response.Write "<span class=""price"">" & Euro(iAmount) & "</span>"

8.7 A small custom form #

Parameters: none — invoke with [NAMEFORM]. A self-posting form; the sCode hidden field tells QuickerSite which page to reload after submit. (Adapted from modules/module3.asp.)

Response.Write "<form action=""default.asp"" method=""post"">"
Response.Write "<input type=""hidden"" name=""sCode"" value=""FORM"" />"
Response.Write "Your name: <input type=""text"" name=""field"" value=""" & _
    sanitize(Request.Form("field")) & """ /> "
Response.Write "<input type=""submit"" value=""Submit"" />"
Response.Write "</form>"

If Request.Form("field") <> "" Then
    Response.Write "<p>Your name is " & sanitize(Request.Form("field")) & ".</p>"
End If
For anything beyond a toy form (validation, email, file upload, stored submissions) use a managed cls_form instead of rolling your own.

Checklist before you Save

  • ✓ Every variable is Dim’d.
  • ✓ Output is a fragment; no <html>, no Response.End.
  • ✓ Every dynamic value passes through sanitize() / Server.HTMLEncode.
  • ✓ SQL is tenant-scoped (iCustomerID = cId) and inputs are escaped (cleanUp/convertGetal).
  • ✓ Recordsets are .Closed and objects Set…Nothing.
  • ✓ It shows TEST OK! in the backsite tester.

10. Prompt builder #

Generate a compact, accurate spec for an AI coding agent (or yourself) to produce a QuickerSite-ready constant. Fill the form, press Build, copy the result. The generated prompt embeds the engine rules from chapter 3 so the output drops straight into bs_constantEdit.asp.

Browsing vs. offline. Pick the Target AI agent mode below. If your agent can browse (e.g. a web-enabled assistant), the prompt tells it to fetch the published docs at pietercooreman.github.io/QuickerSite/ for exact schema and class details. If it is offline (plain API / local model), the prompt forbids guessing and instead asks you to paste the relevant schema (copy it from chapter 8) — otherwise the model would hallucinate the URL’s contents.
Database Login check customer selectedPage Request input Session Application cache FileSystem Outbound HTTP Nested shortcodes

Copy real tables from chapter 8 → All tables & columns. With an offline agent and no schema here, the prompt will tell the model to ask instead of guessing.

Press “Build” to generate the prompt.