|
dolibarr
13.0.2
|
File that defines environment for Dolibarr GUI pages only (file not required by scripts) More...
Go to the source code of this file.
Functions | |
| if(!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) | testSqlAndScriptInject ($val, $type) |
| Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). More... | |
| analyseVarsForSqlAndScriptsInjection (&$var, $type) | |
| Return true if security check on parameters are OK, false otherwise. More... | |
| if(!defined('NOREQUIREMENU')) if(!function_exists("llxHeader")) | top_httphead ($contenttype= 'text/html', $forcenocache=0) |
| Show HTTP header. More... | |
| top_htmlhead ($head, $title= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $disablejmobile=0, $disablenofollow=0) | |
| Ouput html header of a page. More... | |
| top_menu ($head, $title= '', $target= '', $disablejs=0, $disablehead=0, $arrayofjs= '', $arrayofcss= '', $morequerystring= '', $helppagename= '') | |
| Show an HTML header + a BODY + The top menu bar. More... | |
| top_menu_user ($hideloginname=0, $urllogout= '') | |
| Build the tooltip on user login. More... | |
| top_menu_quickadd () | |
| Build the tooltip on top menu quick add. More... | |
| top_menu_bookmark () | |
| Build the tooltip on top menu bookmark. More... | |
| top_menu_search () | |
| Build the tooltip on top menu tsearch. More... | |
| left_menu ($menu_array_before, $helppagename= '', $notused= '', $menu_array_after= '', $leftmenuwithoutmainarea=0, $title= '', $acceptdelayedhtml=0) | |
| Show left menu bar. More... | |
| main_area ($title= '') | |
| Begin main area. More... | |
| getHelpParamFor ($helppagename, $langs) | |
| Return helpbaseurl, helppage and mode. More... | |
| printSearchForm ($urlaction, $urlobject, $title, $htmlmorecss, $htmlinputname, $accesskey= '', $prefhtmlinputname= '', $img= '', $showtitlebefore=0, $autofocus=0) | |
| Show a search area. More... | |
File that defines environment for Dolibarr GUI pages only (file not required by scripts)
Definition in file main.inc.php.
| analyseVarsForSqlAndScriptsInjection | ( | & | $var, |
| $type | |||
| ) |
Return true if security check on parameters are OK, false otherwise.
| string | $var | Variable name |
| string | $type | 1=GET, 0=POST, 2=PHP_SELF |
Show HTML header HTML + BODY + Top menu + left menu + DIV
| string | $head | Optionnal head lines |
| string | $title | HTML title |
| string | $help_url | Url links to help page Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage For other external page: http://server/url |
| string | $target | Target to use on links |
| int | $disablejs | More content into html header |
| int | $disablehead | More content into html header |
| array | string | $arrayofjs | Array of complementary js files |
| array | string | $arrayofcss | Array of complementary css files |
| string | $morequerystring | Query string to add to the link "print" to get same parameters (use only if autodetect fails) |
| string | $morecssonbody | More CSS on body tag. For example 'classforhorizontalscrolloftabs'. |
| string | $replacemainareaby | Replace call to main_area() by a print of this string |
| int | $disablenofollow | Disable the "nofollow" on page |
Definition at line 158 of file main.inc.php.
References $_SERVER, print, and testSqlAndScriptInject().
| getHelpParamFor | ( | $helppagename, | |
| $langs | |||
| ) |
Return helpbaseurl, helppage and mode.
| string | $helppagename | Page name ('EN:xxx,ES:eee,FR:fff...' or 'http://localpage') |
| Translate | $langs | Language |
Definition at line 2697 of file main.inc.php.
Referenced by top_menu().
| left_menu | ( | $menu_array_before, | |
$helppagename = '', |
|||
$notused = '', |
|||
$menu_array_after = '', |
|||
$leftmenuwithoutmainarea = 0, |
|||
$title = '', |
|||
$acceptdelayedhtml = 0 |
|||
| ) |
Show left menu bar.
| array | $menu_array_before | Table of menu entries to show before entries of menu handler. This param is deprectaed and must be provided to ''. |
| string | $helppagename | Name of wiki page for help ('' by default). Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage For other external page: http://server/url |
| string | $notused | Deprecated. Used in past to add content into left menu. Hooks can be used now. |
| array | $menu_array_after | Table of menu entries to show after entries of menu handler |
| int | $leftmenuwithoutmainarea | Must be set to 1. 0 by default for backward compatibility with old modules. |
| string | $title | Title of web page |
| string | $acceptdelayedhtml | 1 if caller request to have html delayed content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect) |
Definition at line 2458 of file main.inc.php.
References dol_escape_htmltag(), dol_syslog(), main_area(), print, and printSearchForm().
| main_area | ( | $title = '' | ) |
Begin main area.
| string | $title | Title |
Definition at line 2646 of file main.inc.php.
References dol_escape_htmltag(), GETPOST(), info_admin(), and print.
Referenced by left_menu().
| printSearchForm | ( | $urlaction, | |
| $urlobject, | |||
| $title, | |||
| $htmlmorecss, | |||
| $htmlinputname, | |||
$accesskey = '', |
|||
$prefhtmlinputname = '', |
|||
$img = '', |
|||
$showtitlebefore = 0, |
|||
$autofocus = 0 |
|||
| ) |
Show a search area.
Used when the javascript quick search is not used.
| string | $urlaction | Url post |
| string | $urlobject | Url of the link under the search box |
| string | $title | Title search area |
| string | $htmlmorecss | Add more css |
| string | $htmlinputname | Field Name input form |
| string | $accesskey | Accesskey |
| string | $prefhtmlinputname | Complement for id to avoid multiple same id in the page |
| string | $img | Image to use |
| string | $showtitlebefore | Show title before input text instead of into placeholder. This can be set when output is dedicated for text browsers. |
| string | $autofocus | Set autofocus on field |
Show HTML footer Close div /DIV class=fiche + /DIV id-right + /DIV id-container + /BODY + /HTML. If global var $delayedhtmlcontent was filled, we output it just before closing the body.
| string | $comment | A text to add as HTML comment into HTML generated page |
| string | $zone | 'private' (for private pages) or 'public' (for public pages) |
| int | $disabledoutputofmessages | Clear all messages stored into session without diplaying them |
Definition at line 2749 of file main.inc.php.
References img_picto().
Referenced by left_menu().
| if (!empty($_SERVER['MAIN_SHOW_TUNING_INFO'])) testSqlAndScriptInject | ( | $val, | |
| $type | |||
| ) |
Security: WAF layer for SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF).
Warning: Such a protection can't be enough. It is not reliable as it will alwyas be possible to bypass this. Good protection can only be guaranted by escaping data during output.
| string | $val | Value brut found int $_GET, $_POST or PHP_SELF |
| string | $type | 1=GET, 0=POST, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) |
Definition at line 61 of file main.inc.php.
Referenced by analyseVarsForSqlAndScriptsInjection(), and Form\select_thirdparty_list().
| top_htmlhead | ( | $head, | |
$title = '', |
|||
$disablejs = 0, |
|||
$disablehead = 0, |
|||
$arrayofjs = '', |
|||
$arrayofcss = '', |
|||
$disablejmobile = 0, |
|||
$disablenofollow = 0 |
|||
| ) |
Ouput html header of a page.
This code is also duplicated into security2.lib.php::dol_loginfunction
| string | $head | Optionnal head lines |
| string | $title | HTML title |
| int | $disablejs | Disable js output |
| int | $disablehead | Disable head output |
| array | $arrayofjs | Array of complementary js files |
| array | $arrayofcss | Array of complementary css files |
| int | $disablejmobile | Disable jmobile (No more used) |
| int | $disablenofollow | Disable no follow tag |
Definition at line 1280 of file main.inc.php.
References dol_buildpath(), dol_htmlentities(), dol_syslog(), GETPOST(), GETPOSTISSET(), if, print, and top_httphead().
Referenced by llxHeaderSurvey(), llxHeaderTicket(), llxHeaderVierge(), and top_menu().
| if (!defined('NOREQUIREMENU')) if (!function_exists("llxHeader")) top_httphead | ( | $contenttype = 'text/html', |
|
$forcenocache = 0 |
|||
| ) |
Show HTTP header.
| string | $contenttype | Content type. For example, 'text/html' |
| int | $forcenocache | Force disabling of cache for the page |
Definition at line 1214 of file main.inc.php.
Referenced by top_htmlhead().
| top_menu | ( | $head, | |
$title = '', |
|||
$target = '', |
|||
$disablejs = 0, |
|||
$disablehead = 0, |
|||
$arrayofjs = '', |
|||
$arrayofcss = '', |
|||
$morequerystring = '', |
|||
$helppagename = '' |
|||
| ) |
Show an HTML header + a BODY + The top menu bar.
| string | $head | Lines in the HEAD |
| string | $title | Title of web page |
| string | $target | Target to use in menu links (Example: '' or '_top') |
| int | $disablejs | Do not output links to js (Ex: qd fonction utilisee par sous formulaire Ajax) |
| int | $disablehead | Do not output head section |
| array | $arrayofjs | Array of js files to add in header |
| array | $arrayofcss | Array of css files to add in header |
| string | $morequerystring | Query string to add to the link "print" to get same parameters (use only if autodetect fails) |
| string | $helppagename | Name of wiki page for help ('' by default). Syntax is: For a wiki page: EN:EnglishPage|FR:FrenchPage|ES:SpanishPage For other external page: http://server/url |
Definition at line 1615 of file main.inc.php.
References dol_escape_htmltag(), getHelpParamFor(), GETPOST(), img_picto(), print, top_htmlhead(), top_menu_bookmark(), top_menu_quickadd(), top_menu_search(), and top_menu_user().
| top_menu_bookmark | ( | ) |
Build the tooltip on top menu bookmark.
Definition at line 2253 of file main.inc.php.
References printDropdownBookmarksList().
Referenced by top_menu().
| top_menu_quickadd | ( | ) |
Build the tooltip on top menu quick add.
Definition at line 2034 of file main.inc.php.
Referenced by top_menu().
| top_menu_search | ( | ) |
Build the tooltip on top menu tsearch.
Definition at line 2327 of file main.inc.php.
Referenced by top_menu().
| top_menu_user | ( | $hideloginname = 0, |
|
$urllogout = '' |
|||
| ) |
Build the tooltip on user login.
| int | $hideloginname | Hide login name. Show only the image. |
| string | $urllogout | URL for logout |
Definition at line 1844 of file main.inc.php.
References dol_escape_htmltag(), dol_print_date(), dol_trunc(), picto_from_langcode(), Form\showphoto(), and yn().
Referenced by top_menu().