Ver Mensaje Individual
  #15 (permalink)  
Antiguo 02/03/2004, 06:58
xema
 
Fecha de Ingreso: febrero-2002
Ubicación: Valencia - España
Mensajes: 488
Antigüedad: 22 años, 2 meses
Puntos: 0
mira me sigue saliendo mal, con esos cambios y todo:

Código PHP:
*
     * 
void buscar_imagenes();
     * 
Se encarga de encontrar (si existenimagenes embebidas en html
     
*/
    function 
buscar_imagenes(){
        if (
$this->adjuntos_indice != 0){
            foreach(
$this->adjuntos as $key => $valor){
             
                if (
eregi('image'$this->adjuntos[$key][tipo]) && eregi('<img.*src=[\"|'](' . $this->adjuntos[$key][nombre] . ')["|'].*>', $this->mail_html)){

                    $img_id = md5($this->adjuntos[$key][nombre]) . "
.nxs@mimemail";
                    $this->mail_html = eregi_replace('(<img.*src=[\"|'])(' . $this->adjuntos[$key][nombre] . ')([\"|'].*> )', '\1cid:' . $img_id . '\3', $this->mail_html);
                    $this->adjuntos[$key][embebido] = $img_id;
                    $this->adjuntos_img[] = $this->adjuntos[$key][nombre];
                }
            }
        }
    }
    
    /*
     * bool valida_correo(string $correo);
     * Funcion encargada de validar si la direccion de correo es
     * valida 'sintacticamente'
     */
    function valida_correo($correo){
        if (ereg('^[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.'[-!#$%&'*+\\./0-9=?A-Z^_`a-z{|}~]+$',$correo)){
                return true;
        }
        $this->debug("
Correo no válido sintacticamente ($correo)");
        return false;
    }

    /*
     * string revisar_mime(string $nombre);
     * Funcion que trata de determinar el tipo MIME por el nombre
     * de archivo mandado, en caso de no encontrar se regresa el
     * predeterminado
     */
    function revisar_mime($nombre){
        $ext_array = explode("
.", $nombre);
        if (($ultimo = count($ext_array) - 1) != 0){
            $ext = $ext_array[$ultimo];
            foreach($this->tipos_mime as $key => $valor){
                if ($ext == $key){
                    return $valor;
                }
            }
        }
        return "
application/octet-stream";
    }
    
    /*
     * int abrir_archivo(string $archivo);
     * Abre el contenido de una archivo y lo devuelve
     * $archivo - Ruta donde se encuentra el archivo a abrir
     */
    function abrir_archivo($archivo){
        if($fp = fopen($archivo, 'r')){
            $regresar = fread($fp, filesize($archivo));
            fclose($fp);
            return $regresar;
        }
        return false;
    } 

    /*
     * void debug(string $msg);
     * Funcion para el manejo de errores de la clase.
     */
    function debug($msg){
        if ($this->msg_error == "
si"){
            echo "
<br><b>Error:</b" . $msg . "<br>";
        }
        elseif ($this->msg_error == "
halt"){
            die ("
<br><b>Error:</b" . $msg . "<br>");
        }
        return false;
    }

}
?> 
__________________
webmaster de xematuning el mejor tuning español con más de 25000 fotos sobre el mundo del tuning, videos, salvapantallas, fondos y mucho más no lo dudes más y visítala!!!