function alertMes($mes,$url){
echo "<script type='text/javascript'>alert('{$mes}');location.href='{$url}';</script>";
* @param string $filename
function getExt($filename){
return strtolower(pathinfo($filename,PATHINFO_EXTENSION));
function getUniqidName($length=10){
return substr(md5(uniqid(microtime(true),true)),0,$length);