newonlinesign.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488
  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", "commercial"));
  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 (!empty($refusepropal)) {
  73. $action = "refusepropal";
  74. }
  75. // Define $urlwithroot
  76. //$urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT,'/').'$/i','',trim($dolibarr_main_url_root));
  77. //$urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
  78. $urlwithroot = DOL_MAIN_URL_ROOT; // This is to use same domain name than current. For Paypal payment, we can use internal URL like localhost.
  79. // Complete urls for post treatment
  80. $SECUREKEY = GETPOST("securekey"); // Secure key
  81. if (!empty($source)) {
  82. $urlok .= 'source='.urlencode($source).'&';
  83. $urlko .= 'source='.urlencode($source).'&';
  84. }
  85. if (!empty($REF)) {
  86. $urlok .= 'ref='.urlencode($REF).'&';
  87. $urlko .= 'ref='.urlencode($REF).'&';
  88. }
  89. if (!empty($SECUREKEY)) {
  90. $urlok .= 'securekey='.urlencode($SECUREKEY).'&';
  91. $urlko .= 'securekey='.urlencode($SECUREKEY).'&';
  92. }
  93. if (!empty($entity)) {
  94. $urlok .= 'entity='.urlencode($entity).'&';
  95. $urlko .= 'entity='.urlencode($entity).'&';
  96. }
  97. $urlok = preg_replace('/&$/', '', $urlok); // Remove last &
  98. $urlko = preg_replace('/&$/', '', $urlko); // Remove last &
  99. $creditor = $mysoc->name;
  100. $type = $source;
  101. if (!$action) {
  102. if ($source && !$ref) {
  103. httponly_accessforbidden($langs->trans('ErrorBadParameters')." - ref missing", 400, 1);
  104. }
  105. }
  106. // Check securitykey
  107. $securekeyseed = '';
  108. if ($source == 'proposal') {
  109. $securekeyseed = getDolGlobalString('PROPOSAL_ONLINE_SIGNATURE_SECURITY_TOKEN');
  110. }
  111. if (!dol_verifyHash($securekeyseed.$type.$ref.(isModEnabled('multicompany') ? $entity : ''), $SECUREKEY, '0')) {
  112. httponly_accessforbidden('Bad value for securitykey. Value provided '.dol_escape_htmltag($SECUREKEY).' does not match expected value for ref='.dol_escape_htmltag($ref), 403, 1);
  113. }
  114. if ($source == 'proposal') {
  115. require_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
  116. $object = new Propal($db);
  117. $result= $object->fetch(0, $ref, '', $entity);
  118. } else {
  119. httponly_accessforbidden($langs->trans('ErrorBadParameters')." - Bad value for source", 400, 1);
  120. }
  121. /*
  122. * Actions
  123. */
  124. if ($action == 'confirm_refusepropal' && $confirm == 'yes') {
  125. $db->begin();
  126. $sql = "UPDATE ".MAIN_DB_PREFIX."propal";
  127. $sql .= " SET fk_statut = ".((int) $object::STATUS_NOTSIGNED).", note_private = '".$db->escape($object->note_private)."', date_signature='".$db->idate(dol_now())."'";
  128. $sql .= " WHERE rowid = ".((int) $object->id);
  129. dol_syslog(__METHOD__, LOG_DEBUG);
  130. $resql = $db->query($sql);
  131. if (!$resql) {
  132. $error++;
  133. }
  134. if (!$error) {
  135. $db->commit();
  136. $message = 'refused';
  137. setEventMessages("PropalRefused", null, 'warnings');
  138. if (method_exists($object, 'call_trigger')) {
  139. //customer is not a user !?! so could we use same user as validation ?
  140. $user = new User($db);
  141. $user->fetch($object->user_valid_id);
  142. $result = $object->call_trigger('PROPAL_CLOSE_REFUSED', $user);
  143. if ($result < 0) {
  144. $error++;
  145. }
  146. }
  147. } else {
  148. $db->rollback();
  149. }
  150. $object->fetch(0, $ref);
  151. }
  152. /*
  153. * View
  154. */
  155. $form = new Form($db);
  156. $head = '';
  157. if (!empty($conf->global->MAIN_SIGN_CSS_URL)) {
  158. $head = '<link rel="stylesheet" type="text/css" href="'.$conf->global->MAIN_SIGN_CSS_URL.'?lang='.$langs->defaultlang.'">'."\n";
  159. }
  160. $conf->dol_hide_topmenu = 1;
  161. $conf->dol_hide_leftmenu = 1;
  162. $replacemainarea = (empty($conf->dol_hide_leftmenu) ? '<div>' : '').'<div>';
  163. llxHeader($head, $langs->trans("OnlineSignature"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea, 1);
  164. if ($action == 'refusepropal') {
  165. print $form->formconfirm($_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:''), $langs->trans('RefusePropal'), $langs->trans('ConfirmRefusePropal', $object->ref), 'confirm_refusepropal', '', '', 1);
  166. }
  167. // Check link validity for param 'source' to avoid use of the examples as value
  168. if (!empty($source) && in_array($ref, array('member_ref', 'contractline_ref', 'invoice_ref', 'order_ref', 'proposal_ref', ''))) {
  169. $langs->load("errors");
  170. dol_print_error_email('BADREFINONLINESIGNFORM', $langs->trans("ErrorBadLinkSourceSetButBadValueForRef", $source, $ref));
  171. // End of page
  172. llxFooter();
  173. $db->close();
  174. exit;
  175. }
  176. print '<span id="dolpaymentspan"></span>'."\n";
  177. print '<div class="center">'."\n";
  178. print '<form id="dolpaymentform" class="center" name="paymentform" action="'.$_SERVER["PHP_SELF"].'" method="POST">'."\n";
  179. print '<input type="hidden" name="token" value="'.newToken().'">'."\n";
  180. print '<input type="hidden" name="action" value="dosign">'."\n";
  181. print '<input type="hidden" name="tag" value="'.GETPOST("tag", 'alpha').'">'."\n";
  182. print '<input type="hidden" name="suffix" value="'.GETPOST("suffix", 'alpha').'">'."\n";
  183. print '<input type="hidden" name="securekey" value="'.$SECUREKEY.'">'."\n";
  184. print '<input type="hidden" name="entity" value="'.$entity.'" />';
  185. print '<input type="hidden" name="page_y" value="" />';
  186. print "\n";
  187. print '<!-- Form to sign -->'."\n";
  188. print '<table id="dolpublictable" summary="Payment form" class="center">'."\n";
  189. // 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)
  190. // Define logo and logosmall
  191. $logosmall = $mysoc->logo_small;
  192. $logo = $mysoc->logo;
  193. $paramlogo = 'ONLINE_SIGN_LOGO_'.$suffix;
  194. if (!empty($conf->global->$paramlogo)) {
  195. $logosmall = $conf->global->$paramlogo;
  196. } elseif (!empty($conf->global->ONLINE_SIGN_LOGO)) {
  197. $logosmall = $conf->global->ONLINE_SIGN_LOGO;
  198. }
  199. //print '<!-- Show logo (logosmall='.$logosmall.' logo='.$logo.') -->'."\n";
  200. // Define urllogo
  201. $urllogo = '';
  202. $urllogofull = '';
  203. if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$logosmall)) {
  204. $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/thumbs/'.$logosmall);
  205. $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
  206. } elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo)) {
  207. $urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&amp;entity='.$conf->entity.'&amp;file='.urlencode('logos/'.$logo);
  208. $urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
  209. }
  210. // Output html code for logo
  211. if ($urllogo) {
  212. print '<div class="backgreypublicpayment">';
  213. print '<div class="logopublicpayment">';
  214. print '<img id="dolpaymentlogo" src="'.$urllogo.'"';
  215. print '>';
  216. print '</div>';
  217. if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
  218. 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>';
  219. }
  220. print '</div>';
  221. }
  222. if ($source == 'proposal' && !empty($conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN)) {
  223. print '<div class="backimagepublicproposalsign">';
  224. print '<img id="idPROPOSAL_IMAGE_PUBLIC_INTERFACE" src="'.$conf->global->PROPOSAL_IMAGE_PUBLIC_SIGN.'">';
  225. print '</div>';
  226. }
  227. // Output introduction text
  228. $text = '';
  229. if (!empty($conf->global->ONLINE_SIGN_NEWFORM_TEXT)) {
  230. $reg = array();
  231. if (preg_match('/^\((.*)\)$/', $conf->global->ONLINE_SIGN_NEWFORM_TEXT, $reg)) {
  232. $text .= $langs->trans($reg[1])."<br>\n";
  233. } else {
  234. $text .= $conf->global->ONLINE_SIGN_NEWFORM_TEXT."<br>\n";
  235. }
  236. $text = '<tr><td align="center"><br>'.$text.'<br></td></tr>'."\n";
  237. }
  238. if (empty($text)) {
  239. $text .= '<tr><td class="textpublicpayment"><br><strong>'.$langs->trans("WelcomeOnOnlineSignaturePage", $mysoc->name).'</strong></td></tr>'."\n";
  240. $text .= '<tr><td class="textpublicpayment opacitymedium">'.$langs->trans("ThisScreenAllowsYouToSignDocFrom", $creditor).'<br><br></td></tr>'."\n";
  241. }
  242. print $text;
  243. // Output payment summary form
  244. print '<tr><td align="center">';
  245. print '<table with="100%" id="tablepublicpayment">';
  246. print '<tr><td align="left" colspan="2" class="opacitymedium">'.$langs->trans("ThisIsInformationOnDocumentToSign").' :</td></tr>'."\n";
  247. $found = false;
  248. $error = 0;
  249. // Signature on commercial proposal
  250. if ($source == 'proposal') {
  251. $found = true;
  252. $langs->load("proposal");
  253. $result = $object->fetch_thirdparty($object->socid);
  254. // Creditor
  255. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Creditor");
  256. print '</td><td class="CTableRow2">';
  257. print img_picto('', 'company', 'class="pictofixedwidth"');
  258. print '<b>'.$creditor.'</b>';
  259. print '<input type="hidden" name="creditor" value="'.$creditor.'">';
  260. print '</td></tr>'."\n";
  261. // Debitor
  262. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("ThirdParty");
  263. print '</td><td class="CTableRow2">';
  264. print img_picto('', 'company', 'class="pictofixedwidth"');
  265. print '<b>'.$object->thirdparty->name.'</b>';
  266. print '</td></tr>'."\n";
  267. // Amount
  268. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Amount");
  269. print '</td><td class="CTableRow2">';
  270. print '<b>'.price($object->total_ttc, 0, $langs, 1, -1, -1, $conf->currency).'</b>';
  271. print '</td></tr>'."\n";
  272. // Object
  273. $text = '<b>'.$langs->trans("SignatureProposalRef", $object->ref).'</b>';
  274. print '<tr class="CTableRow2"><td class="CTableRow2">'.$langs->trans("Designation");
  275. print '</td><td class="CTableRow2">'.$text;
  276. $last_main_doc_file = $object->last_main_doc;
  277. if ($object->status == $object::STATUS_VALIDATED) {
  278. if (empty($last_main_doc_file) || !dol_is_file(DOL_DATA_ROOT.'/'.$object->last_main_doc)) {
  279. // It seems document has never been generated, or was generated and then deleted.
  280. // So we try to regenerate it with its default template.
  281. $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.
  282. $object->generateDocument($defaulttemplate, $langs);
  283. }
  284. $directdownloadlink = $object->getLastMainDocLink('proposal');
  285. if ($directdownloadlink) {
  286. print '<br><a href="'.$directdownloadlink.'">';
  287. print img_mime($object->last_main_doc, '');
  288. print $langs->trans("DownloadDocument").'</a>';
  289. }
  290. } else {
  291. if ($object->status == $object::STATUS_NOTSIGNED) {
  292. $directdownloadlink = $object->getLastMainDocLink('proposal');
  293. if ($directdownloadlink) {
  294. print '<br><a href="'.$directdownloadlink.'">';
  295. print img_mime($last_main_doc_file, '');
  296. print $langs->trans("DownloadDocument").'</a>';
  297. }
  298. } elseif ($object->status == $object::STATUS_SIGNED || $object->status == $object::STATUS_BILLED) {
  299. if (preg_match('/_signed-(\d+)/', $last_main_doc_file)) { // If the last main doc has been signed
  300. $last_main_doc_file_not_signed = preg_replace('/_signed-(\d+)/', '', $last_main_doc_file);
  301. $datefilesigned = dol_filemtime($last_main_doc_file);
  302. $datefilenotsigned = dol_filemtime($last_main_doc_file_not_signed);
  303. if (empty($datefilenotsigned) || $datefilesigned > $datefilenotsigned) {
  304. $directdownloadlink = $object->getLastMainDocLink('proposal');
  305. if ($directdownloadlink) {
  306. print '<br><a href="'.$directdownloadlink.'">';
  307. print img_mime($object->last_main_doc, '');
  308. print $langs->trans("DownloadDocument").'</a>';
  309. }
  310. }
  311. }
  312. }
  313. }
  314. print '<input type="hidden" name="source" value="'.GETPOST("source", 'alpha').'">';
  315. print '<input type="hidden" name="ref" value="'.$object->ref.'">';
  316. print '</td></tr>'."\n";
  317. }
  318. if (!$found && !$mesg) {
  319. $mesg = $langs->transnoentitiesnoconv("ErrorBadParameters");
  320. }
  321. if ($mesg) {
  322. print '<tr><td class="center" colspan="2"><br><div class="warning">'.dol_escape_htmltag($mesg).'</div></td></tr>'."\n";
  323. }
  324. print '</table>'."\n";
  325. print "\n";
  326. if ($action != 'dosign') {
  327. if ($found && !$error) {
  328. // We are in a management option and no error
  329. } else {
  330. dol_print_error_email('ERRORNEWONLINESIGN');
  331. }
  332. } else {
  333. // Print
  334. }
  335. print '</td></tr>'."\n";
  336. print '<tr><td class="center">';
  337. if ($action == "dosign" && empty($cancel)) {
  338. print '<div class="tablepublicpayment">';
  339. print '<input type="button" class="buttonDelete small" id="clearsignature" value="'.$langs->trans("ClearSignature").'">';
  340. print '<div id="signature" style="border:solid;"></div>';
  341. print '</div>';
  342. // 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.
  343. print '<input type="button" class="button" id="signbutton" value="'.$langs->trans("Sign").'">';
  344. print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
  345. // Add js code managed into the div #signature
  346. print '<script language="JavaScript" type="text/javascript" src="'.DOL_URL_ROOT.'/includes/jquery/plugins/jSignature/jSignature.js"></script>
  347. <script type="text/javascript">
  348. $(document).ready(function() {
  349. $("#signature").jSignature({ color:"#000", lineWidth:4, '.(empty($conf->dol_optimize_smallscreen) ? '' : 'width: 280, ' ).'height: 180});
  350. $("#signature").on("change",function(){
  351. $("#clearsignature").css("display","");
  352. $("#signbutton").attr("disabled",false);
  353. if(!$._data($("#signbutton")[0], "events")){
  354. $("#signbutton").on("click",function(){
  355. var signature = $("#signature").jSignature("getData", "image");
  356. $.ajax({
  357. type: "POST",
  358. url: "'.DOL_URL_ROOT.'/core/ajax/onlineSign.php",
  359. dataType: "text",
  360. data: {
  361. "action" : "importSignature",
  362. "signaturebase64" : signature,
  363. "ref" : \''.dol_escape_js($REF).'\',
  364. "securekey" : \''.dol_escape_js($SECUREKEY).'\',
  365. "mode" : \''.dol_escape_htmltag($source).'\',
  366. "entity" : \''.dol_escape_htmltag($entity).'\',
  367. },
  368. success: function(response) {
  369. if(response == "success"){
  370. console.log("Success on saving signature");
  371. window.location.replace("'.$_SERVER["PHP_SELF"].'?ref='.urlencode($ref).'&message=signed&securekey='.urlencode($SECUREKEY).(isModEnabled('multicompany')?'&entity='.$entity:'').'");
  372. }else{
  373. console.error(response);
  374. }
  375. },
  376. });
  377. });
  378. }
  379. });
  380. $("#clearsignature").on("click",function(){
  381. $("#signature").jSignature("clear");
  382. $("#signbutton").attr("disabled",true);
  383. });
  384. $("#signbutton").attr("disabled",true);
  385. });
  386. </script>';
  387. } else {
  388. if ($source == 'proposal') {
  389. if ($object->status == $object::STATUS_SIGNED) {
  390. print '<br>';
  391. if ($message == 'signed') {
  392. print '<span class="ok">'.$langs->trans("PropalSigned").'</span>';
  393. } else {
  394. print '<span class="ok">'.$langs->trans("PropalAlreadySigned").'</span>';
  395. }
  396. } elseif ($object->status == $object::STATUS_NOTSIGNED) {
  397. print '<br>';
  398. if ($message == 'refused') {
  399. print '<span class="ok">'.$langs->trans("PropalRefused").'</span>';
  400. } else {
  401. print '<span class="warning">'.$langs->trans("PropalAlreadyRefused").'</span>';
  402. }
  403. } else {
  404. print '<input type="submit" class="butAction small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("SignPropal").'">';
  405. print '<input name="refusepropal" type="submit" class="butActionDelete small wraponsmartphone marginbottomonly marginleftonly marginrightonly reposition" value="'.$langs->trans("RefusePropal").'">';
  406. }
  407. }
  408. }
  409. print '</td></tr>'."\n";
  410. print '</table>'."\n";
  411. print '</form>'."\n";
  412. print '</div>'."\n";
  413. print '<br>';
  414. htmlPrintOnlinePaymentFooter($mysoc, $langs);
  415. llxFooter('', 'public');
  416. $db->close();