newonlinesign.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492
  1. <?php
  2. /* Copyright (C) 2001-2002 Rodolphe Quiedeville <rodolphe@quiedeville.org>
  3. * Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
  4. * Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 3 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU General Public License
  17. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  18. */
  19. /**
  20. * \file htdocs/public/onlinesign/newonlinesign.php
  21. * \ingroup core
  22. * \brief File to offer a way to make an online signature for a particular Dolibarr entity
  23. * Example of URL: https://localhost/public/onlinesign/newonlinesign.php?ref=PR...
  24. */
  25. if (!defined('NOLOGIN')) {
  26. define("NOLOGIN", 1); // This means this output page does not require to be logged.
  27. }
  28. if (!defined('NOCSRFCHECK')) {
  29. define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
  30. }
  31. if (!defined('NOIPCHECK')) {
  32. define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
  33. }
  34. if (!defined('NOBROWSERNOTIF')) {
  35. define('NOBROWSERNOTIF', '1');
  36. }
  37. // For MultiCompany module.
  38. // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
  39. // Because 2 entities can have the same ref.
  40. $entity = (!empty($_GET['entity']) ? (int) $_GET['entity'] : (!empty($_POST['entity']) ? (int) $_POST['entity'] : 1));
  41. if (is_numeric($entity)) {
  42. define("DOLENTITY", $entity);
  43. }
  44. require '../../main.inc.php';
  45. require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
  46. require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
  47. require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
  48. require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
  49. require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
  50. // Load translation files
  51. $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", "members", "paybox", "propal"));
  52. // Security check
  53. // No check on module enabled. Done later according to $validpaymentmethod
  54. // Get parameters
  55. $action = GETPOST('action', 'aZ09');
  56. $cancel = GETPOST('cancel', 'alpha');
  57. $confirm = GETPOST('confirm', 'alpha');
  58. $refusepropal = GETPOST('refusepropal', 'alpha');
  59. $message = GETPOST('message', 'aZ09');
  60. // Input are:
  61. // type ('invoice','order','contractline'),
  62. // id (object id),
  63. // amount (required if id is empty),
  64. // tag (a free text, required if type is empty)
  65. // currency (iso code)
  66. $suffix = GETPOST("suffix", 'aZ09');
  67. $source = GETPOST("source", 'alpha');
  68. $ref = $REF = GETPOST("ref", 'alpha');
  69. if (empty($source)) {
  70. $source = 'proposal';
  71. }
  72. if (!$action) {
  73. if ($source && !$ref) {
  74. print $langs->trans('ErrorBadParameters')." - ref missing";
  75. exit;
  76. }
  77. }
  78. if (!empty($refusepropal)) {
  79. $action = "refusepropal";
  80. }
  81. // Define $urlwithroot
  82. //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
  83. //$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
  84. $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
  85. // Complete urls for post treatment
  86. $SECUREKEY = GETPOST("securekey"); // Secure key
  87. if (!empty($source)) {
  88. $urlok .= 'source='.urlencode($source).'&';
  89. $urlko .= 'source='.urlencode($source).'&';
  90. }
  91. if (!empty($REF)) {
  92. $urlok .= 'ref='.urlencode($REF).'&';
  93. $urlko .= 'ref='.urlencode($REF).'&';
  94. }
  95. if (!empty($SECUREKEY)) {
  96. $urlok .= 'securekey='.urlencode($SECUREKEY).'&';
  97. $urlko .= 'securekey='.urlencode($SECUREKEY).'&';
  98. }
  99. if (!empty($entity)) {
  100. $urlok .= 'entity='.urlencode($entity).'&';
  101. $urlko .= 'entity='.urlencode($entity).'&';
  102. }
  103. $urlok = preg_replace('/&$/', '', $urlok); // Remove last &
  104. $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
  105. $creditor = $mysoc->name;
  106. $type = $source;
  107. if ($source == 'proposal') {
  108. require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
  109. $object = new Propal($db);
  110. $result= $object->fetch(0, $ref, '', $entity);
  111. } else {
  112. accessforbidden('Bad value for source');
  113. exit;
  114. }
  115. // Check securitykey
  116. $securekeyseed = '';
  117. if ($source == 'proposal') {
  118. $securekeyseed = $conf->global->PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN;
  119. }
  120. if (!dol_verifyHash($securekeyseed.$type.$ref.(empty($conf->multicompany->enabled) ? '' : $entity), $SECUREKEY, '0')) {
  121. http_response_code(403);
  122. print 'Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref);
  123. exit(-1);
  124. }
  125. /*
  126. * Actions
  127. */
  128. if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
  129. $db->begin();
  130. $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
  131. $sql .= " SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).", note_private = '".$db->escape($object->note_private)."', date_signature='".$db->idate(dol_now())."'";
  132. $sql .= " WHERE rowid = ".((int) $object->id);
  133. dol_syslog(__METHOD__, LOG_DEBUG);
  134. $resql = $db->query($sql);
  135. if (!$resql) {
  136. $error++;
  137. }
  138. if (!$error) {
  139. $db->commit();
  140. $message = 'refused';
  141. setEventMessages("PropalRefused", null, 'warnings');
  142. if (method_exists($object, 'call_trigger')) {
  143. //customer is not a user !?! so could we use same user as validation ?
  144. $user = new User($db);
  145. $user->fetch($object->user_valid_id);
  146. $result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user);
  147. if ($result < 0) {
  148. $error++;
  149. }
  150. }
  151. } else {
  152. $db->rollback();
  153. }
  154. $object->fetch(0, $ref);
  155. }
  156. /*
  157. * View
  158. */
  159. $form = new Form($db);
  160. $head = '';
  161. if (!empty($conf->global->MAIN_SIGN_CSS_URL)) {
  162. $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
  163. }
  164. $conf->dol_hide_topmenu = 1;
  165. $conf->dol_hide_leftmenu = 1;
  166. $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
  167. llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
  168. if ($action == 'refusepropal') {
  169. print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
  170. }
  171. // Check link validity for param 'source' to avoid use of the examples as value
  172. if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', 'proposal_ref', ''))) {
  173. $langs->load("errors");
  174. dol_print_error_email('BADREFINONLINESIGNFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
  175. // End of page
  176. llxFooter();
  177. $db->close();
  178. exit;
  179. }
  180. print '<span id="dolpaymentspan"></span>'."\n";
  181. print '<div class="center">'."\n";
  182. print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
  183. print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
  184. print '<input type="hidden" name="action" value="dosign">'."\n";
  185. print '<input type="hidden" name="tag" value="'.GETPOST("tag", 'alpha').'">'."\n";
  186. print '<input type="hidden" name="suffix" value="'.GETPOST("suffix", 'alpha').'">'."\n";
  187. print '<input type="hidden" name="securekey" value="'.$SECUREKEY.'">'."\n";
  188. print '<input type="hidden" name="entity" value="'.$entity.'" />';
  189. print '<input type="hidden" name="page_y" value="" />';
  190. print "\n";
  191. print '<!-- Form to sign -->'."\n";
  192. print '<table id="dolpublictable" summary="Payment form" class="center">'."\n";
  193. // Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
  194. // Define logo and logosmall
  195. $logosmall = $mysoc->logo_small;
  196. $logo = $mysoc->logo;
  197. $paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix;
  198. if (!empty($conf->global->$paramlogo)) {
  199. $logosmall = $conf->global->$paramlogo;
  200. } elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) {
  201. $logosmall = $conf->global->ONLINE_SIGN_LOGO;
  202. }
  203. //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
  204. // Define urllogo
  205. $urllogo = '';
  206. $urllogofull = '';
  207. if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) {
  208. $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall);
  209. $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
  210. } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) {
  211. $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo);
  212. $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
  213. }
  214. // Output html code for logo
  215. if ($urllogo) {
  216. print '<div class="backgreypublicpayment">';
  217. print '<div class="logopublicpayment">';
  218. print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
  219. print '>';
  220. print '</div>';
  221. if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
  222. print '<div class="poweredbypublicpayment opacitymedium right"><a class="poweredbyhref" href="https://www.dolibarr.org?utm_medium=website&utm_source=poweredby" target="dolibarr" rel="noopener">'.$langs->trans("PoweredBy").'<br><img class="poweredbyimg" src="'.DOL_URL_ROOT.'/theme/dolibarr_logo.svg" width="80px"></a></div>';
  223. }
  224. print '</div>';
  225. }
  226. if ($source == 'proposal' && !empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
  227. print '<div class="backimagepublicproposalsign">';
  228. print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.'">';
  229. print '</div>';
  230. }
  231. // Output introduction text
  232. $text = '';
  233. if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
  234. $reg = array();
  235. if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
  236. $text .= $langs->trans($reg[1])."<br>\n";
  237. } else {
  238. $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT."<br>\n";
  239. }
  240. $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
  241. }
  242. if (empty($text)) {
  243. $text .= '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("WelcomeOnOnlineSignaturePage", $mysoc->name).'</strong></td></tr>'."\n";
  244. $text .= '<tr><td class="textpublicpayment opacitymedium">'.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'<br><br></td></tr>'."\n";
  245. }
  246. print $text;
  247. // Output payment summary form
  248. print '<tr><td align="center">';
  249. print '<table with="100%" id="tablepublicpayment">';
  250. print '<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans("ThisIsInformationOnDocumentToSign").' :</td></tr>'."\n";
  251. $found = false;
  252. $error = 0;
  253. // Signature on commercial proposal
  254. if ($source == 'proposal') {
  255. $found = true;
  256. $langs->load("proposal");
  257. $result = $object->fetch_thirdparty($object->socid);
  258. // Creditor
  259. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Creditor");
  260. print '</td><td class="CTableRow2">';
  261. print img_picto('', 'company', 'class="pictofixedwidth"');
  262. print '<b>'.$creditor.'</b>';
  263. print '<input type="hidden" name="creditor" value="'.$creditor.'">';
  264. print '</td></tr>'."\n";
  265. // Debitor
  266. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty");
  267. print '</td><td class="CTableRow2">';
  268. print img_picto('', 'company', 'class="pictofixedwidth"');
  269. print '<b>'.$object->thirdparty->name.'</b>';
  270. print '</td></tr>'."\n";
  271. // Amount
  272. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
  273. print '</td><td class="CTableRow2">';
  274. print '<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</b>';
  275. print '</td></tr>'."\n";
  276. // Object
  277. $text = '<b>'.$langs->trans("SignatureProposalRef", $object->ref).'</b>';
  278. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation");
  279. print '</td><td class="CTableRow2">'.$text;
  280. $last_main_doc_file = $object->last_main_doc;
  281. if ($object->status == $object::STATUS_VALIDATED) {
  282. if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
  283. // It seems document has never been generated, or was generated and then deleted.
  284. // So we try to regenerate it with its default template.
  285. $defaulttemplate = ''; // We force the use an empty string instead of $object->model_pdf to be sure to use a "main" default template and not the last one used.
  286. $object->generateDocument($defaulttemplate, $langs);
  287. }
  288. $directdownloadlink = $object->getLastMainDocLink('proposal');
  289. if ($directdownloadlink) {
  290. print '<br><a href="'.$directdownloadlink.'">';
  291. print img_mime($object->last_main_doc, '');
  292. print $langs->trans("DownloadDocument").'</a>';
  293. }
  294. } else {
  295. if ($object->status == $object::STATUS_NOTSIGNED) {
  296. $directdownloadlink = $object->getLastMainDocLink('proposal');
  297. if ($directdownloadlink) {
  298. print '<br><a href="'.$directdownloadlink.'">';
  299. print img_mime($last_main_doc_file, '');
  300. print $langs->trans("DownloadDocument").'</a>';
  301. }
  302. } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
  303. if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed
  304. $last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file);
  305. $datefilesigned = dol_filemtime($last_main_doc_file);
  306. $datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed);
  307. if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
  308. $directdownloadlink = $object->getLastMainDocLink('proposal');
  309. if ($directdownloadlink) {
  310. print '<br><a href="'.$directdownloadlink.'">';
  311. print img_mime($object->last_main_doc, '');
  312. print $langs->trans("DownloadDocument").'</a>';
  313. }
  314. }
  315. }
  316. }
  317. }
  318. print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
  319. print '<input type="hidden" name="ref" value="'.$object->ref.'">';
  320. print '</td></tr>'."\n";
  321. }
  322. if (!$found && !$mesg) {
  323. $mesg = $langs->transnoentitiesnoconv("ErrorBadParameters");
  324. }
  325. if ($mesg) {
  326. print '<tr><td class="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n";
  327. }
  328. print '</table>'."\n";
  329. print "\n";
  330. if ($action != 'dosign') {
  331. if ($found && !$error) {
  332. // We are in a management option and no error
  333. } else {
  334. dol_print_error_email('ERRORNEWONLINESIGN');
  335. }
  336. } else {
  337. // Print
  338. }
  339. print '</td></tr>'."\n";
  340. print '<tr><td class="center">';
  341. if ($action == "dosign" && empty($cancel)) {
  342. print '<div class="tablepublicpayment">';
  343. print '<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans("ClearSignature").'">';
  344. print '<div id="signature" style="border:solid;"></div>';
  345. print '</div>';
  346. // Do not use class="reposition" here: It breaks the submit and there is a message on top to say it's ok, so going back top is better.
  347. print '<input type="button" class="button" id="signbutton" value="'.$langs->trans("Sign").'">';
  348. print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
  349. // Add js code managed into the div #signature
  350. print '<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jSignature/jSignature.js"></script>
  351. <script type="text/javascript">
  352. $(document).ready(function() {
  353. $("#signature").jSignature({ color:"#000", lineWidth:4, '.(empty($conf->dol_optimize_smallscreen) ? '' : 'width: 280, ' ).'height: 180});
  354. $("#signature").on("change",function(){
  355. $("#clearsignature").css("display","");
  356. $("#signbutton").attr("disabled",false);
  357. if(!$._data($("#signbutton")[0], "events")){
  358. $("#signbutton").on("click",function(){
  359. var signature = $("#signature").jSignature("getData", "image");
  360. $.ajax({
  361. type: "POST",
  362. url: "'.DOL_URL_ROOT.'/core/ajax/onlineSign.php",
  363. dataType: "text",
  364. data: {
  365. "action" : "importSignature",
  366. "signaturebase64" : signature,
  367. "ref" : \''.dol_escape_js($REF).'\',
  368. "securekey" : \''.dol_escape_js($SECUREKEY).'\',
  369. "mode" : \''.dol_escape_htmltag($source).'\',
  370. "entity" : \''.dol_escape_htmltag($entity).'\',
  371. },
  372. success: function(response) {
  373. if(response == "success"){
  374. console.log("Success on saving signature");
  375. window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).($conf->multicompany->enabled?'&entity='.$entity:'').'");
  376. }else{
  377. console.error(response);
  378. }
  379. },
  380. });
  381. });
  382. }
  383. });
  384. $("#clearsignature").on("click",function(){
  385. $("#signature").jSignature("clear");
  386. $("#signbutton").attr("disabled",true);
  387. });
  388. $("#signbutton").attr("disabled",true);
  389. });
  390. </script>';
  391. } else {
  392. if ($source == 'proposal') {
  393. if ($object->status == $object::STATUS_SIGNED) {
  394. print '<br>';
  395. if ($message == 'signed') {
  396. print '<span class="ok">'.$langs->trans("PropalSigned").'</span>';
  397. } else {
  398. print '<span class="ok">'.$langs->trans("PropalAlreadySigned").'</span>';
  399. }
  400. } elseif ($object->status == $object::STATUS_NOTSIGNED) {
  401. print '<br>';
  402. if ($message == 'refused') {
  403. print '<span class="ok">'.$langs->trans("PropalRefused").'</span>';
  404. } else {
  405. print '<span class="warning">'.$langs->trans("PropalAlreadyRefused").'</span>';
  406. }
  407. } else {
  408. print '<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("SignPropal").'">';
  409. print '<input name="refusepropal" type="submit" class="butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("RefusePropal").'">';
  410. }
  411. }
  412. }
  413. print '</td></tr>'."\n";
  414. print '</table>'."\n";
  415. print '</form>'."\n";
  416. print '</div>'."\n";
  417. print '<br>';
  418. htmlPrintOnlinePaymentFooter($mysoc, $langs);
  419. llxFooter('', 'public');
  420. $db->close();