\n"; print "a = \"$emaila\"\n"; print "b = \"$emailb\"\n"; print "document.write('');\n"; if (!$word) print "document.write(a + '@' + b + '');\n"; else print "document.write('$word');\n"; print "\n"; } function fit_image($src, $dst, $fit_x, $fit_y) { //print "
Calculating Fit: $src, $dst, $fit_x, $fit_y
\n"; list($original_x, $original_y, $type, $attr) = getimagesize($src); if ($original_x > $original_y) // Landscape { $new_x = $fit_x; $new_y = floor(($original_y/$original_x)*$fit_y); } else if ($original_x < $original_y) // Portrait { $new_y = $fit_y; $new_x = floor(($original_x/$original_y)*$fit_x); } else // Square { $new_x = $fit_x; $new_y = $fit_y; } if ($original_x < $fit_x && $original_y < $fit_y) // image already fits. { $new_x = $original_x; $new_y = $original_y; } //print "
resize_image($src, $dst, $new_x, $new_y)"; resize_image($src, $dst, $new_x, $new_y); } function resize_image($src, $dst, $dstx, $dsty) { global $jpg_quality; //$src = original image location //$dst = destination image location //$dstx = user defined width of image //$dsty = user defined height of image $allowedExtensions = 'jpg jpeg gif png'; $name = explode(".", $src); $currentExtensions = $name[count($name)-1]; $extensions = explode(" ", $allowedExtensions); for($i=0; count($extensions)>$i; $i=$i+1) { if($extensions[$i]==$currentExtensions) { $extensionOK=1; $fileExtension=$extensions[$i]; break; } } if($extensionOK) { $size = getImageSize($src); $width = $size[0]; $height = $size[1]; if($width >= $dstx AND $height >= $dsty) { $proportion_X = $width / $dstx; $proportion_Y = $height / $dsty; if($proportion_X > $proportion_Y ) { $proportion = $proportion_Y; }else{ $proportion = $proportion_X ; } $target['width'] = $dstx * $proportion; $target['height'] = $dsty * $proportion; $original['diagonal_center'] = round(sqrt(($width*$width)+($height*$height))/2); $target['diagonal_center'] = round(sqrt(($target['width']*$target['width'])+ ($target['height']*$target['height']))/2); $crop = round($original['diagonal_center'] - $target['diagonal_center']); if($proportion_X < $proportion_Y ) { $target['x'] = 0; $target['y'] = round((($height/2)*$crop)/$target['diagonal_center']); }else{ $target['x'] = round((($width/2)*$crop)/$target['diagonal_center']); $target['y'] = 0; } if($fileExtension == "jpg" OR $fileExtension=='jpeg') $from = ImageCreateFromJpeg($src); elseif ($fileExtension == "gif") $from = ImageCreateFromGIF($src); elseif ($fileExtension == 'png') $from = imageCreateFromPNG($src); $new = ImageCreateTrueColor ($dstx,$dsty); imagecopyresampled ($new, $from, 0, 0, $target['x'], $target['y'], $dstx, $dsty, $target['width'], $target['height']); if($fileExtension == "jpg" OR $fileExtension == 'jpeg') imagejpeg($new, $dst, $jpg_quality); elseif ($fileExtension == "gif") imagegif($new, $dst); elseif ($fileExtension == 'png') imagepng($new, $dst); } } } ?> Roofing Plus - Professional Roofing That Fits Your Budget - Belleville Ontario
About Roofing Plus Roofing Plus Photos

Thanks for your Business

Email Us roofingplus@live.ca

Hours of Operation:

Monday - Friday 6am - 5pm
Some Saturdays, depending on previous weather week days

Address:

6759A Hwy 62 North, Unit #8
Belleville , ON
K8N 4Z5


Roofing Plus Belleville Ontario

Interested in a Mini-website? Contact Tina at 613-961-1460 or visit www.arttina.com
Website, Content & Graphics produced by Arttina Copyright © 2014 Roofing Plus. All Rights Reserved