//resizeimage
function resizeimage( $forcedwidth, $forcedheight, $sourcefile, $destfile )
{
$fw = $forcedwidth;
$fh = $forcedheight;
$is = getimagesize( $sourcefile );
if( $is[0] >= $is[1] )
{
$orientation = 0;
}
else
{
$orientation = 1;
$fw = $forcedheight;
$fh = $forcedwidth;
}
if ( $is[0] > $fw || $is[1] > $fh )
{
if( ( $is[0] - $fw ) >= ( $is[1] - $fh ) )
{
$iw = $fw;
$ih = ( $fw / $is[0] ) * $is[1];
}
else
{
$ih = $fh;
$iw = ( $ih / $is[1] ) * $is[0];
}
$t = 1;
}
else
{
$iw = $is[0];
$ih = $is[1];
$t = 2;
}
if ( $t == 1 )
{
$img_src = imagecreatefromjpeg( $sourcefile );
$img_dst = imagecreatetruecolor( $iw, $ih );
imagecopyresampled( $img_dst, $img_src, 0, 0, 0, 0, $iw, $ih, $is[0], $is[1] );
if( !imagejpeg( $img_dst, $destfile, 90 ) )
{
exit( );
}
}
else if ( $t == 2 )
{
//copy( $sourcefile, $destfile );
}
}
function br2nl($coffee) {
$coffee = str_replace("\r\n", "\n", $coffee);
$coffee = str_replace(" \n", "\n", $coffee);
return $coffee;
}
function charpost() {
$charset = _CHARSET;
foreach($_POST as $key => $val)
{
$_POST[$key] = nl2br(htmlentities($_POST[$key], ENT_QUOTES,'UTF-8'));
}
}
//RSS 2.0
class MakeRSS{
var $Articles = array();
// Channel info
var $title = '';
var $link = '';
var $description = '';
var $optional = array();
var $image = array('url' => '', 'title' => '', 'link' => '', 'description' => '', 'w' => 0, 'h' => 0);
function MakeRSS($title, $link, $description, $optional = ''){
$this->title = $title;
$this->link = $link;
$this->description = $description;
if( is_array($optional) and count($optional) ){
$this->optional = $optional;
}
}
function AddOptional($key, $value){
$this->optional[$key] = $value;
}
function AddImage($title, $url, $link, $description = ''){
$this->image['title'] = $title;
$this->image['url'] = $url;
$this->image['link'] = $link;
$this->image['description'] = $description;
if( $tmp = @getimagesize($url) ){
$this->image['w'] = ($tmp[0] > 144) ? 144 : $tmp[0];
$this->image['h'] = ($tmp[1] > 400) ? 400 : $tmp[1];
}
}
function AddArticle($title, $link, $description, $author, $optional = ''){
$i = array_push($this->Articles, array('title' => $title, 'link' => $link, 'description' => $description, 'author' => $author));
if( is_array($optional) and count($optional) ){
--$i;
while( list($k, $v) = each($optional) ){
$this->Articles[$i][$k] = $v;
}
}
}
function Output($save = false, $path = ''){
$out = '' . "\n" .
'' . "\n" .
'' . "\n";
$out .= "$this->title \n" .
" $this->link\n" .
"$this->description \n";
//Channel optionals
if( is_array($this->optional) and count($this->optional) ){
while( list($k, $v) = each($this->optional) ){
$out .= "<$k>$v$k>\n";
}
}
//Image
if( $this->image['title'] and $this->image['url'] and $this->image['link'] ){
$out .= "\n" .
"" . $this->image['title'] . " \n" .
"" . $this->image['url'] . " \n" .
" " . $this->image['link'] . "\n";
if( $this->image['description'] ){
$out .= "" . $this->image['description'] . " \n";
}
if( $this->image['w'] and $this->image['h'] ){
$out .= "" . $this->image['w'] . " \n" .
"" . $this->image['h'] . " \n";
}
$out .= " \n";
}
//Articles
for( $i = 0, $c = count($this->Articles); $i < $c; $i++ ){
$out .= "- \n" .
"
" . $this->Articles[$i]['title'] . " \n" .
" " . $this->Articles[$i]['link'] . "\n" .
"" . $this->Articles[$i]['description'] . " \n" .
"" . $this->Articles[$i]['author'] . " \n";
if( count($this->Articles[$i]) > 4 ){
while( list($k, $v) = each($optional) ){
if( !in_array($k, array('title', 'link', 'description', 'author')) ){
$out .= "<$k>$v$k>\n";
}
}
}
$out .= " \n";
}
$out .= " \n ";
// True output
if( !$save or !$path ){
header("Content-type: application/xml");
echo $out;
return true;
}
else{
$fh = fopen($path, 'w');
if( $fh ){
fwrite($fh, $out);
fclose($fh);
return true;
}
return false;
}
}
}
function chkEmail($email)
{
// elimino spazi, "a capo" e altro alle estremità della stringa
$email = trim($email);
// se la stringa è vuota sicuramente non è una mail
if(!$email) {
return false;
}
// controllo che ci sia una sola @ nella stringa
$num_at = count(explode( '@', $email )) - 1;
if($num_at != 1) {
return false;
}
// controllo la presenza di ulteriori caratteri "pericolosi":
if(strpos($email,';') || strpos($email,',') || strpos($email,' ')) {
return false;
}
// la stringa rispetta il formato classico di una mail?
if(!preg_match( '/^[\w\.\-]+@\w+[\w\.\-]*?\.\w{1,4}$/', $email)) {
return false;
}
return true;
}
?>
//(C) Ing. Simone Zanella www.studioinformatico.net ?>
echo " \n";
echo ""._BROWSERTITLE." \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo " \n";
echo "\n";
?>
Pino & Bertora
Studio Associato
Lo studio tecnico associato Ingg. PINO & BERTORA è una associazione professionale costituita nel 1984.
I soci dello studio sono iscritti all'Ordine Professionale della Provincia di Imperia.
continua
Curriculum Breve
ASCENSORI INCLINATI
Committente
Comune di Imperia
Opera
Realizzazione di percorso meccanizzato con inserimento di ascensori inclinati tra la Marina di Porto ed il Parasio.
Incarico
Progetto architettonico, calcoli strutturali, direzione lavori e sicurezza.
Committente
Comune di Imperia
Opera
Realizzazione di percorso pedonale meccanizzato tra Marina di Porto Maurizio e Parasio – progetto di completamento da piazzetta Miradore a Via Vianelli (palazzo Pagliari).
Incarico
Progetto architettonico, calcoli strutturali, direzione lavori e sicurezza.
Committente
Comune di Cipressa
Opera
Progetto integrato per il recupero della Torre Gallinara con la sistemazione dell’area circostante e realizzazione di percorsi meccanizzati di collegamento con il centro storico e le infrastrutture circostanti: Albergo Autostradale e Museo dell’Olio.
Incarico
Progettazione preliminare
Committente
Comune di Imperia.
Opera
Progetto per realizzazione impianto fisso di trasporto in Via S. Agata (Borgo S. Moro) nelle vicinanze dell’Ospedale.
Incarico
Progettazione preliminare.