29include_once
'inc.php';
30require_once $dolibarr_main_document_root.
'/core/class/conf.class.php';
31require_once $dolibarr_main_document_root.
'/core/lib/admin.lib.php';
35$setuplang =
GETPOST(
'selectlang',
'aZ09', 3) ?
GETPOST(
'selectlang',
'aZ09', 3) : (empty($argv[1]) ?
'auto' : $argv[1]);
36$langs->setDefaultLang($setuplang);
38$langs->loadLangs(array(
"admin",
"install"));
41$useforcedwizard =
false;
42$forcedfile =
"./install.forced.php";
43if ($conffile ==
"/etc/dolibarr/conf.php") {
44 $forcedfile =
"/etc/dolibarr/install.forced.php";
46if (@file_exists($forcedfile)) {
47 $useforcedwizard =
true;
48 include_once $forcedfile;
62pHeader($langs->trans(
"AdminAccountCreation"),
"step5");
65if (!is_writable($conffile)) {
66 print $langs->trans(
"ConfFileIsNotWritable", $conffiletoshow);
67 pFooter(1, $setuplang,
'jscheckparam');
72print
'<h3><img class="valignmiddle inline-block paddingright" src="../theme/common/octicons/build/svg/key.svg" width="20" alt="Database"> '.$langs->trans(
"DolibarrAdminLogin").
'</h3>';
74print $langs->trans(
"LastStepDesc").
'<br><br>';
77print
'<table cellspacing="0" cellpadding="2">';
79$db =
getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, (
int) $conf->db->port);
82 print
'<tr><td><label for="login">'.$langs->trans(
"Login").
' :</label></td><td>';
83 print
'<input id="login" name="login" type="text" value="'.(GETPOSTISSET(
"login") ?
GETPOST(
"login",
'alpha') : (isset($force_install_dolibarrlogin) ? $force_install_dolibarrlogin :
'')).
'"'.(@$force_install_noedit == 2 && $force_install_dolibarrlogin !== null ?
' disabled' :
'').
' autofocus></td></tr>';
84 print
'<tr><td><label for="pass">'.$langs->trans(
"Password").
' :</label></td><td>';
85 print
'<input type="password" id="pass" name="pass" autocomplete="new-password" minlength="8"></td></tr>';
86 print
'<tr><td><label for="pass_verif">'.$langs->trans(
"PasswordRetype").
' :</label></td><td>';
87 print
'<input type="password" id="pass_verif" name="pass_verif" autocomplete="new-password" minlength="8"></td></tr>';
90 if (isset($_GET[
"error"]) && $_GET[
"error"] == 1) {
92 print
'<div class="error">'.$langs->trans(
"PasswordsMismatch").
'</div>';
96 if (isset($_GET[
"error"]) && $_GET[
"error"] == 2) {
98 print
'<div class="error">';
99 print $langs->trans(
"PleaseTypePassword");
104 if (isset($_GET[
"error"]) && $_GET[
"error"] == 3) {
106 print
'<div class="error">'.$langs->trans(
"PleaseTypeALogin").
'</div>';
112if ($error && isset($argv[1])) {
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
getDoliDBInstance($type, $host, $user, $pass, $name, $port)
Return a DoliDB instance (database handler).
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.