Clever-Html-Engine / php2html-Demo:
⠿ My notes Help Language: EN
The demo page
This page shows nearly all htm_ functions of the library. Each card is one group of functions.
Cards: click a card header to fold it. The icons at the right change the height and width, or fold all cards. Drag the grip in the lower right corner to resize a card.
View bar (upper right): zoom, full screen, column view, language, your notes, this help and the theme.
The forms on this page are demos - nothing is saved on the server.
Test site and documentation for Clever html engine β’ Errors may occur and future news may be shown β’ ver.1.7.3: 78 core functions.
Inland VAT (incoming):
| No. Position number in the group {Editable} | Description Item Description. A descriptive text of your choice {Editable} | Account The number in the statement of account to which the sales tax must be posted. {Editable} | %-rate VAT % rate {Editable} | Note Note about the record {Editable} | Delete Click the red cross to delete a entry |
|---|---|---|---|---|---|
Notes about htm_Table():
Records can be sorted, filtered, created, modifyed and more...
The visibly rows can be scrolled in a window below the fixed header.
Show the codeHide the code
function 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) $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<row>_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>_<table>_<row> - 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) $note= '', # string: HTML below the table ('' with filt: a hint about the filter) $list= ['',''], # array: The row rules of customRules.inc.php, e.g. ['KONTOPLAN'] - and the options of 'vars' columns &$data= [], # array: The rows (by reference - give a variable): [[v0, v1, ...], ...] in the order of body, or [[fkey => value, ...], ...] $wdth= '98%', # string: The width of the table $vhgh= '400px', # string: The height of the scrolling window with the rows (the header stays) $styl= '', # string: Style for the span that holds the table $filt= true, # bool: A filter field below each header $sort= true, # bool: Sort by clicking a header (SHIFT+click: by more columns) $crea= true, # bool: A button that adds an empty row - a string is the label of the button $modi= true, # bool: The fields can be changed, and the suffix columns are shown $from= __FILE__, # string: Where the table is made (__FILE__ / __FUNCTION__) - shown by indx/keyn clicks $expo= '', # string: Also write the data to this CSV file (UTF-8, Excel-safe) $rtrn= false # bool: Return the HTML instead of echoing it )
All details, with examples: table.page.php
The system includes the following functions of container-type:.
htm_Page_()
htm_Card_()
htm_Fieldset()
htm_wrapp_()
An example of htm_Page_() is this actual page.
On this page you also see examples on multiple cards
Tables... (also a container-type)
htm_Page_()
htm_Card_()
htm_Fieldset()
htm_wrapp_()
An example of htm_Page_() is this actual page.
On this page you also see examples on multiple cards
Tables... (also a container-type)
Show the codeHide the code
// PHP7-syntax: (Fixed order) htm_Fieldset($capt='@Caption: ', $hint='@You can use hints',$icon='', $wdth='180px',$marg='', $attr='background-color:MintCream', $rtrn=false); // PHP8-syntax: (Named, free order, can be omitted) htm_Fieldset(capt:'@Caption: ', hint:'@You can use hints', wdth:'180px', attr:'background-color:MintCream'), rtrn:false); // htm_Fieldset() must be followed by the html-content and htm_Fieldset_end() ! htm_Fieldset_end(rtrn:false);
HTML-Content
in container htm_Field()
---
in container htm_Field()
---
htm_Field(labl:'Label with hint', hint:'Tip for htm_Field()', name:'fld', body:'HTML-Content...');
Show the codeHide the code
// PHP8-syntax: htm_Field(labl:'Label with hint', hint:'Tip for htm_Field()', icon:'',name:'fld', body:'HTML-Content <br>in container htm_Field() <br>---', wdth:'',styl:'', ftop:'',attr:'', rtrn:false);
A Wrapper-window is a window with a fixed height
in with you can scroll the content
if it owerflow the window-height
Show the codeHide the code
// PHP7-syntax: htm_wrapp_($ViewHeight='60px'); // htm_wrapp_() must be followed by htm_wrapp_end() ! echo 'You place your html-objects here inside Wrapper-window...<br><br> A Wrapper-window is a window with a fixed height<br> in with you can scroll the content<br> if it owerflow the window-heigh'; htm_wrapp_end();
Examples of foldable card-system:
Use
fold:'closed' in htm_Card_() for long or rarely used content.To navigate in your project, you can use htm_Menu_TopDown() - the menu on top of all demo pages (its content: $menudata in project.init.php).
You can also use various buttons for that...
You can also use various buttons for that...
The htm_DataGroup() function
Header
Footer
Label1:Data1
Label2:Data2
Label3:Data3
Label4:Data4