Generated by
tools/make_api_md.phpfrom the parameter comments inphp2html.lib.php- do not edit by hand, run the tool again. Written for people and AI coding assistants: read this file instead of the 500 KB library.
- One file:
require_once 'php2html.lib.php';- no build step, no package manager. PHP 8.1+. - Call with named arguments - always:
htm_Card_(capt:'@Settings', icon:'fas fa-sliders', clas:'cardW800');. The order of the parameters has changed between versions (1.7); names are stable. An unknown name is a fatal error. - Parameter names are 4 characters from a fixed vocabulary:
labllabel,captcaption,hinttooltip,iconFont Awesome class,namefield name,valuvalue,formform id,actiaction,wdthwidth,vhghmax height,stylstyle,attrattributes,clasCSS class,kindcolour / purpose,vrntvariant,listoptions,plhoplaceholder,rtrnreturn instead of echo. - Output: most
htm_*functions echo their HTML. Withrtrn:truethey return it as a string instead. Functions withoutrtrnalways echo (see the table). - Texts are translated: a text that starts with
@is a translation key -'@Save'is shown vialang()in the language of the session (translations in_trans.sys.json). Texts without@are shown as they are. The language: the one chosen inhtm_LangSelect()($_SESSION['p2h_lang']), else$langset by the page before the require ($lang= 'da';), else English. ($_SESSION['proglang']is not used for the translations.) - Pairs:
htm_Page_...htm_Page_end,htm_Card_...htm_Card_end,htm_Form_...htm_Form_end,htm_Tabs_/htm_Tab...htm_Tabs_end,htm_RowCol_/htm_RowCol_next...htm_RowCol_end,htm_List_/htm_List_item...htm_List_end. Always close what you open. - Session: the library starts the session (httponly, SameSite=Lax, secure on HTTPS) unless the page has started it already.
- Forms and CSRF:
htm_Card_(form:'f_x')wraps the card body in a POST form with the CSRF token. In your own forms echocsrf_field(). Every POST is checked when the library is included: a missing or wrong token stops the request (HTTP 403, CSRF-validating failed) before your code runs - so the page needs nocsrf_verify()of its own (calling it again does no harm). - POST from JavaScript:
p2hPost(url, {id: 7}).then(r => r.json())(every page ofhtm_Page_has it) sends the CSRF token along. A plainfetch()POST without the token gets 403. - Log in:
htm_Login()shows the form;sys_login(hash:$hash, pass:$_POST['p2h_pass'])checks it (a growing wait after wrong tries, for all browsers together) and returns '' when it is right;sys_loginUser()is '' when nobody is logged in;sys_logout(). Logins, failed and blocked tries and log-outs go to the activity log whenp2h_audit.inc.phpis included. A page behind the login:if (!sys_loginRequired(link:'login.php')) exit;- after the loginsys_redirect('', link: sys_loginBack('/'))returns to that page.htm_Login(list:[...])lets the user choose what to log in to (posted as p2h_list) - check on the server that the user may open it. - Quotes:
'for PHP strings,"for HTML attributes.
- Several actions in one form: give each
htm_AcceptButtits ownvalu:(valu:'save',valu:'delete') and read$_POST['act'](another name withname:). Withoutvaluandactithe button getsonclick='location.reload();'- the form is still posted, but the button posts no value of its own. - After a POST answer with
sys_redirect('@Saved')- not with HTML: the page is loaded again with GET (a reload does not post again) andhtm_Page_shows the message once (htm_Flash). An error:sys_redirect('@Not saved', 'error'). - The library version is the constant
P2H_VERSION. Since 1.8.2 the library leaves the page's own$DocVer,$DocRev,$DocFiland$©alone (1.8.1 and older overwrote them when included). - No nested forms: a card with
form:must not be inside another card withform:. - A script that must accept a POST without a token (a webhook, a JSON API, a callback from another site) must not include the library - it would answer 403. Put such endpoints in their own file.
- Global settings are
$gbl_*variables (colours, card moving, flags, the program root) - set them before the require.
<?php
require_once __DIR__.'/php2html.lib.php'; // starts the session - and stops a POST without a valid CSRF token
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (($_POST['act'] ?? '') === 'save') { /* ... save $_POST['name'] ... */ sys_redirect('@Saved'); }
if (($_POST['act'] ?? '') === 'reset') { /* ... */ sys_redirect('@Reset', 'info'); }
sys_redirect('@Unknown action', 'warning'); // Post/Redirect/Get: the message is shown by htm_Page_
}
htm_Page_(titl:'My page');
htm_Card_(capt:'@Settings', icon:'fas fa-sliders', form:'f_set', clas:'cardW800');
htm_Input(labl:'@Name', name:'name', valu:'', wdth:'300px');
htm_AcceptButt(labl:'@Save', icon:'fas fa-floppy-disk', kind:'save', form:'f_set', valu:'save');
htm_AcceptButt(labl:'@Reset', icon:'fas fa-rotate-left', kind:'eras', form:'f_set', valu:'reset');
htm_Card_end();
htm_Page_end();★ = core element. Line numbers refer to php2html.lib.php 1.9.2.
- Page: htm_GoTopButt, htm_ThemeButt, htm_LangSelect, htm_QuickBar, htm_PageHelp, htm_ViewBar, htm_ThemeEditor, htm_Banner, htm_Page_ ★, htm_Page_Sect, htm_Page_end
- Cards and layout: htm_Details, htm_Fieldset, htm_Fieldset_end, htm_Row_, htm_Row_end, htm_Card_ ★, htm_Card_end, htm_Wrapp_, htm_Wrapp_end, htm_RowCol_, htm_RowCol_next, htm_RowCol_end, htm_Tabs_, htm_Tab ★, htm_Tabs_end
- Forms and input: htm_Input ★, htm_Inbox, htm_Output ★, htm_Field, csrf_field, csrf_verify, htm_DataList, htm_Form_, htm_Form_end, htm_NotePad, sys_switchIsOn, htm_SwitchButt, htm_SwitchButton, htm_MultistateButt, htm_Humantest, htm_TextArea, sys_toFloat
- Buttons and links: htm_AcceptButt ★, htm_ActionButt, htm_IconButt ★, htm_SubmitButt, htm_LinkButt, htm_ConfirmPostLink
- Messages and dialogs: htm_MiniNote, htm_TextTip, htm_TextHint, htm_ModalDialog, htm_Alert, sys_redirect, htm_Flash, htm_Badge, htm_Dialog ★
- Tables and data: sys_csvCell, htm_Table ★, htm_DataGroup, htm_TableTools
- Charts: htm_Chart
- Log in: sys_login, sys_loginUser, sys_logout, sys_loginRequired, sys_loginBack, htm_Login
- Text and content: htm_Caption, htm_TextDiv, htm_TextPre, htm_List_, htm_List_item, htm_List_end, htm_CodeBox, htm_TextVer, htm_faq, htm_Figure, htm_iFrame, htm_Embed, str_WithHint, htm_Ihead, str_Synt_, str_Synt_end, str_Synt
- Menus: htm_Pmnu_, htm_Pmnu_Item, htm_Pmnu_end, htm_Menu_TopDown, htm_Menu_Leftout
- Small HTML and text helpers: htm_hr, htm_br, htm_nl, htm_lf, htm_sp ★, htm_space, str_bold, str_Ihead, str_hr, str_br, str_nl, str_lf, str_sp, str_space
- Translation and system: sys_get_translations, lang, sys_uid, sys_enc
Special buttons for going to top/middle/bottom of page
htm_GoTopButt(labl:'@Top', icon:'fa-solid fa-arrow-up', hint:'@Go to page top', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2938
| Param | Default | Description |
|---|---|---|
labl |
'@Top' |
string: Button label |
icon |
'fa-solid fa-arrow-up' |
string: Icon before label |
hint |
'@Go to page top' |
string: User hint |
styl |
'' |
string: Button custom style |
rtrn |
false |
bool: Return the HTML instead of echoing it |
A button that cycles the page theme: light -> dark -> auto (follows the operating system) -> custom. The choice is remembered.
htm_ThemeButt(labl:'', hint:'@Switch theme: light, dark, automatic (follows the system) or your own colors', rtrn:false) - echoes; rtrn:true returns the HTML - line 3308
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Optional text before the current theme name |
hint |
'@Switch theme: light, dark, automatic (follows the system) or your own colors' |
|
rtrn |
false |
bool: Return or echo result |
Language selector with flags (used in the view bar): the languages that have translations, plus English
htm_LangSelect(rtrn:false) - echoes; rtrn:true returns the HTML - line 3388
| Param | Default | Description |
|---|---|---|
rtrn |
false |
bool: Return or echo result |
always in reach (from TinyCash, the buttons given by the program)
htm_QuickBar(list:[], rtrn:false) - echoes; rtrn:true returns the HTML - line 3515
| Param | Default | Description |
|---|---|---|
list |
[] |
array: The buttons: [[0:link, 1:labl, 2:icon, 3:hint, 4:colr (a small dot), 5:acti (JavaScript instead of the link), 6:form (the id of a form: a submit button of it - anywhere on the page), 7:name (the button's name, posted as name=1)], ...] e.g. ['', '@Save', 'fa-solid fa-floppy-disk', '@Save the order', '', '', 'orderForm', 'save'] |
rtrn |
false |
bool: Return or echo result |
Help for the page: a "?" button (in the view bar) and a movable window with the help text of this page (from TinyCash)
htm_PageHelp(rtrn:false) - echoes; rtrn:true returns the HTML - line 3547
| Param | Default | Description |
|---|---|---|
rtrn |
false |
bool: Return or echo result |
user: the logged in user is shown at the end of the bar - lout: the address that logs out (a sign-out button beside the name)
htm_ViewBar(user:'', lout:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 3623
| Param | Default | Description |
|---|---|---|
user |
'' |
string: Name of the logged in user ('' = not shown) |
lout |
'' |
string: Logout URL ('' = no logout button) |
rtrn |
false |
bool: Return or echo result |
Editor for the user's own theme: pick a few base colors, see the result live, save it in this browser.
htm_ThemeEditor(rtrn:false) - echoes; rtrn:true returns the HTML - line 3744
| Param | Default | Description |
|---|---|---|
rtrn |
false |
bool: Return or echo result |
A banner across the page: a short notice with a colored edge, e.g. "Demo data" or "Read only" (from NH-logistik)
htm_Banner(body:'', kind:'warning', rtrn:false) - echoes; rtrn:true returns the HTML - line 4478
| Param | Default | Description |
|---|---|---|
body |
'' |
string: The text (HTML allowed, translated with lang()) |
kind |
'warning' |
string: info / warning / danger / success |
rtrn |
false |
bool: Return or echo result |
★ core element
Start creating a page
htm_Page_(titl:'', hint:'', algn:'center', attr:'', info:'', inis:'', imag:'', pbrd:true) - line 5341
| Param | Default | Description |
|---|---|---|
titl |
'' |
string: Page title |
hint |
'' |
string: Page tip (vertical text - left) - plain text |
algn |
'center' |
string: align - "text-align" |
attr |
'' |
string: Page attributes |
info |
'' |
string: Page info (vertical text - right) - plain text |
inis |
'' |
string: Page initial CSS/js script in page header |
imag |
'' |
string: Page background-image |
pbrd |
true |
bool: Draw border around the page body-div |
A paragraf with border, can be used as a page-footer, or separator on a page.
htm_Page_Sect(body, styl:'border: 1px solid #888; border-radius: 8px; overflow: hidden; margin: auto; background-color:white;', rtrn:false) - echoes; rtrn:true returns the HTML - line 7080
| Param | Default | Description |
|---|---|---|
body |
required | |
styl |
'border: 1px solid #888; border-radius: 8px; overflow: hidden; margin: auto; background-color:white;' |
|
rtrn |
false |
bool: Return the HTML instead of echoing it |
Finalize the htm_Page_()
htm_Page_end() - line 7090
A summery list with collapsible details
htm_Details(capt:'', labl:'', hint:'', type:'h1', mode:'', body:'', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 1054
| Param | Default | Description |
|---|---|---|
capt |
'' |
string: The header text |
labl |
'' |
string: The details summary |
hint |
'' |
string: Hidden description |
type |
'h1' |
string: Header type (h1..h6) |
mode |
'' |
string: Initial mode: 'open'/'' |
body |
'' |
string: The details text |
styl |
'' |
string: Styles for capt & body & labl |
rtrn |
false |
bool: Function Return or echo result |
Start a bordered area with a caption, icon ant hint (Remaned from: htm_Fieldset_)
htm_Fieldset(capt:'', icon:'', hint:'', wdth:'', marg:'', styl:'', attr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 1988
| Param | Default | Description |
|---|---|---|
capt |
'' |
string: The fieldset caption |
icon |
'' |
string: Class: icon to the left of fieldset caption |
hint |
'' |
string: The hint on hover caption |
wdth |
'' |
string: fieldset width |
marg |
'' |
string: fieldset margin-size |
styl |
'' |
string: fieldset style |
attr |
'' |
string: legend attributes |
rtrn |
false |
bool: Function Return or echo result |
End a bordered area
htm_Fieldset_end(rtrn:false) - echoes; rtrn:true returns the HTML - line 2010
Prepare a span with inline-block output
htm_Row_(rtrn:false) - echoes; rtrn:true returns the HTML - line 2093
Finalize the span
htm_Row_end(rtrn:false) - echoes; rtrn:true returns the HTML - line 2100
★ core element
An advanced span with lots of functionality
htm_Card_(capt:'', icon:'', hint:'tgl', mode:'2', form:'', acti:'', wdth:'', vhgh:'600px', fclr:'', styl:'background-color: white;', attr:'margin-bottom: 8px;', clas:'cardWmax', show:true, poup:true, head:'background-color: white;', help:'', frst:'', last:'', simp:false, fold:'', elem:'span', move:true, rtrn:false) - echoes; rtrn:true returns the HTML - line 2146
| Param | Default | Description |
|---|---|---|
capt |
'' |
string: The card caption |
icon |
'' |
string: Class: icon to the left of caption |
hint |
'tgl' |
string: The hint on the caption ('tgl': "click to open / close this card", '': none) |
mode |
'2' |
string: The buttons: '0' none / '1' toggle the height / '2' also: toggle the width, close all, open all |
form |
'' |
string: The name (and id) of a form around the card body - '' no form. Not inside a card that has a form (no nested forms) |
acti |
'' |
string: The action of the form ('' this page). The form is POST, multipart, with the CSRF token |
wdth |
'' |
string: The width of the folded card (a number is px), e.g. '240px' - '' the same width |
vhgh |
'600px' |
string: The max height of the body - more content scrolls ('none': no limit) |
fclr |
'' |
string: Extra style of the header icons and text, e.g. 'color:snow;' |
styl |
'background-color: white;' |
string: Style of the card body |
attr |
'margin-bottom: 8px;' |
string: Style of the card itself (the outer element) |
clas |
'cardWmax' |
string: The width class: cardWmax (full), cardWaut (the content), cardW120 (1200px), cardW110, cardW100, cardW960, cardW800, cardW720, cardW640, cardW560, cardW480, cardW400, cardW320, cardW280, cardW240, cardW160 |
show |
true |
bool: Show the buttons at the right in the header |
poup |
true |
bool: Right-click the header: a menu for all cards (heights, close / open all, original order) |
head |
'background-color: white;' |
string: Style of the header |
help |
'' |
string: A link: a ? icon in the header opens it in a new window |
frst |
'' |
string: HTML at the left in the header (the caption is then centered) |
last |
'' |
string: HTML at the right in the header - it replaces the buttons (show/mode) |
simp |
false |
bool: A simple header: only the centered caption (no buttons, no frst/last) |
fold |
'' |
string: 'closed': the card starts folded (click the caption to open it) |
elem |
'span' |
string: The HTML element of the card: span (default) / section / article / aside / main / header / footer / div A semantic element (section...) gets the caption as its accessible name (aria-labelledby) |
move |
true |
bool: The card can be moved among its sibling cards (how: $gbl_CardMove) - false: it stays in place |
rtrn |
false |
bool: Return the HTML instead of echoing it |
Finalize htm_Card_()
htm_Card_end(labl:'', icon:'', hint:'', kind:'save', name:'', form:'', attr:'', subm:false, akey:'', simu:false, foot:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2347
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: The label of the submit button in the footer |
icon |
'' |
string: An icon left of the label |
hint |
'' |
string: The hint of the button ('' a reminder to save) |
kind |
'save' |
string: The color of the button: save, navi, goon, eras, crea, home, get_, put_, spc1, spc2 |
name |
'' |
string: (Only a comment after ) |
form |
'' |
string: The form to submit - in a card with its own form: always that form |
attr |
'' |
string: Attributes of the button |
subm |
false |
bool: A submit button in the footer - only in a card with its own form (form: in htm_Card_) |
akey |
'' |
string: Access key of the button (Alt+key) |
simu |
false |
bool: (Not used) |
foot |
'' |
string: Footer text (HTML, translated) - the footer stays below the scrolling body and is hidden with it when the card is folded |
rtrn |
false |
bool: Return the HTML instead of echoing it |
Start a span with scrolling content in a fixed-height window
htm_Wrapp_(vhgh:'400px', rtrn:false) - echoes; rtrn:true returns the HTML - line 2599
| Param | Default | Description |
|---|---|---|
vhgh |
'400px' |
WrapperCard - vhgh: ViewHeight |
rtrn |
false |
Finalize a wrapper window
htm_Wrapp_end(rtrn:false) - echoes; rtrn:true returns the HTML - line 2606
Start a first column in a div
htm_RowCol_(wdth:240, rtrn:false) - echoes; rtrn:true returns the HTML - line 2714
Create the next column
htm_RowCol_next(wdth:320, rtrn:false) - echoes; rtrn:true returns the HTML - line 2725
Create the last column
htm_RowCol_end(rtrn:false) - echoes; rtrn:true returns the HTML - line 2733
Start a tab-object with multibly tabs
htm_Tabs_(head:'', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 4079
★ core element
Create a tab in the htm_Tabs_() object
htm_Tab(labl:'', name:'', body:'', vhgh:'', bclr:'white', styl:, dflt:false) - line 4095
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Tab Label |
name |
'' |
string: id |
body |
'' |
string: Content on tab |
vhgh |
'' |
string: ViewHeight (future !) |
bclr |
'white' |
string: Background color |
styl |
`` | string: Style |
dflt |
false |
boolean: Open as default |
Finalize a htm_Tabs_() object
htm_Tabs_end(foot:'', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 4123
★ core element
An advanced object rel. in-output of data
htm_Input(labl:'', icon:'', hint:'', plho:'@Enter...', vrnt:'text', name:'', valu:'', list:[], form:'', wdth:'100%', algn:'left', bord:'', attr:'', unit:'', disa:false, rows:'2', step:'', llgn:'R', ftop:'', lpos:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 287
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Translated label above the input field |
icon |
'' |
string: The icon left of the label (label prefix) |
hint |
'' |
string: Translated description for the field |
plho |
'@Enter...' |
string: Translated placeholder shown when field is empty. Default: Enter... |
vrnt |
'text' |
string: The variant: text (default) - area (several lines, rows:) - html (formatted text, editable) - pass (password, show / hide and a strength meter; rows:'0' no meter) - mail - link (URL) - phon - sear (search) - intg (whole number, step:) - num0 / num1 / num2 / num3 (number with 0-3 decimals) - dec0 / dec1 / dec2 (amount with thousands separator; unit: '<kr' prefix, 'kr' suffix) - date - time - week - mont (month) - rang (slider) - colr (colour) - file (upload: the form needs enctype multipart/form-data, as htm_Card_ form: and htm_Form_ have) - imag (image button) - barc (text in a bar code font) - chck (checkboxes) / rado (radio buttons) / opti (select list): the choices in list: - hidd (hidden) - butt (plain button, no action) / subm (submit button) |
name |
'' |
string: Set the fields name (and id) |
valu |
'' |
string: The current content in input field |
list |
[] |
array: The choices of chck / rado / opti: [[value, '@Label', '@Hint', 'checked' or 'selected', attributes], ...] (chck: the value is the name of each checkbox in $_POST) |
form |
'' |
string: With Local form given, click on showed OK-butt to submit |
wdth |
'100%' |
string: Width of the field-container |
algn |
'left' |
string: The alignment of input content Default: left |
bord |
'' |
string: BoxBorder color to mark required/optional field. Default= 'border: 1px solid var(--grayColor);' htm_Input() only: |
attr |
'' |
string: Give more (special / non system) input attrib to the input (height priority) |
unit |
'' |
string: A unit added to the content eg. currency or % If in front: '<' it is added as a prefix, else a suffix |
disa |
false |
bool: Disable the field. Default: field is active |
rows |
'2' |
string: Number of rows in multiline input (eg. area/html) Default: 2 (Radio/Check-list: 1 to output horisontal) |
step |
'' |
string: the value of stepup/stepdown for numbers |
llgn |
'R' |
string: Label align Default: Right |
ftop |
'' |
string: Ajust field vertical position |
lpos |
'' |
string: style rel. Label offset (chck) |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
A ontainer with: Border, Label, Hint, (Placeholder)
htm_Inbox(labl:'', icon:'', hint:'', plho:'@Enter...', vrnt:'noUse', name:'Body_div', valu:'', list:['noUse'], form:'noUse', wdth:'200px', algn:'left', bord:'1px solid var(--grayColor);', attr:'', unit:'noUse', disa:false, rows:'noUse', step:'noUse', llgn:'R', ftop:'', edit:null, rtrn:false) - echoes; rtrn:true returns the HTML - line 580
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Translated label above the input field |
icon |
'' |
string: The icon left of the label |
hint |
'' |
string: The Translated description for the field |
plho |
'@Enter...' |
string: The placeholder shown with blank value |
vrnt |
'noUse' |
string: Variant |
name |
'Body_div' |
String: Set the Editable name (and id) |
valu |
'' |
string: The HTML content of the box-body |
list |
['noUse'] |
|
form |
'noUse' |
|
wdth |
'200px' |
string: The outher Width of the field-container |
algn |
'left' |
string: The alignment of input content Default: left |
bord |
'1px solid var(--grayColor);' |
string: BoxBorder color to mark required/optional field. Default= 'border: 1px solid var(--grayColor);' |
attr |
'' |
string: Give more (special / non system) attrib to the field |
unit |
'noUse' |
|
disa |
false |
bool: (Old) true makes the box editable - the opposite of disa elsewhere: use edit |
rows |
'noUse' |
|
step |
'noUse' |
|
llgn |
'R' |
string: Label align Default: Right |
ftop |
'' |
string: Ajust field vertical position |
edit |
null |
bool: true: the content can be edited (use this - not disa) |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
★ core element
General output for pt. Progress etc.
htm_Output(labl:'', icon:'', hint:'', vrnt:'pgrs', name:'', valu:'', form:'', bclr:'white', attr:'', vmax:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 667
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: The caption text |
icon |
'' |
string: comming new (label prefix) |
hint |
'' |
string: The hint/tooltip |
vrnt |
'pgrs' |
string: Variant (outp/pgrs) |
name |
'' |
String: Set the name/id |
valu |
'' |
string: The actual value / list of other elements' ids |
form |
'' |
String: Form name |
bclr |
'white' |
string: span background-color |
attr |
'' |
string: Give more (special / non system) attrib to the field |
vmax |
'' |
string: The Max value |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
Make a box like htm_input() with label, icon and hint
htm_Field(labl:'', icon:'', hint:'', name:'fld', body:'', wdth:'', styl:'', attr:'', llgn:'C', ftop:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2051
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: label for the box |
icon |
'' |
string: Class: icon to the left of the label |
hint |
'' |
string: The hint on hover label |
name |
'fld' |
string: field name |
body |
'' |
string: Html content |
wdth |
'' |
string: field width |
styl |
'' |
string: field style |
attr |
'' |
string: field attributes |
llgn |
'C' |
string: label align L/C/R |
ftop |
'' |
string: fieldtop: label y-offset |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string: |
A hidden field with the CSRF token of the session - for your own forms (htm_Card_ form: and htm_Form_ add it themselves)
csrf_field(rtrn:false) - echoes; rtrn:true returns the HTML - line 2113
A POST must carry the token of the session: the field csrf_token, or the header X-CSRF-Token (p2hPost / fetch) - true / false
csrf_verify() - line 2118
An input field with a list of values to pick from (HTML datalist)
htm_DataList(capt:'@Choose here from the list:', icon:'fas fa-database', hint:'@Use datalist to pick a value from list', plho:'@Type or pick a value', name:'', data:['Itm1','Itm2','Itm3','Itm4'], form:'', acti:'', wdth:'220px', bord:'1px solid black; border-radius: 5px;', fclr:'color: green;', attr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2484
| Param | Default | Description |
|---|---|---|
capt |
'@Choose here from the list:' |
string: The group caption |
icon |
'fas fa-database' |
string: Icon left to label |
hint |
'@Use datalist to pick a value from list' |
string: Hint on hover the submit button |
plho |
'@Type or pick a value' |
string: The placeholder shown when blank value |
name |
'' |
string: The field name submitted with the choice. '' => datalist1, datalist2... |
data |
['Itm1','Itm2','Itm3','Itm4'] |
array: Record with Data |
form |
'' |
string: The name of the form to submit |
acti |
'' |
string: Form action |
wdth |
'220px' |
string: the width |
bord |
'1px solid black; border-radius: 5px;' |
string: The group border style |
fclr |
'color: green;' |
Special header forground-style (Icon, text and arrow-icons). Ex.: fclr:'color:snow;' |
attr |
'' |
string: additional style |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string: |
Start creating a form
htm_Form_(name:'', type:'multipart/form-data', mode:'POST', acti:'', attr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2613
| Param | Default | Description |
|---|---|---|
name |
'' |
string: The name of the form |
type |
'multipart/form-data' |
string: enctype |
mode |
'POST' |
string: Form method |
acti |
'' |
string: Form action |
attr |
'' |
string: Other attributes |
rtrn |
false |
bool: Return the HTML instead of echoing it |
Finalixe a form
htm_Form_end(rtrn:false) - echoes; rtrn:true returns the HTML - line 2639
A personal notepad: plain text, saved automatically in this browser (the same notes on all pages of the site) - from TinyCash
htm_NotePad(rtrn:false) - echoes; rtrn:true returns the HTML - line 3448
| Param | Default | Description |
|---|---|---|
rtrn |
false |
bool: Return or echo result |
Is a switch value "on"? Accepts 1/true/on/yes/checked/pressed (and the old spelling "presssed")
sys_switchIsOn(valu) - line 3773
A button with switch layout
htm_SwitchButt(labl:'', hint:'', name:'switchbox_id', valu:'', list:[], wdth:'', bclr:'', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 3779
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Button label |
hint |
'' |
string: Hint about the button function |
name |
'switchbox_id' |
string: Button name |
valu |
'' |
string: Value |
list |
[] |
array: Setting |
wdth |
'' |
string: Width |
bclr |
'' |
string: Background color |
styl |
'' |
string: Style |
rtrn |
false |
bool: Function Return or echo result |
Another button with switch layout
htm_SwitchButton(labl, hint:'', name:'switchbox_id', valu:'', list:[], wdth:'', bclr:'', styl:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 3817
| Param | Default | Description |
|---|---|---|
labl |
required | string: Button label |
hint |
'' |
string: Hint about the button function |
name |
'switchbox_id' |
string: |
valu |
'' |
string: |
list |
[] |
string: |
wdth |
'' |
string: Width |
bclr |
'' |
string: |
styl |
'' |
string: |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
A special button to switch between many states
htm_MultistateButt(name:'ROWyCOLx', valu:'', acti:true, styl:'padding:1px;', rtrn:false) - echoes; rtrn:true returns the HTML - line 3877
| Param | Default | Description |
|---|---|---|
name |
'ROWyCOLx' |
string: Name of the field |
valu |
'' |
string: State 0..3 |
acti |
true |
bool: Clickable |
styl |
'padding:1px;' |
string: Style |
rtrn |
false |
bool: Echo the HTML (default - as all functions since 1.7.2; was true) or return it |
Button for test human or robot
htm_Humantest(capt:'@Are you human? ', icon:'fa-solid fa-arrow-right-to-bracket', hint:'@Grab and slide to right to change state', form:'form-id', wdth:'200px', vhgh:'24px', bclr:'#1bd441', yclr:'lightgray', nclr:'white', xytx:'@YES', ntxt:'@NO', rtrn:false, hght:null) - echoes; rtrn:true returns the HTML - line 3920
| Param | Default | Description |
|---|---|---|
capt |
'@Are you human? ' |
string: capt $quest= '@Are you human?', |
icon |
'fa-solid fa-arrow-right-to-bracket' |
string: icon after caption |
hint |
'@Grab and slide to right to change state' |
string: hint $slide_hint= '@Grab and slide to right to change state' |
form |
'form-id' |
string: form $form_id= 'form-id', |
wdth |
'200px' |
string: wdth $grab_width= '200px', |
vhgh |
'24px' |
string: height of the slider |
bclr |
'#1bd441' |
string: background in human state |
yclr |
'lightgray' |
string: yclr $yclr= 'lightgray', |
nclr |
'white' |
string: nclr $no_colr= 'white', |
xytx |
'@YES' |
string: xytx $yes_text= '@YES', |
ntxt |
'@NO' |
string: ntxt $no_text= '@NO', |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
hght |
null |
(Old name of vhgh - still works) |
Create a HTML-textarea with multibly lines
htm_TextArea(labl:'', hint:'', plho:'?', name:'area', valu:'', form:'', wdth:'', attr:'', rows:'1', rtrn:false, widt:null) - echoes; rtrn:true returns the HTML - line 4155
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Label after the field |
hint |
'' |
string: Hint on the label |
plho |
'?' |
string: Placeholder |
name |
'area' |
string: Name and id |
valu |
'' |
string: The text |
form |
'' |
string: The form the field belongs to (when it is outside it) |
wdth |
'' |
string: Width |
attr |
'' |
string: More style |
rows |
'1' |
string: Number of rows |
rtrn |
false |
bool: Echo the HTML (default - as all functions since 1.7.2; was true) or return it |
widt |
null |
(Old name of wdth - still works) |
A number written as "1 234,50" / "1.234,50" / "1234.50" / "87 %" / "kr. 12,5" -> float ((float)"1 234,50" gives 1)
sys_toFloat(v) - line 7304
★ core element
A button for different purposes with colors according to purpose: Delete/Create/Navigate/Continue/Submit
htm_AcceptButt(labl:'', icon:'', hint:'', kind:'home', form:'', acti:'', wdth:'', attr:'', akey:'', tplc:'LblTip_text', tsty:'', idix:'', disa:false, name:'', valu:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2742
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: The caption on the button |
icon |
'' |
string: The iconclass (' ';) |
hint |
'' |
string: hint about the button function |
kind |
'home' |
string: save, navi, goon, erase, create, home (rel. Appearance) |
form |
'' |
string: The form the element belongs to, if a name is given |
acti |
'' |
string: Function to run, or submit if empty |
wdth |
'' |
string: The width of the button |
attr |
'' |
string: Generel use e.g. ' action= "$link" ' |
akey |
'' |
string: Shortcut to activate the button |
tplc |
'LblTip_text' |
string: Class for Placement of the tooltip |
tsty |
'' |
string: Style for Placement of the tooltip |
idix |
'' |
string: ix-suffix on name/id |
disa |
false |
bolean: 'disabled' to deactivate the button |
name |
'' |
string: With valu: the name the value is posted under (default 'act') |
valu |
'' |
string: The value this button posts - several actions in one form: read $_POST['act'] (name:). No reload on click |
rtrn |
false |
bool: Act as procedure: Echo result, or as function: Return string |
A generel action button
htm_ActionButt(labl:'', icon:'', hint:'', type:'button', name:'', form:'', acti:'', attr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2830
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Text on the button |
icon |
'' |
string: Icon before the label |
hint |
'' |
string: Hint about the button function |
type |
'button' |
string: |
name |
'' |
string: The name and id for the button |
form |
'' |
string: The form button belongs to |
acti |
'' |
string: Function to run |
attr |
'' |
string: Button attributes. |
rtrn |
false |
bool: Echo the HTML (default - as all functions since 1.7.2; was true) or return it |
★ core element
A generel botton with icon and label
htm_IconButt(labl:'', icon:'', hint:'', type:'submit', name:'', link:'', evnt:'', wdth:'', font:'32px', fclr:'#555', bclr:'white', akey:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 2867
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Button label |
icon |
'' |
string: Icon before label |
hint |
'' |
string: User hint |
type |
'submit' |
string: Button type |
name |
'' |
string: Button id / name |
link |
'' |
string: formtarget |
evnt |
'' |
string: Event script (earlier: $action) |
wdth |
'' |
string: Width |
font |
'32px' |
string: font-size |
fclr |
'#555' |
string: Forground color (gray gave too little contrast) |
bclr |
'white' |
string: Background color |
akey |
'' |
string: Keyboard shortcut |
rtrn |
false |
bool: Function Return or echo |
Submit button with hint
htm_SubmitButt(labl:'', hint:'', type:'submit', wdth:'', font:'32px', fclr:'#555', bclr:'white', rtrn:false) - echoes; rtrn:true returns the HTML - line 2913
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Button label |
hint |
'' |
string: User hint |
type |
'submit' |
string: Button type |
wdth |
'' |
string: Minimum Width |
font |
'32px' |
string: font-size |
fclr |
'#555' |
string: Forground color (gray gave too little contrast) |
bclr |
'white' |
string: Background color |
rtrn |
false |
bool: Function Return or echo |
A general link-button
htm_LinkButt(labl:'', hint:'', link:'', targ:'_blank', attr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 4141
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Label |
hint |
'' |
string: |
link |
'' |
string: |
targ |
'_blank' |
string: |
attr |
'' |
string: |
rtrn |
false |
bool: Function Return or echo result |
A button for an action that changes data (e.g. Delete): asks "Are you sure?" and then POSTs with the CSRF token (from NH-logistik)
htm_ConfirmPostLink(labl:'', icon:'', hint:'', kind:'danger', mess:'@Are you sure?', data:[], acti:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 4502
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: Button text |
icon |
'' |
string: Icon class, e.g. 'fa-solid fa-trash' |
hint |
'' |
string: Tooltip |
kind |
'danger' |
string: primary / secondary / success / danger / warning / info (button color) |
mess |
'@Are you sure?' |
string: The question |
data |
[] |
array: The fields to send: ['name' => 'value', ...] |
acti |
'' |
string: Where to POST ('' = this page) |
rtrn |
false |
bool: Return or echo result |
A very small text line
htm_MiniNote(note:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 962
| Param | Default | Description |
|---|---|---|
note |
'' |
|
rtrn |
false |
bool: Return the HTML instead of echoing it |
A text with a caption on colored line
htm_TextTip(capt:'TIP', body:'', wdth:'', algn:'center', colr:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 971
| Param | Default | Description |
|---|---|---|
capt |
'TIP' |
string: The output caption |
body |
'' |
string: The output text |
wdth |
'' |
string: The div width |
algn |
'center' |
string: The div alignment |
colr |
'' |
string: the background-color |
rtrn |
false |
bool: Return the HTML instead of echoing it |
A div containing a text with a hidden hint
htm_TextHint(text:'Visibly Text', hint:'Hidden description', styl:'background-color: white; ', attr:, rtrn:false) - echoes; rtrn:true returns the HTML - line 1009
| Param | Default | Description |
|---|---|---|
text |
'Visibly Text' |
string: Visibly Text |
hint |
'Hidden description' |
string: Hidden description |
styl |
'background-color: white; ' |
string: Outher style (div-container) |
attr |
`` | string: Inner style (span-popup) |
rtrn |
false |
bool: Function Return or echo result |
Create a modal popup window with color-coded background
htm_ModalDialog(capt:'@Voilà!', type:'none', mess:'', html:'CSS-based Modal Dialog', butt:['$type','$icon','$labl','$hint','$link'], rtrn:false) - echoes; rtrn:true returns the HTML - line 4197
| Param | Default | Description |
|---|---|---|
capt |
'@Voilà!' |
|
type |
'none' |
Variant |
mess |
'' |
|
html |
'CSS-based Modal Dialog' |
|
butt |
['$type','$icon','$labl','$hint','$link'] |
|
rtrn |
false |
bool: Echo the HTML (default - as all functions since 1.7.2; was true) or return it |
A message box in the page: success / error / warning / info - theme colors, also in the dark theme (from NH-logistik)
htm_Alert(body:'', kind:'success', wdth:'700px', rtrn:false) - echoes; rtrn:true returns the HTML - line 4287
| Param | Default | Description |
|---|---|---|
body |
'' |
string: The message (HTML allowed, translated with lang()) |
kind |
'success' |
string: success / error / warning / info |
wdth |
'700px' |
string: Max width |
rtrn |
false |
bool: Return or echo result |
After a POST: remember a message and load the page again with GET (Post/Redirect/Get) - the next htm_Page_ shows it (htm_Flash)
sys_redirect(mess:'', kind:'success', link:'') - line 4302
| Param | Default | Description |
|---|---|---|
mess |
'' |
string: The message on the next page (HTML, translated with lang()) - '' none. Escape user data with sys_enc() |
kind |
'success' |
string: success / error / warning / info |
link |
'' |
string: Where to go - '' the same address again (with its query string) |
The messages of sys_redirect(): each shown once. htm_Page_ calls it ($gbl_Flash= false: not) - call it yourself to show them elsewhere
htm_Flash(wdth:'700px', rtrn:false) - echoes; rtrn:true returns the HTML - line 4316
| Param | Default | Description |
|---|---|---|
wdth |
'700px' |
string: Max width of each message |
rtrn |
false |
bool: Return or echo result |
A small label: a status, a count or "New" - e.g. in tables and menus (from NH-logistik)
htm_Badge(labl:'', hint:'', kind:'secondary', rtrn:false) - echoes; rtrn:true returns the HTML - line 4490
| Param | Default | Description |
|---|---|---|
labl |
'' |
string: The text (translated with lang()) |
hint |
'' |
string: Tooltip |
kind |
'secondary' |
string: primary / secondary / success / danger / warning / info |
rtrn |
false |
bool: Return or echo result (rtrn:true to use it inside other output) |
★ core element
Create a Dialog with alternative buttons to select between
htm_Dialog(capt:'CAPTION', labl:'@Open dialog', body:'', bclr:'lightyellow', butt:[ ['confirmBtn','default','@Confirm','fas fa-check','green','@Accept and go on'],, rtrn:false) - echoes; rtrn:true returns the HTML - line 4602
| Param | Default | Description |
|---|---|---|
capt |
'CAPTION' |
|
labl |
'@Open dialog' |
string: Label of the button that opens the dialog ('' = no button; open it with: document.getElementById("htmDialog1").showModal()) |
body |
'' |
|
bclr |
'lightyellow' |
Background color |
butt |
[ ['confirmBtn','default','@Confirm','fas fa-check','green','@Accept and go on'], |
(0:id, 1:value, 2:label, 3:icon, 4:color, 5:hint) |
rtrn |
false |
bool: Return or echo result |
so Excel/LibreOffice does not execute it as a formula (CSV injection). Real numbers like -12.50 are left alone.
sys_csvCell(v) - line 1314
★ core element
A table with records: sort, filter, edit, add rows and export to CSV
htm_Table(capt:[], pref:[], body:[], suff:[], note:'', list:['',''], data:[], wdth:'98%', vhgh:'400px', styl:'', filt:true, sort:true, crea:true, modi:true, from:__FILE__, expo:'', rtrn:false) - echoes; rtrn:true returns the HTML - line 1321
| Param | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
capt |
[] |
array: Fields above the table: [0:labl, 1:wdth, 2:type, 3:name, 4:algn, 5:hint, 6:plho, 7:valu] type: show (only the text) / rows (the number of rows + 6) / html (7 as HTML) / data (a field with name 3 - posted) / text, number, date ... (a field without name - not posted). Shown only when the table has data. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
pref |
[] |
array: Columns before the data: [0:labl, 1:wdth, 2:-, 3:-, 4:[algn], 5:hint, 6:html] 6 is the same HTML in every row; name="x" becomes name="i_x" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
body |
[] |
array: The data columns: [0:labl, 1:wdth, 2:type, 3:frmt, 4:[style], 5:fkey, 6:hint, 7:plho, 8:calc, 9:[list, css]] 2 type: text data area sttu (field) / show (read only) / intg (integer) / date / ddwn (select, 9) / opti (htm_Input option field, 9) chck (checkbox) / bold ital (read only: is the text bold/italic) / indx keyn (the value as a link, clickable) html htm0 (the value as HTML) / blnk (nothing) / hidd (hidden, posted) / calc (a number from field 8) / vars (old select) 3 frmt: 0d 1d 2d (decimals) / 2% (2 decimals + %) / >0 (blank when 0 or less) / '= ' (always blank) / B R L (bold #00000, red, blue - type html) 4 style: [0:text-align, 1:cell background, 2:field style (text fields), 3:cell background (row marking), 4:font-size] 5 fkey: the field name - posted as fkey[] (one value per row, in the order of the rows) 8 calc: fn($row) => number - $row is [fkey => value], e.g. fn($r) => toNum($r['qty']) * toNum($r['price']) 9 list: [[[value, label, hint], ...], 'css of the select'] (ddwn/opti) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
suff |
[] |
array: Columns after the data (only with modi): [0:labl, 1:wdth, 2:type, 3:-, 4:[algn], 5:hint, 6:valu] type rowact: row actions in the browser, 6 = 'del copy move undo' (any of them) type button: a submit button named btn_<del|hid|cpy|ren|sel> - by 0: @Delete @Hide @Copy @Rename @Select, 6 = its icon else: 6 is shown as HTML (an "open-modal_N" in it opens one dialog per row)
A span/group with a set of labels and data
Search and sort for a table - without jQuery: a search field with "x of y rows", and sorting by clicking a column header (from NH-logistik)
A bar or line chart as plain SVG (no JavaScript library) - e.g. prices per hour, sales per month. Charts with the same ymin / ymax share one scale
Log in with a password - a growing wait after wrong tries (5 s, 10 s, 20 s ... at most 15 min), for all browsers together. '' = logged in, else the reason
The user name of the session after sys_login() - '' : not logged in ('-' : logged in without a user name)
Log out: forget the login of the session (a new session id) - written in the activity log when p2h_audit.inc.php is included
A page that needs a login: true when logged in. Else it remembers this address (a GET) for sys_loginBack() and - with link - goes to the log-in page
After sys_login(): the address sys_loginRequired() remembered (once) - else $dflt. Only a path on this site (never another site)
What to log in to (list:) is only a wish of the user: check on the server that the user may open it - then keep it in $_SESSION['p2h_list']
A caption with icon, label and hint
Text formatted in a div
Text displayed in a fixed-width font, and preserves both spaces and line breaks
Starting various types ef text list
A single item in a text list
Ending a text list
A span containing syntax formattet php-code
Vertical orientated text
A question with a folded answer (FAQ) - one at a time when they share a grup
A image with caption, label and a hint
Output external content in a local frame
View a container with a external resource
Create a text with hidden hint/title
String function: make italic-text
Returns - starts a block of program code coloured with str_Synt() (dark background)- ends the block of str_Synt_()
Returns $elem coloured as program code: $type variable / string / attribute / comment / literal / constant / operator / word / number / default
Init popup context menu group
Add a popup context menu item
Finish a popup context menu group
A page-menu on top of the page
A page-menu to the left of the page
String function: make horisontal line/ruler
String function: Add one or more line-breaks
String function: Add one ore more new line(s)
String function: Add one or more linefeed
★ core element String function: Add one ore more nobreaking spaces
String function: Make a span with given width
Returns $source in bold: $result.''.$source.''.$tail (default tail: two non-breaking spaces)
Returns a line break and $source in italics - a small heading inside a text
Returns a horizontal line ( ) in the colour $c, with extra style $attr
Returns $rept line breaks (
Returns $rept line breaks (
Returns $rept line feeds as - a new line inside an attribute, e.g. a title= hint
Returns $rept non-breaking spaces ( )
Returns an empty space $wdth wide (e.g. '20px') - to line up texts
Reads _trans.sys.json once: a list of the languages (code, name, native, author, note, translation) - the library calls it; English only without the file
lang() is used to translate all hard-coded user interface
A unique element id on the page: the first keeps its id, repeats get _2, _3... (fields in loops, table rows)
Make valid HTML string
Not meant to be called by pages (they may change): |