Spazio Sposi Puglia: Un nuovo modo di interpretare e vivere il tuo matrimonio in Puglia!

setQuery($catsload); $allcats = $database->loadObjectList(); $firstitem[] = mosHTML::makeOption( '0', $first); $allcats = array_merge($firstitem, $allcats); $catselect = mosHTML::selectList( $allcats, 'catid', $show.' size="1" class="inputbox" ', 'value', 'text', mosGetParam( $_GET, 'catid' ) ); */ $query = "SELECT t1.catid, t1.name, t2.parentid FROM #__sobi2_categories AS t1 LEFT JOIN #__sobi2_cats_relations AS t2 USING(catid) WHERE catid > 1 ORDER BY parentid, ordering"; $database->setQuery($query); $cats = Array(); foreach($database->loadObjectList() as $k => $v) { $parent = $v->parentid; $id = $v->catid; $name = $v->name; if($parent == 1) $cats[$id] = Array('name' => $name, 'sub' => Array()); else $cats[$parent]['sub'][$id] = Array('name' => $name); } $x = 1; foreach($cats as $k => $v) { $name = $v['name']; $sub = $v['sub']; if($x > 1) echo "\n"; echo "
    "; echo "
  • $name
  • "; foreach($sub as $k2 => $v2) { $name2 = $v2['name']; $link = "index.php?option=com_sobi2&Itemid=2&sobi2Task=mySearch&catid=$k2"; $link = sefRelToAbs($link); echo "
  • $name2
  • "; } $x++; } echo "
"; ?>
img["max_height"] = $max_width; $this->img["max_width"] = $max_height; ini_set("memory_limit","64M"); $size = GetImageSize($imgfile); $this->img["width"] = $this->img["new_width"] = $size[0]; $this->img["height"] = $this->img["new_height"] = $size[1]; //detect image format $this->img["format"]=ereg_replace(".*\.(.*)$","\\1",$imgfile); $this->img["format"]=strtoupper($this->img["format"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG $this->img["format"]="JPEG"; $this->img["src"] = ImageCreateFromJPEG ($imgfile); } elseif ($this->img["format"]=="PNG") { //PNG $this->img["format"]="PNG"; $this->img["src"] = ImageCreateFromPNG ($imgfile); } elseif ($this->img["format"]=="GIF") { //GIF $this->img["format"]="GIF"; $this->img["src"] = ImageCreateFromGIF ($imgfile); } elseif ($this->img["format"]=="WBMP") { //WBMP $this->img["format"]="WBMP"; $this->img["src"] = ImageCreateFromWBMP ($imgfile); } else { //DEFAULT echo "Not Supported File"; exit(); } @$this->img["lebar"] = imagesx($this->img["src"]); @$this->img["tinggi"] = imagesy($this->img["src"]); //default quality jpeg $this->img["quality"]=75; } function calc_width($width, $height) { $width = $this->img["width"]; $height = $this->img["height"]; if($width > $this->img["max_width"]) { $new_width = $this->img["max_width"]; $new_wp = (100 * $new_width) / $width; $new_height = ($height * $new_wp) / 100; } else { $new_width = $width; $new_height = $height; } return array($new_width, $new_height); } function calc_height() { $width = $this->img["width"]; $height = $this->img["height"]; if($height > $this->img["max_height"]) { $new_height = $this->img["max_height"]; $new_hp = (100 * $new_height) / $height; $new_width = ($width * $new_hp) / 100; } else { $new_width = $width; $new_height = $height; } return array($new_width, $new_height); } function calc_image_size() { $width = $this->img["width"]; $height = $this->img["height"]; $new_size = array($width, $height); if ($this->img["max_width"] > 0) { $new_size = $this->calc_width($width, $height); if ($this->img["max_height"] > 0) { if ($new_size[1] > $this->img["max_height"]) $new_size = $this->calc_height($new_size[0], $new_size[1]); } $this->img["new_width"] = $new_size[0]; $this->img["new_height"] = $new_size[1]; return $this->return_value($new_size); } if ($this->img["max_height"] > 0) { $new_size = $this->calc_height($width, $height); $this->img["new_width"] = $new_size[0]; $this->img["new_height"] = $new_size[1]; return $this->return_value($new_size); } return $this->return_value($new_size); } function return_value($array) { $array[0] = intval($array[0]); $array[1] = intval($array[1]); return $array; } function size_height($size=100) { //height $this->img["max_height"] = $size; $new_size = $this->calc_image_size(); $this->img["lebar_thumb"] = $this->img["new_width"]; $this->img["tinggi_thumb"] = $this->img["new_height"]; // $this->img["tinggi_thumb"]=$size; // @$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"]; } function size_width($size=100) { //width $this->img["max_width"] = $size; $this->calc_image_size(); $this->img["lebar_thumb"] = $this->img["new_width"]; $this->img["tinggi_thumb"] = $this->img["new_height"]; // $this->img["lebar_thumb"]=$size; // @$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"]; } function size_auto($size=100) { //size if ($this->img["lebar"]>=$this->img["tinggi"]) { $this->img["lebar_thumb"]=$size; @$this->img["tinggi_thumb"] = ($this->img["lebar_thumb"]/$this->img["lebar"])*$this->img["tinggi"]; } else { $this->img["tinggi_thumb"]=$size; @$this->img["lebar_thumb"] = ($this->img["tinggi_thumb"]/$this->img["tinggi"])*$this->img["lebar"]; } } function jpeg_quality($quality=75) { //jpeg quality $this->img["quality"]=$quality; } function show() { //show thumb @Header("Content-Type: image/".$this->img["format"]); /* change ImageCreateTrueColor to ImageCreate if your GD not supported ImageCreateTrueColor function*/ $this->img["des"] = ImageCreateTrueColor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]); @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imageJPEG($this->img["des"],"",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") { //PNG imagePNG($this->img["des"]); } elseif ($this->img["format"]=="GIF") { //GIF imageGIF($this->img["des"]); } elseif ($this->img["format"]=="WBMP") { //WBMP imageWBMP($this->img["des"]); } } function save($save="") { //save thumb if (empty($save)) $save=strtolower("./thumb.".$this->img["format"]); /* change ImageCreateTrueColor to ImageCreate if your GD not supported ImageCreateTrueColor function*/ $this->img["des"] = ImageCreateTrueColor($this->img["lebar_thumb"],$this->img["tinggi_thumb"]); @imagecopyresized ($this->img["des"], $this->img["src"], 0, 0, 0, 0, $this->img["lebar_thumb"], $this->img["tinggi_thumb"], $this->img["lebar"], $this->img["tinggi"]); if ($this->img["format"]=="JPG" || $this->img["format"]=="JPEG") { //JPEG imageJPEG($this->img["des"],"$save",$this->img["quality"]); } elseif ($this->img["format"]=="PNG") { //PNG imagePNG($this->img["des"],"$save"); } elseif ($this->img["format"]=="GIF") { //GIF imageGIF($this->img["des"],"$save"); } elseif ($this->img["format"]=="WBMP") { //WBMP imageWBMP($this->img["des"],"$save"); } } } ?>

Estratto blog (Spazio Sposi)

Questo pazzo pazzo matrimonio..

A partire dal 9 maggio su Italia1,  parte un nuovo programma tv, Questo pazzo pazzo matrimonio, uno show dove gli sposi saranno gli artefici di divertenti scherzi che saranno naturalmente filmati ...
Leggi tutto...

Social Network