function subiravatar(){ include_once("imageresize.class.php"); $f=new funciones(); $pagina="perfil.php?usuario=".$_GET["usuario"]."&tipo=".$_GET["tipo"]." "; $idusuario=mysql::uncampo("SELECT id_usuario FROM usuario WHERE login='******'"); mysql::consulta("DELETE FROM avatares WHERE idusuario='".$idusuario."'"); $ruta=$f->subir_archivos("avatares"); if(mysql::consulta("INSERT INTO avatares VALUES(Null,'".$idusuario."','".$ruta."')")){ ///////////////////// Crear thumbnail ////////////////////// //$source = $ruta; //$dest = str_replace("galerias","galerias/thumbs",$ruta); //$oResize = new ImageResize($source); //$oResize->resizeArea(8); //porcentaje //$oResize->resizeWidth(160); //$oResize->resizeWidthHeight(130,130); //$oResize->save($dest); ////////////////////////////////////////// header("Location: ".$pagina); } else echo "Error al subir el avatar"; }
<tr style=\"background-color:#efefef\"> <td colspan=\"20\" style=\"font-size:20px; color:#0000ff\">Tracking: ".$sql->dato_campo_consulta_ByRow("tracking",$x)."</td> </tr>"; } $devolverx="<table width=\"100%\" border=\"0\" cellpadding=\"5\" cellspacing=\"0\">".$tr."</table>"; return $devolverx; } switch($_REQUEST["action"]){ case "devolver": $titulo=$_POST["titulo"]; $urlimagen=$f->subir_archivos("imgnoticias","imagen"); $contenido=$_POST["noticia"]; $fecha=date("Y-m-d H:i:s"); $fuente=$_POST["fuente"]; if($sql->consulta("INSERT INTO noticias VALUES(Null,'".$titulo."','".$urlimagen."','".$contenido."','".$fecha."','".$fuente."')")){ header("Location: content.php?action=nt"); } break; case "clienteproblemasgrabar": $titulo=$_POST["titulo"]; $email=$_POST["email"]; $namex=$_POST["namex"]; $lastname=$_POST["lastname"];