other.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
  3. * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation; either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <https://www.gnu.org/licenses/>.
  17. */
  18. /**
  19. * \file htdocs/takepos/admin/other.php
  20. * \ingroup takepos
  21. * \brief Setup page for TakePos module
  22. */
  23. require '../../main.inc.php'; // Load $user and permissions
  24. require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
  25. require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
  26. require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
  27. require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
  28. require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
  29. // If socid provided by ajax company selector
  30. if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
  31. $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  32. $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  33. $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
  34. }
  35. // Security check
  36. if (!$user->admin) {
  37. accessforbidden();
  38. }
  39. $langs->loadLangs(array("admin", "cashdesk"));
  40. global $db;
  41. $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
  42. $sql .= " WHERE entity IN (".getEntity('c_paiement').")";
  43. $sql .= " AND active = 1";
  44. $sql .= " ORDER BY libelle";
  45. $resql = $db->query($sql);
  46. $paiements = array();
  47. if ($resql) {
  48. while ($obj = $db->fetch_object($resql)) {
  49. array_push($paiements, $obj);
  50. }
  51. }
  52. /*
  53. * Actions
  54. */
  55. // Nothing
  56. /*
  57. * View
  58. */
  59. llxHeader('', $langs->trans("CashDeskSetup"));
  60. $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
  61. print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
  62. $head = takepos_admin_prepare_head();
  63. print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register');
  64. print '<br>';
  65. // Mode
  66. print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
  67. print '<input type="hidden" name="token" value="'.newToken().'">';
  68. print '<input type="hidden" name="action" value="set">';
  69. print '<div class="div-table-responsive-no-min">';
  70. // Marketplace
  71. print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
  72. print '<tr class="liste_titre">'."\n";
  73. print '<td class="titlefield" colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
  74. print '<td>'.$langs->trans("URL").'</td>';
  75. print '</tr>';
  76. $url = 'https://www.dolistore.com/45-pos';
  77. print '<tr class="oddeven">'."\n";
  78. print '<td class="titlefield"><a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png"></a></td>';
  79. print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
  80. print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
  81. print '</tr>';
  82. print "</table>\n";
  83. print '</div>';
  84. print '<br>';
  85. print '<div class="div-table-responsive-no-min">';
  86. // Support
  87. print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
  88. print '<tr class="liste_titre">'."\n";
  89. print '<td colspan="2">TakePOS Support</td>';
  90. print '<td>'.$langs->trans("URL").'</td>';
  91. print '</tr>';
  92. $url = 'http://www.takepos.com';
  93. print '<tr class="oddeven">'."\n";
  94. print '<td class="left"><a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
  95. print '<td>TakePOS original developers</td>';
  96. print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
  97. print '</tr>';
  98. print "</table>\n";
  99. print '</div>';
  100. print '<br>';
  101. llxFooter();
  102. $db->close();