function cria_nome_url($string)
 {
     $ci =& get_instance();
     $ci->load->helper("inflector");
     return underscore(remove_acentos($string));
 }
function slug($string = NULL)
{
    $string = remove_acentos($string);
    //remover acentos
    return url_title($string, '-', TRUE);
}
Example #3
0
function save_upload($temp_file, $filename, $dir_dest)
{
    global $upload_ext_filter;
    $filename = remove_acentos($filename);
    $file = $dir_dest . $filename;
    $filesize = filesize($temp_file);
    $is_proibido = false;
    foreach ($upload_ext_filter as $key => $ext) {
        if (eregi($ext, $filename)) {
            $is_proibido = true;
            break;
        }
    }
    if (!$is_proibido) {
        if (!limite($filesize)) {
            if (file_exists($file)) {
                if (unlink($file)) {
                    if (copy($temp_file, $file)) {
                        chmod($file, 0777);
                        $out = 6;
                    } else {
                        $out = 2;
                    }
                } else {
                    $out = 5;
                }
            } else {
                if (copy($temp_file, $file)) {
                    chmod($file, 0777);
                    $out = 1;
                } else {
                    $out = 2;
                }
            }
        } else {
            $out = 3;
        }
    } else {
        $out = 4;
    }
    return $out;
}
Example #4
0
function slug($texto = NULL)
{
    $texto = remove_acentos($texto);
    //remover acentos
    return url_title($texto, '-', TRUE);
}