Merge remote-tracking branch 'Dolibarr/develop' into develop
This commit is contained in:
commit
81229b4b4d
10
ChangeLog
10
ChangeLog
@ -5,23 +5,23 @@ English Dolibarr ChangeLog
|
||||
|
||||
***** ChangeLog for 13.0.0 compared to 12.0.0 *****
|
||||
For users:
|
||||
NEW: Add module Credit transfer SEPA to manage payment of supplier using bank credit transfer SEPA files
|
||||
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable
|
||||
NEW: Add module "Credit transfer SEPA" to manage payment of vendors using bank credit transfer SEPA files.
|
||||
NEW: Module Reception (for a more accurate management of your receptions) moved from experimental to stable.
|
||||
|
||||
|
||||
WARNING:
|
||||
|
||||
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||
* Properties ->contactid has been renamed into ->contact_id
|
||||
* Rename property $paiementid in API api_supplier_invoices into $payment_mode_id
|
||||
* The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you still use old syntax in
|
||||
* Property $paiementid in API api_supplier_invoices has been renamed into into $payment_mode_id (english)
|
||||
* The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you used the old syntax in
|
||||
your email templates.
|
||||
* The hidden option HOLIDAY_MORE_PUBLIC_HOLIDAYS has been removed. Use instead the dictionary table if you need to define custom
|
||||
days of holiday.
|
||||
* Property num_paiement has been renamed num_payment everywhere for better code consistency.
|
||||
* If you build a class that implement CommonObject to use the incoterm properties or method (->fk_incoterm, ->label_incoterm, ->location_incoterm),
|
||||
you must now also include declaration of the Trait CommonIncoterm in your class. All incoterm functions were moved into this Trait.
|
||||
* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alpahnohtml');
|
||||
* The GETPOST(..., 'alpha') has now the same behaviour than GETPOST(..., 'alphanohtml');
|
||||
|
||||
|
||||
***** ChangeLog for 12.0.3 compared to 12.0.2 *****
|
||||
|
||||
@ -43,7 +43,7 @@ $massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'expensereportlist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
|
||||
@ -33,10 +33,9 @@ $langs->loadLangs(array("members", "companies"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$massaction = GETPOST('massaction', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'subscriptionlist'; // To manage different context of search
|
||||
|
||||
$statut = (GETPOSTISSET("statut") ?GETPOST("statut", "alpha") : 1);
|
||||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
|
||||
@ -175,10 +175,10 @@ if ($action == 'switch')
|
||||
$db->begin();
|
||||
|
||||
$objfrom = new ModeleBoxes($db);
|
||||
$objfrom->fetch($_GET["switchfrom"]);
|
||||
$objfrom->fetch(GETPOST("switchfrom", 'int'));
|
||||
|
||||
$objto = new ModeleBoxes($db);
|
||||
$objto->fetch($_GET["switchto"]);
|
||||
$objto->fetch(GETPOST('switchto', 'int'));
|
||||
|
||||
$resultupdatefrom = 0;
|
||||
$resultupdateto = 0;
|
||||
@ -192,12 +192,12 @@ if ($action == 'switch')
|
||||
$newsecondnum = preg_replace('/[a-zA-Z]+/', '', $newsecond);
|
||||
$newsecond = sprintf("%s%02d", $newsecondchar ? $newsecondchar : 'A', $newsecondnum + 1);
|
||||
}
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newfirst)."' WHERE rowid=".$objfrom->rowid;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newfirst)."' WHERE rowid=".((int) $objfrom->rowid);
|
||||
dol_syslog($sql);
|
||||
$resultupdatefrom = $db->query($sql);
|
||||
if (!$resultupdatefrom) { dol_print_error($db); }
|
||||
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newsecond)."' WHERE rowid=".$objto->rowid;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX."boxes SET box_order='".$db->escape($newsecond)."' WHERE rowid=".((int) $objto->rowid);
|
||||
dol_syslog($sql);
|
||||
$resultupdateto = $db->query($sql);
|
||||
if (!$resultupdateto) { dol_print_error($db); }
|
||||
|
||||
@ -558,7 +558,7 @@ $langs->load("companies");
|
||||
|
||||
// Managing Director(s)
|
||||
print '<tr class="oddeven"><td><label for="director">'.$langs->trans("ManagingDirectors").'</label></td><td>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth200" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS).'"></td></tr>';
|
||||
print '<input name="MAIN_INFO_SOCIETE_MANAGERS" id="director" class="minwidth500" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_SOCIETE_MANAGERS).'"></td></tr>';
|
||||
|
||||
// GDPR contact
|
||||
print '<tr class="oddeven"><td>';
|
||||
@ -568,7 +568,7 @@ print '<input name="MAIN_INFO_GDPR" id="director" class="minwidth500" value="'.d
|
||||
|
||||
// Capital
|
||||
print '<tr class="oddeven"><td><label for="capital">'.$langs->trans("Capital").'</label></td><td>';
|
||||
print '<input name="capital" id="capital" class="minwidth100" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL).'"></td></tr>';
|
||||
print '<input name="capital" id="capital" class="maxwidth100" value="'.dol_escape_htmltag($conf->global->MAIN_INFO_CAPITAL).'"></td></tr>';
|
||||
|
||||
// Juridical Status
|
||||
print '<tr class="oddeven"><td><label for="forme_juridique_code">'.$langs->trans("JuridicalStatus").'</label></td><td>';
|
||||
|
||||
@ -45,7 +45,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'emailcollectorcard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$operationid = GETPOST('operationid', 'int');
|
||||
|
||||
@ -36,7 +36,7 @@ if (!$user->admin) {
|
||||
$langs->loadLangs(array("users", "admin", "other"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'auditeventslist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
// Load variable for pagination
|
||||
|
||||
@ -47,7 +47,12 @@ if ($action == 'set')
|
||||
|
||||
$gimcdf = GETPOST("GEOIPMAXMIND_COUNTRY_DATAFILE");
|
||||
|
||||
if (!$gimcdf && !file_exists($gimcdf))
|
||||
if (!$error && $gimcdf && ! preg_match('/\.(dat|mmdb)$/', $gimcdf)) {
|
||||
setEventMessages($langs->trans("ErrorFileMustHaveFormat", '.dat|.mmdb'), null, 'errors');
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (!$error && $gimcdf && !file_exists($gimcdf))
|
||||
{
|
||||
setEventMessages($langs->trans("ErrorFileNotFound", $gimcdf), null, 'errors');
|
||||
$error++;
|
||||
@ -126,7 +131,7 @@ if ($conf->global->GEOIP_VERSION == 'php')
|
||||
{
|
||||
print 'Using geoip PHP internal functions. Value must be '.geoip_db_filename(GEOIP_COUNTRY_EDITION).' or '.geoip_db_filename(GEOIP_CITY_EDITION_REV1).' or /pathtodatafile/GeoLite2-Country.mmdb<br>';
|
||||
}
|
||||
print '<input size="50" type="text" name="GEOIPMAXMIND_COUNTRY_DATAFILE" value="'.$conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE.'">';
|
||||
print '<input size="50" type="text" name="GEOIPMAXMIND_COUNTRY_DATAFILE" value="'.dol_escape_htmltag($conf->global->GEOIPMAXMIND_COUNTRY_DATAFILE).'">';
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
@ -148,7 +153,7 @@ print $langs->trans("YouCanDownloadAdvancedDatFileTo", '<a href="'.$url2.'" targ
|
||||
if ($geoip)
|
||||
{
|
||||
print '<br><br>';
|
||||
print '<br>'.$langs->trans("TestGeoIPResult", $ip).':';
|
||||
print '<br><span class="opacitymedium">'.$langs->trans("TestGeoIPResult", $ip).':</span>';
|
||||
|
||||
$ip = '24.24.24.24';
|
||||
print '<br>'.$ip.' -> ';
|
||||
|
||||
@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetcard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetslist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'assetlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -32,7 +32,7 @@ $massaction = GETPOST('massaction', 'alpha');
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bookmarklist'; // To manage different context of search
|
||||
|
||||
// Security check
|
||||
if (!$user->rights->bookmark->lire) {
|
||||
|
||||
@ -47,7 +47,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'categorylist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -110,8 +110,8 @@ if ($dateselect > 0)
|
||||
$tmp = empty($conf->global->MAIN_DEFAULT_WORKING_HOURS) ? '9-18' : $conf->global->MAIN_DEFAULT_WORKING_HOURS;
|
||||
$tmp = str_replace(' ', '', $tmp); // FIX 7533
|
||||
$tmparray = explode('-', $tmp);
|
||||
$begin_h = GETPOST('begin_h', 'int') != '' ?GETPOST('begin_h', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||
$end_h = GETPOST('end_h', 'int') ?GETPOST('end_h', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 18);
|
||||
$begin_h = GETPOST('begin_h', 'int') != '' ? GETPOST('begin_h', 'int') : ($tmparray[0] != '' ? $tmparray[0] : 9);
|
||||
$end_h = GETPOST('end_h', 'int') ? GETPOST('end_h', 'int') : ($tmparray[1] != '' ? $tmparray[1] : 18);
|
||||
if ($begin_h < 0 || $begin_h > 23) $begin_h = 9;
|
||||
if ($end_h < 1 || $end_h > 24) $end_h = 18;
|
||||
if ($end_h <= $begin_h) $end_h = $begin_h + 1;
|
||||
|
||||
@ -837,8 +837,7 @@ if ($resql)
|
||||
print '</div>';
|
||||
print '<div class="nowrap">';
|
||||
print $langs->trans('to').' ';*/
|
||||
print $langs->trans("Before").' ';
|
||||
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1);
|
||||
print $form->selectDate($search_datelimit_end ? $search_datelimit_end : -1, 'search_datelimit_end', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("Before"));
|
||||
print '<br><input type="checkbox" name="search_option" value="late"'.($option == 'late' ? ' checked' : '').'> '.$langs->trans("Alert");
|
||||
print '</div>';
|
||||
print '</td>';
|
||||
|
||||
@ -179,7 +179,7 @@ if ($id > 0 || $ref)
|
||||
|
||||
}*/
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.($object->type != 'bank-transfer' ? '' : '&type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
|
||||
|
||||
@ -40,7 +40,7 @@ $status = GETPOST('status', 'int');
|
||||
if ($user->socid) $socid = $user->socid;
|
||||
$result = restrictedArea($user, 'prelevement', '', '', 'bons');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -86,7 +86,7 @@ if ($id > 0 || $ref)
|
||||
$head = prelevement_prepare_head($object);
|
||||
dol_fiche_head($head, 'invoices', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.($object->type != 'bank-transfer' ? '' : '&type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
|
||||
|
||||
@ -80,7 +80,7 @@ if ($prev_id > 0 || $ref)
|
||||
$head = prelevement_prepare_head($object);
|
||||
dol_fiche_head($head, 'rejects', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.($object->type != 'bank-transfer' ? '' : '&type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ if ($prev_id > 0 || $ref)
|
||||
$head = prelevement_prepare_head($object);
|
||||
dol_fiche_head($head, 'statistics', $langs->trans("WithdrawalsReceipts"), -1, 'payment');
|
||||
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/bons.php'.($object->type != 'bank-transfer' ? '' : '?type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/prelevement/orders_list.php?restore_lastsearch_values=1'.($object->type != 'bank-transfer' ? '' : '&type=bank-transfer').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref');
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlinelist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -19,9 +19,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/compta/prelevement/bons.php
|
||||
* \file htdocs/compta/prelevement/orders_list.php
|
||||
* \ingroup prelevement
|
||||
* \brief Page liste des bons de prelevements
|
||||
* \brief Page to list direct debit orders or credit transfer orders
|
||||
*/
|
||||
|
||||
require '../../main.inc.php';
|
||||
@ -31,7 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('banks', 'categories', 'widthdrawals'));
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'directdebitcredittransferlist'; // To manage different context of search
|
||||
|
||||
// Security check
|
||||
$socid = GETPOST('socid', 'int');
|
||||
@ -143,10 +143,10 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
|
||||
global $conf;
|
||||
|
||||
// Recupere liste des boites d'un user si ce dernier a sa propre liste
|
||||
$sql = "SELECT b.rowid, b.box_id, b.position, b.box_order, b.fk_user";
|
||||
$sql = "SELECT b.rowid as id, b.box_id, b.position, b.box_order, b.fk_user";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."boxes as b";
|
||||
$sql .= " WHERE b.entity = ".$conf->entity;
|
||||
$sql .= " AND b.rowid = ".$rowid;
|
||||
$sql .= " AND b.rowid = ".((int) $rowid);
|
||||
dol_syslog(get_class($this)."::fetch rowid=".$rowid);
|
||||
|
||||
$resql = $this->db->query($sql);
|
||||
@ -155,7 +155,8 @@ class ModeleBoxes // Can't be abtract as it is instantiated to build "empty" box
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$this->rowid = $obj->rowid;
|
||||
$this->id = $obj->id;
|
||||
$this->rowid = $obj->id; // For backward compatibility
|
||||
$this->box_id = $obj->box_id;
|
||||
$this->position = $obj->position;
|
||||
$this->box_order = $obj->box_order;
|
||||
|
||||
@ -120,7 +120,8 @@ class Menu
|
||||
$nb = 0;
|
||||
foreach ($this->liste as $val)
|
||||
{
|
||||
if (!empty($val['enabled'])) $nb++;
|
||||
//if (dol_eval($val['enabled'], 1)) $nb++;
|
||||
if (!empty($val['enabled'])) $nb++; // $val['enabled'] is already evaluated to 0 or 1, no need for dol_eval()
|
||||
}
|
||||
return $nb;
|
||||
}
|
||||
|
||||
@ -3896,20 +3896,21 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
$out = '';
|
||||
$syslog = '';
|
||||
|
||||
// Si erreur intervenue avant chargement langue
|
||||
// If error occurs before the $lang object was loaded
|
||||
if (!$langs)
|
||||
{
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/translate.class.php';
|
||||
$langs = new Translate('', $conf);
|
||||
$langs->load("main");
|
||||
}
|
||||
// Load translation files required by the page
|
||||
|
||||
// Load translation files required by the error messages
|
||||
$langs->loadLangs(array('main', 'errors'));
|
||||
|
||||
if ($_SERVER['DOCUMENT_ROOT']) // Mode web
|
||||
{
|
||||
$out .= $langs->trans("DolibarrHasDetectedError").".<br>\n";
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $out .= "You use an experimental or develop level of features, so please do NOT report any bugs, except if problem is confirmed moving option MAIN_FEATURES_LEVEL back to 0.<br>\n";
|
||||
if (!empty($conf->global->MAIN_FEATURES_LEVEL)) $out .= "You use an experimental or develop level of features, so please do NOT report any bugs or vulnerability, except if problem is confirmed after moving option MAIN_FEATURES_LEVEL back to 0.<br>\n";
|
||||
$out .= $langs->trans("InformationToHelpDiagnose").":<br>\n";
|
||||
|
||||
$out .= "<b>".$langs->trans("Date").":</b> ".dol_print_date(time(), 'dayhourlog')."<br>\n";
|
||||
@ -3919,7 +3920,7 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
{
|
||||
$out .= "<b>".$langs->trans("PHP").":</b> ".phpversion()."<br>\n";
|
||||
}
|
||||
$out .= "<b>".$langs->trans("Server").":</b> ".$_SERVER["SERVER_SOFTWARE"]."<br>\n";
|
||||
$out .= "<b>".$langs->trans("Server").":</b> ".dol_htmlentities($_SERVER["SERVER_SOFTWARE"])."<br>\n";
|
||||
if (function_exists("php_uname"))
|
||||
{
|
||||
$out .= "<b>".$langs->trans("OS").":</b> ".php_uname()."<br>\n";
|
||||
@ -3927,8 +3928,8 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
$out .= "<b>".$langs->trans("UserAgent").":</b> ".dol_htmlentities($_SERVER["HTTP_USER_AGENT"], ENT_COMPAT, 'UTF-8')."<br>\n";
|
||||
$out .= "<br>\n";
|
||||
$out .= "<b>".$langs->trans("RequestedUrl").":</b> ".dol_htmlentities($_SERVER["REQUEST_URI"], ENT_COMPAT, 'UTF-8')."<br>\n";
|
||||
$out .= "<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"]) ?dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT, 'UTF-8') : '')."<br>\n";
|
||||
$out .= "<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu) ? $conf->standard_menu : '')."<br>\n";
|
||||
$out .= "<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"]) ? dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT, 'UTF-8') : '')."<br>\n";
|
||||
$out .= "<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu) ? dol_htmlentities($conf->standard_menu) : '')."<br>\n";
|
||||
$out .= "<br>\n";
|
||||
$syslog .= "url=".dol_escape_htmltag($_SERVER["REQUEST_URI"]);
|
||||
$syslog .= ", query_string=".dol_escape_htmltag($_SERVER["QUERY_STRING"]);
|
||||
@ -3948,9 +3949,9 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
if ($_SERVER['DOCUMENT_ROOT']) // Mode web
|
||||
{
|
||||
$out .= "<b>".$langs->trans("DatabaseTypeManager").":</b> ".$db->type."<br>\n";
|
||||
$out .= "<b>".$langs->trans("RequestLastAccessInError").":</b> ".($db->lastqueryerror() ?dol_escape_htmltag($db->lastqueryerror()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<b>".$langs->trans("ReturnCodeLastAccessInError").":</b> ".($db->lasterrno() ?dol_escape_htmltag($db->lasterrno()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<b>".$langs->trans("InformationLastAccessInError").":</b> ".($db->lasterror() ?dol_escape_htmltag($db->lasterror()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<b>".$langs->trans("RequestLastAccessInError").":</b> ".($db->lastqueryerror() ? dol_escape_htmltag($db->lastqueryerror()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<b>".$langs->trans("ReturnCodeLastAccessInError").":</b> ".($db->lasterrno() ? dol_escape_htmltag($db->lasterrno()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<b>".$langs->trans("InformationLastAccessInError").":</b> ".($db->lasterror() ? dol_escape_htmltag($db->lasterror()) : $langs->trans("ErrorNoRequestInError"))."<br>\n";
|
||||
$out .= "<br>\n";
|
||||
} else // Mode CLI
|
||||
{
|
||||
@ -3997,8 +3998,14 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
$out .= "<br>\n";
|
||||
}
|
||||
|
||||
if (empty($dolibarr_main_prod)) print $out;
|
||||
else {
|
||||
// Return a http error code if possible
|
||||
if (! headers_sent()) {
|
||||
http_response_code(500);
|
||||
}
|
||||
|
||||
if (empty($dolibarr_main_prod)) {
|
||||
print $out;
|
||||
} else {
|
||||
// This should not happen, except if there is a bug somewhere. Enabled and check log in such case.
|
||||
print 'This website or feature is currently temporarly not available or failed after a technical error.<br><br>This may be due to a maintenance operation. Current status of operation are on next line...<br><br>'."\n";
|
||||
$langs->load("errors");
|
||||
@ -4006,7 +4013,7 @@ function dol_print_error($db = '', $error = '', $errors = null)
|
||||
print $langs->trans("YouCanSetOptionDolibarrMainProdToZero");
|
||||
define("MAIN_CORE_ERROR", 1);
|
||||
}
|
||||
//else print 'Sorry, an error occured but the parameter $dolibarr_main_prod is defined in conf file so no message is reported to your browser. Please read the log file for error message.';
|
||||
|
||||
dol_syslog("Error ".$syslog, LOG_ERR);
|
||||
}
|
||||
|
||||
|
||||
@ -322,13 +322,20 @@ insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, left
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1711__+MAX_llx_menu__, 'accountancy', 'checks', 14__+MAX_llx_menu__, '/compta/paiement/cheque/index.php?mainmenu=bank&leftmenu=checks', 'MenuChequeDeposits', 0, 'bills', '$user->rights->banque->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1712__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/card.php?mainmenu=bank&leftmenu=checks&action=new', 'NewCheckDeposit', 1, 'compta', '$user->rights->banque->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', 'empty($conf->global->BANK_DISABLE_CHECK_DEPOSIT) && ! empty($conf->banque->enabled) && (! empty($conf->facture->enabled) || ! empty($conf->global->MAIN_MENU_CHEQUE_DEPOSIT_ON))', __HANDLER__, 'left', 1713__+MAX_llx_menu__, 'accountancy', '', 1711__+MAX_llx_menu__, '/compta/paiement/cheque/list.php?mainmenu=bank&leftmenu=checks', 'List', 1, 'bills', '$user->rights->banque->lire', '', 2, 1, __ENTITY__);
|
||||
-- Withdrawal
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'StandingOrders', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
-- PaymentByDirectDebit
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2500__+MAX_llx_menu__, 'accountancy', 'withdraw', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=withdraw', 'PaymentByDirectDebit', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2502__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=withdraw', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/bons.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2503__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2504__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=withdraw', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2506__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=withdraw', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="withdraw"', __HANDLER__, 'left', 2507__+MAX_llx_menu__, 'accountancy', '', 2500__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=withdraw', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
-- PaymentByCreditTransfer
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled', __HANDLER__, 'left', 2510__+MAX_llx_menu__, 'accountancy', 'banktransfer', 14__+MAX_llx_menu__, '/compta/prelevement/index.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'PaymentByBankTransfer', 0, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 9, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2512__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/create.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'NewStandingOrder', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 0, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2513__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/orders_list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsReceipts', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 2, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2514__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/list.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'WithdrawalsLines', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 3, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2516__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/rejets.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Rejects', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 5, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->prelevement->enabled && $leftmenu=="banktransfer"', __HANDLER__, 'left', 2517__+MAX_llx_menu__, 'accountancy', '', 2510__+MAX_llx_menu__, '/compta/prelevement/stats.php?mainmenu=bank&leftmenu=banktransfer&type=bank-transfer', 'Statistics', 1, 'withdrawals', '$user->rights->prelevement->bons->lire', '', 2, 6, __ENTITY__);
|
||||
-- Bank
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled', __HANDLER__, 'left', 2600__+MAX_llx_menu__, 'accountancy', 'bank', 14__+MAX_llx_menu__, '/compta/bank/list.php?mainmenu=bank&leftmenu=bank', 'MenuBankCash', 0, 'banks', '$user->rights->banque->lire', '', 0, 1, __ENTITY__);
|
||||
insert into llx_menu (module, enabled, menu_handler, type, rowid, mainmenu, leftmenu, fk_menu, url, titre, level, langs, perms, target, usertype, position, entity) values ('', '$conf->banque->enabled && ($leftmenu=="bank" || $leftmenu=="checks" || $leftmenu=="withdraw")', __HANDLER__, 'left', 2601__+MAX_llx_menu__, 'accountancy', '', 2600__+MAX_llx_menu__, '/compta/bank/card.php?mainmenu=bank&action=create&leftmenu=bank', 'MenuNewFinancialAccount', 1, 'banks', '$user->rights->banque->configurer', '', 0, 0, __ENTITY__);
|
||||
|
||||
@ -68,14 +68,14 @@ class MenuManager
|
||||
global $conf, $user, $langs;
|
||||
|
||||
// On sauve en session le menu principal choisi
|
||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"] = $_GET["mainmenu"];
|
||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"] = $_GET["idmenu"];
|
||||
if (GETPOSTISSET("mainmenu")) $_SESSION["mainmenu"] = GETPOST("mainmenu", 'aZ09');
|
||||
if (GETPOSTISSET("idmenu")) $_SESSION["idmenu"] = GETPOST("idmenu", 'int');
|
||||
|
||||
// Read mainmenu and leftmenu that define which menu to show
|
||||
if (isset($_GET["mainmenu"]))
|
||||
if (GETPOSTISSET("mainmenu"))
|
||||
{
|
||||
// On sauve en session le menu principal choisi
|
||||
$mainmenu = $_GET["mainmenu"];
|
||||
$mainmenu = GETPOST("mainmenu", 'aZ09');
|
||||
$_SESSION["mainmenu"] = $mainmenu;
|
||||
$_SESSION["leftmenuopened"] = "";
|
||||
} else {
|
||||
@ -84,10 +84,10 @@ class MenuManager
|
||||
}
|
||||
if (!empty($forcemainmenu)) $mainmenu = $forcemainmenu;
|
||||
|
||||
if (isset($_GET["leftmenu"]))
|
||||
if (GETPOSTISSET("leftmenu"))
|
||||
{
|
||||
// On sauve en session le menu principal choisi
|
||||
$leftmenu = $_GET["leftmenu"];
|
||||
$leftmenu = GETPOST("leftmenu", 'aZ09');
|
||||
$_SESSION["leftmenu"] = $leftmenu;
|
||||
|
||||
if ($_SESSION["leftmenuopened"] == $leftmenu) // To collapse
|
||||
|
||||
@ -447,6 +447,7 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
|
||||
// Show personalized menus
|
||||
$menuArbo = new Menubase($db, 'eldy');
|
||||
|
||||
$newTabMenu = $menuArbo->menuTopCharger('', '', $type_user, 'eldy', $tabMenu); // Return tabMenu with only top entries
|
||||
|
||||
$num = count($newTabMenu);
|
||||
@ -455,34 +456,39 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
//var_dump($type_user.' '.$newTabMenu[$i]['url'].' '.$showmode.' '.$newTabMenu[$i]['perms']);
|
||||
$idsel = (empty($newTabMenu[$i]['mainmenu']) ? 'none' : $newTabMenu[$i]['mainmenu']);
|
||||
|
||||
$newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray);
|
||||
|
||||
// url = url from host, shorturl = relative path into dolibarr sources
|
||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||
if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) // Do not change url content for external links
|
||||
{
|
||||
$tmp = explode('?', $newTabMenu[$i]['url'], 2);
|
||||
$url = $shorturl = $tmp[0];
|
||||
$param = (isset($tmp[1]) ? $tmp[1] : '');
|
||||
|
||||
if (!preg_match('/mainmenu/i', $param) || !preg_match('/leftmenu/i', $param)) $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu=';
|
||||
//$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad
|
||||
$url = dol_buildpath($url, 1).($param ? '?'.$param : '');
|
||||
//$shorturl = $shorturl.($param?'?'.$param:'');
|
||||
$shorturl = $url;
|
||||
if (DOL_URL_ROOT) $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl);
|
||||
}
|
||||
|
||||
$showmode = isVisibleToUserType($type_user, $newTabMenu[$i], $listofmodulesforexternal);
|
||||
if ($showmode == 1)
|
||||
{
|
||||
$newTabMenu[$i]['url'] = make_substitutions($newTabMenu[$i]['url'], $substitarray);
|
||||
|
||||
// url = url from host, shorturl = relative path into dolibarr sources
|
||||
$url = $shorturl = $newTabMenu[$i]['url'];
|
||||
if (!preg_match("/^(http:\/\/|https:\/\/)/i", $newTabMenu[$i]['url'])) // Do not change url content for external links
|
||||
{
|
||||
$tmp = explode('?', $newTabMenu[$i]['url'], 2);
|
||||
$url = $shorturl = $tmp[0];
|
||||
$param = (isset($tmp[1]) ? $tmp[1] : '');
|
||||
|
||||
if (!preg_match('/mainmenu/i', $param) || !preg_match('/leftmenu/i', $param)) $param .= ($param ? '&' : '').'mainmenu='.$newTabMenu[$i]['mainmenu'].'&leftmenu=';
|
||||
//$url.="idmenu=".$newTabMenu[$i]['rowid']; // Already done by menuLoad
|
||||
$url = dol_buildpath($url, 1).($param ? '?'.$param : '');
|
||||
//$shorturl = $shorturl.($param?'?'.$param:'');
|
||||
$shorturl = $url;
|
||||
if (DOL_URL_ROOT) $shorturl = preg_replace('/^'.preg_quote(DOL_URL_ROOT, '/').'/', '', $shorturl);
|
||||
}
|
||||
|
||||
// Define the class (top menu selected or not)
|
||||
if (!empty($_SESSION['idmenu']) && $newTabMenu[$i]['rowid'] == $_SESSION['idmenu']) $classname = 'class="tmenusel"';
|
||||
elseif (!empty($_SESSION["mainmenu"]) && $newTabMenu[$i]['mainmenu'] == $_SESSION["mainmenu"]) $classname = 'class="tmenusel"';
|
||||
else $classname = 'class="tmenu"';
|
||||
} elseif ($showmode == 2) $classname = 'class="tmenu"';
|
||||
} elseif ($showmode == 2) {
|
||||
$classname = 'class="tmenu"';
|
||||
}
|
||||
|
||||
$menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target'] ? $newTabMenu[$i]['target'] : $atarget), ($newTabMenu[$i]['mainmenu'] ? $newTabMenu[$i]['mainmenu'] : $newTabMenu[$i]['rowid']), ($newTabMenu[$i]['leftmenu'] ? $newTabMenu[$i]['leftmenu'] : ''), $newTabMenu[$i]['position'], $id, $idsel, $classname);
|
||||
$menu->add($shorturl, $newTabMenu[$i]['titre'], 0, $showmode, ($newTabMenu[$i]['target'] ? $newTabMenu[$i]['target'] : $atarget),
|
||||
($newTabMenu[$i]['mainmenu'] ? $newTabMenu[$i]['mainmenu'] : $newTabMenu[$i]['rowid']),
|
||||
($newTabMenu[$i]['leftmenu'] ? $newTabMenu[$i]['leftmenu'] : ''),
|
||||
$newTabMenu[$i]['position'], $id, $idsel, $classname);
|
||||
}
|
||||
|
||||
// Sort on position
|
||||
@ -517,7 +523,6 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout =
|
||||
print "\n".'<!-- Show logo on menu -->'."\n";
|
||||
print_start_menu_entry('companylogo', 'class="tmenu tmenucompanylogo nohover"', 1);
|
||||
|
||||
|
||||
print '<div class="center '.$logoContainerAdditionalClass.' menulogocontainer"><img class="mycompany" title="'.dol_escape_htmltag($title).'" alt="" src="'.$urllogo.'" style="max-width: 100px"></div>'."\n";
|
||||
|
||||
print_end_menu_entry(4);
|
||||
@ -1482,7 +1487,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "withdraw") {
|
||||
$newmenu->add("/compta/prelevement/create.php?mainmenu=bank", $langs->trans("NewStandingOrder"), 1, $user->rights->prelevement->bons->creer);
|
||||
|
||||
$newmenu->add("/compta/prelevement/bons.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->rights->prelevement->bons->lire);
|
||||
$newmenu->add("/compta/prelevement/orders_list.php?mainmenu=bank", $langs->trans("WithdrawalsReceipts"), 1, $user->rights->prelevement->bons->lire);
|
||||
$newmenu->add("/compta/prelevement/list.php?mainmenu=bank", $langs->trans("WithdrawalsLines"), 1, $user->rights->prelevement->bons->lire);
|
||||
$newmenu->add("/compta/prelevement/rejets.php?mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->prelevement->bons->lire);
|
||||
$newmenu->add("/compta/prelevement/stats.php?mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->prelevement->bons->lire);
|
||||
@ -1497,7 +1502,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
|
||||
if ($usemenuhider || empty($leftmenu) || $leftmenu == "banktransfer") {
|
||||
$newmenu->add("/compta/prelevement/create.php?type=bank-transfer&mainmenu=bank", $langs->trans("NewPaymentByBankTransfer"), 1, $user->rights->paymentbybanktransfer->create);
|
||||
|
||||
$newmenu->add("/compta/prelevement/bons.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->rights->paymentbybanktransfer->read);
|
||||
$newmenu->add("/compta/prelevement/orders_list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferReceipts"), 1, $user->rights->paymentbybanktransfer->read);
|
||||
$newmenu->add("/compta/prelevement/list.php?type=bank-transfer&mainmenu=bank", $langs->trans("PaymentByBankTransferLines"), 1, $user->rights->paymentbybanktransfer->read);
|
||||
$newmenu->add("/compta/prelevement/rejets.php?type=bank-transfer&mainmenu=bank", $langs->trans("Rejects"), 1, $user->rights->paymentbybanktransfer->read);
|
||||
$newmenu->add("/compta/prelevement/stats.php?type=bank-transfer&mainmenu=bank", $langs->trans("Statistics"), 1, $user->rights->paymentbybanktransfer->read);
|
||||
|
||||
@ -66,15 +66,15 @@ class MenuManager
|
||||
{
|
||||
global $conf, $user, $langs;
|
||||
|
||||
// On sauve en session le menu principal choisi
|
||||
if (isset($_GET["mainmenu"])) $_SESSION["mainmenu"] = $_GET["mainmenu"];
|
||||
if (isset($_GET["idmenu"])) $_SESSION["idmenu"] = $_GET["idmenu"];
|
||||
// We save into session the main menu selected
|
||||
if (GETPOSTISSET("mainmenu")) $_SESSION["mainmenu"] = GETPOST("mainmenu", 'aZ09');
|
||||
if (GETPOSTISSET("idmenu")) $_SESSION["idmenu"] = GETPOST("idmenu", 'int');
|
||||
|
||||
// Read mainmenu and leftmenu that define which menu to show
|
||||
if (isset($_GET["mainmenu"]))
|
||||
// Read now mainmenu and leftmenu that define which menu to show
|
||||
if (GETPOSTISSET("mainmenu"))
|
||||
{
|
||||
// On sauve en session le menu principal choisi
|
||||
$mainmenu = $_GET["mainmenu"];
|
||||
$mainmenu = GETPOST("mainmenu", 'aZ09');
|
||||
$_SESSION["mainmenu"] = $mainmenu;
|
||||
$_SESSION["leftmenuopened"] = "";
|
||||
} else {
|
||||
@ -83,10 +83,10 @@ class MenuManager
|
||||
}
|
||||
if (!empty($forcemainmenu)) $mainmenu = $forcemainmenu;
|
||||
|
||||
if (isset($_GET["leftmenu"]))
|
||||
if (GETPOSTISSET("leftmenu"))
|
||||
{
|
||||
// On sauve en session le menu principal choisi
|
||||
$leftmenu = $_GET["leftmenu"];
|
||||
$leftmenu = GETPOST("leftmenu", 'aZ09');
|
||||
$_SESSION["leftmenu"] = $leftmenu;
|
||||
|
||||
if ($_SESSION["leftmenuopened"] == $leftmenu) // To collapse
|
||||
@ -147,7 +147,6 @@ class MenuManager
|
||||
if ($mode == 'top') print_left_eldy_menu($this->db, $this->menu_array, $this->menu_array_after, $this->tabMenu, $this->menu, 0);
|
||||
if ($mode == 'left') print_eldy_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 0, $mode);
|
||||
}
|
||||
|
||||
if ($mode == 'topnb')
|
||||
{
|
||||
print_eldy_menu($this->db, $this->atarget, $this->type_user, $this->tabMenu, $this->menu, 1, $mode); // no output
|
||||
|
||||
@ -39,6 +39,8 @@ if (!empty($conf->commande->enabled))
|
||||
{
|
||||
$langs->load("orders");
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'#order" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Order")).': ';
|
||||
print '<input type="text class="flat" id="generate_order_ref" name="generate_order_ref" value="'.GETPOST('generate_order_ref', 'alpha').'" size="10">';
|
||||
print '<input type="submit" class="none button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||
@ -62,6 +64,8 @@ if (!empty($conf->facture->enabled))
|
||||
{
|
||||
$langs->load("bills");
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'#invoice" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Invoice")).': ';
|
||||
print '<input type="text class="flat" id="generate_invoice_ref" name="generate_invoice_ref" value="'.GETPOST('generate_invoice_ref', 'alpha').'" size="10">';
|
||||
print '<input type="submit" class="none button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||
@ -85,6 +89,8 @@ if (!empty($conf->contrat->enabled))
|
||||
{
|
||||
$langs->load("contracts");
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'#contractline" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("ContractLine")).': ';
|
||||
print '<input type="text class="flat" id="generate_contract_ref" name="generate_contract_ref" value="'.GETPOST('generate_contract_ref', 'alpha').'" size="10">';
|
||||
print '<input type="submit" class="none button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||
@ -108,6 +114,8 @@ if (!empty($conf->adherent->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'#membersubscription" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Member")).': ';
|
||||
print '<input type="text class="flat" id="generate_member_ref" name="generate_member_ref" value="'.GETPOST('generate_member_ref', 'alpha').'" size="10">';
|
||||
print '<input type="submit" class="none reposition button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||
@ -131,6 +139,8 @@ if (!empty($conf->don->enabled))
|
||||
{
|
||||
$langs->load("members");
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'#donation" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print $langs->trans("EnterRefToBuildUrl", $langs->transnoentitiesnoconv("Don")).': ';
|
||||
print '<input type="text class="flat" id="generate_donation_ref" name="generate_donation_ref" value="'.GETPOST('generate_donation_ref', 'alpha').'" size="10">';
|
||||
print '<input type="submit" class="none reposition button" value="'.$langs->trans("GetSecuredUrl").'">';
|
||||
|
||||
@ -318,6 +318,7 @@ if (is_array($extrafields->attributes[$object->table_element]['label']) && count
|
||||
if (!$search_all) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid';
|
||||
if ($search_all || $search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det as pd ON f.rowid=pd.fk_facture_fourn';
|
||||
if ($search_product_category > 0) $sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product';
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."projet as p ON p.rowid = f.fk_projet";
|
||||
// We'll need this table joined to the select in order to filter by sale
|
||||
if ($search_sale > 0 || (!$user->rights->societe->client->voir && !$socid)) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||
@ -326,7 +327,6 @@ if ($search_user > 0)
|
||||
$sql .= ", ".MAIN_DB_PREFIX."element_contact as ec";
|
||||
$sql .= ", ".MAIN_DB_PREFIX."c_type_contact as tc";
|
||||
}
|
||||
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'user AS u ON f.fk_user_author = u.rowid';
|
||||
$sql .= ' WHERE f.fk_soc = s.rowid';
|
||||
$sql .= ' AND f.entity IN ('.getEntity('facture_fourn').')';
|
||||
if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = ".$user->id;
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@ -328,3 +328,5 @@ ALTER TABLE llx_paiement ADD COLUMN ref_ext varchar(255) AFTER ref;
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_id integer;
|
||||
ALTER TABLE llx_bank ADD COLUMN origin_type varchar(64) NULL;
|
||||
ALTER TABLE llx_bank ADD COLUMN import_key varchar(14);
|
||||
|
||||
ALTER TABLE llx_menu MODIFY COLUMN enabled text;
|
||||
|
||||
@ -39,7 +39,7 @@ CREATE TABLE llx_menu
|
||||
langs varchar(100), -- Lang file to load for translation
|
||||
level smallint, -- Deprecated. Not used.
|
||||
perms text, -- Condition to show enabled or disabled
|
||||
enabled varchar(255) NULL default '1', -- Condition to show or hide
|
||||
enabled text NULL default '1', -- Condition to show or hide
|
||||
usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only
|
||||
tms timestamp
|
||||
|
||||
|
||||
@ -55,7 +55,7 @@ $search_ref = GETPOST('search_ref', 'int');
|
||||
$search_label = GETPOST('search_label', 'alpha');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'loanlist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
|
||||
|
||||
@ -365,8 +365,8 @@ if (!defined('NOTOKENRENEWAL'))
|
||||
if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->global->MAIN_SECURITY_CSRF_WITH_TOKEN))
|
||||
|| defined('CSRFCHECK_WITH_TOKEN')) // Check validity of token, only if option MAIN_SECURITY_CSRF_WITH_TOKEN enabled or if constant CSRFCHECK_WITH_TOKEN is set
|
||||
{
|
||||
// Check all cases that need a token (all POST and some GET)
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST' || (GETPOSTISSET('action') && defined('CSRFCHECK_WITH_TOKEN')) || in_array(GETPOST('action', 'aZ09'), array('add', 'update', 'install')))
|
||||
// Check all cases that need a token (all POST actions, all actions and mass actions on pages with CSRFCHECK_WITH_TOKEN set, all sensitive GET actions)
|
||||
if ($_SERVER['REQUEST_METHOD'] == 'POST' || ((GETPOSTISSET('action') || GETPOSTISSET('massaction')) && defined('CSRFCHECK_WITH_TOKEN')) || in_array(GETPOST('action', 'aZ09'), array('add', 'update', 'install', 'delete')))
|
||||
{
|
||||
if (!GETPOSTISSET('token')) {
|
||||
dol_syslog("--- Access to ".$_SERVER["PHP_SELF"]." refused by CSRFCHECK_WITH_TOKEN protection. Token not provided.");
|
||||
@ -384,10 +384,12 @@ if ((!defined('NOCSRFCHECK') && empty($dolibarr_nocsrfcheck) && !empty($conf->gl
|
||||
//if ($conf->global->MAIN_FEATURES_LEVEL >= 1) setEventMessages('Unset POST and GET params by CSRF protection in main.inc.php (Token provided was not generated by the previous page).'."<br>\n".'$_SERVER[REQUEST_URI] = '.$_SERVER['REQUEST_URI'].' $_SERVER[REQUEST_METHOD] = '.$_SERVER['REQUEST_METHOD'].' GETPOST(token) = '.GETPOST('token', 'alpha').' $_SESSION[token] = '.$_SESSION['token'], null, 'warnings');
|
||||
$savid = ((int) $_POST['id']);
|
||||
unset($_POST);
|
||||
//unset($_POST['action']);
|
||||
//unset($_POST['confirm']);
|
||||
//unset($_POST['action']); unset($_POST['massaction']);
|
||||
//unset($_POST['confirm']); unset($_POST['confirmmassaction']);
|
||||
unset($_GET['confirm']);
|
||||
unset($_GET['action']);
|
||||
unset($_GET['confirmmassaction']);
|
||||
unset($_GET['massaction']);
|
||||
$_POST['id'] = ((int) $savid);
|
||||
}
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'opensurveylist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -110,7 +110,7 @@ $head[$h][1] = $langs->trans("PayBox");
|
||||
$head[$h][2] = 'payboxaccount';
|
||||
$h++;
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setvalue">';
|
||||
|
||||
|
||||
@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorycard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
if (empty($conf->global->MAIN_USE_ADVANCED_PERMS))
|
||||
|
||||
@ -37,7 +37,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'inventorycard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
$fk_warehouse = GETPOST('fk_warehouse', 'int');
|
||||
|
||||
@ -39,7 +39,7 @@ $id = GETPOST('id', 'int');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'productlotlist'; // To manage different context of search
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
$search_entity = GETPOST('search_entity', 'int');
|
||||
|
||||
@ -44,7 +44,7 @@ $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choi
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'timespentlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'alpha');
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ $langs->loadLangs(array("companies", "website"));
|
||||
|
||||
$action = GETPOST('action', 'aZ09') ?GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
|
||||
$show_files = GETPOST('show_files', 'int');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -157,7 +157,7 @@ print load_fiche_titre($langs->trans("ModuleSetup").' Stripe', $linkback);
|
||||
|
||||
$head = stripeadmin_prepare_head();
|
||||
|
||||
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="action" value="setvalue">';
|
||||
|
||||
|
||||
@ -79,195 +79,207 @@ $stripeacc = $stripe->getStripeAccount($service);
|
||||
if (!$rowid)
|
||||
{
|
||||
$option = array('limit' => $limit + 1);
|
||||
$num = 0;
|
||||
|
||||
if (GETPOSTISSET('starting_after_'.$page)) $option['starting_after'] = GETPOST('starting_after_'.$page, 'alphanohtml');
|
||||
if ($stripeacc)
|
||||
{
|
||||
$list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$list = \Stripe\Charge::all($option);
|
||||
}
|
||||
|
||||
$num = count($list->data);
|
||||
$totalnboflines = '';
|
||||
|
||||
$param = '';
|
||||
//if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
$param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id;
|
||||
//$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id;
|
||||
|
||||
$moreforfilter = '';
|
||||
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
$title = $langs->trans("StripeChargeList");
|
||||
$title .= ($stripeacc ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)');
|
||||
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', 'hidepaginationprevious', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("StripeCustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
//print $list;
|
||||
$i = 0;
|
||||
foreach ($list->data as $charge)
|
||||
{
|
||||
if ($i >= $limit) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ($charge->refunded == '1') {
|
||||
$status = img_picto($langs->trans("refunded"), 'statut6');
|
||||
} elseif ($charge->paid == '1') {
|
||||
$status = img_picto($langs->trans((string) $charge->status), 'statut4');
|
||||
} else {
|
||||
$label = $langs->trans("Message").": ".$charge->failure_message."<br>";
|
||||
$label .= $langs->trans("Network").": ".$charge->outcome->network_status."<br>";
|
||||
$label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message);
|
||||
$status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1);
|
||||
}
|
||||
|
||||
if ($charge->payment_method_details->type == 'card') {
|
||||
$type = $langs->trans("card");
|
||||
} elseif ($charge->source->type == 'card') {
|
||||
$type = $langs->trans("card");
|
||||
} elseif ($charge->payment_method_details->type == 'three_d_secure') {
|
||||
$type = $langs->trans("card3DS");
|
||||
} elseif ($charge->payment_method_details->type == 'sepa_debit') {
|
||||
$type = $langs->trans("sepadebit");
|
||||
} elseif ($charge->payment_method_details->type == 'ideal') {
|
||||
$type = $langs->trans("iDEAL");
|
||||
}
|
||||
|
||||
// Why this ?
|
||||
/*if (! empty($charge->payment_intent)) {
|
||||
if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage
|
||||
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent);
|
||||
} else {
|
||||
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc));
|
||||
}
|
||||
}*/
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
$FULLTAG = $charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG, '.', '=');
|
||||
// Load origin object according to metadata
|
||||
if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0)
|
||||
try {
|
||||
if ($stripeacc)
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
} elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0)
|
||||
{
|
||||
$societestatic->fetch($charge->metadata->dol_thirdparty_id);
|
||||
$list = \Stripe\Charge::all($option, array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$societestatic->id = 0;
|
||||
}
|
||||
if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0)
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
} else {
|
||||
$memberstatic->id = 0;
|
||||
$list = \Stripe\Charge::all($option);
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
$num = count($list->data);
|
||||
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
$totalnboflines = '';
|
||||
|
||||
// Ref
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id;
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id;
|
||||
}
|
||||
print "<td>";
|
||||
print "<a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id."</a>";
|
||||
if ($charge->payment_intent) print '<br><span class="opacitymedium">'.$charge->payment_intent.'</span>';
|
||||
print "</td>\n";
|
||||
$param = '';
|
||||
//if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) $param .= '&contextpage='.urlencode($contextpage);
|
||||
if ($limit > 0 && $limit != $conf->liste_limit) $param .= '&limit='.urlencode($limit);
|
||||
$param .= '&starting_after_'.($page + 1).'='.$list->data[($limit - 1)]->id;
|
||||
//$param.='&ending_before_'.($page+1).'='.$list->data[($limit-1)]->id;
|
||||
|
||||
// Stripe customer
|
||||
print "<td>";
|
||||
if (!empty($conf->stripe->enabled) && !empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer;
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer;
|
||||
}
|
||||
if (!empty($charge->customer))
|
||||
{
|
||||
print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.'</a>';
|
||||
}
|
||||
print "</td>\n";
|
||||
$moreforfilter = '';
|
||||
|
||||
// Link
|
||||
print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
} elseif ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
// Origin
|
||||
print "<td>";
|
||||
if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") {
|
||||
$object = new Commande($db);
|
||||
$object->fetch($charge->metadata->dol_id);
|
||||
if ($object->id > 0) {
|
||||
print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
} elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") {
|
||||
print $charge->metadata->dol_type.' '.$charge->metadata->dol_id.' - ';
|
||||
$object = new Facture($db);
|
||||
$object->fetch($charge->metadata->dol_id);
|
||||
if ($object->id > 0) {
|
||||
print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
print "</td>\n";
|
||||
$title = $langs->trans("StripeChargeList");
|
||||
$title .= ($stripeacc ? ' (Stripe connection with Stripe OAuth Connect account '.$stripeacc.')' : ' (Stripe connection with keys from Stripe module setup)');
|
||||
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>';
|
||||
print $type;
|
||||
print '</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."</td>";
|
||||
// Status
|
||||
print '<td class="right">';
|
||||
print $status;
|
||||
print "</td>\n";
|
||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, '', 'hidepaginationprevious', $limit);
|
||||
|
||||
print '<div class="div-table-responsive">';
|
||||
print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n";
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre("Ref", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("StripeCustomerId", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Customer", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("Origin", $_SERVER["PHP_SELF"], "", "", "", "", $sortfield, $sortorder);
|
||||
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'center ');
|
||||
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'left ');
|
||||
print_liste_field_titre("Paid", $_SERVER["PHP_SELF"], "", "", "", '', $sortfield, $sortorder, 'right ');
|
||||
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "", "", "", '', '', '', 'right ');
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
//print $list;
|
||||
$i = 0;
|
||||
foreach ($list->data as $charge)
|
||||
{
|
||||
if ($i >= $limit) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ($charge->refunded == '1') {
|
||||
$status = img_picto($langs->trans("refunded"), 'statut6');
|
||||
} elseif ($charge->paid == '1') {
|
||||
$status = img_picto($langs->trans((string) $charge->status), 'statut4');
|
||||
} else {
|
||||
$label = $langs->trans("Message").": ".$charge->failure_message."<br>";
|
||||
$label .= $langs->trans("Network").": ".$charge->outcome->network_status."<br>";
|
||||
$label .= $langs->trans("Status").": ".$langs->trans((string) $charge->outcome->seller_message);
|
||||
$status = $form->textwithpicto(img_picto($langs->trans((string) $charge->status), 'statut8'), $label, -1);
|
||||
}
|
||||
|
||||
if ($charge->payment_method_details->type == 'card') {
|
||||
$type = $langs->trans("card");
|
||||
} elseif ($charge->source->type == 'card') {
|
||||
$type = $langs->trans("card");
|
||||
} elseif ($charge->payment_method_details->type == 'three_d_secure') {
|
||||
$type = $langs->trans("card3DS");
|
||||
} elseif ($charge->payment_method_details->type == 'sepa_debit') {
|
||||
$type = $langs->trans("sepadebit");
|
||||
} elseif ($charge->payment_method_details->type == 'ideal') {
|
||||
$type = $langs->trans("iDEAL");
|
||||
}
|
||||
|
||||
// Why this ?
|
||||
/*if (! empty($charge->payment_intent)) {
|
||||
if (empty($stripeacc)) { // If the Stripe connect account not set, we use common API usage
|
||||
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent);
|
||||
} else {
|
||||
$charge = \Stripe\PaymentIntent::retrieve($charge->payment_intent, array("stripe_account" => $stripeacc));
|
||||
}
|
||||
}*/
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
$FULLTAG = $charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG, '.', '=');
|
||||
// Load origin object according to metadata
|
||||
if (!empty($tmparray['CUS']) && $tmparray['CUS'] > 0)
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
} elseif (!empty($charge->metadata->dol_thirdparty_id) && $charge->metadata->dol_thirdparty_id > 0)
|
||||
{
|
||||
$societestatic->fetch($charge->metadata->dol_thirdparty_id);
|
||||
} else {
|
||||
$societestatic->id = 0;
|
||||
}
|
||||
if (!empty($tmparray['MEM']) && $tmparray['MEM'] > 0)
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
} else {
|
||||
$memberstatic->id = 0;
|
||||
}
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
|
||||
// Ref
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/payments/'.$charge->id;
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'payments/'.$charge->id;
|
||||
}
|
||||
print "<td>";
|
||||
print "<a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$charge->id."</a>";
|
||||
if ($charge->payment_intent) print '<br><span class="opacitymedium">'.$charge->payment_intent.'</span>';
|
||||
print "</td>\n";
|
||||
|
||||
// Stripe customer
|
||||
print "<td>";
|
||||
if (!empty($conf->stripe->enabled) && !empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/customers/'.$charge->customer;
|
||||
if ($servicestatus)
|
||||
{
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'customers/'.$charge->customer;
|
||||
}
|
||||
if (!empty($charge->customer))
|
||||
{
|
||||
print '<a href="'.$url.'" target="_stripe">'.img_picto($langs->trans('ShowInStripe'), 'globe').' '.$charge->customer.'</a>';
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Link
|
||||
print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
} elseif ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Origin
|
||||
print "<td>";
|
||||
if ($charge->metadata->dol_type == "order" || $charge->metadata->dol_type == "commande") {
|
||||
$object = new Commande($db);
|
||||
$object->fetch($charge->metadata->dol_id);
|
||||
if ($object->id > 0) {
|
||||
print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$object->id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
} elseif ($charge->metadata->dol_type == "invoice" || $charge->metadata->dol_type == "facture") {
|
||||
print $charge->metadata->dol_type.' '.$charge->metadata->dol_id.' - ';
|
||||
$object = new Facture($db);
|
||||
$object->fetch($charge->metadata->dol_id);
|
||||
if ($object->id > 0) {
|
||||
print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
} else {
|
||||
print $FULLTAG;
|
||||
}
|
||||
print "</td>\n";
|
||||
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($charge->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>';
|
||||
print $type;
|
||||
print '</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($charge->amount - $charge->amount_refunded) / 100, 0, '', 1, - 1, - 1, strtoupper($charge->currency))."</td>";
|
||||
// Status
|
||||
print '<td class="right">';
|
||||
print $status;
|
||||
print "</td>\n";
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
print '</div>';
|
||||
print '</form>';
|
||||
} catch (Exception $e) {
|
||||
print $e->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -109,111 +109,115 @@ if (!$rowid) {
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
if ($stripeacc)
|
||||
{
|
||||
$payout = \Stripe\Payout::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$payout = \Stripe\Payout::all(array("limit" => $limit));
|
||||
}
|
||||
|
||||
foreach ($payout->data as $payout)
|
||||
{
|
||||
//$charge = $payout;
|
||||
//var_dump($payout);
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
/*$FULLTAG=$charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
||||
// Load origin object according to metadata
|
||||
if (! empty($tmparray['CUS']))
|
||||
try {
|
||||
if ($stripeacc)
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$societestatic->id = 0;
|
||||
}
|
||||
if (! empty($tmparray['MEM']))
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberstatic->id = 0;
|
||||
}*/
|
||||
|
||||
$societestatic->fetch($charge->metadata->idcustomer);
|
||||
$societestatic->id = $charge->metadata->idcustomer;
|
||||
$societestatic->lastname = $obj->lastname;
|
||||
$societestatic->firstname = $obj->firstname;
|
||||
$societestatic->admin = $obj->admin;
|
||||
$societestatic->login = $obj->login;
|
||||
$societestatic->email = $obj->email;
|
||||
$societestatic->socid = $obj->fk_soc;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id;
|
||||
if ($servicestatus) {
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'payouts/'.$payout->id;
|
||||
$payout = \Stripe\Payout::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$payout = \Stripe\Payout::all(array("limit" => $limit));
|
||||
}
|
||||
|
||||
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$payout->id."</a></td>\n";
|
||||
foreach ($payout->data as $payout)
|
||||
{
|
||||
//$charge = $payout;
|
||||
//var_dump($payout);
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
/*$FULLTAG=$charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
||||
// Load origin object according to metadata
|
||||
if (! empty($tmparray['CUS']))
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$societestatic->id = 0;
|
||||
}
|
||||
if (! empty($tmparray['MEM']))
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberstatic->id = 0;
|
||||
}*/
|
||||
|
||||
$societestatic->fetch($charge->metadata->idcustomer);
|
||||
$societestatic->id = $charge->metadata->idcustomer;
|
||||
$societestatic->lastname = $obj->lastname;
|
||||
$societestatic->firstname = $obj->firstname;
|
||||
$societestatic->admin = $obj->admin;
|
||||
$societestatic->login = $obj->login;
|
||||
$societestatic->email = $obj->email;
|
||||
$societestatic->socid = $obj->fk_soc;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/payouts/'.$payout->id;
|
||||
if ($servicestatus) {
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'payouts/'.$payout->id;
|
||||
}
|
||||
|
||||
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$payout->id."</a></td>\n";
|
||||
|
||||
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
/*print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
/*print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
}
|
||||
if ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";*/
|
||||
// Origine
|
||||
//print "<td>";
|
||||
////if ($charge->metadata->dol_type=="order"){
|
||||
// $object = new Commande($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
//} elseif ($charge->metadata->dol_type=="invoice"){
|
||||
// $object = new Facture($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
//}
|
||||
//print "</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($payout->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($payout->arrival_date, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>'.$payout->description.'</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($payout->amount) / 100, 0, '', 1, -1, -1, strtoupper($payout->currency))."</td>";
|
||||
// Status
|
||||
print "<td class='right'>";
|
||||
if ($payout->status == 'paid') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut4');
|
||||
} elseif ($payout->status == 'pending') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'in_transit') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'failed') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'canceled') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut8');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
if ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";*/
|
||||
// Origine
|
||||
//print "<td>";
|
||||
////if ($charge->metadata->dol_type=="order"){
|
||||
// $object = new Commande($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
//} elseif ($charge->metadata->dol_type=="invoice"){
|
||||
// $object = new Facture($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
//}
|
||||
//print "</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($payout->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($payout->arrival_date, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>'.$payout->description.'</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($payout->amount) / 100, 0, '', 1, -1, -1, strtoupper($payout->currency))."</td>";
|
||||
// Status
|
||||
print "<td class='right'>";
|
||||
if ($payout->status == 'paid') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut4');
|
||||
} elseif ($payout->status == 'pending') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'in_transit') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'failed') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut7');
|
||||
} elseif ($payout->status == 'canceled') {
|
||||
print img_picto($langs->trans("".$payout->status.""), 'statut8');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
} catch (Exception $e) {
|
||||
print '<tr><td colspan="6">'.$e->getMessage().'</td></td>';
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -108,117 +108,121 @@ if (!$rowid) {
|
||||
|
||||
print "</tr>\n";
|
||||
|
||||
if ($stripeacc)
|
||||
{
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit));
|
||||
}
|
||||
|
||||
foreach ($txn->data as $txn)
|
||||
{
|
||||
//$charge = $txn;
|
||||
//var_dump($txn);
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
/*$FULLTAG=$charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
||||
// Load origin object according to metadata
|
||||
if (! empty($tmparray['CUS']))
|
||||
try {
|
||||
if ($stripeacc)
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit), array("stripe_account" => $stripeacc));
|
||||
} else {
|
||||
$txn = \Stripe\BalanceTransaction::all(array("limit" => $limit));
|
||||
}
|
||||
else
|
||||
|
||||
foreach ($txn->data as $txn)
|
||||
{
|
||||
$societestatic->id = 0;
|
||||
//$charge = $txn;
|
||||
//var_dump($txn);
|
||||
|
||||
// The metadata FULLTAG is defined by the online payment page
|
||||
/*$FULLTAG=$charge->metadata->FULLTAG;
|
||||
|
||||
// Save into $tmparray all metadata
|
||||
$tmparray = dolExplodeIntoArray($FULLTAG,'.','=');
|
||||
// Load origin object according to metadata
|
||||
if (! empty($tmparray['CUS']))
|
||||
{
|
||||
$societestatic->fetch($tmparray['CUS']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$societestatic->id = 0;
|
||||
}
|
||||
if (! empty($tmparray['MEM']))
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberstatic->id = 0;
|
||||
}*/
|
||||
|
||||
$societestatic->fetch($charge->metadata->idcustomer);
|
||||
$societestatic->id = $charge->metadata->idcustomer;
|
||||
$societestatic->lastname = $obj->lastname;
|
||||
$societestatic->firstname = $obj->firstname;
|
||||
$societestatic->admin = $obj->admin;
|
||||
$societestatic->login = $obj->login;
|
||||
$societestatic->email = $obj->email;
|
||||
$societestatic->societe_id = $obj->fk_soc;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
|
||||
// Ref
|
||||
if (preg_match('/po_/i', $txn->source)) {
|
||||
$origin = "payouts";
|
||||
} elseif (preg_match('/fee_/i', $txn->source)) {
|
||||
$origin = "connect/application_fees";
|
||||
} else {
|
||||
$origin = "payments";
|
||||
}
|
||||
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source;
|
||||
if ($servicestatus) {
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source;
|
||||
}
|
||||
if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') {
|
||||
print "<td>".$txn->type."</td>";
|
||||
} else {
|
||||
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$txn->source."</a></td>\n";
|
||||
}
|
||||
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
/*print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
}
|
||||
if ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";*/
|
||||
// Origine
|
||||
//print "<td>";
|
||||
////if ($charge->metadata->dol_type=="order"){
|
||||
// $object = new Commande($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
//} elseif ($charge->metadata->dol_type=="invoice"){
|
||||
// $object = new Facture($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
//}
|
||||
//print "</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($txn->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>'.$txn->type.'</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($txn->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency))."</td>";
|
||||
print '<td class="right">'.price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency))."</td>";
|
||||
// Status
|
||||
print "<td class='right'>";
|
||||
if ($txn->status == 'available') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut4');
|
||||
} elseif ($txn->status == 'pending') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut7');
|
||||
} elseif ($txn->status == 'failed') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut8');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
}
|
||||
if (! empty($tmparray['MEM']))
|
||||
{
|
||||
$memberstatic->fetch($tmparray['MEM']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$memberstatic->id = 0;
|
||||
}*/
|
||||
|
||||
$societestatic->fetch($charge->metadata->idcustomer);
|
||||
$societestatic->id = $charge->metadata->idcustomer;
|
||||
$societestatic->lastname = $obj->lastname;
|
||||
$societestatic->firstname = $obj->firstname;
|
||||
$societestatic->admin = $obj->admin;
|
||||
$societestatic->login = $obj->login;
|
||||
$societestatic->email = $obj->email;
|
||||
$societestatic->societe_id = $obj->fk_soc;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Ref
|
||||
if (!empty($stripeacc)) $connect = $stripeacc.'/';
|
||||
|
||||
// Ref
|
||||
if (preg_match('/po_/i', $txn->source)) {
|
||||
$origin = "payouts";
|
||||
} elseif (preg_match('/fee_/i', $txn->source)) {
|
||||
$origin = "connect/application_fees";
|
||||
} else {
|
||||
$origin = "payments";
|
||||
}
|
||||
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.'test/'.$origin.'/'.$txn->source;
|
||||
if ($servicestatus) {
|
||||
$url = 'https://dashboard.stripe.com/'.$connect.$origin.'/'.$txn->source;
|
||||
}
|
||||
if ($txn->type == 'stripe_fee' || $txn->type == 'reserve_transaction') {
|
||||
print "<td>".$txn->type."</td>";
|
||||
} else {
|
||||
print "<td><a href='".$url."' target='_stripe'>".img_picto($langs->trans('ShowInStripe'), 'globe')." ".$txn->source."</a></td>\n";
|
||||
}
|
||||
|
||||
// Stripe customer
|
||||
//print "<td>".$charge->customer."</td>\n";
|
||||
// Link
|
||||
/*print "<td>";
|
||||
if ($societestatic->id > 0)
|
||||
{
|
||||
print $societestatic->getNomUrl(1);
|
||||
}
|
||||
if ($memberstatic->id > 0)
|
||||
{
|
||||
print $memberstatic->getNomUrl(1);
|
||||
}
|
||||
print "</td>\n";*/
|
||||
// Origine
|
||||
//print "<td>";
|
||||
////if ($charge->metadata->dol_type=="order"){
|
||||
// $object = new Commande($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/commande/card.php?id=".$charge->metadata->dol_id."'>".img_picto('', 'object_order')." ".$object->ref."</a>";
|
||||
//} elseif ($charge->metadata->dol_type=="invoice"){
|
||||
// $object = new Facture($db);
|
||||
// $object->fetch($charge->metadata->dol_id);
|
||||
// print "<a href='".DOL_URL_ROOT."/compta/facture/card.php?facid=".$charge->metadata->dol_id."'>".img_picto('', 'object_invoice')." ".$object->ref."</a>";
|
||||
//}
|
||||
//print "</td>\n";
|
||||
// Date payment
|
||||
print '<td class="center">'.dol_print_date($txn->created, '%d/%m/%Y %H:%M')."</td>\n";
|
||||
// Type
|
||||
print '<td>'.$txn->type.'</td>';
|
||||
// Amount
|
||||
print '<td class="right">'.price(($txn->amount) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency))."</td>";
|
||||
print '<td class="right">'.price(($txn->fee) / 100, 0, '', 1, - 1, - 1, strtoupper($txn->currency))."</td>";
|
||||
// Status
|
||||
print "<td class='right'>";
|
||||
if ($txn->status == 'available') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut4');
|
||||
} elseif ($txn->status == 'pending') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut7');
|
||||
} elseif ($txn->status == 'failed') {
|
||||
print img_picto($langs->trans("".$txn->status.""), 'statut8');
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
} catch (Exception $e) {
|
||||
print '<tr><td colspan="6">'.$e->getMessage().'</td></td>';
|
||||
}
|
||||
print "</table>";
|
||||
print '</div>';
|
||||
|
||||
@ -31,8 +31,8 @@ if (!defined('NOREQUIRESOC')) define('NOREQUIRESOC', '1');
|
||||
//if (! defined('NOREQUIRETRAN')) define('NOREQUIRETRAN','1'); // Not disabled because need to do translations
|
||||
if (!defined('NOCSRFCHECK')) define('NOCSRFCHECK', 1);
|
||||
if (!defined('NOTOKENRENEWAL')) define('NOTOKENRENEWAL', 1);
|
||||
if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login
|
||||
//if (! defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We need top menu content
|
||||
if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed by logon page so without login.
|
||||
//if (!defined('NOREQUIREMENU')) define('NOREQUIREMENU',1); // We load menu manager class (note that object loaded may have wrong content because NOLOGIN is set and some values depends on login)
|
||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
|
||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
|
||||
@ -55,6 +55,10 @@ if (empty($user->id) && !empty($_SESSION['dol_login']))
|
||||
{
|
||||
$user->fetch('', $_SESSION['dol_login'], '', 1);
|
||||
$user->getrights();
|
||||
|
||||
// Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
|
||||
$menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
|
||||
$menumanager->loadMenu();
|
||||
}
|
||||
|
||||
|
||||
@ -190,6 +194,7 @@ $colortext = join(',', colorStringToArray($colortext));
|
||||
$colortextlink = join(',', colorStringToArray($colortextlink));
|
||||
|
||||
$nbtopmenuentries = $menumanager->showmenu('topnb');
|
||||
|
||||
if ($conf->browser->layout == 'phone') $nbtopmenuentries = max($nbtopmenuentries, 10);
|
||||
|
||||
|
||||
|
||||
@ -56,6 +56,10 @@ if (empty($user->id) && !empty($_SESSION['dol_login']))
|
||||
{
|
||||
$user->fetch('', $_SESSION['dol_login'], '', 1);
|
||||
$user->getrights();
|
||||
|
||||
// Reload menu now we have the good user (and we need the good menu to have ->showmenu('topnb') correct.
|
||||
$menumanager = new MenuManager($db, empty($user->socid) ? 0 : 1);
|
||||
$menumanager->loadMenu();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -659,11 +659,15 @@ foreach ($object->fields as $key => $val)
|
||||
if ($search[$key]) $selectedarray = array_values($search[$key]);
|
||||
print Form::multiselectarray('search_fk_statut', $arrayofstatus, $selectedarray, 0, 0, 'minwidth150', 1, 0, '', '', '');
|
||||
print '</td>';
|
||||
} elseif ($key == "fk_soc")
|
||||
{
|
||||
} elseif ($key == "fk_soc") {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'"><input type="text" class="flat maxwidth75" name="search_societe" value="'.dol_escape_htmltag($search_societe).'"></td>';
|
||||
} else {
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'"><input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'"></td>';
|
||||
print '<td class="liste_titre'.($cssforfield ? ' '.$cssforfield : '').'">';
|
||||
if (is_array($val['arrayofkeyval'])) print $form->selectarray('search_'.$key, $val['arrayofkeyval'], $search[$key], $val['notnull'], 0, 0, '', 1, 0, 0, '', 'maxwidth75');
|
||||
elseif (strpos($val['type'], 'integer:') === 0) {
|
||||
print $object->showInputField($val, $key, $search[$key], '', '', 'search_', 'maxwidth150', 1);
|
||||
} elseif (!preg_match('/^(date|timestamp)/', $val['type'])) print '<input type="text" class="flat maxwidth75" name="search_'.$key.'" value="'.dol_escape_htmltag($search[$key]).'">';
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -50,7 +50,9 @@ print load_fiche_titre($title, $linkback, 'title_setup');
|
||||
|
||||
dol_fiche_head(array(), 'general', $tab, 0, 'product');
|
||||
|
||||
print '<form method="post">';
|
||||
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
|
||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
print '<table class="noborder centpercent">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th>'.$langs->trans("Parameters").'</td>'."\n";
|
||||
|
||||
@ -59,7 +59,7 @@ $massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choi
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'alpha');
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'bomlist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
@ -38,7 +38,7 @@ $ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$cancel = GETPOST('cancel', 'aZ09');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'myobjectcard'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'zapiercard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
|
||||
// Initialize technical objects
|
||||
|
||||
@ -41,7 +41,7 @@ $show_files = GETPOST('show_files', 'int'); // Show files area generated by bulk
|
||||
$confirm = GETPOST('confirm', 'alpha'); // Result of a confirmation
|
||||
$cancel = GETPOST('cancel', 'alpha'); // We click on a Cancel button
|
||||
$toselect = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'hooklist'; // To manage different context of search
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ?GETPOST('contextpage', 'aZ') : 'zapierlist'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user