Homer Roofing Hotline:

(020) 8641 1234

info@homer-roofing.co.uk
 
  • Family-Run Business Est. 1949
  • Professional Supply & Fit Service
  • Trade Counter with HUGE Discounts
  • Affiliated Members of the Trade
  • All Works Fully Guaranteed
  • FREE ESTIMATESClick Here
"; print "
"; print ""; foreach($request as $key=>$value) { print ""; } print "
"; print ""; print ""; } return true; } function _submitpage($request, $action) { if (is_array($request)) { print ""; print "
"; foreach($request as $key=>$value) { print ""; } print "
"; print ""; print ""; } return true; } function _submitinfo($action, $info) { print ""; print "
"; print ""; print "
"; print ""; print ""; return true; } /* end of function for submit error or information message */ function _extractpostvalues($request, $fields) { $return = array(); if(is_array($request)) { if (is_array($fields)) { foreach($fields as $key=>$value) { if (array_key_exists($value, $request)) $return[$value] = trim($request[$value]); else $return[$value] = ''; } } } return $return; } function _sethtmlencode ($str) { if (!isset($str)) $str = ""; $str = htmlspecialchars(stripslashes($str)); return $str; } function _sortimages($colname, $sortcolumn, $sortorder) { $colname = strtolower(trim($colname)); $sortcolumn = strtolower(trim($sortcolumn)); $sortorder = strtolower(trim($sortorder)); if ($sortcolumn == $colname) { if ($sortorder == "asc") { print "  "; print "  "; } else { print "  "; print "  "; } } else { print "  "; print "  "; } return true; } function _fillpagesize ($intpagesize) { $parray = array (5,10,20,50,100); print ""; return true; } /* function _fillpageno ($inttotalpage, $intpageno) { print ""; return true; } */ function _checkmethod() { if(strtolower(trim($_SERVER['REQUEST_METHOD'])) != "post") { _submitinfo("index.php", ""); exit(); } } function _years_allow($lnguserid) { $recfound=false; $lnguserid=$lnguserid; $curr_year=date('Y'); if($lnguserid!="" || $lnguserid!=0) { $qry1="select * from taxfilling_year_status where userid=".$lnguserid . " order by years desc" ; $rs1=mysql_query($qry1); $i=0; while($rs=mysql_fetch_array($rs1)) { $arrvalue[]=$rs['years']; $recfound=true; } if($recfound==true) { $curr_year=date('Y'); $preyear2= $curr_year-1; $preyear3= $curr_year-2; $preyear4= $curr_year-3; $preyear5= $curr_year-4; $valarry=array($curr_year,$preyear2,$preyear3,$preyear4,$preyear5); for($i=0;$i".$valarry[$i]; } else { print "".$valarry[$i]; } } } } else { $curr_year=date('Y'); print "". $curr_year; $preyear2= $curr_year-1; print "   ". $preyear2; $preyear3= $curr_year-2; print "   ". $preyear3; $preyear4= $curr_year-3; print "   ". $preyear4; $preyear5= $curr_year-4; print "   ". $preyear5; } } function upload($name,$old,$dir=NULL,$autoid,$number) { global $def_dir; if(!$dir)$dir="../".$GLOBALS["pdf"]; if($_FILES[$name]['name']){ if( is_file($dir.$old) ) unlink($dir.$old); $ext=substr($_FILES[$name]['name'],strpos($_FILES[$name]['name'],"."),strlen($_FILES[$name]['name'])); $file=$autoid.'_'.$number.$ext; // $file=$autoid.'_'.$_FILES[$name]['name']; move_uploaded_file($_FILES[$name]['tmp_name'],$dir.$file); }else{ $file=$old; } return($file); } function upload_form($name,$old,$dir=NULL,$autoid,$number) { global $def_dir; if(!$dir)$dir=$GLOBALS["document"]; if($_FILES[$name]['name']){ if( is_file($dir.$old) ) unlink($dir.$old); $ext=substr($_FILES[$name]['name'],strpos($_FILES[$name]['name'],"."),strlen($_FILES[$name]['name'])); $file=$autoid.'_'.$number.$ext; // $file=$autoid.'_'.$_FILES[$name]['name']; move_uploaded_file($_FILES[$name]['tmp_name'],$dir.$file); }else{ $file=$old; } return($file); } function RatioResizeImgGD($src_file, $dest_file, $newWidth,$newHeight) { // find the image size & type $testGD = get_extension_funcs("gd"); // Grab function list if (!$testGD){ return $src_file; /*echo "GD not even installed."; exit;*/ } if (in_array ("imagecreatetruecolor",$testGD)) $truecolor = TRUE; // Check $imginfo = @getimagesize($src_file); switch($imginfo[2]) { case 1: $type = IMG_GIF; break; case 2: $type = IMG_JPG; break; case 3: $type = IMG_PNG; break; case 4: $type = IMG_WBMP; break; default: return $src_file; break; } switch($type) { case IMG_GIF: if(!function_exists('imagecreatefromgif')){return $src_file;} $srcImage = @imagecreatefromgif("$src_file"); break; case IMG_JPG: if(!function_exists('imagecreatefromjpeg')){return $src_file;} $srcImage = @ImageCreateFromJpeg($src_file); break; case IMG_PNG: if(!function_exists('imagecreatefrompng')){return $src_file;} $srcImage = @imagecreatefrompng("$src_file"); break; case IMG_WBMP: if(!function_exists('imagecreatefromwbmp')){return $src_file;} $srcImage = @imagecreatefromwbmp("$src_file"); break; default: return $src_file; } if($srcImage){ // height/width $srcWidth = $imginfo[0]; $srcHeight = $imginfo[1]; if($srcWidth>$srcHeight){ //echo"$srcWidth>$srcHeight - W
"; $ratio = $srcHeight/$newHeight; $destWidth = $srcWidth / $ratio; $destHeight = $newHeight; if($destWidth<$newWidth){ $ratio = $srcWidth/$newWidth; $destWidth = $newWidth; $destHeight = $srcHeight / $ratio; } } if($srcWidth<$srcHeight){ //echo"H
"; $ratio = $srcWidth/$newWidth; $destWidth = $newWidth; $destHeight = $srcHeight / $ratio; if($destHeight<$newHeight){ $ratio = $srcHeight/$newHeight; $destHeight = $newHeight; $destWidth = $srcWidth / $ratio; } } //echo "$destWidth x $destHeight
"; // resize echo $gd_version; if ($truecolor) { $destImage = @imagecreatetruecolor($destWidth, $destHeight); $cropImage = @imagecreatetruecolor($newWidth,$newHeight); imagecopyresampled($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight); //echo 'GD_2'; } else { $destImage = @imagecreate($destWidth, $destHeight); $cropImage = @imagecreate($newWidth,$newHeight); imagecopyresized($destImage, $srcImage, 0, 0, 0, 0, $destWidth, $destHeight, $srcWidth, $srcHeight); //echo 'GD_1'; } imagecopy($cropImage, $destImage, 0, 0, (($destWidth/2)-($newWidth/2)), (($destHeight/2)-($newHeight/2)), $newWidth, $newHeight); // create and save final picture switch($type){ case IMG_GIF: @imagegif($cropImage, "$dest_file"); break; case IMG_JPG: @imagejpeg($cropImage, "$dest_file"); break; case IMG_PNG: @imagepng($cropImage, "$dest_file"); break; case IMG_WBMP: @imagewbmp($cropImage, "$dest_file"); break; } // free the memory @imagedestroy($srcImage); @imagedestroy($destImage); @imagedestroy($cropImage); return $dest_file; } else { return $src_file; } } function uploadandresizeimage($name,$width=103,$height=97,$imagetype="detail", $imgid="") { global $imgdir; global $thumbfld; global $largefld; global $img; if($_FILES[$name]['name']) { $file=$_FILES[$name]['name']; if (strtolower(trim($imagetype)) == "home") $imgdir = '../'.$GLOBALS["main"]; else if(strtolower(trim($imagetype)) =="detail") $imgdir = '../'.$GLOBALS["detail"]; else $imgdir = '../'.$GLOBALS["thumb"]; if(copy($_FILES[$name]['tmp_name'],$imgdir.$file)) { $percent=0; $img = $imgdir.$file; // get image extention $extention=substr($img,strrpos($img, '.')); // get image file name if (trim($imgid) == "") $img_name=substr($file,0,strrpos($file, '.')); else $img_name = $imgid; // set resize image file name // $resizefile=$imgdir.$img_name.'_'.$imagetype.$extention; $resizefile=$imgdir.$img_name.$extention; // get image size of img $x = @getimagesize($img); // image width $sw = $x[0]; // image height $sh = $x[1]; if ($percent > 0) { // calculate resized height and width if percent is defined $percent = $percent * 0.01; $width = $sw * $percent; $height = $sh * $percent; } else { if (isset ($width) AND !isset ($height)) { // autocompute height if only width is set $height = (100 / ($sw / $width)) * .01; $height = @round ($sh * $height); } elseif (isset ($height) AND !isset ($width)) { // autocompute width if only height is set $width = (100 / ($sh / $height)) * .01; $width = @round ($sw * $width); } elseif (isset ($height) AND isset ($width) ) { // get the smaller resulting image dimension if both height // and width are set and $constrain is also set $hx = (100 / ($sw / $width)) * .01; $hx = @round ($sh * $hx); $wx = (100 / ($sh / $height)) * .01; $wx = @round ($sw * $wx); if ($hx < $height) { $height = (100 / ($sw / $width)) * .01; $height = @round ($sh * $height); } else { $width = (100 / ($sh / $height)) * .01; $width= @round ($sw * $width); } } } if(strcmp($extention,'.gif')==0 or strcmp($extention,'.GIF')==0) { $im = @ImageCreateFromGIF($img); // or GIF Image } elseif(strcmp($extention,'.png')==0 or strcmp($extention,'.PNG')==0) { $im = @ImageCreateFromPNG($img); // or PNG Image } elseif(strcmp($extention,'.jpg')==0 or strcmp($extention,'.jpeg')==0 or strcmp($extention,'.JPG')==0 or strcmp($extention,'.JPEG')==0) { $im = @ImageCreateFromJPEG($img); // Read JPEG Image } elseif(strcmp($extention,'.bmp')==0 or strcmp($extention,'.BMP')==0) { $im = @imagecreatefromwbmp($img); // Read JPEG Image } else { $im = false; // If image is not JPEG, PNG, or GIF } if ($im) { if($height>$sh and $width>$sw) { $height=$sh; $width=$sw; $thumb=$im; } else { // Create the resized image destination $thumb = @ImageCreateTrueColor ($width, $height); // Copy from image source, resize it, and paste to image destination @ImageCopyResampled ($thumb, $im, 0, 0, 0, 0, $width, $height, $sw, $sh); } if(strcmp($extention,'.gif')==0 or strcmp($extention,'.GIF')==0) { if(imagegif($thumb,$resizefile)) //Output a gif image to either the browser or a file { $returnname=$img_name.$extention; } } elseif(strcmp($extention,'.png')==0 or strcmp($extention,'.PNG')==0) { if(imagepng($thumb,$resizefile)) //Output a png image to either the browser or a file { $returnname=$img_name.$extention; } } elseif(strcmp($extention,'.jpg')==0 or strcmp($extention,'.jpeg')==0 or strcmp($extention,'.JPG')==0 or strcmp($extention,'.JPEG')==0) { if(imagejpeg($thumb,$resizefile)) //Output a jpg image to either the browser or a file { $returnname=$img_name.$extention; } } } } } return $returnname; } function formatdatetime($strDate,$strFormat,$strIFormat="d/m/Y",$strSep="/") { $arDate=split(" ",$strDate); $IDate =""; $ITime =""; $IDate = $arDate[0]; if(count($arDate)>1) { $ITime = $arDate[1]; } if(count($arDate)>2) { $ITime=$arDate[1] . " " . $arDate[2]; } $d=""; $m=""; $y=""; if($strFormat=="" || is_null($strFormat)==true) { $strFromat='m/d/Y'; } $s = split($strSep,$IDate); switch($strIFormat) { case "Y-m-d": case "Y/m/d": $d=$s[2]; $m=$s[1]; $y=$s[0]; break; case "d/m/Y": $d=$s[0]; $m=$s[1]; $y=$s[2]; break; case "m/d/Y": $d=$s[1]; $m=$s[0]; $y=$s[2]; break; } $strTime=$ITime; if($ITime=="") { $strTime=date("H:i:s"); } $t = split(":",date("H:i:s",strtotime($strTime))); $h=$t[0]; $n=$t[1]; $s=$t[2]; $dt = mktime($h,$n,$s,$m,$d,$y); $dt1 = date($strFormat,$dt) ; return $dt1; } ?>

Whether you are looking for a FREE Quotation or just more information simply complete the fields below and someone will be in touch with you shortly.

*
*
*
*
Please enter the security code *
*

Homer Roofing (UK) Ltd is registered in England & Wales
The Registered Office: 139 Kingston Road; Wimbledon; London; SW19 1LT
Company No: 7009450; VAT No: 977 2473 75

FacebookTwitter