27 if (empty($conf) || !is_object($conf))
29 print "Error, template page can't be called as URL";
32 if (!is_object($form)) $form =
new Form($db);
35 <!-- BEGIN PHP TEMPLATE commonfields_view.tpl.php -->
40 foreach ($object->fields as $key => $val)
42 if (!empty($keyforbreak) && $key == $keyforbreak)
break;
45 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4 && abs($val[
'visible']) != 5)
continue;
47 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled']))
continue;
48 if (in_array($key, array(
'ref',
'status')))
continue;
50 $value = $object->$key;
53 print ' class="titlefield fieldname_'.$key;
55 if ($val[
'type'] ==
'text' || $val[
'type'] ==
'html')
print ' tdtop';
57 if (!empty($val[
'help']))
print $form->textwithpicto($langs->trans($val[
'label']), $langs->trans($val[
'help']));
58 else print $langs->trans($val[
'label']);
60 print '<td class="valuefield fieldname_'.$key;
61 if ($val[
'type'] ==
'text')
print ' wordbreak';
62 if ($val[
'cssview'])
print ' '.$val[
'cssview'];
64 if (in_array($val[
'type'], array(
'text',
'html')))
print '<div class="longmessagecut">';
65 print $object->showOutputField($val, $key, $value,
'',
'',
'', 0);
67 if (in_array($val[
'type'], array(
'text',
'html')))
print '</div>';
76 print '<div class="fichehalfright">';
78 print '<div class="underbanner clearboth"></div>';
79 print '<table class="border centpercent tableforfield">';
82 foreach ($object->fields as $key => $val)
86 if (!empty($keyforbreak) && $key == $keyforbreak) {
94 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3 && abs($val[
'visible']) != 4 && abs($val[
'visible']) != 5)
continue;
96 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !$val[
'enabled'])
continue;
97 if (in_array($key, array(
'ref',
'status')))
continue;
99 $value = $object->$key;
102 print ' class="titlefield fieldname_'.$key;
104 if ($val[
'type'] ==
'text' || $val[
'type'] ==
'html')
print ' tdtop';
106 if (!empty($val[
'help']))
print $form->textwithpicto($langs->trans($val[
'label']), $langs->trans($val[
'help']));
107 else print $langs->trans($val[
'label']);
109 print '<td class="valuefield fieldname_'.$key;
110 if ($val[
'type'] ==
'text')
print ' wordbreak';
111 if ($val[
'cssview'])
print ' '.$val[
'cssview'];
113 if (in_array($val[
'type'], array(
'text',
'html')))
print '<div class="longmessagecut">';
114 print $object->showOutputField($val, $key, $value,
'',
'',
'', 0);
116 if (in_array($val[
'type'], array(
'text',
'html')))
print '</div>';
122 <!-- END PHP TEMPLATE commonfields_view.tpl.php -->
verifCond($strRights)
Verify if condition in string is ok or not.
dol_sort_array(&$array, $index, $order= 'asc', $natsort=0, $case_sensitive=0, $keepindex=0)
Advanced sort array by second index function, which produces ascending (default) or descending output...
print
Draft customers invoices.