dolibarr 21.0.0-alpha
inc.php File Reference

File that define environment for support pages. More...

Go to the source code of this file.

Functions

 usage ($program, $header)
 Print the usage when executing scripts from install/.
 
 conf ($dolibarr_main_document_root)
 Load conf file (file must exists)
 
 pHeader ($subtitle, $next, $action='set', $param='', $forcejqueryurl='', $csstable='main-inside')
 Show HTML header of install pages.
 
 pFooter ($nonext=0, $setuplang='', $jscheckfunction='', $withpleasewait=0, $morehtml='')
 Print HTML footer of install pages.
 
 dolibarr_install_syslog ($message, $level=LOG_DEBUG)
 Log function for install pages.
 
 detect_dolibarr_main_document_root ()
 Automatically detect Dolibarr's main document root.
 
 detect_dolibarr_main_data_root ($dolibarr_main_document_root)
 Automatically detect Dolibarr's main data root.
 
 detect_dolibarr_main_url_root ()
 Automatically detect Dolibarr's main URL root.
 
 parse_database_login ($force_install_databaserootlogin)
 Replaces automatic database login by actual value.
 
 parse_database_pass ($force_install_databaserootpass)
 Replaces automatic database password by actual value.
 

Detailed Description

File that define environment for support pages.

Definition in file inc.php.

Function Documentation

◆ conf()

conf ( $dolibarr_main_document_root)

Load conf file (file must exists)

Parameters
string$dolibarr_main_document_rootRoot directory of Dolibarr bin files
Returns
int Return integer <0 if KO, >0 if OK

Definition at line 420 of file inc.php.

Referenced by modCaptchaStandard\__construct(), modGeneratePassNone\__construct(), modGeneratePassPerso\__construct(), modGeneratePassStandard\__construct(), printing_printgcp\__construct(), printing_printipp\__construct(), User\__construct(), encodedecode_dbpassconf(), User\loadPersonalConf(), and User\send_password().

◆ detect_dolibarr_main_data_root()

detect_dolibarr_main_data_root ( $dolibarr_main_document_root)

Automatically detect Dolibarr's main data root.

Parameters
string$dolibarr_main_document_rootCurrent main document root
Returns
string

Definition at line 729 of file inc.php.

◆ detect_dolibarr_main_document_root()

detect_dolibarr_main_document_root ( )

Automatically detect Dolibarr's main document root.

Returns
string

Definition at line 705 of file inc.php.

◆ detect_dolibarr_main_url_root()

detect_dolibarr_main_url_root ( )

Automatically detect Dolibarr's main URL root.

Returns
string

Definition at line 740 of file inc.php.

◆ dolibarr_install_syslog()

dolibarr_install_syslog ( $message,
$level = LOG_DEBUG )

◆ parse_database_login()

parse_database_login ( $force_install_databaserootlogin)

Replaces automatic database login by actual value.

Parameters
string$force_install_databaserootloginLogin
Returns
string

Definition at line 773 of file inc.php.

◆ parse_database_pass()

parse_database_pass ( $force_install_databaserootpass)

Replaces automatic database password by actual value.

Parameters
string$force_install_databaserootpassPassword
Returns
string

Definition at line 784 of file inc.php.

◆ pFooter()

pFooter ( $nonext = 0,
$setuplang = '',
$jscheckfunction = '',
$withpleasewait = 0,
$morehtml = '' )

Print HTML footer of install pages.

Parameters
integer$nonext1=No button "Next step", 2=Show button but disabled with a link to enable
string$setuplangLanguage code
string$jscheckfunctionAdd a javascript check function
integer$withpleasewaitAdd also please wait tags
string$morehtmlAdd more HTML content
Returns
void

Definition at line 628 of file inc.php.

◆ pHeader()

pHeader ( $subtitle,
$next,
$action = 'set',
$param = '',
$forcejqueryurl = '',
$csstable = 'main-inside' )

Show HTML header of install pages.

Parameters
string$subtitleTitle
string$nextNext
string$actionAction code ('set' or 'upgrade')
string$paramParam
string$forcejqueryurlSet jquery relative URL (must end with / if defined)
string$csstableCss for table
Returns
void

Definition at line 535 of file inc.php.

◆ usage()

usage ( $program,
$header )

Print the usage when executing scripts from install/.

Print the help text exposing the available options when executing update or install script (ie. from htdocs/install/) from CLI with the php executable. This function does not exit the program and the caller should then call exit themselves since they should determine whether it was an error or not.

Parameters
string$programthe script that was originally run
string$headerthe message to signal to the user
Returns
void
Parameters
string$arg
Returns
bool

Previx option with '-' for single characters and – for more than single characters

Parameters
string$arg
Returns
string

Definition at line 94 of file inc.php.