26 if (empty($conf) || !is_object($conf))
28 print "Error, template page can't be called as URL";
33 <!-- BEGIN PHP TEMPLATE commonfields_add.tpl.php -->
38 foreach ($object->fields as $key => $val)
41 if (abs($val[
'visible']) != 1 && abs($val[
'visible']) != 3)
continue;
43 if (array_key_exists(
'enabled', $val) && isset($val[
'enabled']) && !
verifCond($val[
'enabled']))
continue;
45 print '<tr id="field_'.$key.
'">';
47 print ' class="titlefieldcreate';
48 if ($val[
'notnull'] > 0)
print ' fieldrequired';
49 if ($val[
'type'] ==
'text' || $val[
'type'] ==
'html')
print ' tdtop';
52 if (!empty($val[
'help']))
print $form->textwithpicto($langs->trans($val[
'label']), $langs->trans($val[
'help']));
53 else print $langs->trans($val[
'label']);
57 if (in_array($val[
'type'], array(
'int',
'integer'))) $value =
GETPOST($key,
'int');
58 elseif ($val[
'type'] ==
'text' || $val[
'type'] ==
'html') $value =
GETPOST($key, 'restricthtml');
60 elseif ($val['
type'] == 'datetime') $value = dol_mktime(
GETPOST($key.'hour', '
int'),
GETPOST($key.'min', '
int'), 0,
GETPOST($key.'month', '
int'),
GETPOST($key.'day', '
int'),
GETPOST($key.'year', '
int'));
61 elseif ($val['
type'] == '
boolean') $value = (
GETPOST($key) == 'on' ? 1 : 0);
63 if ($val['noteditable'])
print $object->showOutputField($val, $key, $value, '', '', '', 0);
64 else print $object->showInputField($val, $key, $value, '', '', '', 0);
70 <!-- END PHP TEMPLATE commonfields_add.tpl.php -->
verifCond($strRights)
Verify if condition in string is ok or not.
GETPOST($paramname, $check= 'alphanohtml', $method=0, $filter=null, $options=null, $noreplace=0)
Return value of a param into GET or POST supervariable.
dol_mktime($hour, $minute, $second, $month, $day, $year, $gm= 'auto', $check=1)
Return a timestamp date built from detailed informations (by default a local PHP server timestamp) Re...
img_picto($titlealt, $picto, $moreatt= '', $pictoisfullpath=false, $srconly=0, $notitle=0, $alt= '', $morecss= '', $marginleftonlyshort=2)
Show picto whatever it's its name (generic function)
if(!GETPOST('transkey', 'alphanohtml')&&!GETPOST('transphrase', 'alphanohtml')) else
View.
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.
if(!defined('CSRFCHECK_WITH_TOKEN')) define('CSRFCHECK_WITH_TOKEN'
Draft customers invoices.
if(preg_match('/crypted:/i', $dolibarr_main_db_pass)||!empty($dolibarr_main_db_encrypted_pass)) $conf db type