equal
deleted
inserted
replaced
790 function validateEmail(email) |
790 function validateEmail(email) |
791 { |
791 { |
792 return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false; |
792 return ( email.match(/^(?:[\w\d_-]+\.?)+@((?:(?:[\w\d_-]\-?)+\.)+\w{2,4}|localhost)$/) ) ? true : false; |
793 } |
793 } |
794 |
794 |
|
795 /** |
|
796 * Equivalent of PHP's time() |
|
797 * @return int |
|
798 */ |
|
799 |
|
800 function unix_time() |
|
801 { |
|
802 return parseInt((new Date()).getTime()/1000); |
|
803 } |
|
804 |