Ver Mensaje Individual
  #1 (permalink)  
Antiguo 04/01/2008, 10:29
gesking
 
Fecha de Ingreso: diciembre-2006
Mensajes: 294
Antigüedad: 17 años, 5 meses
Puntos: 2
Subir archivos

Hola! tengo un sitio web que recien está empezando... Es un sitio donde los usuarios suben sus imágenes. Este es: www.host-image.com.ar

Pero... mi problema es que ayer puse unos anuncios de remate y se me jodió, no se pueden subir las imágenes. Los saqué y dejé todo como estaba pero nada, sigue sin funcionar. Si alguien me puede ayudar porfa... les dejo el script:

Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Host-Image</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body,td,th {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 12px;
}
a {
    font-size: 14px;
    color: #006600;
    font-weight: bold;
}
a:link {
    text-decoration: none;
}
a:visited {
    text-decoration: none;
    color: #006600;
}
a:hover {
    text-decoration: underline;
    color: #00CC00;
}
a:active {
    text-decoration: none;
    color: #006600;
}
.file {
    border: 1px solid #0099FF;
    background-color: #88CFFF;
}
.boton {
    border: 2px solid #0099FF;
    background-color: #88CFFF;
    font:bold;
}
.Estilo4 {color: #006600}
.Estilo7 {font-size: 14px}
-->
</style>
</head>
<body>
<div align="center">
  <p><img src="imagenes/logo.jpg"></p>
  <p>&nbsp;</p>
  <p>&nbsp;</p>
</div>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td width="50%">
<div align="center">
<form action="index.php" method="post" enctype="multipart/form-data" name="form1">
<span class="Estilo2">Archivo</span>
<br>
<input name="archivo" type="file" id="archivo" class="file">
<br><br>
<input name="boton" id="boton" class="boton" type="submit" value="Subir Imagen!">
</form>
</div>
</td>
<td width="50%" style="border: 1px solid #0099FF; background-color: #88CFFF">
<b>Solo se admiten archivo con formato JPG, GIF y PNG.</b>
<br>
Tamaño máximo aceptado:<span style="color:#FF0000"> 300KB</span>.
</td>
</tr>
</table>
<br><br>
<?
if($boton) {

$tipo $_FILES['archivo']['type'];
$tamaño $_FILES['archivo']['size'];

if (
is_uploaded_file($HTTP_POST_FILES['archivo']['tmp_name'])) {

if(
$HTTP_POST_FILES['archivo']['size'] < 300000) {

if(
$_FILES['archivo']['type']=="image/gif" || $_FILES['archivo']['type']=="image/jpeg" || $_FILES['archivo']['type']=="image/png") {

$info pathinfo($_FILES['archivo']['name']);
$nnombre substr(md5(uniqid(rand())),0,10).".".strtolower($info['extension']);
$destino =  "".$nnombre;
copy($_FILES['archivo']['tmp_name'], $destino);

$subio true;
}
}
}

   if(
$subio) {
      echo 
'<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td>
<div align="center">
<img src="'
.$nnombre.'">
</div>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="50%">
<table width="100%" border="0" cellspacing="5" cellpadding="0">
<tr>
</tr>
<tr>
<td>
<div align="center">
<b>URL</b>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<textarea name="textarea4" cols="50" rows="2" class="file">http://www.host-image.com.ar/'
.$nnombre.'</textarea>
</div>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
<tr>
<td>
<div align="center">
<b>C&oacute;digo para foros</b>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<textarea name="textarea4" cols="50" rows="2" class="file">[url=http://www.host-image.com.ar][img=http://www.host-image.com.ar/'
.$nnombre.'][/url]</textarea>
</div>
</td>
</tr>
<tr>
<td>&nbsp;
</td>
</tr>
<tr>
<td>
<div align="center">
<b>C&oacute;digo HTML</b>
</div>
</td>
</tr>
<tr>
<td>
<div align="center">
<textarea name="textarea4" cols="50" rows="2" class="file"><a href="http://www.host-image.com.ar"><img src="http://www.host-image.com.ar/'
.$nnombre.'" border="0" /></a></textarea>
</div>
</td>
</tr>
</table>
</td>
<td width="50%" valign="top">
<br><br>
   <b>Nombre:</b>    <a href="'
.$nnombre.'" target="_blank">'.$nnombre.'</a>
<br><br>
   <b>Tipo:</b>    "'
.$tipo.'"
<br><br>
   <b>Tamaño:</b>    <span style="color:#FF0000">"'
.$tamaño.'"</span> bytes
</td>
</tr>
</table>
</td>
</tr>
</table>'
;
   } else {
      echo 
"El archivo no se pudo enviar. Recuerda que debe ser un archivo JPG, GIF o PNG y el tamaño no puede exceder los 300KB";
   }
   die();
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><p><img src="imagenes/actualizaciones.jpg" /></p>
      <p><b>28/12/07</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Se han eliminado las siguientes imágenes: &quot;0d9972aea4.jpg&quot; - &quot;4b728abc4a.jpg&quot; - &quot;11b326144f.jpg&quot; - &quot;22b7b5cf41.jpg&quot; - &quot;ab55dcdab8.jpg&quot; - &quot;bb0020dc27.jpg. El motivo es muy simple: contenido sexual. Ruego que lean las condiciones de uso del sitio para evitar problemas. Además no pude ir eliminando estas imágenes mientras aparecian, ya que me mudé a Villa General Belgrano - Córdoba y recién hoy tengo internet. Muchas gracias y disfruten del servicio.</p>
      <p><b>08/12/07</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Se ha modificado el logo, ya con estilo navideño. También se agregó el efectos de nieve. Se ha hecho antes, ya que no estoy seguro de que me de el tiempo, además ya es 08, fecha en que armamos el arbol de navidad. Espero que sigan disfrutando el servicio.</p>
      <p><b>05/12/07</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Toda imagen que se suba se le cambiará automáticamente su nombre por letras y números. También si su formato (jpg, gif o png) contiene mayusculas, se reemplazan por minusculas. Esto es por cuestion de organización y mejor manejo. Gracias.</p>
      <p>&nbsp;</p>
      <p align="right" class="Estilo4"><span class="Estilo7"><strong>Contacto:</strong> [email][email protected][/email]</span></p>      
      <table width="100%" border="0" cellpadding="0" cellspacing="5" bgcolor="#FFB3B3">
        <tr>
          <td><span class="Estilo1">Advertencia!</span></td>
        </tr>
        <tr>
          <td>No se permiten subir imágenes con contenido ilícito o que viole las <a href="condiciones.php">condiciones de uso</a></td>
        </tr>
        <tr></tr>
      </table></td>
  </tr>
  <tr></tr>
</table>
</body>
</html>