diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index b8c47a2c848..beef0b153c8 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -155,7 +155,7 @@ $nav.="global->MAIN_MOTD)) { print "\n\n"; print '
'; - print dol_htmlentitiesbr($conf->global->MAIN_MOTD); - print '

'; - print "\n\n"; + print dol_htmlentitiesbr($conf->global->MAIN_MOTD); + print '
'; + print "\n\n"; } } @@ -81,10 +81,10 @@ print ''; if (file_exists(DOL_DOCUMENT_ROOT.'/logo.png')) { - print ''; - print ''; - print "
'; - print '

\n"; + print ''; + print ''; + print "
'; + print '

\n"; } @@ -110,41 +110,41 @@ $langs->load("commercial"); $langs->load("bills"); if ($user->societe_id == 0) { - print '
'; - print ''; - print ''; - print ''; - print ''; - print ''; - - $var=true; - - // Condition à vérifier pour affichage de chaque ligne du tableau de bord - $conditions=array($conf->societe->enabled && $user->rights->societe->lire, - $conf->societe->enabled && $user->rights->societe->lire, - $conf->fournisseur->enabled && $user->rights->fournisseur->lire, - $conf->adherent->enabled && $user->rights->adherent->lire, - $conf->produit->enabled && $user->rights->produit->lire, - $conf->service->enabled && $user->rights->produit->lire, - $conf->propal->enabled && $user->rights->propale->lire, - $conf->commande->enabled && $user->rights->commande->lire, - $conf->facture->enabled && $user->rights->facture->lire, - $conf->telephonie->enabled && $user->rights->telephonie->lire, - $conf->societe->enabled && $user->rights->contrat->activer); - // Fichier des classes qui contiennent la methode load_state_board pour chaque ligne - $includes=array(DOL_DOCUMENT_ROOT."/client.class.php", - DOL_DOCUMENT_ROOT."/prospect.class.php", - DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php", - DOL_DOCUMENT_ROOT."/adherents/adherent.class.php", - DOL_DOCUMENT_ROOT."/product.class.php", - DOL_DOCUMENT_ROOT."/service.class.php", - DOL_DOCUMENT_ROOT."/propal.class.php", - DOL_DOCUMENT_ROOT."/commande/commande.class.php", - DOL_DOCUMENT_ROOT."/facture.class.php", - DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php", - DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); - // Nom des classes qui contiennent la methode load_state_board pour chaque ligne - $classes=array('Client', + print '
'; + print '
'.$langs->trans("DolibarrStateBoard").' 
'; + print ''; + print ''; + print ''; + print ''; + + $var=true; + + // Condition à vérifier pour affichage de chaque ligne du tableau de bord + $conditions=array($conf->societe->enabled && $user->rights->societe->lire, + $conf->societe->enabled && $user->rights->societe->lire, + $conf->fournisseur->enabled && $user->rights->fournisseur->lire, + $conf->adherent->enabled && $user->rights->adherent->lire, + $conf->produit->enabled && $user->rights->produit->lire, + $conf->service->enabled && $user->rights->produit->lire, + $conf->propal->enabled && $user->rights->propale->lire, + $conf->commande->enabled && $user->rights->commande->lire, + $conf->facture->enabled && $user->rights->facture->lire, + $conf->telephonie->enabled && $user->rights->telephonie->lire, + $conf->societe->enabled && $user->rights->contrat->activer); + // Fichier des classes qui contiennent la methode load_state_board pour chaque ligne + $includes=array(DOL_DOCUMENT_ROOT."/client.class.php", + DOL_DOCUMENT_ROOT."/prospect.class.php", + DOL_DOCUMENT_ROOT."/fourn/fournisseur.class.php", + DOL_DOCUMENT_ROOT."/adherents/adherent.class.php", + DOL_DOCUMENT_ROOT."/product.class.php", + DOL_DOCUMENT_ROOT."/service.class.php", + DOL_DOCUMENT_ROOT."/propal.class.php", + DOL_DOCUMENT_ROOT."/commande/commande.class.php", + DOL_DOCUMENT_ROOT."/facture.class.php", + DOL_DOCUMENT_ROOT."/telephonie/lignetel.class.php", + DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); + // Nom des classes qui contiennent la methode load_state_board pour chaque ligne + $classes=array('Client', 'Prospect', 'Fournisseur', 'Adherent', @@ -155,8 +155,8 @@ if ($user->societe_id == 0) 'Facture', 'LigneTel', 'Contrat'); - // Clé de tableau retourné par la methode load_state_board pour chaque ligne - $keys=array('customers', + // Clé de tableau retourné par la methode load_state_board pour chaque ligne + $keys=array('customers', 'prospects', 'suppliers', 'members', @@ -167,8 +167,8 @@ if ($user->societe_id == 0) 'invoices', 'sign', 'Contracts'); - // Icon des lignes du tableau de bord - $icons=array('company', + // Icon des lignes du tableau de bord + $icons=array('company', 'company', 'company', 'user', @@ -179,8 +179,8 @@ if ($user->societe_id == 0) 'bill', 'phoning', 'order'); - // Translation keyword - $titres=array("Customers", + // Translation keyword + $titres=array("Customers", "Prospects", "Suppliers", "Members", @@ -191,20 +191,20 @@ if ($user->societe_id == 0) "BillsCustomers", "Lignes de telephonie suivis", "Contracts"); - // Lien des lignes du tableau de bord - $links=array(DOL_URL_ROOT.'/comm/clients.php', - DOL_URL_ROOT.'/comm/prospect/prospects.php', - DOL_URL_ROOT.'/fourn/index.php', - DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', - DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', - DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', - DOL_URL_ROOT.'/comm/propal.php?mainmenu=commercial', - DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial', - DOL_URL_ROOT.'/compta/facture.php?mainmenu=accountancy', - DOL_URL_ROOT.'/telephonie/ligne/index.php', - DOL_URL_ROOT.'/contrat/liste.php'); - // Translation lang files - $langfile=array("bills", + // Lien des lignes du tableau de bord + $links=array(DOL_URL_ROOT.'/comm/clients.php', + DOL_URL_ROOT.'/comm/prospect/prospects.php', + DOL_URL_ROOT.'/fourn/index.php', + DOL_URL_ROOT.'/adherents/liste.php?statut=1&mainmenu=members', + DOL_URL_ROOT.'/product/liste.php?type=0&mainmenu=products', + DOL_URL_ROOT.'/product/liste.php?type=1&mainmenu=products', + DOL_URL_ROOT.'/comm/propal.php?mainmenu=commercial', + DOL_URL_ROOT.'/commande/liste.php?mainmenu=commercial', + DOL_URL_ROOT.'/compta/facture.php?mainmenu=accountancy', + DOL_URL_ROOT.'/telephonie/ligne/index.php', + DOL_URL_ROOT.'/contrat/liste.php'); + // Translation lang files + $langfile=array("bills", "prospects", "suppliers", "members", @@ -215,39 +215,39 @@ if ($user->societe_id == 0) "bills", "", "Contracts"); - + //print memory_get_usage()."
"; // Boucle et affiche chaque ligne du tableau - foreach ($keys as $key=>$val) - { - if ($conditions[$key]) - { - $classe=$classes[$key]; - // Cherche dans cache si le load_state_board deja réalisé - if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe])) - { - include_once($includes[$key]); + foreach ($keys as $key=>$val) + { + if ($conditions[$key]) + { + $classe=$classes[$key]; + // Cherche dans cache si le load_state_board deja réalisé + if (! isset($boardloaded[$classe]) || ! is_object($boardloaded[$classe])) + { + include_once($includes[$key]); - $board=new $classe($db); - $board->load_state_board($user); - $boardloaded[$classe]=$board; - } - else $board=$boardloaded[$classe]; + $board=new $classe($db); + $board->load_state_board($user); + $boardloaded[$classe]=$board; + } + else $board=$boardloaded[$classe]; - $var=!$var; - if ($langfile[$key]) $langs->load($langfile[$key]); - $title=$langs->trans($titres[$key]); - print ''; - print ''; - print ''; - print ''; + $var=!$var; + if ($langfile[$key]) $langs->load($langfile[$key]); + $title=$langs->trans($titres[$key]); + print ''; + print ''; + print ''; + print ''; //print $includes[$key].' '.memory_get_usage()."
"; - } - } + } + } - print '
'.$langs->trans("DolibarrStateBoard").' 
'.img_object($title,$icons[$key]).''.$title.''.$board->nb[$val].'
'.img_object($title,$icons[$key]).''.$title.''.$board->nb[$val].'
'; + print ''; } print ''; @@ -275,284 +275,284 @@ $var=true; // Nbre actions à faire (en retard) if ($conf->agenda->enabled && $user->rights->agenda->myactions->read) { - include_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); - $board=new ActionComm($db); - $board->load_board($user); - $board->warning_delay=$conf->actions->warning_delay/60/60/24; - $board->label=$langs->trans("ActionsToDo"); + include_once(DOL_DOCUMENT_ROOT."/actioncomm.class.php"); + $board=new ActionComm($db); + $board->load_board($user); + $board->warning_delay=$conf->actions->warning_delay/60/60/24; + $board->label=$langs->trans("ActionsToDo"); - $var=!$var; - print ''.img_object($langs->trans("Actions"),"task").''.$board->label.''; - print '
'.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Actions"),"task").''.$board->label.''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre commandes clients à traiter if ($conf->commande->enabled && $user->rights->commande->lire) { - include_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); - $board=new Commande($db); - $board->load_board($user); + include_once(DOL_DOCUMENT_ROOT."/commande/commande.class.php"); + $board=new Commande($db); + $board->load_board($user); - $var=!$var; - print ''.img_object($langs->trans("Orders"),"order").''.$langs->trans("OrdersToProcess").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->commande->traitement->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Orders"),"order").''.$langs->trans("OrdersToProcess").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->commande->traitement->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre propales ouvertes (expirées) if ($conf->propal->enabled && $user->rights->propale->lire) { - $langs->load("propal"); - - include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); - $board=new Propal($db); - $board->load_board($user,"opened"); + $langs->load("propal"); - $var=!$var; - print ''.img_object($langs->trans("Propals"),"propal").''.$langs->trans("PropalsToClose").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->propal->cloture->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; + include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); + $board=new Propal($db); + $board->load_board($user,"opened"); + + $var=!$var; + print ''.img_object($langs->trans("Propals"),"propal").''.$langs->trans("PropalsToClose").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->propal->cloture->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; } // Nbre propales fermées signées (à facturer) if ($conf->propal->enabled && $user->rights->propale->lire) { - $langs->load("propal"); + $langs->load("propal"); - include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); - $board=new Propal($db); - $board->load_board($user,"signed"); + include_once(DOL_DOCUMENT_ROOT."/propal.class.php"); + $board=new Propal($db); + $board->load_board($user,"signed"); - $var=!$var; - print ''.img_object($langs->trans("Propals"),"propal").''.$langs->trans("PropalsToBill").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->propal->facturation->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Propals"),"propal").''.$langs->trans("PropalsToBill").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->propal->facturation->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre services à activer (en retard) if ($conf->contrat->enabled && $user->rights->contrat->lire) { - $langs->load("contracts"); + $langs->load("contracts"); - include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); - $board=new Contrat($db); - $board->load_board($user,"inactives"); + include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); + $board=new Contrat($db); + $board->load_board($user,"inactives"); - $var=!$var; - print ''.img_object($langs->trans("Contract"),"contract").''.$langs->trans("BoardNotActivatedServices").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->contrat->services->inactifs->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Contract"),"contract").''.$langs->trans("BoardNotActivatedServices").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->contrat->services->inactifs->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre services actifs (à renouveler) if ($conf->contrat->enabled && $user->rights->contrat->lire) { - $langs->load("contracts"); + $langs->load("contracts"); - include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); - $board=new Contrat($db); - $board->load_board($user,"expired"); + include_once(DOL_DOCUMENT_ROOT."/contrat/contrat.class.php"); + $board=new Contrat($db); + $board->load_board($user,"expired"); - $var=!$var; - print ''.img_object($langs->trans("Contract"),"contract").''.$langs->trans("BoardRunningServices").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->contrat->services->expires->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Contract"),"contract").''.$langs->trans("BoardRunningServices").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->contrat->services->expires->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre factures fournisseurs (à payer) if ($conf->fournisseur->enabled && $conf->facture->enabled && $user->rights->facture->lire) { - $langs->load("bills"); + $langs->load("bills"); - include_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"); - $board=new FactureFournisseur($db); - $board->load_board($user); + include_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.facture.class.php"); + $board=new FactureFournisseur($db); + $board->load_board($user); - $var=!$var; - print ''.img_object($langs->trans("Bills"),"bill").''.$langs->trans("SupplierBillsToPay").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->facture->fournisseur->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Bills"),"bill").''.$langs->trans("SupplierBillsToPay").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->facture->fournisseur->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre factures clients (à payer) if ($conf->facture->enabled && $user->rights->facture->lire) { - $langs->load("bills"); - - include_once(DOL_DOCUMENT_ROOT."/facture.class.php"); - $board=new Facture($db); - $board->load_board($user); + $langs->load("bills"); - $var=!$var; - print ''.img_object($langs->trans("Bills"),"bill").''.$langs->trans("CustomerBillsUnpayed").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->facture->client->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + include_once(DOL_DOCUMENT_ROOT."/facture.class.php"); + $board=new Facture($db); + $board->load_board($user); + + $var=!$var; + print ''.img_object($langs->trans("Bills"),"bill").''.$langs->trans("CustomerBillsUnpayed").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->facture->client->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre ecritures à rapprocher if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id) { - $langs->load("banks"); + $langs->load("banks"); - include_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); - $board=new Account($db); - $board->load_board($user); + include_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php"); + $board=new Account($db); + $board->load_board($user); - $var=!$var; - print ''.img_object($langs->trans("TransactionsToConciliate"),"payment").''.$langs->trans("TransactionsToConciliate").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->bank->rappro->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("TransactionsToConciliate"),"payment").''.$langs->trans("TransactionsToConciliate").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->bank->rappro->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } - // Nbre ecritures à rapprocher +// Nbre ecritures à rapprocher if ($conf->banque->enabled && $user->rights->banque->lire && ! $user->societe_id) { - $langs->load("banks"); + $langs->load("banks"); - include_once(DOL_DOCUMENT_ROOT."/compta/paiement/cheque/remisecheque.class.php"); - $board=new RemiseCheque($db); - $board->load_board($user); + include_once(DOL_DOCUMENT_ROOT."/compta/paiement/cheque/remisecheque.class.php"); + $board=new RemiseCheque($db); + $board->load_board($user); - $var=!$var; - print ''.img_object($langs->trans("BankChecksToReceipt"),"payment").''.$langs->trans("BankChecksToReceipt").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->bank->cheque->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("BankChecksToReceipt"),"payment").''.$langs->trans("BankChecksToReceipt").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->bank->cheque->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } // Nbre adhérent valides (attente cotisation) if ($conf->adherent->enabled && $user->rights->adherent->lire && ! $user->societe_id) { - $langs->load("members"); + $langs->load("members"); - include_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); - $board=new Adherent($db); - $board->load_board($user); + include_once(DOL_DOCUMENT_ROOT."/adherents/adherent.class.php"); + $board=new Adherent($db); + $board->load_board($user); - $var=!$var; - print ''.img_object($langs->trans("Members"),"user").''.$langs->trans("Members").''; - print ''.$board->nbtodo.''; - print ''; - print ''; - print $board->nbtodolate; - print ''; - print ' (>'.ceil($conf->adherent->cotisation->warning_delay/60/60/24).' '.$langs->trans("days").')'; - print ''; - print ''; - if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } - else print ' '; - print ''; - print ''; -print "\n"; + $var=!$var; + print ''.img_object($langs->trans("Members"),"user").''.$langs->trans("Members").''; + print ''.$board->nbtodo.''; + print ''; + print ''; + print $board->nbtodolate; + print ''; + print ' (>'.ceil($conf->adherent->cotisation->warning_delay/60/60/24).' '.$langs->trans("days").')'; + print ''; + print ''; + if ($board->nbtodolate > 0) { print img_picto($langs->trans("NActionsLate",$board->nbtodolate),"warning"); $nboflate+=$board->nbtodolate; } + else print ' '; + print ''; + print ''; + print "\n"; } print ''; @@ -562,7 +562,7 @@ if ($nboflate > 0) print '
'.img_picto($langs->trans("Alert"),'warning').' '.$langs->trans("WarningYouHaveAtLeastOneTaskLate").'
'; } -print ''; +print ''; /* @@ -576,15 +576,15 @@ $boxid_right = array(); if (sizeof($boxarray)) { print '
'; - print_fiche_titre($langs->trans("OtherInformationsBoxes")); + print_fiche_titre($langs->trans("OtherInformationsBoxes"),'',''); print ''; print '
'."\n"; - + // Affichage colonne gauche print "\n\n"; print ''; print "\n"; - print "\n"; - + print "\n"; + // Affichage colonne droite print "\n\n"; print '
'."\n"; print '
'."\n"; - + $ii=0; foreach ($boxarray as $key => $box) { @@ -593,8 +593,8 @@ if (sizeof($boxarray)) { $ii++; //print 'box_id '.$boxarray[$ii]->box_id.' '; - //print 'box_order '.$boxarray[$ii]->box_order.'
'; - $boxid_left[$key] = $boxarray[$key]->box_id; + //print 'box_order '.$boxarray[$ii]->box_order.'
'; + $boxid_left[$key] = $boxarray[$key]->box_id; // Affichage boite key $box->loadBox($conf->box_max_lines); $box->showBox(); @@ -609,18 +609,18 @@ if (sizeof($boxarray)) $box->info_box_contents=array(); $box->showBox(); } - + print "
\n"; print '
'; // print '
\n"; print "\n"; @@ -680,7 +680,7 @@ if ($conf->use_javascript_ajax) print "handle: 'boxhandle',"."\n"; print 'onUpdate:updateOrder'; print "});\n"; - + print 'Sortable.create(\'right\', {'."\n"; print 'tag:\'div\', '."\n"; print 'containment:["right","left"], '."\n"; @@ -688,7 +688,7 @@ if ($conf->use_javascript_ajax) print "handle: 'boxhandle',"."\n"; print 'onUpdate:updateOrder'; print "});\n"; - + print '// ]]>'."\n"; print ''."\n"; } diff --git a/htdocs/lib/functions.lib.php b/htdocs/lib/functions.lib.php index d2d7900ba27..ef018e8d6a8 100644 --- a/htdocs/lib/functions.lib.php +++ b/htdocs/lib/functions.lib.php @@ -1706,15 +1706,15 @@ function dol_move_uploaded_file($src_file, $dest_file, $allowoverwrite) /** - \brief Show title line of an array - \param name libelle champ - \param file url pour clic sur tri - \param field champ de tri - \param begin ("" par defaut) - \param options ("" par defaut) - \param td options de l'attribut td ("" par defaut) - \param sortfield nom du champ sur lequel est effectu� le tri du tableau - \param sortorder ordre du tri + * \brief Show title line of an array + * \param name libelle champ + * \param file url pour clic sur tri + * \param field champ de tri + * \param begin ("" par defaut) + * \param options ("" par defaut) + * \param td options de l'attribut td ("" par defaut) + * \param sortfield nom du champ sur lequel est effectu� le tri du tableau + * \param sortorder ordre du tri */ function print_liste_field_titre($name, $file, $field, $begin="", $options="", $td="", $sortfield="", $sortorder="") { @@ -1767,8 +1767,8 @@ function print_liste_field_titre($name, $file, $field, $begin="", $options="", $ } /** - \brief Affichage d'un titre - \param titre Le titre a afficher + * \brief Affichage d'un titre + * \param titre Le titre a afficher */ function print_titre($titre) { @@ -1776,31 +1776,157 @@ function print_titre($titre) } /** - \brief Affichage d'un titre d'une fiche, align� a gauche - \param titre Le titre a afficher - \param mesg Message supl�mentaire a afficher a droite - \param picto Picto pour ligne de titre - \param pictoisfullpath 1=Picto is a full absolute url of image + * \brief Affichage d'un titre d'une fiche, align� a gauche + * \param titre Le titre a afficher + * \param mesg Message suplementaire a afficher a droite + * \param picto Icon to use before title (should be a 32x32 transparent png file) + * \param pictoisfullpath 1=Icon name is a full absolute url of image */ -function print_fiche_titre($titre, $mesg='', $picto='', $pictoisfullpath=0) +function print_fiche_titre($titre, $mesg='', $picto='title.gif', $pictoisfullpath=0) { print "\n"; - print ''; - if ($picto) print ''; - print '
'.img_picto('',$picto, '', $pictoisfullpath).''; - print '
'.$titre.'
'; + print ''; + if ($picto && $titre) print ''; + print ''; if (strlen($mesg)) { - print ''; + print ''; } print '
'.img_picto('',$picto, '', $pictoisfullpath).''; + print '
'.$titre.'
'; print '
'.$mesg.''.$mesg.'
'."\n"; } /** - \brief Effacement d'un fichier - \param file Fichier a effacer ou masque de fichier a effacer - \param boolean true if file deleted, false if error + * \brief Print a title with navigation controls for pagination + * \param titre Title to show (required) + * \param page Numero of page (required) + * \param file Url of page (required) + * \param options parametres complementaires lien ('' par defaut) + * \param sortfield champ de tri ('' par defaut) + * \param sortorder ordre de tri ('' par defaut) + * \param center chaine du centre ('' par defaut) + * \param num number of records found by select with limit+1 + * \param totalnboflines Total number of records/lines for all pages (if known) + * \param picto Icon to use before title (should be a 32x32 transparent png file) + * \param pictoisfullpath 1=Icon name is a full absolute url of image + */ +function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines=0, $picto='title.gif', $pictoisfullpath=0) +{ + global $conf,$langs; + + if ($num > $conf->liste_limit or $num == -1) + { + $nextpage = 1; + } + else + { + $nextpage = 0; + } + + print ''; + + $pagelist = ''; + + // Left + if ($page > 0 || $num > $conf->liste_limit) + { + if ($totalnboflines) + { + if ($picto && $titre) print ''; + print ''; + + $maxnbofpage=10; + + $nbpages=ceil($totalnboflines/$conf->liste_limit); + $cpt=($page-$maxnbofpage); + if ($cpt < 0) { $cpt=0; } + $pagelist.=$langs->trans('Page'); + if ($cpt>=1) + { + $pagelist.=' 1'; + if ($cpt >= 2) $pagelist.=' ...'; + } + do + { + if($cpt==$page) + { + $pagelist.= ' '.($page+1).''; + } + else + { + $pagelist.= ' '.($cpt+1).''; + } + $cpt++; + } + while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage); + if ($cpt<$nbpages) + { + if ($cpt<$nbpages-1) $pagelist.= ' ...'; + $pagelist.= ' '.$nbpages.''; + } + } + else + { + if ($picto && $titre) print ''; + print ''; + } + } + else + { + if ($picto && $titre) print ''; + print ''; + } + + // Center + if ($center) + { + print ''; + } + + // Right + print ''; + + print '
'.img_picto('',$picto, '', $pictoisfullpath).''; + print '
'.$titre.'
'; + print '
'.img_picto('',$picto, '', $pictoisfullpath).''; + print '
'.$titre.'
'; + $pagelist.= $langs->trans('Page').' '.($page+1); + print '
'.img_picto('',$picto, '', $pictoisfullpath).'
'.$titre.'
'.$center.''; + if ($sortfield) $options .= "&sortfield=".$sortfield; + if ($sortorder) $options .= "&sortorder=".$sortorder; + // Affichage des fleches de navigation + print_fleche_navigation($page,$file,$options,$nextpage,$pagelist); + print '
'; +} + +/** + * \brief Fonction servant a afficher les fleches de navigation dans les pages de listes + * \param page Numero of page + * \param file Lien + * \param options Autres parametres d'url a propager dans les liens ("" par defaut) + * \param nextpage Faut-il une page suivante + * \param betweenarraows HTML Content to show between arrows + */ +function print_fleche_navigation($page,$file,$options='',$nextpage,$betweenarrows='') +{ + global $conf, $langs; + if ($page > 0) + { + print ''.img_previous($langs->trans("Previous")).''; + } + if ($betweenarrows) print ($page > 0?' ':'').$betweenarrows.($nextpage>0?' ':''); + if ($nextpage > 0) + { + print ''.img_next($langs->trans("Next")).''; + } +} + + +/** + * \brief Effacement d'un fichier + * \param file Fichier a effacer ou masque de fichier a effacer + * \param boolean true if file deleted, false if error */ function dol_delete_file($file) { @@ -1884,124 +2010,6 @@ function dol_avscan_file($file) return $malware; } -/** - \brief Fonction print_barre_liste - \param titre Titre de la page - \param page numero de la page - \param file lien - \param options parametres complementaires lien ('' par defaut) - \param sortfield champ de tri ('' par defaut) - \param sortorder ordre de tri ('' par defaut) - \param center chaine du centre ('' par defaut) - \param num number of records found by select with limit+1 - \param totalnboflines Total number of records/lines for all pages (if known) - */ -function print_barre_liste($titre, $page, $file, $options='', $sortfield='', $sortorder='', $center='', $num=-1, $totalnboflines=0) -{ - global $conf,$langs; - - if ($num > $conf->liste_limit or $num == -1) - { - $nextpage = 1; - } - else - { - $nextpage = 0; - } - - print ''; - - $pagelist = ''; - - if ($page > 0 || $num > $conf->liste_limit) - { - if ($totalnboflines) - { - print ''; - - $maxnbofpage=10; - - $nbpages=ceil($totalnboflines/$conf->liste_limit); - $cpt=($page-$maxnbofpage); - if ($cpt < 0) { $cpt=0; } - $pagelist.=$langs->trans('Page'); - if ($cpt>=1) - { - $pagelist.=' 1'; - if ($cpt >= 2) $pagelist.=' ...'; - } - do - { - if($cpt==$page) - { - $pagelist.= ' '.($page+1).''; - } - else - { - $pagelist.= ' '.($cpt+1).''; - } - $cpt++; - } - while ($cpt < $nbpages && $cpt<=$page+$maxnbofpage); - if ($cpt<$nbpages) - { - if ($cpt<$nbpages-1) $pagelist.= ' ...'; - $pagelist.= ' '.$nbpages.''; - } - } - else - { - print ''; - } - } - else - { - print ''; - } - - if ($center) - { - print ''; - } - - print '
'; - print '
'.$titre.'
'; - print '
'; - print '
'.$titre.'
'; - $pagelist.= $langs->trans('Page').' '.($page+1); - print '
'.$titre.'
'.$center.''; - - if ($sortfield) $options .= "&sortfield=".$sortfield; - if ($sortorder) $options .= "&sortorder=".$sortorder; - - // Affichage des fleches de navigation - print_fleche_navigation($page,$file,$options,$nextpage,$pagelist); - - print '
'; -} - -/** - \brief Fonction servant a afficher les fleches de navigation dans les pages de listes - \param page Num�ro de la page - \param file Lien - \param options Autres parametres d'url a propager dans les liens ("" par defaut) - \param nextpage Faut-il une page suivante - \param betweenarraows HTML Content to show between arrows - */ -function print_fleche_navigation($page,$file,$options='',$nextpage,$betweenarrows='') -{ - global $conf, $langs; - if ($page > 0) - { - print ''.img_previous($langs->trans("Previous")).''; - } - if ($betweenarrows) print ($page > 0?' ':'').$betweenarrows.($nextpage>0?' ':''); - if ($nextpage > 0) - { - print ''.img_next($langs->trans("Next")).''; - } -} - /** * \brief Fonction qui retourne un taux de tva format� pour visualisation diff --git a/htdocs/theme/auguria/auguria.css.php b/htdocs/theme/auguria/auguria.css.php index 236bdf7660e..c830424c54a 100644 --- a/htdocs/theme/auguria/auguria.css.php +++ b/htdocs/theme/auguria/auguria.css.php @@ -18,10 +18,10 @@ */ /** - \file htdocs/theme/auguria/auguria.css.php - \brief Fichier de style CSS du theme Auguria - \version $Id$ -*/ + * \file htdocs/theme/auguria/auguria.css.php + * \brief Fichier de style CSS du theme Auguria + * \version $Id$ + */ require("../../conf/conf.php"); @@ -152,7 +152,7 @@ div.tmenu background-image : url() ; height: 22px; } -div.tmenu .tmenudisabled +a.tmenudisabled { color: #9FCED9; font-size: 12px; @@ -162,6 +162,26 @@ div.tmenu .tmenudisabled cursor: not-allowed; font-weight: normal; } +a.tmenudisabled:link +{ + color: #9FCED9; + font-weight: normal; +} +a.tmenudisabled:visited +{ + color: #9FCED9; + font-weight: normal; +} +a.tmenudisabled:hover +{ + color: #9FCED9; + font-weight: normal; +} +a.tmenudisabled:active +{ + color: #9FCED9; + font-weight: normal; +} table.tmenu { diff --git a/htdocs/theme/auguria/img/title.gif b/htdocs/theme/auguria/img/title.gif new file mode 100644 index 00000000000..f7b6917596f Binary files /dev/null and b/htdocs/theme/auguria/img/title.gif differ diff --git a/htdocs/theme/bluelagoon/img/title.gif b/htdocs/theme/bluelagoon/img/title.gif new file mode 100644 index 00000000000..52d910c1b9b Binary files /dev/null and b/htdocs/theme/bluelagoon/img/title.gif differ diff --git a/htdocs/theme/dev/dev.css b/htdocs/theme/dev/dev.css index 8868b6bf2c3..b7984c5fab2 100644 --- a/htdocs/theme/dev/dev.css +++ b/htdocs/theme/dev/dev.css @@ -39,7 +39,7 @@ body a { text-decoration: none; - } +} div.tmenu { @@ -58,6 +58,33 @@ div.tmenu height: 20px; } +a.tmenudisabled +{ + color: #757575; + font-weight: normal; + cursor: not-allowed; +} +a.tmenudisabled:link +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:visited +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:hover +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:active +{ + color: #757575; + font-weight: normal; +} + table.tmenu { padding: 0px 0px 0px 0px; diff --git a/htdocs/theme/dev/img/title.gif b/htdocs/theme/dev/img/title.gif new file mode 100644 index 00000000000..52d910c1b9b Binary files /dev/null and b/htdocs/theme/dev/img/title.gif differ diff --git a/htdocs/theme/eldy/eldy.css.php b/htdocs/theme/eldy/eldy.css.php index fe584ea7dcd..cd40a72bf7d 100644 --- a/htdocs/theme/eldy/eldy.css.php +++ b/htdocs/theme/eldy/eldy.css.php @@ -177,7 +177,8 @@ div.tmenu color: #000000; text-decoration: none; } -div.tmenu .tmenudisabled + +a.tmenudisabled { color: #757575; font-size: 12px; @@ -187,6 +188,26 @@ div.tmenu .tmenudisabled cursor: not-allowed; font-weight: normal; } +a.tmenudisabled:link +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:visited +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:hover +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:active +{ + color: #757575; + font-weight: normal; +} table.tmenu { diff --git a/htdocs/theme/eldy/img/title.gif b/htdocs/theme/eldy/img/title.gif new file mode 100644 index 00000000000..c1afa93ae4c Binary files /dev/null and b/htdocs/theme/eldy/img/title.gif differ diff --git a/htdocs/theme/eldy/img/title.png b/htdocs/theme/eldy/img/title.png new file mode 100644 index 00000000000..bcd70489c80 Binary files /dev/null and b/htdocs/theme/eldy/img/title.png differ diff --git a/htdocs/theme/freelug/freelug.css.php b/htdocs/theme/freelug/freelug.css.php index 8152ba84e1d..65443439b30 100644 --- a/htdocs/theme/freelug/freelug.css.php +++ b/htdocs/theme/freelug/freelug.css.php @@ -173,7 +173,8 @@ div.tmenu color: #000000; text-decoration: none; } -div.tmenu .tmenudisabled + +a.tmenudisabled { color: #757575; font-size: 12px; @@ -181,6 +182,26 @@ div.tmenu .tmenudisabled margin: 0px 0px 6px 0px; cursor: not-allowed; } +a.tmenudisabled:link +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:visited +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:hover +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:active +{ + color: #757575; + font-weight: normal; +} table.tmenu { diff --git a/htdocs/theme/freelug/img/title.gif b/htdocs/theme/freelug/img/title.gif new file mode 100644 index 00000000000..c1afa93ae4c Binary files /dev/null and b/htdocs/theme/freelug/img/title.gif differ diff --git a/htdocs/theme/freelug/img/title.png b/htdocs/theme/freelug/img/title.png new file mode 100644 index 00000000000..3e200f5e97e Binary files /dev/null and b/htdocs/theme/freelug/img/title.png differ diff --git a/htdocs/theme/yellow/img/title.gif b/htdocs/theme/yellow/img/title.gif new file mode 100644 index 00000000000..575bc31ef29 Binary files /dev/null and b/htdocs/theme/yellow/img/title.gif differ diff --git a/htdocs/theme/yellow/img/title.png b/htdocs/theme/yellow/img/title.png new file mode 100644 index 00000000000..1cae98c7440 Binary files /dev/null and b/htdocs/theme/yellow/img/title.png differ diff --git a/htdocs/theme/yellow/yellow.css.php b/htdocs/theme/yellow/yellow.css.php index 79e7e1169d4..221a8b0da4e 100644 --- a/htdocs/theme/yellow/yellow.css.php +++ b/htdocs/theme/yellow/yellow.css.php @@ -18,10 +18,10 @@ */ /** - \file htdocs/theme/yellow/yellow.css - \brief Fichier de style CSS du theme Yellow - \version $Id$ -*/ + * \file htdocs/theme/yellow/yellow.css + * \brief Fichier de style CSS du theme Yellow + * \version $Id$ + */ require("../../conf/conf.php"); @@ -160,13 +160,33 @@ div.tmenu color: #000000; text-decoration: none; } -div.tmenu .tmenudisabled +a.tmenudisabled { color: #757575; font-size: 12px; padding: 0px 5px; cursor: not-allowed; } +a.tmenudisabled:link +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:visited +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:hover +{ + color: #757575; + font-weight: normal; +} +a.tmenudisabled:active +{ + color: #757575; + font-weight: normal; +} table.tmenu {