dolibarr  19.0.0-dev
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  *
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 
24 require '../../main.inc.php'; // Load $user and permissions
25 require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
26 require_once DOL_DOCUMENT_ROOT.'/product/class/html.formproduct.class.php';
27 require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
28 require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
29 require_once DOL_DOCUMENT_ROOT."/core/lib/takepos.lib.php";
30 
31 // If socid provided by ajax company selector
32 if (!empty($_REQUEST['CASHDESK_ID_THIRDPARTY_id'])) {
33  $_GET['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
34  $_POST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
35  $_REQUEST['CASHDESK_ID_THIRDPARTY'] = GETPOST('CASHDESK_ID_THIRDPARTY_id', 'alpha');
36 }
37 
38 // Security check
39 if (!$user->admin) {
41 }
42 
43 $langs->loadLangs(array("admin", "cashdesk"));
44 
45 global $db;
46 
47 $sql = "SELECT code, libelle FROM ".MAIN_DB_PREFIX."c_paiement";
48 $sql .= " WHERE entity IN (".getEntity('c_paiement').")";
49 $sql .= " AND active = 1";
50 $sql .= " ORDER BY libelle";
51 $resql = $db->query($sql);
52 $paiements = array();
53 if ($resql) {
54  while ($obj = $db->fetch_object($resql)) {
55  array_push($paiements, $obj);
56  }
57 }
58 
59 
60 /*
61  * Actions
62  */
63 
64 // Nothing
65 
66 
67 /*
68  * View
69  */
70 
71 llxHeader('', $langs->trans("CashDeskSetup"));
72 
73 $linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
74 print load_fiche_titre($langs->trans("CashDeskSetup").' (TakePOS)', $linkback, 'title_setup');
76 print dol_get_fiche_head($head, 'other', 'TakePOS', -1, 'cash-register');
77 print '<br>';
78 
79 
80 // Mode
81 print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
82 print '<input type="hidden" name="token" value="'.newToken().'">';
83 print '<input type="hidden" name="action" value="set">';
84 
85 print '<div class="div-table-responsive-no-min">';
86 
87 // Marketplace
88 print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
89 print '<tr class="liste_titre">'."\n";
90 print '<td class="titlefield" colspan="2">'.$langs->trans("WebSiteDesc").'</td>';
91 print '<td>'.$langs->trans("URL").'</td>';
92 print '</tr>';
93 
94 $url = 'https://www.dolistore.com/45-pos';
95 
96 print '<tr class="oddeven">'."\n";
97 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>';
98 print '<td>'.$langs->trans("DolistorePosCategory").'</td>';
99 print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
100 print '</tr>';
101 
102 print "</table>\n";
103 
104 print '</div>';
105 
106 print '<br>';
107 
108 
109 print '<div class="div-table-responsive-no-min">';
110 
111 // Support
112 print "<table summary=\"list_of_modules\" class=\"noborder\" width=\"100%\">\n";
113 print '<tr class="liste_titre">'."\n";
114 print '<td colspan="2">TakePOS Support</td>';
115 print '<td>'.$langs->trans("URL").'</td>';
116 print '</tr>';
117 
118 $url = 'http://www.takepos.com';
119 
120 print '<tr class="oddeven">'."\n";
121 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>';
122 print '<td>TakePOS original developers</td>';
123 print '<td><a href="'.$url.'" target="_blank" rel="noopener noreferrer external">'.$url.'</a></td>';
124 print '</tr>';
125 
126 print "</table>\n";
127 
128 print '</div>';
129 print '<br>';
130 
131 llxFooter();
132 $db->close();
if(!defined('NOREQUIRESOC')) if(!defined('NOREQUIRETRAN')) if(!defined('NOTOKENRENEWAL')) if(!defined('NOREQUIREMENU')) if(!defined('NOREQUIREHTML')) if(!defined('NOREQUIREAJAX')) llxHeader()
Empty header.
Definition: wrapper.php:56
llxFooter()
Empty footer.
Definition: wrapper.php:70
if(isModEnabled('facture') && $user->hasRight('facture', 'lire')) if((isModEnabled('fournisseur') &&empty($conf->global->MAIN_USE_NEW_SUPPLIERMOD) && $user->hasRight("fournisseur", "facture", "lire"))||(isModEnabled('supplier_invoice') && $user->hasRight("supplier_invoice", "lire"))) if(isModEnabled('don') && $user->hasRight('don', 'lire')) if(isModEnabled('tax') &&!empty($user->rights->tax->charges->lire)) if(isModEnabled('facture') &&isModEnabled('commande') && $user->hasRight("commande", "lire") &&empty($conf->global->WORKFLOW_DISABLE_CREATE_INVOICE_FROM_ORDER)) $sql
Social contributions to pay.
Definition: index.php:746
load_fiche_titre($titre, $morehtmlright='', $picto='generic', $pictoisfullpath=0, $id='', $morecssontable='', $morehtmlcenter='')
Load a title with picto.
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.
Definition: takepos.lib.php:30