$h1 = "DJ Mike's Image Maker 2";
$h2 = "Multi-Upload";
include("functions.php");
if ( $urls = trim($_POST[urls]) )
{
$image = new Imagick();
$delay = (int)$_POST[delay];
$urls = explode( "\n", $urls );
foreach ( $urls as $temp)
{
$temp = trim($temp);
# reject if can't read file
if ( !@$blob = file_get_contents("$temp") )
{
$_SESSION[error] .= "ERROR:
Could not read $url
";
}
try {
$image->readImageBlob("$blob");
$image->setimagedelay($delay);
}
catch ( exception $e )
{
$error .= "Error loading $temp
" .
$e->getmessage() . "
";
}
}
if ( $error )
{
$_SESSION[error] = $error;
header("location:$self");
exit;
}
$path = "temp/$ID.$_SESSION[views].gif";
$image = $image->coalesceImages();
$image->writeimages("$path", TRUE );
$cmd = "convert $path -loop 0 $path";
exec("$cmd", $output);
# save
$_SESSION[path] = $path;
$_SESSION[delay] = $delay;
header("location:display.php");
exit;
}
###################
#}
include("top.php");
?>