<?php
function check_code($code)
{
	if(preg_match("/[ '.,:;*?~`!@#$%^&+=)(<>{}]|\]|\[|\/|\\\|\"|\|/",$code)){return false;}
	return true;
}
function get_img($type)
{
  switch($type)
   {
        case'doc':
        $path = '/images/ico/doc.png';
        break; 
        case'png':
        $path = '/images/ico/png.png';
        break; 
        case'tif':
        $path = '/images/ico/tif.png';
        break; 
        case'jpg':
        $path = '/images/ico/jpg.png';
        break; 
        case'txt':
        $path = '/images/ico/txt.png';
        break; 
        case'doc':
        $path = '/images/ico/doc.png';
        break; 
        case'mp3':
        $path = '/images/ico/mp3.png';
        break; 
        case'wma':
        $path = '/images/ico/wma.png';
        break;
        case'avi':
        $path = '/images/ico/avi.png';
        break;
        case'rar':
        $path = '/images/ico/rar.png';
        break;
        case'zip':
        $path = '/images/ico/zip.png';
        break;
        case'cab':
        $path = '/images/ico/cab.png';
        break;
        case'wav':
        $path = '/images/ico/wav.png';
        break;
        case'psd':
        $path = '/images/ico/psd.png';
        break;
        case'xls':
        $path = '/images/ico/xls.png';
        break;
        case'ppt':
        $path = '/images/ico/ppt.png';
        break;
		default:
		$path = '/images/ico/unknow.png';
   }
          return $path;
}
?>