|  Erelid |  | Ik heb hier een galleryscript maar ik wil dat het maken van de thumbnails automatische gebeurd... ik heb al verschillende keren geprobeerd maar het wil maar nie lukken 
 
    
    
        
            
                <?php if($_POST['action'] == "voeg_foto_toe") { 
    if((!$_POST['foto_titel']) or (!$_POST['foto_beschrijving'])) { 
        echo "<font color=red><center>Je hebt niet alle gegevens ingevuld!</center></font>"; 
        exit; 
    } 
     
    $thumb_naam = $HTTP_POST_FILES['foto_thumb']['name']; 
    if(file_exists($fotoboek_pad . $thumb_naam)) { 
        echo "<font color=red><center><b>Het bestand <i>$thumb_naam </i>bestaat al!"; 
        exit; 
    } 
     
    $foto_naam = $HTTP_POST_FILES['foto_afb']['name']; 
    if(file_exists($fotoboek_pad . $foto_naam)) { 
        echo "<font color=red><center><b>Het bestand <i>$foto_naam </i>bestaat al!"; 
        exit; 
    } 
    if (!move_uploaded_file($HTTP_POST_FILES['foto_thumb']['tmp_name'],$fotoboek_pad . $thumb_naam)) { 
            echo "<center><font color=red><b>De thumbnail kon niet upgeload worden!? Is de directory wel correct gechmod?"; 
            exit; 
    } 
     
    if (!move_uploaded_file($HTTP_POST_FILES['foto_afb']['tmp_name'],$fotoboek_pad . $foto_naam)) { 
            echo "<center><font color=red><b>De foto kon niet upgeload worden!? Is de directory wel correct gechmod?"; 
            exit; 
    } 
     
    $beschrijving = nl2br($_POST['foto_beschrijving']); 
    mysql_query("INSERT INTO fotoboek_afbeeldingen (categorie,thumbnail,afbeelding,titel,beschrijving) VALUES ('" . $_POST['foto_cat'] . "','" . $thumb_naam . "','" . $foto_naam . "','" . addslashes($_POST['foto_titel']) . "','" . addslashes($beschrijving) . "')") or die(mysql_error()); 
    echo "<font color=red><center>De afbeelding $foto_naam is succesvol opgeslagen!</font></center><br>"; 
} ?> <?php if($_POST['action'] == "voeg_foto_toe") {     if((!$_POST['foto_titel']) or (!$_POST['foto_beschrijving'])) {         echo "<font color=red><center>Je hebt niet alle gegevens ingevuld!</center></font>";     }      $thumb_naam = $HTTP_POST_FILES['foto_thumb']['name'];         echo "<font color=red><center><b>Het bestand <i>$thumb_naam </i>bestaat al!";     }      $foto_naam = $HTTP_POST_FILES['foto_afb']['name'];         echo "<font color=red><center><b>Het bestand <i>$foto_naam </i>bestaat al!";     }      if (!move_uploaded_file($HTTP_POST_FILES['foto_thumb']['tmp_name'],$fotoboek_pad . $thumb_naam)) {             echo "<center><font color=red><b>De thumbnail kon niet upgeload worden!? Is de directory wel correct gechmod?";     }      if (!move_uploaded_file($HTTP_POST_FILES['foto_afb']['tmp_name'],$fotoboek_pad . $foto_naam)) {             echo "<center><font color=red><b>De foto kon niet upgeload worden!? Is de directory wel correct gechmod?";     }      $beschrijving = nl2br($_POST['foto_beschrijving']);     mysql_query("INSERT INTO fotoboek_afbeeldingen (categorie,thumbnail,afbeelding,titel,beschrijving) VALUES ('" . $_POST['foto_cat'] . "','" . $thumb_naam . "','" . $foto_naam . "','" . addslashes($_POST['foto_titel']) . "','" . addslashes($beschrijving) . "')") or die(mysql_error());    echo "<font color=red><center>De afbeelding $foto_naam is succesvol opgeslagen!</font></center><br>"; } ?>
   |