Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1614666
form.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Mar 21, 2:16 AM
Size
17 KB
Mime Type
text/x-php
Expires
Mon, Mar 23, 2:16 AM (3 h, 29 m)
Engine
blob
Format
Raw Data
Handle
354137
Attached To
rDIADOSIS diadosis web portal
form.php
View Options
<?php
include_once
(
"utility.php"
);
class
Form
{
private
$elements
;
public
static
$pref
=
"_pre"
;
public
static
$suf
=
"_suf"
;
public
static
$numero
=
"_num"
;
public
static
$giorno
=
"_gg"
;
public
static
$mese
=
"_mm"
;
public
static
$anno
=
"_aaaa"
;
public
static
$ore
=
"_ore"
;
public
static
$minuti
=
"_min"
;
public
static
$secondi
=
"_sec"
;
function
__construct
(
$name
=
null
,
$action
=
null
,
$method
=
null
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
if
(
$name
==
null
)
$this
->
elements
=
""
;
else
$this
->
elements
.=
"$pre_tag<form name=
\"
$name
\"
id=
\"
$name
\"
method=
\"
$method
\"
action=
\"
$action
\"
$extra>$post_tag"
;
}
static
function
getHidden
(
$name
,
$val
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
hidden
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
style=
\"
display:none
\"
/>$post_tag"
;
}
static
function
getInputText
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
text
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
size=
\"
$size
\"
maxlength=
\"
$maxlength
\"
$extra />$post_tag"
;
}
static
function
getPassword
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
password
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
size=
\"
$size
\"
maxlength=
\"
$maxlength
\"
$extra />$post_tag"
;
}
static
function
getTextArea
(
$name
,
$val
,
$rows
=
""
,
$cols
=
""
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
if
(
$rows
>
0
)
$rows
=
"rows=
\"
$rows
\"
"
;
else
$rows
=
"rows=
\"\"
"
;
if
(
$cols
>
0
)
$cols
=
"cols=
\"
$cols
\"
"
;
else
$cols
=
"cols=
\"\"
"
;
return
"$pre_tag<textarea name=
\"
$name
\"
id=
\"
$name
\"
$cols $rows $extra>$val</textarea>$post_tag"
;
}
static
function
getSelect
(
$name
,
$multiple
,
$options
,
$selected_index
,
$size
=
1
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
if
(
$multiple
)
$multiple
=
"multiple=
\"
multiple
\"
"
;
if
(
isset
(
$size
)
&&
$size
!=
""
&&
$size
>
1
)
$size
=
"size=
\"
$size
\"
"
;
else
$size
=
""
;
$lista
=
"$pre_tag<select id=
\"
$name
\"
name=
\"
$name
\"
$multiple $size $extra>
\n
"
;
if
(
count
(
$options
)
>
0
)
{
$lista
.=
self
::
getSelectOptions
(
$options
,
$selected_index
);
}
$lista
.=
"</select>$post_tag"
;
return
$lista
;
}
static
function
getSelectOptions
(
$options
,
$selected_index
=
null
)
{
$lista
=
""
;
foreach
(
$options
as
$key
=>
$val
)
{
$sel
=
""
;
if
(
$key
==
$selected_index
&&
$selected_index
!=
""
&&
$selected_index
!=
null
)
$sel
=
"selected=
\"
selected
\"
"
;
$lista
.=
"<option value=
\"
$key
\"
$sel>$val</option>
\n
"
;
}
return
$lista
;
}
static
function
getRadio
(
$name
,
$val
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
,
$alt_id
=
null
)
{
if
(
$checked
)
$checked
=
"checked=
\"
checked
\"
"
;
else
$checked
=
""
;
if
(
$alt_id
!=
""
)
$id
=
"id=
\"
"
.
$alt_id
.
"
\"
"
;
else
$id
=
"id=
\"
$name
\"
"
;
return
"$pre_tag<input type=
\"
radio
\"
name=
\"
$name
\"
$id value=
\"
$val
\"
$checked $extra />$post_tag"
;
}
static
function
getCheckbox
(
$name
,
$val
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
if
(
$checked
)
$checked
=
"checked=
\"
checked
\"
"
;
return
"$pre_tag<input type=
\"
checkbox
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
$checked $extra />$post_tag"
;
}
static
function
getFile
(
$name
,
$val
=
null
,
$size
=
null
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
file
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
size=
\"
$size
\"
$extra />$post_tag"
;
}
static
function
getButton
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
button
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
$extra />$post_tag"
;
}
static
function
getReset
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
reset
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
$extra />$post_tag"
;
}
static
function
getSubmit
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
return
"$pre_tag<input type=
\"
submit
\"
name=
\"
$name
\"
id=
\"
$name
\"
value=
\"
$val
\"
$extra />$post_tag"
;
}
function
addHidden
(
$name
,
$val
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getHidden
(
$name
,
$val
,
$pre_tag
,
$post_tag
);
}
function
addInputText
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getInputText
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addPassword
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getPassword
(
$name
,
$val
,
$maxlength
,
$size
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addTextArea
(
$name
,
$val
,
$rows
=
null
,
$cols
=
null
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getTextArea
(
$name
,
$val
,
$rows
,
$cols
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addSelect
(
$name
,
$multiple
,
$options
,
$selected_index
,
$size
=
1
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getSelect
(
$name
,
$multiple
,
$options
,
$selected_index
,
$size
=
1
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addRadio
(
$name
,
$val
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
,
$alt_id
=
null
)
{
$this
->
elements
.=
$this
->
getRadio
(
$name
,
$val
,
$checked
,
$extra
,
$pre_tag
,
$post_tag
,
$alt_id
);
}
function
addCheckbox
(
$name
,
$val
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getCheckbox
(
$name
,
$val
,
$checked
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addFile
(
$name
,
$val
=
null
,
$size
=
null
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getFile
(
$name
,
$val
,
$size
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addButton
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getButton
(
$name
,
$val
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addReset
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getReset
(
$name
,
$val
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
addSubmit
(
$name
,
$val
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$this
->
elements
.=
$this
->
getSubmit
(
$name
,
$val
,
$extra
,
$pre_tag
,
$post_tag
);
}
function
close
()
{
$this
->
elements
.=
"</form>"
;
}
function
addHTML
(
$stringa
)
{
$this
->
elements
.=
$stringa
;
}
function
stampa
()
{
echo
$this
->
elements
;
}
function
restituisci
()
{
return
$this
->
elements
;
}
function
addRadioSiNo
(
$name
,
$checkSINO
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
,
$alt_id
=
null
)
{
$checkNO
=
FALSE
;
$checkSI
=
FALSE
;
if
(
$checkSINO
===
0
)
$checkNO
=
TRUE
;
else
if
(
$checkSINO
===
1
)
$checkSI
=
TRUE
;
$this
->
addHTML
(
"<div class=
\"
"
.
$name
.
"
\"
><div class=
\"
form_obj_name
\"
>"
.
$$name
.
"<span class=
\"
colon
\"
>: </span></div>"
);
$this
->
addHTML
(
" <span>"
);
$this
->
addHTML
(
getConstVar
(
"NO"
)
.
" "
);
$this
->
addRadio
(
$name
.
"_radio"
,
0
,
$checkNO
,
$extra
,
$pre_tag
,
$post_tag
,
$alt_id
);
$this
->
addHTML
(
getConstVar
(
"SI"
)
.
" "
);
$this
->
addRadio
(
$name
.
"_radio"
,
1
,
$checkSI
,
$extra
,
$pre_tag
,
$post_tag
,
$alt_id
);
$this
->
addHTML
(
" </span>"
);
$this
->
addHTML
(
"</div>"
);
}
}
;
class
FieldsForm
extends
Form
{
function
__construct
(
$name
=
null
,
$action
=
null
,
$extra
=
null
)
{
parent
::
__construct
(
$name
,
$action
,
"POST"
,
$extra
);
}
function
addField
(
$fieldobj
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
,
$forceempty
=
null
,
$forcerequired
=
null
)
{
$controllo
=
null
;
$type
=
isset
(
$fieldobj
->
type
)
?
$fieldobj
->
type
:
null
;
$name
=
isset
(
$fieldobj
->
fieldname
)
?
$fieldobj
->
fieldname
:
null
;
if
(
isset
(
$fieldobj
->
value
)
&&
$fieldobj
->
value
!==
""
)
$val
=
SQL_unescape
(
$fieldobj
->
value
);
else
$val
=
isset
(
$fieldobj
->
defaultval
)
?
$fieldobj
->
defaultval
:
null
;
$maxlength
=
isset
(
$fieldobj
->
maxsize
)
?
$fieldobj
->
maxsize
:
null
;
global
$$name
;
if
(
$forceempty
==
1
)
{
if
(
$type
==
"int"
||
$type
==
"float"
||
$type
==
"decimal"
)
$val
=
0
;
else
$val
=
""
;
}
$this
->
addHTML
(
"<div class=
\"
$name
\"
>"
);
if
(
$name
!=
"rm_note"
&&
$name
!=
"bi_condforni"
&&
!
strpos
(
$name
,
"_sosp"
)
&&
$name
!=
"bi_preavvisososp"
)
$this
->
addHTML
(
"<div id=
\"
"
.
$name
.
"_form_obj_name
\"
class=
\"
form_obj_name
\"
>"
.
$$name
.
"<span class=
\"
colon
\"
>: </span></div>"
);
if
(
strpos
(
$name
,
"_sosp"
))
$this
->
addHTML
(
"<div id=
\"
"
.
$name
.
"_form_obj_name
\"
class=
\"
form_obj_name
\"
>"
.
$$name
.
"</div>"
);
if
(
strpos
(
$name
,
"_tel"
)
||
strpos
(
$name
,
"_fax"
))
{
$phonearr
=
parse_phone
(
$val
);
$val_pre
=
isset
(
$phonearr
[
0
])
?
$phonearr
[
0
]
:
null
;
$val_num
=
isset
(
$phonearr
[
1
])
?
$phonearr
[
1
]
:
null
;
$this
->
addInputText
(
$name
.
self
::
$pref
,
$val_pre
,
6
,
6
,
$extra
,
$pre_tag
,
""
);
$this
->
addHTML
(
" - "
);
$this
->
addInputText
(
$name
.
self
::
$numero
,
$val_num
,
12
,
12
,
$extra
,
""
,
$post_tag
);
$controllo
[
$name
.
self
::
$pref
][
"obbligo"
]
=
(!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
))
||
$forcerequired
;
$controllo
[
$name
.
self
::
$pref
][
"tipo"
]
=
$type
;
$controllo
[
$name
.
self
::
$numero
][
"obbligo"
]
=
(!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
))
||
$forcerequired
;
$controllo
[
$name
.
self
::
$numero
][
"tipo"
]
=
$type
;
$star
=
""
;
if
(
$controllo
[
$name
.
self
::
$pref
][
"obbligo"
])
$star
=
"<font class=
\"
redstar
\"
>"
.
getConstVar
(
"CAMPO_OBBLIGATORIO"
)
.
"</font>"
;
}
else
if
((
$name
==
'data_eva'
)
||
strpos
(
$name
,
"_data"
)
||
strpos
(
$name
,
"_sosp"
))
{
$datearr
=
parse_date
(
$val
);
if
(
$name
==
'dd_dataeva'
&&
isset
(
$_SESSION
[
'dd_dataevaFN'
]))
{
unset
(
$_SESSION
[
'dd_dataevaFN'
]);
$val_aaaa
=
date
(
'Y'
);
$val_mm
=
date
(
'm'
);
$val_gg
=
date
(
'd'
);
}
else
{
$val_aaaa
=
isset
(
$datearr
[
0
])
?
$datearr
[
0
]
:
null
;
$val_mm
=
isset
(
$datearr
[
1
])
?
$datearr
[
1
]
:
null
;
$val_gg
=
isset
(
$datearr
[
2
])
?
$datearr
[
2
]
:
null
;
}
$this
->
addInputText
(
$name
.
self
::
$giorno
,
$val_gg
,
2
,
2
,
$extra
,
$pre_tag
,
" / "
);
$this
->
addInputText
(
$name
.
self
::
$mese
,
$val_mm
,
2
,
2
,
""
,
""
,
" / "
);
$this
->
addInputText
(
$name
.
self
::
$anno
,
$val_aaaa
,
4
,
4
,
""
,
""
,
$post_tag
);
$controllo
[
$name
.
self
::
$giorno
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
.
self
::
$giorno
][
"tipo"
]
=
$type
;
$controllo
[
$name
.
self
::
$mese
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
.
self
::
$mese
][
"tipo"
]
=
$type
;
$controllo
[
$name
.
self
::
$anno
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
.
self
::
$anno
][
"tipo"
]
=
$type
;
if
(
$forcerequired
==
1
)
{
$controllo
[
$name
.
self
::
$giorno
][
"obbligo"
]
=
1
;
$controllo
[
$name
.
self
::
$mese
][
"obbligo"
]
=
1
;
$controllo
[
$name
.
self
::
$anno
][
"obbligo"
]
=
1
;
}
$star
=
""
;
if
(
$controllo
[
$name
.
self
::
$anno
][
"obbligo"
])
$star
=
"<font class=
\"
redstar
\"
>"
.
getConstVar
(
"CAMPO_OBBLIGATORIO"
)
.
"</font>"
;
}
else
{
if
(
strpos
(
$name
,
"_pwd"
))
{
$this
->
addPassword
(
$name
,
NULL
,
$maxlength
,
30
,
$extra
,
$pre_tag
,
$post_tag
);
$controllo
[
$name
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
][
"tipo"
]
=
$type
;
}
else
if
(
strpos
(
$name
,
"_doi"
))
{
$doiarr
=
parse_doi
(
$val
);
$val_pre
=
isset
(
$doiarr
[
0
])
?
$doiarr
[
0
]
:
null
;
$val_suf
=
isset
(
$doiarr
[
1
])
?
$doiarr
[
1
]
:
null
;
$this
->
addInputText
(
$name
.
self
::
$pref
,
$val_pre
,
6
,
6
,
""
,
"10."
,
""
);
$this
->
addInputText
(
$name
.
self
::
$suf
,
$val_suf
,
255
,
25
,
""
,
" / "
,
$post_tag
);
$controllo
[
$name
.
self
::
$pref
][
"obbligo"
]
=
!(
$fieldobj
->
isnull
);
$controllo
[
$name
.
self
::
$pref
][
"tipo"
]
=
$type
;
$controllo
[
$name
.
self
::
$suf
][
"obbligo"
]
=
!(
$fieldobj
->
isnull
);
$controllo
[
$name
.
self
::
$suf
][
"tipo"
]
=
$type
;
}
else
if
(
strpos
(
$name
,
"_file"
))
{
$this
->
addHTML
(
"<span id=
\"
$name"
.
"_label
\"
>$val</span>"
);
if
(
$val
==
""
)
$style
=
""
;
else
$style
=
"style=
\"
display:none
\"
"
;
$this
->
addFile
(
$name
,
$val
,
40
,
$style
);
$controllo
[
$name
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
][
"tipo"
]
=
$type
;
}
else
if
(
strpos
(
$name
,
"_check"
))
{
$checked
=
false
;
if
(
$fieldobj
->
value
==
1
)
$checked
=
true
;
$fieldobj
->
value
=
1
;
$this
->
addFieldCheckbox
(
$fieldobj
,
$checked
,
$extra
,
$pre_tag
,
$post_tag
);
}
else
{
$controllo
[
$name
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
][
"tipo"
]
=
$type
;
switch
(
$type
)
{
case
"text"
:
case
"blob"
:
$this
->
addTextArea
(
$name
,
$val
,
0
,
0
,
$extra
,
$pre_tag
,
$post_tag
);
$controllo
[
$name
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
][
"tipo"
]
=
$type
;
break
;
case
"datetime"
:
break
;
default
:
$this
->
addInputText
(
$name
,
$val
,
$maxlength
,
30
,
$extra
,
$pre_tag
,
$post_tag
);
$controllo
[
$name
][
"obbligo"
]
=
!(
isset
(
$fieldobj
->
isnull
)
?
$fieldobj
->
isnull
:
null
);
$controllo
[
$name
][
"tipo"
]
=
$type
;
}
}
if
(
$forcerequired
==
1
)
$controllo
[
$name
][
"obbligo"
]
=
1
;
$star
=
""
;
if
(
isset
(
$controllo
[
$name
][
"obbligo"
])
&&
$controllo
[
$name
][
"obbligo"
])
$star
=
"<font class=
\"
redstar
\"
>"
.
getConstVar
(
"CAMPO_OBBLIGATORIO"
)
.
"</font>"
;
}
$this
->
addHTML
(
"$star"
);
$this
->
addHTML
(
"</div>"
);
return
$controllo
;
}
function
addFieldSelect
(
$fieldobj
,
$multiple
,
$options
,
$size
=
1
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
"
\n
"
)
{
$controllo
=
null
;
$selected_index
=
$fieldobj
->
value
;
$name
=
$fieldobj
->
fieldname
;
$star
=
""
;
if
(!
$fieldobj
->
isnull
)
$star
=
"<font class=
\"
redstar
\"
>"
.
getConstVar
(
"CAMPO_OBBLIGATORIO"
)
.
"</font>"
;
global
$$name
;
if
(
$extra
==
"style=
\"
display: none;
\"
"
)
$this
->
addHTML
(
"<div class=
\"
$name
\"
id=
\"
"
.
$name
.
"_box_sel
\"
><div class=
\"
form_obj_name
\"
>"
.
$$name
.
"<span class=
\"
colon
\"
>: "
.
$options
[
key
(
$options
)]
.
"</span></div>"
);
else
$this
->
addHTML
(
"<div class=
\"
$name
\"
id=
\"
"
.
$name
.
"_box_sel
\"
><div class=
\"
form_obj_name
\"
>"
.
$$name
.
"<span class=
\"
colon
\"
>: </span></div>"
);
$this
->
addSelect
(
$name
,
$multiple
,
$options
,
$selected_index
,
$size
,
$extra
,
$pre_tag
.
"<span>"
,
"$star</span>"
.
$post_tag
);
$this
->
addHTML
(
"</div>"
);
$controllo
[
$name
][
"obbligo"
]
=
!(
$fieldobj
->
isnull
);
$controllo
[
$name
][
"tipo"
]
=
$fieldobj
->
type
;
return
$controllo
;
}
function
addFieldRadio
(
$fieldobj
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
,
$alt_id
=
null
)
{
$controllo
=
null
;
$name
=
$fieldobj
->
fieldname
;
$val
=
$fieldobj
->
value
;
$this
->
addRadio
(
$name
,
$val
,
$checked
,
$extra
,
$pre_tag
,
$post_tag
,
$alt_id
);
$controllo
[
$name
][
"obbligo"
]
=
!(
$fieldobj
->
isnull
);
$controllo
[
$name
][
"tipo"
]
=
$fieldobj
->
type
;
return
$controllo
;
}
function
addFieldCheckbox
(
$fieldobj
,
$checked
=
FALSE
,
$extra
=
null
,
$pre_tag
=
null
,
$post_tag
=
null
)
{
$controllo
=
null
;
$name
=
$fieldobj
->
fieldname
;
$val
=
$fieldobj
->
value
;
$this
->
addCheckbox
(
$name
,
$val
,
$checked
,
$extra
,
$pre_tag
,
$post_tag
);
$controllo
[
$name
][
"obbligo"
]
=
!(
$fieldobj
->
isnull
);
$controllo
[
$name
][
"tipo"
]
=
$fieldobj
->
type
;
return
$controllo
;
}
}
;
?>
Event Timeline
Log In to Comment