@@ -41,16 +41,16 @@ discard block |
||
| 41 | 41 | if (!defined('NOREQUIREUSER')) { |
| 42 | 42 | define('NOREQUIREUSER', '1'); |
| 43 | 43 | }*/ |
| 44 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 44 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 45 | 45 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 46 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 46 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 47 | 47 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 48 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 48 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 49 | 49 | |
| 50 | 50 | // For MultiCompany module. |
| 51 | 51 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 52 | 52 | // Because 2 entities can have the same ref. |
| 53 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 53 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 54 | 54 | if (is_numeric($entity)) { |
| 55 | 55 | define("DOLENTITY", $entity); |
| 56 | 56 | } |
@@ -164,7 +164,7 @@ discard block |
||
| 164 | 164 | // Ensure that contact is active and select first active contact |
| 165 | 165 | $cid = -1; |
| 166 | 166 | foreach ($contacts as $key => $contact) { |
| 167 | - if ((int)$contact->statut == 1) { |
|
| 167 | + if ((int) $contact->statut == 1) { |
|
| 168 | 168 | $cid = $key; |
| 169 | 169 | break; |
| 170 | 170 | } |
@@ -51,15 +51,15 @@ discard block |
||
| 51 | 51 | * This token and session can be used to get more information. |
| 52 | 52 | */ |
| 53 | 53 | |
| 54 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 54 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 55 | 55 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 56 | 56 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 57 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 57 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 58 | 58 | |
| 59 | 59 | // For MultiCompany module. |
| 60 | 60 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 61 | 61 | // Because 2 entities can have the same ref. |
| 62 | -$entity = (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1)); |
|
| 62 | +$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)); |
|
| 63 | 63 | if (is_numeric($entity)) { |
| 64 | 64 | define("DOLENTITY", $entity); |
| 65 | 65 | } |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | if (getDolGlobalString($paramcreditorlong)) { |
| 163 | 163 | $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
| 164 | 164 | } elseif (getDolGlobalString($paramcreditor)) { |
| 165 | - $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 165 | + $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | |
@@ -295,7 +295,7 @@ discard block |
||
| 295 | 295 | // Set by newpayment.php |
| 296 | 296 | $currencyCodeType = $_SESSION['currencyCodeType']; |
| 297 | 297 | $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; |
| 298 | - $paymentType = $_SESSION['PaymentType']; // Value can be 'Mark', 'Sole', 'Sale' for example |
|
| 298 | + $paymentType = $_SESSION['PaymentType']; // Value can be 'Mark', 'Sole', 'Sale' for example |
|
| 299 | 299 | // From env |
| 300 | 300 | $ipaddress = $_SESSION['ipaddress']; |
| 301 | 301 | |
@@ -398,7 +398,7 @@ discard block |
||
| 398 | 398 | $ipaddress = $_SESSION['ipaddress']; |
| 399 | 399 | } |
| 400 | 400 | if (empty($TRANSACTIONID)) { |
| 401 | - $TRANSACTIONID = empty($_SESSION['TRANSACTIONID']) ? '' : $_SESSION['TRANSACTIONID']; // pi_... or ch_... |
|
| 401 | + $TRANSACTIONID = empty($_SESSION['TRANSACTIONID']) ? '' : $_SESSION['TRANSACTIONID']; // pi_... or ch_... |
|
| 402 | 402 | if (empty($TRANSACTIONID) && GETPOST('payment_intent', 'alphanohtml')) { |
| 403 | 403 | // For the case we use STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION = 2 |
| 404 | 404 | $TRANSACTIONID = GETPOST('payment_intent', 'alphanohtml'); |
@@ -457,7 +457,7 @@ discard block |
||
| 457 | 457 | $adht = new AdherentType($db); |
| 458 | 458 | $object = new Adherent($db); |
| 459 | 459 | |
| 460 | - $result1 = $object->fetch((int)$tmptag['MEM']); |
|
| 460 | + $result1 = $object->fetch((int) $tmptag['MEM']); |
|
| 461 | 461 | $result2 = $adht->fetch($object->typeid); |
| 462 | 462 | |
| 463 | 463 | $defaultdelay = !empty($adht->duration_value) ? $adht->duration_value : 1; |
@@ -503,7 +503,7 @@ discard block |
||
| 503 | 503 | |
| 504 | 504 | // Set amount for the subscription: |
| 505 | 505 | // - First check the amount of the member type. |
| 506 | - $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 506 | + $amountbytype = $adht->amountByType(1); // Load the array of amount per type |
|
| 507 | 507 | $amountexpected = empty($amountbytype[$typeid]) ? 0 : $amountbytype[$typeid]; |
| 508 | 508 | // - If not found, take the default amount |
| 509 | 509 | if (empty($amountexpected) && getDolGlobalString('MEMBER_NEWFORM_AMOUNT')) { |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | if ($object->datefin > 0) { |
| 559 | 559 | $datesubscription = dol_time_plus_duree($object->datefin, 1, 'd'); |
| 560 | 560 | } elseif (getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER')) { |
| 561 | - $datesubscription = dol_time_plus_duree($now, (int)substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1)); |
|
| 561 | + $datesubscription = dol_time_plus_duree($now, (int) substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), 0, -1), substr(getDolGlobalString('MEMBER_SUBSCRIPTION_START_AFTER'), -1)); |
|
| 562 | 562 | } |
| 563 | 563 | |
| 564 | 564 | if (getDolGlobalString('MEMBER_SUBSCRIPTION_START_FIRST_DAY_OF') === "m") { |
@@ -703,7 +703,7 @@ discard block |
||
| 703 | 703 | $thirdparty = new Societe($db); |
| 704 | 704 | $thirdparty->fetch($thirdparty_id); |
| 705 | 705 | |
| 706 | - include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This also set $stripearrayofkeysbyenv |
|
| 706 | + include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This also set $stripearrayofkeysbyenv |
|
| 707 | 707 | $stripe = new Stripe($db); |
| 708 | 708 | //$stripeacc = $stripe->getStripeAccount($service); Already defined previously |
| 709 | 709 | |
@@ -718,7 +718,7 @@ discard block |
||
| 718 | 718 | |
| 719 | 719 | if (preg_match('/^pi_/', $TRANSACTIONID)) { |
| 720 | 720 | // This may throw an error if not found. |
| 721 | - $chpi = \Stripe\PaymentIntent::retrieve($TRANSACTIONID); // payment_intent (pi_...) |
|
| 721 | + $chpi = \Stripe\PaymentIntent::retrieve($TRANSACTIONID); // payment_intent (pi_...) |
|
| 722 | 722 | } else { |
| 723 | 723 | // This throw an error if not found |
| 724 | 724 | $chpi = \Stripe\Charge::retrieve($TRANSACTIONID); // old method, contains the charge id (ch_...) |
@@ -737,7 +737,7 @@ discard block |
||
| 737 | 737 | } |
| 738 | 738 | } else { |
| 739 | 739 | $sql = "INSERT INTO " . MAIN_DB_PREFIX . "societe_account (fk_soc, login, key_account, site, site_account, status, entity, date_creation, fk_user_creat)"; |
| 740 | - $sql .= " VALUES (" . ((int)$object->fk_soc) . ", '', '" . $db->escape($stripecu) . "', 'stripe', '" . $db->escape($stripearrayofkeysbyenv[$servicestatus]['publishable_key']) . "', " . ((int)$servicestatus) . ", " . ((int)$conf->entity) . ", '" . $db->idate(dol_now()) . "', 0)"; |
|
| 740 | + $sql .= " VALUES (" . ((int) $object->fk_soc) . ", '', '" . $db->escape($stripecu) . "', 'stripe', '" . $db->escape($stripearrayofkeysbyenv[$servicestatus]['publishable_key']) . "', " . ((int) $servicestatus) . ", " . ((int) $conf->entity) . ", '" . $db->idate(dol_now()) . "', 0)"; |
|
| 741 | 741 | $resql = $db->query($sql); |
| 742 | 742 | if (!$resql) { // should not happen |
| 743 | 743 | $error++; |
@@ -867,7 +867,7 @@ discard block |
||
| 867 | 867 | } elseif (array_key_exists('INV', $tmptag) && $tmptag['INV'] > 0) { |
| 868 | 868 | // Record payment |
| 869 | 869 | $object = new Facture($db); |
| 870 | - $result = $object->fetch((int)$tmptag['INV']); |
|
| 870 | + $result = $object->fetch((int) $tmptag['INV']); |
|
| 871 | 871 | if ($result) { |
| 872 | 872 | $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; |
| 873 | 873 | |
@@ -918,7 +918,7 @@ discard block |
||
| 918 | 918 | $paiement->paiementid = $paymentTypeId; |
| 919 | 919 | $paiement->num_payment = ''; |
| 920 | 920 | $paiement->note_public = 'Online payment ' . dol_print_date($now, 'standard') . ' from ' . $ipaddress; |
| 921 | - $paiement->ext_payment_id = $TRANSACTIONID; // TODO LDR May be we should store py_... instead of pi_... but we started with pi_... so we continue. |
|
| 921 | + $paiement->ext_payment_id = $TRANSACTIONID; // TODO LDR May be we should store py_... instead of pi_... but we started with pi_... so we continue. |
|
| 922 | 922 | //$paiement->ext_payment_id = $TRANSACTIONID.':'.$customer->id.'@'.$stripearrayofkeysbyenv[$servicestatus]['publishable_key']; // TODO LDR It would be better if we could store this. Do we have customer->id and publishable_key ? |
| 923 | 923 | $paiement->ext_payment_site = $service; |
| 924 | 924 | |
@@ -991,7 +991,7 @@ discard block |
||
| 991 | 991 | } |
| 992 | 992 | } elseif (array_key_exists('ORD', $tmptag) && $tmptag['ORD'] > 0) { |
| 993 | 993 | $object = new Commande($db); |
| 994 | - $result = $object->fetch((int)$tmptag['ORD']); |
|
| 994 | + $result = $object->fetch((int) $tmptag['ORD']); |
|
| 995 | 995 | if ($result) { |
| 996 | 996 | $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; |
| 997 | 997 | |
@@ -1044,8 +1044,8 @@ discard block |
||
| 1044 | 1044 | $paiement->paiementid = $paymentTypeId; |
| 1045 | 1045 | $paiement->num_payment = ''; |
| 1046 | 1046 | $paiement->note_public = 'Online payment ' . dol_print_date($now, 'standard') . ' from ' . $ipaddress; |
| 1047 | - $paiement->ext_payment_id = $TRANSACTIONID; // pi_... for Stripe, ... |
|
| 1048 | - $paiement->ext_payment_site = $service; // 'StripeLive' or 'Stripe', or ... |
|
| 1047 | + $paiement->ext_payment_id = $TRANSACTIONID; // pi_... for Stripe, ... |
|
| 1048 | + $paiement->ext_payment_site = $service; // 'StripeLive' or 'Stripe', or ... |
|
| 1049 | 1049 | |
| 1050 | 1050 | if (!$error) { |
| 1051 | 1051 | $paiement_id = $paiement->create($user, 1); // This include closing invoices and regenerating documents |
@@ -1124,7 +1124,7 @@ discard block |
||
| 1124 | 1124 | } |
| 1125 | 1125 | } elseif (array_key_exists('DON', $tmptag) && $tmptag['DON'] > 0) { |
| 1126 | 1126 | $don = new Don($db); |
| 1127 | - $result = $don->fetch((int)$tmptag['DON']); |
|
| 1127 | + $result = $don->fetch((int) $tmptag['DON']); |
|
| 1128 | 1128 | if ($result) { |
| 1129 | 1129 | $paymentTypeId = 0; |
| 1130 | 1130 | if ($paymentmethod == 'paybox') { |
@@ -1366,7 +1366,7 @@ discard block |
||
| 1366 | 1366 | |
| 1367 | 1367 | if (!$error) { |
| 1368 | 1368 | // Validating the attendee |
| 1369 | - $resultattendee = $attendeetovalidate->fetch((int)$tmptag['ATT']); |
|
| 1369 | + $resultattendee = $attendeetovalidate->fetch((int) $tmptag['ATT']); |
|
| 1370 | 1370 | if ($resultattendee < 0) { |
| 1371 | 1371 | $error++; |
| 1372 | 1372 | setEventMessages(null, $attendeetovalidate->errors, "errors"); |
@@ -1592,7 +1592,7 @@ discard block |
||
| 1592 | 1592 | if (!$error) { |
| 1593 | 1593 | // Putting the booth to "suggested" state |
| 1594 | 1594 | $booth = new ConferenceOrBooth($db); |
| 1595 | - $resultbooth = $booth->fetch((int)$tmptag['BOO']); |
|
| 1595 | + $resultbooth = $booth->fetch((int) $tmptag['BOO']); |
|
| 1596 | 1596 | if ($resultbooth < 0) { |
| 1597 | 1597 | $error++; |
| 1598 | 1598 | setEventMessages(null, $booth->errors, "errors"); |
@@ -1681,7 +1681,7 @@ discard block |
||
| 1681 | 1681 | } |
| 1682 | 1682 | } elseif (array_key_exists('CON', $tmptag) && $tmptag['CON'] > 0) { |
| 1683 | 1683 | $object = new Contrat($db); |
| 1684 | - $result = $object->fetch((int)$tmptag['CON']); |
|
| 1684 | + $result = $object->fetch((int) $tmptag['CON']); |
|
| 1685 | 1685 | if ($result) { |
| 1686 | 1686 | $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"]; |
| 1687 | 1687 | |
@@ -1718,7 +1718,7 @@ discard block |
||
| 1718 | 1718 | if (isModEnabled('invoice')) { |
| 1719 | 1719 | if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) { |
| 1720 | 1720 | $invoice = new Facture($db); |
| 1721 | - $result = $invoice->createFromContract($object, $user, array((int)$contract_lines)); |
|
| 1721 | + $result = $invoice->createFromContract($object, $user, array((int) $contract_lines)); |
|
| 1722 | 1722 | if ($result > 0) { |
| 1723 | 1723 | // $object->classifyBilled($user); |
| 1724 | 1724 | $invoice->validate($user); |
@@ -1737,8 +1737,8 @@ discard block |
||
| 1737 | 1737 | $paiement->paiementid = $paymentTypeId; |
| 1738 | 1738 | $paiement->num_payment = ''; |
| 1739 | 1739 | $paiement->note_public = 'Online payment ' . dol_print_date($now, 'standard') . ' from ' . $ipaddress; |
| 1740 | - $paiement->ext_payment_id = $TRANSACTIONID; // pi_... for Stripe, ... |
|
| 1741 | - $paiement->ext_payment_site = $service; // 'StripeLive' or 'Stripe', or ... |
|
| 1740 | + $paiement->ext_payment_id = $TRANSACTIONID; // pi_... for Stripe, ... |
|
| 1741 | + $paiement->ext_payment_site = $service; // 'StripeLive' or 'Stripe', or ... |
|
| 1742 | 1742 | |
| 1743 | 1743 | if (!$error) { |
| 1744 | 1744 | $paiement_id = $paiement->create($user, 1); // This include closing invoices and regenerating documents |
@@ -1835,7 +1835,7 @@ discard block |
||
| 1835 | 1835 | // Set by newpayment.php |
| 1836 | 1836 | $currencyCodeType = empty($_SESSION['currencyCodeType']) ? '' : $_SESSION['currencyCodeType']; |
| 1837 | 1837 | $FinalPaymentAmt = empty($_SESSION["FinalPaymentAmt"]) ? '' : $_SESSION["FinalPaymentAmt"]; |
| 1838 | - $paymentType = empty($_SESSION['PaymentType']) ? '' : $_SESSION['PaymentType']; // Seems used by paypal only |
|
| 1838 | + $paymentType = empty($_SESSION['PaymentType']) ? '' : $_SESSION['PaymentType']; // Seems used by paypal only |
|
| 1839 | 1839 | |
| 1840 | 1840 | if (is_object($object) && method_exists($object, 'call_trigger')) { |
| 1841 | 1841 | // Call trigger |
@@ -1911,12 +1911,12 @@ discard block |
||
| 1911 | 1911 | $topic = '[' . $appli . '] ' . $companylangs->transnoentitiesnoconv("NewOnlinePaymentReceived"); |
| 1912 | 1912 | $content = ""; |
| 1913 | 1913 | if (array_key_exists('MEM', $tmptag)) { |
| 1914 | - $url = $urlwithroot . "/adherents/subscription.php?rowid=" . ((int)$tmptag['MEM']); |
|
| 1914 | + $url = $urlwithroot . "/adherents/subscription.php?rowid=" . ((int) $tmptag['MEM']); |
|
| 1915 | 1915 | $content .= '<strong>' . $companylangs->trans("PaymentSubscription") . "</strong><br><br>\n"; |
| 1916 | 1916 | $content .= $companylangs->trans("MemberId") . ': <strong>' . $tmptag['MEM'] . "</strong><br>\n"; |
| 1917 | 1917 | $content .= $companylangs->trans("Link") . ': <a href="' . $url . '">' . $url . '</a>' . "<br>\n"; |
| 1918 | 1918 | } elseif (array_key_exists('INV', $tmptag)) { |
| 1919 | - $url = $urlwithroot . "/compta/facture/card.php?id=" . ((int)$tmptag['INV']); |
|
| 1919 | + $url = $urlwithroot . "/compta/facture/card.php?id=" . ((int) $tmptag['INV']); |
|
| 1920 | 1920 | $content .= '<strong>' . $companylangs->trans("Payment") . "</strong><br><br>\n"; |
| 1921 | 1921 | $content .= $companylangs->trans("InvoiceId") . ': <strong>' . $tmptag['INV'] . "</strong><br>\n"; |
| 1922 | 1922 | //$content.=$companylangs->trans("ThirdPartyId").': '.$tmptag['CUS']."<br>\n"; |
@@ -55,15 +55,15 @@ discard block |
||
| 55 | 55 | * \brief File to offer a way to make a payment for a particular Dolibarr object |
| 56 | 56 | */ |
| 57 | 57 | |
| 58 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 58 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 59 | 59 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 60 | 60 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 61 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 61 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 62 | 62 | |
| 63 | 63 | // For MultiCompany module. |
| 64 | 64 | // Do not use GETPOST here, function is not defined and get of entity must be done before including main.inc.php |
| 65 | 65 | // Because 2 entities can have the same ref. |
| 66 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1)))); |
|
| 66 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)))); |
|
| 67 | 67 | if (is_numeric($entity)) { |
| 68 | 68 | define("DOLENTITY", $entity); |
| 69 | 69 | } |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | $attendeeid = $linkedAttendees[0]; |
| 143 | 143 | }*/ |
| 144 | 144 | $sql = "SELECT rowid FROM " . MAIN_DB_PREFIX . "eventorganization_conferenceorboothattendee"; |
| 145 | - $sql .= " WHERE fk_invoice = " . ((int)$invoiceid); |
|
| 145 | + $sql .= " WHERE fk_invoice = " . ((int) $invoiceid); |
|
| 146 | 146 | $resql = $db->query($sql); |
| 147 | 147 | if ($resql) { |
| 148 | 148 | $obj = $db->fetch_object($resql); |
@@ -250,8 +250,8 @@ discard block |
||
| 250 | 250 | $urlko .= 'securekey=' . urlencode($SECUREKEY) . '&'; |
| 251 | 251 | } |
| 252 | 252 | if (!empty($entity)) { |
| 253 | - $urlok .= 'e=' . urlencode((string)($entity)) . '&'; |
|
| 254 | - $urlko .= 'e=' . urlencode((string)($entity)) . '&'; |
|
| 253 | + $urlok .= 'e=' . urlencode((string) ($entity)) . '&'; |
|
| 254 | + $urlko .= 'e=' . urlencode((string) ($entity)) . '&'; |
|
| 255 | 255 | } |
| 256 | 256 | if (!empty($getpostlang)) { |
| 257 | 257 | $urlok .= 'lang=' . urlencode($getpostlang) . '&'; |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | if (!empty($conf->global->$paramcreditorlong)) { |
| 355 | 355 | $creditor = getDolGlobalString($paramcreditorlong); // use label long of the seller to show |
| 356 | 356 | } elseif (!empty($conf->global->$paramcreditor)) { |
| 357 | - $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 357 | + $creditor = getDolGlobalString($paramcreditor); // use label short of the seller to show |
|
| 358 | 358 | } |
| 359 | 359 | |
| 360 | 360 | $mesg = ''; |
@@ -802,8 +802,8 @@ discard block |
||
| 802 | 802 | $remoteip = getUserRemoteIP(); |
| 803 | 803 | |
| 804 | 804 | $_SESSION["onlinetoken"] = $stripeToken; |
| 805 | - $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 806 | - $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 805 | + $_SESSION["FinalPaymentAmt"] = $amount; // amount really paid (coming from Stripe). Will be used for check in paymentok.php. |
|
| 806 | + $_SESSION["currencyCodeType"] = $currency; // currency really used for payment (coming from Stripe). Will be used for check in paymentok.php. |
|
| 807 | 807 | $_SESSION["paymentType"] = ''; |
| 808 | 808 | $_SESSION['ipaddress'] = ($remoteip ? $remoteip : 'unknown'); // Payer ip |
| 809 | 809 | $_SESSION['payerID'] = is_object($customer) ? $customer->id : ''; |
@@ -986,7 +986,7 @@ discard block |
||
| 986 | 986 | print $text; |
| 987 | 987 | |
| 988 | 988 | // Output payment summary form |
| 989 | -print '<tr><td align="center">'; // class=center does not have the payment button centered so we keep align here. |
|
| 989 | +print '<tr><td align="center">'; // class=center does not have the payment button centered so we keep align here. |
|
| 990 | 990 | print '<table class="centpercent left" id="tablepublicpayment">'; |
| 991 | 991 | print '<tr class="hideonsmartphone"><td colspan="2" align="left" class="opacitymedium">' . $langs->trans("ThisIsInformationOnPayment") . ' :</td></tr>' . "\n"; |
| 992 | 992 | |
@@ -1026,7 +1026,7 @@ discard block |
||
| 1026 | 1026 | // Currency |
| 1027 | 1027 | print ' <b>' . $langs->trans("Currency" . $currency) . '</b>'; |
| 1028 | 1028 | } else { |
| 1029 | - print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1029 | + print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1030 | 1030 | print '<input type="hidden" name="amount" value="' . $amount . '">'; |
| 1031 | 1031 | print '<input type="hidden" name="newamount" value="' . $amount . '">'; |
| 1032 | 1032 | } |
@@ -1125,7 +1125,7 @@ discard block |
||
| 1125 | 1125 | // Currency |
| 1126 | 1126 | print ' <b>' . $langs->trans("Currency" . $currency) . '</b>'; |
| 1127 | 1127 | } else { |
| 1128 | - print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1128 | + print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1129 | 1129 | print '<input type="hidden" name="amount" value="' . $amount . '">'; |
| 1130 | 1130 | print '<input type="hidden" name="newamount" value="' . $amount . '">'; |
| 1131 | 1131 | } |
@@ -1256,12 +1256,12 @@ discard block |
||
| 1256 | 1256 | print '<input class="flat maxwidth75" type="text" name="newamount" value="' . price2num(GETPOST("newamount", "alpha"), 'MT') . '">'; |
| 1257 | 1257 | print ' <b>' . $langs->trans("Currency" . $currency) . '</b>'; |
| 1258 | 1258 | } else { |
| 1259 | - print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1259 | + print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1260 | 1260 | print '<input type="hidden" name="amount" value="' . $amount . '">'; |
| 1261 | 1261 | print '<input type="hidden" name="newamount" value="' . $amount . '">'; |
| 1262 | 1262 | } |
| 1263 | 1263 | } else { |
| 1264 | - print '<b class="amount">' . price($object->total_ttc, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1264 | + print '<b class="amount">' . price($object->total_ttc, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1265 | 1265 | } |
| 1266 | 1266 | print '<input type="hidden" name="currency" value="' . $currency . '">'; |
| 1267 | 1267 | print '</td></tr>' . "\n"; |
@@ -1464,7 +1464,7 @@ discard block |
||
| 1464 | 1464 | // Currency |
| 1465 | 1465 | print ' <b>' . $langs->trans("Currency" . $currency) . '</b>'; |
| 1466 | 1466 | } else { |
| 1467 | - print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1467 | + print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1468 | 1468 | print '<input type="hidden" name="amount" value="' . $amount . '">'; |
| 1469 | 1469 | print '<input type="hidden" name="newamount" value="' . $amount . '">'; |
| 1470 | 1470 | } |
@@ -1619,7 +1619,7 @@ discard block |
||
| 1619 | 1619 | |
| 1620 | 1620 | if ($member->type) { |
| 1621 | 1621 | $oldtypeid = $member->typeid; |
| 1622 | - $newtypeid = (int)(GETPOSTISSET("typeid") ? GETPOSTINT("typeid") : $member->typeid); |
|
| 1622 | + $newtypeid = (int) (GETPOSTISSET("typeid") ? GETPOSTINT("typeid") : $member->typeid); |
|
| 1623 | 1623 | |
| 1624 | 1624 | if (getDolGlobalString('MEMBER_ALLOW_CHANGE_OF_TYPE')) { |
| 1625 | 1625 | $adht = new AdherentType($db); |
@@ -1633,7 +1633,7 @@ discard block |
||
| 1633 | 1633 | |
| 1634 | 1634 | // Set the new member type |
| 1635 | 1635 | $member->typeid = $newtypeid; |
| 1636 | - $member->type = (string)dol_getIdFromCode($db, $newtypeid, 'adherent_type', 'rowid', 'libelle'); |
|
| 1636 | + $member->type = (string) dol_getIdFromCode($db, $newtypeid, 'adherent_type', 'rowid', 'libelle'); |
|
| 1637 | 1637 | |
| 1638 | 1638 | // list member type |
| 1639 | 1639 | if (!$action) { |
@@ -1677,7 +1677,7 @@ discard block |
||
| 1677 | 1677 | print '<input type="text" class="width75" name="newamount" value="' . price($amount, 1, $langs, 1, -1, -1) . '">'; |
| 1678 | 1678 | } |
| 1679 | 1679 | } else { |
| 1680 | - print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1680 | + print '<b class="amount">' . price($amount, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1681 | 1681 | if ($minimumamount > $amount) { |
| 1682 | 1682 | print ' <span class="opacitymedium small">' . $langs->trans("AmountIsLowerToMinimumNotice", price($minimumamount, 1, $langs, 1, -1, -1, $currency)) . '</span>'; |
| 1683 | 1683 | } |
@@ -1837,7 +1837,7 @@ discard block |
||
| 1837 | 1837 | $valtoshow = max(getDolGlobalString('DONATION_MIN_AMOUNT'), $valtoshow); |
| 1838 | 1838 | $amount = $valtoshow; |
| 1839 | 1839 | } |
| 1840 | - print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1840 | + print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1841 | 1841 | print '<input type="hidden" name="amount" value="' . $valtoshow . '">'; |
| 1842 | 1842 | print '<input type="hidden" name="newamount" value="' . $valtoshow . '">'; |
| 1843 | 1843 | } |
@@ -1930,7 +1930,7 @@ discard block |
||
| 1930 | 1930 | print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Amount"); |
| 1931 | 1931 | print '</td><td class="CTableRow2">'; |
| 1932 | 1932 | $valtoshow = $amount; |
| 1933 | - print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1933 | + print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 1934 | 1934 | print '<input type="hidden" name="amount" value="' . $valtoshow . '">'; |
| 1935 | 1935 | print '<input type="hidden" name="newamount" value="' . $valtoshow . '">'; |
| 1936 | 1936 | print '<input type="hidden" name="currency" value="' . $currency . '">'; |
@@ -2014,7 +2014,7 @@ discard block |
||
| 2014 | 2014 | print '<tr class="CTableRow2"><td class="CTableRow2">' . $langs->trans("Amount"); |
| 2015 | 2015 | print '</td><td class="CTableRow2">'; |
| 2016 | 2016 | $valtoshow = $amount; |
| 2017 | - print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 2017 | + print '<b class="amount">' . price($valtoshow, 1, $langs, 1, -1, -1, $currency) . '</b>'; // Price with currency |
|
| 2018 | 2018 | print '<input type="hidden" name="amount" value="' . $valtoshow . '">'; |
| 2019 | 2019 | print '<input type="hidden" name="newamount" value="' . $valtoshow . '">'; |
| 2020 | 2020 | print '<input type="hidden" name="currency" value="' . $currency . '">'; |
@@ -32,15 +32,15 @@ |
||
| 32 | 32 | * This token can be used to get more information. |
| 33 | 33 | */ |
| 34 | 34 | |
| 35 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 35 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 36 | 36 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 37 | 37 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 38 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 38 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 39 | 39 | |
| 40 | 40 | // For MultiCompany module. |
| 41 | 41 | // Do not use GETPOST here, function is not defined and this test must be done before including main.inc.php |
| 42 | 42 | // Because 2 entities can have the same ref. |
| 43 | -$entity = (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1)); |
|
| 43 | +$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1)); |
|
| 44 | 44 | if (is_numeric($entity)) { |
| 45 | 45 | define("DOLENTITY", $entity); |
| 46 | 46 | } |
@@ -42,15 +42,15 @@ discard block |
||
| 42 | 42 | */ |
| 43 | 43 | |
| 44 | 44 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 45 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 45 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 46 | 46 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 47 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 47 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 48 | 48 | |
| 49 | 49 | |
| 50 | 50 | // For MultiCompany module. |
| 51 | 51 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 52 | 52 | // Because 2 entities can have the same ref. |
| 53 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 53 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 54 | 54 | if (is_numeric($entity)) { |
| 55 | 55 | define("DOLENTITY", $entity); |
| 56 | 56 | } |
@@ -674,7 +674,7 @@ discard block |
||
| 674 | 674 | //print '<tr><td>'.$langs->trans("URLPhoto").'</td><td><input type="text" name="photo" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('photo')).'"></td></tr>'."\n"; |
| 675 | 675 | // Other attributes |
| 676 | 676 | $parameters['tdclass'] = 'titlefieldauto'; |
| 677 | -$parameters['tpl_context'] = 'public'; // define template context to public |
|
| 677 | +$parameters['tpl_context'] = 'public'; // define template context to public |
|
| 678 | 678 | include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_add.tpl.php'; |
| 679 | 679 | // Comments |
| 680 | 680 | print '<tr>'; |
@@ -30,11 +30,11 @@ |
||
| 30 | 30 | * Change SECURITYKEY to the value defined into your setup of module ClickToDial |
| 31 | 31 | */ |
| 32 | 32 | |
| 33 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 34 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 33 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 34 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 35 | 35 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 36 | 36 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 37 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 37 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 38 | 38 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 39 | 39 | |
| 40 | 40 | // So log file will have a suffix |
@@ -29,10 +29,10 @@ discard block |
||
| 29 | 29 | * \brief Public file to user profile |
| 30 | 30 | */ |
| 31 | 31 | |
| 32 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 32 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 33 | 33 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 34 | 34 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 35 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 35 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 36 | 36 | |
| 37 | 37 | // Load Dolibarr environment |
| 38 | 38 | require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php'; |
@@ -277,7 +277,7 @@ discard block |
||
| 277 | 277 | |
| 278 | 278 | print '<br>'; |
| 279 | 279 | print '<div class="floatleft inline-block valignmiddle paddingleft paddingright">'; |
| 280 | - print '<img style="max-width: 100%" src="' . $dolibarr_main_url_root . '/viewimage.php?modulepart=barcode&entity=' . ((int)$conf->entity) . '&generator=tcpdfbarcode&encoding=QRCODE&code=' . urlencode($qrcodecontent) . '">'; |
|
| 280 | + print '<img style="max-width: 100%" src="' . $dolibarr_main_url_root . '/viewimage.php?modulepart=barcode&entity=' . ((int) $conf->entity) . '&generator=tcpdfbarcode&encoding=QRCODE&code=' . urlencode($qrcodecontent) . '">'; |
|
| 281 | 281 | print '</div>'; |
| 282 | 282 | print '<br>'; |
| 283 | 283 | } |
@@ -35,11 +35,11 @@ discard block |
||
| 35 | 35 | * &id=..., &idfrom=..., &idto=... |
| 36 | 36 | */ |
| 37 | 37 | |
| 38 | -Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 39 | -Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 38 | +Functions::defineIfNotDefined('NOTOKENRENEWAL', 1); // Disables token renewal |
|
| 39 | +Functions::defineIfNotDefined('NOREQUIREMENU', 1); // If there is no need to load and show top and left menu |
|
| 40 | 40 | Functions::defineIfNotDefined('NOREQUIREHTML', 1); // If we don't need to load the html.form.class.php |
| 41 | 41 | Functions::defineIfNotDefined('NOREQUIREAJAX', 1); // Do not load ajax.lib.php library |
| 42 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 42 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 43 | 43 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 44 | 44 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 45 | 45 | |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | // For MultiCompany module. |
| 70 | 70 | // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php |
| 71 | 71 | // Because 2 entities can have the same ref |
| 72 | -$entity = (!empty($_GET['entity']) ? (int)$_GET['entity'] : (!empty($_POST['entity']) ? (int)$_POST['entity'] : 1)); |
|
| 72 | +$entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1)); |
|
| 73 | 73 | if (is_numeric($entity)) { |
| 74 | 74 | define("DOLENTITY", $entity); |
| 75 | 75 | } |
@@ -27,11 +27,11 @@ |
||
| 27 | 27 | * /public/notice.php?transphrase=sentence_to_show |
| 28 | 28 | */ |
| 29 | 29 | |
| 30 | -Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 30 | +Functions::defineIfNotDefined('NOLOGIN', 1); // File must be accessed by logon page so without login |
|
| 31 | 31 | Functions::defineIfNotDefined('NOCSRFCHECK', 1); // We accept to go on this page from external web site. |
| 32 | 32 | Functions::defineIfNotDefined('NOIPCHECK', 1); // Do not check IP defined into conf $dolibarr_main_restrict_ip |
| 33 | -Functions::defineIfNotDefined('NOSESSION', 1); // On CLI mode, no need to use web sessions |
|
| 34 | -Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 33 | +Functions::defineIfNotDefined('NOSESSION', 1); // On CLI mode, no need to use web sessions |
|
| 34 | +Functions::defineIfNotDefined('NOBROWSERNOTIF', 1); // Disable browser notification |
|
| 35 | 35 | |
| 36 | 36 | // Load Dolibarr environment |
| 37 | 37 | require constant('DOL_DOCUMENT_ROOT') . '/main.inc.php'; |