$dbhost"); @mysql_select_db (DBNAME, $linkMysql)or die("Non riesco a selezionare il db $database
"); } function connectDBFORUM() { global $linkMysqlForum; $linkMysqlForum = @mysql_connect (DBHOST, DBUSER, DBPASSWD) or die ("Non riesco a connettermi al server $dbhost"); @mysql_select_db (DBFORUMNAME, $linkMysqlForum)or die("Non riesco a selezionare il db $database
"); } function closeDB() { @mysql_close ($linkMysql); } function closeDBFORUM() { @mysql_close ($linkMysqlForum); } function getTitle($prefix){ $title = $prefix." - ".SITENAME; return $title; } //chiavi di licenza per GMAPS API function getGmapsKey($locurlmap){ switch($locurlmap){ case "www": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSkkQK-kOoh4sUR3ok5UA4EDtyNdBQEEYQhACmkygOy4Zb5QCc81E1u_g"; break; case "avetrana": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQDEc-sikA2i9MCrOGHiwEmg7SldhQnPmP6EAPSCcMNQm_OvF6tCOvbig"; break; case "campomarino": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTBYMqrAQvMf57HYSNp4s-QfVLxkxRv10VSk98k39qJ1vCD5d5ncZER2A"; break; case "carosino": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBRTR3v8bihWiuJbYKCdxm3x8VFHaBSGnHUmrL-WzZDiYH9_-p6q5hDAQg"; break; case "castellaneta": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBS46XbsLVKfkvBmAc3N7HGREW7aPBRIr8zSUiVR4bvjQHxCB-dHuBNs2Q"; break; case "crispiano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQRv3YL7yVyBQpFtMBuwoq_7hlGShT8SzSajjcEBXJkL-C5tXa06NE3fg"; break; case "faggiano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBS4TGW2BTiua-R-zUZklCP5FryMmBSLQ8dGtqVvNWv66WsNDPCrKqcvIg"; break; case "fragagnano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSTjq_NeTxibX2RFw_nwuTO9VltOBSJgIyOAuusfaTBwEugRq9EfQdshQ"; break; case "ginosa": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQGwD8XQnW-X4Rd6828XhprwRVWcxTWsIO3CJcITXnarJIQnjuapuPrKw"; break; case "grottaglie": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBROLG88etcH05JrNRIuqLdUFoM3dRRAivguHU9z-jDtN-P0jUw8OVJS2Q"; break; case "lama": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQW9HsetErFhsuaGRsjDqUNQ1vvrxR8YNYjP_0yXdE6EWq17aPeMInYZw"; break; case "laterza": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTEmooTNOKyvLTw_ul7GszKnnMtJhRDCvW28f56sxuCGgkla4jx5tBYyA"; break; case "leporano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBRzcGcos1v7gQW7O_ISK0nUaXhl2xStC1IJi9wajrpYJEI-aXxwudqjAw"; break; case "lizzano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQFxpiyNnXhadc6hvtVoj4MZ7omxxRYmJn0rZa-4jNG_FA5Z79qwfxoQQ"; break; case "manduria": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSu-7scrvcxJRp1mqjDoiwsWkbHpxQ-QrM68rxS69bKR27DnjUccY8row"; break; case "martina-franca": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSwnOYK0dm-1rE6iZQlwXq-_kdw7hTQGl_MbQ-pIbPJSO684eGr0xBsnA"; break; case "maruggio": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQ4ynOVbTLtUtEdjc9iMwg46GNxbRRykltx7ccj25KHyOcC7I4_-OK9wg"; break; case "massafra": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBS9qWs1U_fpQE9BlzAqoXf_VC2iOBTNi_1djT4vP_3Q_hiigFO1o05OOQ"; break; case "monteiasi": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQayVDDDBMZub8e9fcu-QrsxkSzHhR6HGLeYC6X1u5TmMGGAocoiJJE2A"; break; case "montemesola": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTFtGEbMahluNknlM-wT00qJalqbxRRfU_9lpTfZJH-kHVYO7oEmezsuQ"; break; case "monteparano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQNZemv2uvnQ8WdsINBdHG_RRnZwBQdjVkqZM-jGOEwZAC5cFGJ5rWkoA"; break; case "mottola": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBS0eagREBWjrc_jSIIYavNVhY3WthSPt08VSKajqqd7C1mMUEDsTopuAg"; break; case "palagianello": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQJy95yBRWP9AwP1D9zonHzjvNY4xQDIs3_pAQDXC7tQqKJvCAi20LL7Q"; break; case "palagiano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTciHuHsxLEW0piYsotgIkWrbOOHxSwEyLW0vfUh8wTpydGI7jl6YqgOg"; break; case "pulsano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQX1teSpB5o4pTe1XyAGAq5Fw87QRQ-SlC4DCxFA7LW-UysDEwttHTs1Q"; break; case "roccaforzata": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBQztOArczmFSy3eQA_mbOnXihiWZBRq7pvJ8NEs0vP7KAN7XRVIzfLGQQ"; break; case "san-giorgio-jonico": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTsa_k1pTMjZ3kRDEl3nRAkiYgx2xSMQRHhrCKVwQwvJmrRCtcmcg8eFA"; break; case "san-marzano-di-san-giuseppe": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBRxL8KxFRChiu4WpWbd1Vt5YfEFORSWnnxC9CxBXubEv9su2lAZO8EwRQ"; break; case "san-vito": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTynZSApBGlrXxN3_nggyMUz5B0zhQKlcj4B90_uOyRzlnB-Dor0BKhPA"; break; case "sava": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBRTetm22AfMJKxZAQDgODod4CYIdhTxZ_uVEebljImQfeFhckO-YCQkIQ"; break; case "statte": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSm2sCHlygktB_H4kxx2lY1qHNm8RQOV5wBTAiRkepBh3AYEtYAfsya0Q"; break; case "talsano": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBSWIeM5Tr_rmeASkotKF2BKCN32KhT1pu9aCx7pEEoCU4ZTnabLX-H0Hw"; break; case "torricella": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTTI8LKdgQHnZYgAOkiPCOPE-m6UBSH9hpBJHHJiV9lg7wB-OS1-Z09kw"; break; case "torre-colimena": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBR9nTv4Sw50z42XVaYpO6tLeOqobxR5PsSq0j-Cwz5oyVNElByCNb6VBg"; break; case "riva-dei-tessali": $gMapsKey = "ABQIAAAAqsgYxlurzdWt0l1KIt2WjBTplJdlIEq32d17yEYopB4loi5hvBQsy7ubc44kNzB7Ts0LlPMd5OXaaQ"; break; } return $gMapsKey; } //coordinate localit function getGmapsLatLng($locurlmap){ switch($locurlmap){ case "taranto": $gMapsLatLng = "40.47 , 17.23"; break; case "avetrana": $gMapsLatLng = "40.34 , 17.72"; break; case "campomarino": $gMapsLatLng = "40.30 , 17.57"; break; case "carosino": $gMapsLatLng = "40.46 , 17.39"; break; case "castellaneta": $gMapsLatLng = "40.62 , 16.93"; break; case "crispiano": $gMapsLatLng = "40.60 , 17.22"; break; case "faggiano": $gMapsLatLng = "40.42 , 17.38"; break; case "fragagnano": $gMapsLatLng = "40.43 , 17.47"; break; case "ginosa": $gMapsLatLng = "40.58 , 16.75"; break; case "grottaglie": $gMapsLatLng = "40.54 , 17.43"; break; case "lama": $gMapsLatLng = "40.40 , 17.25"; break; case "laterza": $gMapsLatLng = "40.62 , 16.79"; break; case "leporano": $gMapsLatLng = "40.38 , 17.33"; break; case "lizzano": $gMapsLatLng = "40.39 , 17.44"; break; case "manduria": $gMapsLatLng = "40.40 , 17.63"; break; case "martina-franca": $gMapsLatLng = "40.70 , 17.33"; break; case "maruggio": $gMapsLatLng = "40.32 , 17.57"; break; case "massafra": $gMapsLatLng = "40.58 , 17.11"; break; case "monteiasi": $gMapsLatLng = "40.50 , 17.38"; break; case "montemesola": $gMapsLatLng = "40.56 , 17.33"; break; case "monteparano": $gMapsLatLng = "40.44 , 17.41"; break; case "mottola": $gMapsLatLng = "40.63 , 17.03"; break; case "palagianello": $gMapsLatLng = "40.61 , 16.97"; break; case "palagiano": $gMapsLatLng = "40.57 , 17.03"; break; case "pulsano": $gMapsLatLng = "40.38 , 17.35"; break; case "roccaforzata": $gMapsLatLng = "40.43 , 17.39"; break; case "san-giorgio-jonico": $gMapsLatLng = "40.45 , 17.38"; break; case "san-marzano-di-san-giuseppe": $gMapsLatLng = "40.45 , 17.50"; break; case "san-vito": $gMapsLatLng = "40.41 , 17.21"; break; case "sava": $gMapsLatLng = "40.40 , 17.55"; break; case "statte": $gMapsLatLng = "40.56 , 17.20"; break; case "talsano": $gMapsLatLng = "40.40 , 17.28"; break; case "torricella": $gMapsLatLng = "40.35 , 17.49"; break; case "torre-colimena": $gMapsLatLng = "40.29 , 17.74"; break; case "riva-dei-tessali": $gMapsLatLng = "40.45 , 16.91"; break; } return $gMapsLatLng; } //Script per texarea con editor function getScriptTinyMCE(){ echo ' '; } //body normale function getBody(){ echo ' '; } //body con gmaps function getBodyGmaps($cittakey,$nomeposto,$indirizzo,$cap,$prov,$citta){ $nomeposto1 = str_replace("\"","", $nomeposto); $nomepostoOK = str_replace("'","", $nomeposto1); echo ' '; } function getBodyGmapsCity($cittakey,$indirizzo,$cap,$prov,$citta){ echo ' '; } function getH1($h1){ echo '

'.$h1.'

'; } function getCategoria($catid){ $sqlCat = "SELECT * FROM village_categorie WHERE idcategoria = ".$catid; $queryCat = @mysql_query($sqlCat); while($Cat = @mysql_fetch_assoc($queryCat)){ $categoria = $Cat["descrizione"]; } @mysql_free_result($Cat); return $categoria; } /*** ######################## VECCHIO LAYOUT ######################## function getHeader($title,$description){ // echo ' '.getTitle($title).' '; } function getNoIndexHeader($title,$description){ // echo ' '.getTitle($title).' '; } ***/ function getHeader($title,$description){ echo' '.getTitle($title).' '; } function getNoIndexHeader($title,$description){ echo' '.getTitle($title).' '; } function getNavBar($p1,$link1,$p2,$link2,$p3,$link3){ echo 'Sei in HOME '; if($p1) echo "".$p1." "; if($p2) echo "".$p2." "; if($p3) echo "".$p3." "; } function getMenu($loc,$keyS){ $sqlSettori = "SELECT * FROM village_settori ORDER BY posizione"; $querySettore = @mysql_query($sqlSettori); echo "
\n"; while($Settori = @mysql_fetch_assoc($querySettore)){ echo "
\n"; if($Settori["deskey"]==$keyS){ echo "".$Settori["descrizione"]."\n"; echo "
\n"; if($Settori["deskey"]==$keyS){ $sqlMenuS = "SELECT * FROM village_settori WHERE deskey = '".$keyS."'"; $queryMenuS = @mysql_query($sqlMenuS); if($MenuS = @mysql_fetch_assoc($queryMenuS)){ $sqlCat = "SELECT village_categorie.deskey as deskey,village_categorie.deskey2 as deskey2,"; $sqlCat .= "village_categorie.descrizione as descrizione FROM village_categorie "; $sqlCat .= " WHERE village_categorie.idsettore = ".$MenuS["idsettore"]; $queryCat = @mysql_query($sqlCat); while($Cat = @mysql_fetch_assoc($queryCat)){ echo "
\n"; if(LOCURL=="www"){ echo ""; }else{ echo ""; } echo $Cat["descrizione"].""; echo "\n"; echo "
"; } } } } echo "
\n"; @mysql_free_result($Settori); @mysql_free_result($Cat); @mysql_free_result($MenuS); } function getMenuAdmin(){ echo "
\n"; //EVENTI echo "
\n"; echo "EVENTI\n"; echo "
\n"; echo "
\n"; echo ""; echo "Approvazione eventi"; echo "\n"; echo "
"; echo "
\n"; echo ""; echo "Inserisci evento"; echo "\n"; echo "
"; echo "
\n"; echo ""; echo "Modifica evento"; echo "\n"; echo "
"; echo "
\n"; echo ""; echo "Cancella evento"; echo "\n"; echo "
"; // echo "
\n"; } //create thumb function createthumb($name,$filename,$new_w,$new_h){ $system=explode('.',$name); if (preg_match('/jpg|jpeg/',$system[1])){ $src_img=imagecreatefromjpeg($name); } if (preg_match('/png/',$system[1])){ $src_img=imagecreatefrompng($name); } $old_x=imageSX($src_img); $old_y=imageSY($src_img); if ($old_x > $old_y) { $thumb_w=$new_w; $thumb_h=$old_y*($new_h/$old_x); } if ($old_x < $old_y) { $thumb_w=$old_x*($new_w/$old_y); $thumb_h=$new_h; } if ($old_x == $old_y) { $thumb_w=$new_w; $thumb_h=$new_h; } $dst_img=ImageCreateTrueColor($thumb_w,$thumb_h); imagecopyresampled($dst_img,$src_img,0,0,0,0,$thumb_w,$thumb_h,$old_x,$old_y); if (preg_match("/png/",$system[1])) { imagepng($dst_img,$filename); } else { imagejpeg($dst_img,$filename); } imagedestroy($dst_img); imagedestroy($src_img); } //SEO TOLKIT BEGIN function make_url_friendly($url) { $url = trim($url); $url = strtolower($url); // Fix for most recent topics block // or else a b is shown in every url $find = array('', ''); $url = str_replace ($find, '', $url); $url = preg_replace('/<(\/{0,1})img(.*?)(\/{0,1})\>/', 'image', $url); $find = array(' ', '"', '&', '\r\n', '\n', '/', '\\', '+', '<', '>'); $url = str_replace ($find, '-', $url); $find = array('', '', '', '', '', '', '', ''); $url = str_replace ($find, 'e', $url); $find = array('', '', '', '', '', '', '', ''); $url = str_replace ($find, 'i', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'o', $url); $find = array('', ''); $url = str_replace ($find, 'oe', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'a', $url); $find = array('', ''); $url = str_replace ($find, 'ae', $url); $find = array('', '', '', '', '', ''); $url = str_replace ($find, 'u', $url); $find = array('', ''); $url = str_replace ($find, 'ue', $url); $find = array(''); $url = str_replace ($find, 'ss', $url); $find = array(''); $url = str_replace ($find, 'c', $url); $find = array('/[^a-z0-9\-<>]/', '/[\-]+/', '/<[^>]*>/'); $repl = array('', '-', ''); $url = preg_replace ($find, $repl, $url); $url = str_replace ('--', '-', $url); return $url; } //SEO TOLKIT END ?>