/[phpcompta]/phpcompta/html/admin/setup.php
ViewVC logotype

Diff of /phpcompta/html/admin/setup.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.37 by sparkyx, Sun Oct 30 21:16:44 2005 UTC revision 1.38 by sparkyx, Mon Oct 31 13:46:55 2005 UTC
# Line 293  $account=CountSql($cn, Line 293  $account=CountSql($cn,
293  if ($account == 0 ) {  if ($account == 0 ) {
294    
295    echo "Creation of ".domaine."account_repository";    echo "Creation of ".domaine."account_repository";
296    ob_start();      if ( DEBUG=='false') ob_start();  
297    ExecSql($cn,"create database ".domaine."account_repository encoding='latin1'");    ExecSql($cn,"create database ".domaine."account_repository encoding='latin1'");
298    $cn=DbConnect();    $cn=DbConnect();
299    ExecuteScript($cn,"sql/account_repository/schema.sql");    ExecuteScript($cn,"sql/account_repository/schema.sql");
300    ExecuteScript($cn,"sql/account_repository/data.sql");    ExecuteScript($cn,"sql/account_repository/data.sql");
301     if ( DEBUG=='false') ob_end_clean();
302    echo "Creation of Démo";    echo "Creation of Démo";
303      if ( DEBUG=='false') ob_start();  
304    ExecSql($cn,"create database ".domaine."dossier1 encoding='latin1'");    ExecSql($cn,"create database ".domaine."dossier1 encoding='latin1'");
305    $cn=DbConnect(1,'dossier');    $cn=DbConnect(1,'dossier');
306    ExecuteScript($cn,'sql/dossier1/schema.sql');    ExecuteScript($cn,'sql/dossier1/schema.sql');
307    ExecuteScript($cn,'sql/dossier1/data.sql');    ExecuteScript($cn,'sql/dossier1/data.sql');
308     if ( DEBUG=='false') ob_end_clean();
309    
310    echo "Creation of Modele1";    echo "Creation of Modele1";
311      if ( DEBUG=='false') ob_start();  
312    ExecSql($cn,"create database ".domaine."mod1 encoding='latin1'");    ExecSql($cn,"create database ".domaine."mod1 encoding='latin1'");
313    $cn=DbConnect(1,'mod');    $cn=DbConnect(1,'mod');
314    ExecuteScript($cn,'sql/mod1/schema.sql');    ExecuteScript($cn,'sql/mod1/schema.sql');
315    ExecuteScript($cn,'sql/mod1/data.sql');    ExecuteScript($cn,'sql/mod1/data.sql');
316     if ( DEBUG=='false') ob_end_clean();
317     }// end if
318    
319    // Add a french accountancy model
320    //--
321    $cn=DbConnect();
322    $Res=CountSql($cn,"select * from modeledef where mod_id=2");
323    if ( $Res == 0) {
324    echo "Creation of Modele2";    echo "Creation of Modele2";
325    ExecSql($cn,"create database ".domaine."mod2 encoding='latin1'");    ExecSql($cn,"create database ".domaine."mod2 encoding='latin1'");
326    $cn=DbConnect(2,'mod');    $cn=DbConnect(2,'mod');
327      if ( DEBUG=='false') { ob_start();  }
328    ExecuteScript($cn,'sql/mod2/schema.sql');    ExecuteScript($cn,'sql/mod2/schema.sql');
329    ExecuteScript($cn,'sql/mod2/data.sql');    ExecuteScript($cn,'sql/mod2/data.sql');
330      $sql="INSERT INTO modeledef VALUES (2, '(FR) Basique', 'Comptabilité Française, tout doit être adaptée');";
331      $cn=DbConnect();
332   ob_end_clean();    ExecSql($cn,$sql);
333     if ( DEBUG=='false') ob_end_clean();
334  }  }
335  // _SERVER["DOCUMENT_ROOT"]  //
336  // Test the connection  // Test the connection
337    //--
338  $a=DbConnect();  $a=DbConnect();
339  if ( $a==false) {  if ( $a==false) {
340     exit ("<h2 class=\"error\">".__LINE__." test has failed !!!</h2>");     exit ("<h2 class=\"error\">".__LINE__." test has failed !!!</h2>");
# Line 453  if ( GetVersion($cn) == 6 ) { Line 466  if ( GetVersion($cn) == 6 ) {
466    ExecuteScript($cn,'sql/patch/ac-upgrade6.sql');    ExecuteScript($cn,'sql/patch/ac-upgrade6.sql');
467   }   }
468  if (DEBUG=='false') ob_end_clean();  if (DEBUG=='false') ob_end_clean();
 echo "<h2 class=\"info\">Voilà tout est installé ;-)</h2>";  
469    echo "<h2 class=\"info\">Voilà tout est installé ;-)</h2>";

Legend:
Removed from v.1.37  
changed lines
  Added in v.1.38

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26