From fb1b43d2268ca71a09c35e6eccddca4c55fc5803 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Fri, 20 Jun 2003 14:30:08 +0000 Subject: [PATCH] pre-release --- htdocs/admin/modules.php | 5 + htdocs/boutique/livre/index.php | 1 - htdocs/compta/bank/account.class.php | 29 ++++-- htdocs/compta/bank/index.php3 | 29 +++--- htdocs/compta/charges/index.php3 | 42 +++----- htdocs/compta/cumul.php | 2 +- htdocs/compta/resultat/caisse.php | 2 +- htdocs/compta/sociales/index.php3 | 93 ++++++++++-------- htdocs/compta/tva/index.php3 | 20 ++-- htdocs/compta/tva/reglement.php | 98 ++++++++----------- htdocs/conf/conf.class.php3.sample | 69 ++++++------- htdocs/contact.php | 4 +- htdocs/fichinter/fiche.php3 | 18 ++-- htdocs/fichinter/fichinter.class.php3 | 3 +- .../modules/fichinter/pdf_soleil.modules.php | 98 +------------------ htdocs/project.class.php3 | 2 +- htdocs/theme/yellow/yellow.css | 13 ++- htdocs/user.class.php3 | 4 +- htdocs/user/fiche.php3 | 46 ++++++--- 19 files changed, 261 insertions(+), 317 deletions(-) diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 4d36fcbe7c4..4b108141bb2 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -37,6 +37,11 @@ if (!$user->admin) // TODO mettre cette section dans la base de données // +$modules["MAIN_MODULE_SOCIETE"][0] = "Module societe"; +$modules["MAIN_MODULE_SOCIETE"][1] = "MAIN_MODULE_SOCIETE"; +$modules["MAIN_MODULE_SOCIETE"][2] = MAIN_MODULE_SOCIETE; +$modules["MAIN_MODULE_SOCIETE"][3] = "Module société"; + $modules["MAIN_MODULE_COMMERCIAL"][0] = "Module commercial"; $modules["MAIN_MODULE_COMMERCIAL"][1] = "MAIN_MODULE_COMMERCIAL"; $modules["MAIN_MODULE_COMMERCIAL"][2] = MAIN_MODULE_COMMERCIAL; diff --git a/htdocs/boutique/livre/index.php b/htdocs/boutique/livre/index.php index 38355cc7d16..b93a48e5970 100644 --- a/htdocs/boutique/livre/index.php +++ b/htdocs/boutique/livre/index.php @@ -86,7 +86,6 @@ if ( $db->query($sql) ) print ''; print ''; print 'Fiche en ligne'; - } else { diff --git a/htdocs/compta/bank/account.class.php b/htdocs/compta/bank/account.class.php index 6804ca15edf..0482f9f51c3 100644 --- a/htdocs/compta/bank/account.class.php +++ b/htdocs/compta/bank/account.class.php @@ -19,7 +19,8 @@ * $Source$ */ -class Account { +class Account +{ var $rowid; var $bank; @@ -33,9 +34,10 @@ class Account { var $bic; var $iban_prefix; - Function Account($DB, $rowid=0) { + Function Account($DB, $rowid=0) + { global $config; - + $this->clos = 0; $this->db = $DB; $this->rowid = $rowid; @@ -46,11 +48,18 @@ class Account { * * */ - /* - * - * - * - */ + + Function addline($date, $oper, $label, $amount, $num_chq="") + { + $sql = "INSERT INTO llx_bank (datec, dateo, label, amount, author, num_chq,fk_account, fk_type)"; + $sql .= " VALUES (now(), $date, '$label', $amount,'$author',$num_chq,$this->rowid,'$operation')"; + + if ($this->db->query($sql)) + { + return 1; + } + } + Function create() { $sql = "INSERT INTO llx_bank_account (datec, label) values (now(),'$this->label');"; @@ -139,6 +148,10 @@ class Account { } $this->db->free(); } + else + { + print $this->db->error(); + } } /* * diff --git a/htdocs/compta/bank/index.php3 b/htdocs/compta/bank/index.php3 index 98896b64bb0..8440dca6da2 100644 --- a/htdocs/compta/bank/index.php3 +++ b/htdocs/compta/bank/index.php3 @@ -54,30 +54,31 @@ if ($result) { } print ""; -print ""; -print ""; +print ''; +print ""; print ""; print "\n"; $total = 0; -for ($i = 0 ; $i < sizeof($accounts) ; $i++) { +for ($i = 0 ; $i < sizeof($accounts) ; $i++) +{ $acc = new Account($db); $acc->fetch($accounts[$i]); - if ($acc->courant) { - $solde = $acc->solde(); + if ($acc->courant) + { + $solde = $acc->solde(); - print ""; + print ""; - print ''; + print ''; - $total += $solde; - } + $total += $solde; + } } -print ''; - +print ''; print ''; /* * TVA @@ -106,7 +107,7 @@ print ''; +print ''; /* * diff --git a/htdocs/compta/charges/index.php3 b/htdocs/compta/charges/index.php3 index 3244969df93..84fa713dbf5 100644 --- a/htdocs/compta/charges/index.php3 +++ b/htdocs/compta/charges/index.php3 @@ -1,8 +1,5 @@ - * - * $Id$ - * $Source$ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,6 +15,9 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * + * $Id$ + * $Source$ + * */ require("./pre.inc.php3"); @@ -25,14 +25,17 @@ llxHeader(); $db = new Db(); -function valeur($sql) { +function valeur($sql) +{ global $db; - if ( $db->query($sql) ) { - if ( $db->num_rows() ) { - $valeur = $db->result(0,0); + if ( $db->query($sql) ) + { + if ( $db->num_rows() ) + { + $valeur = $db->result(0,0); + } + $db->free(); } - $db->free(); - } return $valeur; } /* @@ -40,23 +43,9 @@ function valeur($sql) { */ $db = new Db(); - -if ($action == 'add_bookmark') { - $sql = "INSERT INTO llx_bookmark (fk_soc, dateb, fk_user) VALUES ($socidp, now(),".$user->id.");"; - if (! $db->query($sql) ) { - print $db->error(); - } -} - -if ($action == 'del_bookmark') { - $sql = "DELETE FROM llx_bookmark WHERE rowid=$bid"; - $result = $db->query($sql); -} - print_titre("Charges"); - -print '
LabelBanque
CompteBanqueNuméroSolde 
"; - print ''.$acc->label.''; + print "
"; + print ''.$acc->label.''; - print "$acc->bank$acc->number$acc->bank$acc->number'.price($solde).' 
'.price($solde).' 
Total'.price($total).'euros HT
Total'.price($total).'euros
Dettes
URSSAF'.price($chs_a_payer).'< * */ -print '
Total'.price($total).'euros HT
Total'.price($total).'euros
'; +print '
'; print ""; print ""; print "\n"; @@ -66,7 +55,8 @@ $sql .= " FROM c_chargesociales as c, llx_chargesociales as s"; $sql .= " WHERE s.fk_type = c.id AND s.paye = 1"; $sql .= " GROUP BY lower(c.libelle) ASC"; -if ( $db->query($sql) ) { +if ( $db->query($sql) ) +{ $num = $db->num_rows(); $i = 0; diff --git a/htdocs/compta/cumul.php b/htdocs/compta/cumul.php index 501af046817..b92683666f0 100644 --- a/htdocs/compta/cumul.php +++ b/htdocs/compta/cumul.php @@ -96,7 +96,7 @@ function pt ($db, $sql, $date) if ($result) { $num = $db->num_rows(); $i = 0; $total = 0 ; - print "

