';
+ print '';
+ print '
';
print '';
print '| '.$langs->trans("TableName").' | ';
print 'Nb of tuples | ';
@@ -173,12 +176,14 @@ else
}
}
print '
';
+ print '
';
}
if ($base == 4)
{
// Sqlite by PDO or by Sqlite3
- print '';
+ print '';
+ print '
';
print '';
print '| '.$langs->trans("TableName").' | ';
print ''.$langs->trans("NbOfRecord").' | ';
@@ -207,6 +212,8 @@ else
}
}
+ print '
';
+ print '
';
}
}
diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php
index ff7a16d1893..c50e6ca9e4c 100644
--- a/htdocs/admin/system/database.php
+++ b/htdocs/admin/system/database.php
@@ -42,6 +42,7 @@ llxHeader();
print load_fiche_titre($langs->trans("InfoDatabase"),'','title_setup');
// Database
+print '';
print '
';
print '| '.$langs->trans("Database").' |
'."\n";
print '| '.$langs->trans("Version").' | '.$db::LABEL.' '.$db->getVersion().' |
'."\n";
@@ -54,14 +55,16 @@ print '| '.$langs->trans("Password").' | '.pr
print ' |
| '.$langs->trans("DBStoringCharset").' | '.$db->getDefaultCharacterSetDatabase().' |
'."\n";
print '| '.$langs->trans("DBSortingCharset").' | '.$db->getDefaultCollationDatabase().' |
'."\n";
print '
';
+print '
';
// Tables
print '
';
+print '';
$listofvars=$db->getServerParametersValues();
$listofstatus=$db->getServerStatusValues();
@@ -76,6 +79,7 @@ else
foreach($arraylist as $listname)
{
print '
';
+ print '';
print '
';
print '';
print '| '.$langs->trans("Parameters").' | ';
@@ -120,6 +124,7 @@ else
print '
'."\n";
}
print '
'."\n";
+ print '
';
}
}
diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php
index 21b79bcd7a1..3117256e3d6 100644
--- a/htdocs/admin/system/dolibarr.php
+++ b/htdocs/admin/system/dolibarr.php
@@ -48,6 +48,7 @@ print load_fiche_titre($title,'','title_setup');
// Version
$var=true;
+print '';
print '
';
print '| '.$langs->trans("Version").' | '.$langs->trans("Value").' |
'."\n";
$var=!$var;
@@ -69,10 +70,12 @@ else
}
print ''."\n";
print '
';
+print '
';
print '
';
// Session
$var=true;
+print '';
print '
';
print '| '.$langs->trans("Session").' | '.$langs->trans("Value").' |
'."\n";
$var=!$var;
@@ -107,6 +110,7 @@ foreach($_SESSION as $key => $val)
}
print ''."\n";
print '
';
+print '
';
print '
';
@@ -116,6 +120,7 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
$shmoparray=dol_listshmop();
$var=true;
+ print '';
print '
';
print '';
print '| '.$langs->trans("LanguageFilesCachedIntoShmopSharedMemory").' | ';
@@ -133,12 +138,14 @@ if (isset($conf->global->MAIN_OPTIMIZE_SPEED) && ($conf->global->MAIN_OPTIMIZE_S
}
print '
';
+ print '
';
print '
';
}
// Localisation
$var=true;
+print '';
print '
';
print '| '.$langs->trans("LocalisationDolibarrParameters").' | '.$langs->trans("Value").' |
'."\n";
$var=!$var;
@@ -234,6 +241,7 @@ if (! empty($conf->global->MAIN_FILESYSTEM_ENCODING)) $tmp=$conf->global->MAIN_F
print '| => '.$langs->trans("File encoding").' | '.$tmp.' |
'."\n"; // date.timezone must be in valued defined in http://fr3.php.net/manual/en/timezones.europe.php
print '
';
+print '
';
print '
';
@@ -292,6 +300,7 @@ $configfileparameters=array(
);
$var=true;
+print '';
print '
';
print '';
print '| '.$langs->trans("Parameters").' ';
@@ -353,11 +362,13 @@ foreach($configfileparameters as $key => $value)
}
}
print ' |
';
+print '
';
print '
';
// Parameters in database
+print '';
print '
';
print '';
print '| '.$langs->trans("Parameters").' '.$langs->trans("Database").' | ';
@@ -407,7 +418,7 @@ if ($resql)
}
print '
';
-
+print '
';
llxFooter();
diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php
index d812f6c29ed..706e0215059 100644
--- a/htdocs/admin/system/modules.php
+++ b/htdocs/admin/system/modules.php
@@ -102,6 +102,8 @@ foreach($modulesdir as $dir)
closedir($handle);
}
}
+
+print '';
print '
';
print '';
print '| '.$langs->trans("Modules").' | ';
@@ -148,6 +150,7 @@ foreach($sortorder as $numero=>$name)
print "
\n";
}
print '
';
+print '
';
print '
';
sort($rights_ids);
$old='';
diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php
index ffba92fd4fa..3e9ccbc895f 100644
--- a/htdocs/admin/system/phpinfo.php
+++ b/htdocs/admin/system/phpinfo.php
@@ -68,8 +68,8 @@ print '
';
$phparray=phpinfo_array();
foreach($phparray as $key => $value)
{
- //print load_fiche_titre($key);
- print '';
+ print '';
+ print '
';
print '';
//print '| '.$langs->trans("Parameter").' | ';
print ''.$key.' | ';
@@ -114,7 +114,9 @@ foreach($phparray as $key => $value)
print '
';
}
}
- print '
';
+ print '
';
+ print '';
+ print '
';
}
diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php
index c44932655ed..4e0651597ee 100644
--- a/htdocs/admin/tools/listevents.php
+++ b/htdocs/admin/tools/listevents.php
@@ -213,6 +213,8 @@ if ($result)
}
print '
";
+ print "";
+
+ print "";
$db->free($result);
}
else
diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php
index de59c9136b2..d0d3c117be6 100644
--- a/htdocs/admin/triggers.php
+++ b/htdocs/admin/triggers.php
@@ -52,6 +52,7 @@ $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/';
$interfaces = new Interfaces($db);
$triggers = $interfaces->getTriggersList();
+print '';
print '
| '.$langs->trans("File").' |
@@ -78,6 +79,7 @@ foreach ($triggers as $trigger)
}
print '
';
+print '
';
llxFooter();
diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php
index 305bc7cafe6..439308fcaea 100644
--- a/htdocs/api/class/api_login.class.php
+++ b/htdocs/api/class/api_login.class.php
@@ -34,7 +34,7 @@ class Login
/**
* Login
*
- * Log user with username and password
+ * Log user with username and password. Using method POST is recommanded for security reasons (method GET is often logged by default by web servers with parameters so with login and pass)
*
* @param string $login Username
* @param string $password User password
diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index 6f6a5516aab..a639fea53ea 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -366,6 +366,21 @@ if ($id > 0)
print '';
print '';
+ // Max outstanding bill
+ if ($object->client)
+ {
+ print '';
+ print '| ';
+ print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
+ print ' | ';
+ $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
+ print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
+ //if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
+
+ print ' | ';
+ print '
';
+ }
+
// Multiprice level
if (! empty($conf->global->PRODUIT_MULTIPRICES))
{
@@ -511,23 +526,8 @@ if ($id > 0)
print ''.$langs->trans("ShowCustomerPreview").' | ';
print '';
- // Max outstanding bill
- if ($object->client)
- {
- print '';
- print '| ';
- print $form->editfieldkey("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer);
- print ' | ';
- $limit_field_type = (! empty($conf->global->MAIN_USE_JQUERY_JEDITABLE)) ? 'numeric' : 'amount';
- print $form->editfieldval("OutstandingBill",'outstanding_limit',$object->outstanding_limit,$object,$user->rights->societe->creer,$limit_field_type,($object->outstanding_limit != '' ? price($object->outstanding_limit) : ''));
- //if (empty($object->outstanding_limit)) print $langs->trans("NoLimit");
-
- print ' | ';
- print '
';
- }
-
// Outstanding bill
- print '';
+ print '
';
print '| '.$langs->trans("CurrentOutstandingBill").' | ';
print ''.price($outstandingBills).$warn.' | ';
print '
';
diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php
index 5175c4c85c5..5ce456fe8e0 100644
--- a/htdocs/commande/document.php
+++ b/htdocs/commande/document.php
@@ -182,6 +182,7 @@ if ($id > 0 || ! empty($ref))
else
{
header('Location: index.php');
+ exit;
}
diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php
index f82177e0b21..95a5323252c 100644
--- a/htdocs/compta/bank/annuel.php
+++ b/htdocs/compta/bank/annuel.php
@@ -188,7 +188,7 @@ print '';
print '| '.$langs->trans("Month").' | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- print ''.$annee.' | ';
+ print ''.$annee.' | ';
}
print '
';
@@ -196,7 +196,7 @@ print '';
print '| | ';
for ($annee = $year_start ; $annee <= $year_end ; $annee++)
{
- print ''.$langs->trans("Debit").' | '.$langs->trans("Credit").' | ';
+ print ''.$langs->trans("Debit").' | '.$langs->trans("Credit").' | ';
}
print '
';
@@ -218,7 +218,7 @@ for ($mois = 1 ; $mois < 13 ; $mois++)
}
print "";
- print ' ';
+ print ' | ';
if ($encaiss[$case]>0)
{
print price($encaiss[$case]);
diff --git a/htdocs/compta/bank/bankentries.php b/htdocs/compta/bank/bankentries.php
index f13b650eff2..54c77ed6e73 100644
--- a/htdocs/compta/bank/bankentries.php
+++ b/htdocs/compta/bank/bankentries.php
@@ -621,7 +621,7 @@ if ($resql)
$last_ok=1;
}
$i++;
- $liste=''.$objr->num_releve.' '.$liste;
+ $liste=''.$objr->num_releve.' '.$liste;
}
if ($numr >= $nbmax) $liste="... ".$liste;
print $liste;
@@ -1208,7 +1208,7 @@ if ($resql)
{
if ($objp->rappro) // If line not conciliated and account can be conciliated
{
- print ''.$objp->num_releve.'';
+ print ''.$objp->num_releve.'';
}
else if ($action == 'reconcile')
{
@@ -1224,7 +1224,7 @@ if ($resql)
// Transaction reconciliated or edit link
if ($objp->rappro && $bankaccount->canBeConciliated() > 0) // If line not conciliated and account can be conciliated
{
- print '';
+ print '';
print img_edit();
print '';
}
@@ -1232,13 +1232,13 @@ if ($resql)
{
if ($user->rights->banque->modifier || $user->rights->banque->consolidate)
{
- print '';
+ print '';
print img_edit();
print '';
}
else
{
- print '';
+ print '';
print img_view();
print '';
}
@@ -1252,7 +1252,7 @@ if ($resql)
print ' ';
if ($user->rights->banque->modifier)
{
- print 'rowid.'&id='.$object->id.'&page='.$page.'">';
+ print 'rowid.'&id='.$objp->bankid.'&page='.$page.'">';
print img_delete();
print '';
}
diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php
index 0878474dcb5..db70acc7373 100644
--- a/htdocs/compta/bank/document.php
+++ b/htdocs/compta/bank/document.php
@@ -81,59 +81,13 @@ if ($id)
* Actions
*/
-// Envoi fichier
-if ($_POST["sendit"] && !empty($conf->global->MAIN_UPLOAD_DOC)) {
- if ($object->fetch($id)) {
-
- $upload_dir = $conf->bank->dir_output . "/" . $object->ref;
-
- if (dol_mkdir($upload_dir) >= 0) {
- $resupload = dol_move_uploaded_file($_FILES['userfile']['tmp_name'],
- $upload_dir . "/" . dol_unescapefile($_FILES['userfile']['name']),
- 0, 0, $_FILES['userfile']['error']);
- if (is_numeric($resupload) && $resupload > 0) {
- if (image_format_supported($upload_dir . "/" . $_FILES['userfile']['name']) == 1)
- {
- // Create thumbs
- $object->addThumbs($upload_dir . "/" . $_FILES['userfile']['name']);
- }
- $mesg = ' ' . $langs->trans("FileTransferComplete") . ' ';
- }
- else {
- $langs->load("errors");
- if ($resupload < 0) { // Unknown error
- $mesg = '' . $langs->trans("ErrorFileNotUploaded") . ' ';
- }
- else if (preg_match('/ErrorFileIsInfectedWithAVirus/',
- $resupload)) { // Files infected by a virus
- $mesg = '' . $langs->trans("ErrorFileIsInfectedWithAVirus") . ' ';
- }
- else { // Known error
- $mesg = '' . $langs->trans($resupload) . ' ';
- }
- }
- }
- }
+if ($object->id > 0)
+{
+ $object->fetch_thirdparty();
+ $upload_dir = $conf->bank->dir_output . "/" . dol_sanitizeFileName($object->ref);
}
-// Delete
-else if ($action == 'confirm_deletefile' && $confirm == 'yes') {
- if ($object->fetch($id)) {
-
- $upload_dir = $conf->bank->dir_output;
- $file = $upload_dir . '/' . GETPOST('urlfile'); // Do not use urldecode here ($_GET and $_REQUEST are already decoded by PHP).
-
- $ret = dol_delete_file($file, 0, 0, 0, $object);
- if ($ret) {
- setEventMessages($langs->trans("FileWasRemoved", GETPOST('urlfile')), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("ErrorFailToDeleteFile", GETPOST('urlfile')), null, 'errors');
- }
-
- Header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $id);
- exit;
- }
-}
+include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php';
/*
@@ -182,30 +136,12 @@ if ($id > 0 || !empty($ref)) {
dol_fiche_end();
- dol_htmloutput_mesg($mesg, $mesgs);
-
- /*
- * Confirmation suppression fichier
- */
- if ($action == 'delete') {
- $ret = $form->form_confirm($_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode($_GET["urlfile"]),
- $langs->trans('DeleteFile'),
- $langs->trans('ConfirmDeleteFile'), 'confirm_deletefile',
- '', 0, 1);
- if ($ret == 'html')
- print ' ';
- }
-
- // Affiche formulaire upload
- $formfile = new FormFile($db);
- $formfile->form_attach_new_file(DOL_URL_ROOT . '/compta/bank/document.php?id=' . $object->id,
- '', 0, 0, $user->rights->banque, 50, $object);
-
-
- // List of document
+ $modulepart = 'bank';
+ $permission = $user->rights->banque->modifier;
+ $permtoedit = $user->rights->banque->modifier;
$param = '&id=' . $object->id;
- $formfile->list_of_documents($filearray, $object, 'bank', $param);
+ include_once DOL_DOCUMENT_ROOT . '/core/tpl/document_actions_post_headers.tpl.php';
}
else {
dol_print_error($db);
diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php
index ddd86e414fa..ffadceafb2e 100644
--- a/htdocs/compta/bank/releve.php
+++ b/htdocs/compta/bank/releve.php
@@ -299,6 +299,7 @@ else
print '';
print "";
+ print '';
print ' ';
print '';
print '| '.$langs->trans("DateOperationShort").' | ';
@@ -348,8 +349,10 @@ else
$i = 0;
// Ligne Solde debut releve
- print " | id."\"> | ";
- print "".$langs->trans("InitialBankBalance")." : | ".price($total)." | | \n";
+ print " | ";
+ print "".$langs->trans("InitialBankBalance")." : | ";
+ print ''.price($total).' | | ';
+ print " \n";
while ($i < $numrows)
{
@@ -552,8 +555,13 @@ else
print "\n".'| '.$langs->trans("Total")." : | ".price($totald)." | ".price($totalc)." | | | ";
// Line Balance
- print "\n| | ".$langs->trans("EndBankBalance")." : | ".price($total)." | | \n";
- print " \n";
+ print "\n | | ".$langs->trans("EndBankBalance")." : | ";
+ print "".price($total)." | | ";
+ print " \n";
+ print " |
";
+ print "";
+
+ print "\n";
}
diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php
index 7cc31e576f6..e889b4dff19 100644
--- a/htdocs/compta/bank/treso.php
+++ b/htdocs/compta/bank/treso.php
@@ -93,15 +93,14 @@ if ($_REQUEST["account"] || $_REQUEST["ref"])
$head=bank_prepare_head($object);
dol_fiche_head($head,'cash',$langs->trans("FinancialAccount"),0,'account');
- print '';
-
$linkback = ''.$langs->trans("BackToList").'';
- dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, '', 0, '', '', 1);
dol_fiche_end();
-
+ print '
';
+
$solde = $object->solde(0);
// Show next coming entries
diff --git a/htdocs/compta/prelevement/class/bonprelevement.class.php b/htdocs/compta/prelevement/class/bonprelevement.class.php
index 5bc09419666..9373527e20c 100644
--- a/htdocs/compta/prelevement/class/bonprelevement.class.php
+++ b/htdocs/compta/prelevement/class/bonprelevement.class.php
@@ -813,7 +813,7 @@ class BonPrelevement extends CommonObject
dol_syslog(__METHOD__."::Read invoices error ".$this->db->error(), LOG_ERR);
}
}
-
+
if (! $error)
{
require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
@@ -834,7 +834,7 @@ class BonPrelevement extends CommonObject
{
$bac = new CompanyBankAccount($this->db);
$bac->fetch(0,$soc->id);
-
+
if ($bac->verif() >= 1)
//if (true)
{
@@ -867,7 +867,7 @@ class BonPrelevement extends CommonObject
}
$ok=0;
-
+
// Withdraw invoices in factures_prev array
$out=count($factures_prev)." invoices will be withdrawn.";
//print $out."\n";
@@ -1272,7 +1272,7 @@ class BonPrelevement extends CommonObject
* section Debiteur (sepa Debiteurs bloc lines)
*/
- $tmp_invoices = array();
+ /*$tmp_invoices = array();
$sql = "SELECT f.facnumber as fac FROM ".MAIN_DB_PREFIX."prelevement_lignes as pl, ".MAIN_DB_PREFIX."facture as f, ".MAIN_DB_PREFIX."prelevement_facture as pf, ".MAIN_DB_PREFIX."societe as soc, ".MAIN_DB_PREFIX."c_country as p, ".MAIN_DB_PREFIX."societe_rib as rib WHERE pl.fk_prelevement_bons = ".$this->id." AND pl.rowid = pf.fk_prelevement_lignes AND pf.fk_facture = f.rowid AND soc.fk_pays = p.rowid AND soc.rowid = f.fk_soc AND rib.fk_soc = f.fk_soc AND rib.default_rib = 1";
$resql=$this->db->query($sql);
@@ -1280,9 +1280,7 @@ class BonPrelevement extends CommonObject
while ($objfac = $this->db->fetch_object($resql)) {
$tmp_invoices[] = $objfac->fac;
}
- }
-
- $ListOfFactures = implode($tmp_invoices);
+ }*/
$sql = "SELECT soc.code_client as code, soc.address, soc.zip, soc.town, c.code as country_code,";
$sql.= " pl.client_nom as nom, pl.code_banque as cb, pl.code_guichet as cg, pl.number as cc, pl.amount as somme,";
@@ -1310,7 +1308,7 @@ class BonPrelevement extends CommonObject
while ($i < $num)
{
$obj = $this->db->fetch_object($resql);
- $fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $ListOfFactures, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
+ $fileDebiteurSection .= $this->EnregDestinataireSEPA($obj->code, $obj->nom, $obj->address, $obj->zip, $obj->town, $obj->country_code, $obj->cb, $obj->cg, $obj->cc, $obj->somme, $obj->fac, $obj->idfac, $obj->iban, $obj->bic, $this->db->jdate($obj->datec), $obj->drum);
$this->total = $this->total + $obj->somme;
$i++;
}
diff --git a/htdocs/compta/prelevement/create.php b/htdocs/compta/prelevement/create.php
index 8be897990ed..8a6f4bb7ecc 100644
--- a/htdocs/compta/prelevement/create.php
+++ b/htdocs/compta/prelevement/create.php
@@ -72,6 +72,7 @@ if ($action == 'create')
$mesg='';
$mesg=$langs->trans("NoInvoiceCouldBeWithdrawed");
setEventMessages($mesg, null, 'errors');
+ $mesg.='
'."\n";
foreach($bprev->invoice_in_error as $key => $val)
{
$mesg.=$val."
\n";
diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php
index 77393b78f4e..92cb36059e4 100644
--- a/htdocs/compta/sociales/card.php
+++ b/htdocs/compta/sociales/card.php
@@ -521,9 +521,6 @@ if ($id > 0)
print '';
}
- // Status
- //print '| '.$langs->trans("Status").' | '.$object->getLibStatut(4, $totalpaye).' |
';
-
print '
';
print '';
@@ -548,6 +545,8 @@ if ($id > 0)
$resql = $db->query($sql);
if ($resql)
{
+ $totalpaye = 0;
+
$num = $db->num_rows($resql);
$i = 0; $total = 0;
print '';
@@ -582,8 +581,8 @@ if ($id > 0)
print '| '.$langs->trans("None").' | | | |
';
}
- if ($object->paye == 0)
- {
+ //if ($object->status == ChargeSociales::STATUS_DRAFT)
+ //{
print "| ".$langs->trans("AlreadyPaid")." : | ".price($totalpaye)." |
\n";
print "| ".$langs->trans("AmountExpected")." : | ".price($object->amount)." |
\n";
@@ -592,7 +591,7 @@ if ($id > 0)
print "| ".$langs->trans("RemainderToPay")." : | ";
print ''.price($resteapayer)." |
\n";
- }
+ //}
print "
";
$db->free($resql);
}
diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php
index a8ad3390db3..c6d6c075d62 100644
--- a/htdocs/contrat/class/contrat.class.php
+++ b/htdocs/contrat/class/contrat.class.php
@@ -693,8 +693,8 @@ class Contrat extends CommonObject
// fetch optionals attributes and labels
$line->fetch_optionals($line->id,$extralabelsline);
- $this->lines[] = $line;
- $this->lines_id_index_mapper[$line->id] = key($this->lines);
+ $this->lines[$i] = $line;
+ $this->lines_id_index_mapper[$line->id] = $i;
//dol_syslog("1 ".$line->desc);
//dol_syslog("2 ".$line->product_desc);
diff --git a/htdocs/core/actions_sendmails.inc.php b/htdocs/core/actions_sendmails.inc.php
index 9ec3bfcb3b7..28799231fdd 100644
--- a/htdocs/core/actions_sendmails.inc.php
+++ b/htdocs/core/actions_sendmails.inc.php
@@ -337,24 +337,27 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
}
// Initialisation of datas
- $object->socid = $sendtosocid; // To link to a company
- $object->sendtoid = $sendtoid; // To link to a contact/address
- $object->actiontypecode = $actiontypecode;
- $object->actionmsg = $actionmsg; // Long text
- $object->actionmsg2 = $actionmsg2; // Short text
- $object->trackid = $trackid;
- $object->fk_element = $object->id;
- $object->elementtype = $object->element;
-
- // Call of triggers
- include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
- $interface=new Interfaces($db);
- $result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
- if ($result < 0) {
- $error++; $errors=$interface->errors;
+ if (is_object($object))
+ {
+ $object->socid = $sendtosocid; // To link to a company
+ $object->sendtoid = $sendtoid; // To link to a contact/address
+ $object->actiontypecode = $actiontypecode;
+ $object->actionmsg = $actionmsg; // Long text
+ $object->actionmsg2 = $actionmsg2; // Short text
+ $object->trackid = $trackid;
+ $object->fk_element = $object->id;
+ $object->elementtype = $object->element;
+
+ // Call of triggers
+ include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
+ $interface=new Interfaces($db);
+ $result=$interface->run_triggers($trigger_name,$object,$user,$langs,$conf);
+ if ($result < 0) {
+ $error++; $errors=$interface->errors;
+ }
+ // End call of triggers
}
- // End call of triggers
-
+
if ($error)
{
dol_print_error($db);
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 591402bbdea..e4049dd85ff 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -5658,10 +5658,15 @@ class Form
//print "paramid=$paramid,morehtml=$morehtml,shownav=$shownav,$fieldid,$fieldref,$morehtmlref,$moreparam";
$object->load_previous_next_ref((isset($object->next_prev_filter)?$object->next_prev_filter:''),$fieldid,$nodbprefix);
- //$previous_ref = $object->ref_previous?'ref_previous).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Previous"),'previous.png'):' ').'':'';
- //$next_ref = $object->ref_next?'ref_next).$moreparam.'">'.(empty($conf->dol_use_jmobile)?img_picto($langs->trans("Next"),'next.png'):' ').'':'';
- $previous_ref = $object->ref_previous?'ref_previous).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'<':' ').'':''.(($conf->dol_use_jmobile != 4)?'<':' ').'';
- $next_ref = $object->ref_next?'ref_next).$moreparam.'">'.(($conf->dol_use_jmobile != 4)?'>':' ').'':''.(($conf->dol_use_jmobile != 4)?'>':' ').'';
+ $navurl = $_SERVER["PHP_SELF"];
+ // Special case for project/task page
+ if ($paramid == 'project_ref')
+ {
+ $navurl = preg_replace('/\/tasks\/(task|contact|time|note|document).php/','/tasks.php',$navurl);
+ $paramid='ref';
+ }
+ $previous_ref = $object->ref_previous?''.(($conf->dol_use_jmobile != 4)?'<':' ').'':''.(($conf->dol_use_jmobile != 4)?'<':' ').'';
+ $next_ref = $object->ref_next?''.(($conf->dol_use_jmobile != 4)?'>':' ').'':''.(($conf->dol_use_jmobile != 4)?'>':' ').'';
//print "xx".$previous_ref."x".$next_ref;
$ret.='';
diff --git a/htdocs/core/lib/bank.lib.php b/htdocs/core/lib/bank.lib.php
index 1df180452c3..47d3539e3ba 100644
--- a/htdocs/core/lib/bank.lib.php
+++ b/htdocs/core/lib/bank.lib.php
@@ -197,7 +197,7 @@ function checkBanForAccount($account)
$rib = strtr($rib, "abcdefghijklmnopqrstuvwxyz", "12345678912345678923456789");
// Separation du rib en 3 groupes de 7 + 1 groupe de 2.
// Multiplication de chaque groupe par les coef du tableau
-var_dump($rib);
+
for ($i = 0, $s = 0; $i < 3; $i++) {
$code = substr($rib, 7 * $i, 7);
$s += (0 + (int) $code) * $coef[$i];
diff --git a/htdocs/core/lib/cron.lib.php b/htdocs/core/lib/cron.lib.php
index 9afd0e7835b..3392785a571 100644
--- a/htdocs/core/lib/cron.lib.php
+++ b/htdocs/core/lib/cron.lib.php
@@ -92,14 +92,16 @@ function dol_print_cron_urls()
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
// Cron launch
+ print '
';
print '
'.$langs->trans("URLToLaunchCronJobs").':';
$url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login;
print img_picto('','object_globe.png').'
'.$url."\n";
print ' '.$langs->trans("OrToLaunchASpecificJob").'
';
$url=$urlwithroot.'/public/cron/cron_run_jobs.php?'.(empty($conf->global->CRON_KEY)?'':'securitykey='.$conf->global->CRON_KEY.'&').'userlogin='.$user->login.'&id=cronjobid';
print img_picto('','object_globe.png').'
'.$url."\n";
- print '
';
-
+ print '
';
+ print '
';
+
$logintouse = 'firstadmin';
if ($user->admin) $logintouse = $user->login;
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index d097cc484ba..c1aadd3df6d 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -1289,21 +1289,19 @@ function dol_add_file_process($upload_dir, $allowoverwrite=0, $donotupdatesessio
}
} elseif ($link) {
- if (dol_mkdir($upload_dir) >= 0) {
- require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
- $linkObject = new Link($db);
- $linkObject->entity = $conf->entity;
- $linkObject->url = $link;
- $linkObject->objecttype = GETPOST('objecttype', 'alpha');
- $linkObject->objectid = GETPOST('objectid', 'int');
- $linkObject->label = GETPOST('label', 'alpha');
- $res = $linkObject->create($user);
- $langs->load('link');
- if ($res > 0) {
- setEventMessages($langs->trans("LinkComplete"), null, 'mesgs');
- } else {
- setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
- }
+ require_once DOL_DOCUMENT_ROOT . '/core/class/link.class.php';
+ $linkObject = new Link($db);
+ $linkObject->entity = $conf->entity;
+ $linkObject->url = $link;
+ $linkObject->objecttype = GETPOST('objecttype', 'alpha');
+ $linkObject->objectid = GETPOST('objectid', 'int');
+ $linkObject->label = GETPOST('label', 'alpha');
+ $res = $linkObject->create($user);
+ $langs->load('link');
+ if ($res > 0) {
+ setEventMessages($langs->trans("LinkComplete"), null, 'mesgs');
+ } else {
+ setEventMessages($langs->trans("ErrorFileNotLinked"), null, 'errors');
}
}
else
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index c36531fd1c4..874722def2e 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -967,7 +967,7 @@ function dol_get_fiche_end($notab=0)
* @param int $nodbprefix Do not include DB prefix to forge table name
* @param string $morehtmlleft More html code to show before ref
* @param string $morehtmlstatus More html code to show under navigation arrows
- * @param int $onlybanner Put this to 1, if the card will contains only a banner
+ * @param int $onlybanner Put this to 1, if the card will contains only a banner (add css 'arearefnobottom' on div)
* @param string $morehtmlright More html code to show before navigation arrows
* @return void
*/
@@ -3316,7 +3316,7 @@ function print_fleche_navigation($page, $file, $options='', $nextpage=0, $betwee
if (! empty($conf->global->MAIN_PAGESIZE_CHOICES)) $pagesizechoices=$conf->global->MAIN_PAGESIZE_CHOICES;
print '