Last change
on this file was 93, checked in by chronos, 11 years ago |
- Fixed: System variable as parameter to constructors of descendents of Module class.
- Removed: End PHP mark "?>" from all files.
|
File size:
621 bytes
|
Line | |
---|
1 | <?php
|
---|
2 |
|
---|
3 | class TypeBoolean extends TypeBase
|
---|
4 | {
|
---|
5 | var $DatabaseCompareOperators = array('Rovno' => '=', 'Nerovno' => '!=');
|
---|
6 |
|
---|
7 | function OnView($Item)
|
---|
8 | {
|
---|
9 | if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = '';
|
---|
10 | return('<input type="checkbox" name="'.$Item['Name'].'" disabled="1"'.$Checked.'>');
|
---|
11 | }
|
---|
12 |
|
---|
13 | function OnEdit($Item)
|
---|
14 | {
|
---|
15 | if($Item['Value'] == 1) $Checked = ' checked="1"'; else $Checked = '';
|
---|
16 | return('<input type="checkbox" name="'.$Item['Name'].'"'.$Checked.'>');
|
---|
17 | }
|
---|
18 |
|
---|
19 | function OnLoad($Item)
|
---|
20 | {
|
---|
21 | if(array_key_exists($Item['Name'], $_POST)) return(1);
|
---|
22 | else return(0);
|
---|
23 | }
|
---|
24 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.