dolibarr 24.0.0-beta
card.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
3 * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
4 * Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
5 * Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
6 * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
7 * Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
8 * Copyright (C) 2025 Vincent Maury <vmaury@timgroup.fr>
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 3 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 */
23
32// Load Dolibarr environment
33require '../../main.inc.php';
41require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php';
42require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
43require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.class.php';
44require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.facture.class.php';
45require_once DOL_DOCUMENT_ROOT.'/fourn/class/paiementfourn.class.php';
46
47// Load translation files required by the page
48$langs->loadLangs(array('banks', 'bills', 'companies', 'suppliers'));
49
50
51// Get Parameters
52$id = GETPOSTINT('id');
53$action = GETPOST('action', 'alpha');
54$confirm = GETPOST('confirm', 'alpha');
55
56$socid = 0;
57
58// Initialize objects
60
61// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
62$hookmanager->initHooks(array('supplierpaymentcard', 'globalcard'));
63
64// Load object
65include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be 'include', not 'include_once'.
66
67$result = restrictedArea($user, $object->element, $object->id, 'paiementfourn', ''); // This also test permission on read invoice
68
69// Security check
70if ($user->isExternalUser()) {
71 $socid = $user->isExternalUser();
72}
73// Now check also permission on thirdparty of invoices of payments. Thirdparty were loaded by the fetch_object before based on first invoice.
74// It should be enough because all payments are done on invoices of the same thirdparty.
75if ($socid && $socid != $object->thirdparty->id) {
77}
78
79$permissiontoadd = ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "write"));
80$permissiontovalidate = ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "write"))) || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "validate")));
81$permissiontodelete = ($user->hasRight("fournisseur", "facture", "supprimer") || $user->hasRight("supplier_invoice", "delete"));
82
83
84/*
85 * Actions
86 */
87
88if ($action == 'setnote' && $permissiontoadd) {
89 $db->begin();
90
91 $object->fetch($id);
92 $result = $object->update_note(GETPOST('note', 'restricthtml'));
93 if ($result > 0) {
94 $db->commit();
95 $action = '';
96 } else {
97 setEventMessages($object->error, $object->errors, 'errors');
98 $db->rollback();
99 }
100}
101
102if ($action == 'confirm_delete' && $confirm == 'yes' && $permissiontodelete) {
103 $db->begin();
104
105 $object->fetch($id);
106 $result = $object->delete($user);
107 if ($result > 0) {
108 $db->commit();
109 header('Location: '.DOL_URL_ROOT.'/fourn/paiement/list.php');
110 exit;
111 } else {
112 setEventMessages($object->error, $object->errors, 'errors');
113 $db->rollback();
114 }
115}
116
117if ($action == 'confirm_validate' && $confirm == 'yes' && $permissiontovalidate) {
118 $db->begin();
119
120 $object->fetch($id);
121 if ($object->validate() >= 0) {
122 $db->commit();
123 header('Location: '.$_SERVER['PHP_SELF'].'?id='.$object->id);
124 exit;
125 } else {
126 setEventMessages($object->error, $object->errors, 'errors');
127 $db->rollback();
128 }
129}
130
131if ($action == 'setnum_paiement' && GETPOST('num_paiement') && $permissiontoadd) {
132 $object->fetch($id);
133 $res = $object->update_num(GETPOST('num_paiement'));
134 if ($res === 0) {
135 setEventMessages($langs->trans('PaymentNumberUpdateSucceeded'), null, 'mesgs');
136 } else {
137 setEventMessages($langs->trans('PaymentNumberUpdateFailed'), null, 'errors');
138 }
139}
140
141if ($action == 'setdatep' && GETPOST('datepday') && $permissiontoadd) {
142 $object->fetch($id);
143 $datepaye = dol_mktime(GETPOSTINT('datephour'), GETPOSTINT('datepmin'), GETPOSTINT('datepsec'), GETPOSTINT('datepmonth'), GETPOSTINT('datepday'), GETPOSTINT('datepyear'));
144 $res = $object->update_date($datepaye);
145 if ($res === 0) {
146 setEventMessages($langs->trans('PaymentDateUpdateSucceeded'), null, 'mesgs');
147 } else {
148 setEventMessages($langs->trans('PaymentDateUpdateFailed'), null, 'errors');
149 }
150}
151
152// Build document
153$upload_dir = $conf->fournisseur->payment->dir_output;
154include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
155
156// Actions to send emails
157$triggersendname = 'PAYMENTRECEIPT_SENTBYMAIL';
158$paramname = 'id';
159$autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO';
160$trackid = 'pre'.$object->id;
161include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
162
163
164/*
165 * View
166 */
167
168llxHeader();
169
170$result = $object->fetch($id);
171
172$form = new Form($db);
173$formfile = new FormFile($db);
174
175$head = payment_supplier_prepare_head($object);
176
177print dol_get_fiche_head($head, 'payment', $langs->trans('SupplierPayment'), -1, 'payment');
178
179if ($result > 0) {
180 /*
181 * Confirmation of payment's delete
182 */
183 if ($action == 'delete') {
184 print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("DeletePayment"), $langs->trans("ConfirmDeletePayment"), 'confirm_delete');
185 }
186
187 /*
188 * Confirmation of payment's validation
189 */
190 if ($action == 'validate') {
191 print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id, $langs->trans("ValidatePayment"), $langs->trans("ConfirmValidatePayment"), 'confirm_validate');
192 }
193
194 $linkback = '<a href="'.DOL_URL_ROOT.'/fourn/paiement/list.php'.(!empty($socid) ? '?socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
195
196 $morehtmlref = '';
197
198 dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'ref', $morehtmlref);
199
200 print '<div class="fichecenter">';
201 print '<div class="underbanner clearboth"></div>';
202
203 print '<table class="border centpercent">';
204
205 /*print '<tr>';
206 print '<td width="20%">'.$langs->trans('Ref').'</td><td>';
207 print $form->showrefnav($object,'id','',1,'rowid','ref');
208 print '</td></tr>';*/
209
210 // Date of payment
211 print '<tr><td class="titlefield">'.$form->editfieldkey("Date", 'datep', $object->date, $object, (int) ($object->statut == 0 && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")))).'</td>';
212 print '<td>';
213 print $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
214 print '</td></tr>';
215
216 // Payment mode
217 $labeltype = $langs->trans("PaymentType".$object->type_code) != "PaymentType".$object->type_code ? $langs->trans("PaymentType".$object->type_code) : $object->type_label;
218 print '<tr><td>'.$langs->trans('PaymentMode').'</td>';
219 print '<td>'.$labeltype;
220 print $object->num_payment ? ' - '.$object->num_payment : '';
221 print '</td></tr>';
222
223 // Payment numero
224 /* TODO Add field num_payment into payment table and save it
225 print '<tr><td>'.$form->editfieldkey("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer")).'</td>';
226 print '<td>';
227 print $form->editfieldval("Numero",'num_paiement',$object->num_paiement,$object,$object->statut == 0 && $user->hasRight("fournisseur", "facture", "creer"),'string','',null,$langs->trans('PaymentNumberUpdateSucceeded'));
228 print '</td></tr>';
229 */
230
231 // Amount
232 print '<tr><td>'.$langs->trans('Amount').'</td>';
233 print '<td><span class="amount">'.price($object->amount, 0, $langs, 0, 0, -1, $conf->currency).'</span></td></tr>';
234
235 // Status of validation of payment
236 if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
237 print '<tr><td>'.$langs->trans('Status').'</td>';
238 print '<td>'.$object->getLibStatut(4).'</td></tr>';
239 }
240
241 $allow_delete = 1;
242 $title_button = '';
243 // Bank account
244 if (isModEnabled("bank")) {
245 if ($object->fk_account) {
246 $bankline = new AccountLine($db);
247 $bankline->fetch($object->bank_line);
248 if ($bankline->rappro) {
249 $allow_delete = 0;
250 $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemoveConciliatedPayment"));
251 }
252
253 print '<tr>';
254 print '<td>'.$langs->trans('BankAccount').'</td>';
255 print '<td>';
256 $accountstatic = new Account($db);
257 $accountstatic->fetch($bankline->fk_account);
258 print $accountstatic->getNomUrl(1);
259 print '</td>';
260 print '</tr>';
261
262 print '<tr>';
263 print '<td>'.$langs->trans('BankTransactionLine').'</td>';
264 print '<td>';
265 print $bankline->getNomUrl(1, 0, 'showconciliatedandaccounted');
266 print '</td>';
267 print '</tr>';
268 }
269 }
270
271 // Note
272 print '<tr><td>'.$form->editfieldkey("Comments", 'note', $object->note_private, $object, (int) ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer"))).'</td>';
273 print '<td>';
274 print $form->editfieldval("Note", 'note', $object->note_private, $object, ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")), 'textarea');
275 print '</td></tr>';
276
277 print '</table>';
278
279 print '</div>';
280
281
282 print '<br><br>';
283
284
288 $sql = 'SELECT f.rowid, f.rowid as facid, f.ref, f.ref_supplier, f.type, f.paye, f.total_ht, f.total_tva, f.total_ttc, f.datef as date, f.fk_statut as status,';
289 $sql .= ' pf.amount, s.nom as name, s.rowid as socid';
290 $sql .= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf,'.MAIN_DB_PREFIX.'facture_fourn as f,'.MAIN_DB_PREFIX.'societe as s';
291 $sql .= ' WHERE pf.fk_facturefourn = f.rowid AND f.fk_soc = s.rowid';
292 $sql .= ' AND pf.fk_paiementfourn = '.((int) $object->id);
293 $resql = $db->query($sql);
294 if ($resql) {
295 $num = $db->num_rows($resql);
296
297 $i = 0;
298 $total = 0;
299
300 print '<table class="noborder centpercent">';
301 print '<tr class="liste_titre">';
302 print '<td>'.$langs->trans('Invoice').'</td>';
303 print '<td>'.$langs->trans('RefSupplier').'</td>';
304 print '<td>'.$langs->trans('Company').'</td>';
305 print '<td class="right">'.$langs->trans('ExpectedToPay').'</td>';
306 print '<td class="right">'.$langs->trans('PayedByThisPayment').'</td>';
307 print '<td class="right">'.$langs->trans('Status').'</td>';
308 print "</tr>\n";
309
310 if ($num > 0) {
311 $facturestatic = new FactureFournisseur($db);
312
313 while ($i < $num) {
314 $objp = $db->fetch_object($resql);
315
316 $facturestatic->id = $objp->facid;
317 $facturestatic->ref = ($objp->ref ? $objp->ref : $objp->rowid);
318 $facturestatic->date = $db->jdate($objp->date);
319 $facturestatic->type = $objp->type;
320 $facturestatic->total_ht = $objp->total_ht;
321 $facturestatic->total_tva = $objp->total_tva;
322 $facturestatic->total_ttc = $objp->total_ttc;
323 $facturestatic->statut = $objp->status;
324 $facturestatic->status = $objp->status;
325 $facturestatic->alreadypaid = -1; // unknown
326
327 print '<tr class="oddeven">';
328 // Ref
329 print '<td>';
330 print $facturestatic->getNomUrl(1);
331 print "</td>\n";
332 // Ref supplier
333 print '<td>'.$objp->ref_supplier."</td>\n";
334 // Third party
335 print '<td><a href="'.DOL_URL_ROOT.'/fourn/card.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'), 'company').' '.$objp->name.'</a></td>';
336 // Expected to pay
337 print '<td class="right">'.price($objp->total_ttc).'</td>';
338 // Paid
339 print '<td class="right">'.price($objp->amount).'</td>';
340 // Status
341 print '<td class="right">'.$facturestatic->LibStatut($objp->paye, $objp->status, 6, 1).'</td>';
342 print "</tr>\n";
343
344 if ($objp->paye == 1) {
345 $allow_delete = 0;
346 $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid"));
347 }
348 $total += $objp->amount;
349 $i++;
350 }
351 }
352
353
354 print "</table>\n";
355 $db->free($resql);
356 } else {
358 }
359
360 print '</div>';
361
362
363 /*
364 * Actions Buttons
365 */
366
367 print '<div class="tabsAction">';
368
369 // Send by mail
370 if ($user->socid == 0 && $action != 'presend') {
371 $usercansend = (!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "send")));
372 if ($usercansend) {
373 print dolGetButtonAction('', $langs->trans('SendMail'), 'email', dolBuildUrl($_SERVER["PHP_SELF"], ['id' => $object->id, 'action' => 'presend', 'mode' => 'init'], true).'#formmailbeforetitle', '');
374 } else {
375 print dolGetButtonAction('', $langs->trans('SendMail'), 'email', '#', '', false);
376 }
377 }
378
379 // Payment validation
380 if (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION')) {
381 if ($user->socid == 0 && $object->statut == 0 && $action == '') {
382 if ((!getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer")))
383 || (getDolGlobalString('MAIN_USE_ADVANCED_PERMS') && $user->hasRight("fournisseur", "supplier_invoice_advance", "validate"))) {
384 print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=validate&token='.newToken().'">'.$langs->trans('Valid').'</a>';
385 }
386 }
387 }
388
389 // Delete payment
390 if ($user->socid == 0 && $action != 'presend') {
391 if ($user->hasRight('fournisseur', 'facture', 'supprimer')) {
392 if ($allow_delete) {
393 print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 1);
394 } else {
395 print dolGetButtonAction($title_button, $langs->trans("Delete"), 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', 0);
396 }
397 }
398 }
399 print '</div>';
400
401 // Select mail models is same action as presend
402 if (GETPOST('modelselected')) {
403 $action = 'presend';
404 }
405
406 if ($action != 'presend') {
407 print '<div class="fichecenter"><div class="fichehalfleft">';
408
409 // Generated documents
410 include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php';
412 if (is_array($modellist)) {
413 $ref = dol_sanitizeFileName($object->ref);
414 $filedir = $conf->fournisseur->payment->dir_output.'/'.dol_sanitizeFileName($object->ref);
415 $urlsource = $_SERVER['PHP_SELF'].'?id='.$object->id;
416 $genallowed = ($user->hasRight("fournisseur", "facture", "lire") || $user->hasRight("supplier_invoice", "lire"));
417 $delallowed = ($user->hasRight("fournisseur", "facture", "creer") || $user->hasRight("supplier_invoice", "creer"));
418 $modelpdf = (!empty($object->model_pdf) ? $object->model_pdf : getDolGlobalString('SUPPLIER_PAYMENT_ADDON_PDF'));
419 if (empty($modelpdf) && !empty($modellist)) {
420 $tmpkeys = array_keys($modellist);
421 $modelpdf = (string) $tmpkeys[0];
422 }
423 if (empty($modelpdf)) {
424 $modelpdf = 'standard_supplierpayment';
425 }
426
427 print $formfile->showdocuments('supplier_payment', $ref, $filedir, $urlsource, (int) $genallowed, (int) $delallowed, $modelpdf, 1, 0, 0, 40, 0, '', '', '', $object->thirdparty->default_lang);
428 $somethingshown = $formfile->numoffiles;
429 }
430
431 print '</div><div class="fichehalfright">';
432 //print '<br>';
433
434 // List of actions on element
435 /*include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
436 $formactions=new FormActions($db);
437 $somethingshown = $formactions->showactions($object,'supplier_payment',$socid,1,'listaction'.($genallowed?'largetitle':''));
438 */
439
440 print '</div></div>';
441 }
442
443 // Ensure we have a PDF model to generate/attach the receipt on presend
444 if ($action == 'presend' && empty($object->model_pdf)) {
445 $defaultpdfmodel = getDolGlobalString('SUPPLIER_PAYMENT_ADDON_PDF');
446 if (!empty($defaultpdfmodel)) {
447 $object->model_pdf = $defaultpdfmodel;
448 } else {
449 include_once DOL_DOCUMENT_ROOT.'/core/modules/supplier_payment/modules_supplier_payment.php';
451 if (!empty($modellist)) {
452 $tmpkeys = array_keys($modellist);
453 $object->model_pdf = (string) $tmpkeys[0];
454 }
455 }
456 if (empty($object->model_pdf)) {
457 $object->model_pdf = 'standard_supplierpayment';
458 }
459 }
460
461 // Presend form
462 $modelmail = 'supplier_payment_send';
463 $defaulttopic = 'SendPaymentReceipt';
464 $diroutput = $conf->fournisseur->payment->dir_output;
465 $autocopy = 'MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO';
466 $trackid = 'pre'.$object->id;
467
468 include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
469} else {
470 recordNotFound('', 0);
471}
472
473print dol_get_fiche_end();
474
475// End of page
476llxFooter();
477$db->close();
$id
Support class for third parties, contacts, members, users or resources.
Definition account.php:47
if(! $sortfield) if(! $sortorder) $object
Definition account.php:100
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
Class to manage bank accounts.
Class to manage bank transaction lines.
Class to manage suppliers invoices.
Class to offer components to list and upload files.
Class to manage generation of HTML components Only common components must be here.
static liste_modeles($db, $maxfilenamelength=0)
Return list of active generation modules.
Class to manage payments for supplier invoices.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $conf
The main.inc.php has been included so the following variable are now defined:
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm='auto', $check=1)
Return a timestamp date built from detailed information (by default a local PHP server timestamp) Rep...
setEventMessages($mesg, $mesgs, $style='mesgs', $messagekey='', $noduplicate=0, $attop=0)
Set event messages in dol_events session object.
GETPOSTINT($paramname, $method=0)
Return the value of a $_GET or $_POST supervariable, converted into integer.
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.
dolBuildUrl($url, $params=[], $addtoken=false, $anchor='')
Return path of url.
dol_get_fiche_end($notab=0)
Return tab footer of a card.
img_object($titlealt, $picto, $moreatt='', $pictoisfullpath=0, $srconly=0, $notitle=0, $allowothertags=array())
Show a picto called object_picto (generic function)
dol_sanitizeFileName($str, $newstr='_', $unaccent=1, $includequotes=0, $allowdash=0)
Clean a string to use it as a file name.
GETPOST($paramname, $check='alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_print_error($db=null, $error='', $errors=null)
Displays error message system with all the information to facilitate the diagnosis and the escalation...
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
isModEnabled($module)
Is Dolibarr module enabled.
dol_escape_htmltag($stringtoescape, $keepb=0, $keepn=0, $noescapetags='', $escapeonlyhtmltags=0, $cleanalsojavascript=0)
Returns text escaped for inclusion in HTML alt or title or value tags, or into values of HTML input f...
print $langs trans("Show") . '< td style="' . $timeColor . '" align="center"> s</td > badge status0 badge status4 badge status3 Error badge status8< td align="center">< span class="badge ' . $badge . '"></span ></td >< td align="center">< a href="#" class="button button-small" onclick="openLogModal(this)" data-req="' . dol_escape_htmltag($reqSafe) . '" data-res="' . dol_escape_htmltag($resSafe) . '" data-err="' . dol_escape_htmltag($errSafe) . '">< span class="fa fa-search-plus"></span ></a ></td ></tr >< tr >< td colspan="' . $colspan . '" class="opacitymedium"></td ></tr ></table ></div ></form > logModal none logModal none s a JSON string
buildzip.php
restrictedArea(User $user, $features, $object=0, $tableandshare='', $feature2='', $dbt_keyfield='fk_soc', $dbt_select='rowid', $isdraft=0, $mode=0)
Check permissions of a user to show a page and an object.
accessforbidden($message='', $printheader=1, $printfooter=1, $showonlymessage=0, $params=null)
Show a message to say access is forbidden and stop program.