(2003-2009) * @author Froxlor team (2010-) * @license GPLv2 http://files.froxlor.org/misc/COPYING.txt * @package Functions * */ function getFormFieldDataBool($fieldname, $fielddata, &$input) { if (isset($input[$fieldname]) && ($input[$fieldname] === '1' || $input[$fieldname] === 1 || $input[$fieldname] === true || strtolower($input[$fieldname]) === 'yes' || strtolower($input[$fieldname]) === 'ja')) { $newfieldvalue = '1'; } else { $newfieldvalue = '0'; } return $newfieldvalue; }