dolibarr  13.0.2
step2.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3  * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
4  * Copyright (C) 2015 Cedric GROSS <c.gross@kreiz-it.fr>
5  * Copyright (C) 2015-2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
6  *
7  * This program is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <https://www.gnu.org/licenses/>.
19  */
20 
27 include 'inc.php';
28 require_once $dolibarr_main_document_root.'/core/class/conf.class.php';
29 require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
30 
31 global $langs;
32 
33 $step = 2;
34 $ok = 0;
35 
36 
37 // Cette page peut etre longue. On augmente le delai autorise.
38 // Ne fonctionne que si on est pas en safe_mode.
39 $err = error_reporting();
40 error_reporting(0); // Disable all errors
41 //error_reporting(E_ALL);
42 @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64
43 error_reporting($err);
44 
45 $action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]);
46 $setuplang = GETPOST('selectlang', 'aZ09', 3) ?GETPOST('selectlang', 'aZ09', 3) : (empty($argv[2]) ? 'auto' : $argv[2]);
47 $langs->setDefaultLang($setuplang);
48 
49 $langs->loadLangs(array("admin", "install"));
50 
51 $choix = 0;
52 if ($dolibarr_main_db_type == "mysqli") $choix = 1;
53 if ($dolibarr_main_db_type == "pgsql") $choix = 2;
54 if ($dolibarr_main_db_type == "mssql") $choix = 3;
55 if ($dolibarr_main_db_type == "sqlite") $choix = 4;
56 if ($dolibarr_main_db_type == "sqlite3") $choix = 5;
57 
58 //if (empty($choix)) dol_print_error('','Database type '.$dolibarr_main_db_type.' not supported into step2.php page');
59 
60 // Now we load forced values from install.forced.php file.
61 $useforcedwizard = false;
62 $forcedfile = "./install.forced.php";
63 if ($conffile == "/etc/dolibarr/conf.php") $forcedfile = "/etc/dolibarr/install.forced.php";
64 if (@file_exists($forcedfile)) {
65  $useforcedwizard = true;
66  include_once $forcedfile;
67  // test for travis
68  if (!empty($argv[1]) && $argv[1] == "set") $action = "set";
69 }
70 
71 dolibarr_install_syslog("- step2: entering step2.php page");
72 
73 
74 /*
75  * View
76  */
77 
78 pHeader($langs->trans("CreateDatabaseObjects"), "step4");
79 
80 // Test if we can run a first install process
81 if (!is_writable($conffile))
82 {
83  print $langs->trans("ConfFileIsNotWritable", $conffiletoshow);
84  pFooter(1, $setuplang, 'jscheckparam');
85  exit;
86 }
87 
88 if ($action == "set")
89 {
90  print '<h3><img class="valigntextbottom" src="../theme/common/octicons/build/svg/database.svg" width="20" alt="Database"> '.$langs->trans("Database").'</h3>';
91 
92  print '<table cellspacing="0" style="padding: 4px 4px 4px 0" border="0" width="100%">';
93  $error = 0;
94 
95  $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf->db->pass, $conf->db->name, $conf->db->port);
96 
97  if ($db->connected)
98  {
99  print "<tr><td>";
100  print $langs->trans("ServerConnection")." : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
101  $ok = 1;
102  } else {
103  print "<tr><td>Failed to connect to server : ".$conf->db->host.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
104  }
105 
106  if ($ok)
107  {
108  if ($db->database_selected)
109  {
110  dolibarr_install_syslog("step2: successful connection to database: ".$conf->db->name);
111  } else {
112  dolibarr_install_syslog("step2: failed connection to database :".$conf->db->name, LOG_ERR);
113  print "<tr><td>Failed to select database ".$conf->db->name.'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
114  $ok = 0;
115  }
116  }
117 
118 
119  // Affiche version
120  if ($ok)
121  {
122  $version = $db->getVersion();
123  $versionarray = $db->getVersionArray();
124  print '<tr><td>'.$langs->trans("DatabaseVersion").'</td>';
125  print '<td>'.$version.'</td></tr>';
126  //print '<td class="right">'.join('.',$versionarray).'</td></tr>';
127 
128  print '<tr><td>'.$langs->trans("DatabaseName").'</td>';
129  print '<td>'.$db->database_name.'</td></tr>';
130  //print '<td class="right">'.join('.',$versionarray).'</td></tr>';
131  }
132 
133  $requestnb = 0;
134 
135  // To disable some code, so you can call step2 with url like
136  // http://localhost/dolibarrnew/install/step2.php?action=set&createtables=0&createkeys=0&createfunctions=0&createdata=llx_20_c_departements
137  $createtables = isset($_GET['createtables']) ?GETPOST('createtables') : 1;
138  $createkeys = isset($_GET['createkeys']) ?GETPOST('createkeys') : 1;
139  $createfunctions = isset($_GET['createfunctions']) ?GETPOST('createfunction') : 1;
140  $createdata = isset($_GET['createdata']) ?GETPOST('createdata') : 1;
141 
142 
143  // To say sql requests are escaped for mysql so we need to unescape them
144  $db->unescapeslashquot = true;
145 
146 
147  /**************************************************************************************
148  *
149  * Chargement fichiers tables/*.sql (non *.key.sql)
150  * A faire avant les fichiers *.key.sql
151  *
152  ***************************************************************************************/
153  if ($ok && $createtables)
154  {
155  // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
156  $dir = "mysql/tables/";
157 
158  $ok = 0;
159  $handle = opendir($dir);
160  dolibarr_install_syslog("step2: open tables directory ".$dir." handle=".$handle);
161  $tablefound = 0;
162  $tabledata = array();
163  if (is_resource($handle))
164  {
165  while (($file = readdir($handle)) !== false)
166  {
167  if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && !preg_match('/\.key\.sql$/i', $file))
168  {
169  $tablefound++;
170  $tabledata[] = $file;
171  }
172  }
173  closedir($handle);
174  }
175 
176  // Sort list of sql files on alphabetical order (load order is important)
177  sort($tabledata);
178  foreach ($tabledata as $file)
179  {
180  $name = substr($file, 0, dol_strlen($file) - 4);
181  $buffer = '';
182  $fp = fopen($dir.$file, "r");
183  if ($fp)
184  {
185  while (!feof($fp))
186  {
187  $buf = fgets($fp, 4096);
188  if (substr($buf, 0, 2) <> '--')
189  {
190  $buf = preg_replace('/--(.+)*/', '', $buf);
191  $buffer .= $buf;
192  }
193  }
194  fclose($fp);
195 
196  $buffer = trim($buffer);
197  if ($conf->db->type == 'mysql' || $conf->db->type == 'mysqli') // For Mysql 5.5+, we must replace type=innodb with ENGINE=innodb
198  {
199  $buffer = preg_replace('/type=innodb/i', 'ENGINE=innodb', $buffer);
200  } else {
201  // Keyword ENGINE is MySQL-specific, so scrub it for
202  // other database types (mssql, pgsql)
203  $buffer = preg_replace('/type=innodb/i', '', $buffer);
204  $buffer = preg_replace('/ENGINE=innodb/i', '', $buffer);
205  }
206 
207  // Replace the prefix tables
208  if ($dolibarr_main_db_prefix != 'llx_')
209  {
210  $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer);
211  }
212 
213  //print "<tr><td>Creation de la table $name/td>";
214  $requestnb++;
215 
216  dolibarr_install_syslog("step2: request: ".$buffer);
217  $resql = $db->query($buffer, 0, 'dml');
218  if ($resql)
219  {
220  // print "<td>OK requete ==== $buffer</td></tr>";
221  $db->free($resql);
222  } else {
223  if ($db->errno() == 'DB_ERROR_TABLE_ALREADY_EXISTS' ||
224  $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS')
225  {
226  //print "<td>Deja existante</td></tr>";
227  } else {
228  print "<tr><td>".$langs->trans("CreateTableAndPrimaryKey", $name);
229  print "<br>\n".$langs->trans("Request").' '.$requestnb.' : '.$buffer.' <br>Executed query : '.$db->lastquery;
230  print "\n</td>";
231  print '<td><span class="error">'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'</span></td></tr>';
232  $error++;
233  }
234  }
235  } else {
236  print "<tr><td>".$langs->trans("CreateTableAndPrimaryKey", $name);
237  print "</td>";
238  print '<td><span class="error">'.$langs->trans("Error").' Failed to open file '.$dir.$file.'</span></td></tr>';
239  $error++;
240  dolibarr_install_syslog("step2: failed to open file ".$dir.$file, LOG_ERR);
241  }
242  }
243 
244  if ($tablefound)
245  {
246  if ($error == 0)
247  {
248  print '<tr><td>';
249  print $langs->trans("TablesAndPrimaryKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
250  $ok = 1;
251  }
252  } else {
253  print '<tr><td>'.$langs->trans("ErrorFailedToFindSomeFiles", $dir).'</td><td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
254  dolibarr_install_syslog("step2: failed to find files to create database in directory ".$dir, LOG_ERR);
255  }
256  }
257 
258 
259  /***************************************************************************************
260  *
261  * Chargement fichiers tables/*.key.sql
262  * A faire apres les fichiers *.sql
263  *
264  ***************************************************************************************/
265  if ($ok && $createkeys)
266  {
267  // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
268  $dir = "mysql/tables/";
269 
270  $okkeys = 0;
271  $handle = opendir($dir);
272  dolibarr_install_syslog("step2: open keys directory ".$dir." handle=".$handle);
273  $tablefound = 0;
274  $tabledata = array();
275  if (is_resource($handle))
276  {
277  while (($file = readdir($handle)) !== false)
278  {
279  if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file) && preg_match('/\.key\.sql$/i', $file))
280  {
281  $tablefound++;
282  $tabledata[] = $file;
283  }
284  }
285  closedir($handle);
286  }
287 
288  // Sort list of sql files on alphabetical order (load order is important)
289  sort($tabledata);
290  foreach ($tabledata as $file)
291  {
292  $name = substr($file, 0, dol_strlen($file) - 4);
293  //print "<tr><td>Creation de la table $name</td>";
294  $buffer = '';
295  $fp = fopen($dir.$file, "r");
296  if ($fp)
297  {
298  while (!feof($fp))
299  {
300  $buf = fgets($fp, 4096);
301 
302  // Special case of lines allowed for some version only
303  if ($choix == 1 && preg_match('/^--\sV([0-9\.]+)/i', $buf, $reg))
304  {
305  $versioncommande = explode('.', $reg[1]);
306  //print var_dump($versioncommande);
307  //print var_dump($versionarray);
308  if (count($versioncommande) && count($versionarray)
309  && versioncompare($versioncommande, $versionarray) <= 0)
310  {
311  // Version qualified, delete SQL comments
312  $buf = preg_replace('/^--\sV([0-9\.]+)/i', '', $buf);
313  //print "Ligne $i qualifiee par version: ".$buf.'<br>';
314  }
315  }
316  if ($choix == 2 && preg_match('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', $buf, $reg))
317  {
318  $versioncommande = explode('.', $reg[1]);
319  //print var_dump($versioncommande);
320  //print var_dump($versionarray);
321  if (count($versioncommande) && count($versionarray)
322  && versioncompare($versioncommande, $versionarray) <= 0)
323  {
324  // Version qualified, delete SQL comments
325  $buf = preg_replace('/^--\sPOSTGRESQL\sV([0-9\.]+)/i', '', $buf);
326  //print "Ligne $i qualifiee par version: ".$buf.'<br>';
327  }
328  }
329 
330  // Ajout ligne si non commentaire
331  if (!preg_match('/^--/i', $buf)) $buffer .= $buf;
332  }
333  fclose($fp);
334 
335  // Si plusieurs requetes, on boucle sur chaque
336  $listesql = explode(';', $buffer);
337  foreach ($listesql as $req)
338  {
339  $buffer = trim($req);
340  if ($buffer)
341  {
342  // Replace the prefix tables
343  if ($dolibarr_main_db_prefix != 'llx_')
344  {
345  $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer);
346  }
347 
348  //print "<tr><td>Creation des cles et index de la table $name: '$buffer'</td>";
349  $requestnb++;
350 
351  dolibarr_install_syslog("step2: request: ".$buffer);
352  $resql = $db->query($buffer, 0, 'dml');
353  if ($resql)
354  {
355  //print "<td>OK requete ==== $buffer</td></tr>";
356  $db->free($resql);
357  } else {
358  if ($db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS' ||
359  $db->errno() == 'DB_ERROR_CANNOT_CREATE' ||
360  $db->errno() == 'DB_ERROR_PRIMARY_KEY_ALREADY_EXISTS' ||
361  $db->errno() == 'DB_ERROR_TABLE_OR_KEY_ALREADY_EXISTS' ||
362  preg_match('/duplicate key name/i', $db->error()))
363  {
364  //print "<td>Deja existante</td></tr>";
365  $key_exists = 1;
366  } else {
367  print "<tr><td>".$langs->trans("CreateOtherKeysForTable", $name);
368  print "<br>\n".$langs->trans("Request").' '.$requestnb.' : '.$db->lastqueryerror();
369  print "\n</td>";
370  print '<td><span class="error">'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'</span></td></tr>';
371  $error++;
372  }
373  }
374  }
375  }
376  } else {
377  print "<tr><td>".$langs->trans("CreateOtherKeysForTable", $name);
378  print "</td>";
379  print '<td><span class="error">'.$langs->trans("Error")." Failed to open file ".$dir.$file."</span></td></tr>";
380  $error++;
381  dolibarr_install_syslog("step2: failed to open file ".$dir.$file, LOG_ERR);
382  }
383  }
384 
385  if ($tablefound && $error == 0)
386  {
387  print '<tr><td>';
388  print $langs->trans("OtherKeysCreation").'</td><td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
389  $okkeys = 1;
390  }
391  }
392 
393 
394  /***************************************************************************************
395  *
396  * Chargement fichier functions.sql
397  *
398  ***************************************************************************************/
399  if ($ok && $createfunctions)
400  {
401  // For this file, we use a directory according to database type
402  if ($choix == 1) $dir = "mysql/functions/";
403  elseif ($choix == 2) $dir = "pgsql/functions/";
404  elseif ($choix == 3) $dir = "mssql/functions/";
405  elseif ($choix == 4) { $dir = "sqlite3/functions/"; }
406 
407  // Creation donnees
408  $file = "functions.sql";
409  if (file_exists($dir.$file))
410  {
411  $fp = fopen($dir.$file, "r");
412  dolibarr_install_syslog("step2: open function file ".$dir.$file." handle=".$fp);
413  if ($fp)
414  {
415  $buffer = '';
416  while (!feof($fp))
417  {
418  $buf = fgets($fp, 4096);
419  if (substr($buf, 0, 2) <> '--')
420  {
421  $buffer .= $buf."§";
422  }
423  }
424  fclose($fp);
425  }
426  //$buffer=preg_replace('/;\';/',";'§",$buffer);
427 
428  // If several requests, we loop on each of them
429  $listesql = explode('§', $buffer);
430  foreach ($listesql as $buffer)
431  {
432  $buffer = trim($buffer);
433  if ($buffer)
434  {
435  // Replace the prefix in table names
436  if ($dolibarr_main_db_prefix != 'llx_')
437  {
438  $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer);
439  }
440  dolibarr_install_syslog("step2: request: ".$buffer);
441  print "<!-- Insert line : ".$buffer."<br>-->\n";
442  $resql = $db->query($buffer, 0, 'dml');
443  if ($resql)
444  {
445  $ok = 1;
446  $db->free($resql);
447  } else {
448  if ($db->errno() == 'DB_ERROR_RECORD_ALREADY_EXISTS'
449  || $db->errno() == 'DB_ERROR_KEY_NAME_ALREADY_EXISTS')
450  {
451  //print "Insert line : ".$buffer."<br>\n";
452  } else {
453  $ok = 0;
454 
455  print "<tr><td>".$langs->trans("FunctionsCreation");
456  print "<br>\n".$langs->trans("Request").' '.$requestnb.' : '.$buffer;
457  print "\n</td>";
458  print '<td><span class="error">'.$langs->trans("ErrorSQL")." ".$db->errno()." ".$db->error().'</span></td></tr>';
459  $error++;
460  }
461  }
462  }
463  }
464 
465  print "<tr><td>".$langs->trans("FunctionsCreation")."</td>";
466  if ($ok)
467  {
468  print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
469  } else {
470  print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
471  $ok = 1;
472  }
473  }
474  }
475 
476 
477  /***************************************************************************************
478  *
479  * Load files data/*.sql
480  *
481  ***************************************************************************************/
482  if ($ok && $createdata)
483  {
484  // We always choose in mysql directory (Conversion is done by driver to translate SQL syntax)
485  $dir = "mysql/data/";
486 
487  // Insert data
488  $handle = opendir($dir);
489  dolibarr_install_syslog("step2: open directory data ".$dir." handle=".$handle);
490  $tablefound = 0;
491  $tabledata = array();
492  if (is_resource($handle))
493  {
494  while (($file = readdir($handle)) !== false)
495  {
496  if (preg_match('/\.sql$/i', $file) && preg_match('/^llx_/i', $file))
497  {
498  if (preg_match('/^llx_accounting_account_/', $file)) continue; // We discard data file of chart of account. Will be loaded when a chart is selected.
499 
500  //print 'x'.$file.'-'.$createdata.'<br>';
501  if (is_numeric($createdata) || preg_match('/'.preg_quote($createdata).'/i', $file))
502  {
503  $tablefound++;
504  $tabledata[] = $file;
505  }
506  }
507  }
508  closedir($handle);
509  }
510 
511  // Sort list of data files on alphabetical order (load order is important)
512  sort($tabledata);
513  foreach ($tabledata as $file)
514  {
515  $name = substr($file, 0, dol_strlen($file) - 4);
516  $fp = fopen($dir.$file, "r");
517  dolibarr_install_syslog("step2: open data file ".$dir.$file." handle=".$fp);
518  if ($fp)
519  {
520  $arrayofrequests = array();
521  $linefound = 0;
522  $linegroup = 0;
523  $sizeofgroup = 1; // Grouping request to have 1 query for several requests does not works with mysql, so we use 1.
524 
525  // Load all requests
526  while (!feof($fp))
527  {
528  $buffer = fgets($fp, 4096);
529  $buffer = trim($buffer);
530  if ($buffer)
531  {
532  if (substr($buffer, 0, 2) == '--') continue;
533 
534  if ($linefound && ($linefound % $sizeofgroup) == 0)
535  {
536  $linegroup++;
537  }
538  if (empty($arrayofrequests[$linegroup])) $arrayofrequests[$linegroup] = $buffer;
539  else $arrayofrequests[$linegroup] .= " ".$buffer;
540 
541  $linefound++;
542  }
543  }
544  fclose($fp);
545 
546  dolibarr_install_syslog("step2: found ".$linefound." records, defined ".count($arrayofrequests)." group(s).");
547 
548  $okallfile = 1;
549  $db->begin();
550 
551  // We loop on each requests of file
552  foreach ($arrayofrequests as $buffer)
553  {
554  // Replace the prefix tables
555  if ($dolibarr_main_db_prefix != 'llx_')
556  {
557  $buffer = preg_replace('/llx_/i', $dolibarr_main_db_prefix, $buffer);
558  }
559 
560  //dolibarr_install_syslog("step2: request: " . $buffer);
561  $resql = $db->query($buffer, 1);
562  if ($resql)
563  {
564  //$db->free($resql); // Not required as request we launch here does not return memory needs.
565  } else {
566  if ($db->lasterrno() == 'DB_ERROR_RECORD_ALREADY_EXISTS')
567  {
568  //print "<tr><td>Insertion ligne : $buffer</td><td>";
569  } else {
570  $ok = 0;
571  $okallfile = 0;
572  print '<span class="error">'.$langs->trans("ErrorSQL")." : ".$db->lasterrno()." - ".$db->lastqueryerror()." - ".$db->lasterror()."</span><br>";
573  }
574  }
575  }
576 
577  if ($okallfile) $db->commit();
578  else $db->rollback();
579  }
580  }
581 
582  print "<tr><td>".$langs->trans("ReferenceDataLoading")."</td>";
583  if ($ok)
584  {
585  print '<td><img src="../theme/eldy/img/tick.png" alt="Ok"></td></tr>';
586  } else {
587  print '<td><img src="../theme/eldy/img/error.png" alt="Error"></td></tr>';
588  $ok = 1; // Data loading are not blocking errors
589  }
590  }
591  print '</table>';
592 } else {
593  print 'Parameter action=set not defined';
594 }
595 
596 
597 $ret = 0;
598 if (!$ok && isset($argv[1])) $ret = 1;
599 dolibarr_install_syslog("Exit ".$ret);
600 
601 dolibarr_install_syslog("- step2: end");
602 
603 
604 $out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno" value="checked" checked="true"> ';
605 $out .= $langs->trans("MakeAnonymousPing");
606 
607 $out .= '<!-- Add js script to manage the uncheck of option to not send the ping -->';
608 $out .= '<script type="text/javascript">';
609 $out .= 'jQuery(document).ready(function(){';
610 $out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=0; path=/"'."\n";
611 $out .= ' jQuery("#dolibarrpingno").click(function() {';
612 $out .= ' if (! $(this).is(\':checked\')) {';
613 $out .= ' console.log("We uncheck anonymous ping");';
614 $out .= ' document.cookie = "DOLINSTALLNOPING_'.md5($dolibarr_main_instance_unique_id).'=1; path=/"'."\n";
615 $out .= ' }';
616 $out .= ' });';
617 $out .= '});';
618 $out .= '</script>';
619 
620 print $out;
621 
622 pFooter($ok ? 0 : 1, $setuplang);
623 
624 if (isset($db) && is_object($db)) $db->close();
625 
626 // Return code if ran from command line
627 if ($ret) exit($ret);
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
pHeader($subtitle, $next, $action= 'set', $param= '', $forcejqueryurl= '', $csstable= 'main-inside')
Show HTML header of install pages.
Definition: inc.php:347
getDoliDBInstance($type, $host, $user, $pass, $name, $port)
Return a DoliDB instance (database handler).
dolibarr_install_syslog($message, $level=LOG_DEBUG)
Log function for install pages.
Definition: inc.php:482
dol_strlen($string, $stringencoding= 'UTF-8')
Make a strlen call.
versioncompare($versionarray1, $versionarray2)
Compare 2 versions (stored into 2 arrays).
Definition: admin.lib.php:66
pFooter($nonext=0, $setuplang= '', $jscheckfunction= '', $withpleasewait=0)
Print HTML footer of install pages.
Definition: inc.php:424
print
Draft customers invoices.
Definition: index.php:89
if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) if(!empty($conf->don->enabled)&&$user->rights->don->lire) if(!empty($conf->tax->enabled)&&$user->rights->tax->charges->lire) if(!empty($conf->facture->enabled)&&!empty($conf->commande->enabled)&&$user->rights->commande->lire &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) if(!empty($conf->facture->enabled)&&$user->rights->facture->lire) if((!empty($conf->fournisseur->enabled)&&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD)||!empty($conf->supplier_invoice->enabled))&&$user->rights->fournisseur->facture->lire) $resql
Social contributions to pay.
Definition: index.php:1232