48@phan-var-force Propal|Contrat|Commande|Facture|Expedition|Delivery|FactureFournisseur|FactureFournisseur|SupplierProposal $object
49@phan-var-force array<string,array{label:string,checked?:string,position?:int,help?:string,enabled?:string}> $arrayfields
50@phan-var-force int $num
51@phan-var-force string $search_user
52@phan-var-force string $search_entity
53@phan-var-force string $search_datec_start
54@phan-var-force string $search_datec_end
55@phan-var-force string $search_tms_start
56@phan-var-force string $search_tms_end
57@phan-var-force int $colspan
60echo
"<!-- BEGIN PHP TEMPLATE apitoken_list.tpl.php -->\n";
62print
'<table class="noborder centpercent">';
64print
'<tr class="liste_titre_filter">';
67if (
$conf->main_checkbox_left_column) {
68 print
'<td class="liste_titre center">';
69 $searchpicto = $form->showFilterButtons(
'left');
76print
'<td class="liste_titre"></td>';
79if (!empty($arrayfields[
'u.login'][
'checked'])) {
80 print
'<td class="liste_titre">';
81 print
'<input class="flat maxwidth100" type="text" name="search_user" value="'.dol_escape_htmltag($search_user).
'">';
88print
'<td class="liste_titre"></td>';
91if (!empty($arrayfields[
'oat.datec'][
'checked'])) {
92 print
'<td class="liste_titre center">';
93 print
'<div class="nowrapfordate">';
94 print $form->selectDate($search_datec_start ? $search_datec_start : -1,
'search_datec_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
96 print
'<div class="nowrapfordate">';
97 print $form->selectDate($search_datec_end ? $search_datec_end : -1,
'search_datec_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
103if (!empty($arrayfields[
'oat.tms'][
'checked'])) {
104 print
'<td class="liste_titre center">';
105 print
'<div class="nowrapfordate">';
106 print $form->selectDate($search_tms_start ? $search_tms_start : -1,
'search_tms_start', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'From'));
108 print
'<div class="nowrapfordate">';
109 print $form->selectDate($search_tms_end ? $search_tms_end : -1,
'search_tms_end', 0, 0, 1,
'', 1, 0, 0,
'',
'',
'',
'', 1,
'', $langs->trans(
'to'));
115if (!
$conf->main_checkbox_left_column) {
116 print
'<td class="liste_titre center">';
117 $searchpicto = $form->showFilterButtons(
'left');
124print
'<tr class="liste_titre">';
125if (
$conf->main_checkbox_left_column) {
126 print
'<th class="wrapcolumntitle center maxwidthsearch liste_titre">';
127 print $form->showCheckAddButtons(
'checkforselect', 1);
130print
'<th class="liste_titre">'.$langs->trans(
"Token").
'</th>';
131if (!empty($arrayfields[
'u.login'][
'checked'])) {
133 print_liste_field_titre($arrayfields[
'u.login'][
'label'], $_SERVER[
"PHP_SELF"],
'u.login',
'', $param,
'', $sortfield, $sortorder);
135print
'<th class="liste_titre right">'.$langs->trans(
"LastAccess").
'</th>';
136if (!empty($arrayfields[
'oat.datec'][
'checked'])) {
137 print_liste_field_titre($arrayfields[
'oat.datec'][
'label'], $_SERVER[
"PHP_SELF"],
'oat.datec',
'', $param,
'', $sortfield, $sortorder,
'center ');
139if (!empty($arrayfields[
'oat.tms'][
'checked'])) {
140 print_liste_field_titre($arrayfields[
'oat.tms'][
'label'], $_SERVER[
"PHP_SELF"],
'oat.tms',
'', $param,
'', $sortfield, $sortorder,
'center ');
142if (!
$conf->main_checkbox_left_column) {
143 print
'<th class="wrapcolumntitle center maxwidthsearch liste_titre">';
144 print $form->showCheckAddButtons(
'checkforselect', 1);
151$imaxinloop = ($limit ? min($num, $limit) : $num);
153 while ($i < $imaxinloop) {
155 $obj =
$db->fetch_object($resql);
157 $useridparam = isset($obj->fk_user) ? $obj->fk_user :
$object->id;
159 if (isset($obj->fk_user)) {
161 $currentuser->fetch($obj->fk_user);
176 print
'<tr class="oddeven">';
178 if (
$conf->main_checkbox_left_column) {
179 print
'<td class="nowrap center">';
180 if ($massactionbutton || $massaction) {
182 if (in_array($obj->rowid, $arrayofselected)) {
185 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
190 print
'<a href="'.DOL_URL_ROOT.
'/user/api_token/card.php?id='.$useridparam.
'&tokenid='.$obj->rowid.
'">';
194 if (!empty($arrayfields[
'u.login'][
'checked'])) {
196 print
'<a href="'.DOL_URL_ROOT.
'/user/card.php?id='.$obj->fk_user.
'">';
197 print $currentuser->getNomUrl(1);
201 print
'<td class="right">';
204 print
'<td class="center">';
207 print
'<td class="center">';
210 if (!
$conf->main_checkbox_left_column) {
211 print
'<td class="nowrap center">';
212 if ($massactionbutton || $massaction) {
214 if (in_array($obj->rowid, $arrayofselected)) {
217 print
'<input id="cb'.$obj->rowid.
'" class="flat checkforselect" type="checkbox" name="toselect[]" value="'.$obj->rowid.
'"'.($selected ?
' checked="checked"' :
'').
'>';
228 print
'<tr class="oddeven"><td colspan="'.$colspan.
'"><span class="opacitymedium">'.$langs->trans(
"None").
'</span></td></tr>';
if(! $sortfield) if(! $sortorder) $object
Class to manage Dolibarr users.
print_liste_field_titre($name, $file="", $field="", $begin="", $param="", $moreattrib="", $sortfield="", $sortorder="", $prefix="", $tooltip="", $forcenowrapcolumntitle=0)
Show title line of an array.
dol_print_date($time, $format='', $tzoutput='auto', $outputlangs=null, $encodetooutput=false, $decorate=0)
Output date in a string format according to outputlangs (or langs if not defined).
isModEnabled($module)
Is Dolibarr module enabled.
dolDecrypt($chain, $key='', $patterntotest='')
Decode a string with a symmetric encryption.