* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. */ /** * \file idsconnect/supplier_list.php * \ingroup idsconnect * \brief Liste aller konfigurierten Großhändler */ // Dolibarr laden $res = 0; if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php"; } $tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; } if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) { $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php"; } if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) { $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php"; } if (!$res && file_exists("../main.inc.php")) { $res = @include "../main.inc.php"; } if (!$res && file_exists("../../main.inc.php")) { $res = @include "../../main.inc.php"; } if (!$res) { die("Include of main fails"); } dol_include_once('/idsconnect/class/idssupplier.class.php'); dol_include_once('/idsconnect/lib/idsconnect.lib.php'); /** * @var DoliDB $db * @var Translate $langs * @var User $user */ $langs->loadLangs(array("idsconnect@idsconnect")); if (!$user->hasRight('idsconnect', 'read')) { accessforbidden(); } /* * View */ llxHeader('', $langs->trans("IdsconnectSupplierList"), '', '', 0, 0, '', '', '', 'mod-idsconnect page-supplier_list'); print load_fiche_titre($langs->trans("IdsconnectSupplierList"), '', 'fa-plug'); idsconnectShowTestModeBanner(); $supplierObj = new IdsSupplier($db); $suppliers = $supplierObj->fetchAll(0); print '
| '.$langs->trans("IdsconnectSupplierRef").' | '; print ''.$langs->trans("IdsconnectSupplierLabel").' | '; print ''.$langs->trans("IdsconnectSupplierUrl").' | '; print ''.$langs->trans("IdsconnectSupplierVersion").' | '; print ''.$langs->trans("IdsconnectSupplierTestmode").' | '; print ''.$langs->trans("Status").' | '; print ''.$langs->trans("Action").' | '; print '
|---|---|---|---|---|---|---|
| '.htmlspecialchars($sup->ref).' | '; print ''.htmlspecialchars($sup->label).' | '; print ''.htmlspecialchars($sup->ids_url).' | '; print ''.htmlspecialchars($sup->ids_version).' | '; print ''.yn($sup->testmode).' | '; print ''.yn($sup->active).' | '; print ''; if ($sup->active && $user->hasRight('idsconnect', 'use')) { print ''.$langs->trans("IdsconnectOpenShop").''; } print ' | '; print '
| '.$langs->trans("IdsconnectNoSuppliers").' | ||||||