Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<package>FF</package> <name>ff_anychecked</name> <title>Any Checked</title> <type..
Decoded Output download
<? <package>FF</package>
<name>ff_anychecked</name>
<title>Any Checked</title>
<type>Element Validation</type>
<description>Validate that any radio button or checkbox of a group is checked.</description>
<code>function ff_anychecked(element, message)
{
// get plain name
// alert(document.ff_form52['ff_nm_bfQuickMode6303958[]']);
// alert(document.getElementById(element.id).id);
var name = '';
if(!element.name){
if(element.length && element.length != 0){
name = element[0].name;
var cnt = 0;
for (var i = 0; i < element.length; i++)
if (element[i].name==name)
if (element[i].checked) cnt++;
if (cnt==0) {
ff_validationFocus(element[0].name);
if (message=='') message = "Please check or select "+name+".
";
return message;
} // if
} else {
return '';
}
} else {
name = element.name;
if (name.substr(0,6) == 'ff_nm_') name = name.substring(6,name.length-2);
// loop through elements and count selections
var cnt = 0;
for (var i = 0; i < ff_elements.length; i++)
if (ff_elements[i][2]==name)
if (ff_getElementByIndex(i).checked) cnt++;
// if none selected, emitt error
if (cnt==0) {
ff_validationFocus(element.name);
if (message=='') message = "Please check or select "+name+".
";
return message;
} // if
}
return '';
} // ff_anychecked</code> ?>
Did this file decode correctly?
Original Code
<package>FF</package>
<name>ff_anychecked</name>
<title>Any Checked</title>
<type>Element Validation</type>
<description>Validate that any radio button or checkbox of a group is checked.</description>
<code>function ff_anychecked(element\x2C message)\r\n{\r\n // get plain name\r\n // alert(document.ff_form52[\x27ff_nm_bfQuickMode6303958[]\x27])\x3B\r\n // alert(document.getElementById(element.id).id)\x3B\r\n var name = \x27\x27\x3B\r\n if(!element.name){\r\n if(element.length \x26\x26 element.length != 0){\r\n name = element[0].name\x3B\r\n var cnt = 0\x3B\r\n for (var i = 0\x3B i \x3C element.length\x3B i++)\r\n if (element[i].name==name) \r\n if (element[i].checked) cnt++\x3B \r\n if (cnt==0) {\r\n ff_validationFocus(element[0].name)\x3B\r\n if (message==\x27\x27) message = \x22Please check or select \x22+name+\x22.\x5Cn\x22\x3B\r\n return message\x3B\r\n } // if \r\n\r\n } else {\r\n return \x27\x27\x3B\r\n }\r\n } else {\r\n name = element.name\x3B\r\n if (name.substr(0\x2C6) == \x27ff_nm_\x27) name = name.substring(6\x2Cname.length-2)\x3B\r\n\r\n // loop through elements and count selections\r\n var cnt = 0\x3B\r\n for (var i = 0\x3B i \x3C ff_elements.length\x3B i++)\r\n if (ff_elements[i][2]==name) \r\n if (ff_getElementByIndex(i).checked) cnt++\x3B\r\n\r\n // if none selected\x2C emitt error\r\n if (cnt==0) {\r\n ff_validationFocus(element.name)\x3B\r\n if (message==\x27\x27) message = \x22Please check or select \x22+name+\x22.\x5Cn\x22\x3B\r\n return message\x3B\r\n } // if\r\n }\r\n \r\n return \x27\x27\x3B\r\n} // ff_anychecked</code>
Function Calls
None |
Stats
MD5 | 21ea18e99476f4a83a373428c7884125 |
Eval Count | 0 |
Decode Time | 93 ms |