dolibarr 21.0.0-beta
other.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
3 * Copyright (C) 2011-2017 Juanjo Menent <jmenent@2byte.es>
4 * Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
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
25require '../../main.inc.php'; // Load $user and permissions
26require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
27require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
28require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
29require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
30require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
31
32// If socid provided by ajax company selector
33if (GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha')) {
34 $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
35 $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
36 $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha'); // Keep this ?
37}
38
47// Security check
48if (!$user->admin) {
50}
51
52$langs->loadLangs(array("admin", "cashdesk"));
53
54global $db;
55
56$sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
57$sql .= " WHERE entity IN (".getEntity('c_paiement').")";
58$sql .= " AND active = 1";
59$sql .= " ORDER BY libelle";
60$resql = $db->query($sql);
61$paiements = array();
62if ($resql) {
63 while ($obj = $db->fetch_object($resql)) {
64 array_push($paiements, $obj);
65 }
66}
67
68
69/*
70 * Actions
71 */
72
73// Nothing
74
75
76/*
77 * View
78 */
79
80llxHeader('', $langs->trans("CashDeskSetup"), '', '', 0, 0, '', '', '', 'mod-takepos page-admin_other');
81
82$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
83print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
85print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register');
86print '<br>';
87
88
89// Mode
90print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
91print '<input type="hidden" name="token" value="'.newToken().'">';
92print '<input type="hidden" name="action" value="set">';
93
94print '<div class="div-table-responsive-no-min">';
95
96// Marketplace
97print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
98print '<tr class="liste_titre">'."\n";
99print '<td class="titlefield" colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
100print '<td>'.$langs->trans("URL").'</td>';
101print '</tr>';
102
103$url = 'https://www.dolistore.com/45-pos';
104
105print '<tr class="oddeven">'."\n";
106print '<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>';
107print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
108print '<td>';
109print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
110print img_picto('', 'url', 'class="pictofixedwidth"');
111print $url.'</a></td>';
112print '</tr>';
113
114print "</table>\n";
115
116print '</div>';
117
118print '<br>';
119
120
121print '<div class="div-table-responsive-no-min">';
122
123// Support
124print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
125print '<tr class="liste_titre">'."\n";
126print '<td colspan="2">TakePOS Support</td>';
127print '<td>'.$langs->trans("URL").'</td>';
128print '</tr>';
129
130$url = 'https://www.takepos.com';
131
132print '<tr class="oddeven">'."\n";
133print '<td class="titlefield"><a href="'.$url.'" target="_blank" rel="noopener noreferrer external"><img border="0" class="imgautosize imgmaxwidth180" src="../img/takepos.png"></a></td>';
134print '<td>TakePOS original developers</td>';
135print '<td>';
136print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
137print img_picto('', 'url', 'class="pictofixedwidth"');
138print $url.'</a></td>';
139print '</tr>';
140
141print "</table>\n";
142
143print '</div>';
144print '<br>';
145
146llxFooter();
147$db->close();
if(!defined('NOREQUIRESOC')) if(!defined( 'NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined( 'NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined( 'NOREQUIREAJAX')) llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='', $morecssonbody='', $replacemainareaby='', $disablenofollow=0, $disablenoindex=0)
Empty header.
Definition wrapper.php:71
llxFooter()
Footer empty.
Definition document.php:107
load_fiche_titre($title, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
img_picto($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $alt='', $morecss='', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $picto='', $pictoisfullpath=0, $morehtmlright='', $morecss='', $limittoshow=0, $moretabssuffix='', $dragdropfile=0)
Show tabs of a record.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.
takepos_admin_prepare_head()
Prepare array with list of tabs.