"); } fclose($file_handler); } else { // Debug print ("File already exist!
"); } } // Check if File Exist if(!file_exists(FLICKR_CACHE_DIR_URL.FLICKR_CACHE_SERIALIZED_INFO_FILENAME)){ // Check if Directory Exist checkDirectory(FLICKR_CACHE_DIR_URL); // Exec Cal $params_list = array( 'api_key' => '10266f027703574e0d8384822fff7e31', 'method' => 'flickr.photosets.getList', 'user_id' => USER_ID, 'format' => 'php_serial', ); $encoded_params_list = array(); foreach ($params_list as $k => $v){ $encoded_params_list[] = urlencode($k).'='.urlencode($v); } $url_list = FLICKR_API_REST_URL.implode('&', $encoded_params_list); $rsp_list = file_get_contents($url_list); $rsp_list_obj = unserialize($rsp_list); if(is_null($rsp_list_obj) || count($rsp_list_obj) <= 0 || !isset($rsp_list_obj['stat']) || $rsp_list_obj['stat'] != 'ok'){ // Debug print("Error: Status not OK.
"); exit(1); } if(!isset($rsp_list_obj['photosets']) || count($rsp_list_obj['photosets']) <= 0){ // Debug print("Error: Photosets doesn't exist.
"); exit(1); } if(!isset($rsp_list_obj['photosets']['photoset']) || count($rsp_list_obj['photosets']['photoset']) <= 0){ // Debug print("Error: Photosets empty.
"); exit(1); } $photoset_obj_array = array(); $counter = 0; foreach($rsp_list_obj['photosets']['photoset'] as $photoset_obj){ if(isset($photoset_obj["title"]) && $photoset_obj["title"] != '' && isset($photoset_obj["title"]["_content"]) && $photoset_obj["title"]["_content"] != ''){ $photoset_obj_array[$counter]["title"] = $photoset_obj["title"]["_content"]; } else { $photoset_obj_array[$counter]["title"] = ""; } if(isset($photoset_obj["description"]) && $photoset_obj["description"] != '' && isset($photoset_obj["description"]["_content"]) && $photoset_obj["description"]["_content"] != ''){ $photoset_obj_array[$counter]["description"] = $photoset_obj["description"]["_content"]; } else { $photoset_obj_array[$counter]["description"] = ""; } $params_photos = array( 'api_key' => '10266f027703574e0d8384822fff7e31', 'method' => 'flickr.photosets.getPhotos', 'photoset_id' => $photoset_obj['id'], 'extras' => 'o_dims', 'format' => 'php_serial' ); $encoded_params_photos = array(); foreach ($params_photos as $k => $v){ $encoded_params_photos[] = urlencode($k).'='.urlencode($v); } $url_photo = FLICKR_API_REST_URL.implode('&', $encoded_params_photos); $rsp_photo = file_get_contents($url_photo); $rsp_photo_obj = unserialize($rsp_photo); if(!is_null($rsp_photo_obj) && count($rsp_photo_obj) > 0 && isset($rsp_photo_obj['stat']) && $rsp_photo_obj['stat'] == 'ok' && isset($rsp_photo_obj['photoset']) && count($rsp_photo_obj['photoset']) > 0){ $photoset_obj_array[$counter]["photoset"] = $rsp_photo_obj["photoset"]; } $counter++; } // Write Images to Disk $tmp_photoset_key = ''; foreach($photoset_obj_array as $photoset_key => $photoset_obj){ $tmp_photoset_key = $photoset_key; if(isset($photoset_obj["photoset"]) && $photoset_obj["photoset"] != "" && isset($photoset_obj["photoset"]["photo"]) && count($photoset_obj["photoset"]["photo"]) > 0){ checkDirectory(FLICKR_CACHE_IMAGES_DIR_URL); $counter_photoset_photo = 0; foreach($photoset_obj["photoset"]["photo"] as $photo){ writeImageToDisk($photo,'s'); writeImageToDisk($photo,'m'); //writeImageToDisk($photo,'z'); writeImageToDisk($photo,'b'); if(isset($photo['o_width']) && $photo['o_width'] != "" && isset($photo['o_height']) && $photo['o_height'] != ""){ $counter_photoset_photo++; continue; } else { $image_width = 0; $image_height = 0; list($image_width, $image_height) = getimagesize(FLICKR_CACHE_IMAGES_DIR_URL.$photo["id"]."_b.jpg"); $photoset_obj_array[$tmp_photoset_key]["photoset"]["photo"][$counter_photoset_photo]['o_width'] = $image_width; $photoset_obj_array[$tmp_photoset_key]["photoset"]["photo"][$counter_photoset_photo]['o_height'] = $image_height; $counter_photoset_photo++; } } } } // Write to File $file = fopen(FLICKR_CACHE_DIR_URL.FLICKR_CACHE_SERIALIZED_INFO_FILENAME, "c"); if (flock($file, LOCK_EX)) { fwrite($file,serialize($photoset_obj_array)) or die('error'); flock($file, LOCK_UN); } fclose($file); } else { // Content output $content = ''; // Get File Content $photoset_array = file_get_contents(FLICKR_CACHE_DIR_URL.FLICKR_CACHE_SERIALIZED_INFO_FILENAME); $photoset_obj_array = unserialize($photoset_array); if ($view_type == 'flickr_gallery_single_view'){ $content = ''; // Set Default Photoset Id, Photo Rows & Photo per Line $photoset_id = DEFAULT_PHOTOSET_ID; $photo_per_line = 4; $photo_rows = 4; // Check for GET/POST parameters if (!is_null($sets) && $sets != ""){ $photoset_id = $sets; } if(isset($_REQUEST['photo_per_line']) && $_REQUEST['photo_per_line'] != ""){ $photo_per_line = (int)$_REQUEST['photo_per_line']; } if(isset($_REQUEST['photo_rows']) && $_REQUEST['photo_rows'] != ""){ $photo_rows = (int)$_REQUEST['photo_rows']; } $photo_grid = $photo_rows * $photo_per_line; $output_html_photos = ""; foreach($photoset_obj_array as $photoset_obj){ if(isset($photoset_obj["photoset"]) && $photoset_obj["photoset"] != ""){ $photoset = $photoset_obj["photoset"]; if($view_type == "flickr_gallery_filtered_view" && $photoset["id"] != $photoset_id){ continue; } $output_html_photos .= ''; $output_html_photos .= ''; } } $content = str_replace('###PHOTOS###',$output_html_photos,$content); return $content; } else { // Build Ouput $content = ''; // Exec Syncronization exec(PHP_SERVER_PATH." ".FLICKR_DIR_URL."flickr_sync.php >/dev/null &"); // Return content return $content; } } ?>
Warning: Illegal string offset 'type' in /var/www/vhosts/charitas.ch/httpdocs/typo3conf/ext/dce/Classes/Domain/Repository/DceRepository.php on line 108
Fondazione Opera Charitas
FONDAZIONE OPERA CHARITAS
Eguaglianza, Rispetto
Integrità ed Onestà

Orari

Orari di accesso

L’ingresso alla casa è libero dalle 08:00 alle 20:00, nel reparto CAT/STT gli orari di visita sono dalle 13:30 alle 20:00

Orari dei pasti

Colazione dalle 08:00 alle 09:30, pranzo dalle 12:00 alle 13:00 e la cena dalle 18:00 alle 19:00

Funzioni religiose

Tutti i sabati alle ore 16:00

Galleria di immagini

charitas.ch usa i cookies. Più informazioni Chiudi