536870912) $str = sprintf("%5.2f GBs", $bytes/1073741824); else if ($bytes > 524288) $str = sprintf("%5.2f MBs", $bytes/1048576); else $str = sprintf("%5.2f KBs", $bytes/1024); return $str; } function nothing($ret) { return $ret; } function check_defaults($val,$op,$def) { for($i=0;$i<$def[count];$i++){ if ($val == $def[$i] && ($op == '' || $op == $def[operator][$i])) return 1; } return 0; } function check_ip($ipaddr) { if(ereg("^([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})\x2E([0-9]{1,3})$", $ipaddr,$digit)) { if(($digit[1] <= 255) && ($digit[2] <= 255) && ($digit[3] <= 255) && ($digit[4] <= 255)) { return(1); } } return(0); } ?>