image( $id ); if ( !$image->isOK() ) die(); if ( isset( $_GET["t"] ) && $_GET["t"] == 1 ) { header( "Content-type: image/jpeg" ); if ( isset( $_GET["s"] ) ) { switch ( $_GET["s"] ) { case "127x190": echo $image->thumbnail_127x190(); break; case "260x390": echo $image->thumbnail_260x390(); break; case "260x190": echo $image->thumbnail_260x190(); break; default: echo $image->thumbnail(); } } else { echo $image->thumbnail(); } } else { header( "Content-type: ".$image->mimeType() ); echo $image->data(); } ?>