Factures
"; + print '

'; print ""; print ""; print ""; diff --git a/htdocs/compta/resultat/caisse.php b/htdocs/compta/resultat/caisse.php index 63898655152..ac2e70dd04c 100644 --- a/htdocs/compta/resultat/caisse.php +++ b/htdocs/compta/resultat/caisse.php @@ -86,7 +86,7 @@ print ''; $year_current = strftime("%Y",time()); -if ($year_current > (MAIN_START_YEAR + 2)) +if ($year_current < (MAIN_START_YEAR + 2)) { $year_start = MAIN_START_YEAR; $year_end = (MAIN_START_YEAR + 2); diff --git a/htdocs/compta/sociales/index.php3 b/htdocs/compta/sociales/index.php3 index 195099b366a..7f2ecd47565 100644 --- a/htdocs/compta/sociales/index.php3 +++ b/htdocs/compta/sociales/index.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * $Id$ * $Source$ @@ -25,14 +25,17 @@ llxHeader(); $db = new Db(); -function valeur($sql) { +function valeur($sql) +{ global $db; - if ( $db->query($sql) ) { - if ( $db->num_rows() ) { - $valeur = $db->result(0,0); + if ( $db->query($sql) ) + { + if ( $db->num_rows() ) + { + $valeur = $db->result(0,0); + } + $db->free(); } - $db->free(); - } return $valeur; } /* @@ -41,18 +44,15 @@ function valeur($sql) { $db = new Db(); -if ($action == 'add') { +if ($action == 'add') +{ $sql = "INSERT INTO llx_chargesociales (fk_type, libelle, date_ech,amount) "; $sql .= " VALUES ($type,'$libelle','$date',$amount);"; - if (! $db->query($sql) ) { - print $db->error(); - } -} - -if ($action == 'del_bookmark') { - $sql = "DELETE FROM llx_bookmark WHERE rowid=$bid"; - $result = $db->query($sql); + if (! $db->query($sql) ) + { + print $db->error(); + } } print_titre("Charges sociales $year"); @@ -73,34 +73,40 @@ print "\n"; $sql = "SELECT c.libelle as nom, s.amount,".$db->pdate("s.date_ech")." as de, s.date_pai, s.libelle, s.paye,".$db->pdate("s.periode")." as periode,".$db->pdate("s.date_pai")." as dp"; $sql .= " FROM c_chargesociales as c, llx_chargesociales as s"; $sql .= " WHERE s.fk_type = c.id"; -if ($year > 0) { +if ($year > 0) +{ $sql .= " AND date_format(s.periode, '%Y') = $year"; } $sql .= " ORDER BY lower(s.date_ech) DESC"; -if ( $db->query($sql) ) { +if ( $db->query($sql) ) +{ $num = $db->num_rows(); $i = 0; - while ($i < $num) { - $obj = $db->fetch_object( $i); - $var = !$var; - print ""; - print ''; - print ''; - print ''; - print ''; - - if ($obj->paye) { - print ''; - } else { - print ''; - print ''; + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var = !$var; + print ""; + print ''; + print ''; + print ''; + print ''; + + if ($obj->paye) + { + print ''; + } else { + print ''; + print ''; + } + print ''; + $i++; } - print ''; - $i++; - } -} else { +} +else +{ print $db->error(); } /* @@ -118,22 +124,23 @@ print ''; print ''; - print ''; print '
$dateMontant
'.strftime("%d %b %y",$obj->de).'periode).'">'.strftime("%Y",$obj->periode).''.$obj->nom.''.$obj->libelle.''.price($obj->amount).''.strftime("%d/%m/%y",$obj->dp).'
'.strftime("%d %b %y",$obj->de).'periode).'">'.strftime("%Y",$obj->periode).''.$obj->nom.''.$obj->libelle.''.price($obj->amount).''.strftime("%d/%m/%y",$obj->dp).'
'; print '
'; diff --git a/htdocs/compta/tva/index.php3 b/htdocs/compta/tva/index.php3 index 24d403716f2..7dab5d30c05 100644 --- a/htdocs/compta/tva/index.php3 +++ b/htdocs/compta/tva/index.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -42,17 +42,19 @@ function tva_coll($db, $y,$m) { * * */ -function tva_paye($db, $y,$m) { - $sql = "SELECT sum(f.tva) as amount"; +function tva_paye($db, $y,$m) +{ + $sql = "SELECT sum(f.total_tva) as amount"; $sql .= " FROM llx_facture_fourn as f WHERE f.paye = 1"; $sql .= " AND date_format(f.datef,'%Y') = $y"; $sql .= " AND date_format(f.datef,'%m') = $m"; $result = $db->query($sql); - if ($result) { - $obj = $db->fetch_object ( 0 ); - return $obj->amount; - } + if ($result) + { + $obj = $db->fetch_object ( 0 ); + return $obj->amount; + } } function pt ($db, $sql, $date) { @@ -101,7 +103,7 @@ $db = new Db(); $tva = new Tva($db); -print "Solde :" . price($tva->solde($year)); +print_titre( "TVA Solde : " . price($tva->solde($year)) . " euros"); if ($year == 0 ) { $year_current = strftime("%Y",time()); @@ -112,7 +114,7 @@ if ($year == 0 ) { $year_start = $year; } echo ''; -echo ''; +echo ''; echo ''; for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { diff --git a/htdocs/compta/tva/reglement.php b/htdocs/compta/tva/reglement.php index c713c8dfdd2..cc7abcd4492 100644 --- a/htdocs/compta/tva/reglement.php +++ b/htdocs/compta/tva/reglement.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2001-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -27,41 +27,11 @@ require("../../tva.class.php3"); * */ -function pt ($db, $sql, $date) { +function pt ($db, $sql, $date) +{ global $bc; - $result = $db->query($sql); - if ($result) { - $num = $db->num_rows(); - $i = 0; - $total = 0 ; - print "

