'; foreach ($data as $datum){ if (!isset($datum['value'])) $datum['value']=""; if (!isset($datum['type'])) $datum['type']="text"; $html=""; switch ($datum['type']) { case "select": $html=""; break; } if ($datum['type']=="hidden"){ echo $html; continue; } echo '', ''; } echo '', '
',$html,'
'; return ob_get_clean(); } public static function IsValidEmail($email){ if( !preg_match("/^([a-zA-Z0-9])+([a-zA-Z0-9\._-])*@([a-zA-Z0-9_-])+([a-zA-Z0-9\._-]+)+$/",$email)) return false; return true; list($userName, $mailDomain)=explode("@", $email); if (checkdnsrr($mailDomain,"MX")) return true; else return false; } public static function DeleteCookie($cookie){ unset($_COOKIE[$cookie]); setcookie($cookie,null,-1,'/'); } public static function GetMaxUploadString(){ $maxUpload=(int)ini_get('upload_max_filesize'); $maxPost=(int)ini_get('post_max_size'); $memoryLimit=(int)ini_get('memory_limit'); $size=min($maxUpload, $maxPost, $memoryLimit); return $size.'MB'; } }