dolibarr 22.0.5
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');
85
86print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register');
87print '<br>';
88
89
90// Mode
91print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
92print '<input type="hidden" name="token" value="'.newToken().'">';
93print '<input type="hidden" name="action" value="set">';
94
95print '<div class="div-table-responsive-no-min">';
96
97// Marketplace
98print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
99print '<tr class="liste_titre">'."\n";
100print '<td class="titlefield" colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
101print '<td>'.$langs->trans("URL").'</td>';
102print '</tr>';
103
104$url = 'https://www.dolistore.com/45-pos';
105
106print '<tr class="oddeven">'."\n";
107print '<td class="titlefield">';
108print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
109print '<img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolistore_logo.png">';
110print '</a>';
111print '</td>';
112print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
113print '<td>';
114print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
115print img_picto('', 'url', 'class="pictofixedwidth"');
116print $url.'</a></td>';
117print '</tr>';
118
119print "</table>\n";
120
121print '</div>';
122
123print '<br>';
124
125
126print '<div class="div-table-responsive-no-min">';
127
128// Support
129print "<table summary=\"list_of_modules\" class=\"noborder centpercent\">\n";
130print '<tr class="liste_titre">'."\n";
131print '<td colspan="2">TakePOS Support</td>';
132print '<td>'.$langs->trans("URL").'</td>';
133print '</tr>';
134
135$url = 'https://partners.dolibarr.org';
136
137print '<tr class="oddeven">'."\n";
138print '<td class="titlefield">';
139print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
140print '<img border="0" class="imgautosize imgmaxwidth180" src="'.DOL_URL_ROOT.'/theme/dolibarr_preferred_partner.png">';
141print '</a></td>';
142print '<td>Dolibarr Preferred Partners</td>';
143print '<td>';
144print '<a href="'.$url.'" target="_blank" rel="noopener noreferrer external">';
145print img_picto('', 'url', 'class="pictofixedwidth"');
146print $url.'</a></td>';
147print '</tr>';
148
149print "</table>\n";
150
151print '</div>';
152
153print '</form>';
154
155print dol_get_fiche_end();
156
157
158llxFooter();
159$db->close();
llxFooter($comment='', $zone='private', $disabledoutputofmessages=0)
Empty footer.
Definition wrapper.php:91
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:73
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, $allowothertags=array())
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, $morecssdiv='')
Show tabs of a record.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
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.