TVA collectée
TVA collectéeTva Réglée
"; - print ""; - print ""; - print ""; - print "\n"; - print "\n"; - $var=True; - while ($i < $num) { - $obj = $db->fetch_object( $i); - $var=!$var; - print ""; - print "\n"; - $total = $total + $obj->amount; - print ""; - print "\n"; - print "\n"; - - $i++; - } - print ""; - - print "
$dateMontant 
$obj->dm".price($obj->amount)."".$total."
Total :".price($total)."euros HT
"; - $db->free(); - } else { - print $db->error(); - } } /* @@ -74,32 +44,50 @@ $db = new Db(); $tva = new Tva($db); -print_titre("Tva Réglée"); +print_titre("Réglements TVA"); -echo ''; +$sql = "SELECT amount, date_format(f.datev,'%d-%M-%Y') as dm"; +$sql .= " FROM llx_tva as f "; +$sql .= " Order BY dm DESC"; -for ($y = $year_current ; $y >= $year_start ; $y=$y-1 ) { - - echo ''; - echo '
'; - - print ""; - print "'; + print "
"; - - $sql = "SELECT amount, date_format(f.datev,'%d-%M-%Y') as dm"; - $sql .= " FROM llx_tva as f "; - $sql .= " Order BY dm DESC"; +$result = $db->query($sql); +if ($result) +{ + $num = $db->num_rows(); + $i = 0; + $total = 0 ; + print '

'; + print ''; + print ""; + print ""; + print "\n"; + print "\n"; + $var=True; + while ($i < $num) + { + $obj = $db->fetch_object( $i); + $var=!$var; + print ""; + print "\n"; + $total = $total + $obj->amount; + + print ""; + print "\n"; + print "\n"; + + $i++; + } + print ""; + print ""; - pt($db, $sql,"Date"); - - print "
DateMontant 
$obj->dm".price($obj->amount)."".$total."
Total :".price($total)."euros HT
"; - - echo '

"; + $db->free(); } - -echo '
'; - - +else +{ + print $db->error(); +} + $db->close(); diff --git a/htdocs/conf/conf.class.php3.sample b/htdocs/conf/conf.class.php3.sample index 9b5995fdea0..50a88908530 100644 --- a/htdocs/conf/conf.class.php3.sample +++ b/htdocs/conf/conf.class.php3.sample @@ -24,37 +24,40 @@ class Conf { var $readonly; var $dbi; - Function Conf() { + Function Conf() + { + /* A conserver */ + $this->db = new DbConf(); + + /* A verifier */ + + $this->theme = "dolibarr"; + + $this->css = "theme/".$this->theme."/".$this->theme.".css"; + + $this->liste_limit = 10; + + $this->societe = 1; + + $this->voyage = 0; + + $this->compta = new ComptaConf(); + $this->propal = new PropalConf(); + $this->facture = new FactureConf(); + $this->fichinter = new FicheInterConf(); + $this->webcal = new WebcalConf(); + $this->produit = new ProduitConf(); + $this->service = new ServiceConf(); + $this->adherent = new AdherentConf(); + $this->domaine = new DomaineConf(); + + $this->readonly = 0; - $this->theme = "dolibarr"; + $this->years = 2001; - $this->css = "theme/".$this->theme."/".$this->theme.".css"; + $this->password_encrypted = 1; - $this->liste_limit = 10; - - $this->db = new DbConf(); - - $this->societe = 1; - - $this->voyage = 0; - - $this->compta = new ComptaConf(); - $this->propal = new PropalConf(); - $this->facture = new FactureConf(); - $this->fichinter = new FicheInterConf(); - $this->webcal = new WebcalConf(); - $this->produit = new ProduitConf(); - $this->service = new ServiceConf(); - $this->adherent = new AdherentConf(); - $this->domaine = new DomaineConf(); - - $this->readonly = 0; - - $this->years = 2001; - - $this->password_encrypted = 1; - - } + } } class ComptaConf @@ -74,8 +77,6 @@ class PropalConf { $this->replytoname = "Service Commercial"; $this->replytomail = "commercial@propal.com"; - $this->templatesdir = "/home/www/dolibarr/dolibarr/templates/propal/default"; - $this->outputdir = "/home/www/dolibarr/dolibarr/htdocs/document/propal"; /* * Without ended slash */ @@ -84,15 +85,16 @@ class PropalConf { } /* * Base de données - * + * Ne pas modifier ces valeurs */ + class DbConf { Function DbConf() { $this->type = "mysql"; - $this->host = "localhost"; + $this->host = ""; $this->user = ""; $this->pass = ""; - $this->name = "dolibarr"; + $this->name = ""; /* * If you want to activate virtualhosting you need tou use these lines and add * this to your pache virtualhost file @@ -111,6 +113,7 @@ class DbConf { */ } + } /* * Calendrier diff --git a/htdocs/contact.php b/htdocs/contact.php index 0391767a756..9c9e9c56712 100644 --- a/htdocs/contact.php +++ b/htdocs/contact.php @@ -119,11 +119,11 @@ if ($result) print ""; - print "$obj->name"; + print ''.$obj->name.''; print "$obj->firstname"; print ' '; - print "idp\">$obj->nom\n"; + print "idp\">$obj->nom\n"; print ''.$obj->email.' '; diff --git a/htdocs/fichinter/fiche.php3 b/htdocs/fichinter/fiche.php3 index aba31f96a9e..fe18a42c67e 100644 --- a/htdocs/fichinter/fiche.php3 +++ b/htdocs/fichinter/fiche.php3 @@ -36,7 +36,7 @@ if ($user->societe_id > 0) if ($socidp) { - $sql = "SELECT s.nom, s.idp, s.prefix_comm FROM societe as s WHERE s.idp = $socidp;"; + $sql = "SELECT s.nom, s.idp, s.prefix_comm FROM llx_societe as s WHERE s.idp = $socidp;"; $result = $db->query($sql); if ($result) @@ -95,14 +95,18 @@ if ($action == 'update') } /* * - * Generation + * Generation du pdf * */ if ($action == 'generate') { if ($id) { + + print fichinter_pdf_create($db, $id); + //$DBI = "dbi:mysql:dbname=lolixdev:host=espy:user=rodo"; + /* $command = 'export LC_TIME=fr_FR ; export DBI_DSN="dbi:'.$conf->db->type.':dbname='.$conf->db->name.':host='.$conf->db->host.'"'; $command .= " ; ./tex-fichinter.pl --fichinter=".$id ; @@ -113,7 +117,7 @@ if ($action == 'generate') $output = system($command); print $output; print "

command : $command
"; - + */ } else { @@ -140,9 +144,10 @@ if ($action == 'create') { $num = $db->result(0, 0); $db->free(); - if ($num > 0) { - $numpr .= "." . ($num + 1); - } + if ($num > 0) + { + $numpr .= "." . ($num + 1); + } } $fix = new Fichinter($db); @@ -251,7 +256,6 @@ if ($action == 'create') print ''; print ''; - print "


"; } else { diff --git a/htdocs/fichinter/fichinter.class.php3 b/htdocs/fichinter/fichinter.class.php3 index 9d082a847b8..7ac81af7a71 100644 --- a/htdocs/fichinter/fichinter.class.php3 +++ b/htdocs/fichinter/fichinter.class.php3 @@ -121,8 +121,7 @@ class Fichinter { *$num = 'FI-' . $prefix_comm . '-' . substr($num, strlen($num) - 4, 4); */ $num = substr($num, 3); - $num = substr(strstr($num, "-"),1); - print $num."
"; + $num = substr(strstr($num, "-"),1); $num = $num + 1; //$num = '0000' . $num; diff --git a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php index 68fc2b9b5aa..c163237bb8f 100644 --- a/htdocs/includes/modules/fichinter/pdf_soleil.modules.php +++ b/htdocs/includes/modules/fichinter/pdf_soleil.modules.php @@ -39,7 +39,7 @@ Class pdf_soleil { if (defined("FICHEINTER_OUTPUTDIR")) { - $dir = FAC_OUTPUTDIR . "/" . $fich->ref . "/" ; + $dir = FICHEINTER_OUTPUTDIR . "/" . $fich->ref . "/" ; $file = $dir . $fich->ref . ".pdf"; if (! file_exists($dir)) @@ -91,7 +91,7 @@ Class pdf_soleil { */ $pdf->SetTextColor(0,0,0); $pdf->SetFont('Arial','B',12); - $fac->fetch_client(); + //$fac->fetch_client(); $pdf->SetXY(102,42); $pdf->MultiCell(66,5, $fac->client->nom); $pdf->SetFont('Arial','B',11); @@ -166,103 +166,13 @@ Class pdf_soleil { /* * */ - - $tab2_top = 212; - $tab2_height = 24; - $pdf->SetFont('Arial','', 12); - - $pdf->Rect(132, $tab2_top, 68, $tab2_height); - - $pdf->line(132, $tab2_top + $tab2_height - 24, 200, $tab2_top + $tab2_height - 24 ); - $pdf->line(132, $tab2_top + $tab2_height - 16, 200, $tab2_top + $tab2_height - 16 ); - $pdf->line(132, $tab2_top + $tab2_height - 8, 200, $tab2_top + $tab2_height - 8 ); - - $pdf->line(174, $tab2_top, 174, $tab2_top + $tab2_height); - - $pdf->SetXY (132, $tab2_top + 0); - $pdf->MultiCell(42, 8, "Total HT", 0, 'R', 0); - - $pdf->SetXY (132, $tab2_top + 8); - $pdf->MultiCell(42, 8, "Total TVA", 0, 'R', 0); - - $pdf->SetXY (132, $tab2_top + 16); - $pdf->MultiCell(42, 8, "Total TTC", 1, 'R', 1); - - $pdf->SetXY (174, $tab2_top + 0); - $pdf->MultiCell(26, 8, price($fac->total_ht), 0, 'R', 0); - - $pdf->SetXY (174, $tab2_top + 8); - $pdf->MultiCell(26, 8, price($fac->total_tva), 0, 'R', 0); - - $pdf->SetXY (174, $tab2_top + 16); - $pdf->MultiCell(26, 8, price($fac->total_ttc), 1, 'R', 1); - - /* - * - */ - $tab3_top = 240; - $tab3_height = 18; - $tab3_width = 60; - $pdf->Rect(10, $tab3_top, $tab3_width, $tab3_height); - - $pdf->line(10, $tab3_top + 6, $tab3_width+10, $tab3_top + 6 ); - $pdf->line(10, $tab3_top + 12, $tab3_width+10, $tab3_top + 12 ); - - $pdf->line(30, $tab3_top, 30, $tab3_top + $tab3_height ); - - $pdf->SetFont('Arial','',8); - $pdf->SetXY (10, $tab3_top - 6); - $pdf->MultiCell(60, 6, "Informations complémentaires", 0, 'L', 0); - $pdf->SetXY (10, $tab3_top ); - $pdf->MultiCell(20, 6, "Réglé le", 0, 'L', 0); - $pdf->SetXY (10, $tab3_top + 6); - $pdf->MultiCell(20, 6, "Chèque N°", 0, 'L', 0); - $pdf->SetXY (10, $tab3_top + 12); - $pdf->MultiCell(20, 6, "Banque", 0, 'L', 0); - /* - * - */ - if (defined("FACTURE_RIB_NUMBER")) - { - if (FACTURE_RIB_NUMBER > 0) - { - $account = new Account($this->db); - $account->fetch(FACTURE_RIB_NUMBER); - - $pdf->SetXY (10, 40); - $pdf->SetFont('Arial','U',8); - $pdf->MultiCell(40, 4, "Coordonnées bancaire", 0, 'L', 0); - $pdf->SetFont('Arial','',8); - $pdf->MultiCell(40, 4, "Code banque : " . $account->code_banque, 0, 'L', 0); - $pdf->MultiCell(40, 4, "Code guichet : " . $account->code_guichet, 0, 'L', 0); - $pdf->MultiCell(50, 4, "Numéro compte : " . $account->number, 0, 'L', 0); - $pdf->MultiCell(40, 4, "Clé RIB : " . $account->cle_rib, 0, 'L', 0); - $pdf->MultiCell(40, 4, "Domiciliation : " . $account->domiciliation, 0, 'L', 0); - $pdf->MultiCell(40, 4, "Prefix IBAN : " . $account->iban_prefix, 0, 'L', 0); - $pdf->MultiCell(40, 4, "BIC : " . $account->bic, 0, 'L', 0); - } + $pdf->Output($file); + } - - /* - * - * - */ - - $pdf->SetFont('Arial','U',12); - $pdf->SetXY(10, 220); - $pdf->MultiCell(190, 5, "Conditions de réglement : à réception de facture.", 0, 'J'); - - $pdf->SetFont('Arial','',9); - $pdf->SetXY(10, 265); - $pdf->MultiCell(190, 5, "Accepte le réglement des sommes dues par chèques libellés à mon nom en ma qualité de Membre d'une Association de Gestion agréée par l'Administration Fiscale.", 0, 'J'); - - $pdf->Output($file); - } } - } } ?> diff --git a/htdocs/project.class.php3 b/htdocs/project.class.php3 index d873512dd4e..f9acb7d9d96 100644 --- a/htdocs/project.class.php3 +++ b/htdocs/project.class.php3 @@ -1,5 +1,5 @@ +/* Copyright (C) 2002-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by diff --git a/htdocs/theme/yellow/yellow.css b/htdocs/theme/yellow/yellow.css index 8c3345961ee..27245792ffe 100644 --- a/htdocs/theme/yellow/yellow.css +++ b/htdocs/theme/yellow/yellow.css @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Rodolphe Quiedeville +/* Copyright (C) 2002-2003 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -43,6 +43,15 @@ td.menu border-bottom: 1px solid #000000; } +td.border +{ + border-top: 1px solid #000000; + border-right: 1px solid #000000; + border-bottom: 1px solid #000000; + border-left: 1px solid #000000; + } + + .menu { background: #ccccb3; @@ -94,7 +103,7 @@ div.titre */ tr.liste_titre { - background: #999966; + background: #BBBB88; font-family: Helvetica, Verdana; font-size: 14px; font-weight: bold; } diff --git a/htdocs/user.class.php3 b/htdocs/user.class.php3 index 9d6806a1c29..80c753357b8 100644 --- a/htdocs/user.class.php3 +++ b/htdocs/user.class.php3 @@ -202,11 +202,11 @@ class User { * * */ - Function password($password='',$password_encrypted=0) + Function password($password='', $password_encrypted = 0) { if (! $password) { - $password = substr(crypt(uniqid("")),0,8); + $password = strtolower(substr(md5(uniqid(rand())),0,6)); } if ($password_encrypted) diff --git a/htdocs/user/fiche.php3 b/htdocs/user/fiche.php3 index 88f5bad24bd..b29440d9a32 100644 --- a/htdocs/user/fiche.php3 +++ b/htdocs/user/fiche.php3 @@ -69,25 +69,34 @@ if ($_POST["action"] == 'update' && $user->admin) $edituser->email = $_POST["email"]; $edituser->admin = $_POST["admin"]; $edituser->webcal_login = $_POST["webcal_login"]; - if (isset($_POST["module_compta"]) && $_POST["module_compta"] ==1){ - $edituser->compta = 1; - }else{ - $edituser->compta = 0; - } - if (isset($_POST["module_comm"]) && $_POST["module_comm"] ==1){ - $edituser->comm = 1; - }else{ - $edituser->comm = 0; - } + + if (isset($_POST["module_compta"]) && $_POST["module_compta"] ==1) + { + $edituser->compta = 1; + } + else + { + $edituser->compta = 0; + } + + if (isset($_POST["module_comm"]) && $_POST["module_comm"] ==1) + { + $edituser->comm = 1; + } + else + { + $edituser->comm = 0; + } // if (! $edituser->update($id, $user)) if (! $edituser->update()) { print $edituser->error(); } - if (isset($password) && $password !='' ){ - $edituser->password($password,$conf->password_encrypted); - } + if (isset($password) && $password !='' ) + { + $edituser->password($password,$conf->password_encrypted); + } } if ($action == 'password' && $user->admin) @@ -97,7 +106,7 @@ if ($action == 'password' && $user->admin) if ($edituser->password('',$conf->password_encrypted)) { - print "Mot de passe changé et envoyé à $edituser->email

"; + $message = "Mot de passe changé et envoyé à $edituser->email"; } } @@ -171,7 +180,7 @@ else $fuser = new User($db, $id); $fuser->fetch(); - print '

Fiche utilisateur

'; + print '
Fiche utilisateur
'.$message.'
'; print ''; @@ -195,6 +204,11 @@ else print ''; print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; @@ -213,7 +227,7 @@ else print ''; - if ($user->id == $id) + if ($user->id == $id or $user->admin) { print ''; }
Module Commercial'.$yn[$fuser->comm].'
Id Société'.$fuser->societe_id.'   
Note'.nl2br($fuser->note).' 
-[Nouveau mot de passe]